1 dnl 2006 Free Software Foundation, Inc.
3 dnl This file is part of GNU Radio
5 dnl GNU Radio is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3, or (at your option)
10 dnl GNU Radio is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with GNU Radio; see the file COPYING. If not, write to
17 dnl the Free Software Foundation, Inc., 51 Franklin Street,
18 dnl Boston, MA 02110-1301, USA.
20 # Create --enable-foo argument for named component, create variables as needed
21 # $1 is component name
22 AC_DEFUN([GRC_ENABLE],[
24 AC_HELP_STRING([--enable-$1],
25 [Fail build if $1 fails configuration]),
27 [[enable_]m4_bpatsubst($1,-,_)=$enable_all_components])
30 # Conditionally build named component.
31 # $1 is component name
32 # $2 is executed if configuration passes and build is desired
33 # Use $passed=no to indicate configuration failure
34 # Any other value of $passed, including blank, assumes success
35 AC_DEFUN([GRC_BUILD_CONDITIONAL],[
36 if test x$passed = xno; then
37 skipped_dirs="$skipped_dirs $1"
38 if test x$[enable_]m4_bpatsubst($1,-,_) = xyes; then
39 AC_MSG_ERROR([Component $1 has errors, stopping.])
41 AC_MSG_RESULT([Not building component $1.])
44 if test x$[enable_]m4_bpatsubst($1,-,_) != xno; then
46 build_dirs="$build_dirs $1"
47 AC_MSG_RESULT([Component $1 passed configuration checks, building.])
49 skipped_dirs="$skipped_dirs $1"
50 AC_MSG_RESULT([Component $1 passed configuration checks, but not building.])