commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r7945 - in gnuradio/branches/releases/3.1: . config gn


From: jcorgan
Subject: [Commit-gnuradio] r7945 - in gnuradio/branches/releases/3.1: . config gnuradio-core gnuradio-core/src/lib/filter gnuradio-core/src/lib/general gnuradio-core/src/lib/gengen gnuradio-core/src/lib/io gnuradio-core/src/lib/reed-solomon gnuradio-core/src/lib/runtime gnuradio-core/src/lib/swig gnuradio-core/src/tests gr-atsc/src/lib gr-atsc/src/python gr-audio-alsa/src gr-audio-jack/src gr-audio-oss/src gr-audio-osx/src gr-audio-portaudio/src gr-audio-windows/src gr-comedi/src gr-gpio/src/lib gr-gsm-fr-vocoder/src/lib gr-gsm-fr-vocoder/src/lib/gsm gr-howto-write-a-block/doc gr-howto-write-a-block/src/lib gr-pager/src gr-radio-astronomy/src/lib gr-trellis/src/examples gr-trellis/src/lib gr-usrp/src gr-video-sdl/src gr-wxgui omnithread usrp usrp/firmware/lib usrp/firmware/src/usrp2 usrp/host/apps usrp/host/lib/legacy usrp/host/swig
Date: Wed, 5 Mar 2008 14:49:40 -0700 (MST)

Author: jcorgan
Date: 2008-03-05 14:49:39 -0700 (Wed, 05 Mar 2008)
New Revision: 7945

Added:
   gnuradio/branches/releases/3.1/gr-wxgui/gr-wxgui.pc.in
Modified:
   gnuradio/branches/releases/3.1/Makefile.am
   gnuradio/branches/releases/3.1/Makefile.common
   gnuradio/branches/releases/3.1/config/gr_python.m4
   gnuradio/branches/releases/3.1/config/gr_subversion.m4
   gnuradio/branches/releases/3.1/config/grc_build.m4
   gnuradio/branches/releases/3.1/config/grc_gnuradio_core.m4
   gnuradio/branches/releases/3.1/config/grc_gnuradio_examples.m4
   gnuradio/branches/releases/3.1/config/grc_gr_atsc.m4
   gnuradio/branches/releases/3.1/config/grc_gr_audio_alsa.m4
   gnuradio/branches/releases/3.1/config/grc_gr_audio_jack.m4
   gnuradio/branches/releases/3.1/config/grc_gr_audio_oss.m4
   gnuradio/branches/releases/3.1/config/grc_gr_audio_osx.m4
   gnuradio/branches/releases/3.1/config/grc_gr_audio_portaudio.m4
   gnuradio/branches/releases/3.1/config/grc_gr_audio_windows.m4
   gnuradio/branches/releases/3.1/config/grc_gr_comedi.m4
   gnuradio/branches/releases/3.1/config/grc_gr_gpio.m4
   gnuradio/branches/releases/3.1/config/grc_gr_gsm_fr_vocoder.m4
   gnuradio/branches/releases/3.1/config/grc_gr_pager.m4
   gnuradio/branches/releases/3.1/config/grc_gr_radar_mono.m4
   gnuradio/branches/releases/3.1/config/grc_gr_radio_astronomy.m4
   gnuradio/branches/releases/3.1/config/grc_gr_sounder.m4
   gnuradio/branches/releases/3.1/config/grc_gr_trellis.m4
   gnuradio/branches/releases/3.1/config/grc_gr_usrp.m4
   gnuradio/branches/releases/3.1/config/grc_gr_utils.m4
   gnuradio/branches/releases/3.1/config/grc_gr_video_sdl.m4
   gnuradio/branches/releases/3.1/config/grc_gr_wxgui.m4
   gnuradio/branches/releases/3.1/config/grc_omnithread.m4
   gnuradio/branches/releases/3.1/config/grc_usrp.m4
   gnuradio/branches/releases/3.1/config/pkg.m4
   gnuradio/branches/releases/3.1/config/usrp_fusb_tech.m4
   gnuradio/branches/releases/3.1/config/usrp_libusb.m4
   gnuradio/branches/releases/3.1/configure.ac
   gnuradio/branches/releases/3.1/gnuradio-core/gnuradio-core.pc.in
   gnuradio/branches/releases/3.1/gnuradio-core/src/lib/filter/Makefile.am
   gnuradio/branches/releases/3.1/gnuradio-core/src/lib/general/Makefile.am
   gnuradio/branches/releases/3.1/gnuradio-core/src/lib/gengen/Makefile.am
   gnuradio/branches/releases/3.1/gnuradio-core/src/lib/io/Makefile.am
   gnuradio/branches/releases/3.1/gnuradio-core/src/lib/reed-solomon/Makefile.am
   gnuradio/branches/releases/3.1/gnuradio-core/src/lib/runtime/Makefile.am
   gnuradio/branches/releases/3.1/gnuradio-core/src/lib/swig/Makefile.am
   gnuradio/branches/releases/3.1/gnuradio-core/src/tests/Makefile.am
   gnuradio/branches/releases/3.1/gr-atsc/src/lib/Makefile.am
   gnuradio/branches/releases/3.1/gr-atsc/src/python/Makefile.am
   gnuradio/branches/releases/3.1/gr-audio-alsa/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-audio-jack/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-audio-oss/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-audio-osx/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-audio-portaudio/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-audio-windows/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-comedi/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-gpio/src/lib/Makefile.am
   gnuradio/branches/releases/3.1/gr-gsm-fr-vocoder/src/lib/Makefile.am
   gnuradio/branches/releases/3.1/gr-gsm-fr-vocoder/src/lib/gsm/Makefile.am
   
gnuradio/branches/releases/3.1/gr-howto-write-a-block/doc/src_lib_Makefile_1.am
   
gnuradio/branches/releases/3.1/gr-howto-write-a-block/doc/src_lib_Makefile_2.am
   gnuradio/branches/releases/3.1/gr-howto-write-a-block/src/lib/Makefile.am
   gnuradio/branches/releases/3.1/gr-pager/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-radio-astronomy/src/lib/Makefile.am
   gnuradio/branches/releases/3.1/gr-trellis/src/examples/Makefile.am
   gnuradio/branches/releases/3.1/gr-trellis/src/lib/Makefile.am
   gnuradio/branches/releases/3.1/gr-usrp/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-usrp/src/run_tests.in
   gnuradio/branches/releases/3.1/gr-video-sdl/src/Makefile.am
   gnuradio/branches/releases/3.1/gr-wxgui/Makefile.am
   gnuradio/branches/releases/3.1/omnithread/Makefile.am
   gnuradio/branches/releases/3.1/run_tests.sh.in
   gnuradio/branches/releases/3.1/usrp/firmware/lib/Makefile.am
   gnuradio/branches/releases/3.1/usrp/firmware/src/usrp2/Makefile.am
   gnuradio/branches/releases/3.1/usrp/host/apps/Makefile.am
   gnuradio/branches/releases/3.1/usrp/host/lib/legacy/Makefile.am
   gnuradio/branches/releases/3.1/usrp/host/swig/Makefile.am
   gnuradio/branches/releases/3.1/usrp/usrp.pc.in
Log:
Merged changeset r7936:7943 from jcorgan/bc-merge into release branch.

This merges in Michael Dicken's build system updates for ticket:186 into
the release 3.1 branch.  It effectively combines changesets r7617, r7631, 
r7632, r7769, and r7888 from the trunk.

Merge conflicts resulted from portions of changesets that applied to
files that are not on the release branch, and were manually resolved.

File config/pkg.m4 was copied over from the trunk.


