X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fconfigure;h=08b94624b9425a2f52c252de0c368f997b7dd982;hb=8b122188dfd404984eb360e8d876682fe7eb1613;hp=7890c4c71a6e5b2ec9a010acaf50aa8d9393dde2;hpb=4e35117cdba1a10f68ec9d88c5de6a0a39a11006;p=pciutils.git diff --git a/lib/configure b/lib/configure index 7890c4c..08b9462 100755 --- a/lib/configure +++ b/lib/configure @@ -6,12 +6,7 @@ LC_ALL=C export LC_ALL echo_n() { - if [ -n "$BASH" ] - then - echo -n "$*" - else - echo "$*\c" - fi + printf '%s' "$*" } if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then @@ -44,7 +39,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" @@ -121,11 +116,17 @@ case $sys in echo_n " nbsd-libpci" echo >>$c '#define PCI_HAVE_PM_NBSD_LIBPCI' echo >>$c '#define PCI_PATH_NBSD_DEVICE "/dev/pci0"' + echo >>$c '#define PCI_HAVE_64BIT_ADDRESS' echo >>$m 'LIBNAME=libpciutils' echo >>$m 'WITH_LIBS+=-lpci' LIBRESOLV= ;; - gnu) + gnu) + echo_n " hurd i386-ports" + echo >>$c '#define PCI_HAVE_PM_HURD_CONF' + echo >>$c '#define PCI_HAVE_PM_INTEL_CONF' + ;; + djgpp) echo_n " i386-ports" echo >>$c '#define PCI_HAVE_PM_INTEL_CONF' ;; @@ -142,6 +143,13 @@ case $sys in esac echo >>$c '#define PCI_HAVE_STDINT_H' ;; + sylixos) + echo >>$c '#define PCI_PATH_SYLIXOS_DEVICE "/proc/pci"' + echo >>$c '#define PCI_HAVE_64BIT_ADDRESS' + echo >>$c '#define PCI_HAVE_PM_SYLIXOS_DEVICE' + IDSDIR="/etc/pci" + LIBRESOLV= + ;; *) echo " Unfortunately, your OS is not supported by the PCI Library" exit 1 @@ -222,6 +230,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)"