summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure237
1 files changed, 139 insertions, 98 deletions
diff --git a/Configure b/Configure
index cd1dd35..f27fe64 100755
--- a/Configure
+++ b/Configure
@@ -16,9 +16,9 @@
# The dist package (which contains metaconfig) is available via SVN:
# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
-# $Id: Head.U 25 2008-05-28 11:19:25Z rmanfredi $
+# $Id: Head.U 41 2010-11-28 00:21:26Z rmanfredi $
#
-# Generated on Wed May 28 13:22:26 CEST 2008 [metaconfig 3.5-25]
+# Generated on Tue Feb 7 19:02:16 RST 2012 [metaconfig 3.5-123]
cat >c1$$ <<EOF
ARGGGHHHH!!!!!
@@ -63,7 +63,7 @@ if test -d c:/. ; then
OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
elif test -n "$DJGPP"; then
case "X${MACHTYPE:-nonesuchmach}" in
- *cygwin) ;;
+ *cygwin|*msys) ;;
*) p_=\; ;;
esac
fi
@@ -174,6 +174,7 @@ d_dos=''
d_eunice=''
d_linux=''
d_os2=''
+d_windows=''
d_xenix=''
_exe=''
eunicefix=''
@@ -199,7 +200,9 @@ emacs=''
expr=''
find=''
flex=''
+gcc=''
gmake=''
+gmsgfmt=''
grep=''
gzip=''
inews=''
@@ -216,7 +219,10 @@ mailx=''
make=''
mkdir=''
more=''
+msgfmt=''
+msgmerge=''
mv=''
+nawk=''
nm=''
nroff=''
perl=''
@@ -244,8 +250,12 @@ uname=''
uniq=''
uuname=''
vi=''
+wc=''
+xgettext=''
zcat=''
zip=''
+incpath=''
+mips_type=''
hint=''
myuname=''
osname=''
@@ -338,8 +348,6 @@ startperl=''
startsh=''
sysman=''
trnl=''
-incpath=''
-mips_type=''
usrinc=''
CONFIG=''
@@ -384,8 +392,7 @@ bin='/usr/local/bin'
cc='cc'
: 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"
+locincpth=""
:
: no include file wanted by default
inclwanted=''
@@ -393,15 +400,14 @@ 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"
+loclibpth=""
: 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"
-
+glibpth="$glibpth /lib32 /lib64 "`ls -1d /usr/lib/*-gnu 2>/dev/null`
: 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.
@@ -429,10 +435,10 @@ case "$sh" in
sh="$xxx"
break
elif test -f "$xxx$_exe"; then
- sh="$xxx"
+ sh="$xxx$_exe"
break
elif test -f "$xxx.exe"; then
- sh="$xxx"
+ sh="$xxx.exe"
break
fi
done
@@ -445,7 +451,7 @@ case "$sh" in
$me: Fatal Error: I can't find a Bourne Shell anywhere.
Usually it's in /bin/sh. How did you even get this far?
-Please contact me (Raphael Manfredi) at Raphael_Manfredi@grenoble.hp.com and
+Please contact me (Raphael Manfredi) at Raphael_Manfredi@pobox.com and
we'll try to straighten this all out.
EOM
exit 1
@@ -715,7 +721,7 @@ while test $# -gt 0; do
esac
shift
;;
- -V) echo "$me generated by metaconfig 3.5-25." >&2
+ -V) echo "$me generated by metaconfig 3.5-123." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
@@ -892,6 +898,7 @@ esac
cat >extract <<EOS
CONFIG=true
SRC="$src"
+TOP=`cd ..; pwd 2>/dev/null`
EOS
cat >>extract <<'EOS'
echo "Doing variable substitutions on .SH files..."
@@ -1014,7 +1021,7 @@ THIS PACKAGE SEEMS TO BE INCOMPLETE.
You have the option of continuing the configuration process, despite the
distinct possibility that your kit is damaged, by typing 'y'es. If you
do, don't blame me if something goes wrong. I advise you to type 'n'o
-and contact the author (Raphael_Manfredi@grenoble.hp.com).
+and contact the author (Raphael_Manfredi@pobox.com).
EOM
echo $n "Continue? [n] $c" >&4
@@ -1038,7 +1045,6 @@ fi
rm -f missing x??
: Find the appropriate value for a newline for tr
-echo " "
if test -n "$DJGPP"; then
trnl='\012'
fi
@@ -1064,8 +1070,6 @@ $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
EOM
exit 1
-else
- echo "We'll use '$trnl' to transliterate a newline."
fi
: compute the number of columns on the terminal for proper question formatting
@@ -1246,7 +1250,7 @@ Much effort has been expended to ensure that this shell script will run on any
Unix system. If despite that it blows up on yours, your best bet is to edit
Configure and run it again. If you can't run Configure for some reason,
you'll have to generate a config.sh file by hand. Whatever problems you
-have, let me (Raphael_Manfredi@grenoble.hp.com) know how I blew it.
+have, let me (Raphael_Manfredi@pobox.com) know how I blew it.
This installation script affects things in two ways:
@@ -1342,6 +1346,7 @@ cp
echo
expr
grep
+make
mkdir
mv
rm
@@ -1359,7 +1364,6 @@ less
line
ln
mail
-make
more
nroff
perl
@@ -1370,10 +1374,11 @@ smail
test
uname
vi
+wc
zcat
"
pth=`echo $PATH | sed -e "s/$p_/ /g"`
-pth="$pth /lib /usr/lib"
+pth="$pth /sbin /usr/sbin /lib /usr/lib /etc"
for file in $loclist; do
eval xxx=\$$file
case "$xxx" in
@@ -1381,14 +1386,14 @@ for file in $loclist; do
if test -f "$xxx"; then
: ok
else
- ./warn "no $xxx -- ignoring your setting for $file."
+ ./warn "no $xxx -- ignoring your setting for $file." 4>&4
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
- eval $file=$xxx$_exe
+ eval $file=$xxx
eval _$file=$xxx
case "$xxx" in
/*)
@@ -1399,7 +1404,7 @@ for file in $loclist; do
;;
*)
echo "I don't know where '$file' is, and my life depends on it." >&4
- echo "Go find a public domain implementation or fix your PATH setting!" >&4
+ echo "Go find a public domain implementation or fix your PATH!" >&4
exit 1
;;
esac
@@ -1414,14 +1419,14 @@ for file in $trylist; do
if test -f "$xxx"; then
: ok
else
- ./warn "no $xxx -- ignoring your setting for $file."
+ ./warn "no $xxx -- ignoring your setting for $file." 4>&4
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
- eval $file=$xxx$_exe
+ eval $file=$xxx
eval _$file=$xxx
case "$xxx" in
/*)
@@ -1437,21 +1442,21 @@ for file in $trylist; do
esac
done
case "$egrep" in
-egrep)
+egrep$_exe|egrep)
echo "Substituting grep for egrep."
egrep=$grep
_egrep=$_grep
;;
esac
case "$ln" in
-ln)
+ln$_exe|ln)
echo "Substituting cp for ln."
ln=$cp
_ln=$_cp
;;
esac
case "$make" in
-make)
+make$_exe|make)
case "$gmake" in
gmake)
echo "I can't find make or gmake, and my life depends on it." >&4
@@ -1462,11 +1467,10 @@ make)
;;
esac
case "$gmake" in
-gmake) ;;
-*) # We can't have osname yet.
- if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
- # Assume that gmake, if found, is definitely GNU make
- # and prefer it over the system make.
+gmake$_exe|gmake) ;;
+*)
+ if test -f "/system/gnu_library/bin/ar.pm"; then
+ : Stratus VOS
echo "Substituting gmake for make."
make=$gmake
_make=$_gmake
@@ -1474,8 +1478,9 @@ gmake) ;;
;;
esac
case "$test" in
-test)
+test|test$_exe)
echo "Hopefully test is built into your sh."
+ test=test
;;
*)
if `sh -c "PATH= test true" >/dev/null 2>&1`; then
@@ -1486,13 +1491,14 @@ test)
;;
esac
case "$echo" in
-echo)
+echo|echo$_exe)
echo "Hopefully echo is built into your sh."
+ echo=echo
;;
'') ;;
*)
echo " "
-echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
+echo "Checking compatibility between $_echo and builtin echo (if any)..." >&4
$echo $n "hi there$c" >foo1
echo $n "hi there$c" >foo2
if cmp foo1 foo2 >/dev/null 2>&1; then
@@ -1563,7 +1569,7 @@ EOM
[yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
$cat *.cbu >checktmp 2>/dev/null
if $contains ccflags checktmp >/dev/null; then
- ./warn <<EOM
+ ./warn 4>&4 <<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
@@ -1613,8 +1619,7 @@ EOSC
: determine whether symbolic links are supported
echo " "
-$touch blurfl
-$rm -f sym
+$rm -f blurfl sym
if $ln -s blurfl sym > /dev/null 2>&1 && $test -f sym; then
echo "Symbolic links are supported." >&4
lns="$ln -s"
@@ -1839,11 +1844,12 @@ $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
+has_uname=
+$test -f "$uname" && 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
+: authors and to Raphael_Manfredi@pobox.com
$test -f /irix && osname=irix
$test -f /xenix && osname=sco_xenix
$test -f /dynix && osname=dynix
@@ -1900,7 +1906,8 @@ if $test "X$has_uname" != X; 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
+ elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1
+ then
osvers=2
fi
fi
@@ -1928,7 +1935,10 @@ if $test "X$has_uname" != X; then
osvers=`$uname -r`
;;
cygwin*) osname=cygwin
- osvers="$3"
+ osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'`
+ ;;
+ mingw*) osname=mingw
+ osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'`
;;
*dc.osx) osname=dcosx
osvers="$3"
@@ -2124,6 +2134,12 @@ case "$knowitall" in
*) dflt=y;;
esac
+saved_osname="$osname"
+saved_osvers="$osvers"
+tmp_n="$n"
+tmp_c="$c"
+tmp_sh="$sh"
+
: Get old answers from config file if it was generated on the same system
hint=default
if $test -f ../config.sh; then
@@ -2136,14 +2152,19 @@ if $test -f ../config.sh; then
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"
- c="$tmp_c"
hint=previous
+ case "$dflt" in
+ n)
+ echo " "
+ rp="Do you want further invocations to use these defaults?"
+ . ./myread
+ case "$ans" in
+ y*|Y*) myuname="$newmyuname";;
+ esac
+ ;;
+ esac
;;
esac
fi
@@ -2151,17 +2172,12 @@ fi
*)
echo " "
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
. ./config.sh
cd UU
cp ../config.sh .
- n="$tmp_n"
- c="$tmp_c"
hint=previous
;;
esac
@@ -2175,6 +2191,11 @@ for file in $loclist $trylist; do
eval $file="\$_$file"
done
+osname="$saved_osname"
+osvers="$saved_osvers"
+n="$tmp_n"
+c="$tmp_c"
+
. ./checkcc
case "$targetarch" in
'') ;;
@@ -2474,6 +2495,7 @@ while test "$type"; do
case "$ansexp" in
/*) value="$ansexp" ;;
[a-zA-Z]:/*) value="$ansexp" ;;
+ [a-zA-Z]:\\*) value="$ansexp" ;;
*)
redo=true
case "$already" in
@@ -2844,7 +2866,7 @@ case "$_o" in
esac
: set the base revision
-baserev=3.0
+baserev=3.5
: make some quick guesses about what we are up against
echo " "
@@ -2860,10 +2882,12 @@ echo exit 1 >os2
echo exit 1 >gnu
echo exit 1 >linux
echo exit 1 >dos
+echo exit 1 >windows
d_bsd="$undef"
d_linux="$undef"
d_dos="$undef"
d_os2="$undef"
+d_windows="$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
@@ -2918,6 +2942,18 @@ EOI
d_eunice="$undef"
;;
esac
+if test -d c:/.; then
+ case "X${MACHTYPE:-nonesuchmach}" in
+ *cygwin) echo " "; echo "Hah!... you're running under Cygwin!";;
+ *msys) echo " "; echo "Hah!... you're running under MinGW!";;
+ esac
+ case "X${MACHTYPE:-nonesuchmach}" in
+ *cygwin|*msys)
+ echo exit 0 >windows
+ d_windows="$define"
+ ;;
+ esac
+fi
case "$p_" in
:) ;;
*)
@@ -2925,10 +2961,6 @@ case "$p_" in
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
@@ -2962,14 +2994,13 @@ else
echo "Nor is it Venix..."
fi
fi
-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
+chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows
+$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows
$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
@@ -2988,29 +3019,25 @@ EOCP
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
+
+: What should the include directory be ?
+echo " "
+dflt='/usr/include'
case "$usrinc" in
-'') ;;
+'') dflt="$incpath/usr/include";;
*) 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
+fn=d/
+rp='Where are the include files you want to use?'
+. ./getfile
+usrinc="$ans"
: see if we have to deal with yellow pages, now NIS.
if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
@@ -3336,20 +3363,22 @@ $rm -f foo.c foo.cpp
echo " "
echo "Checking for GNU cc in disguise and/or its version number..." >&4
$cat >try.c <<EOM
-#include <stdio.h>
-int main() {
+int main(void) {
#ifdef __GNUC__
-#ifdef __VERSION__
- printf("%s\n", __VERSION__);
-#else
- printf("%s\n", "1");
+gcc_version_major __GNUC__
+#ifdef __GNUC_MINOR__
+gcc_version_minor __GNUC__
+#endif
+#ifdef __GNUC_PATCHLEVEL__
+gcc_version_patchlevel __GNUC_PATCHLEVEL__
#endif
#endif
- exit(0);
}
EOM
-if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then
- gccversion=`$run ./try`
+if $cc -E try.c > try 2>&1
+then
+ gccversion=`$grep gcc_version_major try |
+ sed 's/^.*gcc_version_major[\t ]*//'`
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
*) echo "You are using GNU cc $gccversion."
@@ -3357,15 +3386,7 @@ if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then
;;
esac
else
- echo " "
- echo "*** WHOA THERE!!! ***" >&4
- echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
- case "$knowitall" in
- '')
- echo " You'd better start hunting for one and let me know about it." >&4
- exit 1
- ;;
- esac
+ gccversion=''
fi
$rm -f try try.*
case "$gccversion" in
@@ -3713,7 +3734,7 @@ else
fi
case "$hint" in
-default|recommended) dflt="$ccflags $dflt" ;;
+default|recommended) dflt="$dflt $ccflags" ;;
*) dflt="$ccflags";;
esac
@@ -3859,8 +3880,7 @@ and I got the following output:
EOM
$cat > try.c <<'EOF'
-#include <stdio.h>
-int main() { exit(0); }
+int main() { return 0; }
EOF
dflt=y
if sh -c "$cc $optimize $ccflags $ldflags -o try try.c" >>try.msg 2>&1; then
@@ -3963,7 +3983,12 @@ EOS
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 && \
+ try_wc=`($wc -c try | $awk '{ print $1}') 2>/dev/null`
+ tryns_wc=`($wc -c try.ns | $awk '{ print $1}') 2>/dev/null`
+ d_try_wc=`($wc -c d/try | $awk '{ print $1}') 2>/dev/null`
+ d_tryns_wc=`($wc -c d/try.ns | $awk '{ print $1}') 2>/dev/null`
+ if ($test "X$try_wc" = "X$d_try_wc" && \
+ $test "X$tryns_wc" = "X$d_tryns_wc" && \
$contains 'rwxrw-r--' tryno.ls && \
$contains 'rw-r---w-' try.ls) >/dev/null 2>&1
then
@@ -4222,6 +4247,13 @@ if $test -r $rsrc/revision.h;then
revision=`awk \
'/^#[ ]*define[ ][ ]*REVISION/ {print $3}' \
< $rsrc/revision.h`
+ case "$revision" in
+ '"$Revision:')
+ revision=`awk \
+ '/^#[ ]*define[ ][ ]*REVISION/ {print $4}' \
+ < $rsrc/revision.h`
+ ;;
+ esac
else
revision=0
fi
@@ -4424,6 +4456,7 @@ d_os2='$d_os2'
d_passnames='$d_passnames'
d_portable='$d_portable'
d_usgnames='$d_usgnames'
+d_windows='$d_windows'
d_xenix='$d_xenix'
date='$date'
defeditor='$defeditor'
@@ -4436,10 +4469,12 @@ find='$find'
firstmakefile='$firstmakefile'
flex='$flex'
from='$from'
+gcc='$gcc'
gccosandvers='$gccosandvers'
gccversion='$gccversion'
glibpth='$glibpth'
gmake='$gmake'
+gmsgfmt='$gmsgfmt'
grep='$grep'
groupcat='$groupcat'
gzip='$gzip'
@@ -4478,12 +4513,15 @@ mansrcexp='$mansrcexp'
mips_type='$mips_type'
mkdir='$mkdir'
more='$more'
+msgfmt='$msgfmt'
+msgmerge='$msgmerge'
mv='$mv'
mydomain='$mydomain'
myhostname='$myhostname'
myuname='$myuname'
n='$n'
nametype='$nametype'
+nawk='$nawk'
nm='$nm'
nroff='$nroff'
optimize='$optimize'
@@ -4545,6 +4583,8 @@ usecrosscompile='$usecrosscompile'
usrinc='$usrinc'
uuname='$uuname'
vi='$vi'
+wc='$wc'
+xgettext='$xgettext'
xlibpth='$xlibpth'
zcat='$zcat'
zip='$zip'
@@ -4554,7 +4594,8 @@ EOT
$test -f $src/patchlevel.h && \
awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
$test -f $src/revision.h && \
-awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/revision.h >>config.sh
+sed -ne 's/^#define \([A-Za-z0-9_]*\) ".*: \([0-9]*\).*"/\1=\2/p' \
+ < $src/revision.h >>config.sh
echo "CONFIG=true" >>config.sh
: propagate old symbols