]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/configure
Fixed building on Cygwin.
[pciutils.git] / lib / configure
index 4f17cdc48e9e7165cc2875ce459d2680c4430c5b..5e4d97fb9b1af34de79d941ef3582b67b3a61f30 100755 (executable)
@@ -38,11 +38,12 @@ if [ -z "$HOST" ] ; then
        fi
        HOST=${3:-$cpu-$sys}
 fi
        fi
        HOST=${3:-$cpu-$sys}
 fi
+[ -n "$RELEASE" ] && rel="${RELEASE}"
 # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
 # 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/'`
 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
 
 c=config.h
 m=config.mk
@@ -63,7 +64,7 @@ case $sys in
                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
                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
                                                echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
                                                ;;
                esac
@@ -71,7 +72,7 @@ case $sys in
                ;;
        sunos)
                case $cpu in
                ;;
        sunos)
                case $cpu in
-                               i386)           echo_n " i386-ports"
+                               i?86)           echo_n " i386-ports"
                                                echo >>$c "#define PCI_HAVE_PM_INTEL_CONF"
                                                ;;
                                *)
                                                echo >>$c "#define PCI_HAVE_PM_INTEL_CONF"
                                                ;;
                                *)
@@ -115,7 +116,7 @@ case $sys in
        cygwin)
                echo_n " i386-ports"
                echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
        cygwin)
                echo_n " i386-ports"
                echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
-               echo >>$m 'LDLIBS+=-lioperm'
+               echo >>$m 'WITH_LIBS+=-lioperm'
                ;;
         *)
                echo " Unfortunately, your OS is not supported by the PCI Library"
                ;;
         *)
                echo " Unfortunately, your OS is not supported by the PCI Library"