summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorjcorgan2008-02-08 23:32:10 +0000
committerjcorgan2008-02-08 23:32:10 +0000
commit42d9c6f495503d3d9d2db47a9979036c9233f976 (patch)
treeb4d2be737c3ad6836e62dc35c861e987ea3729e0 /config
parent6bf2c048d94e1c673c06c058b23213cd28292520 (diff)
downloadgnuradio-42d9c6f495503d3d9d2db47a9979036c9233f976.tar.gz
gnuradio-42d9c6f495503d3d9d2db47a9979036c9233f976.tar.bz2
gnuradio-42d9c6f495503d3d9d2db47a9979036c9233f976.zip
Merged r7478:7608 from michaelld/t186 into trunk. Adds ability to compile GNU Radio modules individually, using already installed dependent libraries and include files. New functionality is enabled using --with-* on configure command line; existing build options should remain unchanged. Nice work by Michael Dickens, still needs documentation update on wiki.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7617 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'config')
-rw-r--r--config/grc_build.m470
-rw-r--r--config/grc_gnuradio_core.m4130
-rw-r--r--config/grc_gnuradio_examples.m48
-rw-r--r--config/grc_gr_atsc.m48
-rw-r--r--config/grc_gr_audio_alsa.m48
-rw-r--r--config/grc_gr_audio_jack.m48
-rw-r--r--config/grc_gr_audio_oss.m48
-rw-r--r--config/grc_gr_audio_osx.m417
-rw-r--r--config/grc_gr_audio_portaudio.m48
-rw-r--r--config/grc_gr_audio_windows.m49
-rw-r--r--config/grc_gr_comedi.m48
-rw-r--r--config/grc_gr_cvsd_vocoder.m48
-rw-r--r--config/grc_gr_gsm_fr_vocoder.m48
-rw-r--r--config/grc_gr_pager.m48
-rw-r--r--config/grc_gr_qtgui.m410
-rw-r--r--config/grc_gr_radar_mono.m419
-rw-r--r--config/grc_gr_radio_astronomy.m48
-rw-r--r--config/grc_gr_sounder.m419
-rw-r--r--config/grc_gr_trellis.m48
-rw-r--r--config/grc_gr_usrp.m420
-rw-r--r--config/grc_gr_utils.m430
-rw-r--r--config/grc_gr_video_sdl.m48
-rw-r--r--config/grc_gr_wxgui.m442
-rw-r--r--config/grc_mblock.m477
-rw-r--r--config/grc_omnithread.m442
-rw-r--r--config/grc_pmt.m461
-rw-r--r--config/grc_usrp.m4158
27 files changed, 570 insertions, 238 deletions
diff --git a/config/grc_build.m4 b/config/grc_build.m4
index 7c060c2be..a43988f29 100644
--- a/config/grc_build.m4
+++ b/config/grc_build.m4
@@ -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
@@ -27,27 +27,75 @@ AC_DEFUN([GRC_ENABLE],[
[[enable_]m4_bpatsubst($1,-,_)=$enable_all_components])
])
+# Create --with-foo argument for named compoment, create variables as needed
+# $1 is component name
+AC_DEFUN([GRC_WITH],[
+ AC_ARG_WITH([$1],
+ AC_HELP_STRING([--with-$1],
+ [Use package $1 if installed in $prefix/lib/pkgconfig; otherwise revert back to --enable-$1]),
+ [],
+ [])
+])
+
+# Add the specified "with" list; clear the provided variable
+# $1 is the component name
+# $2 is the path list name suffix
+# $3 is the separator (for paths, ":"; for includes " ")
+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
+])
+
# Conditionally build named component.
# $1 is component name
# $2 is executed if configuration passes and build is desired
+AC_DEFUN([GRC_BUILD_CONDITIONAL],[
+ _GRC_BUILD_CONDITIONAL($1, m4_bpatsubst($1,-,_), $2)
+])
+
+# $1 is the component name
+# $2=m4_bpatsubst($1,-,_)
+# $3 is executed if configuration passes and build is desired
# Use $passed=no to indicate configuration failure
+# Use $passed=with to indicate the use of pre-installed libraries and headers
# Any other value of $passed, including blank, assumes success
-AC_DEFUN([GRC_BUILD_CONDITIONAL],[
+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
+ if test x$enable_$2 = 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 x$passed = xwith; then
+ with_dirs="$with_dirs $1"
+ GRC_ADD_TO_LIST($2, INCLUDES, " ")
+ GRC_ADD_TO_LIST($2, SWIG_INCLUDES, " ")
+ GRC_ADD_TO_LIST($2, PYDIRPATH, ":")
+ GRC_ADD_TO_LIST($2, SWIGDIRPATH, ":")
+ GRC_ADD_TO_LIST($2, LIBDIRPATH, ":")
+ AC_MSG_RESULT([Component $1 will be included from a pre-installed library and includes, and will not be built.])
else
- skipped_dirs="$skipped_dirs $1"
- AC_MSG_RESULT([Component $1 passed configuration checks, but not building.])
+ if test x$enable_$2 != xno; then
+ $3
+ 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 x$passed = xno; then
+ skipped_dirs="$skipped_dirs $1"
+ $2_skipped=yes
+ else
+ $2_skipped=no
+ fi
])
diff --git a/config/grc_gnuradio_core.m4 b/config/grc_gnuradio_core.m4
index 37849929f..30a8dafff 100644
--- a/config/grc_gnuradio_core.m4
+++ b/config/grc_gnuradio_core.m4
@@ -19,52 +19,88 @@ dnl Boston, MA 02110-1301, USA.
AC_DEFUN([GRC_GNURADIO_CORE],[
GRC_ENABLE([gnuradio-core])
-
- AC_CONFIG_FILES([ \
- gnuradio-core/Makefile
- gnuradio-core/gnuradio-core.pc \
- gnuradio-core/doc/Doxyfile \
- gnuradio-core/doc/Makefile \
- gnuradio-core/doc/other/Makefile \
- gnuradio-core/doc/xml/Makefile \
- gnuradio-core/src/Makefile \
- gnuradio-core/src/gen_interpolator_taps/Makefile \
- gnuradio-core/src/lib/Makefile \
- gnuradio-core/src/lib/filter/Makefile \
- gnuradio-core/src/lib/g72x/Makefile \
- gnuradio-core/src/lib/general/Makefile \
- gnuradio-core/src/lib/general/gr_prefix.cc \
- gnuradio-core/src/lib/gengen/Makefile \
- gnuradio-core/src/lib/io/Makefile \
- gnuradio-core/src/lib/missing/Makefile \
- gnuradio-core/src/lib/reed-solomon/Makefile \
- gnuradio-core/src/lib/runtime/Makefile \
- gnuradio-core/src/lib/swig/Makefile \
- gnuradio-core/src/python/Makefile \
- gnuradio-core/src/python/bin/Makefile \
- gnuradio-core/src/python/gnuradio/Makefile \
- gnuradio-core/src/python/gnuradio/blks2/Makefile \
- gnuradio-core/src/python/gnuradio/blks2impl/Makefile \
- gnuradio-core/src/python/gnuradio/gr/Makefile \
- gnuradio-core/src/python/gnuradio/gr/run_tests \
- gnuradio-core/src/python/gnuradio/gru/Makefile \
- gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
- gnuradio-core/src/python/gnuradio/vocoder/Makefile \
- gnuradio-core/src/tests/Makefile \
- gnuradio-core/src/utils/Makefile \
- ])
-
- passed=yes
- # 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
+ GRC_WITH([gnuradio-core])
+ passed=no
+ if test x$with_gnuradio_core = xyes; then
+ if test x$enable_gnuradio_core = xyes; then
+ AC_MSG_ERROR([Component gnuradio-core: Cannot use both --enable and --with])
+ else
+ PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core, passed=with,
+ AC_MSG_RESULT([Component gnuradio-core: PKGCONFIG cannot find info]))
+ if test x$passed = xwith; then
+ gnuradio_core_INCLUDES=`$PKG_CONFIG --cflags-only-I gnuradio-core`
+ gnuradio_core_LA=$GNURADIO_CORE_LIBS
+ gnuradio_core_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gnuradio-core`
+ gnuradio_core_SWIGDIRPATH="$gnuradio_core_INCLUDEDIR/swig"
+ gnuradio_core_I="$gnuradio_core_SWIGDIRPATH/gnuradio.i"
+ gnuradio_core_SWIG_INCLUDES="-I$gnuradio_core_SWIGDIRPATH"
+ gnuradio_core_LIBDIRPATH=`$PKG_CONFIG --variable=libdir gnuradio-core`
+ gnuradio_core_PYDIRPATH=$pythondir
+ fi
fi
- done
+ fi
+ dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
+ dnl otherwise, $passed = no; check the "--enable" stuff
+ if test x$passed = xno; then
+ AC_CONFIG_FILES([ \
+ gnuradio-core/Makefile
+ gnuradio-core/gnuradio-core.pc \
+ gnuradio-core/doc/Doxyfile \
+ gnuradio-core/doc/Makefile \
+ gnuradio-core/doc/other/Makefile \
+ gnuradio-core/doc/xml/Makefile \
+ gnuradio-core/src/Makefile \
+ gnuradio-core/src/gen_interpolator_taps/Makefile \
+ gnuradio-core/src/lib/Makefile \
+ gnuradio-core/src/lib/filter/Makefile \
+ gnuradio-core/src/lib/g72x/Makefile \
+ gnuradio-core/src/lib/general/Makefile \
+ gnuradio-core/src/lib/general/gr_prefix.cc \
+ gnuradio-core/src/lib/gengen/Makefile \
+ gnuradio-core/src/lib/io/Makefile \
+ gnuradio-core/src/lib/missing/Makefile \
+ gnuradio-core/src/lib/reed-solomon/Makefile \
+ gnuradio-core/src/lib/runtime/Makefile \
+ gnuradio-core/src/lib/swig/Makefile \
+ gnuradio-core/src/python/Makefile \
+ gnuradio-core/src/python/bin/Makefile \
+ gnuradio-core/src/python/gnuradio/Makefile \
+ gnuradio-core/src/python/gnuradio/blks2/Makefile \
+ gnuradio-core/src/python/gnuradio/blks2impl/Makefile \
+ gnuradio-core/src/python/gnuradio/gr/Makefile \
+ gnuradio-core/src/python/gnuradio/gr/run_tests \
+ gnuradio-core/src/python/gnuradio/gru/Makefile \
+ gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
+ gnuradio-core/src/python/gnuradio/vocoder/Makefile \
+ gnuradio-core/src/tests/Makefile \
+ gnuradio-core/src/utils/Makefile \
+ ])
+ passed=yes
+ # Don't do gnuradio-core if omnithread skipped
+ if test x$omnithread_skipped = xyes; then
+ AC_MSG_RESULT([Component gnuradio-core requires omnithread, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ gnuradio_core_INCLUDES="-I\${abs_top_srcdir}/gnuradio-core/src/lib/runtime \
+ -I\${abs_top_srcdir}/gnuradio-core/src/lib/general \
+ -I\${abs_top_builddir}/gnuradio-core/src/lib/general \
+ -I\${abs_top_srcdir}/gnuradio-core/src/lib/gengen \
+ -I\${abs_top_builddir}/gnuradio-core/src/lib/gengen \
+ -I\${abs_top_srcdir}/gnuradio-core/src/lib/filter \
+ -I\${abs_top_builddir}/gnuradio-core/src/lib/filter \
+ -I\${abs_top_srcdir}/gnuradio-core/src/lib/reed-solomon \
+ -I\${abs_top_srcdir}/gnuradio-core/src/lib/io \
+ -I\${abs_top_srcdir}/gnuradio-core/src/lib/g72x \
+ -I\${abs_top_srcdir}/gnuradio-core/src/lib/swig \
+ -I\${abs_top_builddir}/gnuradio-core/src/lib/swig \
+ \$(FFTW3F_CFLAGS)"
+ gnuradio_core_LA="\${abs_top_builddir}/gnuradio-core/src/lib/libgnuradio-core.la"
+ gnuradio_core_I="\${abs_top_srcdir}/gnuradio-core/src/lib/swig/gnuradio.i"
+ gnuradio_core_LIBDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib:\${abs_top_builddir}/gnuradio-core/src/lib/.libs"
+ gnuradio_core_SWIGDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib/swig:\${abs_top_builddir}/gnuradio-core/src/lib/swig/.libs:\${abs_top_srcdir}/gnuradio-core/src/lib/swig"
+ gnuradio_core_PYDIRPATH="\${abs_top_srcdir}/gnuradio-core/src/python"
+ fi
GRC_BUILD_CONDITIONAL([gnuradio-core],[
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_core], [chmod +x gnuradio-core/src/python/gnuradio/gr/run_tests])
@@ -78,4 +114,10 @@ AC_DEFUN([GRC_GNURADIO_CORE],[
touch gnuradio-core/src/lib/swig/gnuradio_swig_py_io.d
])
])
+ AC_SUBST([gnuradio_core_INCLUDES])
+ AC_SUBST([gnuradio_core_LA])
+ AC_SUBST([gnuradio_core_I])
+ AC_SUBST([gnuradio_core_LIBDIRPATH])
+ AC_SUBST([gnuradio_core_SWIGDIRPATH])
+ AC_SUBST([gnuradio_core_PYDIRPATH])
])
diff --git a/config/grc_gnuradio_examples.m4 b/config/grc_gnuradio_examples.m4
index fc758e893..5dc6caf0a 100644
--- a/config/grc_gnuradio_examples.m4
+++ b/config/grc_gnuradio_examples.m4
@@ -1,4 +1,4 @@
-# Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -39,5 +39,11 @@ AC_DEFUN([GRC_GNURADIO_EXAMPLES],[
])
passed=yes
+ # Don't do gnuradio-examples if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gnuradio-examples requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
GRC_BUILD_CONDITIONAL([gnuradio-examples])
])
diff --git a/config/grc_gr_atsc.m4 b/config/grc_gr_atsc.m4
index ed237fa2f..a0b394ead 100644
--- a/config/grc_gr_atsc.m4
+++ b/config/grc_gr_atsc.m4
@@ -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
@@ -30,6 +30,12 @@ AC_DEFUN([GRC_GR_ATSC],[
])
passed=yes
+ # Don't do gr-atsc if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-atsc requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
GRC_BUILD_CONDITIONAL([gr-atsc],[
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])
diff --git a/config/grc_gr_audio_alsa.m4 b/config/grc_gr_audio_alsa.m4
index dad8c21b7..471d33b07 100644
--- a/config/grc_gr_audio_alsa.m4
+++ b/config/grc_gr_audio_alsa.m4
@@ -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
@@ -27,6 +27,12 @@ AC_DEFUN([GRC_GR_AUDIO_ALSA],[
])
passed=yes
+ # Don't do gr-audio-alsa if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-audio-osx requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Don't do gr-audio-alsa if the 'alsa' package is not installed.
PKG_CHECK_MODULES(ALSA, alsa >= 0.9,[],
[passed=no;AC_MSG_RESULT([gr-audio-alsa requires package alsa, not found.])])
diff --git a/config/grc_gr_audio_jack.m4 b/config/grc_gr_audio_jack.m4
index 025c25e9c..5cd59e23d 100644
--- a/config/grc_gr_audio_jack.m4
+++ b/config/grc_gr_audio_jack.m4
@@ -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
@@ -27,6 +27,12 @@ AC_DEFUN([GRC_GR_AUDIO_JACK],[
])
passed=yes
+ # Don't do gr-audio-jack if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-audio-jack requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Don't do gr-audio-jack if in 'jack' isn't installed
PKG_CHECK_MODULES(JACK, jack >= 0.8,[],
[passed=no;AC_MSG_RESULT([gr-audio-jack requires package jack, not found.])])
diff --git a/config/grc_gr_audio_oss.m4 b/config/grc_gr_audio_oss.m4
index 12190bed0..386df51d8 100644
--- a/config/grc_gr_audio_oss.m4
+++ b/config/grc_gr_audio_oss.m4
@@ -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
@@ -27,6 +27,12 @@ AC_DEFUN([GRC_GR_AUDIO_OSS],[
])
passed=yes
+ # Don't do gr-audio-oss if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-audio-oss requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Make sure the correct library and/or headers are available.
case $host in
*-*-netbsd*)
AC_HAVE_LIBRARY(ossaudio,[],
diff --git a/config/grc_gr_audio_osx.m4 b/config/grc_gr_audio_osx.m4
index 1d7f453a3..a42ecd5c5 100644
--- a/config/grc_gr_audio_osx.m4
+++ b/config/grc_gr_audio_osx.m4
@@ -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
@@ -19,17 +19,28 @@ dnl Boston, MA 02110-1301, USA.
AC_DEFUN([GRC_GR_AUDIO_OSX],[
GRC_ENABLE([gr-audio-osx])
-
+
AC_CONFIG_FILES([ \
gr-audio-osx/Makefile \
gr-audio-osx/src/Makefile \
gr-audio-osx/src/run_tests \
])
-
+
passed=yes
MACOSX_AUDIOUNIT([],
[passed=no;AC_MSG_RESULT([gr-audio-osx requires AudioUnit, not found.])])
+ # Don't do gr-audio-osx if omnithread skipped
+ if test x$omnithread_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-audio-osx requires omnithread, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Don't do gr-audio-osx if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-audio-osx requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
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])
diff --git a/config/grc_gr_audio_portaudio.m4 b/config/grc_gr_audio_portaudio.m4
index 31ab07aab..490d9395c 100644
--- a/config/grc_gr_audio_portaudio.m4
+++ b/config/grc_gr_audio_portaudio.m4
@@ -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
@@ -27,6 +27,12 @@ AC_DEFUN([GRC_GR_AUDIO_PORTAUDIO],[
])
passed=yes
+ # Don't do gr-audio-portaudio if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-audio-portaudio requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Don't do gr-audio-portaudio if the 'portaudio' library is unavailable.
PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19,[],
[passed=no;AC_MSG_RESULT([gr-audio-portaudio requires package portaudio, not found.])])
diff --git a/config/grc_gr_audio_windows.m4 b/config/grc_gr_audio_windows.m4
index 320c5d315..c34651eda 100644
--- a/config/grc_gr_audio_windows.m4
+++ b/config/grc_gr_audio_windows.m4
@@ -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
@@ -27,6 +27,13 @@ AC_DEFUN([GRC_GR_AUDIO_WINDOWS],[
])
passed=yes
+ # Don't do gr-audio-windows if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-audio-windows requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
+ # Don't do gr-audio-windows if the 'winmm' library isn't available.
AC_HAVE_LIBRARY(winmm,[],
[passed=no;AC_MSG_RESULT([gr-audio-windows requires library winmm, not found.])])
diff --git a/config/grc_gr_comedi.m4 b/config/grc_gr_comedi.m4
index 7d6a674e3..b27b7d70a 100644
--- a/config/grc_gr_comedi.m4
+++ b/config/grc_gr_comedi.m4
@@ -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
@@ -27,6 +27,12 @@ AC_DEFUN([GRC_GR_COMEDI],[
])
passed=yes
+ # Don't do gr-comedi if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-comedi requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Don't do gr-comedi if the 'comedi' library is unavailable.
PKG_CHECK_MODULES(COMEDI, comedilib >= 0.7,[],
[passed=no;AC_MSG_RESULT([gr-comedi requires comedilib, not found.])])
diff --git a/config/grc_gr_cvsd_vocoder.m4 b/config/grc_gr_cvsd_vocoder.m4
index 703c617a7..12b83354c 100644
--- a/config/grc_gr_cvsd_vocoder.m4
+++ b/config/grc_gr_cvsd_vocoder.m4
@@ -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
@@ -29,6 +29,12 @@ AC_DEFUN([GRC_GR_CVSD_VOCODER],[
])
passed=yes
+ # Don't do gr-cvsd-vocoder if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-cvsd-vocoder requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
GRC_BUILD_CONDITIONAL([gr-cvsd-vocoder],[
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_cvsd], [chmod +x gr-cvsd-vocoder/src/python/run_tests])
diff --git a/config/grc_gr_gsm_fr_vocoder.m4 b/config/grc_gr_gsm_fr_vocoder.m4
index a5ca28190..b8ccc4840 100644
--- a/config/grc_gr_gsm_fr_vocoder.m4
+++ b/config/grc_gr_gsm_fr_vocoder.m4
@@ -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
@@ -30,6 +30,12 @@ AC_DEFUN([GRC_GR_GSM_FR_VOCODER],[
])
passed=yes
+ # Don't do gr-gsm-fr-vocoder if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-gsm-fr-vocoder requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
GRC_BUILD_CONDITIONAL([gr-gsm-fr-vocoder],[
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])
diff --git a/config/grc_gr_pager.m4 b/config/grc_gr_pager.m4
index 80106526c..cfd0d25b4 100644
--- a/config/grc_gr_pager.m4
+++ b/config/grc_gr_pager.m4
@@ -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
@@ -27,6 +27,12 @@ AC_DEFUN([GRC_GR_PAGER],[
])
passed=yes
+ # Don't do gr-pager if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-pager requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
GRC_BUILD_CONDITIONAL([gr-pager],[
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])
diff --git a/config/grc_gr_qtgui.m4 b/config/grc_gr_qtgui.m4
index 05f8b02c2..4dd6ce68e 100644
--- a/config/grc_gr_qtgui.m4
+++ b/config/grc_gr_qtgui.m4
@@ -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
@@ -26,8 +26,14 @@ AC_DEFUN([GRC_GR_QTGUI],[
gr-qtgui/src/lib/Makefile \
])
- # Check for package qt or qt-mt, set QT_CFLAGS and QT_LIBS
passed=yes
+ # Don't do gr-qtgui if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-qtgui requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
+ # Check for package qt or qt-mt, set QT_CFLAGS and QT_LIBS
PKG_CHECK_MODULES(QT, qt >= 3.3,[],
[passed=no;AC_MSG_RESULT([gr-qtgui requires libqt or libqt-mt, libqt not found. Checking for libqt-mt])])
diff --git a/config/grc_gr_radar_mono.m4 b/config/grc_gr_radar_mono.m4
index cbc2f8de4..40041dd88 100644
--- a/config/grc_gr_radar_mono.m4
+++ b/config/grc_gr_radar_mono.m4
@@ -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
@@ -35,14 +35,15 @@ AC_DEFUN([GRC_GR_RADAR_MONO],[
])
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
+ # Don't do gr-radar-mono if usrp or gnuradio-core skipped
+ if test x$usrp_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-radar-mono requires usrp, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-radar-mono requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
GRC_BUILD_CONDITIONAL([gr-radar-mono],[
dnl run_tests is created from run_tests.in. Make it executable.
diff --git a/config/grc_gr_radio_astronomy.m4 b/config/grc_gr_radio_astronomy.m4
index 724ff8a65..cc966295b 100644
--- a/config/grc_gr_radio_astronomy.m4
+++ b/config/grc_gr_radio_astronomy.m4
@@ -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
@@ -29,6 +29,12 @@ AC_DEFUN([GRC_GR_RADIO_ASTRONOMY],[
])
passed=yes
+ # Don't do gr-radio-astronomy if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-radio-astronomy requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
GRC_BUILD_CONDITIONAL([gr-radio-astronomy],[
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])
diff --git a/config/grc_gr_sounder.m4 b/config/grc_gr_sounder.m4
index f716a324c..0553bb277 100644
--- a/config/grc_gr_sounder.m4
+++ b/config/grc_gr_sounder.m4
@@ -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
@@ -34,14 +34,15 @@ AC_DEFUN([GRC_GR_SOUNDER],[
])
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
+ # Don't do gr-sounder if usrp or gnuradio-core skipped
+ if test x$usrp_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-sounder requires usrp, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-sounder requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
GRC_BUILD_CONDITIONAL([gr-sounder],[
dnl run_tests is created from run_tests.in. Make it executable.
diff --git a/config/grc_gr_trellis.m4 b/config/grc_gr_trellis.m4
index cde1f1cca..6fbaa1ac8 100644
--- a/config/grc_gr_trellis.m4
+++ b/config/grc_gr_trellis.m4
@@ -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
@@ -32,6 +32,12 @@ AC_DEFUN([GRC_GR_TRELLIS],[
])
passed=yes
+ # Don't do gr-trellis if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-trellis requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+
GRC_BUILD_CONDITIONAL([gr-trellis],[
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])
diff --git a/config/grc_gr_usrp.m4 b/config/grc_gr_usrp.m4
index c247e5ded..576ef85e4 100644
--- a/config/grc_gr_usrp.m4
+++ b/config/grc_gr_usrp.m4
@@ -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
@@ -27,15 +27,15 @@ AC_DEFUN([GRC_GR_USRP],[
])
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
+ # Don't do gr-usrp if usrp or gnuradio-core skipped
+ if test x$usrp_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-usrp requires usrp, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-usrp requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
GRC_BUILD_CONDITIONAL([gr-usrp],[
dnl run_tests is created from run_tests.in. Make it executable.
diff --git a/config/grc_gr_utils.m4 b/config/grc_gr_utils.m4
index e5b3a6afb..34f56da1e 100644
--- a/config/grc_gr_utils.m4
+++ b/config/grc_gr_utils.m4
@@ -1,4 +1,4 @@
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007,2008 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -29,22 +29,18 @@ AC_DEFUN([GRC_GR_UTILS],[
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
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-utils requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ if test x$usrp_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-utils requires usrp, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ if test x$gr_wxgui_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-utils requires gr-wxgui, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
GRC_BUILD_CONDITIONAL([gr-utils])
])
diff --git a/config/grc_gr_video_sdl.m4 b/config/grc_gr_video_sdl.m4
index 405feb0ea..74aa5c046 100644
--- a/config/grc_gr_video_sdl.m4
+++ b/config/grc_gr_video_sdl.m4
@@ -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
@@ -27,6 +27,12 @@ AC_DEFUN([GRC_GR_VIDEO_SDL],[
])
passed=yes
+ # Don't do gr-video-sdl if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-video-sdl requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Don't do gr-video-sdl if the SDL library is unavailable.
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION,[],
[passed=no;AC_MSG_RESULT([gr-video-sdl requires library sdl, not found or failed test.])])
diff --git a/config/grc_gr_wxgui.m4 b/config/grc_gr_wxgui.m4
index 22f0a90e2..f3104a37e 100644
--- a/config/grc_gr_wxgui.m4
+++ b/config/grc_gr_wxgui.m4
@@ -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
@@ -19,18 +19,36 @@ dnl Boston, MA 02110-1301, USA.
AC_DEFUN([GRC_GR_WXGUI],[
GRC_ENABLE([gr-wxgui])
+ GRC_WITH([gr-wxgui])
+ passed=no
+ if test x$with_gr_wxgui = xyes; then
+ if test x$enable_gr_wxgui = xyes; then
+ AC_MSG_ERROR([Component gr-wxgui: Cannot use both --enable and --with])
+ else
+ PKG_CHECK_MODULES(GR_WXGUI, gr-wxgui, passed=with,
+ AC_MSG_RESULT([Component gr-wxgui: PKGCONFIG cannot find info]))
+ fi
+ fi
+ dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
+ dnl otherwise, $passed = no; check the "--enable" stuff
+ if test x$passed = xno; then
+ AC_CONFIG_FILES([ \
+ gr-wxgui/Makefile \
+ gr-wxgui/gr-wxgui.pc \
+ gr-wxgui/src/Makefile \
+ gr-wxgui/src/python/Makefile \
+ ])
- AC_CONFIG_FILES([ \
- gr-wxgui/Makefile \
- gr-wxgui/src/Makefile \
- gr-wxgui/src/python/Makefile \
- ])
-
- if ${PYTHON} -c 'import wx'; then
- passed=yes
- else
- passed=no
+ passed=yes
+ # Don't do gr-wxgui if gnuradio-core skipped
+ if test x$gnuradio_core_skipped = xyes; then
+ AC_MSG_RESULT([Component gr-wxgui requires gnuradio-core, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Don't do gr-wxgui if wxPython is not available
+ if ! ${PYTHON} -c 'import wx'; then
+ passed=no
+ fi
fi
-
GRC_BUILD_CONDITIONAL([gr-wxgui])
])
diff --git a/config/grc_mblock.m4 b/config/grc_mblock.m4
index a96348fb4..ec985e053 100644
--- a/config/grc_mblock.m4
+++ b/config/grc_mblock.m4
@@ -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
@@ -19,46 +19,57 @@ dnl Boston, MA 02110-1301, USA.
AC_DEFUN([GRC_MBLOCK],[
GRC_ENABLE([mblock])
-
- AC_CONFIG_FILES([\
- mblock/Makefile \
- mblock/mblock.pc \
- mblock/doc/Makefile \
- mblock/src/Makefile \
- mblock/src/lib/Makefile \
- mblock/src/scheme/Makefile \
- mblock/src/scheme/gnuradio/Makefile \
- ])
-
- passed=yes
- # Don't do mblock 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 mblock requires omnithread, which is not being built.])
+ GRC_WITH([mblock])
+ passed=no
+ if test x$with_mblock = xyes; then
+ if test x$enable_mblock = xyes; then
+ AC_MSG_ERROR([Component mblock: Cannot use both --enable and --with])
+ else
+ PKG_CHECK_MODULES(MBLOCK, mblock, passed=with,
+ AC_MSG_RESULT([Component mblock: PKGCONFIG cannot find info]))
+ if test x$passed = xwith; then
+ mblock_INCLUDES=`$PKG_CONFIG --cflags-only-I mblock`
+ mblock_LA=$MBLOCK_LIBS
+ fi
+ fi
+ fi
+ dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
+ dnl otherwise, $passed = no; check the "--enable" stuff
+ if test x$passed = xno; then
+ AC_CONFIG_FILES([\
+ mblock/Makefile \
+ mblock/mblock.pc \
+ mblock/doc/Makefile \
+ mblock/src/Makefile \
+ mblock/src/lib/Makefile \
+ mblock/src/scheme/Makefile \
+ mblock/src/scheme/gnuradio/Makefile \
+ ])
+ passed=yes
+ # Don't do mblock if omnithread or pmt skipped
+ if test x$omnithread_skipped = xyes; then
+ AC_MSG_RESULT([Component mblock requires omnithread, which is not being built or specified via pre-installed files.])
passed=no
fi
- done
-
- # Don't do mblock if pmt 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 = xpmt; then
- AC_MSG_RESULT([Component mblock requires pmt, which is not being built.])
+ if test x$pmt_skipped = xyes; then
+ AC_MSG_RESULT([Component mblock requires pmt, which is not being built or specified via pre-installed files.])
passed=no
fi
- done
-
- AC_PATH_PROG(GUILE,guile)
- if test "$GUILE" = "" ; then
- AC_MSG_RESULT([Component mblock requires guile, which was not found.])
- passed=no
+ # Don't do mblock if guile not available
+ AC_PATH_PROG(GUILE,guile)
+ if test "$GUILE" = "" ; then
+ AC_MSG_RESULT([Component mblock requires guile, which was not found.])
+ passed=no
+ fi
+ mblock_INCLUDES="-I\${abs_top_srcdir}/mblock/src/lib"
+ mblock_LA="\${abs_top_builddir}/mblock/src/lib/libmblock.la"
fi
GRC_BUILD_CONDITIONAL([mblock],[
dnl run_tests is created from run_tests.in. Make it executable.
dnl AC_CONFIG_COMMANDS([run_tests_mblock], [chmod +x mblock/src/python/run_tests])
])
+
+ AC_SUBST([mblock_INCLUDES], [$mblock_INCLUDES])
+ AC_SUBST([mblock_LA], [$mblock_LA])
])
diff --git a/config/grc_omnithread.m4 b/config/grc_omnithread.m4
index f38a312cb..77618e902 100644
--- a/config/grc_omnithread.m4
+++ b/config/grc_omnithread.m4
@@ -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
@@ -19,16 +19,38 @@ dnl Boston, MA 02110-1301, USA.
AC_DEFUN([GRC_OMNITHREAD],[
GRC_ENABLE([omnithread])
-
- AC_CONFIG_FILES([ \
- omnithread/Makefile \
- omnithread/gnuradio-omnithread.pc
- ])
-
- passed=yes
+ GRC_WITH([omnithread])
+ passed=no
+ if test x$with_omnithread = xyes; then
+ if test x$enable_omnithread = xyes; then
+ AC_MSG_ERROR([Component omnithread: Cannot use both --enable and --with])
+ else
+ PKG_CHECK_MODULES(OMNITHREAD, gnuradio-omnithread, passed=with,
+ AC_MSG_RESULT([Component omnithread: PKGCONFIG cannot find info]))
+ if test x$passed = xwith; then
+ omnithread_INCLUDES=`$PKG_CONFIG --cflags-only-I gnuradio-omnithread`
+ omnithread_LA=$OMNITHREAD_LIBS
+ omnithread_LIBDIRPATH=`$PKG_CONFIG --variable=libdir gnuradio-omnithread`
+ fi
+ fi
+ fi
+ dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
+ dnl otherwise, $passed = no; check the "--enable" stuff
+ if test x$passed = xno; then
+ AC_CONFIG_FILES([ \
+ omnithread/Makefile \
+ omnithread/gnuradio-omnithread.pc
+ ])
+ passed=yes
+ omnithread_INCLUDES="-I\${abs_top_srcdir}/omnithread"
+ omnithread_LA="\${abs_top_builddir}/omnithread/libgromnithread.la"
+ omnithread_LIBDIRPATH="\${abs_top_builddir}/omnithread:\${abs_top_builddir}/omnithread/.libs"
+ fi
GRC_BUILD_CONDITIONAL([omnithread],[
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])
])
+ AC_SUBST([omnithread_INCLUDES])
+ AC_SUBST([omnithread_LA])
+ AC_SUBST([omnithread_LIBDIRPATH])
])
diff --git a/config/grc_pmt.m4 b/config/grc_pmt.m4
index 1c1819e50..2a512273e 100644
--- a/config/grc_pmt.m4
+++ b/config/grc_pmt.m4
@@ -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
@@ -19,26 +19,53 @@ dnl Boston, MA 02110-1301, USA.
AC_DEFUN([GRC_PMT],[
GRC_ENABLE([pmt])
-
- AC_CONFIG_FILES([\
- pmt/Makefile \
- pmt/pmt.pc
- pmt/doc/Makefile \
- pmt/src/Makefile \
- pmt/src/lib/Makefile \
- pmt/src/scheme/Makefile \
- pmt/src/scheme/gnuradio/Makefile \
- ])
-
- passed=yes
- AC_PATH_PROG(GUILE,guile)
- if test "$GUILE" = "" ; then
- AC_MSG_RESULT([Component pmt requires guile, which was not found.])
- passed=no
+ GRC_WITH([pmt])
+ passed=no
+ if test x$with_pmt = xyes; then
+ if test x$enable_pmt = xyes; then
+ AC_MSG_ERROR([Component pmt: Cannot use both --enable and --with])
+ else
+ PKG_CHECK_MODULES(PMT, pmt, passed=with,
+ AC_MSG_RESULT([Component pmt: PKGCONFIG cannot find info]))
+ if test x$passed = xwith; then
+ pmt_INCLUDES=`$PKG_CONFIG --cflags-only-I pmt`
+ pmt_LA=$PMT_LIBS
+ fi
+ fi
+ fi
+ dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
+ dnl otherwise, $passed = no; check the "--enable" stuff
+ if test x$passed = xno; then
+ AC_CONFIG_FILES([\
+ pmt/Makefile \
+ pmt/pmt.pc \
+ pmt/doc/Makefile \
+ pmt/src/Makefile \
+ pmt/src/lib/Makefile \
+ pmt/src/scheme/Makefile \
+ pmt/src/scheme/gnuradio/Makefile \
+ ])
+ passed=yes
+ # Don't do pmt if omnithread skipped
+ if test x$omnithread_skipped = xyes; then
+ AC_MSG_RESULT([Component pmt requires omnithread, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Don't do pmt if guile not available
+ AC_PATH_PROG(GUILE,guile)
+ if test "$GUILE" = "" ; then
+ AC_MSG_RESULT([Component pmt requires guile, which was not found.])
+ passed=no
+ fi
+ pmt_INCLUDES="-I\${abs_top_srcdir}/pmt/src/lib"
+ pmt_LA="\${abs_top_builddir}/pmt/src/lib/libpmt.la"
fi
GRC_BUILD_CONDITIONAL([pmt],[
dnl run_tests is created from run_tests.in. Make it executable.
dnl AC_CONFIG_COMMANDS([run_tests_pmt], [chmod +x pmt/src/python/run_tests])
])
+
+ AC_SUBST([pmt_INCLUDES], [$pmt_INCLUDES])
+ AC_SUBST([pmt_LA], [$pmt_LA])
])
diff --git a/config/grc_usrp.m4 b/config/grc_usrp.m4
index e28e6c28d..34acee818 100644
--- a/config/grc_usrp.m4
+++ b/config/grc_usrp.m4
@@ -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
@@ -19,58 +19,122 @@ dnl Boston, MA 02110-1301, USA.
AC_DEFUN([GRC_USRP],[
GRC_ENABLE([usrp])
+ GRC_WITH([usrp])
+ passed=no
+ if test x$with_usrp = xyes; then
+ if test x$enable_usrp = xyes; then
+ AC_MSG_ERROR([Component usrp: Cannot use both --enable and --with])
+ else
+ # the following is required, for whatever reason; ignore the output
+ USRP_SET_FUSB_TECHNIQUE([],[passed=no;AC_MSG_RESULT([Unable to set fast USB technique.])])
+ passed=no
+ # on to the regular routine
+ PKG_CHECK_MODULES(USRP, usrp, passed=with,
+ AC_MSG_RESULT([Component usrp: PKGCONFIG cannot find info]))
+ if test x$passed = xwith; then
+ usrp_INCLUDES=`$PKG_CONFIG --cflags-only-I usrp`
+ usrp_LA=$USRP_LIBS
+ passed=no
+ PKG_CHECK_MODULES(USRP_INBAND, usrp-inband, passed=with,
+ AC_MSG_RESULT([Component usrp-inband: PKGCONFIG cannot find info]))
+ if test x$passed = xwith; then
+ usrp_inband_INCLUDES=`$PKG_CONFIG --cflags-only-I usrp-inband`
+ usrp_inband_LA=$USRP_INBAND_LIBS
+ fi
+ fi
+ fi
+ fi
+ dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
+ dnl otherwise, $passed = no; check the "--enable" stuff
+ if test x$passed = xno; then
+ AC_CONFIG_FILES([ \
+ usrp/Makefile \
+ usrp/usrp.pc \
+ usrp/usrp-inband.pc \
+ usrp/usrp.iss \
+ usrp/doc/Doxyfile \
+ usrp/doc/Makefile \
+ usrp/doc/other/Makefile \
+ usrp/host/Makefile \
+ usrp/host/misc/Makefile \
+ usrp/host/lib/Makefile \
+ usrp/host/lib/inband/Makefile \
+ usrp/host/lib/legacy/Makefile \
+ usrp/host/lib/legacy/std_paths.h \
+ usrp/host/swig/Makefile \
+ usrp/host/apps/Makefile \
+ usrp/host/apps-inband/Makefile \
+ usrp/firmware/Makefile \
+ usrp/firmware/include/Makefile \
+ usrp/firmware/lib/Makefile \
+ usrp/firmware/src/Makefile \
+ usrp/firmware/src/common/Makefile \
+ usrp/firmware/src/usrp2/Makefile \
+ usrp/fpga/Makefile \
+ usrp/fpga/rbf/Makefile \
+ ])
- AC_CONFIG_FILES([ \
- usrp/Makefile \
- usrp/usrp.pc \
- usrp/usrp-inband.pc \
- usrp/usrp.iss \
- usrp/doc/Doxyfile \
- usrp/doc/Makefile \
- usrp/doc/other/Makefile \
- usrp/host/Makefile \
- usrp/host/misc/Makefile \
- usrp/host/lib/Makefile \
- usrp/host/lib/inband/Makefile \
- usrp/host/lib/legacy/Makefile \
- usrp/host/lib/legacy/std_paths.h \
- usrp/host/swig/Makefile \
- usrp/host/apps/Makefile \
- usrp/host/apps-inband/Makefile \
- usrp/firmware/Makefile \
- usrp/firmware/include/Makefile \
- usrp/firmware/lib/Makefile \
- usrp/firmware/src/Makefile \
- usrp/firmware/src/common/Makefile \
- usrp/firmware/src/usrp2/Makefile \
- usrp/fpga/Makefile \
- usrp/fpga/rbf/Makefile \
- ])
-
- # gnulib.
- # FIXME: this needs to fail gracefully and continue, not implemented yet
- UTILS_FUNC_MKSTEMP
+ # 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])
+ # 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.])
+ # There are 2 pkg-config files; the one for usrp requires omnithread
+ # for Darwin only.
+ case "$host_os" in
+ darwin*)
+ # for usrp.pc.in
+ usrp_darwin_omnithread_pc_requires="gnuradio-omnithread"
+ usrp_darwin_omnithread_pc_la="-lgromnithread"
+ ;;
+ *)
+ # for usrp.pc.in (blanks)
+ usrp_darwin_omnithread_pc_requires=""
+ usrp_darwin_omnithread_pc_la=""
+ ;;
+ esac
+ passed=yes
+ # Don't do usrp if omnithread, mblock, or pmt skipped
+ if test x$omnithread_skipped = xyes; then
+ AC_MSG_RESULT([Component usrp requires omnithread, which is not being built or specified via pre-installed files.])
passed=no
fi
- done
+ if test x$mblock_skipped = xyes; then
+ AC_MSG_RESULT([Component usrp requires mblock, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ if test x$pmt_skipped = xyes; then
+ AC_MSG_RESULT([Component usrp requires pmt, which is not being built or specified via pre-installed files.])
+ passed=no
+ fi
+ # Don't do mblock if guile not available (inband requires it)
+ AC_PATH_PROG(GUILE,guile)
+ if test "$GUILE" = "" ; then
+ AC_MSG_RESULT([Component mblock requires guile, which was not found.])
+ passed=no
+ fi
+ USRP_LIBUSB([],[passed=no;AC_MSG_RESULT([Unable to configure USB dependency.])])
+ USRP_SET_FUSB_TECHNIQUE([],[passed=no;AC_MSG_RESULT([Unable to set fast USB technique.])])
+ USRP_SDCC([2.4.0],[],[passed=no;AC_MSG_RESULT([Unable to find firmware compiler.])])
- 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.])])
+ 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
GRC_BUILD_CONDITIONAL([usrp])
+
+ AC_SUBST(usrp_INCLUDES)
+ AC_SUBST(usrp_LA)
+ AC_SUBST(usrp_inband_INCLUDES)
+ AC_SUBST(usrp_inband_LA)
+ AC_SUBST(usrp_darwin_omnithread_pc_requires)
+ AC_SUBST(usrp_darwin_omnithread_pc_la)
])