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>
This commit is contained in:
Diego Elio Pettenò 2011-03-21 16:41:41 +01:00 committed by Greg Kroah-Hartman
parent 1506bdecd5
commit 7170260942

View File

@ -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