| 3 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 |
| 4 |
# Free Software Foundation, Inc. |
# Free Software Foundation, Inc. |
| 5 |
|
|
| 6 |
version='2000-11-08' |
timestamp='2000-12-07' |
| 7 |
|
|
| 8 |
# This file is free software; you can redistribute it and/or modify it |
# This file is free software; you can redistribute it and/or modify it |
| 9 |
# under the terms of the GNU General Public License as published by |
# under the terms of the GNU General Public License as published by |
| 32 |
# exits with 0. Otherwise, it exits with 1. |
# exits with 0. Otherwise, it exits with 1. |
| 33 |
# |
# |
| 34 |
# The plan is that this can be called by configure scripts if you |
# The plan is that this can be called by configure scripts if you |
| 35 |
# don't specify an explicit system type (host/target name). |
# don't specify an explicit build system type. |
| 36 |
# |
# |
| 37 |
# Only a few systems have been added to this list; please add others |
# Only a few systems have been added to this list; please add others |
| 38 |
# (but try to keep the structure clean). |
# (but try to keep the structure clean). |
| 43 |
usage="\ |
usage="\ |
| 44 |
Usage: $0 [OPTION] |
Usage: $0 [OPTION] |
| 45 |
|
|
| 46 |
Output the configuration name of this system. |
Output the configuration name of the system \`$me' is run on. |
| 47 |
|
|
| 48 |
Operation modes: |
Operation modes: |
| 49 |
-h, --help print this help, then exit |
-h, --help print this help, then exit |
| 50 |
-V, --version print version number, then exit" |
-t, --time-stamp print date of last modification, then exit |
| 51 |
|
-v, --version print version number, then exit |
| 52 |
|
|
| 53 |
|
Report bugs and patches to <config-patches@gnu.org>." |
| 54 |
|
|
| 55 |
|
version="\ |
| 56 |
|
GNU config.guess ($timestamp) |
| 57 |
|
|
| 58 |
|
Originally written by Per Bothner. |
| 59 |
|
Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 |
| 60 |
|
Free Software Foundation, Inc. |
| 61 |
|
|
| 62 |
|
This is free software; see the source for copying conditions. There is NO |
| 63 |
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| 64 |
|
|
| 65 |
help=" |
help=" |
| 66 |
Try \`$me --help' for more information." |
Try \`$me --help' for more information." |
| 67 |
|
|
| 68 |
# Parse command line |
# Parse command line |
| 69 |
while test $# -gt 0 ; do |
while test $# -gt 0 ; do |
| 70 |
case "$1" in |
case $1 in |
| 71 |
--version | --vers* | -V ) |
--time-stamp | --time* | -t ) |
| 72 |
|
echo "$timestamp" ; exit 0 ;; |
| 73 |
|
--version | -v ) |
| 74 |
echo "$version" ; exit 0 ;; |
echo "$version" ; exit 0 ;; |
| 75 |
--help | --h* | -h ) |
--help | --h* | -h ) |
| 76 |
echo "$usage"; exit 0 ;; |
echo "$usage"; exit 0 ;; |
| 79 |
- ) # Use stdin as input. |
- ) # Use stdin as input. |
| 80 |
break ;; |
break ;; |
| 81 |
-* ) |
-* ) |
| 82 |
exec >&2 |
echo "$me: invalid option $1$help" >&2 |
|
echo "$me: invalid option $1" |
|
|
echo "$help" |
|
| 83 |
exit 1 ;; |
exit 1 ;; |
| 84 |
* ) |
* ) |
| 85 |
break ;; |
break ;; |
| 91 |
exit 1 |
exit 1 |
| 92 |
fi |
fi |
| 93 |
|
|
| 94 |
# Use $HOST_CC if defined. $CC may point to a cross-compiler |
|
| 95 |
if test x"$CC_FOR_BUILD" = x; then |
dummy=dummy-$$ |
| 96 |
if test x"$HOST_CC" != x; then |
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 |
| 97 |
CC_FOR_BUILD="$HOST_CC" |
|
| 98 |
else |
# CC_FOR_BUILD -- compiler used by this script. |
| 99 |
if test x"$CC" != x; then |
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still |
| 100 |
CC_FOR_BUILD="$CC" |
# use `HOST_CC' if defined, but it is deprecated. |
| 101 |
else |
|
| 102 |
CC_FOR_BUILD=cc |
case $CC_FOR_BUILD,$HOST_CC,$CC in |
| 103 |
fi |
,,) echo "int dummy(){}" > $dummy.c |
| 104 |
|
for c in cc gcc c89 ; do |
| 105 |
|
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 |
| 106 |
|
if test $? = 0 ; then |
| 107 |
|
CC_FOR_BUILD="$c"; break |
| 108 |
fi |
fi |
| 109 |
|
done |
| 110 |
|
rm -f $dummy.c $dummy.o |
| 111 |
|
if test x"$CC_FOR_BUILD" = x ; then |
| 112 |
|
CC_FOR_BUILD=no_compiler_found |
| 113 |
fi |
fi |
| 114 |
|
;; |
| 115 |
|
,,*) CC_FOR_BUILD=$CC ;; |
| 116 |
|
,*,*) CC_FOR_BUILD=$HOST_CC ;; |
| 117 |
|
esac |
| 118 |
|
|
| 119 |
# This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
# This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
| 120 |
# (ghazi@noc.rutgers.edu 8/24/94.) |
# (ghazi@noc.rutgers.edu 8/24/94.) |
| 127 |
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
| 128 |
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
| 129 |
|
|
|
dummy=dummy-$$ |
|
|
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 |
|
|
|
|
| 130 |
# Note: order is significant - the case branches are not exclusive. |
# Note: order is significant - the case branches are not exclusive. |
| 131 |
|
|
| 132 |
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
| 150 |
ibmrt|romp-ibm) machine=romp-ibm ;; |
ibmrt|romp-ibm) machine=romp-ibm ;; |
| 151 |
*) machine=${UNAME_MACHINE}-unknown ;; |
*) machine=${UNAME_MACHINE}-unknown ;; |
| 152 |
esac |
esac |
| 153 |
# The Operating System including object format. |
# The Operating System including object format, if it has switched |
| 154 |
|
# to ELF recently, or will in the future. |
| 155 |
|
case "${UNAME_MACHINE}" in |
| 156 |
|
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) |
| 157 |
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 158 |
| grep __ELF__ >/dev/null |
| grep __ELF__ >/dev/null |
| 159 |
then |
then |
| 163 |
else |
else |
| 164 |
os=netbsdelf |
os=netbsdelf |
| 165 |
fi |
fi |
| 166 |
|
;; |
| 167 |
|
*) |
| 168 |
|
os=netbsd |
| 169 |
|
;; |
| 170 |
|
esac |
| 171 |
# The OS release |
# The OS release |
| 172 |
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
| 173 |
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
| 524 |
echo m68k-hp-bsd4.4 |
echo m68k-hp-bsd4.4 |
| 525 |
exit 0 ;; |
exit 0 ;; |
| 526 |
9000/[34678]??:HP-UX:*:*) |
9000/[34678]??:HP-UX:*:*) |
| 527 |
|
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
| 528 |
case "${UNAME_MACHINE}" in |
case "${UNAME_MACHINE}" in |
| 529 |
9000/31? ) HP_ARCH=m68000 ;; |
9000/31? ) HP_ARCH=m68000 ;; |
| 530 |
9000/[34]?? ) HP_ARCH=m68k ;; |
9000/[34]?? ) HP_ARCH=m68k ;; |
| 531 |
9000/[678][0-9][0-9]) |
9000/[678][0-9][0-9]) |
| 532 |
|
case "${HPUX_REV}" in |
| 533 |
|
11.[0-9][0-9]) |
| 534 |
|
if [ -x /usr/bin/getconf ]; then |
| 535 |
|
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
| 536 |
|
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
| 537 |
|
case "${sc_cpu_version}" in |
| 538 |
|
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
| 539 |
|
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 |
| 540 |
|
532) # CPU_PA_RISC2_0 |
| 541 |
|
case "${sc_kernel_bits}" in |
| 542 |
|
32) HP_ARCH="hppa2.0n" ;; |
| 543 |
|
64) HP_ARCH="hppa2.0w" ;; |
| 544 |
|
esac ;; |
| 545 |
|
esac |
| 546 |
|
fi ;; |
| 547 |
|
esac |
| 548 |
|
if [ "${HP_ARCH}" = "" ]; then |
| 549 |
sed 's/^ //' << EOF >$dummy.c |
sed 's/^ //' << EOF >$dummy.c |
| 550 |
|
|
| 551 |
#define _HPUX_SOURCE |
#define _HPUX_SOURCE |
| 580 |
} |
} |
| 581 |
EOF |
EOF |
| 582 |
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` |
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` |
| 583 |
|
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi |
| 584 |
rm -f $dummy.c $dummy |
rm -f $dummy.c $dummy |
| 585 |
|
fi ;; |
| 586 |
esac |
esac |
|
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
|
| 587 |
echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
| 588 |
exit 0 ;; |
exit 0 ;; |
| 589 |
3050*:HI-UX:*:*) |
3050*:HI-UX:*:*) |
| 676 |
CRAY*TS:*:*:*) |
CRAY*TS:*:*:*) |
| 677 |
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
| 678 |
exit 0 ;; |
exit 0 ;; |
| 679 |
CRAY*T3E:*:*:*) |
CRAY*T3D:*:*:*) |
| 680 |
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
| 681 |
exit 0 ;; |
exit 0 ;; |
| 682 |
|
CRAY*T3E:*:*:*) |
| 683 |
|
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
| 684 |
|
exit 0 ;; |
| 685 |
CRAY*SV1:*:*:*) |
CRAY*SV1:*:*:*) |
| 686 |
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
| 687 |
exit 0 ;; |
exit 0 ;; |
| 1175 |
fi |
fi |
| 1176 |
echo ${UNAME_MACHINE}-unknown-plan9 |
echo ${UNAME_MACHINE}-unknown-plan9 |
| 1177 |
exit 0 ;; |
exit 0 ;; |
| 1178 |
|
i?86:OS/2:*:*) |
| 1179 |
|
# If we were able to find `uname', then EMX Unix compatibility |
| 1180 |
|
# is probably installed. |
| 1181 |
|
echo ${UNAME_MACHINE}-pc-os2-emx |
| 1182 |
|
exit 0 ;; |
| 1183 |
esac |
esac |
| 1184 |
|
|
| 1185 |
#echo '(No uname command or uname output not recognized.)' 1>&2 |
#echo '(No uname command or uname output not recognized.)' 1>&2 |
| 1359 |
|
|
| 1360 |
# Local variables: |
# Local variables: |
| 1361 |
# eval: (add-hook 'write-file-hooks 'time-stamp) |
# eval: (add-hook 'write-file-hooks 'time-stamp) |
| 1362 |
# time-stamp-start: "version='" |
# time-stamp-start: "timestamp='" |
| 1363 |
# time-stamp-format: "%:y-%02m-%02d" |
# time-stamp-format: "%:y-%02m-%02d" |
| 1364 |
# time-stamp-end: "'" |
# time-stamp-end: "'" |
| 1365 |
# End: |
# End: |