summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorEric Blossom <eb@comsec.com>2010-12-06 23:16:25 -0800
committerEric Blossom <eb@comsec.com>2010-12-06 23:16:25 -0800
commit55685f7a8ac97186de05a9e806824fa48e327d47 (patch)
treeadfb51f196eeff692182ff6e8fad2b2b5ac8713d /config
parent59a1eeb1b18483ec716afde24df3f0593ed5085c (diff)
parente13783aeb84a2c3656c3344a8d52fa2c9ee38a00 (diff)
Merge branch 'next' into guile-next
* next: (116 commits) Adding new example script for using the new PFB arbitrary resampler interface. One resampler takes user-generated taps and another resampler just takes the resampling rate. Both input and output signals are plotted. Modifying blsk2 wrapper for PFB arbitrary resampler to allow the user to just specify the requested resampling rate without providing their own filter taps. uhd: reverting tag changes on uhd single usrp source, there seems to be issues with the work() logic uhd: removed default value chan=0 in the cc files WITH_INCLUDES _must_ be last uhd: replaced CFLAGS with CPPFLAGS variable, and fixed swig args FIXME uhd: default channel params to zero for single source and sink blocks Revert "Removed usrp2-firmware from being automatically built." Remove generated file from repo Removed usrp2-firmware from being automatically built. uhd: added libdir to UHD CFLAGS (shared by lib and swig) Swapping out preset keys until I work out some of their issues. Modifying QA tests for the sample tags. By default, it only checks the sizes of the tags since order is not specified or guarenteed. Block is a gr_block, so this sets its relative rate. Was required for using in the QA of the sample tags code. Removing global pmt constants. Were causing segfaults during make check. Must fix this later. Fixing up the UHD sample tag example to take command line options. Swapping order of testing rrate. Changing propagation policy enum type name and making a few other minor edits. Changing API for gr_skiphead to use uint64_t for the offset instead of size_t (still unsigned). Fixes issue #304. Adding typedef for uint64_t and int64_t so we can use them through SWIG. ... Passes make distcheck.
Diffstat (limited to 'config')
-rw-r--r--config/grc_gr_uhd.m47
-rw-r--r--config/usrp_libusb.m4168
2 files changed, 112 insertions, 63 deletions
diff --git a/config/grc_gr_uhd.m4 b/config/grc_gr_uhd.m4
index 090187c04c..00892867dd 100644
--- a/config/grc_gr_uhd.m4
+++ b/config/grc_gr_uhd.m4
@@ -26,10 +26,11 @@ AC_DEFUN([GRC_GR_UHD],[
if test $passed = yes; then
dnl Don't do gr-uhd if the 'uhd' package is not installed
PKG_CHECK_MODULES(
- [UHD], [uhd], [],
- [passed=no; AC_MSG_RESULT([gr-uhd requires libuhd])]
+ [UHD], [uhd >= 1.0.0 uhd < 2.0.0], [],
+ [passed=no; AC_MSG_RESULT([gr-uhd requires libuhd 1.x.x])]
)
- AC_SUBST(UHD_CFLAGS)
+ UHD_CPPFLAGS="${UHD_CPPFLAGS} -I\${abs_top_srcdir}/gr-uhd/lib"
+ AC_SUBST(UHD_CPPFLAGS)
AC_SUBST(UHD_LIBS)
fi
diff --git a/config/usrp_libusb.m4 b/config/usrp_libusb.m4
index a434d379dd..cc3410f419 100644
--- a/config/usrp_libusb.m4
+++ b/config/usrp_libusb.m4
@@ -24,28 +24,43 @@ dnl Boston, MA 02110-1301, USA.
AC_DEFUN([USRP_LIBUSB], [
- 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)
-
- dnl do not use LDFLAGS, since PKGCONFIG will provide everything
+ dnl do not use LDFLAGS, except on Windows
saved_LDFLAGS=${LDFLAGS}
- LDFLAGS=
- LIBUSB_PKG_CONFIG_NAME=
+ case "$host_os" in
+ cygwin* | mingw*)
+ ;;
+ *)
+ LDFLAGS=
+ ;;
+ esac
- dnl loop over various possible 'libusb' PKGCONFIG names, and choose
- dnl the first one that meets both the user's selection (via
- dnl configure flags) as well as what is installed
+ dnl this variable is set in usrp/usrp.pc.in as a requirement
+ dnl for libusrp; it is OK to be empty.
+ LIBUSB_PKG_CONFIG_NAME=
- dnl create the list of libusb PKGCONFIG modules to test
+ dnl for Windows (cygin, mingw), do not use PKGCONFIG since LIBUSB
+ dnl does not install a .pc file. For all other OSs, use
+ dnl PKGCONFIG to check for various package names first.
libusb_list=''
- if test x$1 = xyes; then
- dnl libusb-1.0 was requested; just test for it
- libusb_list="libusb-1.0"
- else
- dnl test for legacy libusb only
- libusb_list="libusb libusb-legacy"
- fi
+ case "$host_os" in
+ cygwin* | mingw*)
+ libusb_list='libusb'
+ ;;
+ *)
+ dnl create the list of libusb PKGCONFIG modules to test
+ if test x$1 = xyes; then
+ dnl libusb-1.0 was requested; just test for it
+ libusb_list="libusb-1.0"
+ else
+ dnl test for legacy libusb only
+ libusb_list="libusb libusb-legacy"
+ fi
+ ;;
+ esac
+
+ dnl loop over various possible 'libusb' names, and
+ dnl choose the first one that meets both the user's selection
+ dnl (via configure flags) as well as what is installed
for libusb_name in ${libusb_list}; do
dnl clear internal variables
libusbok=no
@@ -54,31 +69,45 @@ AC_DEFUN([USRP_LIBUSB], [
usb_lib_func=''
usb_lib_name=''
- dnl start checks
- AC_MSG_NOTICE([Checking for LIBUSB version '${libusb_name}'])
- if test ${libusb_name} = "libusb-1.0"; then
- dnl see if the pkgconfig module is available
- PKG_CHECK_MODULES(USB, ${libusb_name}, [
- libusbok=yes
- have_libusb1=yes
- usb_header='libusb-1.0/libusb.h'
- usb_lib_func='libusb_bulk_transfer'
- ], [libusbok=no])
- else
- dnl see if the pkgconfig module is available
- PKG_CHECK_MODULES(USB, ${libusb_name}, [
- libusbok=yes
+ case "$host_os" in
+ cygwin* | mingw*)
+ USB_INCLUDEDIR=
+ USB_INCLUDES=
+ USB_LIBS=-lusb
usb_header='usb.h'
usb_lib_func='usb_bulk_write'
- ], [libusbok=no])
- fi
+ libusbok=yes
+ ;;
+ *)
+ dnl start checks
+ AC_MSG_NOTICE([Checking for LIBUSB version '${libusb_name}'])
+ if test ${libusb_name} = "libusb-1.0"; then
+ dnl see if the pkgconfig module is available
+ PKG_CHECK_MODULES(USB, ${libusb_name}, [
+ libusbok=yes
+ have_libusb1=yes
+ usb_header='libusb-1.0/libusb.h'
+ usb_lib_func='libusb_bulk_transfer'
+ ], [libusbok=no])
+ else
+ dnl see if the pkgconfig module is available
+ PKG_CHECK_MODULES(USB, ${libusb_name}, [
+ libusbok=yes
+ usb_header='usb.h'
+ usb_lib_func='usb_bulk_write'
+ ], [libusbok=no])
+ fi
+ ;;
+ esac
if test $libusbok = yes; then
- dnl PKGCONFIG found a version of LIBUSB.
+ dnl PKGCONFIG found a version of LIBUSB, or the info was
+ dnl provided by the user, or the OS is Windows.
+
dnl Check it to make sure it meets enough criteria:
dnl Verify that $usb_header is a valid header. If so, then
dnl verify that $usb_lib_func can be found in the library
dnl $usb_lib_name. if so, verify that the symbol 'usb_debug' is
- dnl found in the library.
+ dnl found in the library if not using Windows.
dnl Check for the header. Similar to AC_CHECK_HEADERS,
dnl but doesn't append to known \#defines.
@@ -135,28 +164,43 @@ AC_DEFUN([USRP_LIBUSB], [
if test $libusbok = yes; then
if test ${libusb_name} != "libusb-1.0"; then
dnl PKGCONFIG found a legacy version of libusb; make sure the
- dnl variable _usb_debug is available in the found library
- AC_LANG_PUSH(C)
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$USB_INCLUDES"
- save_LIBS="$LIBS"
- LIBS="$USB_LIBS"
- AC_MSG_CHECKING([$libusb_name for symbol usb_debug in library $usb_lib_name])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- extern int usb_debug;]],
- [[usb_debug = 0;]])],
- [libusbok=yes],[libusbok=no])
- AC_MSG_RESULT([$libusbok])
- LIBS="$save_LIBS"
- CPPFLAGS="$save_CPPFLAGS"
- AC_LANG_POP(C)
+ dnl variable _usb_debug is available in the found library.
+ dnl Do not test on Windows, since that symbol is not defined.
+ case "$host_os" in
+ cygwin* | mingw*)
+ ;;
+ *)
+ AC_LANG_PUSH(C)
+ save_CPPFLAGS="$CPPFLAGS"
+ if test x$USB_INCLUDEDIR != x; then
+ CPPFLAGS="$USB_INCLUDES"
+ fi
+ save_LIBS="$LIBS"
+ LIBS="$USB_LIBS"
+ AC_MSG_CHECKING([$libusb_name for symbol usb_debug in library $usb_lib_name])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ extern int usb_debug;]],
+ [[usb_debug = 0;]])],
+ [libusbok=yes],[libusbok=no])
+ AC_MSG_RESULT([$libusbok])
+ LIBS="$save_LIBS"
+ CPPFLAGS="$save_CPPFLAGS"
+ AC_LANG_POP(C)
+ ;;
+ esac
fi
fi
fi
fi
dnl if everything checks out OK, finish up
if test $libusbok = yes; then
- LIBUSB_PKG_CONFIG_NAME="${libusb_name}"
+ case "$host_os" in
+ cygwin* | mingw*)
+ ;;
+ *)
+ LIBUSB_PKG_CONFIG_NAME="${libusb_name}"
+ ;;
+ esac
break
else
dnl something wasn't found in this LIBUSB version.
@@ -173,7 +217,9 @@ AC_DEFUN([USRP_LIBUSB], [
dnl final error checking, mostly to create #define's
AC_LANG_PUSH(C)
save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$USB_INCLUDES"
+ if test x$USB_INCLUDEDIR != x; then
+ CPPFLAGS="$USB_INCLUDES"
+ fi
dnl Check for the header.
AC_CHECK_HEADERS([$usb_header], [], [libusbok=no])
CPPFLAGS="$save_CPPFLAGS"
@@ -185,18 +231,20 @@ AC_DEFUN([USRP_LIBUSB], [
dnl check for the library (again)
AC_LANG_PUSH(C)
save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$USB_INCLUDES"
+ if test x$USB_INCLUDEDIR != x; then
+ CPPFLAGS="$USB_INCLUDES"
+ fi
save_LIBS="$LIBS"
LIBS="$USB_LIBS"
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
+# case "$host_os" in
+# cygwin* | mingw*)
+# USB_LIBS="$LIBS"
+# ;;
+# *) ;;
+# esac
LIBS="$save_LIBS"
CPPFLAGS="$save_CPPFLAGS"
AC_LANG_POP(C)