# Host OS and release (override if you are cross-compiling)
HOST=
RELEASE=
+CROSS_COMPILE=
# Support for compressed pci.ids (yes/no, default: detect)
ZLIB=
INSTALL=install
DIRINSTALL=install -d
STRIP=-s
-AR=ar
-RANLIB=ranlib
+CC=$(CROSS_COMPILE)gcc
+AR=$(CROSS_COMPILE)ar
+RANLIB=$(CROSS_COMPILE)ranlib
# Base name of the library (overriden on NetBSD, which has its own libpci)
LIBNAME=libpci
fi
HOST=${3:-$cpu-$sys}
fi
+[ -n "$RELEASE" ] && rel="${RELEASE}"
# CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
-host=`echo $HOST | sed 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'`
+host=`echo $HOST | sed -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\3/' -e 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'`
cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo " $host $rel"
+echo " $host $rel $cpu $sys"
c=config.h
m=config.mk
echo >>$c '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
echo >>$c '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
case $cpu in
- i386|x86_64) echo_n " i386-ports"
+ i?86|x86_64) echo_n " i386-ports"
echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
;;
esac
;;
sunos)
case $cpu in
- i386) echo_n " i386-ports"
+ i?86) echo_n " i386-ports"
echo >>$c "#define PCI_HAVE_PM_INTEL_CONF"
;;
*)