Modified: gnuradio/branches/releases/3.1/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/Makefile.am  2008-03-05 21:34:52 UTC (rev 
7944)
+++ gnuradio/branches/releases/3.1/Makefile.am  2008-03-05 21:49:39 UTC (rev 
7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2006 Free Software Foundation, Inc.
+# Copyright 2001,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -30,4 +30,4 @@
        README.hacking
 
 SUBDIRS = @build_dirs@
-DIST_SUBDIRS = @build_dirs@ @skipped_dirs@
+DIST_SUBDIRS = @build_dirs@ @skipped_dirs@ @with_dirs@

Modified: gnuradio/branches/releases/3.1/Makefile.common
===================================================================
--- gnuradio/branches/releases/3.1/Makefile.common      2008-03-05 21:34:52 UTC 
(rev 7944)
+++ gnuradio/branches/releases/3.1/Makefile.common      2008-03-05 21:49:39 UTC 
(rev 7945)
@@ -1,6 +1,6 @@
 # -*- Makefile -*-
 #
-# Copyright 2004,2006,2007 Free Software Foundation, Inc.
+# Copyright 2004,2006,2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -23,9 +23,9 @@
 AM_CXXFLAGS = @autoconf_default_CXXFLAGS@
 
 # includes
-grincludedir   = $(includedir)/gnuradio
+grincludedir = $(includedir)/gnuradio
 
-# swig includes 
+# swig includes
 swigincludedir = $(grincludedir)/swig
 
 # Install the gnuradio stuff in the appropriate subdirectory
@@ -42,45 +42,44 @@
 usrppythondir = $(pythondir)/usrpm
 usrppyexecdir = $(pyexecdir)/usrpm
 
+# when including for compilation from pre-installed libraries and such,
+# need to make sure those are put last on the compile command
+WITH_INCLUDES = @with_INCLUDES@
+WITH_SWIG_INCLUDES = @with_SWIG_INCLUDES@
 
 # swig flags
 SWIGPYTHONFLAGS = -fvirtual -python -modern
 
+# How to link in the top-level omnithreads library from inside the tree
+OMNITHREAD_INCLUDES = @omnithread_INCLUDES@
+OMNITHREAD_LA = @omnithread_LA@
+
 # Where to find gnuradio include files in the current build tree
 # top_srcdir for original stuff, top_builddir for generated files
-GNURADIO_INCLUDES = -I$(top_srcdir)/gnuradio-core/src/lib/runtime \
-                   -I$(top_srcdir)/gnuradio-core/src/lib/general \
-                   -I$(top_builddir)/gnuradio-core/src/lib/general \
-                   -I$(top_srcdir)/gnuradio-core/src/lib/gengen \
-                   -I$(top_builddir)/gnuradio-core/src/lib/gengen \
-                   -I$(top_srcdir)/gnuradio-core/src/lib/filter \
-                   -I$(top_builddir)/gnuradio-core/src/lib/filter \
-                   -I$(top_srcdir)/gnuradio-core/src/lib/reed-solomon \
-                   -I$(top_srcdir)/gnuradio-core/src/lib/io \
-                   -I$(top_srcdir)/gnuradio-core/src/lib/g72x \
-                   -I$(top_srcdir)/gnuradio-core/src/lib/swig \
-                   -I$(top_builddir)/gnuradio-core/src/lib/swig \
-                   $(FFTW3F_CFLAGS)
+GNURADIO_INCLUDES = @gnuradio_core_INCLUDES@
 
-# How to link in the top-level omnithreads library from inside the tree
-OMNITHREAD_INCLUDES = -I$(top_srcdir)/omnithread
-OMNITHREAD_LA = $(top_builddir)/omnithread/libgromnithread.la
-
 # How to link in GNU Radio core library from inside the tree
-# NOTE: The below line is a workaround for a broken libtool implementation
-#  for Win32.  Normally, the addition of OMNITHREAD_LA would not be necessary,
-#  as this information is already in the core .la file.
-GNURADIO_CORE_LA = $(top_builddir)/gnuradio-core/src/lib/libgnuradio-core.la \
-                  $(OMNITHREAD_LA)
+GNURADIO_CORE_LA = @gnuradio_core_LA@
 
 # This is a dependency for many swig operations
-GNURADIO_I = $(top_srcdir)/gnuradio-core/src/lib/swig/gnuradio.i
+GNURADIO_I = @gnuradio_core_I@
 
 # How to link in the USRP library from inside the tree
-USRP_INCLUDES = -I$(top_srcdir)/usrp/host/lib/legacy \
-               -I$(top_srcdir)/usrp/firmware/include
-USRP_LA = $(top_builddir)/usrp/host/lib/legacy/libusrp.la
+USRP_INCLUDES = @usrp_INCLUDES@
+USRP_LA = @usrp_LA@
 
+# How to link in usrp-inband library from inside the tree
+USRP_INBAND_INCLUDES = @usrp_inband_INCLUDES@
+USRP_INBAND_LA = @usrp_inband_LA@
+
+# How to link the PMT library from inside the tree
+PMT_INCLUDES = @pmt_INCLUDES@
+PMT_LA = @pmt_LA@
+
+# How to link the mblock library from inside the tree
+MBLOCK_INCLUDES = @mblock_INCLUDES@
+MBLOCK_LA = @mblock_LA@
+
 # This used to be set in configure.ac but is now defined here for all 
 # Makefiles when this fragment is included.
 STD_DEFINES_AND_INCLUDES=$(DEFINES) $(OMNITHREAD_INCLUDES) 
$(GNURADIO_INCLUDES) $(BOOST_CFLAGS)

Modified: gnuradio/branches/releases/3.1/config/gr_python.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/gr_python.m4  2008-03-05 21:34:52 UTC 
(rev 7944)
+++ gnuradio/branches/releases/3.1/config/gr_python.m4  2008-03-05 21:49:39 UTC 
(rev 7945)
@@ -107,5 +107,5 @@
          ;;
         esac
 
-       AC_SUBST([PYTHON_LDFLAGS])
+       AC_SUBST(PYTHON_LDFLAGS)
 ])

Modified: gnuradio/branches/releases/3.1/config/gr_subversion.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/gr_subversion.m4      2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/gr_subversion.m4      2008-03-05 
21:49:39 UTC (rev 7945)
@@ -31,6 +31,6 @@
            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)
 ])

Modified: gnuradio/branches/releases/3.1/config/grc_build.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_build.m4  2008-03-05 21:34:52 UTC 
(rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_build.m4  2008-03-05 21:49:39 UTC 
(rev 7945)
@@ -1,4 +1,4 @@
-dnl 2006 Free Software Foundation, Inc.
+dnl Copyright 2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -17,34 +17,271 @@
 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],[
-    AC_ARG_ENABLE([$1],[  --enable-$1  Fail build if $1 fails 
configuration],[],
-                  [[enable_]m4_bpatsubst($1,-,_)=$enable_all_components])
+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)
 
-# Conditionally build named component.
-# $1 is component name
-# $2 is executed if configuration passes and build is desired
-# Use $passed=no to indicate configuration failure
-# Any other value of $passed, including blank, assumes success 
+AC_DEFUN([_GRC_ENABLE],[
+    passed=yes
+    AC_ARG_ENABLE([$1],
+                 AC_HELP_STRING([--enable-$1],
+                                [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 .
+
+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@<:@=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
+])
+
+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}"
+       else
+           [with_]$2="${$1[_]$2}"$3"$[with_]$2"
+       fi
+       $1[_]$2=
+    fi
+])
+
+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],[
-    if test x$passed = xno; then
-        skipped_dirs="$skipped_dirs $1"
-       if test x$[enable_]m4_bpatsubst($1,-,_) = xyes; then
-           AC_MSG_ERROR([Component $1 has errors, stopping.])
+    _GRC_BUILD_CONDITIONAL($1, $2, m4_bpatsubst($1,-,_))
+])
+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],[
+    $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      
+       fi
     else
-        if test x$[enable_]m4_bpatsubst($1,-,_) != xno; then
-           $2
-           build_dirs="$build_dirs $1"
-           AC_MSG_RESULT([Component $1 passed configuration checks, building.])
+        if test $passed = with; then
+           with_dirs="$with_dirs $1"
+           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
-            skipped_dirs="$skipped_dirs $1"
-           AC_MSG_RESULT([Component $1 passed configuration checks, but not 
building.])
+           $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.])
+            else
+               passed=no
+               AC_MSG_RESULT([Component $1 passed configuration checks; but 
not building.])
+           fi
        fi
     fi
+    if test $passed = no; then
+        skipped_dirs="$skipped_dirs $1"
+        $3[_skipped]=yes
+    else
+        $3[_skipped]=no
+    fi
+    AC_SUBST($3[_INCLUDES])
+    AC_SUBST($3[_LA])
+    AC_SUBST($3[_INCLUDEDIR])
+    AC_SUBST($3[_LIBDIRPATH])
+    AC_SUBST($3[_LDFLAG])
 ])

Modified: gnuradio/branches/releases/3.1/config/grc_gnuradio_core.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gnuradio_core.m4  2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gnuradio_core.m4  2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2007,2008 Free Software 
Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,8 +18,60 @@
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GNURADIO_CORE],[
-    GRC_ENABLE([gnuradio-core])
+    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
+    ])
+
+    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"
+
+        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
+        ])
+    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 \
@@ -51,33 +103,13 @@
         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/python/gnuradio/vocoder/Makefile \
         gnuradio-core/src/tests/Makefile \
         gnuradio-core/src/utils/Makefile \
     ])
-    
-    passed=yes
-    # Don't do gnuradio-core if omnithread skipped
-    # There *has* to be a better way to check if a value is in a string
-    for dir in $skipped_dirs
-    do
-       if test x$dir = xomnithread; then
-           AC_MSG_RESULT([Component gnuradio-core requires omnithread, which 
is not being built.])
-           passed=no
-       fi
-    done
 
-    GRC_BUILD_CONDITIONAL([gnuradio-core],[
+    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([run_tests_core],[chmod +x 
gnuradio-core/src/python/gnuradio/gr/run_tests])
     ])
 ])

Modified: gnuradio/branches/releases/3.1/config/grc_gnuradio_examples.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gnuradio_examples.m4      
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gnuradio_examples.m4      
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,25 +1,28 @@
-# Copyright 2001,2002,2003,2004,2005,2006 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/python/Makefile \
@@ -34,6 +37,5 @@
         gnuradio-examples/python/usrp/Makefile \
     ])
 
