]> mj.ucw.cz Git - pciutils.git/commitdiff
configure: Support cross-building for GNU/kFreeBSD
authorGuillem Jover <guillem@hadrons.org>
Wed, 16 Sep 2020 01:10:48 +0000 (03:10 +0200)
committerGuillem Jover <guillem@hadrons.org>
Wed, 16 Sep 2020 01:15:43 +0000 (03:15 +0200)
We need to set a sys variable matching what would be found in the GNU
triplet for the GNU/kFreeBSD architecture, otherwise the later code will
not match correctly.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
lib/configure

index 08b94624b9425a2f52c252de0c368f997b7dd982..6fa8fcf75fe65d8dedda6e553c9812acf31c8f1a 100755 (executable)
@@ -27,10 +27,14 @@ if [ -z "$HOST" ] ; then
        else
                cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`
        fi
-       if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ]
+       if [ "$sys" = "DragonFly" ]
        then
                sys=freebsd
        fi
+       if [ "$sys" = "GNU/kFreeBSD" ]
+       then
+               sys=kfreebsd
+       fi
        if [ "$sys" = "CYGWIN_NT-5.1" -o "$sys" = "CYGWIN_NT-6.0" ]
        then
                sys=cygwin
@@ -82,11 +86,11 @@ case $sys in
                esac
                echo >>$c '#define PCI_HAVE_STDINT_H'
                ;;
-       freebsd*)
+       freebsd*|kfreebsd*)
                echo_n " fbsd-device"
                echo >>$c '#define PCI_HAVE_PM_FBSD_DEVICE'
                echo >>$c '#define PCI_PATH_FBSD_DEVICE "/dev/pci"'
-               if [ "$realsys" != "GNU/kFreeBSD" ] ; then
+               if [ "$sys" != "kfreebsd" ] ; then
                        LIBRESOLV=
                fi
                ;;