diff options
author | ttsou | 2009-09-10 17:29:04 -0400 |
---|---|---|
committer | ttsou | 2009-09-16 17:08:52 -0400 |
commit | 433432fed1e79ca93763eec2d9186744e08d5ad1 (patch) | |
tree | dc609a8305c006ad2623fc80005883ca82571474 | |
parent | 265484bfaaaab4f83c43a53c9e0fd307e205e5c4 (diff) | |
download | gnuradio-433432fed1e79ca93763eec2d9186744e08d5ad1.tar.gz gnuradio-433432fed1e79ca93763eec2d9186744e08d5ad1.tar.bz2 gnuradio-433432fed1e79ca93763eec2d9186744e08d5ad1.zip |
Re-added non pkgconfig support for libusb
-rw-r--r-- | config/usrp_libusb.m4 | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/config/usrp_libusb.m4 b/config/usrp_libusb.m4 index e00e1e6c4..107144e33 100644 --- a/config/usrp_libusb.m4 +++ b/config/usrp_libusb.m4 @@ -25,11 +25,41 @@ dnl Boston, MA 02110-1301, USA. AC_DEFUN([USRP_LIBUSB], [ libusbok=yes - + have_libusb1=no if test [x]$1 = xyes; then - PKG_CHECK_MODULES(USB, libusb-1.0, [have_libusb1=yes], [libusbok=no]) + 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], [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 + ]) else - PKG_CHECK_MODULES(USB, libusb, [have_libusb1=no], [libusbok=no]) + PKG_CHECK_MODULES(USB, libusb, [], [ + AC_LANG_PUSH(C) + + AC_CHECK_HEADERS([usb.h], [], + [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb.h not found. See http://www.libusb.org])]) + + 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://www.libusb.org])]) + + LIBS="$save_LIBS" + + AC_LANG_POP + ]) fi if test x$libusbok = xyes; then |