-    passed=yes
-    GRC_BUILD_CONDITIONAL([gnuradio-examples])
+    GRC_BUILD_CONDITIONAL(gnuradio-examples)
 ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_atsc.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_atsc.m4        2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_atsc.m4        2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,19 +18,21 @@
 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
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_audio_alsa.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_audio_alsa.m4  2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_audio_alsa.m4  2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,20 +18,28 @@
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_ALSA],[
-    GRC_ENABLE([gr-audio-alsa])
+    GRC_ENABLE(gr-audio-alsa)
 
+    dnl Don't do gr-audio-alsa if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-audio-alsa, 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-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
+
     AC_CONFIG_FILES([ \
-       gr-audio-alsa/Makefile \
-       gr-audio-alsa/src/Makefile \
-       gr-audio-alsa/src/run_tests \
+        gr-audio-alsa/Makefile \
+        gr-audio-alsa/src/Makefile \
+        gr-audio-alsa/src/run_tests \
     ])
 
-    passed=yes
-    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)
+    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_audio_jack.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_audio_jack.m4  2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_audio_jack.m4  2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,20 +18,28 @@
 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
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_audio_oss.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_audio_oss.m4   2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_audio_oss.m4   2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,31 +18,44 @@
 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
-    case $target 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
 
-    GRC_BUILD_CONDITIONAL([gr-audio-oss],[
-       AC_SUBST(OSS_LIBS)
+    AC_CONFIG_FILES([ \
+        gr-audio-oss/Makefile \
+        gr-audio-oss/src/Makefile \
+        gr-audio-oss/src/run_tests \
+    ])
+
+    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_audio_osx.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_audio_osx.m4   2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_audio_osx.m4   2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,19 +18,36 @@
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_OSX],[
-    GRC_ENABLE([gr-audio-osx])
-    
+    GRC_ENABLE(gr-audio-osx)
+
+    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)
+
+    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
+
     AC_CONFIG_FILES([ \
-       gr-audio-osx/Makefile \
-       gr-audio-osx/src/Makefile \
-       gr-audio-osx/src/run_tests \
+        gr-audio-osx/Makefile \
+        gr-audio-osx/src/Makefile \
+        gr-audio-osx/src/run_tests \
     ])
-    
-    passed=yes
-    MACOSX_AUDIOUNIT([],
-        [passed=no;AC_MSG_RESULT([gr-audio-osx requires AudioUnit, not 
found.])])
 
-    GRC_BUILD_CONDITIONAL([gr-audio-osx],[
+    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_audio_portaudio.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_audio_portaudio.m4     
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_audio_portaudio.m4     
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,20 +18,28 @@
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_PORTAUDIO],[
-    GRC_ENABLE([gr-audio-portaudio])
+    GRC_ENABLE(gr-audio-portaudio)
 
+    dnl Don't do gr-audio-portaudio if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-audio-portaudio, 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-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
+
     AC_CONFIG_FILES([ \
-       gr-audio-portaudio/Makefile \
-       gr-audio-portaudio/src/Makefile \
-       gr-audio-portaudio/src/run_tests \
+        gr-audio-portaudio/Makefile \
+        gr-audio-portaudio/src/Makefile \
+        gr-audio-portaudio/src/run_tests \
     ])
 
-    passed=yes
-    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)
+    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_audio_windows.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_audio_windows.m4       
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_audio_windows.m4       
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,21 +18,38 @@
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_AUDIO_WINDOWS],[
-    GRC_ENABLE([gr-audio-windows])
+    GRC_ENABLE(gr-audio-windows)
 
+    dnl Don't do gr-audio-windows if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-audio-windows, 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
+        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
+
     AC_CONFIG_FILES([ \
-       gr-audio-windows/Makefile \
-       gr-audio-windows/src/Makefile \
-       gr-audio-windows/src/run_tests \
+        gr-audio-windows/Makefile \
+        gr-audio-windows/src/Makefile \
+        gr-audio-windows/src/run_tests \
     ])
 
-    passed=yes
-    AC_HAVE_LIBRARY(winmm,[],
-        [passed=no;AC_MSG_RESULT([gr-audio-windows requires library winmm, not 
found.])])
-
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_comedi.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_comedi.m4      2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_comedi.m4      2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,20 +18,28 @@
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_COMEDI],[
-    GRC_ENABLE([gr-comedi])
+    GRC_ENABLE(gr-comedi)
 
+    dnl Don't do gr-comedi if gnuradio-core skipped
+    GRC_CHECK_DEPENDENCY(gr-comedi, 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-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
+
     AC_CONFIG_FILES([ \
-       gr-comedi/Makefile \
-       gr-comedi/src/Makefile \
-       gr-comedi/src/run_tests \
+        gr-comedi/Makefile \
+        gr-comedi/src/Makefile \
+        gr-comedi/src/run_tests \
     ])
 
-    passed=yes
-    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)
+    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_gpio.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_gpio.m4        2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_gpio.m4        2008-03-05 
21:49:39 UTC (rev 7945)
@@ -18,31 +18,24 @@
 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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_gsm_fr_vocoder.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_gsm_fr_vocoder.m4      
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_gsm_fr_vocoder.m4      
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,19 +18,21 @@
 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
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_pager.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_pager.m4       2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_pager.m4       2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,16 +18,18 @@
 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
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_radar_mono.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_radar_mono.m4  2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_radar_mono.m4  2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2007 Free Software Foundation, Inc.
+dnl Copyright 2007,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,33 +18,27 @@
 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 skipped
-    for dir in $skipped_dirs
-    do
-       if test x$dir = xusrp; then
-           AC_MSG_RESULT([Component gr-radar-mono requires usrp, which is not 
being built.])
-           passed=no
-       fi
-    done
-
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_radio_astronomy.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_radio_astronomy.m4     
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_radio_astronomy.m4     
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,18 +18,20 @@
 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
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_sounder.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_sounder.m4     2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_sounder.m4     2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2007 Free Software Foundation, Inc.
+dnl Copyright 2007,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,32 +18,26 @@
 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 skipped
-    for dir in $skipped_dirs
-    do
-       if test x$dir = xusrp; then
-           AC_MSG_RESULT([Component gr-sounder requires usrp, which is not 
being built.])
-           passed=no
-       fi
-    done
-
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_trellis.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_trellis.m4     2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_trellis.m4     2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,21 +18,23 @@
 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
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_usrp.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_usrp.m4        2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_usrp.m4        2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,26 +18,19 @@
 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 skipped
-    # There *has* to be a better way to check if a value is in a string
-    for dir in $skipped_dirs
-    do
-       if test x$dir = xusrp; then
-           AC_MSG_RESULT([Component gr-usrp requires usrp, which is not being 
built.])
-           passed=no
-       fi
-    done
-
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_utils.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_utils.m4       2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_utils.m4       2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -18,33 +18,19 @@
 # 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
-    # There *has* to be a better way to check if a value is in a string
-    for dir in $skipped_dirs
-    do
-       if test x$dir = xusrp; then
-           AC_MSG_RESULT([Component gr-utils requires usrp, which is not being 
built.])
-           passed=no
-       fi
-       if test x$dir = xgnuradio-core; then
-           AC_MSG_RESULT([Component gr-utils requires gnuradio-core, which is 
not being built.])
-           passed=no
-       fi
-       if test x$dir = xgr-wxgui; then
-           AC_MSG_RESULT([Component gr-utils requires gr-wxgui, which is not 
being built.])
-           passed=no
-       fi
-    done
-
-    GRC_BUILD_CONDITIONAL([gr-utils])
+    GRC_BUILD_CONDITIONAL(gr-utils)
 ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_video_sdl.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_video_sdl.m4   2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_video_sdl.m4   2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -20,20 +20,28 @@
 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
-    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])
     ])

Modified: gnuradio/branches/releases/3.1/config/grc_gr_wxgui.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_gr_wxgui.m4       2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_gr_wxgui.m4       2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,19 +18,30 @@
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_GR_WXGUI],[
-    GRC_ENABLE([gr-wxgui])
+    GRC_ENABLE(gr-wxgui)
 
+    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
+
     AC_CONFIG_FILES([ \
-         gr-wxgui/Makefile \
-         gr-wxgui/src/Makefile \
-         gr-wxgui/src/python/Makefile \
+        gr-wxgui/Makefile \
+        gr-wxgui/gr-wxgui.pc \
+        gr-wxgui/src/Makefile \
+        gr-wxgui/src/python/Makefile \
     ])
 
-    if ${PYTHON} -c 'import wx'; then
-       passed=yes
-    else
-       passed=no
-    fi
-    
-    GRC_BUILD_CONDITIONAL([gr-wxgui])
+    GRC_BUILD_CONDITIONAL(gr-wxgui)
 ])

Modified: gnuradio/branches/releases/3.1/config/grc_omnithread.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_omnithread.m4     2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_omnithread.m4     2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2007,2008 Free Software 
Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,17 +18,28 @@
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_OMNITHREAD],[
-    GRC_ENABLE([omnithread])
+    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
+
     AC_CONFIG_FILES([ \
         omnithread/Makefile \
-       omnithread/gnuradio-omnithread.pc
+        omnithread/gnuradio-omnithread.pc
     ])
-    
-    passed=yes
-    GRC_BUILD_CONDITIONAL([omnithread],[
+
+    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])
-
+        dnl AC_CONFIG_COMMANDS([run_tests_omnithread], [chmod +x 
omnithread/run_tests])
     ])
 ])

