diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2009-08-18 12:56:16 -0400 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2009-08-18 12:56:16 -0400 |
commit | 40893583b27eb45c93204d6d3769a39c23c1af7d (patch) | |
tree | d0d9ecef51dd9279aff0e3835026ba00beead2c8 /configure.in | |
parent | 64c6ff319640e2420a533ca40d8f2b0622c4b0b0 (diff) |
add USB2 support to the FreeBSD backend
Add support for the new USB framework found in FreeBSD -CURRENT.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 890bba3e..e8aa021e 100644 --- a/configure.in +++ b/configure.in @@ -479,6 +479,9 @@ if test "x$with_libpci" != xno ; then fi AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"]) +USE_LIBUSB20=no +USE_LIBUSB=no +LIBUSB20_LIBS="" AC_ARG_WITH([backend], AS_HELP_STRING([--with-backend=<name>], [backend to use (linux/solaris/freebsd/dummy)]), @@ -506,6 +509,22 @@ AM_CONDITIONAL(HALD_COMPILE_LINUX, [test x$HALD_BACKEND = xlinux], [Compiling fo AM_CONDITIONAL(HALD_COMPILE_FREEBSD, [test x$HALD_BACKEND = xfreebsd], [Compiling for FreeBSD]) AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris]) AC_SUBST(HALD_BACKEND) +if test "x$HALD_BACKEND" = "xfreebsd"; then + AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no]) +fi +if test "x$USE_LIBUSB20" = "xno"; then + AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_LIBUSB=yes], [USE_LIBUSB=no]) +fi +AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB20" = "xyes"]) +AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB" = "xyes"]) +if test "x$USE_LIBUSB20" = "xyes"; then + AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20]) + LIBUSB20_LIBS="-lusb20" +elif test "x$USE_LIBUSB" = "xyes"; then + AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20]) + LIBUSB20_LIBS="-lusb" +fi +AC_SUBST(LIBUSB20_LIBS) dnl DBUS API is subject to changes AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change]) |