diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/gr_fortran.m4 | 2 | ||||
-rw-r--r-- | config/gr_pwin32.m4 | 3 | ||||
-rw-r--r-- | config/gr_python.m4 | 6 | ||||
-rw-r--r-- | config/gr_set_md_cpu.m4 | 28 | ||||
-rw-r--r-- | config/gr_version.m4 | 5 | ||||
-rw-r--r-- | config/grc_gnuradio_examples.m4 | 5 | ||||
-rw-r--r-- | config/grc_gr_msdd6000.m4 | 2 | ||||
-rw-r--r-- | config/grc_gr_qtgui.m4 | 6 | ||||
-rw-r--r-- | config/grc_grc.m4 | 1 | ||||
-rw-r--r-- | config/grc_gruel.m4 | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | config/usrp_libusb.m4 | 103 |
11 files changed, 128 insertions, 37 deletions
diff --git a/config/gr_fortran.m4 b/config/gr_fortran.m4 index a558b2f7e..031052043 100644 --- a/config/gr_fortran.m4 +++ b/config/gr_fortran.m4 @@ -28,6 +28,6 @@ AC_DEFUN([GR_FORTRAN],[ then AC_PROG_F77 AC_F77_LIBRARY_LDFLAGS - AC_PROG_CC dnl bux fix to restore $ac_ext fi + AC_PROG_CC dnl bux fix to restore $ac_ext ]) diff --git a/config/gr_pwin32.m4 b/config/gr_pwin32.m4 index 7b99cba6b..495e9dd4d 100644 --- a/config/gr_pwin32.m4 +++ b/config/gr_pwin32.m4 @@ -99,6 +99,9 @@ struct timespec { long tv_nsec; }; #endif +#if HAVE_UNISTD_H +#include <unistd.h> +#endif static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); } #endif diff --git a/config/gr_python.m4 b/config/gr_python.m4 index 7479f0533..43ccfc015 100644 --- a/config/gr_python.m4 +++ b/config/gr_python.m4 @@ -123,6 +123,12 @@ print path ;; esac + case $host_os in + *mingw* ) + # Python 2.5 requires ".pyd" instead of ".dll" for extensions + PYTHON_LDFLAGS="-shrext .pyd ${PYTHON_LDFLAGS}" + esac + AC_SUBST(PYTHON_LDFLAGS) fi ]) diff --git a/config/gr_set_md_cpu.m4 b/config/gr_set_md_cpu.m4 index d8714c4a7..7ebf88a66 100644 --- a/config/gr_set_md_cpu.m4 +++ b/config/gr_set_md_cpu.m4 @@ -50,8 +50,32 @@ AC_DEFUN([GR_SET_MD_CPU],[ AC_ARG_WITH(md-cpu, AC_HELP_STRING([--with-md-cpu=ARCH],[set machine dependent speedups (auto)]), [cf_with_md_cpu="$withval"], - [cf_with_md_cpu="$host_cpu"]) - + [ + dnl see if the user has specified --host or --build, via 'cross_compiling' + if test "$cross_compiling" != no; then + dnl when cross-compiling, because the user specified it either via + dnl --target or --build, just keep the user's specs & hope for the best. + cf_with_md_cpu="$host_cpu" + else + dnl when the user didn't specify --target or --build, on Darwin 10 + dnl (OSX 10.6.0 and .1) and GNU libtoool 2.2.6, 'configure' doesn't + dnl figure out the CPU type correctly, so do it by hand here using + dnl the sizeof (void*): if 4 then use i386, and otherwise use x86_64. + case "$host_os" in + *darwin*10*) + AC_CHECK_SIZEOF(void*) + if test "$ac_cv_sizeof_voidp" = 4; then + cf_with_md_cpu="i386" + else + cf_with_md_cpu="x86_64" + fi + ;; + *) + cf_with_md_cpu="$host_cpu" + ;; + esac + fi + ]) case "$cf_with_md_cpu" in x86 | i[[3-7]]86) MD_CPU=x86 MD_SUBCPU=x86 ;; x86_64) MD_CPU=x86 MD_SUBCPU=x86_64 ;; diff --git a/config/gr_version.m4 b/config/gr_version.m4 index 4f45f0efa..3360b7d54 100644 --- a/config/gr_version.m4 +++ b/config/gr_version.m4 @@ -40,6 +40,7 @@ AC_DEFUN([GR_VERSION],[ if test "$MINOR_VERSION" == "git"; then dnl 3.3git-xxx-gxxxxxxxx RELEASE=$RELEASE$MINOR_VERSION + DOCVER=$RELEASE if test "$GIT_VERSION" != "" ; then RELEASE=$RELEASE-$GIT_VERSION fi @@ -47,6 +48,7 @@ AC_DEFUN([GR_VERSION],[ if test "$MAINT_VERSION" == "git" ; then dnl 3.3.1git-xxx-gxxxxxxxx RELEASE=$RELEASE.$MINOR_VERSION$MAINT_VERSION + DOCVER=$RELEASE if test "$GIT_VERSION" != "" ; then RELEASE=$RELEASE-$GIT_VERSION fi @@ -61,9 +63,12 @@ AC_DEFUN([GR_VERSION],[ dnl 3.3.0.1, 3.3.1.1 RELEASE=$RELEASE.$MAINT_VERSION fi + DOCVER=$RELEASE fi fi fi AC_MSG_NOTICE([GNU Radio Release $RELEASE]) + AC_SUBST(RELEASE) + AC_SUBST(DOCVER) ]) diff --git a/config/grc_gnuradio_examples.m4 b/config/grc_gnuradio_examples.m4 index 3225f3ab5..4d6116c70 100644 --- a/config/grc_gnuradio_examples.m4 +++ b/config/grc_gnuradio_examples.m4 @@ -1,4 +1,4 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc. +dnl Copyright 2001,2002,2003,2004,2005,2006,2008,2009 Free Software Foundation, Inc. dnl dnl This file is part of GNU Radio dnl @@ -27,13 +27,14 @@ AC_DEFUN([GRC_GNURADIO_EXAMPLES],[ gnuradio-examples/Makefile \ gnuradio-examples/c++/Makefile \ gnuradio-examples/python/Makefile \ + gnuradio-examples/grc/Makefile \ gnuradio-examples/python/apps/hf_explorer/Makefile \ gnuradio-examples/python/apps/hf_radio/Makefile \ gnuradio-examples/python/apps/Makefile \ gnuradio-examples/python/audio/Makefile \ gnuradio-examples/python/digital/Makefile \ gnuradio-examples/python/digital_voice/Makefile \ - gnuradio-examples/python/digital-bert/Makefile \ + gnuradio-examples/python/digital-bert/Makefile \ gnuradio-examples/python/mp-sched/Makefile \ gnuradio-examples/python/multi-antenna/Makefile \ gnuradio-examples/python/multi_usrp/Makefile \ diff --git a/config/grc_gr_msdd6000.m4 b/config/grc_gr_msdd6000.m4 index 6d40e8931..0c6fc320e 100644 --- a/config/grc_gr_msdd6000.m4 +++ b/config/grc_gr_msdd6000.m4 @@ -29,7 +29,7 @@ AC_DEFUN([GRC_GR_MSDD6000],[ dnl Don't do gr-msdd6000 if gnuradio-core skipped GRC_CHECK_DEPENDENCY(gr-msdd6000, gnuradio-core) - AC_CHECK_HEADERS(netinet/in.h arpa/inet.h sys/socket.h netdb.h) + AC_CHECK_HEADERS(netinet/in.h arpa/inet.h sys/socket.h netdb.h, [], [passed=no]) GRC_BUILD_CONDITIONAL([gr-msdd6000],[ dnl run_tests is created from run_tests.in. Make it executable. diff --git a/config/grc_gr_qtgui.m4 b/config/grc_gr_qtgui.m4 index d9700776c..84514d7ce 100644 --- a/config/grc_gr_qtgui.m4 +++ b/config/grc_gr_qtgui.m4 @@ -86,12 +86,6 @@ AC_DEFUN([GRC_GR_QTGUI],[ AC_SUBST(QT_UIC_EXEC) fi - if test "$passed" = "no"; then - AM_CONDITIONAL(BUILD_QT, false) - else - AM_CONDITIONAL(BUILD_QT, true) - fi - AC_CONFIG_FILES([ \ gr-qtgui/Makefile \ gr-qtgui/src/Makefile \ diff --git a/config/grc_grc.m4 b/config/grc_grc.m4 index 7ee009fae..16720b8fe 100644 --- a/config/grc_grc.m4 +++ b/config/grc_grc.m4 @@ -50,7 +50,6 @@ AC_DEFUN([GRC_GRC],[ grc/Makefile \ grc/base/Makefile \ grc/blocks/Makefile \ - grc/examples/Makefile \ grc/freedesktop/Makefile \ grc/grc_gnuradio/Makefile \ grc/gui/Makefile \ diff --git a/config/grc_gruel.m4 b/config/grc_gruel.m4 index 729571434..d8ac95fed 100644 --- a/config/grc_gruel.m4 +++ b/config/grc_gruel.m4 @@ -25,6 +25,10 @@ AC_DEFUN([GRC_GRUEL],[ 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 gruel if guile not available + GRC_CHECK_GUILE(gruel) + fi if test $passed != with; then dnl how and where to find INCLUDES and LA and such gruel_INCLUDES="\ diff --git a/config/usrp_libusb.m4 b/config/usrp_libusb.m4 index 73872eaef..428a57992 100644..100755 --- a/config/usrp_libusb.m4 +++ b/config/usrp_libusb.m4 @@ -24,45 +24,100 @@ dnl Boston, MA 02110-1301, USA. AC_DEFUN([USRP_LIBUSB], [ - libusbok=yes + dnl Use PKGCONFIG to check for packages first, then check to + dnl make sure the USB_* variables work (whether from PKGCONFIG + dnl or overridden by the user) + + libusbok=no have_libusb1=no - if test [x]$1 = xyes; then - PKG_CHECK_MODULES(USB, libusb-1.0, [have_libusb1=yes], [ - AC_LANG_PUSH(C) - AC_CHECK_HEADERS([libusb-1.0/libusb.h], [have_libusb1=yes], - [libusbok=no; AC_MSG_RESULT([USRP requires libusb-1.0. libusb.h not found. See http://www.libusb.org])]) - AC_SEARCH_LIBS(libusb_bulk_transfer, [usb-1.0], [USB_LIBS="$LIBS"], - [libusbok=no; AC_MSG_RESULT([USRP requires libusb-1.0. libusb_bulk_transfer not found. See http://www.libusb.org])]) - AC_LANG_POP + if test x$1 = xyes; then + PKG_CHECK_MODULES(USB, libusb-1.0, [ + libusbok=yes + have_libusb1=yes + usb_header='libusb-1.0/libusb.h' + usb_lib_func='libusb_bulk_transfer' + usb_lib_name='usb-1.0' ]) else - PKG_CHECK_MODULES(USB, libusb, [], [ + dnl not using libusb1 (for now); see if legacy version is found. + dnl it might be installed under the name either 'libusb' or + dnl 'libusb-legacy', or just available via the + dnl user's shell environment + + dnl see if the pkgconfig module 'libusb' is available + PKG_CHECK_MODULES(USB, libusb, [libusbok=yes], [libusbok=no]) + dnl PKG_CHECK_MODULES does not work correctly when embedded + if test $libusbok = no; then + dnl if not, see if the pkgconfig module 'libusb-legacy' is available + PKG_CHECK_MODULES(USB, [libusb-legacy], [libusbok=yes], [libusbok=no]) + fi + dnl set variables for further testing + usb_header='usb.h' + usb_lib_func='usb_bulk_write' + usb_lib_name='usb' + fi + if test x$1 != xyes || test $have_libusb1 = yes; then + dnl Either (1) libusb1 was specified and found; or + dnl (2) libusb1 was not specified. Restart checking. + libusbok=yes + + dnl Verify that $usb_header is a valid header, and if so, + dnl then verify that $usb_lib_func can be found in the + dnl library $usb_lib_name. + + dnl If PKGCONFIG found variable USB_INCLUDEDIR, and it is + dnl not empty, use it for checking for $usb_header. + dnl Otherwise, maybe the user's shell environment is already + dnl configured to find this header. + + AC_LANG_PUSH(C) + save_CPPFLAGS="$CPPFLAGS" + if test x$USB_INCLUDEDIR != x; then + USB_INCLUDES="-I$USB_INCLUDEDIR" + CPPFLAGS="$CPPFLAGS $USB_INCLUDES" + AC_SUBST(USB_INCLUDES) + fi + AC_CHECK_HEADERS([$usb_header], [], [libusbok=no]) + CPPFLAGS="$save_CPPFLAGS" + AC_LANG_POP(C) + + if test $libusbok = no; then + AC_MSG_RESULT([USRP requires libusb header '$usb_header' which was not found or was not usable. See http://www.libusb.org]) + else + + dnl found the header; now make sure the library is OK + dnl On Darwin, need to include the IOKit library. + AC_LANG_PUSH(C) - AC_CHECK_HEADERS([usb.h], [], - [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb.h not found. See http://www.libusb.org])]) save_LIBS="$LIBS" + LIBS="" case "$host_os" in darwin*) - LIBS="$LIBS -lIOKit" + USB_LIBS="$USB_LIBS -lIOKit" + LIBS="$USB_LIBS" + ;; + *) ;; + esac + AC_CHECK_LIB([$usb_lib_name], [$usb_lib_func], [], [ + libusbok=no + AC_MSG_RESULT([USRP requires library '$usb_lib_name' with function '$usb_lib_func', which was either not found or was not usable. See http://www.libusb.org]) + ]) + case "$host_os" in + cygwin* | mingw*) + USB_LIBS="$LIBS" ;; *) ;; 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://www.libusb.org])]) LIBS="$save_LIBS" - AC_LANG_POP - ]) - fi - - if x$USB_INCLUDEDIR != x; then - USB_INCLUDES=-I$USB_INCLUDEDIR + AC_LANG_POP(C) + fi fi - - if test x$libusbok = xyes; then + if test $libusbok = yes; then AC_SUBST(USB_LIBS) ifelse([$2], , :, [$2]) else + USB_INCLUDES= + USB_LIBS= ifelse([$3], , :, [$3]) fi ]) |