?RCS: $Id: Oldconfig.U,v 3.0.1.10 1997/02/28 15:06:39 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: $Log: Oldconfig.U,v $
sh awk sed test cat rm lns tr n c contains Loc Options Tr src trnl ln
?MAKE: -pick wipe $@ %<
?S:myuname:
-?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix,
-?S: pseudo variables assignments in the output are stripped, thank you. The
-?S: whole thing is then lower-cased.
+?S: The output of 'uname -a' if available, otherwise the hostname.
+?S: The whole thing is then lower-cased and slashes and single quotes are
+?S: removed.
?S:.
?S:hint:
?S: Gives the type of hints used for previous answers. May be one of
?LINT:extern hostarch
?LINT:change hostarch
?LINT:use run
+?LINT:extern is_os2
: Try to determine whether config.sh was made on this system
case "$config_sh" in
'')
?X: Now not using a subshell but instead $test.
myuname=`$uname -a 2>/dev/null`
$test -z "$myuname" && myuname=`hostname 2>/dev/null`
-?X: Special mention for Xenix, whose 'uname -a' gives us output like this:
-?X: sysname=XENIX
-?X: nodename=whatever
-?X: release=2.3.2 .. etc...
-?X: Therefore, we strip all this variable assignment junk and remove all the
-?X: new lines to keep the myuname variable sane... --RAM
+# Downcase everything to avoid ambiguity.
+# Remove slashes and single quotes so we can use parts of this in
+# directory and file names.
+# Remove newlines so myuname is sane to use elsewhere.
# tr '[A-Z]' '[a-z]' would not work in EBCDIC
# because the A-Z/a-z are not consecutive.
-myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
+myuname=`echo $myuname | $sed -e "s,['/],,g" | \
./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
?X: Save the value we just computed to reset myuname after we get done here.
newmyuname="$myuname"
osname=uwin &&
osvers="$5"
-?X: If we have uname, we already computed a suitable uname -a output, correctly
-?X: formatted for Xenix, and it lies in $myuname.
+?X: If we have uname, we already computed a suitable uname -a output,
+?X: and it lies in $myuname.
if $test -f $uname; then
set X $myuname
shift
?X: $3 and $4 are version/subversion
?X: $5 is always "pc", but that might not be unique to DJGPP.
?X: (e.g. Solaris_x86 has $5 = i86pc, which doesn't actually conflict,
-?X: but it's close enought that I can easily imagine other vendors also
+?X: but it's close enough that I can easily imagine other vendors also
?X: using variants of pc* in $5.)
?X: The "DJGPP" environment variable is always set when djgpp is active.
pc*)
case "$1" in
aix) osname=aix
?X: aix 4.1 uname -a output looks like
-?X: AIX foo 1 4 000123456789
+?X: AIX foo 1 4 000123456789
?X: where $4 is the major release number and $3 is the (minor) version.
?X: More detail on the version is available with the oslevel command.
?X: in 3.2.x, it output a string (see case statements below). In 4.1,
?X: it puts out something like 4.1.1.0
tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
case "$tmp" in
- 'not found') osvers="$4"."$3" ;;
+ # oslevel can fail with:
+ # oslevel: Unable to acquire lock.
+ *not\ found) osvers="$4"."$3" ;;
'<3240'|'<>3240') osvers=3.2.0 ;;
'=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
'=3250'|'>3250') osvers=3.2.5 ;;
domainos) osname=apollo
osvers="$3"
;;
- dgux) osname=dgux
+ dgux) osname=dgux
+ osvers="$3"
+ ;;
+ dragonfly) osname=dragonfly
osvers="$3"
;;
?X: uname -a returns
dynixptx*) osname=dynixptx
osvers=`echo "$4"|sed 's/^v//'`
;;
- freebsd) osname=freebsd
+ freebsd) osname=freebsd
+ osvers="$3" ;;
+ genix) osname=genix ;;
+?X: GNU/Hurd uname -a gives something like:
+?X: GNU foo 0.3 GNU-Mach 1.4/Hurd-0.3 i386-AT386 GNU
+?X: GNU gnu 0.3 GNUmach-1.2/Hurd-0.3 i386-AT386 GNU
+?X: Note the hostname on the second one, which will fool Configure
+?X: into using the SysV case!
+ gnu) osname=gnu
osvers="$3" ;;
- genix) osname=genix ;;
?X: HP-UX uname -a gives something like
?X: HP-UX foobar B.10.20 A 9000/735 2016483812 two-user license
?X: Preserve the full 10.20 string instead of the previous plain '10'.
?X: Thanks to Graham Barr. --AD 6/30/1998
- hp*) osname=hpux
+ hp*) osname=hpux
osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
;;
- irix*) osname=irix
+ irix*) osname=irix
case "$3" in
4*) osvers=4 ;;
5*) osvers=5 ;;
*) osvers="$3" ;;
esac
;;
- linux) osname=linux
+ linux) osname=linux
case "$3" in
*) osvers="$3" ;;
esac
;;
- MiNT) osname=mint
+ MiNT) osname=mint
;;
netbsd*) osname=netbsd
osvers="$3"
openbsd) osname=openbsd
osvers="$3"
;;
+ os2) osname=os2
+ osvers="$4"
+ ;;
POSIX-BC | posix-bc ) osname=posix-bc
osvers="$3"
;;
?X: where the version number can be something like [xvt]n.n
osname=dec_osf
?X: sizer knows the minor minor version: the letter
- osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
+ osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
case "$osvers" in
[1-9].[0-9]*) ;;
*) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
?X: hp and mips were unsupported Technology Releases -- ADO, 24/10/94
esac
;;
- unixware) osname=svr5
+ # UnixWare 7.1.2 is known as Open UNIX 8
+ openunix|unixware) osname=svr5
osvers="$4"
;;
uts) osname=uts
*freebsd*) ;;
svr*)
: svr4.x or possibly later
- case "svr$3" in
+ case "svr$3" in
${osname}*)
osname=svr$3
osvers=$4
fi
$rm -f UU/kernel.what
?X: Maybe it's OS/2 or DOS or something similar
- elif test -d c:/.; then
+ elif test -d c:/. -o -n "$is_os2" ; then
set X $myuname
osname=os2
osvers="$5"
fi
fi
-
+
case "$targetarch" in
'') ;;
*) hostarch=$osname
$cat <<EOM
You may give one or more space-separated answers, or "none" if appropriate.
-A well-behaved OS will have no hints, so answering "none" or just "Policy"
-is a good thing. DO NOT give a wrong version or a wrong OS.
+If you have a handcrafted Policy.sh file or a Policy.sh file generated by a
+previous run of Configure, you may specify it as well as or instead of
+OS-specific hints. If hints are provided for your OS, you should use them:
+although Perl can probably be built without hints on many platforms, using
+hints often improve performance and may enable features that Configure can't
+set up on its own. If there are no hints that match your OS, specify "none";
+DO NOT give a wrong version or a wrong OS.
EOM