- darwin*) FUSB_TECH=darwin ;;
- cygwin*|win*|mingw*) FUSB_TECH=win32 ;;
- *bsd*)
- AC_MSG_CHECKING([for RA/WB])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]],
- [[struct usb_bulk_ra_wb_opt o;
- ioctl(0, USB_SET_BULK_RA, &o);]])],
- [FUSB_TECH=ra_wb],
- [FUSB_TECH=generic]) ;;
- *) FUSB_TECH=generic ;;
- esac
+AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
+ AC_ARG_WITH([fusb-tech],
+ AC_HELP_STRING([--with-fusb-tech=OS],
+ [Set fast USB technique (default=auto)]),
+ [cf_with_fusb_tech="$withval"],
+ [cf_with_fusb_tech="$host_os"])
+ if test [x]$1 != xno; then
+ case "$cf_with_fusb_tech" in
+ linux*)
+ AC_CHECK_HEADER([linux/usbdevice_fs.h],
+ [x_have_usbdevice_fs_h=yes],
+ [x_have_usbdevice_fs_h=no])
+ if test x${x_have_usbdevice_fs_h} = xyes; then
+ FUSB_TECH=linux
+ else
+ FUSB_TECH=generic
+ fi
+ ;;
+ darwin*)
+ FUSB_TECH=darwin
+ ;;
+ cygwin*|win*|mingw*)
+ FUSB_TECH=win32
+ ;;
+ *bsd*)
+ AC_MSG_CHECKING([for RA/WB])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]],
+ [[struct usb_bulk_ra_wb_opt o;
+ ioctl(0, USB_SET_BULK_RA, &o);]])],
+ [FUSB_TECH=ra_wb],
+ [FUSB_TECH=generic])
+ ;;
+ *)
+ FUSB_TECH=generic
+ ;;
+ esac