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"
;;
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'
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)"