Modified: gnuradio/branches/releases/3.1/config/grc_usrp.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/grc_usrp.m4   2008-03-05 21:34:52 UTC 
(rev 7944)
+++ gnuradio/branches/releases/3.1/config/grc_usrp.m4   2008-03-05 21:49:39 UTC 
(rev 7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2007,2008 Free Software 
Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -18,8 +18,69 @@
 dnl Boston, MA 02110-1301, USA.
 
 AC_DEFUN([GRC_USRP],[
-    GRC_ENABLE([usrp])
+    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)
+
+    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
+
+        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])
+
+       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"
+       usrp_inband_INCLUDES="-I\${abs_top_srcdir}/usrp/host/lib/inband"
+       
usrp_inband_LA="\${abs_top_builddir}/usrp/host/lib/inband/libusrp_inband.la"
+    fi
+
+    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_CONFIG_FILES([ \
        usrp/Makefile \
        usrp/usrp.pc \
@@ -44,30 +105,5 @@
         usrp/fpga/rbf/Makefile \
     ])
 
-    # gnulib.
-    # FIXME: this needs to fail gracefully and continue, not implemented yet
-    UTILS_FUNC_MKSTEMP
-
-    # 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])
-
-    passed=yes
-    # Don't do usrp if mblock skipped
-    # There *has* to be a better way to check if a value is in a string
-    for dir in $skipped_dirs
-    do
-       if test "$dir" = "mblock"; then
-           AC_MSG_RESULT([Component usrp requires mblock, which is not being 
built.])
-           passed=no
-       fi
-    done
-
-    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.])])
-
-    GRC_BUILD_CONDITIONAL([usrp])
+    GRC_BUILD_CONDITIONAL(usrp)
 ])

Modified: gnuradio/branches/releases/3.1/config/pkg.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/pkg.m4        2008-03-05 21:34:52 UTC 
(rev 7944)
+++ gnuradio/branches/releases/3.1/config/pkg.m4        2008-03-05 21:49:39 UTC 
(rev 7945)
@@ -1,68 +1,166 @@
-dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, 
action-not)
-dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
-dnl also defines GSTUFF_PKG_ERRORS on error
-AC_DEFUN([PKG_CHECK_MODULES], [
-  succeeded=no
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <address@hidden>.
+#
+# 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 2 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
 
-  if test -z "$PKG_CONFIG"; then
-    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-  fi
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.18])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
 
-  if test "$PKG_CONFIG" = "no" ; then
-     echo "*** The pkg-config script could not be found. Make sure it is"
-     echo "*** in your path, or set the PKG_CONFIG environment variable"
-     echo "*** to the full path to pkg-config."
-     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get 
pkg-config."
-  else
-     dnl If PKG_CONFIG_PATH is not already set, add /usr/local/lib/pkgconfig.
-     dnl If it's set, assume the user knows what they're doing.
-     dnl This should help avoid failures while looking for fftw3f
-     if test -z "$PKG_CONFIG_PATH"; then
-       export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
-     fi
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
 
-     PKG_CONFIG_MIN_VERSION=0.9.0
-     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-        AC_MSG_CHECKING(for $2)
 
-        if $PKG_CONFIG --exists "$2" ; then
-            AC_MSG_RESULT(yes)
-            succeeded=yes
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+    if test -n "$$1"; then
+        pkg_cv_[]$1="$$1"
+    else
+        PKG_CHECK_EXISTS([$3],
+                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                        [pkg_failed=yes])
+    fi
+else
+       pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
 
-            AC_MSG_CHECKING($1_CFLAGS)
-            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
-            AC_MSG_RESULT($$1_CFLAGS)
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
 
-            AC_MSG_CHECKING($1_LIBS)
-            $1_LIBS=`$PKG_CONFIG --libs "$2"`
-            AC_MSG_RESULT($$1_LIBS)
 
