summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-03-15 18:32:16 -0400
committerDan Williams <dcbw@redhat.com>2009-03-15 18:32:16 -0400
commit284e9c1e1fe208f880d8f21946bc8f0c4c061221 (patch)
tree2388588eed1bfad0cf0112768bfd0e4bcd60a54f
parent895cc5d054738dacfdd7d9428bb265e9e5fc5fc9 (diff)
usb-db: make optional, but enabled by default
Fedora 9, for example, doesn't have libudev, but can use the modem prober.
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac10
2 files changed, 12 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 0233ee7..7243d3c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,8 +3,11 @@ include $(top_srcdir)/Makefile.am.inc
SUBDIRS = \
rules.d \
modem-modeswitch \
- udev-acl \
- usb-db
+ udev-acl
+
+if WITH_USB_DB
+SUBDIRS += usb-db
+endif
ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index 56ea4e2..48d6a2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,9 +29,13 @@ PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12)
AC_SUBST(LIBUSB_CFLAGS)
AC_SUBST(LIBUSB_LIBS)
-PKG_CHECK_MODULES(LIBUDEV, libudev)
-AC_SUBST(LIBUDEV_CFLAGS)
-AC_SUBST(LIBUDEV_LIBS)
+AC_ARG_WITH(usb-db, AC_HELP_STRING([--with-usb-db], [Build modem prober]),[],[with_usb_db=yes])
+AM_CONDITIONAL(WITH_USB_DB, test "x$with_usb_db" = "xyes")
+if test "x$with_usb_db" = "xyes"; then
+ PKG_CHECK_MODULES(LIBUDEV, libudev)
+ AC_SUBST(LIBUDEV_CFLAGS)
+ AC_SUBST(LIBUDEV_LIBS)
+fi
AC_PATH_PROG([XSLTPROC], [xsltproc])