summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2006-08-25 22:35:20 +0000
committerrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2006-08-25 22:35:20 +0000
commit0dac0f1e19c3f7dbc7ae8167f5d4041c5e07bd09 (patch)
treeb8c4cc5e4a4cd660688f9d33a36209a17fab4b64 /Configure
parent0b4cdb836f13414250fd2cbdb8d398f981e4b704 (diff)
This starts the dist-3.5 baseline.
git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@11 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure1692
1 files changed, 1219 insertions, 473 deletions
diff --git a/Configure b/Configure
index e8906f2..fc94aef 100755
--- a/Configure
+++ b/Configure
@@ -13,12 +13,12 @@
#
# Note: this Configure script was generated automatically. Rather than
# working with this copy of Configure, you may wish to get metaconfig.
-# The dist package (which contains metaconfig) is available at
-# http://sourceforge.net/projects/dist/
+# The dist package (which contains metaconfig) is available via SVN:
+# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
-# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp ram $
+# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
-# Generated on Sun Feb 8 21:03:36 MET 2004 [metaconfig 3.0 PL70]
+# Generated on Sat Aug 26 00:34:34 MEST 2006 [metaconfig 3.5 PL0]
cat >c1$$ <<EOF
ARGGGHHHH!!!!!
@@ -170,11 +170,13 @@ targetarch=''
to=''
usecrosscompile=''
d_bsd=''
+d_dos=''
d_eunice=''
d_linux=''
+d_os2=''
d_xenix=''
+_exe=''
eunicefix=''
-Mcc=''
ar=''
awk=''
bash=''
@@ -259,12 +261,18 @@ Revision=''
Source=''
State=''
_a=''
-_exe=''
_o=''
archobjs=''
firstmakefile=''
afs=''
+afsroot=''
baserev=''
+ccflags=''
+cppflags=''
+ldflags=''
+lkflags=''
+locincpth=''
+optimize=''
cf_email=''
cf_by=''
cf_time=''
@@ -276,9 +284,16 @@ cpprun=''
cppstdin=''
d_portable=''
defeditor=''
+gccosandvers=''
+gccversion=''
install=''
installdir=''
issymlink=''
+glibpth=''
+libpth=''
+loclibpth=''
+plibpth=''
+xlibpth=''
lns=''
mailer=''
make_set_make=''
@@ -286,7 +301,6 @@ installmansrc=''
manext=''
mansrc=''
mansrcexp=''
-mkdep=''
mydomain=''
myhostname=''
phostname=''
@@ -305,6 +319,7 @@ spackage=''
pager=''
patchlevel=''
perlpath=''
+pkgsrc=''
prefix=''
prefixexp=''
installprivlib=''
@@ -322,6 +337,9 @@ startperl=''
startsh=''
sysman=''
trnl=''
+incpath=''
+mips_type=''
+usrinc=''
CONFIG=''
: Initialize wide constants
@@ -352,18 +370,42 @@ elif test -n "$DJGPP"; then
elif test -d c:/. ; then
: OS/2 or cygwin
_exe=".exe"
+else
+ : All other UNIX systems
+ _exe=""
fi
ccname=''
ccversion=''
-: No trailing extension on UNIX executables
-_exe=''
: Extra object files, if any, needed on this platform.
archobjs=''
bin='/usr/local/bin'
cc='cc'
-cppflags=''
-usrinc='/usr/include'
+: Possible local include directories to search.
+: Set locincpth to "" in a hint file to defeat local include searches.
+locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
+locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+:
+: no include file wanted by default
+inclwanted=''
+
+: change the next line if compiling for Xenix/286 on Xenix/386
+xlibpth='/usr/lib/386 /lib/386'
+: Possible local library directories to search.
+loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
+loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+
+: general looking path for locating libraries
+glibpth="/lib /usr/lib $xlibpth"
+glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
+test -f /shlib/libc.so && glibpth="/shlib $glibpth"
+
+: Private path used by Configure to find libraries. Its value
+: is prepended to libpth. This variable takes care of special
+: machines, like the mips. Usually, it should be empty.
+plibpth=''
+
: Find the basic shell for Bourne shell scripts
case "$sh" in
'')
@@ -383,10 +425,13 @@ case "$sh" in
done
for xxx in $try; do
if test -f "$xxx"; then
- sh="$xxx";
+ sh="$xxx"
+ break
+ elif test -f "$xxx$_exe"; then
+ sh="$xxx"
break
elif test -f "$xxx.exe"; then
- sh="$xxx";
+ sh="$xxx"
break
fi
done
@@ -395,7 +440,7 @@ case "$sh" in
esac
case "$sh" in
-'') cat <<EOM >&2
+'') cat >&2 <<EOM
$me: Fatal Error: I can't find a Bourne Shell anywhere.
Usually it's in /bin/sh. How did you even get this far?
@@ -424,17 +469,17 @@ if `$sh -c '#' >/dev/null 2>&1`; then
exit 1
fi
fi
- echo "#!$xcat" >try
- $eunicefix try
- chmod +x try
- ./try > today 2>/dev/null
+ echo "#!$xcat" >sharp
+ $eunicefix sharp
+ chmod +x sharp
+ ./sharp > today 2>/dev/null
if test -s today; then
sharpbang='#!'
else
- echo "#! $xcat" > try
- $eunicefix try
- chmod +x try
- ./try > today 2>/dev/null
+ echo "#! $xcat" > sharp
+ $eunicefix sharp
+ chmod +x sharp
+ ./sharp > today 2>/dev/null
if test -s today; then
sharpbang='#! '
else
@@ -454,33 +499,33 @@ else
echo "I presume that if # doesn't work, #! won't work either!"
sharpbang=': use '
fi
-rm -f try today
+rm -f sharp today
: figure out how to guarantee sh startup
case "$startsh" in
'') startsh=${sharpbang}${sh} ;;
*)
esac
-cat >try <<EOSS
+cat >sharp <<EOSS
$startsh
set abc
test "$?abc" != 1
EOSS
-chmod +x try
-$eunicefix try
-if ./try; then
+chmod +x sharp
+$eunicefix sharp
+if ./sharp; then
: echo "Yup, it does."
else
echo "Hmm... '$startsh' does not guarantee sh startup..."
echo "You may have to fix up the shell scripts to make sure $sh runs them."
fi
-rm -f try
+rm -f sharp
: Save command line options in file UU/cmdline.opt for later use in
: generating config.sh.
cat > cmdline.opt <<EOSH
-# Configure command line arguments.
+: Configure command line arguments.
config_arg0='$0'
config_args='$*'
config_argc=$#
@@ -492,7 +537,6 @@ for arg in "$@"; do
cat >>cmdline.opt <<EOSH
config_arg$argn='$arg'
EOSH
- # Extreme backslashitis: replace each ' by '"'"'
cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
$arg
EOC
@@ -501,8 +545,6 @@ EOC
argn=`expr $argn + 1`
args_sep=' '
done
-# args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
-# used by ./hints/os2.sh
rm -f cmdl.opt
: produce awk script to parse command line options
@@ -672,7 +714,7 @@ while test $# -gt 0; do
esac
shift
;;
- -V) echo "$me generated by metaconfig 3.0 PL70." >&2
+ -V) echo "$me generated by metaconfig 3.5 PL0." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
@@ -745,7 +787,7 @@ touch optdef.sh
touch posthint.sh
: set package name
-package=dist
+package='dist'
first=`echo $package | sed -e 's/^\(.\).*/\1/'`
last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
@@ -753,6 +795,29 @@ ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
esac
+: script used to emulate mkdir -p
+cat >mkdirp <<EOS
+$startsh
+EOS
+cat >>mkdirp <<'EOS'
+name=$1;
+create="";
+while test $name; do
+ if test ! -d "$name"; then
+ create="$name $create"
+ name=`echo $name | sed -e "s|^[^/]*$||"`
+ name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`
+ else
+ name=""
+ fi
+done
+for file in $create; do
+ mkdir $file
+done
+EOS
+chmod +x mkdirp
+$eunicefix mkdirp
+
: Some greps do not return status, grrr.
echo "grimblepritz" >grimble
if grep blurfldyick grimble >/dev/null 2>&1 ; then
@@ -777,19 +842,21 @@ esac
: Find the path to the source tree
case "$src" in
'') case "$0" in
- */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;;
- *) src='.';;
+ */*)
+ src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
+ ;;
+ *) src='.';;
esac;;
esac
case "$src" in
'') src=/
rsrc=/
;;
-/*) rsrc="$src";;
-*) rsrc="../$src";;
+/*) rsrc="$src";;
+*) rsrc="../$src";;
esac
if test -f $rsrc/Configure && \
- $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
+ $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
then
: found it, so we are ok.
else
@@ -840,22 +907,6 @@ esac
if test ! -f "$SRC/$1"; then
shift
fi
-mkdir_p='
-name=$1;
-create="";
-while test $name; do
- if test ! -d "$name"; then
- create="$name $create";
- name=`echo $name | sed -e "s|^[^/]*$||"`;
- name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
- else
- name="";
- fi;
-done;
-for file in $create; do
- mkdir $file;
-done
-'
for file in $*; do
case "$SRC" in
".")
@@ -875,7 +926,7 @@ for file in $*; do
*/*)
dir=`expr X$file : 'X\(.*\)/'`
file=`expr X$file : 'X.*/\(.*\)'`
- (set x $dir; shift; eval $mkdir_p)
+ ./mkdirp $dir
sh <"$SRC/$dir/$file"
;;
*)
@@ -887,8 +938,7 @@ for file in $*; do
done
if test -f "$SRC/config_h.SH"; then
if test ! -f config.h; then
- : oops, they left it out of MANIFEST, probably, so do it anyway.
- . "$SRC/config_h.SH"
+ sh <"$SRC/config_h.SH"
fi
fi
EOS
@@ -1185,7 +1235,7 @@ If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
the questions and use the computed defaults (or the previous answers if there
was already a config.sh file). Type 'Configure -h' for a list of options.
You may also start interactively and then answer '& -d' at any prompt to turn
-on the non-interactive behaviour for the remaining of the execution.
+on the non-interactive behaviour for the remainder of the execution.
EOH
. ./myread
@@ -1224,7 +1274,6 @@ if test \$# -gt 0; then
else
cat >msg
fi
-echo " "
echo "*** WARNING:" >&4
sed -e 's/^/*** /' <msg >&4
echo "*** " >&4
@@ -1302,6 +1351,7 @@ tr
uniq
"
trylist="
+Mcc
cpp
date
inews
@@ -1476,6 +1526,8 @@ case "$cc" in
*) $rm -f try try.*
$cat >try.c <<EOM
int main(int argc, char *argv[]) {
+ (void) argc;
+ (void) argv;
return 0;
}
EOM
@@ -1509,13 +1561,11 @@ EOM
fi
case "$ans" in
[yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
- if $test -f usethreads.cbu; then
- $cat >&4 <<EOM
-
-*** However, any setting of the C compiler flags (e.g. for thread support)
-*** has been lost. It may be necessary to pass -Dcc=gcc to Configure
-*** (together with any other cc-dependent option).
-
+ $cat *.cbu >checktmp 2>/dev/null
+ if $contains ccflags checktmp >/dev/null; then
+ ./warn <<EOM
+Any previous setting of the C compiler flags has been lost.
+It may be necessary to pass -Dcc=gcc to Configure right away.
EOM
fi;;
esac
@@ -1537,6 +1587,8 @@ case "$cc" in
*) $rm -f try try.*
$cat >try.c <<EOM
int main(int argc, char *argv[]) {
+ (void) argc;
+ (void) argv;
return 0;
}
EOM
@@ -1562,7 +1614,8 @@ EOSC
: determine whether symbolic links are supported
echo " "
$touch blurfl
-if $ln -s blurfl sym > /dev/null 2>&1 ; then
+$rm -f sym
+if $ln -s blurfl sym > /dev/null 2>&1 && $test -f sym; then
echo "Symbolic links are supported." >&4
lns="$ln -s"
else
@@ -1628,9 +1681,16 @@ case "$lns" in
;;
esac
+: define absolute package source directory
+case "$src" in
+/*) pkgsrc=$src;;
+*) pkgsrc=`cd $rsrc; pwd`;;
+esac
+
: Duplicate the tree with symbolic links if -Dmksymlinks was supplied
case "$mksymlinks" in
$define|true|[yY]*)
+ echo " "
case "$src" in
''|'.') echo "Cannot create symlinks in the original directory." >&4
exit 1
@@ -1643,16 +1703,17 @@ $define|true|[yY]*)
awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | \
sort -u | while true
do
- read directory
- test -z "$directory" && break
- if mkdir -p $directory 2>/dev/null && test -d $directory; then
+ read dir
+ test -z "$dir" && break
+ ./UU/mkdirp $dir 2>/dev/null
+ if test -d $dir; then
: ok
else
- echo "Failed to create '$directory'. Aborting." >&4
+ echo "Failed to create '$dir'. Aborting." >&4
exit 1
fi
done
- echo "(Then creating the symlinks...)" >&4
+ echo "(Now creating the symlinks...)" >&4
awk '{print $1}' $src/MANIFEST | while true; do
read filename
test -z "$filename" && break
@@ -1664,7 +1725,7 @@ $define|true|[yY]*)
if test -f $filename; then
echo "$filename already exists, not symlinking."
else
- ln -s $src/$filename $filename
+ ln -s $pkgsrc/$filename $filename
fi
done
echo "(Checking current directory...)" >&4
@@ -1678,7 +1739,6 @@ $define|true|[yY]*)
>/dev/null 2>>"$tmppwd/missing")
done
if test -s missing; then
- cat missing >&4
echo "Failed duplication of source tree. Aborting." >&4
exit 1
fi
@@ -1691,22 +1751,9 @@ $define|true|[yY]*)
;;
esac
-: setup for possible cross-compilation
-run=''
-to=:
-from=:
-usecrosscompile='undef'
-targetarch=''
-case "$usecrosscompile" in
-$define|true|[yY]*)
- echo "Cross-compilation is not supported for this package." >&4
- exit 1
- ;;
-esac
-
: see whether [:lower:] and [:upper:] are supported character classes
echo " "
-case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+case "`echo AbyZ | LC_ALL=C $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
ABYZ)
echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
up='[:upper:]'
@@ -1715,14 +1762,14 @@ ABYZ)
*) # There is a discontinuity in EBCDIC between 'I' and 'J'
# (0xc9 and 0xd1), therefore that is a nice testing point.
if test "X$up" = X -o "X$low" = X; then
- case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
+ case "`echo IJ | LC_ALL=C $tr '[I-J]' '[i-j]' 2>/dev/null`" in
ij) up='[A-Z]'
low='[a-z]'
;;
esac
fi
if test "X$up" = X -o "X$low" = X; then
- case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
+ case "`echo IJ | LC_ALL=C $tr I-J i-j 2>/dev/null`" in
ij) up='A-Z'
low='a-z'
;;
@@ -1733,14 +1780,15 @@ ABYZ)
*C9D1*|*c9d1*)
echo "Hey, this might be EBCDIC." >&4
if test "X$up" = X -o "X$low" = X; then
- case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
+ case "`echo IJ | \
+ LC_ALL=C $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
ij) up='[A-IJ-RS-Z]'
low='[a-ij-rs-z]'
;;
esac
fi
if test "X$up" = X -o "X$low" = X; then
- case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
+ case "`echo IJ | LC_ALL=C $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
ij) up='A-IJ-RS-Z'
low='a-ij-rs-z'
;;
@@ -1750,7 +1798,7 @@ ABYZ)
esac
fi
esac
-case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
+case "`echo IJ | LC_ALL=C $tr \"$up\" \"$low\" 2>/dev/null`" in
ij)
echo "Using $up and $low to convert case." >&4
;;
@@ -1764,28 +1812,309 @@ esac
cat >tr <<EOSC
$startsh
case "\$1\$2" in
-'[A-Z][a-z]') exec $tr '$up' '$low';;
-'[a-z][A-Z]') exec $tr '$low' '$up';;
+'[A-Z][a-z]') LC_ALL=C exec $tr '$up' '$low';;
+'[a-z][A-Z]') LC_ALL=C exec $tr '$low' '$up';;
esac
-exec $tr "\$@"
+LC_ALL=C exec $tr "\$@"
EOSC
chmod +x tr
$eunicefix tr
-: Try to determine whether config.sh was made on this system
-case "$config_sh" in
-'')
+: setup for possible cross-compilation
+run=''
+to=:
+from=:
+usecrosscompile='undef'
+targetarch=''
+case "$usecrosscompile" in
+$define|true|[yY]*)
+ echo "Cross-compilation is not supported for this package." >&4
+ exit 1
+ ;;
+esac
+
+: Determine the name of the machine
myuname=`$uname -a 2>/dev/null`
$test -z "$myuname" && myuname=`hostname 2>/dev/null`
myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
newmyuname="$myuname"
+$test -f "$uname$_exe" && has_uname=y
+
+: Guessing of the OS name -- half the following guesses are probably wrong...
+: If you have better tests or hints, please send them to the metaconfig
+: authors and to Raphael_Manfredi@grenoble.hp.com
+$test -f /irix && osname=irix
+$test -f /xenix && osname=sco_xenix
+$test -f /dynix && osname=dynix
+$test -f /dnix && osname=dnix
+$test -f /lynx.os && osname=lynxos
+$test -f /unicos && osname=unicos && osvers=`$uname -r`
+$test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
+$test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
+$test -f /bin/mips && /bin/mips && osname=mips
+$test -d /NextApps && set X `hostinfo | $grep 'NeXT Mach.*:' | \
+ $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
+$test -d /usr/apollo/bin && osname=apollo
+$test -f /etc/saf/_sactab && osname=svr4
+$test -d /usr/include/minix && osname=minix
+$test -f /system/gnu_library/bin/ar.pm && osname=vos
+if $test -d /MachTen -o -d /MachTen_Folder; then
+ osname=machten
+ if $test -x /sbin/version; then
+ osvers=`/sbin/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ elif $test -x /usr/etc/version; then
+ osvers=`/usr/etc/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ else
+ osvers="$2.$3"
+ fi
+fi
+$test -f /sys/posix.dll &&
+ $test -f /usr/bin/what &&
+ set X `/usr/bin/what /sys/posix.dll` &&
+ $test "$3" = UWIN &&
+ osname=uwin &&
+ osvers="$5"
+if $test "X$has_uname" != X; then
+ set X $myuname
+ shift
+ case "$5" in
+ fps*) osname=fps ;;
+ mips*)
+ case "$4" in
+ umips) osname=umips ;;
+ *) osname=mips ;;
+ esac;;
+ [23]100) osname=mips ;;
+ next*) osname=next ;;
+ i386*)
+ tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
+ if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
+ osname='sco'
+ osvers=$tmp
+ elif $test -f /etc/kconfig; then
+ osname=isc
+ if $test "$lns" = "$ln -s"; then
+ osvers=4
+ elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
+ osvers=3
+ elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
+ osvers=2
+ fi
+ fi
+ tmp=''
+ ;;
+ pc*)
+ if $test -n "$DJGPP"; then
+ osname=dos
+ osvers=djgpp
+ fi
+ ;;
+ esac
+ case "$1" in
+ aix) osname=aix
+ tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
+ case "$tmp" in
+ '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 ;;
+ *) osvers=$tmp;;
+ esac
+ ;;
+ bsd386) osname=bsd386
+ osvers=`$uname -r`
+ ;;
+ cygwin*) osname=cygwin
+ osvers="$3"
+ ;;
+ *dc.osx) osname=dcosx
+ osvers="$3"
+ ;;
+ dnix) osname=dnix
+ osvers="$3"
+ ;;
+ domainos) osname=apollo
+ osvers="$3"
+ ;;
+ dgux) osname=dgux
+ osvers="$3"
+ ;;
+ dynixptx*) osname=dynixptx
+ osvers=`echo "$4"|sed 's/^v//'`
+ ;;
+ freebsd) osname=freebsd
+ osvers="$3" ;;
+ genix) osname=genix ;;
+ hp*) osname=hpux
+ osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
+ ;;
+ irix*) osname=irix
+ case "$3" in
+ 4*) osvers=4 ;;
+ 5*) osvers=5 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ linux) osname=linux
+ case "$3" in
+ *) osvers="$3" ;;
+ esac
+ ;;
+ MiNT) osname=mint
+ ;;
+ netbsd*) osname=netbsd
+ osvers="$3"
+ ;;
+ news-os) osvers="$3"
+ case "$3" in
+ 4*) osname=newsos4 ;;
+ *) osname=newsos ;;
+ esac
+ ;;
+ next*) osname=next ;;
+ nonstop-ux) osname=nonstopux ;;
+ openbsd) osname=openbsd
+ osvers="$3"
+ ;;
+ POSIX-BC | posix-bc ) osname=posix-bc
+ osvers="$3"
+ ;;
+ powerux | power_ux | powermax_os | powermaxos | \
+ powerunix | power_unix) osname=powerux
+ osvers="$3"
+ ;;
+ qnx) osname=qnx
+ osvers="$4"
+ ;;
+ solaris) osname=solaris
+ case "$3" in
+ 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ sunos) osname=sunos
+ case "$3" in
+ 5*) osname=solaris
+ osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ titanos) osname=titanos
+ case "$3" in
+ 1*) osvers=1 ;;
+ 2*) osvers=2 ;;
+ 3*) osvers=3 ;;
+ 4*) osvers=4 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ ultrix) osname=ultrix
+ osvers="$3"
+ ;;
+ osf1|mls+) case "$5" in
+ alpha)
+ osname=dec_osf
+ osvers=`sizer -v | awk '{print $3}' | \
+ ./tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
+ case "$osvers" in
+ [1-9].[0-9]*) ;;
+ *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
+ esac
+ ;;
+ hp*) osname=hp_osf1 ;;
+ mips) osname=mips_osf1 ;;
+ esac
+ ;;
+ unixware) osname=svr5
+ osvers="$4"
+ ;;
+ uts) osname=uts
+ osvers="$3"
+ ;;
+ vos) osvers="$3"
+ ;;
+ $2) case "$osname" in
+ *isc*) ;;
+ *freebsd*) ;;
+ svr*)
+ : svr4.x or possibly later
+ case "svr$3" in
+ ${osname}*)
+ osname=svr$3
+ osvers=$4
+ ;;
+ esac
+ case "$osname" in
+ svr4.0)
+ : Check for ESIX
+ if $test -f /stand/boot ; then
+ eval `$grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
+ if $test -n "$INITPROG" -a -f "$INITPROG"; then
+ isesix=`strings -a $INITPROG | \
+ $grep 'ESIX SYSTEM V/386 Release 4.0'`
+ if $test -n "$isesix"; then
+ osname=esix4
+ fi
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ *) if $test -f /etc/systemid; then
+ osname=sco
+ set `echo $3 | $sed 's/\./ /g'` $4
+ if $test -f $src/hints/sco_$1_$2_$3.sh; then
+ osvers=$1.$2.$3
+ elif $test -f $src/hints/sco_$1_$2.sh; then
+ osvers=$1.$2
+ elif $test -f $src/hints/sco_$1.sh; then
+ osvers=$1
+ fi
+ else
+ case "$osname" in
+ '') : Still unknown. Probably a generic Sys V.
+ osname="sysv"
+ osvers="$3"
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+ *) case "$osname" in
+ '') : Still unknown. Probably a generic BSD.
+ osname="$1"
+ osvers="$3"
+ ;;
+ esac
+ ;;
+ esac
+else
+ if $test -f /vmunix -a -f $src/hints/news_os.sh; then
+ (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
+ if $contains news-os UU/kernel.what >/dev/null 2>&1; then
+ osname=news_os
+ fi
+ $rm -f UU/kernel.what
+ elif $test -d c:/.; then
+ set X $myuname
+ osname=os2
+ osvers="$5"
+ fi
+fi
+
+: Try to determine whether config.sh was made on this system
+case "$config_sh" in
+'')
dflt=n
case "$knowitall" in
'')
if test -f ../config.sh; then
if $contains myuname= ../config.sh >/dev/null 2>&1; then
- eval "`grep myuname= ../config.sh`"
+ eval "`$grep myuname= ../config.sh`"
fi
if test "X$myuname" = "X$newmyuname"; then
dflt=y
@@ -1795,18 +2124,21 @@ case "$knowitall" in
*) dflt=y;;
esac
-: Get old answers, if there is a config file out there
+: Get old answers from config file if it was generated on the same system
hint=default
-hintfile=''
-if test -f ../config.sh; then
+if $test -f ../config.sh; then
echo " "
rp="I see a config.sh file. Shall I use it to set the defaults?"
. ./myread
case "$ans" in
- n*|N*) echo "OK, I'll ignore it.";;
+ n*|N*) echo "OK, I'll ignore it."
+ mv ../config.sh ../config.sh.old
+ myuname="$newmyuname"
+ ;;
*) echo "Fetching default answers from your old config.sh file..." >&4
tmp_n="$n"
tmp_c="$c"
+ tmp_sh="$sh"
. ../config.sh
cp ../config.sh .
n="$tmp_n"
@@ -1821,6 +2153,7 @@ fi
echo "Fetching default answers from $config_sh..." >&4
tmp_n="$n"
tmp_c="$c"
+ tmp_sh="$sh"
cd ..
cp $config_sh config.sh 2>/dev/null
chmod +w config.sh
@@ -1832,19 +2165,76 @@ fi
hint=previous
;;
esac
-test "$override" && . ./optdef.sh
+case "$sh" in
+'') sh="$tmp_sh" ;;
+esac
+$test "$override" && . ./optdef.sh
: Restore computed paths
for file in $loclist $trylist; do
eval $file="\$_$file"
done
-: process their -A options
+. ./checkcc
+case "$targetarch" in
+'') ;;
+*) hostarch=$osname
+ osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+ osvers=''
+ ;;
+esac
+
+: Process their -A options
. ./posthint.sh
+: Ask them to confirm the OS name
+cat << EOM
+
+Configure uses the operating system name and version to set some defaults.
+The default value is probably right if the name rings a bell. Otherwise,
+since spelling matters for me, either accept the default or answer "none"
+to leave it blank.
+
+EOM
+case "$osname" in
+ ''|' ')
+ case "$hintfile" in
+ ''|' '|none) dflt=none ;;
+ *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
+ esac
+ ;;
+ *) dflt="$osname" ;;
+esac
+rp="Operating system name?"
+. ./myread
+case "$ans" in
+none) osname='' ;;
+*) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
+esac
+echo " "
+case "$osvers" in
+ ''|' ')
+ case "$hintfile" in
+ ''|' '|none) dflt=none ;;
+ *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
+ dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
+ case "$dflt" in
+ ''|' ') dflt=none ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) dflt="$osvers" ;;
+esac
+rp="Operating system version?"
+. ./myread
+case "$ans" in
+none) osvers='' ;;
+*) osvers="$ans" ;;
+esac
+
: who configured the system
-LC_ALL=C; export LC_ALL
-cf_time=`$date 2>&1`
+cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
cf_by=`(logname) 2>/dev/null`
case "$cf_by" in
"")
@@ -1854,12 +2244,18 @@ case "$cf_by" in
esac ;;
esac
+: allow them to override the AFS root
+case "$afsroot" in
+'') afsroot=/afs ;;
+*) afsroot=$afsroot ;;
+esac
+
: is AFS running?
echo " "
case "$afs" in
$define|true) afs=true ;;
$undef|false) afs=false ;;
-*) if test -d /afs; then
+*) if $test -d $afsroot; then
afs=true
else
afs=false
@@ -1876,7 +2272,8 @@ fi
echo " "
case "$sysman" in
'')
- syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
+ syspath='/usr/share/man/man1 /usr/man/man1'
+ syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
@@ -1969,10 +2366,15 @@ exp_file=''
nopath_ok=''
orig_rp="$rp"
orig_dflt="$dflt"
+case "$gfpth" in
+'') gfpth='.' ;;
+esac
case "$fn" in
*\(*)
- expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok
+ : getfile will accept an answer from the comma-separated list
+ : enclosed in parentheses even if it does not meet other criteria.
+ expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
fn=`echo $fn | sed 's/(.*)//'`
;;
esac
@@ -2071,6 +2473,7 @@ while test "$type"; do
true)
case "$ansexp" in
/*) value="$ansexp" ;;
+ [a-zA-Z]:/*) value="$ansexp" ;;
*)
redo=true
case "$already" in
@@ -2095,18 +2498,40 @@ while test "$type"; do
'')
case "$type" in
File)
- if test -f "$ansexp"; then
- type=''
- elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1
- then
- echo "($value is not a plain file, but that's ok.)"
- type=''
- fi
+ for fp in $gfpth; do
+ if test "X$fp" = X.; then
+ pf="$ansexp"
+ else
+ pf="$fp/$ansexp"
+ fi
+ if test -f "$pf"; then
+ type=''
+ elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
+ then
+ echo "($value is not a plain file, but that's ok.)"
+ type=''
+ fi
+ if test X"$type" = X; then
+ value="$pf"
+ break
+ fi
+ done
;;
Directory)
- if test -d "$ansexp"; then
- type=''
- fi
+ for fp in $gfpth; do
+ if test "X$fp" = X.; then
+ dir="$ans"
+ direxp="$ansexp"
+ else
+ dir="$fp/$ansexp"
+ direxp="$fp/$ansexp"
+ fi
+ if test -d "$direxp"; then
+ type=''
+ value="$dir"
+ break
+ fi
+ done
;;
Locate)
if test -d "$ansexp"; then
@@ -2160,6 +2585,7 @@ ans="$value"
rp="$orig_rp"
dflt="$orig_dflt"
rm -f getfile.ok
+test "X$gfpthkeep" != Xy && gfpth=""
EOSC
: determine root of directory hierarchy where package will be installed.
@@ -2406,7 +2832,6 @@ fi
: preserve RCS keywords in files with variable substitution, grrr
Header='$Header'
Id='$Id'
-Locker='$Locker'
Log='$Log'
: Define several unixisms.
@@ -2434,8 +2859,11 @@ echo exit 1 >venix
echo exit 1 >os2
echo exit 1 >gnu
echo exit 1 >linux
+echo exit 1 >dos
d_bsd="$undef"
d_linux="$undef"
+d_dos="$undef"
+d_os2="$undef"
$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
then
@@ -2495,9 +2923,21 @@ case "$p_" in
*)
$cat <<'EOI'
I have the feeling something is not exactly right, however...don't tell me...
+EOI
+ if test -n "$DJGPP"; then
+ case "X${MACHTYPE:-nonesuchmach}" in
+ cygwin) echo "hah!... you're running under Cygwin!";;
+ *) echo "got it... you're running DOS with DJGPP!";;
+ esac
+ echo exit 0 >dos
+ d_dos="$define"
+ else
+ $cat <<'EOI'
lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
EOI
- echo exit 0 >os2
+ echo exit 0 >os2
+ d_os2="$define"
+ fi
;;
esac
if test -f /xenix; then
@@ -2522,12 +2962,58 @@ else
echo "Nor is it Venix..."
fi
fi
-chmod +x bsd usg v7 osf1 eunice xenix venix os2 gnu linux
-$eunicefix bsd usg v7 osf1 eunice xenix venix os2 gnu linux
+chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
+$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
$rm -f foo
+: What should the include directory be ?
+echo " "
+$echo $n "Hmm... $c"
+dflt='/usr/include'
+incpath=''
+mips_type=''
+if $test -f /bin/mips && /bin/mips; then
+ echo "Looks like a MIPS system..."
+ $cat >usr.c <<'EOCP'
+#ifdef SYSTYPE_BSD43
+/bsd43
+#endif
+EOCP
+ if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
+ dflt='/bsd43/usr/include'
+ incpath='/bsd43'
+ mips_type='BSD 4.3'
+ else
+ mips_type='System V'
+ fi
+ $rm -f usr.c usr.out
+ echo "and you're compiling with the $mips_type compiler and libraries."
+ xxx_prompt=y
+ echo "exit 0" >mips
+else
+ echo "Doesn't look like a MIPS system."
+ xxx_prompt=n
+ echo "exit 1" >mips
+fi
+chmod +x mips
+$eunicefix mips
+case "$usrinc" in
+'') ;;
+*) dflt="$usrinc";;
+esac
+case "$xxx_prompt" in
+y) fn=d/
+ echo " "
+ rp='Where are the include files you want to use?'
+ . ./getfile
+ usrinc="$ans"
+ ;;
+*) usrinc="$dflt"
+ ;;
+esac
+
: see if we have to deal with yellow pages, now NIS.
-if $test -d /usr/etc/yp || $test -d /etc/yp; then
+if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
if $test -f /usr/etc/nibindd; then
echo " "
echo "I'm fairly confident you're on a NeXT."
@@ -2571,13 +3057,16 @@ if $test -d /usr/etc/yp || $test -d /etc/yp; then
esac
fi
case "$hostcat" in
-'') hostcat='cat /etc/hosts';;
+'') hostcat=':'
+ $test -f /etc/hosts && hostcat='cat /etc/hosts';;
esac
case "$groupcat" in
-'') groupcat='cat /etc/group';;
+'') groupcat=':'
+ $test -f /etc/group && groupcat='cat /etc/group';;
esac
case "$passcat" in
-'') passcat='cat /etc/passwd';;
+'') passcat=':'
+ $test -f /etc/passwd && passcat='cat /etc/passwd';;
esac
: now get the host name
@@ -2634,6 +3123,9 @@ if $test "$cont"; then
fi
fi
fi
+case "$myhostname" in
+'') myhostname=noname ;;
+esac
: you do not want to know about this
set $myhostname
myhostname=$1
@@ -2685,14 +3177,20 @@ case "$myhostname" in
tmp_re="[ . ]"
$test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
END { print sum }" hosts` = x1 || tmp_re="[ ]"
- dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
+ dflt=.`$awk \
+ "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
hosts | $sort | $uniq | \
$sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
case `$echo X$dflt` in
X*\ *) echo "(Several hosts in /etc/hosts matched hostname)"
dflt=.
;;
- X.) echo "(You do not have fully-qualified names in /etc/hosts)"
+ X.)
+ if $test -f /etc/hosts; then
+ echo "(You do not have fully-qualified names in /etc/hosts)"
+ else
+ echo "(I cannot locate a hosts database anywhere)"
+ fi
;;
esac
case "$dflt" in
@@ -2721,9 +3219,16 @@ case "$myhostname" in
esac
;;
esac
+ case "$dflt$osname" in
+ .os390)
+ file="//'SYS1.TCPPARMS(TCPDATA)'"
+ echo "(Attempting domain name extraction from $file)"
+ dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "$file" 2>/dev/null`
+ ;;
+ esac
case "$dflt" in
.) echo "(Lost all hope -- silly guess then)"
- dflt='.uucp'
+ dflt='.nonet'
;;
esac
$rm -f hosts
@@ -2776,7 +3281,7 @@ $cat <<EOM
I need to get your e-mail address in Internet format if possible, i.e.
something like user@host.domain. Please answer accurately since I have
no easy means to double check it. The default value provided below
-is most probably close to the reality but may not be valid from outside
+is most probably close to reality but may not be valid from outside
your organization...
EOM
@@ -2827,176 +3332,92 @@ else
fi
$rm -f foo.c foo.cpp
-: determine default editor
+: Check whether they have gcc in any guise.
echo " "
-case "$defeditor" in
-'')
- case "$vi" in
- */*) dflt="$vi";;
- *) dflt=/usr/ucb/vi;;
- esac
- ;;
-*) dflt="$defeditor"
- ;;
-esac
-fn=f/
-rp="What is the default editor on your system?"
-. ./getfile
-defeditor="$ans"
-
-: locate a BSD compatible install program
-echo " "
-echo "Looking for a BSD-compatible install program..." >&4
-creatdir=''
-case "$install" in
-'')
- tryit=''
- for dir in $pth; do
- for file in ginstall installbsd scoinst install; do
- if $test -f $dir/$file; then
- tryit="$tryit $dir/$file"
- fi
- done
- done
- $cat >try.c <<EOC
-int main()
-{
- printf("OK\n");
+echo "Checking for GNU cc in disguise and/or its version number..." >&4
+$cat >try.c <<EOM
+#include <stdio.h>
+int main() {
+#ifdef __GNUC__
+#ifdef __VERSION__
+ printf("%s\n", __VERSION__);
+#else
+ printf("%s\n", "1");
+#endif
+#endif
exit(0);
}
-EOC
- if $cc -o try try.c >/dev/null 2>&1; then
- cp try try.ns
- strip try >/dev/null 2>&1
- else
- echo "(I can't seem to compile a trivial C program -- bypassing.)"
- echo "try" >try
- cp try try.ns
- fi
- $cat >tryinst <<EOS
-$startsh
-$rm -rf foo d
-\$1 -d foo/bar
-$mkdir d
-\$1 -c -m 764 try.ns d
-\$1 -c -s -m 642 try.ns d/try
-EOS
- chmod +x tryinst
- $eunicefix tryinst
- dflt=''
- either=''
- for prog in $tryit; do
- $echo $n "Checking $prog... $c"
- ./tryinst $prog >/dev/null 2>&1
- if $test -d foo/bar; then
- creatdir="$prog -d"
- fi
- (ls -l d/try >try.ls; ls -l d/try.ns >tryno.ls) 2>/dev/null
- if (cmp -s d/try try && cmp -s d/try.ns try.ns && \
- $contains 'rwxrw-r--' tryno.ls && \
- $contains 'rw-r---w-' try.ls) >/dev/null 2>&1
- then
- dflt="$prog"
- echo "ok, that will do."
- break
- fi
- echo "not good$either."
- either=' either'
- $rm -f try*.ls
- done
- $rm -rf foo d tryinst try try*.ls try.*
- case "$dflt" in
- '')
- echo "Hopefully, $package comes with its own install script!"
- dflt='./install'
- ;;
- esac
- ;;
-*) dflt="$install";;
-esac
-$cat <<EOM
-
-I will be requiring a BSD-compatible install program (one that allows
-options like -s to strip executables or -m to specify a file mode) to
-install $package.
-
-If the question below contains a fully qualified default path, then it
-is probably ok. If it is an unqualified name such as 'install', then it
-means I was unable to find out a good install program I could use. If
-you know of one, please tell me about it. If the default is './install',
-then I shall be using the install script supplied with $package.
-
EOM
-fn='/fe~(install,./install)'
-rp='Which install program shall I use?'
-. ./getfile
-install="$ans"
-
-: how can we create nested directories?
-echo " "
-echo "Ok, let's see how we can create nested directories..." >&4
-case "$installdir" in
-'')
- case "$creatdir" in
- '')
- $mkdir -p foo/bar >/dev/null 2>&1
- if $test -d foo/bar; then
- echo "Great, we can build them using 'mkdir -p'."
- creatdir='mkdir -p'
- elif eval "$install -d foo/bar"; $test -d foo/bar; then
- creatdir="install -d"
- echo "It looks like '$creatdir' will do it for us."
- fi
- ;;
- *)
- eval "$creatdir foo/bar" >/dev/null 2>&1
- if $test -d foo/bar; then
- echo "Ah! We can use '$creatdir' to do just that."
- fi
- ;;
+if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then
+ gccversion=`$run ./try`
+ case "$gccversion" in
+ '') echo "You are not using GNU cc." ;;
+ *) echo "You are using GNU cc $gccversion."
+ ccname=gcc
+ ;;
esac
- $rm -rf foo
- case "$creatdir" in
+else
+ echo " "
+ echo "*** WHOA THERE!!! ***" >&4
+ echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
+ case "$knowitall" in
'')
- echo "Heck! Another ancient system lacking the comfort of modern ones!"
- echo "You can thank $package for bringing you its own install script!"
- installdir='./install -d'
+ echo " You'd better start hunting for one and let me know about it." >&4
+ exit 1
;;
- *) installdir="$creatdir";;
esac
- ;;
-*) echo "As you already told me, '$installdir' should work.";;
+fi
+$rm -f try try.*
+case "$gccversion" in
+1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
esac
+case "$gccversion" in
+'') gccosandvers='' ;;
+*) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
+ gccosandvers=`$cc -v 2>&1 | \
+ $grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
+ gccshortvers=''
+ case "$gccosandvers" in
+ $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
+ $osname$osvers) ;; # looking good
+ $osname*) cat <<EOM >&4
+
+*** WHOA THERE!!! ***
+
+ Your gcc has not been compiled for the exact release of
+ your operating system ($gccosandvers versus $osname$osvers).
+
+ In general it is a good idea to keep gcc synchronized with
+ the operating system because otherwise serious problems
+ may ensue when trying to compile software, like Perl.
+
+ I'm trying to be optimistic here, though, and will continue.
+ If later during the configuration and build icky compilation
+ problems appear (headerfile conflicts being the most common
+ manifestation), I suggest reinstalling the gcc to match
+ your operating system release.
-: determine the name of a reasonable mailer
-case "$mailer" in
-'')
- if $test -f "$sendmail"; then
- dflt="$sendmail"
- elif $test -f "$smail"; then
- dflt="$smail"
- elif $test -f "$rmail"; then
- dflt="$rmail"
- elif $test -f /bin/mail; then
- dflt=/bin/mail
- else
- dflt=$mail
- fi
- ;;
-*) dflt="$mailer";;
+EOM
+ ;;
+ *) gccosandvers='' ;; # failed to parse, better be silent
+ esac
+ ;;
+esac
+case "$ccname" in
+'') ccname="$cc" ;;
esac
-$cat <<EOM
-
-I need the full pathname of the program used to deliver mail on your system.
-A typical answer would be /usr/lib/sendmail or /bin/rmail, but you may choose
-any other program, as long as it can be fed from standard input and will
-honour any user-supplied headers.
-EOM
-fn=f
-rp='Mail transport agent to be used?'
-. ./getfile
-mailer="$ans"
+: gcc 3.1 complains about adding -Idirectories that it already knows about,
+: so we will take those off from locincpth.
+case "$gccversion" in
+3*)
+ echo "main(){}">try.c
+ for incdir in `$cc -v -c try.c 2>&1 | \
+ sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do
+ locincpth=`echo $locincpth | sed s!$incdir!!`
+ done
+ $rm -f try try.*
+esac
: see how we invoke the C preprocessor
echo " "
@@ -3007,8 +3428,20 @@ cat <<'EOT' >testcpp.c
ABC.XYZ
EOT
cd ..
-echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+if $test ! -f cppstdin; then
+ echo "$startsh" >cppstdin
+if $test "X$osname" = "Xaix" -a "X$gccversion" = X; then
+ echo 'cat >.$$.c; rm -f .$$.u; '"$cc"' ${1+"$@"} -M -c .$$.c 2>/dev/null; \
+ test -s .$$.u && \
+ awk '"'"'$2 ~ /\.h$/ { print "# 0 \""$2"\"" }'"'"' .$$.u; \
+ rm -f .$$.o .$$.u; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >> cppstdin
+else
+ echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >>cppstdin
+fi; else
+ echo "Keeping your $hint cppstdin wrapper."
+fi
chmod 755 cppstdin
+$eunicefix cppstdin
wrapper=`pwd`/cppstdin
ok='false'
cd UU
@@ -3131,212 +3564,497 @@ false)
esac
case "$cppstdin" in
-"$wrapper") ;;
+"$wrapper"|'cppstdin') ;;
*) $rm -f $wrapper;;
esac
$rm -f testcpp.c testcpp.out
-: find out how to generate dependencies
-echo " "
-echo "Checking how to generate makefile dependencies on your machine..." >&4
-toplev=`cd ..;pwd`
-$cat >dep.c <<'EOCP'
-#include "dep.h"
-EOCP
-$cat >dep.h <<'EOCP'
+: Set private lib path
+case "$plibpth" in
+'') if ./mips; then
+ plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
+ fi;;
+esac
+case "$libpth" in
+' ') dlist='';;
+'') dlist="$loclibpth $plibpth $glibpth";;
+*) dlist="$libpth";;
+esac
-EOCP
-takeflags='flags=""
-case "$@" in
-*--*)
- for arg
- do
- shift
- case "$arg" in
- --) break;;
- *) flags="$flags $arg";;
+: Now check and see which directories actually exist, avoiding duplicates
+libpth=''
+for xxx in $dlist
+do
+ if $test -d $xxx; then
+ case " $libpth " in
+ *" $xxx "*) ;;
+ *) libpth="$libpth $xxx";;
esac
- done;;
-esac'
-case "$mkdep" in
-'')
- ;;
+ fi
+done
+$cat <<'EOM'
+
+Some systems have incompatible or broken versions of libraries. Among
+the directories listed in the question below, please remove any you
+know not to be holding relevant libraries, and add any that are needed.
+Say "none" for none.
+
+EOM
+case "$libpth" in
+'') dflt='none';;
*)
- if test -f "$mkdep" &&
- $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
- then
- echo "$mkdep works."
- else
- mkdep=
- fi
+ set X $libpth
+ shift
+ dflt=${1+"$@"}
+ ;;
+esac
+rp="Directories to use for library searches?"
+. ./myread
+case "$ans" in
+none) libpth=' ';;
+*) libpth="$ans";;
esac
-case "$mkdep" in
-'')
- $spitshell > ../mkdep <<EOM
-$startsh
-$takeflags
-for srcfile
-do
- $cpp -M -I. $cppflags \$flags \$srcfile 2>/dev/null
+: determine optimize, if desired, or use for debug flag also
+case "$optimize" in
+' '|$undef) dflt='none';;
+'') dflt='-O';;
+*) dflt="$optimize";;
+esac
+$cat <<EOH
+
+Some C compilers have problems with their optimizers. By default, $package
+compiles with the -O flag to use the optimizer. Alternately, you might want
+to use the symbolic debugger, which uses the -g flag (on traditional Unix
+systems). Either flag can be specified here. To use neither flag, specify
+the word "none".
+
+EOH
+rp="What optimizer/debugger flag should be used?"
+. ./myread
+optimize="$ans"
+case "$optimize" in
+'none') optimize=" ";;
+esac
+
+dflt=''
+: We will not override a previous value, but we might want to
+: augment a hint file
+case "$hint" in
+default|recommended)
+ case "$gccversion" in
+ 1*) dflt='-fpcc-struct-return' ;;
+ esac
+ case "$gccversion" in
+ 2*) if test -d /etc/conf/kconfig.d &&
+ $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
+ then
+ dflt="$dflt -posix"
+ fi
+ ;;
+ esac
+ case "$gccversion" in
+ 1*|2*) dflt="$dflt -Wall";;
+ *) dflt="$dflt -W -Wall -Wformat=2";;
+ esac
+ ;;
+esac
+
+case "$mips_type" in
+*BSD*|'') inclwanted="$locincpth $usrinc";;
+*) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
+esac
+for thisincl in $inclwanted; do
+ if $test -d $thisincl; then
+ if $test x$thisincl != x$usrinc; then
+ case "$dflt" in
+ *$thisincl*);;
+ *) dflt="$dflt -I$thisincl";;
+ esac
+ fi
+ fi
done
-exit 0
+
+inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
+ xxx=true;
+elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
+ xxx=true;
+else
+ xxx=false;
+fi;
+if $xxx; then
+ case "$dflt" in
+ *$2*);;
+ *) dflt="$dflt -D$2";;
+ esac;
+fi'
+
+if ./osf1; then
+ set signal.h __LANGUAGE_C__; eval $inctest
+else
+ set signal.h LANGUAGE_C; eval $inctest
+fi
+
+case "$hint" in
+default|recommended) dflt="$ccflags $dflt" ;;
+*) dflt="$ccflags";;
+esac
+
+case "$dflt" in
+''|' ') dflt=none;;
+esac
+$cat <<EOH
+
+Your C compiler may want other flags. For this question you should include
+-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
+but you should NOT include libraries or ld flags like -lwhatever.
+
+To use no flags, specify the word "none".
+
+EOH
+set X $dflt
+shift
+dflt=${1+"$@"}
+rp="Any additional cc flags?"
+. ./myread
+case "$ans" in
+none) ccflags='';;
+*) ccflags="$ans";;
+esac
+
+: the following weeds options from ccflags that are of no interest to cpp
+cppflags="$ccflags"
+case "$gccversion" in
+1*) cppflags="$cppflags -D__GNUC__"
+esac
+case "$mips_type" in
+'');;
+*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
+esac
+case "$cppflags" in
+'');;
+*)
+ echo " "
+ echo "Let me guess what the preprocessor flags are..." >&4
+ set X $cppflags
+ shift
+ cppflags=''
+ $cat >cpp.c <<'EOM'
+#define BLURFL foo
+
+BLURFL xx LFRULB
EOM
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- $eunicefix $mkdep
- if $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
- then
- echo "Looks like we can use $cpp -M."
+ previous=''
+ for flag in $*
+ do
+ case "$flag" in
+ -*) ftry="$flag";;
+ *) ftry="$previous $flag";;
+ esac
+ if $cppstdin -DLFRULB=bar $ftry $cppminus <cpp.c \
+ >cpp1.out 2>/dev/null && \
+ $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
+ >cpp2.out 2>/dev/null && \
+ $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
+ $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
+ then
+ cppflags="$cppflags $ftry"
+ previous=''
+ else
+ previous="$flag"
+ fi
+ done
+ set X $cppflags
+ shift
+ cppflags=${1+"$@"}
+ case "$cppflags" in
+ *-*) echo "They appear to be: $cppflags";;
+ esac
+ $rm -f cpp.c cpp?.out
+ ;;
+esac
+
+: flags used in final linking phase
+case "$ldflags" in
+'') if ./venix; then
+ dflt='-i -z'
else
- mkdep=
+ dflt=''
fi
+ case "$ccflags" in
+ *-posix*) dflt="$dflt -posix" ;;
+ esac
;;
+*) dflt="$ldflags";;
esac
-case "$mkdep" in
-'')
- $spitshell > ../mkdep <<EOM
-$startsh
-$takeflags
-for srcfile
-do
- $cc -MM -I. $cppflags \$flags \$srcfile 2>/dev/null
+: Try to guess additional flags to pick up local libraries.
+for thislibdir in $libpth; do
+ case " $loclibpth " in
+ *" $thislibdir "*)
+ case "$dflt " in
+ *"-L$thislibdir "*) ;;
+ *) dflt="$dflt -L$thislibdir" ;;
+ esac
+ ;;
+ esac
done
-exit 0
+
+case "$dflt" in
+'') dflt='none' ;;
+*) set X $dflt; shift; dflt="$@";;
+esac
+
+$cat <<EOH
+
+Your C linker may need flags. For this question you should
+include -L/whatever and any other flags used by the C linker, but you
+should NOT include libraries like -lwhatever.
+
+Make sure you include the appropriate -L/path flags if your C linker
+does not normally search all of the directories you specified above,
+namely
+ $libpth
+To use no flags, specify the word "none".
+
+EOH
+
+rp="Any additional ld flags (NOT including libraries)?"
+. ./myread
+case "$ans" in
+none) ldflags='';;
+*) ldflags="$ans";;
+esac
+rmlist="$rmlist pdp11"
+
+: coherency check
+echo " "
+echo "Checking your choice of C compiler and flags for coherency..." >&4
+set X $cc $optimize $ccflags $ldflags -o try try.c
+shift
+$cat >try.msg <<EOM
+I've tried to compile and run a simple program with:
+
+ $*
+ ./try
+
+and I got the following output:
+
EOM
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- $eunicefix $mkdep
- if $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o: dep.h" dep.out >/dev/null 2>&1
- then
- echo "Looks like we can use $cc -MM."
+$cat > try.c <<'EOF'
+#include <stdio.h>
+int main() { exit(0); }
+EOF
+dflt=y
+if sh -c "$cc $optimize $ccflags $ldflags -o try try.c" >>try.msg 2>&1; then
+ if sh -c './try' >>try.msg 2>&1; then
+ dflt=n
else
- mkdep=
+ echo "The program compiled OK, but exited with status $?." >>try.msg
+ rp="You have a problem. Shall I abort Configure"
+ dflt=y
fi
+else
+ echo "I can't compile the test program." >>try.msg
+ rp="You have a BIG problem. Shall I abort Configure"
+ dflt=y
+fi
+case "$dflt" in
+y)
+ $cat try.msg >&4
+ case "$knowitall" in
+ '')
+ echo "(The supplied flags might be incorrect with this C compiler.)"
+ ;;
+ *) dflt=n;;
+ esac
+ echo " "
+ . ./myread
+ case "$ans" in
+ n*|N*) ;;
+ *) echo "Ok. Stopping Configure." >&4
+ exit 1
+ ;;
+ esac
;;
+n) echo "OK, that should do.";;
esac
+$rm -f try try.* core
-case "$mkdep" in
+: determine default editor
+echo " "
+case "$defeditor" in
'')
- $spitshell >../mkdep <<EOS
-$startsh
-$takeflags
-for srcfile
-do
- case "\$srcfile" in
- *.c) c='.c';;
- *.y) c='.y';;
- *.l) c='.l';;
- esac
- filebase=\`basename \$srcfile \$c\`
- <\$srcfile $cpp $cppminus $cppflags -I. \$flags 2>/dev/null | \\
- $sed -e '/^# *[0-9]/!d' \\
- -e 's/^.*"\(.*\)".*\$/'\$filebase'$_o: \1/' \\
- -e 's|: \./|: |' \\
- -e 's|: *$|: '\$srcfile'|' | \\
- $grep -v '^#' | $sort | $uniq
-done
-exit 0
-EOS
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- $eunicefix $mkdep
- if $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
- then
- echo "A shell script using $cpp does the trick."
- else
- echo "$cpp doesn't seem to be any use at all."
- $spitshell >../mkdep <<EOS
-$startsh
-$takeflags
-files="\$@"
-set X \$flags
-shift
-inc='.'
-while test \$# -gt 0
-do
- case "\$1" in
- -I)
- shift
- inc="\$inc:\$1"
- ;;
- -I*)
- dir=\`echo \$1 | sed -e 's/^-I//'\`
- inc="\$inc:\$dir"
- ;;
+ case "$vi" in
+ */*) dflt="$vi";;
+ *) dflt=/usr/ucb/vi;;
esac
- shift
-done
-set X \$files
-shift
-trap "$rm -f /tmp/mkdep\$\$; exit 1" 1 2 3 15
-for srcfile
-do
- case "\$srcfile" in
- *.c) c='.c';;
- *.y) c='.y';;
- *.l) c='.l';;
- esac
- filebase=\`basename \$srcfile \$c\`
- echo \$filebase$_o: \$srcfile
- $grep '^#[ ]*include' \$srcfile /dev/null | \
- $sed -n -e 's/#[ ]*include[ ]*//' \\
- -e '/<\(.*\)>/ d' \\
- -e 's/:[^"]*"\([^"]*\)".*/: \1/' \\
- -e "s/\\.c:/$_o:/p" > /tmp/mkdep\$\$
- IFS=': '
- while read file dep; do
- for dir in \$inc; do
- if $test -f "\$dir/\$dep"; then
- dep="\$dir/\$dep"
- break
+ ;;
+*) dflt="$defeditor"
+ ;;
+esac
+fn=f/
+rp="What is the default editor on your system?"
+. ./getfile
+defeditor="$ans"
+
+: locate a BSD compatible install program
+echo " "
+echo "Looking for a BSD-compatible install program..." >&4
+creatdir=''
+case "$install" in
+'')
+ tryit=''
+ for dir in $pth; do
+ for file in ginstall installbsd scoinst install; do
+ if $test -f $dir/$file; then
+ tryit="$tryit $dir/$file"
fi
done
- echo "\$file: \$dep" | $sed -e 's,: \./,: ,'
- done </tmp/mkdep\$\$
- IFS=' '
- $rm -f /tmp/mkdep\$\$
-done
-exit 0
+ done
+ $cat >try.c <<EOC
+int main()
+{
+ printf("OK\n");
+ exit(0);
+}
+EOC
+ if $cc -o try try.c >/dev/null 2>&1; then
+ cp try try.ns
+ strip try >/dev/null 2>&1
+ else
+ echo "(I can't seem to compile a trivial C program -- bypassing.)"
+ echo "try" >try
+ cp try try.ns
+ fi
+ $cat >tryinst <<EOS
+$startsh
+$rm -rf foo d
+\$1 -d foo/bar
+$mkdir d
+\$1 -c -m 764 try.ns d
+\$1 -c -s -m 642 try.ns d/try
EOS
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- $eunicefix $mkdep
- if $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
+ chmod +x tryinst
+ $eunicefix tryinst
+ dflt=''
+ either=''
+ for prog in $tryit; do
+ $echo $n "Checking $prog... $c"
+ ./tryinst $prog >/dev/null 2>&1
+ if $test -d foo/bar; then
+ creatdir="$prog -d"
+ fi
+ (ls -l d/try >try.ls; ls -l d/try.ns >tryno.ls) 2>/dev/null
+ if (cmp -s d/try try && cmp -s d/try.ns try.ns && \
+ $contains 'rwxrw-r--' tryno.ls && \
+ $contains 'rw-r---w-' try.ls) >/dev/null 2>&1
then
- cat << EOM
-
-I can use a script with grep instead, but it will make some incorrect
-dependencies, since it doesn't understand about conditional compilation.
-Moreover, some dependencies may be missing, because scanning won't be
-a recursive process.
-If you have a program which generates makefile dependencies, you may want
-to use it. If not, you can use the script and edit the Makefile by hand
-if you need to.
-EOM
- else
- mkdep=
- cat << EOM
+ dflt="$prog"
+ echo "ok, that will do."
+ break
+ fi
+ echo "not good$either."
+ either=' either'
+ $rm -f try*.ls
+ done
+ $rm -rf foo d tryinst try try*.ls try.*
+ case "$dflt" in
+ '')
+ echo "Hopefully, $package comes with its own install script!"
+ dflt='./install'
+ ;;
+ esac
+ ;;
+*) dflt="$install";;
+esac
+$cat <<EOM
+
+I will be requiring a BSD-compatible install program (one that allows
+options like -s to strip executables or -m to specify a file mode) to
+install $package.
+
+If the question below contains a fully qualified default path, then it
+is probably ok. If it is an unqualified name such as 'install', then it
+means I was unable to find out a good install program I could use. If
+you know of one, please tell me about it. If the default is './install',
+then I shall be using the install script supplied with $package.
-I can't seem to generate makefile dependencies at all! Perhaps you have a
-program that does? If you don't, you might look at the mkdep script to
-see if you can create one which works.
EOM
- fi
+fn='/fe~(install,./install)'
+rp='Which install program shall I use?'
+. ./getfile
+install="$ans"
+
+: how can we create nested directories?
+echo " "
+echo "Ok, let's see how we can create nested directories..." >&4
+case "$installdir" in
+'')
+ $mkdir -p foo/bar >/dev/null 2>&1
+ if $test -d foo/bar; then
+ echo "Great, we can build them using 'mkdir -p'."
+ creatdir='mkdir -p'
+ else
+ case "$creatdir" in
+ '')
+ if eval "$install -d foo/bar"; $test -d foo/bar; then
+ creatdir="install -d"
+ echo "It looks like '$creatdir' will do it for us."
+ fi
+ ;;
+ *)
+ eval "$creatdir foo/bar" >/dev/null 2>&1
+ if $test -d foo/bar; then
+ echo "Ah! We can use '$creatdir' to do just that."
+ else
+ creatdir=''
+ fi
+ ;;
+ esac
fi
+ $rm -rf foo
+ case "$creatdir" in
+ '')
+ echo "Heck! Another ancient system lacking the comfort of modern ones!"
+ echo "You can thank $package for bringing you its own install script!"
+ installdir='./install -d'
+ ;;
+ *) installdir="$creatdir";;
+ esac
+ ;;
+*) echo "As you already told me, '$installdir' should work.";;
esac
-dflt="$mkdep"
-fn=f~/
-rp="Name of program to make makefile dependencies?"
+
+: determine the name of a reasonable mailer
+case "$mailer" in
+'')
+ if $test -f "$sendmail"; then
+ dflt="$sendmail"
+ elif $test -f "$smail"; then
+ dflt="$smail"
+ elif $test -f "$rmail"; then
+ dflt="$rmail"
+ elif $test -f /bin/mail; then
+ dflt=/bin/mail
+ else
+ dflt=$mail
+ fi
+ ;;
+*) dflt="$mailer";;
+esac
+$cat <<EOM
+
+I need the full pathname of the program used to deliver mail on your system.
+A typical answer would be /usr/lib/sendmail or /bin/rmail, but you may choose
+any other program, as long as it can be fed from standard input and will
+honour any user-supplied headers.
+
+EOM
+fn=f
+rp='Mail transport agent to be used?'
. ./getfile
-mkdep="$ans"
-$rm -f dep.c dep.h dep$_o dep.out
+mailer="$ans"
: find out how to find out full name
case "$d_berknames" in
@@ -3444,26 +4162,31 @@ while test "X$orgname" = "X"; do
done
: locate the preferred pager for this system
+fn=f/
case "$pager" in
'')
dflt=''
case "$pg" in
/*) dflt=$pg;;
+ [a-zA-Z]:/*) dflt=$pg;;
esac
case "$more" in
/*) dflt=$more;;
+ [a-zA-Z]:/*) dflt=$more;;
esac
case "$less" in
/*) dflt=$less;;
+ [a-zA-Z]:/*) dflt=$less;;
esac
case "$dflt" in
'') dflt=/usr/ucb/more;;
esac
;;
-*) dflt="$pager";;
+*) dflt="$pager"
+ fn="f/($pager)"
+ ;;
esac
echo " "
-fn=f/
rp='What pager is used on your system?'
. ./getfile
pager="$ans"
@@ -3610,13 +4333,16 @@ $startsh
# Configured by : $cf_by
# Target system : $myuname
+EOT
+$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
+$spitshell <<EOT >>config.sh
+
Author='$Author'
Date='$Date'
Header='$Header'
Id='$Id'
Locker='$Locker'
Log='$Log'
-Mcc='$Mcc'
RCSfile='$RCSfile'
Revision='$Revision'
Source='$Source'
@@ -3625,6 +4351,7 @@ _a='$_a'
_exe='$_exe'
_o='$_o'
afs='$afs'
+afsroot='$afsroot'
ar='$ar'
archobjs='$archobjs'
awk='$awk'
@@ -3634,6 +4361,7 @@ bison='$bison'
byacc='$byacc'
c='$c'
cat='$cat'
+ccflags='$ccflags'
ccname='$ccname'
ccversion='$ccversion'
cf_by='$cf_by'
@@ -3649,6 +4377,7 @@ cp='$cp'
cpio='$cpio'
cpp='$cpp'
cpp_trad='$cpp_trad'
+cppflags='$cppflags'
cpplast='$cpplast'
cppminus='$cppminus'
cpprun='$cpprun'
@@ -3656,8 +4385,10 @@ cppstdin='$cppstdin'
csh='$csh'
d_berknames='$d_berknames'
d_bsd='$d_bsd'
+d_dos='$d_dos'
d_eunice='$d_eunice'
d_linux='$d_linux'
+d_os2='$d_os2'
d_passnames='$d_passnames'
d_portable='$d_portable'
d_usgnames='$d_usgnames'
@@ -3673,12 +4404,16 @@ find='$find'
firstmakefile='$firstmakefile'
flex='$flex'
from='$from'
+gccosandvers='$gccosandvers'
+gccversion='$gccversion'
+glibpth='$glibpth'
gmake='$gmake'
grep='$grep'
groupcat='$groupcat'
gzip='$gzip'
hint='$hint'
hostcat='$hostcat'
+incpath='$incpath'
inews='$inews'
install='$install'
installdir='$installdir'
@@ -3687,11 +4422,16 @@ installprivlib='$installprivlib'
installscript='$installscript'
issymlink='$issymlink'
ksh='$ksh'
+ldflags='$ldflags'
less='$less'
+libpth='$libpth'
line='$line'
lint='$lint'
+lkflags='$lkflags'
ln='$ln'
lns='$lns'
+locincpth='$locincpth'
+loclibpth='$loclibpth'
lp='$lp'
lpr='$lpr'
ls='$ls'
@@ -3703,7 +4443,7 @@ make_set_make='$make_set_make'
manext='$manext'
mansrc='$mansrc'
mansrcexp='$mansrcexp'
-mkdep='$mkdep'
+mips_type='$mips_type'
mkdir='$mkdir'
more='$more'
mv='$mv'
@@ -3714,6 +4454,7 @@ n='$n'
nametype='$nametype'
nm='$nm'
nroff='$nroff'
+optimize='$optimize'
orgname='$orgname'
osname='$osname'
osvers='$osvers'
@@ -3725,6 +4466,8 @@ perl='$perl'
perlpath='$perlpath'
pg='$pg'
phostname='$phostname'
+pkgsrc='$pkgsrc'
+plibpth='$plibpth'
pmake='$pmake'
pr='$pr'
prefix='$prefix'
@@ -3766,8 +4509,10 @@ troff='$troff'
uname='$uname'
uniq='$uniq'
usecrosscompile='$usecrosscompile'
+usrinc='$usrinc'
uuname='$uuname'
vi='$vi'
+xlibpth='$xlibpth'
zcat='$zcat'
zip='$zip'
EOT
@@ -3779,9 +4524,10 @@ echo "CONFIG=true" >>config.sh
: propagate old symbols
if $test -f UU/config.sh; then
- <UU/config.sh sort | uniq >UU/oldconfig.sh
- sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
- sort | uniq -u >UU/oldsyms
+ <UU/config.sh $sort | $uniq >UU/oldconfig.sh
+ $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \
+ config.sh config.sh UU/oldconfig.sh |\
+ $sort | $uniq -u >UU/oldsyms
set X `cat UU/oldsyms`
shift
case $# in
@@ -3790,7 +4536,7 @@ if $test -f UU/config.sh; then
cat <<EOM
Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
EOM
- echo "# Variables propagated from previous config.sh file." >>config.sh
+ echo ": Variables propagated from previous config.sh file." >>config.sh
for sym in `cat UU/oldsyms`; do
echo " Propagating $hint variable "'$'"$sym..."
eval 'tmp="$'"${sym}"'"'