Merged r7769:7873 from michaelld/bc_behavior into trunk.
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Fri, 29 Feb 2008 04:00:13 +0000 (04:00 +0000)
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Fri, 29 Feb 2008 04:00:13 +0000 (04:00 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7888 221aa14e-8319-0410-a670-987f0aec2ac5

39 files changed:
README.components
config/gr_python.m4
config/gr_subversion.m4
config/grc_build.m4
config/grc_gnuradio_core.m4
config/grc_gnuradio_examples.m4
config/grc_gr_atsc.m4
config/grc_gr_audio_alsa.m4
config/grc_gr_audio_jack.m4
config/grc_gr_audio_oss.m4
config/grc_gr_audio_osx.m4
config/grc_gr_audio_portaudio.m4
config/grc_gr_audio_windows.m4
config/grc_gr_comedi.m4
config/grc_gr_cvsd_vocoder.m4
config/grc_gr_gpio.m4
config/grc_gr_gsm_fr_vocoder.m4
config/grc_gr_pager.m4
config/grc_gr_qtgui.m4
config/grc_gr_radar_mono.m4
config/grc_gr_radio_astronomy.m4
config/grc_gr_sounder.m4
config/grc_gr_trellis.m4
config/grc_gr_usrp.m4
config/grc_gr_utils.m4
config/grc_gr_video_sdl.m4
config/grc_gr_wxgui.m4
config/grc_mblock.m4
config/grc_omnithread.m4
config/grc_pmt.m4
config/grc_usrp.m4
config/usrp_fusb_tech.m4
config/usrp_libusb.m4
configure.ac
gnuradio-core/gnuradio-core.pc.in
mblock/mblock.pc.in
pmt/pmt.pc.in
usrp/usrp-inband.pc.in
usrp/usrp.pc.in

index 554c121c0c0da973330739a903ccead3c6307f43..c9ce1d29972110d16e3f777942bf18bfac196210 100755 (executable)
@@ -18,7 +18,7 @@
 
 set -x
 
-PREFIX=/usr/gnuradio
+PREFIX=/opt/gnuradio
 
 echo -n "README.components START "; date
 
index 67a3a36c5f092cd75551dd38638be8c897f3580d..6c862bba397b2516ef92f92c5f8a403ab8a7d2c7 100644 (file)
@@ -123,7 +123,6 @@ print path
              ;;
            esac
 
-           AC_SUBST([PYTHON_LDFLAGS])
-
+           AC_SUBST(PYTHON_LDFLAGS)
        fi
 ])
index 44ae49f1737e9d0007e90a2a61ab63b88470f6ab..366a0fb26f2a189616bf2c04a2b45ae077eb7b19 100644 (file)
@@ -31,6 +31,6 @@ AC_DEFUN([GR_SUBVERSION],[
            SVNDATE=`$SVN info . | grep 'Last Changed Date' | cut -f 4-6 -d ' '`
        fi
 
-       AC_SUBST([SVNVERSION],[$SVNVERSION])
-       AC_SUBST([SVNDATE],[$SVNDATE])
+       AC_SUBST(SVNVERSION)
+       AC_SUBST(SVNDATE)
 ])
index a43988f293d40797b81b9d6fe19fd038e15c4977..bf33d0da23e6ed076372b1bf3624b51240da9717 100644 (file)
@@ -17,85 +17,271 @@ dnl along with GNU Radio; see the file COPYING.  If not, write to
 dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
-# Create --enable-foo argument for named component, create variables as needed
-# $1 is component name
-AC_DEFUN([GRC_ENABLE],[
+dnl Create --enable-foo argument for named component, create variables as needed
+dnl $1 is component name
+AC_DEFUN([GRC_ENABLE], [
+    _GRC_ENABLE($1,m4_bpatsubst($1,-,_))
+])
+dnl $2 is the '_'d component name
+dnl on exit variable enable_$2 will be set to [yes|no];
+dnl         passed will be [yes|no] (same as enable_$2)
+
+AC_DEFUN([_GRC_ENABLE],[
+    passed=yes
     AC_ARG_ENABLE([$1],
                  AC_HELP_STRING([--enable-$1],
-                                [Fail build if $1 fails configuration]),
-                 [],
-                  [[enable_]m4_bpatsubst($1,-,_)=$enable_all_components])
+                                [Stop if $1 fails configuration]),
+                 [],[
+        [enable_]$2=$enable_all_components
+        if test x$enable_all_components = xno; then
+            passed=no
+        fi
+    ])
 ])
+dnl Component specific configuration
+dnl The order of the GR_ macros determines the order of compilation
+dnl For -any- checks on $enable_all_components
+dnl use the following guildlines:
+dnl   yes : --enable-all-components was specified, so error out if any
+dnl         components do not pass configuration checks.
+dnl   no  : --disable-all-components was specified, so try to build the
+dnl         --enable'd components, and error out if any do not pass
+dnl         configuration checks.
+dnl   ""  : this option was not specified on the command line; try to
+dnl         build all components that are not --with'd, but don't
+dnl         error out if any component does not pass configuration checks.
+dnl
+dnl For each --enable-foo component, if that flag is not specified on
+dnl the command line, the related variable $enable_foo will be set to
+dnl $enable_all_components .
 
