~ubuntu-branches/ubuntu/trusty/gnuradio/trusty

« back to all changes in this revision

Viewing changes to config/usrp_fusb_tech.m4

  • Committer: Bazaar Package Importer
  • Author(s): Kamal Mostafa
  • Date: 2010-03-13 07:46:01 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100313074601-zjsa893a87bozyh7
Tags: 3.2.2.dfsg-1ubuntu1
* Fix build for Ubuntu lucid (LP: #260406)
  - add binary package dep for libusrp0, libusrp2-0: adduser
  - debian/rules clean: remove pre-built Qt moc files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl
2
 
dnl Copyright 2003 Free Software Foundation, Inc.
 
2
dnl Copyright 2003,2008 Free Software Foundation, Inc.
3
3
dnl 
4
4
dnl This file is part of GNU Radio
5
5
dnl 
19
19
dnl Boston, MA 02110-1301, USA.
20
20
dnl 
21
21
 
 
22
# $1 is $enable_usrp:
 
23
#   yes : do these tests
 
24
#   no  : do not do these tests
 
25
#   ""  : do these tests
 
26
 
22
27
AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
23
 
  AC_ARG_WITH(fusb-tech,
24
 
        [  --with-fusb-tech=OS     set fast usb technique (auto)],
25
 
                [cf_with_fusb_tech="$withval"],
26
 
                [cf_with_fusb_tech="$host_os"])
27
 
        
28
 
 
29
 
  AC_CHECK_HEADER([linux/usbdevice_fs.h],
30
 
        [x_have_usbdevice_fs_h=yes],
31
 
        [x_have_usbdevice_fs_h=no])
32
 
 
33
 
  AC_MSG_CHECKING([for fast usb technique to use])
34
 
  case "$cf_with_fusb_tech" in
35
 
    linux*)     if test x${x_have_usbdevice_fs_h} = xyes;
36
 
                then
37
 
                  FUSB_TECH=linux
38
 
                else
39
 
                  FUSB_TECH=generic
40
 
                fi                      ;;
41
 
 
42
 
    darwin*)    FUSB_TECH=darwin        ;;
43
 
    cygwin*|win*|mingw*)        FUSB_TECH=win32         ;;
44
 
    *bsd*)
45
 
                AC_MSG_CHECKING([for RA/WB])
46
 
                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]],
47
 
                                                   [[struct usb_bulk_ra_wb_opt o;
48
 
                                                     ioctl(0, USB_SET_BULK_RA, &o);]])],
49
 
                                  [FUSB_TECH=ra_wb],
50
 
                                  [FUSB_TECH=generic])          ;;
51
 
    *)          FUSB_TECH=generic       ;;
52
 
  esac  
53
 
 
54
 
  AC_MSG_RESULT($FUSB_TECH)
55
 
  AC_SUBST(FUSB_TECH)
56
 
 
57
 
  AM_CONDITIONAL(FUSB_TECH_darwin,   test $FUSB_TECH = darwin)
58
 
  AM_CONDITIONAL(FUSB_TECH_win32,    test $FUSB_TECH = win32)
59
 
  AM_CONDITIONAL(FUSB_TECH_generic,  test $FUSB_TECH = generic)
60
 
  AM_CONDITIONAL(FUSB_TECH_linux,    test $FUSB_TECH = linux)
61
 
  AM_CONDITIONAL(FUSB_TECH_ra_wb,    test $FUSB_TECH = ra_wb)
 
28
  AC_ARG_WITH([fusb-tech],
 
29
              AC_HELP_STRING([--with-fusb-tech=OS],
 
30
                             [Set fast USB technique (default=auto)]),
 
31
              [cf_with_fusb_tech="$withval"],
 
32
              [cf_with_fusb_tech="$host_os"])
 
33
  if test [x]$1 != xno; then
 
34
      case "$cf_with_fusb_tech" in
 
35
        linux*)
 
36
          AC_CHECK_HEADER([linux/usbdevice_fs.h],
 
37
                          [x_have_usbdevice_fs_h=yes],
 
38
                          [x_have_usbdevice_fs_h=no])
 
39
          if test x${x_have_usbdevice_fs_h} = xyes; then
 
40
              FUSB_TECH=linux
 
41
          else
 
42
              FUSB_TECH=generic
 
43
          fi
 
44
          ;;
 
45
        darwin*)
 
46
          FUSB_TECH=darwin
 
47
          ;;
 
48
        cygwin*|win*|mingw*)
 
49
          FUSB_TECH=win32
 
50
          ;;
 
51
        *bsd*)
 
52
          AC_MSG_CHECKING([for RA/WB])
 
53
          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]],
 
54
                                             [[struct usb_bulk_ra_wb_opt o;
 
55
                                               ioctl(0, USB_SET_BULK_RA, &o);]])],
 
56
                            [FUSB_TECH=ra_wb],
 
57
                            [FUSB_TECH=generic])
 
58
          ;;
 
59
        *)
 
60
          FUSB_TECH=generic
 
61
          ;;
 
62
      esac
 
63
 
 
64
      AC_MSG_CHECKING([for fast usb technique to use])
 
65
      AC_MSG_RESULT($FUSB_TECH)
 
66
      AC_SUBST(FUSB_TECH)
 
67
  fi
 
68
 
 
69
  AM_CONDITIONAL(FUSB_TECH_darwin,   test x$FUSB_TECH = xdarwin)
 
70
  AM_CONDITIONAL(FUSB_TECH_win32,    test x$FUSB_TECH = xwin32)
 
71
  AM_CONDITIONAL(FUSB_TECH_generic,  test x$FUSB_TECH = xgeneric)
 
72
  AM_CONDITIONAL(FUSB_TECH_linux,    test x$FUSB_TECH = xlinux)
 
73
  AM_CONDITIONAL(FUSB_TECH_ra_wb,    test x$FUSB_TECH = xra_wb)
62
74
])
63