usrp: Applied patch from Don Ward for Cygwin libusb
authorDon Ward <don2387ward@sprynet.com>
Mon, 12 Oct 2009 21:58:32 +0000 (17:58 -0400)
committerThomas Tsou <ttsou@vt.edu>
Mon, 12 Oct 2009 21:58:32 +0000 (17:58 -0400)
Moved the case statement after the call to AC_CHECK_LIB
Initialized LIBS="" before calling AC_CHECK_LIB

config/usrp_libusb.m4 [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 4347bfb..6ed7f5e
@@ -90,17 +90,20 @@ AC_DEFUN([USRP_LIBUSB], [
 
       AC_LANG_PUSH(C)
       save_LIBS="$LIBS"
+      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
         darwin*)
           USB_LIBS="$USB_LIBS -lIOKit"
           ;;
+        cygwin* | mingw*)
+          USB_LIBS="$LIBS"
+          ;;
         *) ;;
       esac
-      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])
-      ])
       LIBS="$save_LIBS"
       AC_LANG_POP(C)
     fi