summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-07-11 18:12:10 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-07-11 18:12:10 +0000
commit497711e7b1df022fefe2ed59a7b09c545fed3b3b (patch)
tree31d93270fedf0a25d36feca88210d4db478a411c /Configure
parent22543175801498849371a87fac00fda0d5ec7d06 (diff)
downloadperl-497711e7b1df022fefe2ed59a7b09c545fed3b3b.tar.gz
integrate cfgperl changes#6231..6240 into mainline
p4raw-link: @6240 on //depot/cfgperl: 514e70b26394e6b272960ab8b9b8b7dbb1e2c068 p4raw-link: @6231 on //depot/cfgperl: 7906debc4b99f108310cdade6e486754c15481e7 p4raw-id: //depot/perl@6355 p4raw-branched: from //depot/cfgperl@6353 'branch in' pod/perlutil.pod p4raw-integrated: from //depot/cfgperl@6353 'copy in' pod/roffitall (@5753..) op.h (@5833..) README.cygwin (@6096..) lib/ExtUtils/MM_VMS.pm (@6140..) lib/File/Find.pm (@6156..) Configure config_h.SH hints/solaris_2.sh (@6217..) Todo-5.6 (@6232..) keywords.h lib/warnings.pm opcode.h opnames.h pp.sym regnodes.h warnings.h (@6236..) 'ignore' ext/B/B/Asmdata.pm ext/ByteLoader/byterun.c ext/ByteLoader/byterun.h (@6236..) p4raw-integrated: from //depot/cfgperl@6240 'copy in' utils/h2xs.PL (@6192..) p4raw-integrated: from //depot/cfgperl@6238 'merge in' vms/vms.c (@6198..) p4raw-integrated: from //depot/cfgperl@6237 'copy in' utf8.c (@6221..) pod/perlapi.pod pod/perlintern.pod pp_proto.h (@6236..) 'ignore' embedvar.h perlapi.h (@6236..) 'merge in' embed.pl (@6225..) embed.h objXSUB.h perlapi.c proto.h (@6236..) p4raw-integrated: from //depot/cfgperl@6232 'copy in' pod/Makefile pod/perltoc.pod (@6161..) MANIFEST (@6227..)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure361
1 files changed, 197 insertions, 164 deletions
diff --git a/Configure b/Configure
index 19c83a0434..023b2d9b8b 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Wed May 31 23:34:04 EET DST 2000 [metaconfig 3.0 PL70]
+# Generated on Tue Jun 27 04:45:48 EET DST 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
@@ -288,7 +288,6 @@ bincompat5005=''
d_bincompat5005=''
byteorder=''
cc=''
-gccversion=''
ccflags=''
cppflags=''
ldflags=''
@@ -597,6 +596,7 @@ fflushNULL=''
fflushall=''
fpossize=''
fpostype=''
+gccversion=''
gidformat=''
gidsign=''
gidsize=''
@@ -2798,7 +2798,11 @@ int main() {
#endif
}
EOP
- ( cc -o pdp11 pdp11.c ) >/dev/null 2>&1
+ case "$cc" in
+ '') modelcc="$cc" ;;
+ *) modelcc="cc" ;;
+ esac
+ ( $modelcc -o pdp11 pdp11.c ) >/dev/null 2>&1
if $test -f pdp11 && ./pdp11 2>/dev/null; then
dflt='unsplit split'
else
@@ -3075,6 +3079,47 @@ fi
if $test -f cc.cbu; then
. ./cc.cbu
fi
+: Quick sanity check, we will do a fuller one later when we know
+: the various flags and libs
+$rm -f try try.*
+$cat >try.c <<EOM
+int main(int argc, char *argv[]) {
+ return 0;
+}
+EOM
+if $cc -o try try.c; then
+ :
+else
+ echo "Uh-oh, the C compiler "$cc" doesn't seem to be working..." >&4
+ despair=yes
+ trygcc=yes
+ case "$cc" in
+ *gcc) trygcc=no ;;
+ esac
+ case "`$cc -v 2>&1`" in
+ *gcc*) trygcc=no ;;
+ esac
+ if $test X"$trygcc" = Xyes; then
+ if gcc -o try try.c; then
+ echo " "
+ echo "You seem to have a working gcc, though."
+ rp="Do you want to use it?"
+ dflt=y
+ . ./myread
+ case "$ans" in
+ [yY]*) cc=gcc; despair=no ;;
+ esac
+ fi
+ fi
+ if $test X"$despair" = Xyes; then
+ echo "You need to find a working C compiler." >&4
+ echo "I cannot continue any further, aborting." >&4
+ exit 1
+ fi
+fi
+$rm -f try try.*
+
+
echo " "
echo "Checking for GNU cc in disguise and/or its version number..." >&4
$cat >gccvers.c <<EOM
@@ -3113,6 +3158,154 @@ case "$gccversion" in
1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
esac
+: see how we invoke the C preprocessor
+echo " "
+echo "Now, how can we feed standard input to your C preprocessor..." >&4
+cat <<'EOT' >testcpp.c
+#define ABC abc
+#define XYZ xyz
+ABC.XYZ
+EOT
+cd ..
+if test ! -f cppstdin; then
+ if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
+ # AIX cc -E doesn't show the absolute headerfile
+ # locations but we'll cheat by using the -M flag.
+ 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
+wrapper=`pwd`/cppstdin
+ok='false'
+cd UU
+
+if $test "X$cppstdin" != "X" && \
+ $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+then
+ echo "You used to use $cppstdin $cppminus so we'll use that again."
+ case "$cpprun" in
+ '') echo "But let's see if we can live without a wrapper..." ;;
+ *)
+ if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+ then
+ echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
+ ok='true'
+ else
+ echo "(However, $cpprun $cpplast does not work, let's see...)"
+ fi
+ ;;
+ esac
+else
+ case "$cppstdin" in
+ '') ;;
+ *)
+ echo "Good old $cppstdin $cppminus does not seem to be of any help..."
+ ;;
+ esac
+fi
+
+if $ok; then
+ : nothing
+elif echo 'Maybe "'"$cc"' -E" will work...'; \
+ $cc -E <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yup, it does."
+ x_cpp="$cc -E"
+ x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
+ $cc -E - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yup, it does."
+ x_cpp="$cc -E"
+ x_minus='-';
+elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
+ $cc -P <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yipee, that works!"
+ x_cpp="$cc -P"
+ x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
+ $cc -P - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "At long last!"
+ x_cpp="$cc -P"
+ x_minus='-';
+elif echo 'No such luck, maybe "'$cpp'" will work...'; \
+ $cpp <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "It works!"
+ x_cpp="$cpp"
+ x_minus='';
+elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
+ $cpp - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Hooray, it works! I was beginning to wonder."
+ x_cpp="$cpp"
+ x_minus='-';
+elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
+ $wrapper <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ x_cpp="$wrapper"
+ x_minus=''
+ echo "Eureka!"
+else
+ dflt=''
+ rp="No dice. I can't find a C preprocessor. Name one:"
+ . ./myread
+ x_cpp="$ans"
+ x_minus=''
+ $x_cpp <testcpp.c >testcpp.out 2>&1
+ if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "OK, that will do." >&4
+ else
+echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
+ exit 1
+ fi
+fi
+
+case "$ok" in
+false)
+ cppstdin="$x_cpp"
+ cppminus="$x_minus"
+ cpprun="$x_cpp"
+ cpplast="$x_minus"
+ set X $x_cpp
+ shift
+ case "$1" in
+ "$cpp")
+ echo "Perhaps can we force $cc -E using a wrapper..."
+ if $wrapper <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+ then
+ echo "Yup, we can."
+ cppstdin="$wrapper"
+ cppminus='';
+ else
+ echo "Nope, we'll have to live without it..."
+ fi
+ ;;
+ esac
+ case "$cpprun" in
+ "$wrapper")
+ cpprun=''
+ cpplast=''
+ ;;
+ esac
+ ;;
+esac
+
+case "$cppstdin" in
+"$wrapper"|'cppstdin') ;;
+*) $rm -f $wrapper;;
+esac
+$rm -f testcpp.c testcpp.out
+
: decide how portable to be. Allow command line overrides.
case "$d_portable" in
"$undef") ;;
@@ -3406,7 +3599,7 @@ if $test -f /bin/mips && /bin/mips; then
/bsd43
#endif
EOCP
- if $cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
+ 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'
@@ -3439,154 +3632,6 @@ y) fn=d/
;;
esac
-: see how we invoke the C preprocessor
-echo " "
-echo "Now, how can we feed standard input to your C preprocessor..." >&4
-cat <<'EOT' >testcpp.c
-#define ABC abc
-#define XYZ xyz
-ABC.XYZ
-EOT
-cd ..
-if test ! -f cppstdin; then
- if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
- # AIX cc -E doesn't show the absolute headerfile
- # locations but we'll cheat by using the -M flag.
- 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
-wrapper=`pwd`/cppstdin
-ok='false'
-cd UU
-
-if $test "X$cppstdin" != "X" && \
- $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-then
- echo "You used to use $cppstdin $cppminus so we'll use that again."
- case "$cpprun" in
- '') echo "But let's see if we can live without a wrapper..." ;;
- *)
- if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- then
- echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
- ok='true'
- else
- echo "(However, $cpprun $cpplast does not work, let's see...)"
- fi
- ;;
- esac
-else
- case "$cppstdin" in
- '') ;;
- *)
- echo "Good old $cppstdin $cppminus does not seem to be of any help..."
- ;;
- esac
-fi
-
-if $ok; then
- : nothing
-elif echo 'Maybe "'"$cc"' -E" will work...'; \
- $cc -E <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, it does."
- x_cpp="$cc -E"
- x_minus='';
-elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
- $cc -E - <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, it does."
- x_cpp="$cc -E"
- x_minus='-';
-elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
- $cc -P <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yipee, that works!"
- x_cpp="$cc -P"
- x_minus='';
-elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
- $cc -P - <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "At long last!"
- x_cpp="$cc -P"
- x_minus='-';
-elif echo 'No such luck, maybe "'$cpp'" will work...'; \
- $cpp <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "It works!"
- x_cpp="$cpp"
- x_minus='';
-elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
- $cpp - <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Hooray, it works! I was beginning to wonder."
- x_cpp="$cpp"
- x_minus='-';
-elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
- $wrapper <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- x_cpp="$wrapper"
- x_minus=''
- echo "Eureka!"
-else
- dflt=''
- rp="No dice. I can't find a C preprocessor. Name one:"
- . ./myread
- x_cpp="$ans"
- x_minus=''
- $x_cpp <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "OK, that will do." >&4
- else
-echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
- exit 1
- fi
-fi
-
-case "$ok" in
-false)
- cppstdin="$x_cpp"
- cppminus="$x_minus"
- cpprun="$x_cpp"
- cpplast="$x_minus"
- set X $x_cpp
- shift
- case "$1" in
- "$cpp")
- echo "Perhaps can we force $cc -E using a wrapper..."
- if $wrapper <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- then
- echo "Yup, we can."
- cppstdin="$wrapper"
- cppminus='';
- else
- echo "Nope, we'll have to live without it..."
- fi
- ;;
- esac
- case "$cpprun" in
- "$wrapper")
- cpprun=''
- cpplast=''
- ;;
- esac
- ;;
-esac
-
-case "$cppstdin" in
-"$wrapper"|'cppstdin') ;;
-*) $rm -f $wrapper;;
-esac
-$rm -f testcpp.c testcpp.out
-
: Set private lib path
case "$plibpth" in
'') if ./mips; then
@@ -9190,10 +9235,6 @@ eval $inlibc
set getespwnam d_getespwnam
eval $inlibc
-: see if getespwnam exists
-set getespwnam d_getespwnam
-eval $inlibc
-
: see if getfsstat exists
set getfsstat d_getfsstat
@@ -9376,10 +9417,6 @@ eval $hasproto
set getprpwnam d_getprpwnam
eval $inlibc
-: see if getprpwnam exists
-set getprpwnam d_getprpwnam
-eval $inlibc
-
: see if getpwent exists
set getpwent d_getpwent
eval $inlibc
@@ -14358,10 +14395,6 @@ eval $inhdr
set prot.h i_prot
eval $inhdr
-: see if this is a prot.h system
-set prot.h i_prot
-eval $inhdr
-
echo " "
$echo "Guessing which symbols your C compiler and preprocessor define..." >&4
$cat <<'EOSH' > Cppsym.know