]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/configure
libresolv is not available on BSD systems, but they have resolver in libc.
[pciutils.git] / lib / configure
index 0a0a944b88842fa2aa60f5af40454ecff1719c0e..bec5f864a06809870d1a10ae5a597dc65af2d18d 100755 (executable)
@@ -47,6 +47,7 @@ echo >>$c "#define PCI_OS_`echo $sys | tr '[a-z]' '[A-Z]'`"
 echo >$m 'WITH_LIBS='
 
 echo_n "Looking for access methods..."
+LIBRESOLV=-lresolv
 
 case $sys in
        linux*)
@@ -62,7 +63,6 @@ case $sys in
                                                ;;
                esac
                echo >>$c '#define PCI_HAVE_64BIT_ADDRESS'
-               echo >>$c '#define PCI_USE_DNS'
                ;;
        sunos)
                case $cpu in
@@ -80,11 +80,13 @@ case $sys in
                echo_n " fbsd-device"
                echo >>$c '#define PCI_HAVE_PM_FBSD_DEVICE'
                echo >>$c '#define PCI_PATH_FBSD_DEVICE "/dev/pci"'
+               LIBRESOLV=
                ;;
         openbsd)
                echo_n " obsd-device"
                echo >>$c '#define PCI_HAVE_PM_OBSD_DEVICE'
                echo >>$c '#define PCI_PATH_OBSD_DEVICE "/dev/pci"'
+               LIBRESOLV=
                ;;
        aix)
                echo_n " aix-device"
@@ -99,6 +101,7 @@ case $sys in
                echo >>$c '#define PCI_PATH_NBSD_DEVICE "/dev/pci0"'
                echo >>$m 'LIBNAME=libpciutils'
                echo >>$m 'WITH_LIBS+=-lpci'
+               LIBRESOLV=
                ;;
        gnu)
                echo_n " i386-ports"
@@ -147,8 +150,8 @@ else
 fi
 if [ "$DNS" = yes ] ; then
        echo >>$c "#define PCI_USE_DNS"
-       echo >>$c "#define PCI_ID_DOMAIN \"pci-id.ucw.cz\""
-       echo >>$m 'WITH_LIBS+=-lresolv'
+       echo >>$c "#define PCI_ID_DOMAIN \"pci.id.ucw.cz\""
+       echo >>$m "WITH_LIBS+=$LIBRESOLV"
 fi
 
 echo "Checking whether to build a shared library... $SHARED (set manually)"