Permalink
Browse files

build-sys: properly enable support for zlib in lsusb

Define HAVE_LIBZ to enable the code and append -lz to the linking line.

Cc: Gabor Z. Papp <gzp@papp.hu>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information...
1 parent 1506bde commit 7170260942c403a1c6e8359e085e48cf4a14668c @Flameeyes Flameeyes committed with Mar 21, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 Makefile.am
View
@@ -6,9 +6,6 @@ AM_LDFLAGS = \
data_DATA = \
usb.ids
-if HAVE_ZLIB
-data_DATA += usb.ids.gz
-endif
bin_PROGRAMS = \
lsusb
@@ -35,6 +32,12 @@ lsusb_CPPFLAGS = \
lsusb_LDADD = \
$(LIBUSB_LIBS)
+if HAVE_ZLIB
+data_DATA += usb.ids.gz
+lsusb_CPPFLAGS += -DHAVE_LIBZ
+lsusb_LDADD += -lz
+endif
+
man_MANS = \
lsusb.8 \
usb-devices.1

0 comments on commit 7170260

Please sign in to comment.