From 92995a8d6fd3d19a8b01bfb2616c0ac494d199b9 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 16 Sep 2020 03:10:48 +0200 Subject: [PATCH] configure: Support cross-building for GNU/kFreeBSD 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 --- lib/configure | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/configure b/lib/configure index 08b9462..6fa8fcf 100755 --- a/lib/configure +++ b/lib/configure @@ -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 ;; -- 2.39.2