summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Dickens <mdickens@nd.edu>2010-11-01 15:57:52 -0400
committerTom Rondeau <trondeau@vt.edu>2010-11-23 23:56:30 -0500
commit67782265f5c9d5e29eb4921d14114346e80bfa81 (patch)
tree8e8f6ba742aab88a619ec128f3457e6eae94fc73
parent9922d3553e4e3ec6d55cfe8b7aab9323f649247f (diff)
Tweak LIBUSB m4 script to not check for 'usb_debug' symbol on Windows, because the symbol does not exist for that platform (only, it seems)
-rw-r--r--config/usrp_libusb.m437
1 files changed, 22 insertions, 15 deletions
diff --git a/config/usrp_libusb.m4 b/config/usrp_libusb.m4
index a434d379dd..e4f567ce4d 100644
--- a/config/usrp_libusb.m4
+++ b/config/usrp_libusb.m4
@@ -135,21 +135,28 @@ 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"
+ 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)
+ ;;
+ esac
fi
fi
fi