diff options
author | Kel Modderman <kel@otaku42.de> | 2008-07-08 13:09:52 +0200 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2008-07-08 13:22:23 +0200 |
commit | 45015ab30b36bdaefd3f3aeab73d287023928826 (patch) | |
tree | 71f7b423eb4d6df26487b256c0fc3b608263d6e6 /configure.ac | |
parent | 32c64bb2386c55d5c7a3878ae9e3f95577f00875 (diff) |
Handle compressed pci.ids
Add an option to build with zlib support so we can find
vendor/device information if the pci.ids file is gzipped.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9293b4a..67b18f4 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,19 @@ AC_ARG_WITH(pciids-path, [PCIIDS_PATH="$DEFAULT_PCIIDS_PATH"]) AC_DEFINE_DIR(PCIIDS_PATH, PCIIDS_PATH, [Path to pci.ids]) +AC_ARG_WITH(zlib, + AS_HELP_STRING([--with-zlib], [Enable zlib support to read gzip compressed pci.ids]), + [use_zlib="yes"], + [use_zlib="no"]) +if test "x$use_zlib" = xyes; then + AC_CHECK_LIB(z, gzopen, + [PCIACCESS_LIBS="$PCIACCESS_LIBS -lz"], + [AC_MSG_ERROR(Check for zlib library failed)]) + AC_CHECK_HEADER([zlib.h], + [AC_DEFINE(HAVE_ZLIB, 1, [Use zlib to read gzip compressed pci.ids])], + [AC_MSG_ERROR(Check for zlib.h header file failed)]) +fi + if test "x$GCC" = "xyes"; then GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" |