X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fconfigure;h=7d4cec85fd2ca8d8838ed2d1ba5f7c5a0a93c1af;hb=c4cf2d1c17594d333ccd819212756e3afb8b9924;hp=a647d336b091a9f3795ac961a1198907b632d69c;hpb=8d1cb3d74a34971d89602ccd6fc03cf3ab72003a;p=pciutils.git diff --git a/lib/configure b/lib/configure index a647d33..7d4cec8 100755 --- a/lib/configure +++ b/lib/configure @@ -44,7 +44,7 @@ if [ -z "$HOST" ] ; then fi [ -n "$RELEASE" ] && rel="${RELEASE}" # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless. -host=`echo $HOST | sed -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\3/' -e 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'` +host=`echo $HOST | sed -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\3/' -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\2/' -e 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'` cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo " $host $rel $cpu $sys" @@ -103,7 +103,7 @@ case $sys in ;; darwin*) - echo_n " darwin-device" + echo_n " darwin" echo >>$c '#define PCI_HAVE_PM_DARWIN_DEVICE' echo >>$m 'WITH_LIBS+=-lresolv -framework CoreFoundation -framework IOKit' echo >>$c '#define PCI_HAVE_64BIT_ADDRESS' @@ -222,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)"