summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2014-11-02 11:10:45 +0100
committerMartin Mares <mj@ucw.cz>2014-11-02 11:10:45 +0100
commitbca6bbaf496f45ce3a3eea8ae2153ef73009b6b8 (patch)
tree31097f1924749693296e3e55fe47c36f99917239
parent69a77b5c2d78f6c789955c32e2d090153f992b39 (diff)
downloadpciutils-bca6bbaf496f45ce3a3eea8ae2153ef73009b6b8.tar.gz
Configure: HWDB is specific for Linux
-rw-r--r--Makefile3
-rwxr-xr-xlib/configure34
2 files changed, 20 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index 9589ea3..bcc3b1a 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,9 @@ SHARED=no
# Use libkmod to resolve kernel modules on Linux (yes/no, default: detect)
LIBKMOD=
+# Use libudev to resolve device names using hwdb on Linux (yes/no, default: detect)
+HWDB=
+
# ABI version suffix in the name of the shared library
# (as we use proper symbol versioning, this seldom needs changing)
ABI_VERSION=.3
diff --git a/lib/configure b/lib/configure
index 95d52ab..3783f57 100755
--- a/lib/configure
+++ b/lib/configure
@@ -152,23 +152,6 @@ echo >>$m "LIBEXT="$LIBEXT
echo >>$c '#define PCI_HAVE_PM_DUMP'
echo " dump"
-echo_n "Checking for udev hwdb support... "
-if [ "$HWDB" = yes -o "$HWDB" = no ] ; then
- echo "$HWDB (set manually)"
-else
- if `pkg-config --atleast-version=196 libudev` ; then
- HWDB=yes
- else
- HWDB=no
- fi
- echo "$HWDB (auto-detected)"
-fi
-if [ "$HWDB" = yes ] ; then
- echo >>$c '#define PCI_HAVE_HWDB'
- echo >>$m 'LIBUDEV=-ludev'
- echo >>$m 'WITH_LIBS+=$(LIBUDEV)'
-fi
-
echo_n "Checking for zlib support... "
if [ "$ZLIB" = yes -o "$ZLIB" = no ] ; then
echo "$ZLIB (set manually)"
@@ -239,6 +222,23 @@ if [ "$sys" = linux ] ; then
echo >>$m "LIBKMOD_CFLAGS=$($PKG_CONFIG --cflags libkmod)"
echo >>$m "LIBKMOD_LIBS=$($PKG_CONFIG --libs libkmod)"
fi
+
+ echo_n "Checking for udev hwdb support... "
+ if [ "$HWDB" = yes -o "$HWDB" = no ] ; then
+ echo "$HWDB (set manually)"
+ else
+ if `which pkg-config >/dev/null && pkg-config --atleast-version=196 libudev` ; then
+ HWDB=yes
+ else
+ HWDB=no
+ fi
+ echo "$HWDB (auto-detected)"
+ fi
+ if [ "$HWDB" = yes ] ; then
+ echo >>$c '#define PCI_HAVE_HWDB'
+ echo >>$m 'LIBUDEV=-ludev'
+ echo >>$m 'WITH_LIBS+=$(LIBUDEV)'
+ fi
fi
echo "Checking whether to build a shared library... $SHARED (set manually)"