X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=35b3878b99c4deb3190169b9869b62f4b93c0032;hb=e3acbfda4f677df31695d7b2b63b7e9e854a3514;hp=a40ae15c098e3319d169c55f83c40ad48b7b0d9f;hpb=4f309e22b6a6724aa264cfb7b3fe23d65dadfd18;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index a40ae15..35b3878 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 Tue Feb 29 19:31:46 EET 2000 [metaconfig 3.0 PL70] +# Generated on Wed Jul 12 07:59:35 EET DST 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <checkcc +$startsh +EOS +cat <<'EOSC' >>checkcc +case "$cc" in +'') ;; +*) $rm -f try try.* + $cat >try.c <&4 + despair=yes + trygcc=yes + case "$cc" in + *gcc*) trygcc=no ;; + esac + case "`$cc -v -c try.c 2>&1`" in + *gcc*) trygcc=no ;; + esac + if $test X"$trygcc" = Xyes; then + if gcc -o try -c try.c; then + echo " " + echo "You seem to have a working gcc, though." >&4 + rp="Would you like to use it?" + dflt=y + if $test -f myread; then + . ./myread + else + if $test -f UU/myread; then + . ./UU/myread + else + echo "Cannot find myread, sorry. Aborting." >&2 + exit 1 + fi + fi + case "$ans" in + [yY]*) cc=gcc; ccflags=''; 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.* + ;; +esac +EOSC + : determine whether symbolic links are supported echo " " $touch blurfl @@ -2143,6 +2220,7 @@ if test -f config.sh; then ;; esac fi +. ./UU/checkcc if test ! -f config.sh; then $cat </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 @@ -3054,6 +3136,8 @@ fi if $test -f cc.cbu; then . ./cc.cbu fi +. ./checkcc + echo " " echo "Checking for GNU cc in disguise and/or its version number..." >&4 $cat >gccvers.c <&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.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.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.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.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.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.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.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.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.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.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.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") ;; @@ -3257,6 +3489,7 @@ while test "$type"; do true) case "$ansexp" in /*) value="$ansexp" ;; + [a-zA-Z]:/*) value="$ansexp" ;; *) redo=true case "$already" in @@ -3303,13 +3536,15 @@ while test "$type"; do Directory) for fp in $gfpth; do if test "X$fp" = X.; then - pf="$ansexp" + dir="$ans" + direxp="$ansexp" else - pf="$fp/$ansexp" + dir="$fp/$ansexp" + direxp="$fp/$ansexp" fi - if test -d "$pf"; then + if test -d "$direxp"; then type='' - value="$pf" + value="$dir" break fi done @@ -3382,7 +3617,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' @@ -3415,178 +3650,30 @@ 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 +: 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 -if $test "X$cppstdin" != "X" && \ - $cppstdin $cppminus 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.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.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.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.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.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.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.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.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.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.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 - plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib" - fi;; -esac -case "$libpth" in -' ') dlist='';; -'') dlist="$loclibpth $plibpth $glibpth";; -*) dlist="$libpth";; -esac - -: 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 - fi -done -$cat <<'EOM' +: 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 + 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 @@ -3704,9 +3791,7 @@ case "$libswanted" in '') libswanted='c_s';; esac case "$usesocks" in -$define) - libswanted="$libswanted socks5 socks5_sh" - ;; +"$define") libswanted="$libswanted socks5 socks5_sh" ;; esac libsfound='' libsfiles='' @@ -4338,9 +4423,9 @@ case "$uselargefiles" in : Look for a hint-file generated 'call-back-unit'. If the : user has specified that a large files perl is to be built, : we may need to set or change some other defaults. - if $test -f uselfs.cbu; then + if $test -f uselargefiles.cbu; then echo "Your platform has some specific hints for large file builds, using them..." - . ./uselfs.cbu + . ./uselargefiles.cbu echo " " echo "Rechecking to see how big your file offsets are..." >&4 $cat >try.c <&4 @@ -4424,7 +4508,6 @@ EOM use64bitint="$define" ;; esac -# Backward compatibility (use64bits is deprecated). case "$use64bits" in "$define"|true|[yY]*) cat <&4 @@ -4434,7 +4517,6 @@ EOM use64bitint="$define" ;; esac -# Thinko compatibilities. case "$use64bitints" in "$define"|true|[yY]*) cat <&4 @@ -4444,6 +4526,24 @@ EOM use64bitint="$define" ;; esac +case "$use64bitsint" in +"$define"|true|[yY]*) + cat <&4 + +*** There is no Configure -Duse64bitsint, using -Duse64bitint instead. +EOM + use64bitint="$define" + ;; +esac +case "$uselonglongs" in +"$define"|true|[yY]*) + cat <&4 + +*** There is no Configure -Duselonglongs, using -Duse64bitint instead. +EOM + use64bitint="$define" + ;; +esac case "$use64bitsall" in "$define"|true|[yY]*) cat <&4 @@ -4491,6 +4591,14 @@ esac set use64bitint eval $setvar +case "$use64bitall" in +"$define"|true|[yY]*) dflt='y' ;; +*) case "$longsize" in + 8) dflt='y' ;; + *) dflt='n' ;; + esac + ;; +esac cat <&4 $rm -f malloc.[co] $cat <&4 @@ -5330,148 +5598,77 @@ case "$prototype" in echo " " cat <&4 -$me: FATAL ERROR: -This version of $package can only be compiled by a compiler that -understands function prototypes. Unfortunately, your C compiler - $cc $ccflags -doesn't seem to understand them. Sorry about that. - -If GNU cc is available for your system, perhaps you could try that instead. - -Eventually, we hope to support building Perl with pre-ANSI compilers. -If you would like to help in that effort, please contact . - -Aborting Configure now. -EOM - exit 2 - ;; -esac - -: determine where public executables go -echo " " -set dflt bin bin -eval $prefixit -fn=d~ -rp='Pathname where the public executables will reside?' -. ./getfile -if $test "X$ansexp" != "X$binexp"; then - installbin='' -fi -bin="$ans" -binexp="$ansexp" -: Change installation prefix, if necessary. -: XXX Bug? -- ignores Configure -Dinstallprefix setting. -if $test X"$prefix" != X"$installprefix"; then - installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"` -else - installbin="$binexp" -fi - -: Find perl5.005 or later. -echo "Looking for a previously installed perl5.005 or later... " -case "$perl5" in -'') for tdir in `echo "$binexp:$PATH" | $sed "s/$path_sep/ /g"`; do - : Check if this perl is recent and can load a simple module - if $test -x $tdir/perl && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then - perl5=$tdir/perl - break; - elif $test -x $tdir/perl5 && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then - perl5=$tdir/perl - break; - fi - done - ;; -*) perl5="$perl5" - ;; -esac -case "$perl5" in -'') echo "None found. That's ok.";; -*) echo "Using $perl5." ;; -esac - -$cat <. +Aborting Configure now. EOM -fn=d~+ -rp='Pathname for the site-specific library files?' + exit 2 + ;; +esac + +: determine where public executables go +echo " " +set dflt bin bin +eval $prefixit +fn=d~ +rp='Pathname where the public executables will reside?' . ./getfile -sitelib="$ans" -sitelibexp="$ansexp" +if $test "X$ansexp" != "X$binexp"; then + installbin='' +fi +bin="$ans" +binexp="$ansexp" : Change installation prefix, if necessary. +: XXX Bug? -- ignores Configure -Dinstallprefix setting. if $test X"$prefix" != X"$installprefix"; then - installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"` + installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"` else - installsitelib="$sitelibexp" + installbin="$binexp" fi +: Find perl5.005 or later. +echo "Looking for a previously installed perl5.005 or later... " +case "$perl5" in +'') for tdir in `echo "$binexp:$PATH" | $sed "s/$path_sep/ /g"`; do + : Check if this perl is recent and can load a simple module + if $test -x $tdir/perl && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then + perl5=$tdir/perl + break; + elif $test -x $tdir/perl5 && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then + perl5=$tdir/perl + break; + fi + done + ;; +*) perl5="$perl5" + ;; +esac +case "$perl5" in +'') echo "None found. That's ok.";; +*) echo "Using $perl5." ;; +esac + : Determine list of previous versions to include in @INC $cat > getverlist <> getverlist <<'EOPL' # Can't have leading @ because metaconfig interprets it as a command! ;@inc_version_list=(); -$stem=dirname($sitelib); # XXX Redo to do opendir/readdir? if (-d $stem) { chdir($stem); @@ -5490,10 +5687,10 @@ else { foreach $d (@candidates) { if ($d lt $version) { if ($d ge $api_versionstring) { - unshift(@inc_version_list, "$d/$archname", $d); + unshift(@inc_version_list, grep { -d } "$d/$archname", $d); } elsif ($d ge "5.005") { - unshift(@inc_version_list, $d); + unshift(@inc_version_list, grep { -d } $d); } } else { @@ -5558,7 +5755,7 @@ $rm -f getverlist echo " " if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then $cat <$first) 2>/dev/null; then if $test -f 123456789abcde; then echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4 val="$undef" else - if (echo hi >$second) 2>/dev/null; then - if $test -f /tmp/cf$$/123456789abcde; then - $cat <<'EOM' -That's peculiar... You can have filenames longer than 14 characters, but only -on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems -I shall consider your system cannot support long filenames at all. -EOM - val="$undef" - else - echo 'You can have filenames longer than 14 characters.' >&4 - val="$define" - fi - else - $cat <<'EOM' -How confusing! Some of your filesystems are sane enough to allow filenames -longer than 14 characters but some others like /tmp can't even think about them. -So, for now on, I shall assume your kernel does not allow them at all. -EOM - val="$undef" - fi + echo 'You can have filenames longer than 14 characters.'>&4 + val="$define" fi else $cat <<'EOM' -You can't have filenames longer than 14 chars. You can't even think about them! +You can't have filenames longer than 14 chars. +You can't even think about them! EOM val="$undef" fi set d_flexfnam eval $setvar -$rm -rf /tmp/cf$$ 123456789abcde* +$rm -rf 123456789abcde* : determine where library module manual pages go set man3dir man3dir none @@ -6635,7 +6812,7 @@ esac echo "If you don't want the manual sources installed, answer 'none'." prog=`echo $package | $sed 's/-*[0-9.]*$//'` case "$man3dir" in -'') dflt=`echo $man1dir | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` +'') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` if $test -d "$privlib/man/man3"; then cat <&4 @@ -6653,16 +6830,18 @@ EOM esac fi ;; -' ') dflt=none;; *) dflt="$man3dir" ;; esac +case "$dflt" in +' ') dflt=none ;; +esac echo " " fn=dn+~ rp="Where do the $package library man pages (source) go?" . ./getfile man3dir="$ans" man3direxp="$ansexp" -case "$man1dir" in +case "$man3dir" in '') man3dir=' ' installman3dir='';; esac @@ -7107,37 +7286,6 @@ else installscript="$scriptdirexp" fi -: determine where site specific architecture-dependent libraries go. -: sitelib default is /usr/local/lib/perl5/site_perl/$version -: sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname -: sitelib may have an optional trailing /share. -case "$sitearch" in -'') dflt=`echo $sitelib | $sed 's,/share$,,'` - dflt="$dflt/$archname" - ;; -*) dflt="$sitearch" - ;; -esac -set sitearch sitearch none -eval $prefixit -$cat <open3.c <<'EOCP' @@ -8583,7 +8727,8 @@ extern int errno; #ifdef I_UNISTD #include #endif -#ifdef $i_string +#$i_string I_STRING +#ifdef I_STRING #include #else #include @@ -9023,6 +9168,10 @@ $rm -f try.* try set d_fpos64_t eval $setvar +: see if frexpl exists +set frexpl d_frexpl +eval $inlibc + hasstruct='varname=$1; struct=$2; shift; shift; while $test $# -ge 2; do case "$1" in @@ -9100,6 +9249,10 @@ esac set getcwd d_getcwd eval $inlibc +: see if getespwnam exists +set getespwnam d_getespwnam +eval $inlibc + : see if getfsstat exists set getfsstat d_getfsstat @@ -9278,6 +9431,10 @@ echo " " set d_getprotoprotos getprotoent $i_netdb netdb.h eval $hasproto +: see if getprpwnam exists +set getprpwnam d_getprpwnam +eval $inlibc + : see if getpwent exists set getpwent d_getpwent eval $inlibc @@ -9300,10 +9457,6 @@ echo " " set d_getservprotos getservent $i_netdb netdb.h eval $hasproto -: see if getspent exists -set getspent d_getspent -eval $inlibc - : see if getspnam exists set getspnam d_getspnam eval $inlibc @@ -9513,6 +9666,14 @@ set d_isascii eval $setvar $rm -f isascii* +: see if isnan exists +set isnan d_isnan +eval $inlibc + +: see if isnanl exists +set isnanl d_isnanl +eval $inlibc + : see if killpg exists set killpg d_killpg eval $inlibc @@ -9595,7 +9756,7 @@ echo 'int main() { long long x = 7; return 0; }' > try.c set try if eval $compile; then val="$define" - echo "You have have long long." + echo "You have long long." else val="$undef" echo "You do not have long long." @@ -9732,6 +9893,10 @@ esac +: see if modfl exists +set modfl d_modfl +eval $inlibc + : see if mprotect exists set mprotect d_mprotect eval $inlibc @@ -10101,6 +10266,39 @@ esac $rm -f try.* try +case "$d_nv_preserves_uv" in +"$define") d_nv_preserves_uv_bits=`expr $uvsize \* 8` ;; +*) $echo "Checking how many bits of your UVs your NVs can preserve..." >&4 + $cat <try.c +#include +int main() { + $uvtype u = 0; + int n = 8 * $uvsize; + int i; + for (i = 0; i < n; i++) { + u = u << 1 | ($uvtype)1; + if (($uvtype)($nvtype)u != u) + break; + } + printf("%d\n", i); + exit(0); +} +EOP + set try + if eval $compile; then + d_nv_preserves_uv_bits="`./try$exe_ext`" + fi + case "$d_nv_preserves_uv_bits" in + [1-9]*) $echo "Your NVs can preserve $d_nv_preserves_uv_bits bits of your UVs." 2>&1 ;; + *) $echo "Can't figure out how many bits your NVs preserve." 2>&1 + d_nv_preserves_uv_bits="$undef" + ;; + esac + $rm -f try.* try + ;; +esac + + : check for off64_t echo " " @@ -10927,10 +11125,6 @@ eval $inlibc set setsid d_setsid eval $inlibc -: see if setspent exists -set setspent d_setspent -eval $inlibc - : see if setvbuf exists set setvbuf d_setvbuf eval $inlibc @@ -11441,6 +11635,54 @@ eval $inlibc set strtoll d_strtoll eval $inlibc +case "$d_longlong-$d_strtoll" in +"$define-$define") + $cat <try.c <<'EOCP' +#include +#ifdef __hpux +#define strtoll __strtoll +#endif +#include +extern long long int strtoll(char *s, char **, int); +static int bad = 0; +int check(char *s, long long ell, int een) { + long long gll; + errno = 0; + gll = strtoll(s, 0, 10); + if (!((gll == ell) && (errno == een))) + bad++; +} +int main() { + check(" 1", 1LL, 0); + check(" 0", 0LL, 0); + check("-1", -1LL, 0); + check("-9223372036854775808", -9223372036854775808LL, 0); + check("-9223372036854775808", -9223372036854775808LL, 0); + check(" 9223372036854775807", 9223372036854775807LL, 0); + check("-9223372036854775808", -9223372036854775808LL, 0); + check(" 9223372036854775808", 9223372036854775807LL, ERANGE); + check("-9223372036854775809", -9223372036854775808LL, ERANGE); + if (!bad) + printf("ok\n"); +} +EOCP + set try + if eval $compile; then + case "`./try`" in + ok) echo "Your strtoll() seems to be working okay." ;; + *) cat <&4 +Your strtoll() doesn't seem to be working okay. +EOM + d_strtoll="$undef" + ;; + esac + fi + ;; +esac + : see if strtoul exists set strtoul d_strtoul eval $inlibc @@ -11449,6 +11691,49 @@ eval $inlibc set strtoull d_strtoull eval $inlibc +case "$d_longlong-$d_strtoull" in +"$define-$define") + $cat <try.c <<'EOCP' +#include +#ifdef __hpux +#define strtoull __strtoull +#endif +#include +extern unsigned long long int strtoull(char *s, char **, int); +static int bad = 0; +int check(char *s, long long eull, int een) { + long long gull; + errno = 0; + gull = strtoull(s, 0, 10); + if (!((gull == eull) && (errno == een))) + bad++; +} +int main() { + check(" 1", 1LL, 0); + check(" 0", 0LL, 0); + check("18446744073709551615", 18446744073709551615ULL, 0); + check("18446744073709551616", 18446744073709551615ULL, ERANGE); + if (!bad) + printf("ok\n"); +} +EOCP + set try + if eval $compile; then + case "`./try`" in + ok) echo "Your strtoull() seems to be working okay." ;; + *) cat <&4 +Your strtoull() doesn't seem to be working okay. +EOM + d_strtoull="$undef" + ;; + esac + fi + ;; +esac + : see if strtouq exists set strtouq d_strtouq eval $inlibc @@ -12409,9 +12694,52 @@ EOM $rm -f core try.core core.try.* case "$fflushNULL" in x) $cat >&4 <tryp.c < +int +main(int argc, char **argv) +{ + char buf[1024]; + int i; + char *bp = buf; + while (1) { + while ((i = getc(stdin)) != -1 + && (*bp++ = i) != '\n' + && bp < &buf[1024]) + /* DO NOTHING */ ; + *bp = '\0'; + fprintf(stdout, "%s", buf); + fflush(NULL); + if (i == -1) + return 0; + bp = buf; + } +} +EOCP + fflushNULL="$define" + set tryp + if eval $compile; then + $rm -f tryp.out + $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out + if cmp tryp.c tryp.out >/dev/null 2>&1; then + $cat >&4 <&4 <&4 <&4 <tryp.c < +int +main(int argc, char **argv) +{ + char buf[1024]; + int i; + char *bp = buf; + while (1) { + while ((i = getc(stdin)) != -1 + && (*bp++ = i) != '\n' + && bp < &buf[1024]) + /* DO NOTHING */ ; + *bp = '\0'; + fprintf(stdout, "%s", buf); + fflush(stdin); + if (i == -1) + return 0; + bp = buf; + } +} +EOCP + set tryp + if eval $compile; then + $rm -f tryp.out + $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out + if cmp tryp.c tryp.out >/dev/null 2>&1; then + $cat >&4 </dev/null - if $test -s try.out -a "X$?" = X42; then - fflushall="`$cat try.out`" - fi - fi - $rm -f core try.core core.try.* + : now check for fflushall behaviour case "$fflushall" in - x) $cat >&4 <&4 </dev/null + if $test -s try.out -a "X$?" = X42; then + fflushall="`$cat try.out`" + fi + fi + $rm -f core try.core core.try.* + case "$fflushall" in + x) $cat >&4 <&4 <&4 <&4 <&4 <&4 <&4 +cat > try.c < +#include +int main() { + printf("%d\n", (int)sizeof($sizetype)); + exit(0); +} +EOCP +set try +if eval $compile_ok; then + yyy=`./try` + case "$yyy" in + '') sizesize=4 + echo "(I can't execute the test program--guessing $sizesize.)" >&4 + ;; + *) sizesize=$yyy + echo "Your $zzz size is $sizesize bytes." + ;; + esac +else + sizesize=4 + echo "(I can't compile the test program--guessing $sizesize.)" >&4 +fi + + : check for socklen_t echo " " echo "Checking to see if you have socklen_t..." >&4 @@ -13594,7 +13996,7 @@ else val="$undef" echo "You do not have socklen_t." case "$sizetype" in - size_t) echo "(You do have size_t, that might work.)" ;; + size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;; esac fi $rm -f try try.* @@ -13613,7 +14015,7 @@ EOM case "$d_socklen_t" in "$define") yyy="$yyy socklen_t" esac - yyy="$yyy $sizetype int long" + yyy="$yyy $sizetype int long unsigned" for xxx in $yyy; do case "$socksizetype" in '') try="extern int accept(int, struct sockaddr *, $xxx *);" @@ -13633,8 +14035,8 @@ EOM ;; esac ;; -*) : no sockets, so pick relatively harmless defaults - socksizetype='char *' +*) : no sockets, so pick relatively harmless default + socksizetype='int' ;; esac @@ -13924,6 +14326,10 @@ eval $setvar set iconv.h i_iconv eval $inhdr +: see if this is a ieeefp.h system +set ieeefp.h i_ieeefp +eval $inhdr + : see if locale.h is available set locale.h i_locale eval $inhdr @@ -14003,6 +14409,10 @@ eval $inhdr set poll.h i_poll 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 @@ -14359,6 +14769,10 @@ $rm -f varargs* set stddef.h i_stddef eval $inhdr +: see if this is a sunmath.h system +set sunmath.h i_sunmath +eval $inhdr + : see if sys/access.h is available set sys/access.h i_sysaccess eval $inhdr @@ -14907,7 +15321,6 @@ d_endnent='$d_endnent' d_endpent='$d_endpent' d_endpwent='$d_endpwent' d_endsent='$d_endsent' -d_endspent='$d_endspent' d_eofnblk='$d_eofnblk' d_eunice='$d_eunice' d_fchmod='$d_fchmod' @@ -14922,6 +15335,7 @@ d_flock='$d_flock' d_fork='$d_fork' d_fpathconf='$d_fpathconf' d_fpos64_t='$d_fpos64_t' +d_frexpl='$d_frexpl' d_fs_data_s='$d_fs_data_s' d_fseeko='$d_fseeko' d_fsetpos='$d_fsetpos' @@ -14930,6 +15344,7 @@ d_fstatvfs='$d_fstatvfs' d_ftello='$d_ftello' d_ftime='$d_ftime' d_getcwd='$d_getcwd' +d_getespwnam='$d_getespwnam' d_getfsstat='$d_getfsstat' d_getgrent='$d_getgrent' d_getgrps='$d_getgrps' @@ -14954,12 +15369,12 @@ d_getpgrp='$d_getpgrp' d_getppid='$d_getppid' d_getprior='$d_getprior' d_getprotoprotos='$d_getprotoprotos' +d_getprpwnam='$d_getprpwnam' d_getpwent='$d_getpwent' d_getsbyname='$d_getsbyname' d_getsbyport='$d_getsbyport' d_getsent='$d_getsent' d_getservprotos='$d_getservprotos' -d_getspent='$d_getspent' d_getspnam='$d_getspnam' d_gettimeod='$d_gettimeod' d_gnulibc='$d_gnulibc' @@ -14971,6 +15386,8 @@ d_index='$d_index' d_inetaton='$d_inetaton' d_int64_t='$d_int64_t' d_isascii='$d_isascii' +d_isnan='$d_isnan' +d_isnanl='$d_isnanl' d_killpg='$d_killpg' d_lchown='$d_lchown' d_ldbl_dig='$d_ldbl_dig' @@ -14997,6 +15414,7 @@ d_mkstemp='$d_mkstemp' d_mkstemps='$d_mkstemps' d_mktime='$d_mktime' d_mmap='$d_mmap' +d_modfl='$d_modfl' d_mprotect='$d_mprotect' d_msg='$d_msg' d_msg_ctrunc='$d_msg_ctrunc' @@ -15013,6 +15431,7 @@ d_munmap='$d_munmap' d_mymalloc='$d_mymalloc' d_nice='$d_nice' d_nv_preserves_uv='$d_nv_preserves_uv' +d_nv_preserves_uv_bits='$d_nv_preserves_uv_bits' d_off64_t='$d_off64_t' d_old_pthread_create_joinable='$d_old_pthread_create_joinable' d_oldpthreads='$d_oldpthreads' @@ -15020,6 +15439,7 @@ d_oldsock='$d_oldsock' d_open3='$d_open3' d_pathconf='$d_pathconf' d_pause='$d_pause' +d_perl_otherlibdirs='$d_perl_otherlibdirs' d_phostname='$d_phostname' d_pipe='$d_pipe' d_poll='$d_poll' @@ -15075,7 +15495,6 @@ d_setrgid='$d_setrgid' d_setruid='$d_setruid' d_setsent='$d_setsent' d_setsid='$d_setsid' -d_setspent='$d_setspent' d_setvbuf='$d_setvbuf' d_sfio='$d_sfio' d_shm='$d_shm' @@ -15131,6 +15550,7 @@ d_umask='$d_umask' d_uname='$d_uname' d_union_semun='$d_union_semun' d_ustat='$d_ustat' +d_vendorarch='$d_vendorarch' d_vendorbin='$d_vendorbin' d_vendorlib='$d_vendorlib' d_vfork='$d_vfork' @@ -15209,6 +15629,7 @@ i_float='$i_float' i_gdbm='$i_gdbm' i_grp='$i_grp' i_iconv='$i_iconv' +i_ieeefp='$i_ieeefp' i_inttypes='$i_inttypes' i_limits='$i_limits' i_locale='$i_locale' @@ -15223,6 +15644,7 @@ i_neterrno='$i_neterrno' i_netinettcp='$i_netinettcp' i_niin='$i_niin' i_poll='$i_poll' +i_prot='$i_prot' i_pthread='$i_pthread' i_pwd='$i_pwd' i_rpcsvcdbm='$i_rpcsvcdbm' @@ -15234,6 +15656,7 @@ i_stdarg='$i_stdarg' i_stddef='$i_stddef' i_stdlib='$i_stdlib' i_string='$i_string' +i_sunmath='$i_sunmath' i_sysaccess='$i_sysaccess' i_sysdir='$i_sysdir' i_sysfile='$i_sysfile' @@ -15290,6 +15713,7 @@ installsitebin='$installsitebin' installsitelib='$installsitelib' installstyle='$installstyle' installusrbinperl='$installusrbinperl' +installvendorarch='$installvendorarch' installvendorbin='$installvendorbin' installvendorlib='$installvendorlib' intsize='$intsize' @@ -15374,6 +15798,7 @@ optimize='$optimize' orderlib='$orderlib' osname='$osname' osvers='$osvers' +otherlibdirs='$otherlibdirs' package='$package' pager='$pager' passcat='$passcat' @@ -15445,9 +15870,11 @@ sitearchexp='$sitearchexp' sitebin='$sitebin' sitebinexp='$sitebinexp' sitelib='$sitelib' +sitelib_stem='$sitelib_stem' sitelibexp='$sitelibexp' siteprefix='$siteprefix' siteprefixexp='$siteprefixexp' +sizesize='$sizesize' sizetype='$sizetype' sleep='$sleep' smail='$smail' @@ -15529,9 +15956,12 @@ uvsize='$uvsize' uvtype='$uvtype' uvuformat='$uvuformat' uvxformat='$uvxformat' +vendorarch='$vendorarch' +vendorarchexp='$vendorarchexp' vendorbin='$vendorbin' vendorbinexp='$vendorbinexp' vendorlib='$vendorlib' +vendorlib_stem='$vendorlib_stem' vendorlibexp='$vendorlibexp' vendorprefix='$vendorprefix' vendorprefixexp='$vendorprefixexp'