-            AC_MSG_CHECKING($1_INCLUDEDIR)
-            $1_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "$2"`
-            AC_MSG_RESULT($$1_INCLUDEDIR)
-        else
-            $1_CFLAGS=""
-            $1_LIBS=""
-            ## If we have a custom action on failure, don't print errors, but 
-            ## do set a variable so people can do so.
-            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-            ifelse([$4], ,echo $$1_PKG_ERRORS,)
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+# E.g.,
+#   PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, 
action-not)
+#   defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
+#   also defines GSTUFF_PKG_ERRORS on error
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+
+if test x$cross_compiling = xyes
+then
+  _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2])
+else
+  _PKG_CONFIG([$1][_LIBS], [libs --static], [$2])
+fi
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables 
$1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout 
--print-errors "$2"`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors 
"$2"`
         fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-        AC_SUBST($1_CFLAGS)
-        AC_SUBST($1_LIBS)
-        AC_SUBST($1_INCLUDEDIR)
-     else
-        echo "*** Your version of pkg-config is too old. You need version 
$PKG_CONFIG_MIN_VERSION or newer."
-        echo "*** See http://www.freedesktop.org/software/pkgconfig";
-     fi
-  fi
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
 
-  if test $succeeded = yes; then
-     ifelse([$3], , :, [$3])
-  else
-     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider 
adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a 
nonstandard prefix so pkg-config can find them.]), [$4])
-  fi
-])
+$$1_PKG_ERRORS
 
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES

Modified: gnuradio/branches/releases/3.1/config/usrp_fusb_tech.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/usrp_fusb_tech.m4     2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/usrp_fusb_tech.m4     2008-03-05 
21:49:39 UTC (rev 7945)
@@ -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 Boston, MA 02110-1301, USA.
 dnl 
 
+# $1 is $enable_usrp:
+#   yes : do these tests
+#   no  : do not do these tests
+#   ""  : do these tests
+
 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_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_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])
+      AC_MSG_RESULT($FUSB_TECH)
+      AC_SUBST(FUSB_TECH)
+  fi
 
-  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                      ;;
-
-    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)
-
-  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)
 ])
-

Modified: gnuradio/branches/releases/3.1/config/usrp_libusb.m4
===================================================================
--- gnuradio/branches/releases/3.1/config/usrp_libusb.m4        2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/config/usrp_libusb.m4        2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,51 +1,48 @@
-# Check for libusb support.                            -*- Autoconf -*-
+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.
 
-# Copyright 2003 Free Software Foundation, Inc.
+AC_DEFUN([USRP_LIBUSB], [
+    libusbok=yes
+    PKG_CHECK_MODULES(USB, libusb, [], [
+        AC_LANG_PUSH(C)
 
-# 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.
+       AC_CHECK_HEADERS([usb.h], [], [libusbok=no; AC_MSG_RESULT([USRP 
requires libusb. usb.h not found. See http://libusb.sf.net])])
 
-# 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.
+       save_LIBS="$LIBS"
+       case "$host_os" in
+         darwin*)
+           LIBS="$LIBS -lIOKit"
+            ;;
+         *) ;;
+        esac
 
-# 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_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])])
 
-AC_DEFUN([USRP_LIBUSB],
-[
-       AC_LANG_PUSH(C)
-
-       libusbok=yes
-       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
-       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
 ])

Modified: gnuradio/branches/releases/3.1/configure.ac
===================================================================
--- gnuradio/branches/releases/3.1/configure.ac 2008-03-05 21:34:52 UTC (rev 
7944)
+++ gnuradio/branches/releases/3.1/configure.ac 2008-03-05 21:49:39 UTC (rev 
7945)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2007,2008 Free Software 
Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -25,6 +25,20 @@
 AM_INIT_AUTOMAKE(gnuradio,3.1.1)
 AC_CONFIG_SRCDIR([gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc])
 
+if test x$cross_compiling != xno; then
+  AC_MSG_NOTICE([Configuring GNU Radio for cross compilation])
+else
+  AC_MSG_NOTICE([Configuring GNU Radio for native compilation])
+fi
+
+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)
 
@@ -51,8 +65,8 @@
   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"
        ;;
        *) 
@@ -64,7 +78,6 @@
 AC_SUBST(autoconf_default_CXXFLAGS)
 AC_SUBST(swig_CXXFLAGS)
 
-
 LF_SET_WARNINGS
 GR_SET_GPROF
 GR_SET_PROF
@@ -92,7 +105,6 @@
 
 dnl check for threads (mandatory)
 GR_OMNITHREAD
-#AC_SUBST(PTHREAD_CFLAGS)
 CFLAGS="${CFLAGS} $PTHREAD_CFLAGS"
 CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS"
 
@@ -185,6 +197,9 @@
 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)
 
@@ -192,14 +207,29 @@
 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"
@@ -224,20 +254,37 @@
 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, or failed dependencies
+# Each component is now either to be built, was skipped, will be
+# included from pre-installed libraries and includes, or failed
+# dependencies.
 AC_SUBST([build_dirs], [$build_dirs])
 AC_SUBST([skipped_dirs], [$skipped_dirs])
- 
+AC_SUBST([with_dirs], [$with_dirs])
+
+# fix for older autotools that don't define "abs_top_YYY" by default
+AC_SUBST(abs_top_srcdir)
+AC_SUBST(abs_top_builddir)
+
+# 'with' variables - the pre-installed libraries, includes, and paths
+# - must always come last in the lists, so they require special
+# treatment.
+AC_SUBST(with_INCLUDES)
+AC_SUBST(with_SWIG_INCLUDES)
+AC_SUBST(with_PYDIRPATH)
+AC_SUBST(with_SWIGDIRPATH)
+AC_SUBST(with_LIBDIRPATH)
+
+# Local files tweaked by AC
 AC_CONFIG_FILES([\
     Makefile \
-    run_tests.sh
-    config/Makefile
+    run_tests.sh \
+    config/Makefile \
 ])
 
-dnl run_tests.sh is created from run_tests.in.sh.  Make it executable.
+dnl run_tests.sh is created from run_tests.sh.in .  Make it executable.
 AC_CONFIG_COMMANDS([run_tests_build], [chmod +x run_tests.sh])
 
 AC_OUTPUT
@@ -266,3 +313,16 @@
     echo These components will not be built.
     echo
 fi
+if test "$with_dirs" != ""; then
+    echo 
"*********************************************************************"
+    echo The following components will be included from pre-installed
+    echo libraries and includes:
+    echo
+    for dir in $with_dirs
+    do
+        echo $dir
+    done
+    echo
+    echo These components will not be built.
+    echo
+fi

Modified: gnuradio/branches/releases/3.1/gnuradio-core/gnuradio-core.pc.in
===================================================================
--- gnuradio/branches/releases/3.1/gnuradio-core/gnuradio-core.pc.in    
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gnuradio-core/gnuradio-core.pc.in    
2008-03-05 21:49:39 UTC (rev 7945)
@@ -5,7 +5,7 @@
 
 Name: gnuradio-core
 Description: GNU Software Radio toolkit
-Requires:
+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@

Modified: 
gnuradio/branches/releases/3.1/gnuradio-core/src/lib/filter/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gnuradio-core/src/lib/filter/Makefile.am     
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gnuradio-core/src/lib/filter/Makefile.am     
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2002,2004,2005,2006,2007 Free Software Foundation, Inc.
+# Copyright 2001,2002,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -26,7 +26,7 @@
 # other performance critical items
 #
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 noinst_LTLIBRARIES = libfilter.la libfilter-qa.la
 

Modified: 
gnuradio/branches/releases/3.1/gnuradio-core/src/lib/general/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gnuradio-core/src/lib/general/Makefile.am    
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gnuradio-core/src/lib/general/Makefile.am    
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2002,2004,2006,2007 Free Software Foundation, Inc.
+# Copyright 2001,2002,2004,2006,2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -21,7 +21,7 @@
 
 include $(top_srcdir)/Makefile.common
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 noinst_LTLIBRARIES = libgeneral.la libgeneral-qa.la
 

Modified: 
gnuradio/branches/releases/3.1/gnuradio-core/src/lib/gengen/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gnuradio-core/src/lib/gengen/Makefile.am     
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gnuradio-core/src/lib/gengen/Makefile.am     
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2002,2004,2006,2007 Free Software Foundation, Inc.
+# Copyright 2001,2002,2004,2006,2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -21,7 +21,7 @@
 
 include $(top_srcdir)/Makefile.common
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 #noinst_LTLIBRARIES = libgengen.la libgengen-qa.la
 noinst_LTLIBRARIES = libgengen.la

Modified: gnuradio/branches/releases/3.1/gnuradio-core/src/lib/io/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gnuradio-core/src/lib/io/Makefile.am 
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gnuradio-core/src/lib/io/Makefile.am 
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2003,2004,2006,2007 Free Software Foundation, Inc.
+# Copyright 2001,2003,2004,2006,2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -22,7 +22,7 @@
 include $(top_srcdir)/Makefile.common
 
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(WITH_INCLUDES)
 
 noinst_LTLIBRARIES = libio.la
 

Modified: 
gnuradio/branches/releases/3.1/gnuradio-core/src/lib/reed-solomon/Makefile.am
===================================================================
--- 
gnuradio/branches/releases/3.1/gnuradio-core/src/lib/reed-solomon/Makefile.am   
    2008-03-05 21:34:52 UTC (rev 7944)
+++ 
gnuradio/branches/releases/3.1/gnuradio-core/src/lib/reed-solomon/Makefile.am   
    2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -25,7 +25,7 @@
 # If you need the int versions too, please figure out how to add them 
*cleanly* to 
 # this Makefile.am.
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 TESTS = rstest
 

Modified: 
gnuradio/branches/releases/3.1/gnuradio-core/src/lib/runtime/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gnuradio-core/src/lib/runtime/Makefile.am    
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gnuradio-core/src/lib/runtime/Makefile.am    
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2003,2004,2007 Free Software Foundation, Inc.
+# Copyright 2003,2004,2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -21,7 +21,7 @@
 
 include $(top_srcdir)/Makefile.common
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 noinst_LTLIBRARIES = libruntime.la libruntime-qa.la
 

Modified: gnuradio/branches/releases/3.1/gnuradio-core/src/lib/swig/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gnuradio-core/src/lib/swig/Makefile.am       
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gnuradio-core/src/lib/swig/Makefile.am       
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+# Copyright 2001,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -28,28 +28,22 @@
 grgrpythondir = $(grpythondir)/gr
 grgrlibdir    = $(grpyexecdir)/gr
 
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) -I$(srcdir) \
+        $(WITH_INCLUDES)
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) -I$(srcdir)
-
-
 EXTRA_DIST = gen-swig-bug-fix
 
-
 LOCAL_IFILES =                         \
        gnuradio.i                      \
        shared_ptr.i                    \
        sw_general.i                    \
        sw_gengen.i                     \
        sw_filter.i                     \
-       sw_io.i                         
+       sw_io.i
 
-
 ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 
+       $(LOCAL_IFILES)
 
-
-
-
 # ----------------------------------------------------------------
 # We've split the previously monstrous gnuradio_swig_python into
 # 5 smaller pieces.  This reduces compile time coupling and
@@ -75,9 +69,9 @@
        gnuradio_swig_py_io.h           \
        gnuradio_swig_bug_workaround.h  
 
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(AM_CPPFLAGS) $(WITH_SWIG_INCLUDES) \
+       $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(INCLUDES)
-
 # ----------------------------------------------------------------
 # We break this up into 5 libraries...
 

Modified: gnuradio/branches/releases/3.1/gnuradio-core/src/tests/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gnuradio-core/src/tests/Makefile.am  
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gnuradio-core/src/tests/Makefile.am  
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright 2001,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -21,7 +21,7 @@
 
 include $(top_srcdir)/Makefile.common
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 # list of programs run by "make check" and "make distcheck"
 

Modified: gnuradio/branches/releases/3.1/gr-atsc/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-atsc/src/lib/Makefile.am  2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-atsc/src/lib/Makefile.am  2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2001,2004,2005,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -28,7 +28,8 @@
 ourpythondir = $(grpythondir)
 ourlibdir    = $(grpyexecdir)
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(CPPUNIT_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
+       $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 EXTRA_DIST =                                   \
        gen_encoder.py                          \
@@ -214,7 +215,7 @@
 # ------------------------------------------------------------------------
 
 SWIGCPPPYTHONARGS = -fvirtual -python -modern $(PYTHON_CPPFLAGS) \
-       $(STD_DEFINES_AND_INCLUDES)
+       $(STD_DEFINES_AND_INCLUDES) $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
 ALL_IFILES =                           \
        $(LOCAL_IFILES)                 \

Modified: gnuradio/branches/releases/3.1/gr-atsc/src/python/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-atsc/src/python/Makefile.am       
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-atsc/src/python/Makefile.am       
2008-03-05 21:49:39 UTC (rev 7945)
@@ -28,7 +28,6 @@
     interp.py \
     xlate.py \
     viterbi-out.py
-    
 
 EXTRA_DIST = run_tests.in \
             $(EXAMPLE_FILES)
@@ -46,7 +45,7 @@
        qa_atsc.py                      
 
 # Make example scripts with #! executable
-install-data-local:
+install-data-local: install-ourdataDATA
        for i in `find $(ourdatadir) -type f ! -perm 755`; do \
          if head -1 $$i | grep -q '^#!'; then \
            chmod 755 $$i; \

Modified: gnuradio/branches/releases/3.1/gr-audio-alsa/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-audio-alsa/src/Makefile.am        
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-audio-alsa/src/Makefile.am        
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -49,9 +49,10 @@
 ourpython_PYTHON =                     \
        audio_alsa.py
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+       $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
 ourlib_LTLIBRARIES = _audio_alsa.la
 
@@ -63,16 +64,15 @@
 libgr_audio_alsa_la_SOURCES =          \
        audio_alsa_sink.cc              \
        audio_alsa_source.cc            \
-       gri_alsa.cc                     
+       gri_alsa.cc
 
 grinclude_HEADERS =                    \
        audio_alsa_sink.h               \
-       audio_alsa_source.h             
+       audio_alsa_source.h
 
 noinst_HEADERS =                       \
-       gri_alsa.h                      
+       gri_alsa.h
 
-
 swiginclude_HEADERS =                  \
        $(LOCAL_IFILES)
 
@@ -81,7 +81,7 @@
        $(GNURADIO_CORE_LA)             \
        $(ALSA_LIBS)                    \
        libgr_audio_alsa.la             \
-       -lstdc++                                
+       -lstdc++
 
 libgr_audio_alsa_la_LIBADD =           \
        $(ALSA_LIBS)

Modified: gnuradio/branches/releases/3.1/gr-audio-jack/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-audio-jack/src/Makefile.am        
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-audio-jack/src/Makefile.am        
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Free Software Foundation, Inc.
+# Copyright 2005,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -49,28 +49,26 @@
 ourpython_PYTHON =                     \
        audio_jack.py
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+       $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
-
 ourlib_LTLIBRARIES = _audio_jack.la
 
-
 _audio_jack_la_SOURCES =               \
        audio_jack.cc                   \
        audio_jack_sink.cc              \
        audio_jack_source.cc            \
-       gri_jack.cc                     
+       gri_jack.cc
 
 grinclude_HEADERS =                    \
        audio_jack_sink.h               \
-       audio_jack_source.h             
+       audio_jack_source.h
 
 noinst_HEADERS =                       \
-       gri_jack.h                      
+       gri_jack.h
 
-
 swiginclude_HEADERS =                  \
        $(LOCAL_IFILES)
 
@@ -78,7 +76,7 @@
        $(PYTHON_LDFLAGS)               \
        $(GNURADIO_CORE_LA)             \
        $(JACK_LIBS)                    \
-       -lstdc++                                
+       -lstdc++
 
 _audio_jack_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
 
@@ -86,7 +84,7 @@
        $(SWIG) $(SWIGPYTHONARGS) -module audio_jack -o audio_jack.cc 
$(LOCAL_IFILES)
 
 noinst_PYTHON =                        \
-       qa_jack.py                      
+       qa_jack.py
 
 MOSTLYCLEANFILES = \
        $(BUILT_SOURCES) *~ *.pyc

Modified: gnuradio/branches/releases/3.1/gr-audio-oss/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-audio-oss/src/Makefile.am 2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-audio-oss/src/Makefile.am 2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -48,21 +48,21 @@
 ourpython_PYTHON =                     \
        audio_oss.py
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+       $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
 ourlib_LTLIBRARIES = _audio_oss.la
 
 _audio_oss_la_SOURCES =                \
        audio_oss.cc                    \
        audio_oss_sink.cc               \
-       audio_oss_source.cc                     
+       audio_oss_source.cc
 
-
 grinclude_HEADERS =                    \
        audio_oss_sink.h                \
-       audio_oss_source.h                      
+       audio_oss_source.h      
 
 swiginclude_HEADERS =                  \
        $(LOCAL_IFILES)
@@ -71,7 +71,7 @@
        $(PYTHON_LDFLAGS)               \
        $(GNURADIO_CORE_LA)             \
        $(OSS_LIBS)                     \
-       -lstdc++                                
+       -lstdc++
 
 _audio_oss_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
 

Modified: gnuradio/branches/releases/3.1/gr-audio-osx/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-audio-osx/src/Makefile.am 2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-audio-osx/src/Makefile.am 2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2006 Free Software Foundation, Inc.
+# Copyright 2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio.
 # 
@@ -48,9 +48,10 @@
 ourpython_PYTHON =                     \
        audio_osx.py
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGCPPPYTHONARGS = -python $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGCPPPYTHONARGS = -python $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+        $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
 ourlib_LTLIBRARIES = _audio_osx.la
 

Modified: gnuradio/branches/releases/3.1/gr-audio-portaudio/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-audio-portaudio/src/Makefile.am   
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-audio-portaudio/src/Makefile.am   
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -49,13 +49,14 @@
 ourpython_PYTHON =                     \
        audio_portaudio.py
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(PORTAUDIO_CFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
+       $(PORTAUDIO_CFLAGS) $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) -I/usr/include
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+       -I/usr/include $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
 ourlib_LTLIBRARIES = _audio_portaudio.la
 
-
 _audio_portaudio_la_SOURCES =          \
        audio_portaudio.cc              \
        audio_portaudio_sink.cc         \
@@ -67,9 +68,8 @@
        audio_portaudio_source.h                
 
 noinst_HEADERS =                       \
-       gri_portaudio.h                 
+       gri_portaudio.h
 
-
 swiginclude_HEADERS =                  \
        $(LOCAL_IFILES)
 
@@ -77,16 +77,15 @@
        $(PYTHON_LDFLAGS)               \
        $(GNURADIO_CORE_LA)             \
        $(PORTAUDIO_LIBS)               \
-       -lstdc++                                
+       -lstdc++
 
 _audio_portaudio_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
 
 audio_portaudio.cc audio_portaudio.py: $(ALL_IFILES) audio_portaudio_sink.h 
audio_portaudio_source.h
        $(SWIG) $(SWIGPYTHONARGS) -module audio_portaudio -o audio_portaudio.cc 
$(LOCAL_IFILES)
 
-
 noinst_PYTHON =                        \
-       qa_portaudio.py                 
+       qa_portaudio.py
 
 MOSTLYCLEANFILES = \
        $(BUILT_SOURCES) *~ *.pyc

Modified: gnuradio/branches/releases/3.1/gr-audio-windows/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-audio-windows/src/Makefile.am     
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-audio-windows/src/Makefile.am     
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005 Free Software Foundation, Inc.
+# Copyright 2004,2005,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -48,9 +48,10 @@
 ourpython_PYTHON =                     \
        audio_windows.py
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGCPPPYTHONARGS = -python $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGCPPPYTHONARGS = -python $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+        $(WITH_SWIG_INCLUDES)
 
 ourlib_LTLIBRARIES = _audio_windows.la
 

Modified: gnuradio/branches/releases/3.1/gr-comedi/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-comedi/src/Makefile.am    2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-comedi/src/Makefile.am    2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Free Software Foundation, Inc.
+# Copyright 2005,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -49,9 +49,10 @@
 ourpython_PYTHON =                     \
        comedi.py
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) \
+       $(STD_DEFINES_AND_INCLUDES) $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 #      -I$(swigincludedir) $(S-I$(grincludedir) -I$(comediincludedir)
 
 ourlib_LTLIBRARIES = _comedi.la

Modified: gnuradio/branches/releases/3.1/gr-gpio/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-gpio/src/lib/Makefile.am  2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-gpio/src/lib/Makefile.am  2008-03-05 
21:49:39 UTC (rev 7945)
@@ -24,7 +24,7 @@
 ourpythondir = $(grpythondir)/gpio
 ourlibdir    = $(grpyexecdir)/gpio
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
 SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) \
     $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)

Modified: gnuradio/branches/releases/3.1/gr-gsm-fr-vocoder/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-gsm-fr-vocoder/src/lib/Makefile.am        
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-gsm-fr-vocoder/src/lib/Makefile.am        
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005 Free Software Foundation, Inc.
+# Copyright 2004,2005,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -30,11 +30,11 @@
 ourpythondir = $(grpythondir)/vocoder
 ourlibdir    = $(grpyexecdir)/vocoder
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+       $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
-
 ALL_IFILES =                           \
        $(LOCAL_IFILES)                 \
        $(NON_LOCAL_IFILES)             
@@ -42,9 +42,8 @@
 NON_LOCAL_IFILES =                     \
        $(GNURADIO_I)
 
-
 LOCAL_IFILES =                                 \
-       $(top_srcdir)/gr-gsm-fr-vocoder/src/lib/gsm_full_rate.i                 
        
+       $(top_srcdir)/gr-gsm-fr-vocoder/src/lib/gsm_full_rate.i
 
 # These files are built by SWIG.  The first is the C++ glue.
 # The second is the python wrapper that loads the _howto shared library

Modified: 
gnuradio/branches/releases/3.1/gr-gsm-fr-vocoder/src/lib/gsm/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-gsm-fr-vocoder/src/lib/gsm/Makefile.am    
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-gsm-fr-vocoder/src/lib/gsm/Makefile.am    
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Free Software Foundation, Inc.
+# Copyright 2005,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -43,7 +43,8 @@
 
 OPTIONS = $(SASR) $(MULHACK) $(FAST) $(LTP_CUT)
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) -DNeedFunctionPrototypes=1 $(OPTIONS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) -DNeedFunctionPrototypes=1 \
+       $(OPTIONS) $(WITH_INCLUDES)
 
 noinst_LTLIBRARIES = libgsm.la
 

Modified: 
gnuradio/branches/releases/3.1/gr-howto-write-a-block/doc/src_lib_Makefile_1.am
===================================================================
--- 
gnuradio/branches/releases/3.1/gr-howto-write-a-block/doc/src_lib_Makefile_1.am 
    2008-03-05 21:34:52 UTC (rev 7944)
+++ 
gnuradio/branches/releases/3.1/gr-howto-write-a-block/doc/src_lib_Makefile_1.am 
    2008-03-05 21:49:39 UTC (rev 7945)
@@ -7,7 +7,7 @@
 ourpythondir = $(grpythondir)
 ourlibdir    = $(grpyexecdir)
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
 ourlib_LTLIBRARIES = _howto.la
 

Modified: 
gnuradio/branches/releases/3.1/gr-howto-write-a-block/doc/src_lib_Makefile_2.am
===================================================================
--- 
gnuradio/branches/releases/3.1/gr-howto-write-a-block/doc/src_lib_Makefile_2.am 
    2008-03-05 21:34:52 UTC (rev 7944)
+++ 
gnuradio/branches/releases/3.1/gr-howto-write-a-block/doc/src_lib_Makefile_2.am 
    2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -28,10 +28,10 @@
 ourpythondir = $(grpythondir)
 ourlibdir    = $(grpyexecdir)
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
 SWIGCPPPYTHONARGS = -noruntime -c++ -python $(PYTHON_CPPFLAGS) \
-       -I$(swigincludedir) -I$(grincludedir)
+       -I$(swigincludedir) -I$(grincludedir) $(WITH_SWIG_INCLUDES)
 
 ALL_IFILES =                           \
        $(LOCAL_IFILES)                 \

Modified: 
gnuradio/branches/releases/3.1/gr-howto-write-a-block/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-howto-write-a-block/src/lib/Makefile.am   
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-howto-write-a-block/src/lib/Makefile.am   
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -28,9 +28,10 @@
 ourpythondir = $(grpythondir)
 ourlibdir    = $(grpyexecdir)
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(SWIGGRFLAGS)
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(SWIGGRFLAGS) $(WITH_SWIG_INCLUDES) \
+       $(WITH_INCLUDES)
 
 ALL_IFILES =                           \
        $(LOCAL_IFILES)                 \

Modified: gnuradio/branches/releases/3.1/gr-pager/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-pager/src/Makefile.am     2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-pager/src/Makefile.am     2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -24,7 +24,7 @@
 EXTRA_DIST = \
     run_tests.in \
     $(bin_SCRIPTS)
-    
+
 TESTS = \
     run_tests
 
@@ -32,7 +32,7 @@
     usrp_flex.py \
     usrp_flex_all.py \
     usrp_flex_band.py
-    
+
 noinst_PYTHON = \
     qa_pager.py
 
@@ -43,9 +43,10 @@
 ourpythondir = $(grpythondir)/pager
 ourlibdir    = $(grpyexecdir)/pager
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+       $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
 ALL_IFILES = \
     $(LOCAL_IFILES) \

Modified: gnuradio/branches/releases/3.1/gr-radio-astronomy/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-radio-astronomy/src/lib/Makefile.am       
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-radio-astronomy/src/lib/Makefile.am       
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -28,9 +28,10 @@
 ourpythondir = $(grpythondir)
 ourlibdir    = $(grpyexecdir)
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+       $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
 ALL_IFILES =                           \
        $(LOCAL_IFILES)                 \

Modified: gnuradio/branches/releases/3.1/gr-trellis/src/examples/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-trellis/src/examples/Makefile.am  
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-trellis/src/examples/Makefile.am  
2008-03-05 21:49:39 UTC (rev 7945)
@@ -45,7 +45,7 @@
 ourdata_DATA = $(EXTRA_DIST)
 
 # Make example scripts with #! executable
-install-data-local:
+install-data-local: install-ourdataDATA
        for i in `find $(ourdatadir) -type f ! -perm 755`; do \
          if head -1 $$i | grep -q '^#!'; then \
            chmod 755 $$i; \

Modified: gnuradio/branches/releases/3.1/gr-trellis/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-trellis/src/lib/Makefile.am       
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-trellis/src/lib/Makefile.am       
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005,2006,2007 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -28,9 +28,10 @@
 ourpythondir = $(grpythondir)
 ourlibdir    = $(grpyexecdir)
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) \
+       $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
 # ----------------------------------------------------------------
 # these scripts generate trellis codes from template files

Modified: gnuradio/branches/releases/3.1/gr-usrp/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-usrp/src/Makefile.am      2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-usrp/src/Makefile.am      2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -60,13 +60,16 @@
         usrp_multi.py                  
 
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES)  \
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES)  \
           $(PYTHON_CPPFLAGS)           \
-          $(USRP_INCLUDES)
+          $(USRP_INCLUDES)             \
+          $(WITH_INCLUDES)
 
 SWIGPYTHONARGS = $(SWIGPYTHONFLAGS)         \
                 $(STD_DEFINES_AND_INCLUDES) \
-                $(USRP_INCLUDES)
+                $(USRP_INCLUDES)            \
+                $(WITH_INCLUDES)            \
+                $(WITH_SWIG_INCLUDES)
 
 grinclude_HEADERS =                    \
        usrp1_sink_base.h               \

Modified: gnuradio/branches/releases/3.1/gr-usrp/src/run_tests.in
===================================================================
--- gnuradio/branches/releases/3.1/gr-usrp/src/run_tests.in     2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-usrp/src/run_tests.in     2008-03-05 
21:49:39 UTC (rev 7945)
@@ -5,11 +5,11 @@
 # 3rd parameter is path to Python QA directory
 
 # For OS/X
address@hidden@/usrp/host/lib/legacy/:@abs_top_builddir@/usrp/host/lib/legacy/.libs:$DYLD_LIBRARY_PATH
address@hidden@/usrp/host/lib/legacy:@abs_top_builddir@/usrp/host/lib/legacy/.libs:$DYLD_LIBRARY_PATH
 export DYLD_LIBRARY_PATH
 
 # For Win32
address@hidden@/usrp/host/lib/legacy/.libs:$PATH
address@hidden@/usrp/host/lib/legacy:@abs_top_builddir@/usrp/host/lib/legacy/.libs:$PATH
 
 @top_builddir@/run_tests.sh \
     @abs_top_srcdir@/gr-usrp \

Modified: gnuradio/branches/releases/3.1/gr-video-sdl/src/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-video-sdl/src/Makefile.am 2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/gr-video-sdl/src/Makefile.am 2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -48,9 +48,10 @@
 ourpython_PYTHON =                     \
        video_sdl.py
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(SDL_CFLAGS)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(SDL_CFLAGS) \
+       $(WITH_INCLUDES)
 
-SWIGCPPPYTHONARGS = -fvirtual -python -modern $(PYTHON_CPPFLAGS) 
$(STD_DEFINES_AND_INCLUDES)
+SWIGCPPPYTHONARGS = -fvirtual -python -modern $(PYTHON_CPPFLAGS) 
$(STD_DEFINES_AND_INCLUDES) $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
 
 ourlib_LTLIBRARIES = _video_sdl.la
 

Modified: gnuradio/branches/releases/3.1/gr-wxgui/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/gr-wxgui/Makefile.am 2008-03-05 21:34:52 UTC 
(rev 7944)
+++ gnuradio/branches/releases/3.1/gr-wxgui/Makefile.am 2008-03-05 21:49:39 UTC 
(rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2006 Free Software Foundation, Inc.
+# Copyright 2004,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -21,8 +21,11 @@
 
 include $(top_srcdir)/Makefile.common
 
-EXTRA_DIST = gr-wxgui.conf
+EXTRA_DIST = gr-wxgui.conf gr-wxgui.pc.in
 SUBDIRS = src
 
 etcdir = $(sysconfdir)/gnuradio/conf.d
 etc_DATA = gr-wxgui.conf
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gr-wxgui.pc

Copied: gnuradio/branches/releases/3.1/gr-wxgui/gr-wxgui.pc.in (from rev 7943, 
gnuradio/branches/developers/jcorgan/bc-merge/gr-wxgui/gr-wxgui.pc.in)
===================================================================
--- gnuradio/branches/releases/3.1/gr-wxgui/gr-wxgui.pc.in                      
        (rev 0)
+++ gnuradio/branches/releases/3.1/gr-wxgui/gr-wxgui.pc.in      2008-03-05 
21:49:39 UTC (rev 7945)
@@ -0,0 +1,11 @@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
+
+Name: gr-wxgui
+Description: A simple wx gui for GNU Radio applications
+Requires: gnuradio-core
+Version: @VERSION@
+Libs:
+Cflags:

Modified: gnuradio/branches/releases/3.1/omnithread/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/omnithread/Makefile.am       2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/omnithread/Makefile.am       2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -27,7 +27,8 @@
 # we should do some configure hacking to determine these on the fly
 OMNITHREAD_DEFINES = -DPthreadDraftVersion=10
 
-INCLUDES = $(DEFINES) $(OMNITHREAD_DEFINES) $(OMNITHREAD_INCLUDES)
+AM_CPPFLAGS = $(DEFINES) $(OMNITHREAD_DEFINES) $(OMNITHREAD_INCLUDES) \
+        $(WITH_INCLUDES)
 
 # we call it libgromnithread to avoid a collision with libomnithread on Debian
 lib_LTLIBRARIES = libgromnithread.la

Modified: gnuradio/branches/releases/3.1/run_tests.sh.in
===================================================================
--- gnuradio/branches/releases/3.1/run_tests.sh.in      2008-03-05 21:34:52 UTC 
(rev 7944)
+++ gnuradio/branches/releases/3.1/run_tests.sh.in      2008-03-05 21:49:39 UTC 
(rev 7945)
@@ -7,6 +7,12 @@
 # current QA srcdir
 export srcdir=$3
 
+# Absolute path to the top of the source directory
address@hidden@
+
+# Absolute path to the top of the build directory
address@hidden@
+
 # Where to find my swig generated shared library
 mylibdir=$2/src:$2/src/.libs:$2/src/lib:$2/src/lib/.libs
 
@@ -16,34 +22,113 @@
 # Where to find my hand written python modules
 mypydir=$1/src:$1/src/python
 
-# Where to find core's swig generated shared libraries
address@hidden@/gnuradio-core/src/lib/swig
-grswigdir=$grswigdir:$grswigdir/.libs
+# Where to find core's swig generated shared libraries,
+# and hand generated swig glue
address@hidden@
 
-# Where to find core's hand generated swig glue
address@hidden@/gnuradio-core/src/lib/swig
-
 # Where to find core's python modules
address@hidden@/gnuradio-core/src/python
address@hidden@
 
-# Construct search path for python modules
-PYTHONPATH="$mylibdir:$mysrcdir:$mypydir:$grswigdir:$grswigsrcdir:$grpydir:$PYTHONPATH"
+# Construct search path for python modules, if each exists
+for dir in $grswigdir $grpydir
+do
+    if [ "$dir" != "" ]
+    then
+       if [ "$PYTHONPATH" = "" ]
+       then
+           PYTHONPATH="$dir"
+       else
+           PYTHONPATH="$dir:$PYTHONPATH"
+       fi
+    fi
+done
+
+# Where to find pre-installed python modules
address@hidden@
+
+# Add the 'with' dirs to the end of the python search path, if it exists
+if [ "$withpydirs" != "" ]
+then
+    PYTHONPATH="$PYTHONPATH:$withpydirs"
+fi
+
+# Add the "my" dirs to the absolute front of the python search path
+PYTHONPATH="$mylibdir:$mysrcdir:$mypydir:$PYTHONPATH"
 export PYTHONPATH
 
-# Where to find core's master library files and dependencies
address@hidden@/omnithread
-gromnidir=$gromnidir:$gromnidir/.libs
address@hidden@/gnuradio-core/src/lib
-grcoredir=$grcoredir:$grcoredir/.libs
-grlibdir=$gromnidir:$grcoredir
+# Where to find omnithread library files
address@hidden@
 
-# For OS/X
-DYLD_LIBRARY_PATH=$grlibdir:$DYLD_LIBRARY_PATH
-export DYLD_LIBRARY_PATH
+# Where to find gnuradio core's library files
address@hidden@
 
-# For Win32
-PATH=$grlibdir:$PATH
+# Construct search path for python modules
+# Check each one to make sure it's not "" before adding
+grlibdir=""
+for dir in $gromnidir $grcoredir
+do
+    if [ "$dir" != "" ]
+    then
+       if [ "$grlibdir" = "" ]
+       then
+           grlibdir="$dir"
+       else
+           grlibdir="$dir:$grlibdir"
+       fi
+    fi
+done
 
+# Add 'mylibdir' to the start of the library load path, to get local
+# (to this component) created libraries
+
+# Where to find pre-installed libraries
address@hidden@
+
+case "@host_os@" in
+  darwin*)
+    # Special Code for executing on Darwin / Mac OS X only
+    if [ "$DYLD_LIBRARY_PATH" = "" ]
+    then
+       DYLD_LIBRARY_PATH=$mylibdir
+    else
+       DYLD_LIBRARY_PATH=$mylibdir:$DYLD_LIBRARY_PATH
+    fi
+    # DYLD_LIBRARY_PATH will not be empty now
+    # Add the grlibdir paths to the front of any library load variable
+    if [ "$grlibdir" != "" ]
+    then
+       DYLD_LIBRARY_PATH=$grlibdir:$DYLD_LIBRARY_PATH
+    fi
+    # Add the withdirs paths to the end of any library load variable
+    if [ "$withlibdirs" != "" ]
+    then
+       DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$withlibdirs
+    fi
+    export DYLD_LIBRARY_PATH
+    ;;
+  cygwin*|win*|mingw*)
+    # Special Code for executing on Win32 variants only
+    if [ "$PATH" = "" ]
+    then
+       PATH=$mylibdir
+    else
+       PATH=$mylibdir:$PATH
+    fi
+    # PATH will not be empty now
+    # Add the grlibdir paths to the front of any library load variable
+    if [ "$grlibdir" != "" ]
+    then
+       PATH=$grlibdir:$PATH
+    fi
+    # Add the withdirs paths to the end of any library load variable
+    if [ "$withlibdirs" != "" ]
+    then
+       PATH=$PATH:$withlibdirs
+    fi
+    export PATH
+    ;;
+esac
+
 # Don't load user or system prefs
 GR_DONT_LOAD_PREFS=1
 export GR_DONT_LOAD_PREFS

Modified: gnuradio/branches/releases/3.1/usrp/firmware/lib/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/usrp/firmware/lib/Makefile.am        
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/usrp/firmware/lib/Makefile.am        
2008-03-05 21:49:39 UTC (rev 7945)
@@ -30,7 +30,7 @@
 
 
 DEFINES=
-INCLUDES=-I$(top_srcdir)/usrp/firmware/include
+FW_INCLUDES=-I$(top_srcdir)/usrp/firmware/include
 
 # with EA = 0, the FX2 implements a portion of the 8051 "external memory"
 # on chip.  This memory is mapped like this:
@@ -58,7 +58,7 @@
 all: libfx2.lib
 
 .c.rel:
-       $(XCC) $(INCLUDES) $(DEFINES) -c $< -o $@
+       $(XCC) $(FW_INCLUDES) $(DEFINES) -c $< -o $@
 
 $(LIBRARY): $(LIBOBJS)
        -rm -f $(LIBRARY)

Modified: gnuradio/branches/releases/3.1/usrp/firmware/src/usrp2/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/usrp/firmware/src/usrp2/Makefile.am  
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/usrp/firmware/src/usrp2/Makefile.am  
2008-03-05 21:49:39 UTC (rev 7945)
@@ -54,7 +54,7 @@
 
 
 DEFINES=-DHAVE_USRP2
-INCLUDES=-I$(top_srcdir)/usrp/firmware/include \
+FW_INCLUDES=-I$(top_srcdir)/usrp/firmware/include \
          -I$(top_srcdir)/usrp/firmware/src/usrp2 \
         -I$(top_srcdir)/usrp/firmware/src/common \
         -I$(top_builddir)/usrp/firmware/src/common
@@ -91,7 +91,7 @@
 
 
 .c.rel:
-       $(XCC) $(INCLUDES) $(DEFINES) \
+       $(XCC) $(FW_INCLUDES) $(DEFINES) \
                -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
 .a51.rel:

Modified: gnuradio/branches/releases/3.1/usrp/host/apps/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/usrp/host/apps/Makefile.am   2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/usrp/host/apps/Makefile.am   2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2003,2006 Free Software Foundation, Inc.
+# Copyright 2003,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -21,9 +21,9 @@
 
 include $(top_srcdir)/Makefile.common
 
-INCLUDES = $(USRP_INCLUDES) $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES)
+AM_CPPFLAGS = $(USRP_INCLUDES) $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES) \
+          $(WITH_INCLUDES)
 
-
 bin_PROGRAMS =                         \
        usrper                          \
        usrp_cal_dc_offset              

Modified: gnuradio/branches/releases/3.1/usrp/host/lib/legacy/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/usrp/host/lib/legacy/Makefile.am     
2008-03-05 21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/usrp/host/lib/legacy/Makefile.am     
2008-03-05 21:49:39 UTC (rev 7945)
@@ -1,7 +1,7 @@
 #
 #  USRP - Universal Software Radio Peripheral
 # 
-#  Copyright (C) 2003,2004,2006,2007 Free Software Foundation, Inc.
+#  Copyright (C) 2003,2004,2006,2007,2008 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
@@ -32,10 +32,10 @@
 
 # darwin fusb requires omnithreads
 if FUSB_TECH_darwin
-INCLUDES = $(common_INCLUDES) $(OMNITHREAD_INCLUDES)
+AM_CPPFLAGS = $(common_INCLUDES) $(OMNITHREAD_INCLUDES) $(WITH_INCLUDES)
 libusrp_la_LIBADD = $(libusrp_la_common_LIBADD) $(OMNITHREAD_LA)
 else
-INCLUDES = $(common_INCLUDES)
+AM_CPPFLAGS = $(common_INCLUDES) $(WITH_INCLUDES)
 libusrp_la_LIBADD = $(libusrp_la_common_LIBADD)
 endif
 

Modified: gnuradio/branches/releases/3.1/usrp/host/swig/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.1/usrp/host/swig/Makefile.am   2008-03-05 
21:34:52 UTC (rev 7944)
+++ gnuradio/branches/releases/3.1/usrp/host/swig/Makefile.am   2008-03-05 
21:49:39 UTC (rev 7945)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2003,2004,2006,2007 Free Software Foundation, Inc.
+# Copyright 2001,2003,2004,2006,2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -25,9 +25,10 @@
 ourlibdir    = $(usrppyexecdir)
 
 
-INCLUDES = $(USRP_INCLUDES)            \
+AM_CPPFLAGS = $(USRP_INCLUDES)                 \
           $(PYTHON_CPPFLAGS)           \
-          -I$(srcdir)
+          -I$(srcdir)                  \
+          $(WITH_INCLUDES)
 
 LOCAL_IFILES =                         \
        prims.i
@@ -52,7 +53,8 @@
        usrp_prims.py                   
 
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(INCLUDES)
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(AM_CPPFLAGS) $(WITH_SWIG_INCLUDES) \
+       $(WITH_INCLUDES)
 
 
 ourlib_LTLIBRARIES =                   \

Modified: gnuradio/branches/releases/3.1/usrp/usrp.pc.in
===================================================================
--- gnuradio/branches/releases/3.1/usrp/usrp.pc.in      2008-03-05 21:34:52 UTC 
(rev 7944)
+++ gnuradio/branches/releases/3.1/usrp/usrp.pc.in      2008-03-05 21:49:39 UTC 
(rev 7945)
@@ -5,7 +5,7 @@
 
 Name: usrp
 Description: USRP Client Side C++ interface
-Requires:
+Requires: libusb @usrp_darwin_omnithread_pc_requires@
 Version: @VERSION@
-Libs: -L${libdir} -lusrp -lusb
+Libs: -L${libdir} -lusrp
 Cflags: -I${includedir} @DEFINES@





reply via email to

[Prev in Thread] Current Thread [Next in Thread]