diff options
author | Greg Kroah-Hartman <greg@kroah.com> | 2012-04-10 15:53:46 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <greg@kroah.com> | 2012-04-10 15:53:46 -0700 |
commit | d8c5ecf39372f5af7a3fd058e2125297bbc04117 (patch) | |
tree | 8cf15cdeb25e1b8bd0c06adb73c902aa001d6793 | |
parent | a492ca466b290ecb6bdfaa0891abcb51e5905481 (diff) | |
parent | 2c594ff47011a18e34ac7e3d4ffbca3298f632cb (diff) | |
download | usbutils-d8c5ecf39372f5af7a3fd058e2125297bbc04117.tar.gz |
Merge pull request #8 from Flameeyes/master
Allow disabling usb.ids (and script) install.
-rw-r--r-- | Makefile.am | 17 | ||||
-rw-r--r-- | configure.ac | 4 |
2 files changed, 16 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am index 527672f..4e53e45 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,14 +4,12 @@ SUBDIRS = \ AM_LDFLAGS = \ -Wl,--as-needed -data_DATA = \ - usb.ids +data_DATA = bin_PROGRAMS = \ lsusb -sbin_SCRIPTS = \ - update-usbids.sh +sbin_SCRIPTS = bin_SCRIPTS = \ usb-devices \ @@ -33,7 +31,6 @@ lsusb_LDADD = \ $(LIBUSB_LIBS) if HAVE_ZLIB -data_DATA += usb.ids.gz lsusb_CPPFLAGS += -DHAVE_LIBZ lsusb_LDADD += -lz endif @@ -51,12 +48,22 @@ EXTRA_DIST = \ lsusb.py \ usbutils.pc.in +if INSTALL_USBIDS +data_DATA += usb.ids + +if HAVE_ZLIB +data_DATA += usb.ids.gz +endif + +sbin_SCRIPTS += update-usbids.sh + usb.ids.gz: $(srcdir)/usb.ids gzip -c -9 $< > $@ update-usbids.sh: $(srcdir)/update-usbids.sh.in sed 's|@usbids@|$(datadir)/usb.ids|g' $< >$@ chmod 755 $@ +endif lsusb.8: $(srcdir)/lsusb.8.in sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@ diff --git a/configure.ac b/configure.ac index 5039439..e21683d 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,10 @@ AS_IF([test "x$enable_zlib" != "xno"], [AC_CHECK_LIB(z, inflateEnd, HAVE_ZLIB=yes)]) AM_CONDITIONAL(HAVE_ZLIB, [test "$HAVE_ZLIB" = "yes"]) +AC_ARG_ENABLE(usbids, + AS_HELP_STRING(--disable-usbids, [disable installing usb.ids @<:@default=install@:>@])) +AM_CONDITIONAL([INSTALL_USBIDS], [test "x$enable_usbids" != "xno"]) + PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0) AC_CONFIG_HEADERS([config.h]) |