Permalink
Browse files

Merge pull request #8 from Flameeyes/master

Allow disabling usb.ids (and script) install.
  • Loading branch information...
2 parents a492ca4 + 2c594ff commit d8c5ecf39372f5af7a3fd058e2125297bbc04117 @gregkh committed Apr 10, 2012
Showing with 16 additions and 5 deletions.
  1. +12 −5 Makefile.am
  2. +4 −0 configure.ac
View
@@ -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' $< >$@
View
@@ -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])

0 comments on commit d8c5ecf

Please sign in to comment.