summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in46
1 files changed, 28 insertions, 18 deletions
diff --git a/configure.in b/configure.in
index e8aa021e..2394c456 100644
--- a/configure.in
+++ b/configure.in
@@ -7,7 +7,7 @@ dnl Process this file with autoconf to produce a configure script.
#
AC_PREREQ(2.59c)
-AC_INIT(hal, 0.5.14, david@fubar.dk)
+AC_INIT(hal, 0.5.15, david@fubar.dk)
AM_INIT_AUTOMAKE([gnu 1.9])
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -479,9 +479,6 @@ 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)]),
@@ -510,21 +507,34 @@ AM_CONDITIONAL(HALD_COMPILE_FREEBSD, [test x$HALD_BACKEND = xfreebsd], [Compilin
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"
+ AC_SEARCH_LIBS([clock_gettime], [rt])
+ LIBUFS_LIBS=""
+ AC_CHECK_HEADERS([libufs.h],
+ [AC_CHECK_LIB([libufs], [ufs_disk_fillout], [USE_LIBUFS="yes"], [], [])])
+ if test "x$USE_LIBUFS" = "xyes"; then
+ AC_DEFINE(HAVE_LIBUFS, 1, [Set if we have libufs])
+ LIBUFS_LIBS="-lufs"
+ AC_SUBST(LIBUFS_LIBS)
+ fi
+ USE_BSDLIBUSB20=no
+ USE_BSDLIBUSB=no
+ LIBUSB20_LIBS=""
+ AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_BSDLIBUSB20=yes], [USE_BSDLIBUSB20=no])
+ if test "x$USE_BSDLIBUSB20" = "xno"; then
+ AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_BSDLIBUSB=yes], [USE_BSDLIBUSB=no])
+ fi
+ AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_BSDLIBUSB20" = "xyes" -o "x$USE_BSDLIBUSB" = "xyes"])
+ if test "x$USE_BSDLIBUSB20" = "xyes"; then
+ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20])
+ LIBUSB20_LIBS="-lusb20"
+ elif test "x$USE_BSDLIBUSB" = "xyes"; then
+ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20])
+ LIBUSB20_LIBS="-lusb"
+ fi
+ AC_SUBST(LIBUSB20_LIBS)
+else
+ AM_CONDITIONAL([HAVE_LIBUSB20], [false])
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])