7ed5abb
diff -up pciutils-2.2.10/lib/configure.multilib pciutils-2.2.10/lib/configure
7ed5abb
--- pciutils-2.2.10/lib/configure.multilib	2008-02-11 21:04:18.000000000 +0100
7ed5abb
+++ pciutils-2.2.10/lib/configure	2008-02-20 11:04:18.000000000 +0100
7ed5abb
@@ -37,74 +37,60 @@ zlib=$5
8944082
 
8944082
 c=config.h
8944082
 m=config.mk
f08976c
-echo >$c "#define PCI_ARCH_`echo $cpu | tr '[a-z]' '[A-Z]'`"
f08976c
-echo >>$c "#define PCI_OS_`echo $sys | tr '[a-z]' '[A-Z]'`"
8944082
-rm -f $m
7ed5abb
 
7ed5abb
+cm=config.h.mk
8944082
+cat >$c <
8944082
+#if defined(__x86_64__)
8944082
+#define PCI_ARCH_X86_64
8944082
+#elif defined(__ia64__)
8944082
+#define PCI_ARCH_IA64
8944082
+#elif defined(__i386__)
8944082
+#define PCI_ARCH_I386
8944082
+#define PCI_HAVE_PM_INTEL_CONF
8944082
+#elif defined(__ppc64__) || defined(__powerpc64__)
8944082
+#define PCI_ARCH_PPC64
8944082
+#elif defined(__ppc__)  || defined(__powerpc__)
8944082
+#define PCI_ARCH_PPC
8944082
+#elif defined(__s390x__)
8944082
+#define PCI_ARCH_S390X
8944082
+#elif defined(__s390__)
8944082
+#define PCI_ARCH_S390
45ab104
+#elif defined(__alpha__)
45ab104
+#define PCI_ARCH_ALPHA
8944082
+#else
8944082
+#error Unknown Arch
8944082
+#endif
8944082
+#define PCI_OS_LINUX
8944082
+#define PCI_HAVE_PM_LINUX_SYSFS
8944082
+#define PCI_HAVE_PM_LINUX_PROC
8944082
+#define PCI_HAVE_LINUX_BYTEORDER_H
8944082
+#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"
8944082
+#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"
8944082
+#define PCI_HAVE_64BIT_ADDRESS
8944082
+EOF
8944082
+
8944082
+rm -f $cm
8944082
+echo >$cm "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
8944082
+echo >>$cm "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
7ed5abb
+  
8944082
 echo_n "Looking for access methods..."
7ed5abb
-
8944082
-case $sys in
8944082
-	linux*)
8944082
-		echo_n " sysfs proc"
8944082
-		echo >>$c '#define PCI_HAVE_PM_LINUX_SYSFS'
8944082
-		echo >>$c '#define PCI_HAVE_PM_LINUX_PROC'
8944082
-		echo >>$c '#define PCI_HAVE_LINUX_BYTEORDER_H'
8944082
-		echo >>$c '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
8944082
-		echo >>$c '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
8944082
-		case $cpu in
8944082
-				i386)		echo_n " i386-ports"
8944082
-						echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
8944082
-						;;
8944082
-		esac
8944082
-		echo >>$c '#define PCI_HAVE_64BIT_ADDRESS'
8944082
-		;;
8944082
-	sunos)
8944082
-		case $cpu in
8944082
-				i386)		echo_n " i386-ports"
8944082
-						echo >>$c "#define PCI_HAVE_PM_INTEL_CONF"
8944082
-						;;
8944082
-				*)
7ed5abb
-						echo " The PCI library does not support Solaris for this architecture: $cpu"
8944082
-						exit 1
8944082
-						;;
8944082
-		esac
f08976c
-		echo >>$c '#define PCI_HAVE_STDINT_H'
8944082
-		;;
8944082
-	freebsd)
8944082
-		echo_n " fbsd-device"
8944082
-		echo >>$c '#define PCI_HAVE_PM_FBSD_DEVICE'
8944082
-		echo >>$c '#define PCI_PATH_FBSD_DEVICE "/dev/pci"'
8944082
-		;;
8944082
-        openbsd)
8944082
-	        echo_n " obsd-device"
8944082
-		echo >>$c '#define PCI_HAVE_PM_OBSD_DEVICE'
8944082
-		echo >>$c '#define PCI_PATH_OBSD_DEVICE "/dev/pci"'
8944082
-		;;
8944082
-	aix)
8944082
-		echo_n " aix-device"
8944082
-		echo >>$c '#define PCI_HAVE_PM_AIX_DEVICE'
8944082
-		echo >>$m 'CFLAGS=-g'
8944082
-		echo >>$m 'INSTALL=installbsd'
8944082
-		echo >>$m 'DIRINSTALL=mkdir -p'
8944082
-		;;
8944082
-	netbsd)
8944082
-		echo_n " nbsd-libpci"
8944082
-		echo >>$c '#define PCI_HAVE_PM_NBSD_LIBPCI'
8944082
-		echo >>$c '#define PCI_PATH_NBSD_DEVICE "/dev/pci0"'
8944082
-		echo >>$m 'PCILIB=lib/libpciutils.a'
8dfa7ea
-		echo >>$m 'LDLIBS+=-lpci'
8944082
-		;;
8944082
-    	gnu)
8944082
-		echo_n " i386-ports"
8944082
-		echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
8944082
-		;;
8944082
-        *)
8944082
-		echo " Unfortunately, your OS is not supported by the PCI Library"
8944082
-		exit 1
8944082
-		;;
7ed5abb
+echo_n " sysfs proc"
7ed5abb
+  
8944082
+echo >>$cm '#define PCI_HAVE_PM_LINUX_SYSFS'
8944082
+echo >>$cm '#define PCI_HAVE_PM_LINUX_PROC'
8944082
+echo >>$cm '#define PCI_HAVE_LINUX_BYTEORDER_H'
8944082
+echo >>$cm '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
8944082
+echo >>$cm '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
8944082
+case $cpu in
8944082
+	i386)		echo_n " i386-ports"
8944082
+	        echo >>$cm '#define PCI_HAVE_PM_INTEL_CONF'
8944082
+        ;;
8944082
 esac
7ed5abb
 
8944082
+echo >>$cm '#define PCI_HAVE_64BIT_ADDRESS'
8944082
+
8944082
 echo >>$c '#define PCI_HAVE_PM_DUMP'
8944082
+echo >>$cm '#define PCI_HAVE_PM_DUMP'
8944082
 echo " dump"
8944082
 
8944082
 echo_n "Checking for zlib support... "
7ed5abb
@@ -127,6 +113,8 @@ else
8944082
 	echo >>$c '#define PCI_IDS "pci.ids"'
8944082
 fi
8944082
 echo >>$c "#define PCI_PATH_IDS_DIR \"$idsdir\""
8944082
-
8944082
 echo >>$c "#define PCILIB_VERSION \"$version\""
8944082
-sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$c >>$m
8944082
+echo >>$cm "#define PCI_PATH_IDS_DIR \"$idsdir\""
8944082
+echo >>$cm "#define PCILIB_VERSION \"$version\""
8944082
+#sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$c >>$m
8944082
+sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$cm >>$m