From 284e9c1e1fe208f880d8f21946bc8f0c4c061221 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sun, 15 Mar 2009 18:32:16 -0400 Subject: usb-db: make optional, but enabled by default Fedora 9, for example, doesn't have libudev, but can use the modem prober. --- Makefile.am | 7 +++++-- configure.ac | 10 +++++++--- 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]) -- cgit