-# Create --with-foo argument for named compoment, create variables as needed
-# $1 is component name
-AC_DEFUN([GRC_WITH],[
+dnl Create --with-foo argument for named compoment, create variables as needed
+dnl $1 is component name
+dnl $2 is what to do on success
+dnl $3 is the PKG_CONFIG name; if not given, then $1
+AC_DEFUN([GRC_WITH], [
+    if test [x]$3 = x; then
+        pc_comp_name="$1"
+    else
+        pc_comp_name="$3"
+    fi
+    _GRC_WITH($1,[$2],${pc_comp_name},m4_bpatsubst($1,-,_))
+])
+dnl $3 is the pkg-config component name
+dnl $4 is the '_'d component name
+dnl on exit variable passed will be [yes|no|with]:
+dnl   yes: if --enable-$1 and/or --enable-all-components was specified,
+dnl        but --with was not;
+dnl   with: if --with-$1 was specified, and passed checks;
+dnl   no: all other conditions
+AC_DEFUN([_GRC_WITH],[
     AC_ARG_WITH([$1],
-               AC_HELP_STRING([--with-$1],
-                              [Use package $1 if installed in $prefix/lib/pkgconfig; otherwise revert back to --enable-$1]),
-                [],
+               AC_HELP_STRING([--with-$1@<:@=PATH@:>@],
+                              [Use package $1 if installed in PATH (if specified) or PKG_CONFIG_PATH (if PATH not specified); stop if $1 not found]),
+                [if test "x$withval" != "xyes"; then
+                   [with_]$4[_val]=$withval
+                   [with_]$4=yes
+                fi],
                [])
+    if test x$[with_]$4 = xyes; then
+        if test x$[enable_]$4 = xyes; then
+           AC_MSG_ERROR([Component $1: Cannot use both --enable and --with])
+        else
+           _GRC_WITH_PKG_CONFIG_CHECK($1,$3,$4)
+           ifelse([$2], , :, [$2])
+        fi
+    fi
 ])
 
-# Add the specified "with" list; clear the provided variable
-# $1 is the component name
-# $2 is the path list name suffix
-# $3 is the separator (for paths, ":"; for includes " ")
+dnl Use 'pkgconfig' to check for a package
+dnl $1 is the --with component name
+dnl $2 is the pkg-config component name, if provided; otherwise use $1 for this
+dnl on success, resulting INCLUDES, INCLUDEDIR, LA, and LIBDIRPATH variables
+dnl will be set; on failure, will exit with an error.
+AC_DEFUN([GRC_WITH_PKG_CONFIG_CHECK], [
+    if test [x]$2 = x; then
+        pc_comp_name="$1"
+    else
+        pc_comp_name="$2"
+    fi
+    _GRC_WITH_PKG_CONFIG_CHECK($1,${pc_comp_name},m4_bpatsubst($1,-,_))
+])
+dnl $2 is the pkg-config component name
+dnl $3 is the '_'d component name
+AC_DEFUN([_GRC_WITH_PKG_CONFIG_CHECK],[
+    dnl save PKG_CONFIG_PATH, restore at the end
+    s_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
+
+    dnl create the PKG_CONFIG_PATH, via this component arg, if provided;
+    dnl else use the environment PKG_CONFIG_PATH
+    l_PKG_CONFIG_PATH=$[with_]$3[_val]
+    if test "x$l_PKG_CONFIG_PATH" != "x"; then
+        export PKG_CONFIG_PATH=$l_PKG_CONFIG_PATH
+
+        dnl verify that the file exists; if not, no point in continuing
+        if ! test -r ${l_PKG_CONFIG_PATH}/$2[.pc]; then
+           AC_MSG_ERROR([Component $1: PKGCONFIG cannot find info for $2, with provided PKG_CONFIG_PATH = @<:@ $l_PKG_CONFIG_PATH @:>@ .])
+        fi
+    fi
+
+    dnl do the check; error out if not found
+    PKG_CHECK_EXISTS($2, [passed=with; check1=yes], [
+        check1=no
+        dnl pkg-config returned an error; this might be that the .pc
+       dnl file was not valid, or the Requires: were not met.
+       dnl If the arg was provided and the input PKG_CONFIG_PATH , then try
+       dnl again appending the whole PKG_CONFIG_PATH.
+       if test "x$l_PKG_CONFIG_PATH" != "x"; then
+            if test "x$s_PKG_CONFIG_PATH" != "x"; then
+                export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${s_PKG_CONFIG_PATH}
+               PKG_CHECK_EXISTS($2, passed=with, passed=no)
+            fi
+        fi
+        if test $passed != with; then
+            AC_MSG_ERROR([Component $1: PKGCONFIG cannot find info for $2, with PKG_CONFIG_PATH = @<:@ $PKG_CONFIG_PATH @:>@ .])
+        fi
+        dnl pkg-config Requires are now met; save the new PKG_CONFIG_PATH
+        s_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
+    ])
+
+    dnl if PKG_CHECK_EXISTS returned, then this component's .pc file was
+    dnl found in the provided 'arg' PKG_CONFIG_PATH;
+    dnl retrieve various parameters
+    $3[_INCLUDES]=`$PKG_CONFIG --cflags-only-I $2`
+    $3[_LA]=`$PKG_CONFIG --libs $2`
+    $3[_INCLUDEDIR]=`$PKG_CONFIG --variable=includedir $2`
+
+    if test x$check1 = xyes; then
+        dnl prepend the args PKG_CONFIG_PATH to the saved one, if the
+       dnl saved version was not empty
+        if test "x$s_PKG_CONFIG_PATH" != "x"; then
+            export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${s_PKG_CONFIG_PATH}
+        fi
+    fi
+])
+
+dnl Check the $prefix versus the --with libdirpath for this component
+dnl $1 is the prefix
+dnl $2 is the --with component name
+dnl $3 is the --with component library path
+AC_DEFUN([GRC_PREFIX_LDFLAGS],[
+    $2[_LIBDIRPATH]=$3
+    dnl create LDFLAGS for this --with, if different from the provided $prefix
+    if test [x]$1[/lib] != [x]$3; then
+        $2[_LDFLAG]=[-L]$3
+    else
+        $2[_LDFLAG]=
+    fi
+])
+
+dnl Check to make sure this dependency is fulfilled for this component
+dnl $1 is the component's name
+dnl $2 is the component dependency name
+dnl On input and exit, $passed will be:
+dnl   with : if --with passed muster
+dnl   yes  : if --enable passed muster
+dnl   no   : otherwise
+dnl If trying --with, will error-out if any dependency was not --with'd
+AC_DEFUN([GRC_CHECK_DEPENDENCY],[
+dnl    f0=[enable_]m4_bpatsubst($1,-,_)
+dnl    f1=[$enable_]m4_bpatsubst($1,-,_)
+dnl    echo
+dnl    echo "$1 : Checking Dependency $2"
+dnl    echo "$1 : enable_all_components is '$enable_all_components'"
+dnl    echo "$1 : $f0 is '$f1'"
+dnl    echo "$1 : passed is '$passed'"
+dnl    echo
+    if test $passed != no; then
+        if test $passed = yes; then
+            dnl make sure this dependency was not skipped
+            if test [x$]m4_bpatsubst($2,-,_)[_skipped] = xyes; then
+                AC_MSG_RESULT([Component $1 requires $2, which is not being built or specified via pre-installed files.])
+                passed=no
+            fi
+        else
+            dnl make sure this dependency was --with'd only; not --enable'd
+            if test [x$]m4_bpatsubst($2,-,_)[_with] = xno; then
+                AC_MSG_ERROR([Component $1 requires $2 to be included as --with-$1@<:@=arg@:>@])
+            fi
+        fi
+    fi
+])
+
+dnl Check to make sure GUILE is available
+dnl $1 is the component name
+AC_DEFUN([GRC_CHECK_GUILE],[
+    if test x"$GUILE" = x; then
+        AC_MSG_RESULT([Component $1 requires guile, which was not found.])
+        passed=no
+    fi
+])
+
+dnl Add the specified "with" list; clear the provided variable
+dnl $1 is the component name
+dnl $2 is the path list name suffix
+dnl $3 is the separator (for paths, ":"; for includes " ")
 AC_DEFUN([GRC_ADD_TO_LIST],[
-    if test "x${$1_$2}" != "x"; then
-        if test "x$with_$2" = "x"; then
-            with_$2="${$1_$2}"
+    if test "x${$1[_]$2}" != "x"; then
+        if test "x$[with_]$2" = "x"; then
+            [with_]$2="${$1[_]$2}"
        else
-           with_$2="${$1_$2}"$3"$with_$2"
+           [with_]$2="${$1[_]$2}"$3"$[with_]$2"
        fi
-       $1_$2=
+       $1[_]$2=
     fi
 ])
 
-# Conditionally build named component.
-# $1 is component name
-# $2 is executed if configuration passes and build is desired
+dnl Conditionally build named component.
+dnl $1 is component name
+dnl $2 is executed if configuration passes and build is desired
 AC_DEFUN([GRC_BUILD_CONDITIONAL],[
-    _GRC_BUILD_CONDITIONAL($1, m4_bpatsubst($1,-,_), $2)
+    _GRC_BUILD_CONDITIONAL($1, $2, m4_bpatsubst($1,-,_))
 ])
-
-# $1 is the component name
-# $2=m4_bpatsubst($1,-,_)
-# $3 is executed if configuration passes and build is desired
-# Use $passed=no to indicate configuration failure
-# Use $passed=with to indicate the use of pre-installed libraries and headers
-# Any other value of $passed, including blank, assumes success 
+dnl $3=m4_bpatsubst($1,-,_)
+dnl Use $passed=no to indicate configuration failure;
+dnl Use $passed=with to indicate the use of pre-installed libraries and headers;
+dnl Any other value of $passed, including blank, assumes success;
+dnl Defines $3_with=[yes|no] depending on if $passed=with or not (respectively)
+dnl Defines $3_skipped=[yes|no] depending on if $passed=no or not (respectively)
 AC_DEFUN([_GRC_BUILD_CONDITIONAL],[
-    if test x$passed = xno; then
-       if test x$enable_$2 = xyes; then
-           AC_MSG_ERROR([Component $1 has errors, stopping.])
+    $3[_with]=no
+    if test $passed = no; then
+       if test x$[enable_]$3 = xyes; then
+           AC_MSG_ERROR([Component $1 has errors; stopping.])
        else
            AC_MSG_RESULT([Not building component $1.])
        fi
     else
-        if test x$passed = xwith; then
+        if test $passed = with; then
            with_dirs="$with_dirs $1"
-           GRC_ADD_TO_LIST($2, INCLUDES, " ")
-           GRC_ADD_TO_LIST($2, SWIG_INCLUDES, " ")
-           GRC_ADD_TO_LIST($2, PYDIRPATH, ":")
-           GRC_ADD_TO_LIST($2, SWIGDIRPATH, ":")
-           GRC_ADD_TO_LIST($2, LIBDIRPATH, ":")
-           AC_MSG_RESULT([Component $1 will be included from a pre-installed library and includes, and will not be built.])
+           GRC_ADD_TO_LIST($3, INCLUDES, " ")
+           GRC_ADD_TO_LIST($3, SWIG_INCLUDES, " ")
+           GRC_ADD_TO_LIST($3, PYDIRPATH, ":")
+           GRC_ADD_TO_LIST($3, SWIGDIRPATH, ":")
+           GRC_ADD_TO_LIST($3, LIBDIRPATH, ":")
+           AC_MSG_RESULT([Component $1 will be included from a pre-installed library and includes.])
+           $3[_with]=yes
        else
-            if test x$enable_$2 != xno; then
-               $3
+           $3[_LDFLAG]=
+            if test x$[enable_]$3 != xno; then
+               ifelse([$2], , :, [$2])
                build_dirs="$build_dirs $1"
-               AC_MSG_RESULT([Component $1 passed configuration checks, building.])
+               AC_MSG_RESULT([Component $1 passed configuration checks; building.])
             else
                passed=no
-               AC_MSG_RESULT([Component $1 passed configuration checks, but not building.])
+               AC_MSG_RESULT([Component $1 passed configuration checks; but not building.])
            fi
        fi
     fi
-    if test x$passed = xno; then
+    if test $passed = no; then
         skipped_dirs="$skipped_dirs $1"
-        $2_skipped=yes
+        $3[_skipped]=yes
     else
-        $2_skipped=no
+        $3[_skipped]=no
     fi
+    AC_SUBST($3[_INCLUDES])
+    AC_SUBST($3[_LA])
+    AC_SUBST($3[_INCLUDEDIR])
+    AC_SUBST($3[_LIBDIRPATH])
+    AC_SUBST($3[_LDFLAG])
 ])
index 30a8dafff9b413958c2a28877c13a540a5a3c49a..09ac12fb4c8ea2460c1cbd32668e1706cb4d7bbf 100644 (file)
@@ -18,106 +18,96 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GNURADIO_CORE],[
-    GRC_ENABLE([gnuradio-core])
-    GRC_WITH([gnuradio-core])
-    passed=no
-    if test x$with_gnuradio_core = xyes; then
-        if test x$enable_gnuradio_core = xyes; then
-           AC_MSG_ERROR([Component gnuradio-core: Cannot use both --enable and --with])
-        else
-           PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core, passed=with,
-                  AC_MSG_RESULT([Component gnuradio-core: PKGCONFIG cannot find info]))
-            if test x$passed = xwith; then
-                gnuradio_core_INCLUDES=`$PKG_CONFIG --cflags-only-I gnuradio-core`
-               gnuradio_core_LA=$GNURADIO_CORE_LIBS
-               gnuradio_core_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gnuradio-core`
-               gnuradio_core_SWIGDIRPATH="$gnuradio_core_INCLUDEDIR/swig"
-               gnuradio_core_I="$gnuradio_core_SWIGDIRPATH/gnuradio.i"
-               gnuradio_core_SWIG_INCLUDES="-I$gnuradio_core_SWIGDIRPATH"
-               gnuradio_core_LIBDIRPATH=`$PKG_CONFIG --variable=libdir gnuradio-core`
-               gnuradio_core_PYDIRPATH=$pythondir
-            fi
-       fi
-    fi
-    dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
-    dnl otherwise, $passed = no; check the "--enable" stuff
-    if test x$passed = xno; then
-        AC_CONFIG_FILES([ \
-            gnuradio-core/Makefile
-            gnuradio-core/gnuradio-core.pc \
-            gnuradio-core/doc/Doxyfile \
-           gnuradio-core/doc/Makefile \
-            gnuradio-core/doc/other/Makefile \
-            gnuradio-core/doc/xml/Makefile \
-            gnuradio-core/src/Makefile \
-            gnuradio-core/src/gen_interpolator_taps/Makefile \
-            gnuradio-core/src/lib/Makefile \
-            gnuradio-core/src/lib/filter/Makefile \
-            gnuradio-core/src/lib/g72x/Makefile \
-            gnuradio-core/src/lib/general/Makefile \
-            gnuradio-core/src/lib/general/gr_prefix.cc \
-            gnuradio-core/src/lib/gengen/Makefile \
-            gnuradio-core/src/lib/io/Makefile \
-            gnuradio-core/src/lib/missing/Makefile \
-            gnuradio-core/src/lib/reed-solomon/Makefile \
-            gnuradio-core/src/lib/runtime/Makefile \
-            gnuradio-core/src/lib/swig/Makefile \
-            gnuradio-core/src/python/Makefile \
-            gnuradio-core/src/python/bin/Makefile \
-            gnuradio-core/src/python/gnuradio/Makefile \
-            gnuradio-core/src/python/gnuradio/blks2/Makefile \
-            gnuradio-core/src/python/gnuradio/blks2impl/Makefile \
-            gnuradio-core/src/python/gnuradio/gr/Makefile \
-            gnuradio-core/src/python/gnuradio/gr/run_tests \
-            gnuradio-core/src/python/gnuradio/gru/Makefile \
-            gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
-           gnuradio-core/src/python/gnuradio/vocoder/Makefile \
-            gnuradio-core/src/tests/Makefile \
-           gnuradio-core/src/utils/Makefile \
-        ])
-        passed=yes
+    GRC_ENABLE(gnuradio-core)
+
+    GRC_WITH(gnuradio-core, [
+        dnl gnuradio-core has some extra defines if --with specified
+       gnuradio_core_SWIGDIRPATH="$gnuradio_core_INCLUDEDIR/swig"
+       gnuradio_core_I="$gnuradio_core_SWIGDIRPATH/gnuradio.i"
+       gnuradio_core_SWIG_INCLUDES="-I$gnuradio_core_SWIGDIRPATH"
+       gnuradio_core_PYDIRPATH=$pythondir
+    ])
 
-        # Don't do gnuradio-core if omnithread skipped
-        if test x$omnithread_skipped = xyes; then
-            AC_MSG_RESULT([Component gnuradio-core requires omnithread, which is not being built or specified via pre-installed files.])
-           passed=no
-        fi
-        gnuradio_core_INCLUDES="-I\${abs_top_srcdir}/gnuradio-core/src/lib/runtime \
-                   -I\${abs_top_srcdir}/gnuradio-core/src/lib/general \
-                   -I\${abs_top_builddir}/gnuradio-core/src/lib/general \
-                   -I\${abs_top_srcdir}/gnuradio-core/src/lib/gengen \
-                   -I\${abs_top_builddir}/gnuradio-core/src/lib/gengen \
-                   -I\${abs_top_srcdir}/gnuradio-core/src/lib/filter \
-                   -I\${abs_top_builddir}/gnuradio-core/src/lib/filter \
-                   -I\${abs_top_srcdir}/gnuradio-core/src/lib/reed-solomon \
-                   -I\${abs_top_srcdir}/gnuradio-core/src/lib/io \
-                   -I\${abs_top_srcdir}/gnuradio-core/src/lib/g72x \
-                   -I\${abs_top_srcdir}/gnuradio-core/src/lib/swig \
-                   -I\${abs_top_builddir}/gnuradio-core/src/lib/swig \
-                   \$(FFTW3F_CFLAGS)"
+    dnl Don't do gnuradio-core if omnithread skipped
+    GRC_CHECK_DEPENDENCY(gnuradio-core, omnithread)
+
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed != with; then
+       dnl how and where to find INCLUDES and LA and such
+        gnuradio_core_INCLUDES="\
+-I\${abs_top_srcdir}/gnuradio-core/src/lib/runtime \
+-I\${abs_top_srcdir}/gnuradio-core/src/lib/general \
+-I\${abs_top_builddir}/gnuradio-core/src/lib/general \
+-I\${abs_top_srcdir}/gnuradio-core/src/lib/gengen \
+-I\${abs_top_builddir}/gnuradio-core/src/lib/gengen \
+-I\${abs_top_srcdir}/gnuradio-core/src/lib/filter \
+-I\${abs_top_builddir}/gnuradio-core/src/lib/filter \
+-I\${abs_top_srcdir}/gnuradio-core/src/lib/reed-solomon \
+-I\${abs_top_srcdir}/gnuradio-core/src/lib/io \
+-I\${abs_top_srcdir}/gnuradio-core/src/lib/g72x \
+-I\${abs_top_srcdir}/gnuradio-core/src/lib/swig \
+-I\${abs_top_builddir}/gnuradio-core/src/lib/swig \
+\$(FFTW3F_CFLAGS)"
         gnuradio_core_LA="\${abs_top_builddir}/gnuradio-core/src/lib/libgnuradio-core.la"
        gnuradio_core_I="\${abs_top_srcdir}/gnuradio-core/src/lib/swig/gnuradio.i"
        gnuradio_core_LIBDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib:\${abs_top_builddir}/gnuradio-core/src/lib/.libs"
        gnuradio_core_SWIGDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib/swig:\${abs_top_builddir}/gnuradio-core/src/lib/swig/.libs:\${abs_top_srcdir}/gnuradio-core/src/lib/swig"
        gnuradio_core_PYDIRPATH="\${abs_top_srcdir}/gnuradio-core/src/python"
-    fi
-    GRC_BUILD_CONDITIONAL([gnuradio-core],[
-        dnl run_tests is created from run_tests.in.  Make it executable.
-        AC_CONFIG_COMMANDS([run_tests_core], [chmod +x gnuradio-core/src/python/gnuradio/gr/run_tests])
 
         dnl kludge up initial swig dependency files
-        AC_CONFIG_COMMANDS([swig_deps],        [
-               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.d
-               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_general.d
-               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.d
-               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.d
-               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_io.d
-               ])
+        AC_CONFIG_COMMANDS([swig_deps], [
+            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.d
+            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_general.d
+            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.d
+            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.d
+            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_io.d
+        ])
+    fi
+
+    dnl other externally-required gnuradio-core variables
+    AC_SUBST(gnuradio_core_I)
+    AC_SUBST(gnuradio_core_SWIGDIRPATH)
+    AC_SUBST(gnuradio_core_PYDIRPATH)
+
+    AC_CONFIG_FILES([ \
+        gnuradio-core/Makefile
+        gnuradio-core/gnuradio-core.pc \
+        gnuradio-core/doc/Doxyfile \
+        gnuradio-core/doc/Makefile \
+        gnuradio-core/doc/other/Makefile \
+        gnuradio-core/doc/xml/Makefile \
+        gnuradio-core/src/Makefile \
+        gnuradio-core/src/gen_interpolator_taps/Makefile \
+        gnuradio-core/src/lib/Makefile \
+        gnuradio-core/src/lib/filter/Makefile \
+        gnuradio-core/src/lib/g72x/Makefile \
+        gnuradio-core/src/lib/general/Makefile \
+        gnuradio-core/src/lib/general/gr_prefix.cc \
+        gnuradio-core/src/lib/gengen/Makefile \
+        gnuradio-core/src/lib/io/Makefile \
+        gnuradio-core/src/lib/missing/Makefile \
+        gnuradio-core/src/lib/reed-solomon/Makefile \
+        gnuradio-core/src/lib/runtime/Makefile \
+        gnuradio-core/src/lib/swig/Makefile \
+        gnuradio-core/src/python/Makefile \
+        gnuradio-core/src/python/bin/Makefile \
+        gnuradio-core/src/python/gnuradio/Makefile \
+        gnuradio-core/src/python/gnuradio/blks2/Makefile \
+        gnuradio-core/src/python/gnuradio/blks2impl/Makefile \
+        gnuradio-core/src/python/gnuradio/gr/Makefile \
+        gnuradio-core/src/python/gnuradio/gr/run_tests \
+        gnuradio-core/src/python/gnuradio/gru/Makefile \
+        gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
+        gnuradio-core/src/python/gnuradio/vocoder/Makefile \
+        gnuradio-core/src/tests/Makefile \
+        gnuradio-core/src/utils/Makefile \
+    ])
+
+    GRC_BUILD_CONDITIONAL(gnuradio-core, [
+        dnl run_tests is created from run_tests.in.  Make it executable.
+        AC_CONFIG_COMMANDS([run_tests_core],[chmod +x gnuradio-core/src/python/gnuradio/gr/run_tests])
     ])
-    AC_SUBST([gnuradio_core_INCLUDES])
-    AC_SUBST([gnuradio_core_LA])
-    AC_SUBST([gnuradio_core_I])
-    AC_SUBST([gnuradio_core_LIBDIRPATH])
-    AC_SUBST([gnuradio_core_SWIGDIRPATH])
-    AC_SUBST([gnuradio_core_PYDIRPATH])
 ])
index 5dc6caf0a25bf2ad8eec021dfe7034553b80c8a3..919acee4c80b0df0d15ec80de9cead93be41ac40 100644 (file)
@@ -1,49 +1,45 @@
-# Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
-# 
-# This file is part of GNU Radio
-# 
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-# 
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
+dnl 
+dnl This file is part of GNU Radio
+dnl 
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl 
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING.  If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GNURADIO_EXAMPLES],[
-    GRC_ENABLE([gnuradio-examples])
+    GRC_ENABLE(gnuradio-examples)
+
+    dnl Do not do gnuradio-examples if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gnuradio-examples, gnuradio-core)
 
     AC_CONFIG_FILES([ \
         gnuradio-examples/Makefile \
        gnuradio-examples/c++/Makefile \
-        gnuradio-examples/python/Makefile \
-        gnuradio-examples/python/apps/hf_explorer/Makefile \
-        gnuradio-examples/python/apps/hf_radio/Makefile \
-        gnuradio-examples/python/apps/Makefile \
-        gnuradio-examples/python/audio/Makefile \
-       gnuradio-examples/python/dect/Makefile \
-        gnuradio-examples/python/digital/Makefile \
-        gnuradio-examples/python/digital_voice/Makefile \
-        gnuradio-examples/python/multi-antenna/Makefile \
-        gnuradio-examples/python/multi_usrp/Makefile \
-        gnuradio-examples/python/network/Makefile \
-       gnuradio-examples/python/ofdm/Makefile \
-        gnuradio-examples/python/usrp/Makefile \
+       gnuradio-examples/python/Makefile \
+       gnuradio-examples/python/apps/hf_explorer/Makefile \
+       gnuradio-examples/python/apps/hf_radio/Makefile \
+       gnuradio-examples/python/apps/Makefile \
+       gnuradio-examples/python/audio/Makefile \
+       gnuradio-examples/python/dect/Makefile \
+       gnuradio-examples/python/digital/Makefile \
+       gnuradio-examples/python/digital_voice/Makefile \
+       gnuradio-examples/python/multi-antenna/Makefile \
+       gnuradio-examples/python/multi_usrp/Makefile \
+       gnuradio-examples/python/network/Makefile \
+       gnuradio-examples/python/ofdm/Makefile \
+       gnuradio-examples/python/usrp/Makefile \
     ])
 
-    passed=yes
-    # Don't do gnuradio-examples if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gnuradio-examples requires gnuradio-core, which is not being built or specified via pre-installed files.])
-        passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gnuradio-examples])
+    GRC_BUILD_CONDITIONAL(gnuradio-examples)
 ])
index a0b394eade98793445c9a3364c9214329fd76a2f..003d1b7c7f587029d0825b9862bbe16a99f043d6 100644 (file)
@@ -18,25 +18,21 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_ATSC],[
-    GRC_ENABLE([gr-atsc])
+    GRC_ENABLE(gr-atsc)
+
+    dnl Don't do gr-atsc if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-atsc, gnuradio-core)
 
     AC_CONFIG_FILES([\
-       gr-atsc/Makefile \
-       gr-atsc/doc/Makefile \
-       gr-atsc/src/Makefile \
-       gr-atsc/src/lib/Makefile \
-       gr-atsc/src/python/Makefile \
-       gr-atsc/src/python/run_tests \
+        gr-atsc/Makefile \
+        gr-atsc/doc/Makefile \
+        gr-atsc/src/Makefile \
+        gr-atsc/src/lib/Makefile \
+        gr-atsc/src/python/Makefile \
+        gr-atsc/src/python/run_tests \
     ])
 
-    passed=yes
-    # Don't do gr-atsc if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-atsc requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-atsc],[
+    GRC_BUILD_CONDITIONAL(gr-atsc,[
         dnl run_tests is created from run_tests.in.  Make it executable.
        AC_CONFIG_COMMANDS([run_tests_atsc], [chmod +x gr-atsc/src/python/run_tests])
     ])
index 471d33b072621629e6a09a73c0720197cc609b83..f5d6eb32e2c15d181f5d0570bcf80f2015f6a91b 100644 (file)
@@ -18,26 +18,28 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_ALSA],[
-    GRC_ENABLE([gr-audio-alsa])
+    GRC_ENABLE(gr-audio-alsa)
 
-    AC_CONFIG_FILES([ \
-       gr-audio-alsa/Makefile \
-       gr-audio-alsa/src/Makefile \
-       gr-audio-alsa/src/run_tests \
-    ])
+    dnl Don't do gr-audio-alsa if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-audio-alsa, gnuradio-core)
 
-    passed=yes
-    # Don't do gr-audio-alsa if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-audio-osx requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        dnl Don't do gr-audio-alsa if the 'alsa' package is not installed.
+        PKG_CHECK_MODULES(ALSA, alsa >= 0.9,[],
+            [passed=no;AC_MSG_RESULT([gr-audio-alsa requires package alsa, not found.])])
     fi
-    # Don't do gr-audio-alsa if the 'alsa' package is not installed.
-    PKG_CHECK_MODULES(ALSA, alsa >= 0.9,[],
-        [passed=no;AC_MSG_RESULT([gr-audio-alsa requires package alsa, not found.])])
 
-    GRC_BUILD_CONDITIONAL([gr-audio-alsa],[
-       AC_SUBST(ALSA_LIBS)
+    AC_CONFIG_FILES([ \
+        gr-audio-alsa/Makefile \
+        gr-audio-alsa/src/Makefile \
+        gr-audio-alsa/src/run_tests \
+    ])
+
+    GRC_BUILD_CONDITIONAL(gr-audio-alsa,[
        dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_alsa], [chmod +x gr-audio-alsa/src/run_tests])
     ])
index 5cd59e23d3e98820b8ceca4a278f987208579c86..cb7bf2990fc1ebf573ecc7b4a56388080925dafc 100644 (file)
@@ -18,26 +18,28 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_JACK],[
-    GRC_ENABLE([gr-audio-jack])
+    GRC_ENABLE(gr-audio-jack)
+
+    dnl Don't do gr-audio-jack if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-audio-jack, gnuradio-core)
+
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        dnl Don't do gr-audio-jack if in 'jack' isn't installed
+        PKG_CHECK_MODULES(JACK, jack >= 0.8, [],
+            [passed=no;AC_MSG_RESULT([gr-audio-jack requires package jack, not found.])])
+    fi
 
     AC_CONFIG_FILES([ \
-       gr-audio-jack/Makefile \
+        gr-audio-jack/Makefile \
         gr-audio-jack/src/Makefile \
-       gr-audio-jack/src/run_tests \
+        gr-audio-jack/src/run_tests \
     ])
 
-    passed=yes
-    # Don't do gr-audio-jack if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-audio-jack requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-    # Don't do gr-audio-jack if in 'jack' isn't installed
-    PKG_CHECK_MODULES(JACK, jack >= 0.8,[],
-        [passed=no;AC_MSG_RESULT([gr-audio-jack requires package jack, not found.])])
-
-    GRC_BUILD_CONDITIONAL([gr-audio-jack],[
-       AC_SUBST(JACK_LIBS)
+    GRC_BUILD_CONDITIONAL(gr-audio-jack,[
        dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_jack], [chmod +x gr-audio-jack/src/run_tests])
     ])
index 386df51d875629b88678dd27a0c70df05736ff22..6fd4577a8bad0ffa378fec1c7d6d592896162e44 100644 (file)
@@ -18,37 +18,44 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_OSS],[
-    GRC_ENABLE([gr-audio-oss])    
+    GRC_ENABLE(gr-audio-oss)    
 
-    AC_CONFIG_FILES([ \
-       gr-audio-oss/Makefile \
-       gr-audio-oss/src/Makefile \
-       gr-audio-oss/src/run_tests \
-    ])
+    dnl Don't do gr-audio-oss if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-audio-oss, gnuradio-core)
 
-    passed=yes
-    # Don't do gr-audio-oss if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-audio-oss requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-    # Make sure the correct library and/or headers are available.
-    case $host in
-       *-*-netbsd*)
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        dnl Make sure the correct library and/or headers are available.
+        case $host_os in
+         netbsd*)
            AC_HAVE_LIBRARY(ossaudio,[],
                [passed=no;AC_MSG_RESULT([gr-audio-oss requires library ossaudio, not found.])])
-           if test x$passed != xno; then
+           if test $passed != no; then
                OSS_LIBS=-lossaudio
+               AC_SUBST(OSS_LIBS)
                AC_MSG_RESULT([Using OSS library $OSS_LIBS])
            fi
            ;;
-       *)
+          darwin*)
+           dnl OSX / Darwin can't use OSS
+           passed=no
+            ;;
+         *)
            AC_CHECK_HEADER(sys/soundcard.h,[],
                [passed=no;AC_MSG_RESULT([gr-audio-oss requires sys/soundcard.h, not found.])])
-    esac
+        esac
+    fi
+
+    AC_CONFIG_FILES([ \
+        gr-audio-oss/Makefile \
+        gr-audio-oss/src/Makefile \
+        gr-audio-oss/src/run_tests \
+    ])
 
-    GRC_BUILD_CONDITIONAL([gr-audio-oss],[
-       AC_SUBST(OSS_LIBS)
+    GRC_BUILD_CONDITIONAL(gr-audio-oss,[
        dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_oss], [chmod +x gr-audio-oss/src/run_tests])
     ])
index a42ecd5c5cda17b9650722948a17f2085b107509..95fbc17d55895213c6c180677169a49d9621b7f5 100644 (file)
@@ -18,30 +18,36 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_OSX],[
-    GRC_ENABLE([gr-audio-osx])
+    GRC_ENABLE(gr-audio-osx)
 
-    AC_CONFIG_FILES([ \
-       gr-audio-osx/Makefile \
-       gr-audio-osx/src/Makefile \
-       gr-audio-osx/src/run_tests \
-    ])
+    dnl Don't do gr-audio-osx if omnithread or gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-audio-osx, omnithread)
+    GRC_CHECK_DEPENDENCY(gr-audio-osx, gnuradio-core)
 
-    passed=yes
-    MACOSX_AUDIOUNIT([],
-        [passed=no;AC_MSG_RESULT([gr-audio-osx requires AudioUnit, not found.])])
-
-    # Don't do gr-audio-osx if omnithread skipped
-    if test x$omnithread_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-audio-osx requires omnithread, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-    # Don't do gr-audio-osx if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-audio-osx requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        case "$host_os" in
+          darwin*)
+              MACOSX_AUDIOUNIT([],
+                  [passed=no;AC_MSG_RESULT([gr-audio-osx requires AudioUnit, not found.])])
+              ;;
+          *)
+              AC_MSG_RESULT([gr-audio-osx will build on Mac OS X and Darwin only.])
+              passed=no
+              ;;
+        esac
     fi
 
-    GRC_BUILD_CONDITIONAL([gr-audio-osx],[
+    AC_CONFIG_FILES([ \
+        gr-audio-osx/Makefile \
+        gr-audio-osx/src/Makefile \
+        gr-audio-osx/src/run_tests \
+    ])
+
+    GRC_BUILD_CONDITIONAL(gr-audio-osx,[
        dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_osx], [chmod +x gr-audio-osx/src/run_tests])
     ])
index 490d9395c7df6ced9da6b704991721fd128ce058..b2f27f2c80f54f4d2ffb9107988138e1886ca148 100644 (file)
@@ -18,26 +18,28 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_PORTAUDIO],[
-    GRC_ENABLE([gr-audio-portaudio])
+    GRC_ENABLE(gr-audio-portaudio)
 
-    AC_CONFIG_FILES([ \
-       gr-audio-portaudio/Makefile \
-       gr-audio-portaudio/src/Makefile \
-       gr-audio-portaudio/src/run_tests \
-    ])
+    dnl Don't do gr-audio-portaudio if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-audio-portaudio, gnuradio-core)
 
-    passed=yes
-    # Don't do gr-audio-portaudio if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-audio-portaudio requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        dnl Don't do gr-audio-portaudio if the 'portaudio' library is unavailable.
+        PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19,[],
+            [passed=no;AC_MSG_RESULT([gr-audio-portaudio requires package portaudio, not found.])])
     fi
-    # Don't do gr-audio-portaudio if the 'portaudio' library is unavailable.
-    PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19,[],
-        [passed=no;AC_MSG_RESULT([gr-audio-portaudio requires package portaudio, not found.])])
 
-    GRC_BUILD_CONDITIONAL([gr-audio-portaudio],[
-       AC_SUBST(PORTAUDIO_LIBS)
+    AC_CONFIG_FILES([ \
+        gr-audio-portaudio/Makefile \
+        gr-audio-portaudio/src/Makefile \
+        gr-audio-portaudio/src/run_tests \
+    ])
+
+    GRC_BUILD_CONDITIONAL(gr-audio-portaudio,[
        dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_portaudio], [chmod +x gr-audio-portaudio/src/run_tests])
     ])
index c34651eda8e102cd58e14a51badd88998aab02da..bb6244163c17eb6eb0fc78faa93cbefb7c82d1bd 100644 (file)
@@ -18,28 +18,38 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_WINDOWS],[
-    GRC_ENABLE([gr-audio-windows])
+    GRC_ENABLE(gr-audio-windows)
 
-    AC_CONFIG_FILES([ \
-       gr-audio-windows/Makefile \
-       gr-audio-windows/src/Makefile \
-       gr-audio-windows/src/run_tests \
-    ])
+    dnl Don't do gr-audio-windows if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-audio-windows, gnuradio-core)
 
-    passed=yes
-    # Don't do gr-audio-windows if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-audio-windows requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        case "$host_os" in
+          cygwin*|win*|mingw*)
+            dnl Don't do gr-audio-windows if the 'winmm' library isn't available.
+            AC_HAVE_LIBRARY(winmm, [],
+                [passed=no;AC_MSG_RESULT([gr-audio-windows requires library winmm, not found.])])
+            ;;
+          *)
+            AC_MSG_RESULT([gr-audio-windows will build on a Windows Unix environment only.])
+          passed=no
+          ;;
+        esac
     fi
 
-    # Don't do gr-audio-windows if the 'winmm' library isn't available.
-    AC_HAVE_LIBRARY(winmm,[],
-        [passed=no;AC_MSG_RESULT([gr-audio-windows requires library winmm, not found.])])
+    AC_CONFIG_FILES([ \
+        gr-audio-windows/Makefile \
+        gr-audio-windows/src/Makefile \
+        gr-audio-windows/src/run_tests \
+    ])
 
-    GRC_BUILD_CONDITIONAL([gr-audio-windows],[
+    GRC_BUILD_CONDITIONAL(gr-audio-windows,[
        WINAUDIO_LIBS=-lwinmm
-       AC_SUBST(WINAUDIO_LIBS)
+        AC_SUBST(WINAUDIO_LIBS)
        dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_audio_windows], [chmod +x gr-audio-windows/src/run_tests])
     ])
index b27b7d70a524697d20cbea02efd446834dfd6e34..531cafd2a4dcf6357589cf192781e067a552d638 100644 (file)
@@ -18,26 +18,28 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_COMEDI],[
-    GRC_ENABLE([gr-comedi])
+    GRC_ENABLE(gr-comedi)
 
-    AC_CONFIG_FILES([ \
-       gr-comedi/Makefile \
-       gr-comedi/src/Makefile \
-       gr-comedi/src/run_tests \
-    ])
+    dnl Don't do gr-comedi if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-comedi, gnuradio-core)
 
-    passed=yes
-    # Don't do gr-comedi if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-comedi requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        dnl Don't do gr-comedi if the 'comedi' library is unavailable.
+        PKG_CHECK_MODULES(COMEDI, comedilib >= 0.7,[],
+            [passed=no;AC_MSG_RESULT([gr-comedi requires comedilib, not found.])])
     fi
-    # Don't do gr-comedi if the 'comedi' library is unavailable.
-    PKG_CHECK_MODULES(COMEDI, comedilib >= 0.7,[],
-        [passed=no;AC_MSG_RESULT([gr-comedi requires comedilib, not found.])])
 
-    GRC_BUILD_CONDITIONAL([gr-comedi],[
-       AC_SUBST(COMEDI_LIBS)
+    AC_CONFIG_FILES([ \
+        gr-comedi/Makefile \
+        gr-comedi/src/Makefile \
+        gr-comedi/src/run_tests \
+    ])
+
+    GRC_BUILD_CONDITIONAL(gr-comedi,[
        dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_comedi], [chmod +x gr-comedi/src/run_tests])
     ])
index 12b83354cd938a2cc7a51b894139490609c13199..c73a3052b95739769a291fb94acc2de67267e251 100644 (file)
@@ -18,24 +18,20 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_CVSD_VOCODER],[
-    GRC_ENABLE([gr-cvsd-vocoder])
+    GRC_ENABLE(gr-cvsd-vocoder)
+
+    dnl Don't do gr-cvsd-vocoder if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-cvsd-vocoder, gnuradio-core)
 
     AC_CONFIG_FILES([\
-       gr-cvsd-vocoder/Makefile \
-       gr-cvsd-vocoder/src/Makefile \
-       gr-cvsd-vocoder/src/lib/Makefile \
-       gr-cvsd-vocoder/src/python/Makefile \
-       gr-cvsd-vocoder/src/python/run_tests \
+        gr-cvsd-vocoder/Makefile \
+        gr-cvsd-vocoder/src/Makefile \
+        gr-cvsd-vocoder/src/lib/Makefile \
+        gr-cvsd-vocoder/src/python/Makefile \
+        gr-cvsd-vocoder/src/python/run_tests \
     ])
 
-    passed=yes
-    # Don't do gr-cvsd-vocoder if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-cvsd-vocoder requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-cvsd-vocoder],[
+    GRC_BUILD_CONDITIONAL(gr-cvsd-vocoder,[
         dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_cvsd], [chmod +x gr-cvsd-vocoder/src/python/run_tests])
     ])
index f16e00c74395e98253846aa3058e7e4266e688d3..a3eb55688fa2b0b3bef872a8e49b903a860af439 100644 (file)
@@ -18,31 +18,24 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_GPIO],[
-    GRC_ENABLE([gr-gpio])
+    GRC_ENABLE(gr-gpio)
+
+    dnl Don't do gr-gpio if usrp skipped
+    GRC_CHECK_DEPENDENCY(gr-gpio, usrp)
 
     AC_CONFIG_FILES([ \
-        gr-gpio/Makefile \
-        gr-gpio/src/Makefile \
-        gr-gpio/src/fpga/Makefile \
-        gr-gpio/src/fpga/include/Makefile \
-        gr-gpio/src/fpga/top/Makefile \
-         gr-gpio/src/fpga/lib/Makefile \
-        gr-gpio/src/lib/Makefile \
-        gr-gpio/src/python/Makefile \
-         gr-gpio/src/python/run_tests
+        gr-gpio/Makefile \
+        gr-gpio/src/Makefile \
+        gr-gpio/src/fpga/Makefile \
+        gr-gpio/src/fpga/include/Makefile \
+        gr-gpio/src/fpga/top/Makefile \
+        gr-gpio/src/fpga/lib/Makefile \
+        gr-gpio/src/lib/Makefile \
+        gr-gpio/src/python/Makefile \
+        gr-gpio/src/python/run_tests
     ])
 
-    passed=yes
-    # Don't do gr-gpio if usrp skipped
-    for dir in $skipped_dirs
-    do
-       if test x$dir = xusrp; then
-           AC_MSG_RESULT([Component gr-gpio requires usrp, which is not being built.])
-           passed=no
-       fi
-    done
-
-    GRC_BUILD_CONDITIONAL([gr-gpio],[
+    GRC_BUILD_CONDITIONAL(gr-gpio,[
        dnl run_tests is created from run_tests.in.  Make it executable.
        AC_CONFIG_COMMANDS([run_tests_gpio], [chmod +x gr-gpio/src/python/run_tests])
     ])
index b8ccc484049bad1a8f671af15ad5770707811e30..941cb25577f7de3f34bbe3ed8896b84a5502e31e 100644 (file)
@@ -18,25 +18,21 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_GSM_FR_VOCODER],[
-    GRC_ENABLE([gr-gsm-fr-vocoder])
+    GRC_ENABLE(gr-gsm-fr-vocoder)
+
+    dnl Don't do gr-gsm-fr-vocoder if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-gsm-fr-vocoder, gnuradio-core)
 
     AC_CONFIG_FILES([\
-       gr-gsm-fr-vocoder/Makefile \
-       gr-gsm-fr-vocoder/src/Makefile \
-       gr-gsm-fr-vocoder/src/lib/Makefile \
-       gr-gsm-fr-vocoder/src/lib/gsm/Makefile \
-       gr-gsm-fr-vocoder/src/python/Makefile \
-       gr-gsm-fr-vocoder/src/python/run_tests \
+        gr-gsm-fr-vocoder/Makefile \
+        gr-gsm-fr-vocoder/src/Makefile \
+        gr-gsm-fr-vocoder/src/lib/Makefile \
+        gr-gsm-fr-vocoder/src/lib/gsm/Makefile \
+        gr-gsm-fr-vocoder/src/python/Makefile \
+        gr-gsm-fr-vocoder/src/python/run_tests \
     ])
 
-    passed=yes
-    # Don't do gr-gsm-fr-vocoder if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-gsm-fr-vocoder requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-gsm-fr-vocoder],[
+    GRC_BUILD_CONDITIONAL(gr-gsm-fr-vocoder,[
         dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_gsm], [chmod +x gr-gsm-fr-vocoder/src/python/run_tests])
     ])
index cfd0d25b4d71484c0e7baf516adfea6253662240..cb417ae25c2d14cd516a61eb66488d96c2ea7ffc 100644 (file)
@@ -18,22 +18,18 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_PAGER],[
-    GRC_ENABLE([gr-pager])
+    GRC_ENABLE(gr-pager)
+
+    dnl Don't do gr-pager if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-pager, gnuradio-core)
 
     AC_CONFIG_FILES([\
-       gr-pager/Makefile \
-       gr-pager/src/Makefile \
-       gr-pager/src/run_tests
+        gr-pager/Makefile \
+        gr-pager/src/Makefile \
+        gr-pager/src/run_tests
     ])
 
-    passed=yes
-    # Don't do gr-pager if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-pager requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-pager],[
+    GRC_BUILD_CONDITIONAL(gr-pager,[
         dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_pager], [chmod +x gr-pager/src/run_tests])
     ])
index 4dd6ce68e79b4f0cd01d067c2de75857628c2330..479c15a3f686ca206eeba0196988184614d17ca5 100644 (file)
@@ -18,33 +18,30 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_QTGUI],[
-    GRC_ENABLE([gr-qtgui])
+    GRC_ENABLE(gr-qtgui)
 
-    AC_CONFIG_FILES([ \
-         gr-qtgui/Makefile \
-         gr-qtgui/src/Makefile \
-         gr-qtgui/src/lib/Makefile \
-    ])
-
-    passed=yes
-    # Don't do gr-qtgui if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-qtgui requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
+    dnl Don't do gr-qtgui if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-qtgui, gnuradio-core)
 
-    # Check for package qt or qt-mt, set QT_CFLAGS and QT_LIBS
-    PKG_CHECK_MODULES(QT, qt >= 3.3,[],
-    [passed=no;AC_MSG_RESULT([gr-qtgui requires libqt or libqt-mt, libqt not found. Checking for libqt-mt])])
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+       dnl Check for package qt or qt-mt, set QT_CFLAGS and QT_LIBS
+        PKG_CHECK_MODULES(QT, qt >= 3.3, [], [
+           PKG_CHECK_MODULES(QT, qt-mt >= 3.3, [],
+               [passed=no;AC_MSG_RESULT([gr-qtgui requires libqt or libqt-mt, neither found.])])])
 
-    if test x$passed == xno; then
-       passed=yes
-       PKG_CHECK_MODULES(QT, qt-mt >= 3.3,[],
-       [passed=no;AC_MSG_RESULT([gr-qtgui requires libqt or libqt-mt, neither found.])])
+        dnl Fetch QWT variables
+        GR_QWT([], [passed=no])
     fi
 
-    # Fetch QWT variables
-    GR_QWT([], [passed=no])
+    AC_CONFIG_FILES([ \
+        gr-qtgui/Makefile \
+        gr-qtgui/src/Makefile \
+        gr-qtgui/src/lib/Makefile \
+    ])
 
-    GRC_BUILD_CONDITIONAL([gr-qtgui],[])
+    GRC_BUILD_CONDITIONAL(gr-qtgui)
 ])
index 40041dd88bef0ca7c56b35bc6f7edf67ba60738e..bf8e2dac4b7a906734e5ae1e590c8a37af4a2186 100644 (file)
@@ -18,34 +18,27 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_RADAR_MONO],[
-    GRC_ENABLE([gr-radar-mono])
+    GRC_ENABLE(gr-radar-mono)
+
+    dnl Don't do gr-radar-mono if usrp or gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-radar-mono, usrp)
+    GRC_CHECK_DEPENDENCY(gr-radar-mono, gnuradio-core)
 
     AC_CONFIG_FILES([ \
-        gr-radar-mono/Makefile \
-        gr-radar-mono/doc/Makefile \
-        gr-radar-mono/src/Makefile \
-        gr-radar-mono/src/fpga/Makefile \
-        gr-radar-mono/src/fpga/top/Makefile \
-         gr-radar-mono/src/fpga/lib/Makefile \
-         gr-radar-mono/src/fpga/models/Makefile \
-        gr-radar-mono/src/fpga/tb/Makefile \
-        gr-radar-mono/src/lib/Makefile \
-        gr-radar-mono/src/python/Makefile \
-         gr-radar-mono/src/python/run_tests
+        gr-radar-mono/Makefile \
+        gr-radar-mono/doc/Makefile \
+        gr-radar-mono/src/Makefile \
+        gr-radar-mono/src/fpga/Makefile \
+        gr-radar-mono/src/fpga/top/Makefile \
+        gr-radar-mono/src/fpga/lib/Makefile \
+        gr-radar-mono/src/fpga/models/Makefile \
+        gr-radar-mono/src/fpga/tb/Makefile \
+        gr-radar-mono/src/lib/Makefile \
+        gr-radar-mono/src/python/Makefile \
+        gr-radar-mono/src/python/run_tests
     ])
 
-    passed=yes
-    # Don't do gr-radar-mono if usrp or gnuradio-core skipped
-    if test x$usrp_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-radar-mono requires usrp, which is not being built or specified via pre-installed files.])
-        passed=no
-    fi
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-radar-mono requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-radar-mono],[
+    GRC_BUILD_CONDITIONAL(gr-radar-mono,[
        dnl run_tests is created from run_tests.in.  Make it executable.
        AC_CONFIG_COMMANDS([run_tests_radar_mono], [chmod +x gr-radar-mono/src/python/run_tests])
     ])
index cc966295b19c7efd7313b64692ed82241413d2ee..0affe5d7856b380a81263b2ec9b3a030689c5246 100644 (file)
@@ -18,24 +18,20 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_RADIO_ASTRONOMY],[
-    GRC_ENABLE([gr-radio-astronomy])
+    GRC_ENABLE(gr-radio-astronomy)
+
+    dnl Don't do gr-radio-astronomy if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-radio-astronomy, gnuradio-core)
 
     AC_CONFIG_FILES([\
-       gr-radio-astronomy/Makefile \
-       gr-radio-astronomy/src/Makefile \
-       gr-radio-astronomy/src/lib/Makefile \
-       gr-radio-astronomy/src/python/Makefile \
-       gr-radio-astronomy/src/python/run_tests \
+        gr-radio-astronomy/Makefile \
+        gr-radio-astronomy/src/Makefile \
+        gr-radio-astronomy/src/lib/Makefile \
+        gr-radio-astronomy/src/python/Makefile \
+        gr-radio-astronomy/src/python/run_tests \
     ])
 
-    passed=yes
-    # Don't do gr-radio-astronomy if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-radio-astronomy requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-radio-astronomy],[
+    GRC_BUILD_CONDITIONAL(gr-radio-astronomy,[
         dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_astronomy], [chmod +x gr-radio-astronomy/src/python/run_tests])
     ])
index 0553bb27708b35a8faa4c8abfe1e10559d7f453e..672d13ab1315fb33b7521e7c827a88478892adec 100644 (file)
@@ -18,33 +18,26 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_SOUNDER],[
-    GRC_ENABLE([gr-sounder])
+    GRC_ENABLE(gr-sounder)
+
+    dnl Don't do gr-sounder if usrp or gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-sounder, usrp)
+    GRC_CHECK_DEPENDENCY(gr-sounder, gnuradio-core)
 
     AC_CONFIG_FILES([ \
-        gr-sounder/Makefile \
-        gr-sounder/doc/Makefile \
-        gr-sounder/src/Makefile \
-        gr-sounder/src/fpga/Makefile \
-        gr-sounder/src/fpga/top/Makefile \
-         gr-sounder/src/fpga/lib/Makefile \
-        gr-sounder/src/fpga/tb/Makefile \
-        gr-sounder/src/lib/Makefile \
-        gr-sounder/src/python/Makefile \
-         gr-sounder/src/python/run_tests
+        gr-sounder/Makefile \
+        gr-sounder/doc/Makefile \
+        gr-sounder/src/Makefile \
+        gr-sounder/src/fpga/Makefile \
+        gr-sounder/src/fpga/top/Makefile \
+        gr-sounder/src/fpga/lib/Makefile \
+        gr-sounder/src/fpga/tb/Makefile \
+        gr-sounder/src/lib/Makefile \
+        gr-sounder/src/python/Makefile \
+        gr-sounder/src/python/run_tests
     ])
 
-    passed=yes
-    # Don't do gr-sounder if usrp or gnuradio-core skipped
-    if test x$usrp_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-sounder requires usrp, which is not being built or specified via pre-installed files.])
-        passed=no
-    fi
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-sounder requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-sounder],[
+    GRC_BUILD_CONDITIONAL(gr-sounder,[
        dnl run_tests is created from run_tests.in.  Make it executable.
        AC_CONFIG_COMMANDS([run_tests_sounder], [chmod +x gr-sounder/src/python/run_tests])
     ])
index 6fbaa1ac8147d6367315e6f36cede633399a1256..f6ed4a488c1f0cd7db6592880f0ba271338a861d 100644 (file)
@@ -18,27 +18,23 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_TRELLIS],[
-    GRC_ENABLE([gr-trellis])
+    GRC_ENABLE(gr-trellis)
+
+    dnl Don't do gr-trellis if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-trellis, gnuradio-core)
 
     AC_CONFIG_FILES([\
-       gr-trellis/Makefile \
-       gr-trellis/doc/Makefile \
-       gr-trellis/src/Makefile \
-       gr-trellis/src/lib/Makefile \
-       gr-trellis/src/python/Makefile \
-       gr-trellis/src/python/run_tests \
-       gr-trellis/src/examples/Makefile \
-       gr-trellis/src/examples/fsm_files/Makefile
+        gr-trellis/Makefile \
+        gr-trellis/doc/Makefile \
+        gr-trellis/src/Makefile \
+        gr-trellis/src/lib/Makefile \
+        gr-trellis/src/python/Makefile \
+        gr-trellis/src/python/run_tests \
+        gr-trellis/src/examples/Makefile \
+        gr-trellis/src/examples/fsm_files/Makefile
     ])
 
-    passed=yes
-    # Don't do gr-trellis if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-trellis requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-trellis],[
+    GRC_BUILD_CONDITIONAL(gr-trellis,[
         dnl run_tests is created from run_tests.in.  Make it executable.
        AC_CONFIG_COMMANDS([run_tests_gr_trellis], [chmod +x gr-trellis/src/python/run_tests])
     ])
index 576ef85e437fb4eea82b23410f345742b766da3e..c28d9757d55c2531ae54a81bb8c87231c4a97058 100644 (file)
@@ -18,26 +18,19 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_USRP],[
-    GRC_ENABLE([gr-usrp])
+    GRC_ENABLE(gr-usrp)
+
+    dnl Don't do gr-usrp if usrp or gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-usrp, usrp)
+    GRC_CHECK_DEPENDENCY(gr-usrp, gnuradio-core)
 
     AC_CONFIG_FILES([ \
-        gr-usrp/Makefile \
-        gr-usrp/src/Makefile \
-        gr-usrp/src/run_tests \
+        gr-usrp/Makefile \
+        gr-usrp/src/Makefile \
+        gr-usrp/src/run_tests \
     ])
 
-    passed=yes
-    # Don't do gr-usrp if usrp or gnuradio-core skipped
-    if test x$usrp_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-usrp requires usrp, which is not being built or specified via pre-installed files.])
-        passed=no
-    fi
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-usrp requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-usrp],[
+    GRC_BUILD_CONDITIONAL(gr-usrp,[
        dnl run_tests is created from run_tests.in.  Make it executable.
        AC_CONFIG_COMMANDS([run_tests_usrp], [chmod +x gr-usrp/src/run_tests])
     ])
index 34f56da1e210fb31bd6e4d296fe2375b4642ed52..7fe07d854f2ec0b15b11a60c1d83c5d134fc27f6 100644 (file)
 # Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_UTILS],[
-    GRC_ENABLE([gr-utils])
+    GRC_ENABLE(gr-utils)
+
+    dnl Don't do gr-utils if gnuradio-core, usrp, or gr-wxgui skipped
+    GRC_CHECK_DEPENDENCY(gr-utils, gnuradio-core)
+    GRC_CHECK_DEPENDENCY(gr-utils, usrp)
+    GRC_CHECK_DEPENDENCY(gr-utils, gr-wxgui)
 
     AC_CONFIG_FILES([ \
         gr-utils/Makefile \
-       gr-utils/src/Makefile \
-       gr-utils/src/lib/Makefile \
-       gr-utils/src/python/Makefile \
+        gr-utils/src/Makefile \
+        gr-utils/src/lib/Makefile \
+        gr-utils/src/python/Makefile \
     ])
 
-    passed=yes
-    # Don't do gr-utils if gnuradio-core, usrp, or gr-wxgui skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-utils requires gnuradio-core, which is not being built or specified via pre-installed files.])
-        passed=no
-    fi
-    if test x$usrp_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-utils requires usrp, which is not being built or specified via pre-installed files.])
-        passed=no
-    fi
-    if test x$gr_wxgui_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-utils requires gr-wxgui, which is not being built or specified via pre-installed files.])
-        passed=no
-    fi
-
-    GRC_BUILD_CONDITIONAL([gr-utils])
+    GRC_BUILD_CONDITIONAL(gr-utils)
 ])
index 74aa5c046c9b7f2e09b1114c2f348db923d6e4f7..774f7250c8b0d69dae57c9af69363b24283174d3 100644 (file)
@@ -20,26 +20,28 @@ dnl Boston, MA 02110-1301, USA.
 AC_DEFUN([GRC_GR_VIDEO_SDL],[
     GRC_ENABLE([gr-video-sdl])
 
+    dnl Don't do gr-video-sdl if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-video-sdl, gnuradio-core)
+
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        dnl Don't do gr-video-sdl if the SDL library is unavailable.
+       PKG_CHECK_MODULES(SDL, sdl >= 1.2.0, [],
+          [SDL_VERSION=1.2.0
+           AM_PATH_SDL($SDL_VERSION, [], [
+             passed=no;AC_MSG_RESULT([gr-video-sdl requires library sdl, not found or failed test.])])])
+    fi
+
     AC_CONFIG_FILES([ \
-       gr-video-sdl/Makefile \
-       gr-video-sdl/src/Makefile \
-       gr-video-sdl/src/run_tests \
+        gr-video-sdl/Makefile \
+        gr-video-sdl/src/Makefile \
+        gr-video-sdl/src/run_tests \
     ])
-    
-    passed=yes
-    # Don't do gr-video-sdl if gnuradio-core skipped
-    if test x$gnuradio_core_skipped = xyes; then
-        AC_MSG_RESULT([Component gr-video-sdl requires gnuradio-core, which is not being built or specified via pre-installed files.])
-       passed=no
-    fi
-    # Don't do gr-video-sdl if the SDL library is unavailable.
-    SDL_VERSION=1.2.0
-    AM_PATH_SDL($SDL_VERSION,[],
-        [passed=no;AC_MSG_RESULT([gr-video-sdl requires library sdl, not found or failed test.])])
 
-    GRC_BUILD_CONDITIONAL([gr-video-sdl],[
-       AC_SUBST(SDL_CFLAGS)
-       AC_SUBST(SDL_LIBS)
+    GRC_BUILD_CONDITIONAL(gr-video-sdl,[
        dnl run_tests is created from run_tests.in.  Make it executable.
         AC_CONFIG_COMMANDS([run_tests_sdl], [chmod +x gr-video-sdl/src/run_tests])
     ])
index f3104a37e36f67f3d3bf924101ebfe55b17f7589..522c62520e6e419db6299d7feeb5b3c04d514389 100644 (file)
@@ -18,37 +18,30 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_WXGUI],[
-    GRC_ENABLE([gr-wxgui])
-    GRC_WITH([gr-wxgui])
-    passed=no
-    if test x$with_gr_wxgui = xyes; then
-        if test x$enable_gr_wxgui = xyes; then
-           AC_MSG_ERROR([Component gr-wxgui: Cannot use both --enable and --with])
-        else
-           PKG_CHECK_MODULES(GR_WXGUI, gr-wxgui, passed=with,
-                  AC_MSG_RESULT([Component gr-wxgui: PKGCONFIG cannot find info]))
-       fi
-    fi
-    dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
-    dnl otherwise, $passed = no; check the "--enable" stuff
-    if test x$passed = xno; then
-        AC_CONFIG_FILES([ \
-           gr-wxgui/Makefile \
-           gr-wxgui/gr-wxgui.pc \
-           gr-wxgui/src/Makefile \
-           gr-wxgui/src/python/Makefile \
-        ])
+    GRC_ENABLE(gr-wxgui)
 
-        passed=yes
-        # Don't do gr-wxgui if gnuradio-core skipped
-        if test x$gnuradio_core_skipped = xyes; then
-            AC_MSG_RESULT([Component gr-wxgui requires gnuradio-core, which is not being built or specified via pre-installed files.])
-            passed=no
-        fi
-        # Don't do gr-wxgui if wxPython is not available
+    GRC_WITH(gr-wxgui)
+
+    dnl Don't do gr-wxgui if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-wxgui, gnuradio-core)
+
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        dnl Don't do gr-wxgui if wxPython is not available
         if ! ${PYTHON} -c 'import wx'; then
             passed=no
         fi
     fi
-    GRC_BUILD_CONDITIONAL([gr-wxgui])
+
+    AC_CONFIG_FILES([ \
+        gr-wxgui/Makefile \
+        gr-wxgui/gr-wxgui.pc \
+        gr-wxgui/src/Makefile \
+        gr-wxgui/src/python/Makefile \
+    ])
+
+    GRC_BUILD_CONDITIONAL(gr-wxgui)
 ])
index ec985e0530d4c13afe6e1601482304c0664022b8..e262f25b8613d79ce9528c622b5064b5501fac97 100644 (file)
@@ -18,58 +18,40 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_MBLOCK],[
-    GRC_ENABLE([mblock])
-    GRC_WITH([mblock])
-    passed=no
-    if test x$with_mblock = xyes; then
-        if test x$enable_mblock = xyes; then
-           AC_MSG_ERROR([Component mblock: Cannot use both --enable and --with])
-        else
-           PKG_CHECK_MODULES(MBLOCK, mblock, passed=with,
-                  AC_MSG_RESULT([Component mblock: PKGCONFIG cannot find info]))
-            if test x$passed = xwith; then
-                mblock_INCLUDES=`$PKG_CONFIG --cflags-only-I mblock`
-               mblock_LA=$MBLOCK_LIBS
-            fi
-       fi
+    GRC_ENABLE(mblock)
+
+    GRC_WITH(mblock)
+
+    dnl Don't do mblock if omnithread or pmt skipped
+    GRC_CHECK_DEPENDENCY(mblock, pmt)
+    GRC_CHECK_DEPENDENCY(mblock, omnithread)
+
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+       dnl Don't do mblock if guile not available
+       GRC_CHECK_GUILE(mblock)
     fi
-    dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
-    dnl otherwise, $passed = no; check the "--enable" stuff
-    if test x$passed = xno; then
-        AC_CONFIG_FILES([\
-           mblock/Makefile \
-           mblock/mblock.pc \
-           mblock/doc/Makefile \
-           mblock/src/Makefile \
-           mblock/src/lib/Makefile \
-           mblock/src/scheme/Makefile \
-           mblock/src/scheme/gnuradio/Makefile \
-       ])
-       passed=yes
-       # Don't do mblock if omnithread or pmt skipped
-       if test x$omnithread_skipped = xyes; then
-           AC_MSG_RESULT([Component mblock requires omnithread, which is not being built or specified via pre-installed files.])
-           passed=no
-       fi
-       if test x$pmt_skipped = xyes; then
-           AC_MSG_RESULT([Component mblock requires pmt, which is not being built or specified via pre-installed files.])
-           passed=no
-       fi
-       # Don't do mblock if guile not available
-       AC_PATH_PROG(GUILE,guile)
-       if test "$GUILE" = "" ; then
-           AC_MSG_RESULT([Component mblock requires guile, which was not found.])
-           passed=no
-       fi
+    if test $passed != with; then
+       dnl how and where to find INCLUDES and LA
        mblock_INCLUDES="-I\${abs_top_srcdir}/mblock/src/lib"
         mblock_LA="\${abs_top_builddir}/mblock/src/lib/libmblock.la"
     fi
 
-    GRC_BUILD_CONDITIONAL([mblock],[
+    AC_CONFIG_FILES([\
+        mblock/Makefile \
+        mblock/mblock.pc \
+        mblock/doc/Makefile \
+        mblock/src/Makefile \
+        mblock/src/lib/Makefile \
+        mblock/src/scheme/Makefile \
+        mblock/src/scheme/gnuradio/Makefile \
+    ])
+
+    GRC_BUILD_CONDITIONAL(mblock,[
         dnl run_tests is created from run_tests.in.  Make it executable.
        dnl AC_CONFIG_COMMANDS([run_tests_mblock], [chmod +x mblock/src/python/run_tests])
     ])
-
-    AC_SUBST([mblock_INCLUDES], [$mblock_INCLUDES])
-    AC_SUBST([mblock_LA], [$mblock_LA])
 ])
index 77618e9023c74bf0e4ab291a70388812e0ca1b65..3e52c659a8ddc49e369f584ea167872866a5ba09 100644 (file)
@@ -18,39 +18,28 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_OMNITHREAD],[
-    GRC_ENABLE([omnithread])
-    GRC_WITH([omnithread])
-    passed=no
-    if test x$with_omnithread = xyes; then
-        if test x$enable_omnithread = xyes; then
-           AC_MSG_ERROR([Component omnithread: Cannot use both --enable and --with])
-        else
-           PKG_CHECK_MODULES(OMNITHREAD, gnuradio-omnithread, passed=with,
-                  AC_MSG_RESULT([Component omnithread: PKGCONFIG cannot find info]))
-            if test x$passed = xwith; then
-                omnithread_INCLUDES=`$PKG_CONFIG --cflags-only-I gnuradio-omnithread`
-               omnithread_LA=$OMNITHREAD_LIBS
-               omnithread_LIBDIRPATH=`$PKG_CONFIG --variable=libdir gnuradio-omnithread`
-            fi
-       fi
-    fi
-    dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
-    dnl otherwise, $passed = no; check the "--enable" stuff
-    if test x$passed = xno; then
-        AC_CONFIG_FILES([ \
-            omnithread/Makefile \
-           omnithread/gnuradio-omnithread.pc
-        ])
-        passed=yes
+    GRC_ENABLE(omnithread)
+
+    GRC_WITH(omnithread, [], gnuradio-omnithread)
+
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed != with; then
+       dnl how and where to find INCLUDES and LA and such
         omnithread_INCLUDES="-I\${abs_top_srcdir}/omnithread"
         omnithread_LA="\${abs_top_builddir}/omnithread/libgromnithread.la"
        omnithread_LIBDIRPATH="\${abs_top_builddir}/omnithread:\${abs_top_builddir}/omnithread/.libs"
     fi
-    GRC_BUILD_CONDITIONAL([omnithread],[
+
+    AC_CONFIG_FILES([ \
+        omnithread/Makefile \
+        omnithread/gnuradio-omnithread.pc
+    ])
+
+    GRC_BUILD_CONDITIONAL(omnithread,[
         dnl run_tests is created from run_tests.in.  Make it executable.
         dnl AC_CONFIG_COMMANDS([run_tests_omnithread], [chmod +x omnithread/run_tests])
     ])
-    AC_SUBST([omnithread_INCLUDES])
-    AC_SUBST([omnithread_LA])
-    AC_SUBST([omnithread_LIBDIRPATH])
 ])
index 2a512273e7aba07f7b175ddb05a24fd719cd679c..8e0a58bcad2477c875d76672fae89501aac5a1fe 100644 (file)
@@ -18,54 +18,38 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_PMT],[
-    GRC_ENABLE([pmt])
-    GRC_WITH([pmt])
-    passed=no
-    if test x$with_pmt = xyes; then
-        if test x$enable_pmt = xyes; then
-           AC_MSG_ERROR([Component pmt: Cannot use both --enable and --with])
-        else
-           PKG_CHECK_MODULES(PMT, pmt, passed=with,
-                  AC_MSG_RESULT([Component pmt: PKGCONFIG cannot find info]))
-            if test x$passed = xwith; then
-                pmt_INCLUDES=`$PKG_CONFIG --cflags-only-I pmt`
-               pmt_LA=$PMT_LIBS
-            fi
-       fi
+    GRC_ENABLE(pmt)
+    GRC_WITH(pmt)
+
+    dnl Don't do pmt if omnithread skipped
+    GRC_CHECK_DEPENDENCY(pmt, omnithread)
+
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+       dnl Don't do pmt if guile not available
+       GRC_CHECK_GUILE(pmt)
     fi
-    dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
-    dnl otherwise, $passed = no; check the "--enable" stuff
-    if test x$passed = xno; then
-        AC_CONFIG_FILES([\
-            pmt/Makefile \
-           pmt/pmt.pc \
-           pmt/doc/Makefile \
-           pmt/src/Makefile \
-           pmt/src/lib/Makefile \
-           pmt/src/scheme/Makefile \
-           pmt/src/scheme/gnuradio/Makefile \
-        ])
-       passed=yes
-       # Don't do pmt if omnithread skipped
-       if test x$omnithread_skipped = xyes; then
-           AC_MSG_RESULT([Component pmt requires omnithread, which is not being built or specified via pre-installed files.])
-           passed=no
-       fi
-       # Don't do pmt if guile not available
-        AC_PATH_PROG(GUILE,guile)
-        if test "$GUILE" = "" ; then
-            AC_MSG_RESULT([Component pmt requires guile, which was not found.])
-            passed=no
-        fi
+    if test $passed != with; then
+       dnl how and where to find INCLUDES and LA
        pmt_INCLUDES="-I\${abs_top_srcdir}/pmt/src/lib"
         pmt_LA="\${abs_top_builddir}/pmt/src/lib/libpmt.la"
     fi
 
-    GRC_BUILD_CONDITIONAL([pmt],[
+    AC_CONFIG_FILES([\
+        pmt/Makefile \
+        pmt/pmt.pc \
+        pmt/doc/Makefile \
+        pmt/src/Makefile \
+        pmt/src/lib/Makefile \
+        pmt/src/scheme/Makefile \
+        pmt/src/scheme/gnuradio/Makefile \
+    ])
+
+    GRC_BUILD_CONDITIONAL(pmt,[
         dnl run_tests is created from run_tests.in.  Make it executable.
        dnl AC_CONFIG_COMMANDS([run_tests_pmt], [chmod +x pmt/src/python/run_tests])
     ])
-
-    AC_SUBST([pmt_INCLUDES], [$pmt_INCLUDES])
-    AC_SUBST([pmt_LA], [$pmt_LA])
 ])
index 34acee818f7ee142887b835ea6df4af3505f5037..f810748ab6617c8dbad7a6a2ca21011754999c3b 100644 (file)
@@ -18,110 +18,45 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_USRP],[
-    GRC_ENABLE([usrp])
-    GRC_WITH([usrp])
-    passed=no
-    if test x$with_usrp = xyes; then
-        if test x$enable_usrp = xyes; then
-           AC_MSG_ERROR([Component usrp: Cannot use both --enable and --with])
-        else
-           # the following is required, for whatever reason; ignore the output
-           USRP_SET_FUSB_TECHNIQUE([],[passed=no;AC_MSG_RESULT([Unable to set fast USB technique.])])
-           passed=no
-           # on to the regular routine
-           PKG_CHECK_MODULES(USRP, usrp, passed=with,
-                   AC_MSG_RESULT([Component usrp: PKGCONFIG cannot find info]))
-            if test x$passed = xwith; then
-                usrp_INCLUDES=`$PKG_CONFIG --cflags-only-I usrp`
-               usrp_LA=$USRP_LIBS
-               passed=no
-               PKG_CHECK_MODULES(USRP_INBAND, usrp-inband, passed=with,
-                   AC_MSG_RESULT([Component usrp-inband: PKGCONFIG cannot find info]))
-                if test x$passed = xwith; then
-                    usrp_inband_INCLUDES=`$PKG_CONFIG --cflags-only-I usrp-inband`
-                   usrp_inband_LA=$USRP_INBAND_LIBS
-               fi
-            fi
-       fi
-    fi
-    dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
-    dnl otherwise, $passed = no; check the "--enable" stuff
-    if test x$passed = xno; then
-        AC_CONFIG_FILES([ \
-           usrp/Makefile \
-           usrp/usrp.pc \
-           usrp/usrp-inband.pc \
-            usrp/usrp.iss \
-            usrp/doc/Doxyfile \
-            usrp/doc/Makefile \
-            usrp/doc/other/Makefile \
-            usrp/host/Makefile \
-            usrp/host/misc/Makefile \
-            usrp/host/lib/Makefile \
-            usrp/host/lib/inband/Makefile \
-            usrp/host/lib/legacy/Makefile \
-            usrp/host/lib/legacy/std_paths.h \
-            usrp/host/swig/Makefile \
-            usrp/host/apps/Makefile \
-            usrp/host/apps-inband/Makefile \
-            usrp/firmware/Makefile \
-            usrp/firmware/include/Makefile \
-            usrp/firmware/lib/Makefile \
-            usrp/firmware/src/Makefile \
-            usrp/firmware/src/common/Makefile \
-            usrp/firmware/src/usrp2/Makefile \
-            usrp/fpga/Makefile \
-            usrp/fpga/rbf/Makefile \
-        ])
+    GRC_ENABLE(usrp)
+
+    GRC_WITH(usrp, [GRC_WITH_PKG_CONFIG_CHECK(usrp-inband)])
+
+    dnl Don't do usrp if omnithread, mblock, or pmt skipped
+    GRC_CHECK_DEPENDENCY(usrp, omnithread)
+    GRC_CHECK_DEPENDENCY(usrp, mblock)
+    GRC_CHECK_DEPENDENCY(usrp, pmt)
 
-        # gnulib.
-        # FIXME: this needs to fail gracefully and continue, not implemented yet
+    dnl Make sure the fast usb technique is set, OS dependent.
+    dnl This is always performed, since it puts out CLI flags.
+    USRP_SET_FUSB_TECHNIQUE(${enable_usrp})
+
+    dnl If execution gets to here, $passed will be:
+    dnl   with : if the --with code didn't error out
+    dnl   yes  : if the --enable code passed muster and all dependencies are met
+    dnl   no   : otherwise
+    if test $passed = yes; then
+        dnl gnulib.
+        dnl FIXME: this needs to fail gracefully and continue, not implemented yet
         UTILS_FUNC_MKSTEMP
 
-        # These checks don't fail
+        dnl These checks don't fail
         AC_C_BIGENDIAN
         AC_CHECK_HEADERS([byteswap.h linux/compiler.h])
         AC_CHECK_FUNCS([getrusage sched_setscheduler pthread_setschedparam])
         AC_CHECK_FUNCS([sigaction snprintf])
 
-       # There are 2 pkg-config files; the one for usrp requires omnithread
-       # for Darwin only.
-       case "$host_os" in
-           darwin*)
-               # for usrp.pc.in
-               usrp_darwin_omnithread_pc_requires="gnuradio-omnithread"
-               usrp_darwin_omnithread_pc_la="-lgromnithread"
-               ;;
-           *)
-               # for usrp.pc.in (blanks)
-               usrp_darwin_omnithread_pc_requires=""
-               usrp_darwin_omnithread_pc_la=""
-               ;;
-        esac
-        passed=yes
-       # Don't do usrp if omnithread, mblock, or pmt skipped
-       if test x$omnithread_skipped = xyes; then
-            AC_MSG_RESULT([Component usrp requires omnithread, which is not being built or specified via pre-installed files.])
-           passed=no
-       fi
-        if test x$mblock_skipped = xyes; then
-            AC_MSG_RESULT([Component usrp requires mblock, which is not being built or specified via pre-installed files.])
-            passed=no
-        fi
-        if test x$pmt_skipped = xyes; then
-            AC_MSG_RESULT([Component usrp requires pmt, which is not being built or specified via pre-installed files.])
-            passed=no
-        fi
-       # Don't do mblock if guile not available (inband requires it)
-       AC_PATH_PROG(GUILE,guile)
-       if test "$GUILE" = "" ; then
-           AC_MSG_RESULT([Component mblock requires guile, which was not found.])
-           passed=no
-       fi
-        USRP_LIBUSB([],[passed=no;AC_MSG_RESULT([Unable to configure USB dependency.])])
-        USRP_SET_FUSB_TECHNIQUE([],[passed=no;AC_MSG_RESULT([Unable to set fast USB technique.])])
-        USRP_SDCC([2.4.0],[],[passed=no;AC_MSG_RESULT([Unable to find firmware compiler.])])
+       dnl Don't do usrp if guile not available (inband requires it)
+       GRC_CHECK_GUILE(usrp)
+
+       dnl Make sure libusb is installed; required for legacy USB
+        USRP_LIBUSB([],[passed=no;AC_MSG_RESULT([Unable to find dependency libusb.])])
 
+       dnl Make sure SDCC >= 2.4.0 is available.
+        USRP_SDCC([2.4.0],[],[passed=no;AC_MSG_RESULT([Unable to find firmware compiler SDCC.])])
+    fi
+    if test $passed != with; then
+       dnl how and where to find INCLUDES and LA
        usrp_INCLUDES="-I\${abs_top_srcdir}/usrp/host/lib/legacy \
                -I\${abs_top_srcdir}/usrp/firmware/include"
         usrp_LA="\${abs_top_builddir}/usrp/host/lib/legacy/libusrp.la"
@@ -129,12 +64,49 @@ AC_DEFUN([GRC_USRP],[
        usrp_inband_LA="\${abs_top_builddir}/usrp/host/lib/inband/libusrp_inband.la"
     fi
 
-    GRC_BUILD_CONDITIONAL([usrp])
-
-    AC_SUBST(usrp_INCLUDES)
-    AC_SUBST(usrp_LA)
+    dnl Include the usrp-inband INCLUDES and LA
     AC_SUBST(usrp_inband_INCLUDES)
     AC_SUBST(usrp_inband_LA)
+
+    dnl There are 2 pkg-config files (usrp, and usrp-inband); the one
+    dnl for usrp requires omnithread for Darwin only.  Create a variable
+    dnl for just the usrp.pc.in case.
+    case "$host_os" in
+      darwin*)
+        usrp_darwin_omnithread_pc_requires="gnuradio-omnithread"
+        ;;
+      *) dnl (blanks)
+        usrp_darwin_omnithread_pc_requires=""
+        ;;
+    esac
     AC_SUBST(usrp_darwin_omnithread_pc_requires)
-    AC_SUBST(usrp_darwin_omnithread_pc_la)
+
+    AC_CONFIG_FILES([ \
+       usrp/Makefile \
+       usrp/usrp.pc \
+       usrp/usrp-inband.pc \
+        usrp/usrp.iss \
+        usrp/doc/Doxyfile \
+        usrp/doc/Makefile \
+        usrp/doc/other/Makefile \
+        usrp/host/Makefile \
+        usrp/host/misc/Makefile \
+        usrp/host/lib/Makefile \
+        usrp/host/lib/inband/Makefile \
+        usrp/host/lib/legacy/Makefile \
+        usrp/host/lib/legacy/std_paths.h \
+        usrp/host/swig/Makefile \
+        usrp/host/apps/Makefile \
+        usrp/host/apps-inband/Makefile \
+        usrp/firmware/Makefile \
+        usrp/firmware/include/Makefile \
+        usrp/firmware/lib/Makefile \
+        usrp/firmware/src/Makefile \
+        usrp/firmware/src/common/Makefile \
+        usrp/firmware/src/usrp2/Makefile \
+        usrp/fpga/Makefile \
+        usrp/fpga/rbf/Makefile \
+    ])
+
+    GRC_BUILD_CONDITIONAL(usrp)
 ])
index c4de53b5bdf088879a4caa17154358ab0765c581..db857249b0d0f126b74f367afb795551bd0631e5 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl Copyright 2003 Free Software Foundation, Inc.
+dnl Copyright 2003,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -19,45 +19,56 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
 dnl Boston, MA 02110-1301, USA.
 dnl 
 
-AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
-  AC_ARG_WITH(fusb-tech,
-       [  --with-fusb-tech=OS     set fast usb technique (auto)],
-               [cf_with_fusb_tech="$withval"],
-               [cf_with_fusb_tech="$host_os"])
-       
-
-  AC_CHECK_HEADER([linux/usbdevice_fs.h],
-       [x_have_usbdevice_fs_h=yes],
-       [x_have_usbdevice_fs_h=no])
-
-  AC_MSG_CHECKING([for fast usb technique to use])
-  case "$cf_with_fusb_tech" in
-    linux*)    if test x${x_have_usbdevice_fs_h} = xyes;
-               then
-                 FUSB_TECH=linux
-                else
-                 FUSB_TECH=generic
-               fi                      ;;
+# $1 is $enable_usrp:
+#   yes : do these tests
+#   no  : do not do these tests
+#   ""  : do these tests
 
-    darwin*)   FUSB_TECH=darwin        ;;
-    cygwin*|win*|mingw*)       FUSB_TECH=win32         ;;
-    *bsd*)
-               AC_MSG_CHECKING([for RA/WB])
-               AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]],
-                                                  [[struct usb_bulk_ra_wb_opt o;
-                                                    ioctl(0, USB_SET_BULK_RA, &o);]])],
-                                 [FUSB_TECH=ra_wb],
-                                 [FUSB_TECH=generic])          ;;
-    *)         FUSB_TECH=generic       ;;
-  esac 
+AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
+  AC_ARG_WITH([fusb-tech],
+              AC_HELP_STRING([--with-fusb-tech=OS],
+                            [Set fast USB technique (default=auto)]),
+             [cf_with_fusb_tech="$withval"],
+             [cf_with_fusb_tech="$host_os"])
+  if test [x]$1 != xno; then
+      case "$cf_with_fusb_tech" in
+        linux*)
+          AC_CHECK_HEADER([linux/usbdevice_fs.h],
+                         [x_have_usbdevice_fs_h=yes],
+                          [x_have_usbdevice_fs_h=no])
+          if test x${x_have_usbdevice_fs_h} = xyes; then
+              FUSB_TECH=linux
+          else
+              FUSB_TECH=generic
+          fi
+          ;;
+        darwin*)
+          FUSB_TECH=darwin
+          ;;
+        cygwin*|win*|mingw*)
+          FUSB_TECH=win32
+          ;;
+        *bsd*)
+          AC_MSG_CHECKING([for RA/WB])
+          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]],
+                                            [[struct usb_bulk_ra_wb_opt o;
+                                              ioctl(0, USB_SET_BULK_RA, &o);]])],
+                           [FUSB_TECH=ra_wb],
+                           [FUSB_TECH=generic])
+          ;;
+        *)
+          FUSB_TECH=generic
+          ;;
+      esac
 
-  AC_MSG_RESULT($FUSB_TECH)
-  AC_SUBST(FUSB_TECH)
+      AC_MSG_CHECKING([for fast usb technique to use])
+      AC_MSG_RESULT($FUSB_TECH)
+      AC_SUBST(FUSB_TECH)
+  fi
 
-  AM_CONDITIONAL(FUSB_TECH_darwin,   test $FUSB_TECH = darwin)
-  AM_CONDITIONAL(FUSB_TECH_win32,    test $FUSB_TECH = win32)
-  AM_CONDITIONAL(FUSB_TECH_generic,  test $FUSB_TECH = generic)
-  AM_CONDITIONAL(FUSB_TECH_linux,    test $FUSB_TECH = linux)
-  AM_CONDITIONAL(FUSB_TECH_ra_wb,    test $FUSB_TECH = ra_wb)
+  AM_CONDITIONAL(FUSB_TECH_darwin,   test x$FUSB_TECH = xdarwin)
+  AM_CONDITIONAL(FUSB_TECH_win32,    test x$FUSB_TECH = xwin32)
+  AM_CONDITIONAL(FUSB_TECH_generic,  test x$FUSB_TECH = xgeneric)
+  AM_CONDITIONAL(FUSB_TECH_linux,    test x$FUSB_TECH = xlinux)
+  AM_CONDITIONAL(FUSB_TECH_ra_wb,    test x$FUSB_TECH = xra_wb)
 ])
-
index ab8305ff09fe887858e3803d6e262fbea8d5e518..cb3130c8730d953e0eafe4880e7782db5a360e49 100644 (file)
@@ -1,51 +1,48 @@
-# Check for libusb support.                            -*- Autoconf -*-
-
-# Copyright 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Boston, MA
-# 02110-1301, USA.
-
-AC_DEFUN([USRP_LIBUSB],
-[
-       AC_LANG_PUSH(C)
+dnl Copyright 2003,2008 Free Software Foundation, Inc.
+dnl 
+dnl This file is part of GNU Radio
+dnl 
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl 
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING.  If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+
+AC_DEFUN([USRP_LIBUSB], [
+    libusbok=yes
+    PKG_CHECK_MODULES(USB, libusb, [], [
+        AC_LANG_PUSH(C)
+
+       AC_CHECK_HEADERS([usb.h], [], [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb.h not found. See http://libusb.sf.net])])
+
+       save_LIBS="$LIBS"
+       case "$host_os" in
+         darwin*)
+           LIBS="$LIBS -lIOKit"
+            ;;
+         *) ;;
+        esac
 
-       libusbok=yes
-       AC_CHECK_HEADERS([usb.h],
-         [],
-         [libusbok=no, 
-          AC_MSG_RESULT([USRP requires libusb. usb.h not found. See http://libusb.sf.net])]
-       )
+       AC_SEARCH_LIBS(usb_bulk_write, [usb], [USB_LIBS="$LIBS"], [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb_bulk_write not found. See http://libusb.sf.net])])
 
-        save_LIBS="$LIBS"
-       case "$host_os" in
-           darwin*)    LIBS="$LIBS -lIOKit" ;;
-           *) ;;
-       esac
-       AC_SEARCH_LIBS(usb_bulk_write, [usb],
-         [USB_LIBS="$LIBS"],
-         [libusbok=no,
-          AC_MSG_RESULT([USRP requires libusb. usb_bulk_write not found. See http://libusb.sf.net])]
-       )
         LIBS="$save_LIBS"
 
-       AC_LANG_POP
+        AC_LANG_POP
+    ])
 
-       if test $libusbok = yes; then
-           AC_SUBST(USB_LIBS)
-           ifelse([$1], , :, [$1])
-       else
-           ifelse([$2], , :, [$2])
-       fi
+    if test x$libusbok = xyes; then
+        AC_SUBST(USB_LIBS)
+       ifelse([$1], , :, [$1])
+    else
+        ifelse([$2], , :, [$2])
+    fi
 ])
index 7be9edb87909dcde336b9b0ed572e559833706b2..e47bcc2dd6c4e57cb3f54b073625c201fad0a8bb 100644 (file)
@@ -33,11 +33,17 @@ fi
 
 AM_INIT_AUTOMAKE(gnuradio,3.1svn)
 
+dnl add ${prefix}/lib/pkgconfig to the head of the PKG_CONFIG_PATH
+if test [x]${PKG_CONFIG_PATH} = x; then
+    PKG_CONFIG_PATH=${prefix}/lib/pkgconfig
+else
+    PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${PKG_CONFIG_PATH}
+fi
+export PKG_CONFIG_PATH
 
 DEFINES=""
 AC_SUBST(DEFINES)
 
-
 dnl Remember if the user explicity set CXXFLAGS
 if test -n "${CXXFLAGS}"; then
   user_set_cxxflags=yes
@@ -61,8 +67,8 @@ if test "$user_set_cxxflags" != yes; then
   if test "$GXX" = yes; then
     case "$host_cpu" in
        powerpc*)
-          # "-O1" is broken on the PPC for some reason
-          # (at least as of g++ 4.1.1)
+          dnl "-O1" is broken on the PPC for some reason
+          dnl (at least as of g++ 4.1.1)
           swig_CXXFLAGS="-g1 -O2"
        ;;
        *) 
@@ -101,7 +107,6 @@ AC_CHECK_LIB(socket,socket)
 
 dnl check for threads (mandatory)
 GR_OMNITHREAD
-#AC_SUBST(PTHREAD_CFLAGS)
 CFLAGS="${CFLAGS} $PTHREAD_CFLAGS"
 CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS"
 
@@ -202,6 +207,9 @@ PKG_CHECK_EXISTS(cppunit,
   [AM_PATH_CPPUNIT([1.9.14],[],
                [AC_MSG_ERROR([GNU Radio requires cppunit.  Stop])])])
 
+dnl see if GUILE is installed
+AC_PATH_PROG(GUILE,guile)
+
 CPPUNIT_INCLUDES=$CPPUNIT_CFLAGS
 AC_SUBST(CPPUNIT_INCLUDES)
 
@@ -209,14 +217,29 @@ dnl Define where to find boost includes
 dnl defines BOOST_CFLAGS
 GR_REQUIRE_BOOST_INCLUDES
 
-# If this is being done from a subversion tree, create variables
+dnl If this is being done from a subversion tree, create variables
 GR_SUBVERSION
 
 dnl Component specific configuration
 dnl The order of the GR_ macros determines the order of compilation
+dnl For -any- checks on $enable_all_components
+dnl use the following guildlines:
+dnl   yes : --enable-all-components was specified, so error out if any
+dnl         components do not pass configuration checks.
+dnl   no  : --disable-all-components was specified, so try to build the
+dnl         --enable'd components, and error out if any do not pass
+dnl         configuration checks.
+dnl   ""  : this option was not specified on the command line; try to
+dnl         build all components that are not --with'd, but don't
+dnl         error out if any component does not pass configuration checks.
+dnl
+dnl For each --enable-foo component, if that flag is not specified on
+dnl the command line, the related variable $enable_foo will be set to
+dnl $enable_all_components .
+
 AC_ARG_ENABLE(
     [all-components],
-    [  --enable-all-components Build all components or stop on failed dependencies]
+    [  --enable-all-components Build all configurable components (default), or stop on failed dependencies]
 )
 
 build_dirs="config"
@@ -244,7 +267,7 @@ GRC_GR_TRELLIS
 GRC_GR_VIDEO_SDL
 GRC_GR_WXGUI
 GRC_GR_SOUNDER                 dnl this must come after GRC_USRP
-GRC_GR_UTILS
+GRC_GR_UTILS                    dnl this must come after GRC_GR_WXGUI
 GRC_GNURADIO_EXAMPLES          dnl must come last
 
 # Each component is now either to be built, was skipped, will be
index 22d63720c799f94ec2807401e618d5e038625379..f4127e3610aa2841f136087b1d524fafeb2c40c8 100644 (file)
@@ -7,5 +7,5 @@ Name: gnuradio-core
 Description: GNU Software Radio toolkit
 Requires: gnuradio-omnithread fftw3f
 Version: @VERSION@
-Libs: -L${libdir} -lgnuradio-core @FFTW3F_LIBS@ -lgromnithread
-Cflags: -I${includedir} @DEFINES@ @PTHREAD_CFLAGS@
+Libs: -L${libdir} -lgnuradio-core
+Cflags: -I${includedir} @DEFINES@
index 998f4b0d5a1ff7fae474ba8475957c40149d1ee0..ec72b104ec4d6bf313595ced813fbaad68f05b15 100644 (file)
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: mblock
 Description: The GNU Radio message block library
-Requires: gnuradio-omnithread pmt
+Requires: pmt gnuradio-omnithread
 Version: @VERSION@
-Libs: -L${libdir} -lmblock -lgromnithread -lpmt
-Cflags: -I${includedir} @DEFINES@ @PTHREAD_CFLAGS@
+Libs: -L${libdir} -lmblock
+Cflags: -I${includedir} @DEFINES@
index 6ca31ad492e3074301dab7467e72b639d0a02e9f..5a48ea20954471f74c7b14983e9bc18ab84391e6 100644 (file)
@@ -7,5 +7,5 @@ Name: pmt
 Description: The GNU Radio Polymorphic Type library
 Requires: gnuradio-omnithread
 Version: @VERSION@
-Libs: -L${libdir} -lpmt -lgromnithread
-Cflags: -I${includedir} @DEFINES@ @PTHREAD_CFLAGS@
+Libs: -L${libdir} -lpmt
+Cflags: -I${includedir} @DEFINES@
index c9aeeb5253da13dddba4bb0ee2364f91cb6a0302..74665bdbb5ac119f9f6c3f900bd401b4a7c47b74 100644 (file)
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: usrp
 Description: USRP C++ Interface with in-band signaling
-Requires: libusb mblock pmt usrp gnuradio-omnithread
+Requires: mblock pmt gnuradio-omnithread libusb
 Version: @VERSION@
-Libs: -L${libdir} -lusrp-inband -lusrp -lmblock -lpmt -lgromnithread -lusb
+Libs: -L${libdir} -lusrp-inband -lusrp
 Cflags: -I${includedir} @DEFINES@
index 6eaab67c30b3ee45f9bebe34dd814da3cc806b90..77430ea463f46c42a6111ed7d3e3eb04479d4a30 100644 (file)
@@ -7,5 +7,5 @@ Name: usrp
 Description: USRP Client Side C++ interface
 Requires: libusb @usrp_darwin_omnithread_pc_requires@
 Version: @VERSION@
-Libs: -L${libdir} -lusrp -lusb @usrp_darwin_omnithread_pc_la@
+Libs: -L${libdir} -lusrp
 Cflags: -I${includedir} @DEFINES@