X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/c9242b3f0d9b2cbf453ac874f8fd5f49f4790fab..d3383c753168a06bd659309ea5abfd8c6dcc7a08:/Configure diff --git a/Configure b/Configure index ee2662d..29604dd 100755 --- a/Configure +++ b/Configure @@ -25,7 +25,7 @@ # $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $ # -# Generated on Wed Jan 9 22:02:14 CET 2008 [metaconfig 3.0 PL70] +# Generated on Mon Sep 15 10:06:16 CEST 2008 [metaconfig 3.5 PL0] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ </dev/null 2>&1`; then echo "#!$xcat" >sharp $eunicefix sharp chmod +x sharp - ./sharp > today + ./sharp > today 2>/dev/null if test -s today; then sharpbang='#!' else echo "#! $xcat" > sharp $eunicefix sharp chmod +x sharp - ./sharp > today + ./sharp > today 2>/dev/null if test -s today; then sharpbang='#! ' else @@ -1648,7 +1656,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;; @@ -1732,7 +1740,7 @@ touch optdef.sh touch posthint.sh : set package name -package=perl5 +package='perl5' first=`echo $package | sed -e 's/^\(.\).*/\1/'` last=`echo $package | sed -e 's/^.\(.*\)/\1/'` case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in @@ -1778,11 +1786,11 @@ 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 @@ -1936,11 +1944,13 @@ rm -f .echotmp echo " " if test -f "$rsrc/MANIFEST"; then echo "First let's make sure your kit is complete. Checking..." >&4 - awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50) + awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \ + (split -l 50 2>/dev/null || split -50) rm -f missing tmppwd=`pwd` for filelist in x??; do - (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing") + (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \ + >/dev/null 2>>"$tmppwd/missing") done if test -s missing; then cat missing >&4 @@ -2280,14 +2290,13 @@ for dir in \$*; do exit 0 elif test "X$_exe" != X -a -f \$thisthing$_exe; then echo \$thisthing - exit 0 + exit 0 elif test -f \$dir/\$thing.exe; then if test -n "$DJGPP"; then echo \$dir/\$thing.exe elif test "$eunicefix" != ":"; then : on Eunice apparently echo \$dir/\$thing - exit 0 fi exit 0 fi @@ -2318,7 +2327,6 @@ tr uniq " trylist=" -Mcc ar bison byacc @@ -2670,7 +2678,7 @@ case "$lns" in esac echo " " - +: Make symlinks util case "$mksymlinks" in $define|true|[yY]*) case "$src" in @@ -3591,10 +3599,10 @@ cat >filexp <&4 @@ -4297,6 +4307,7 @@ EOM esac fi +: Check if multiplicity is required cat <&4 @@ -4846,6 +4856,7 @@ case "$firstmakefile" in '') firstmakefile='makefile';; esac +: Check for uselongdouble support case "$ccflags" in *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;; esac @@ -5116,7 +5127,7 @@ default|recommended) # as that way the compiler can do the right implementation dependant # thing. (NWC) case "$gccversion" in - ?*) set stack-protector -fstack-protector 'ldflags="$ldflags -fstack-protector"' + ?*) set stack-protector -fstack-protector eval $checkccflag ;; esac @@ -5258,6 +5269,15 @@ case "$ldflags" in ;; *) dflt="$ldflags";; esac +# See note above about -fstack-protector +case "$ccflags" in +*-fstack-protector*) + case "$dflt" in + *-fstack-protector*) ;; # Don't add it again + *) dflt="$dflt -fstack-protector" ;; + esac + ;; +esac : Try to guess additional flags to pick up local libraries. for thislibdir in $libpth; do @@ -5379,6 +5399,11 @@ $rm_try gcctest gcctest.out compile=' mc_file=$1; shift; +case "$usedevel" in $define|true|[yY]*) if $test ! -f "${mc_file}.c"; then +echo "Internal Configure script bug - compiler test file ${mc_file}.c is missing. Please report this to perlbug@perl.org" >&4; +exit 1; +fi; +esac; $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;' : define a shorthand compile call for compilations that should be ok. compile_ok=' @@ -5702,7 +5727,7 @@ case "$quadtype" in ;; esac - +: Do we want 64bit support case "$uselonglong" in "$define"|true|[yY]*) cat <&4 @@ -6548,6 +6573,10 @@ case "$inc_version_list" in esac $rm -f getverlist +: see if malloc/malloc.h has to be included +set malloc/malloc.h i_mallocmalloc +eval $inhdr + : see if this is a malloc.h system : we want a real compile instead of Inhdr because some systems have a : malloc.h that just gives a compile error saying to use stdlib.h instead @@ -6555,6 +6584,11 @@ echo " " $cat >try.c < #include +#$i_mallocmalloc I_MALLOCMALLOC +#ifdef I_MALLOCMALLOC +# include +#endif + int main () { return 0; } EOCP set try @@ -7057,6 +7091,88 @@ EOM ;; esac +: DTrace support +dflt_dtrace='/usr/sbin/dtrace' +cat </dev/null 2>&1 \ + && rm -f perldtrace.tmp + then + echo " " + echo "Good: your $dtrace knows about the -h flag." + else + cat >&2 <&2 <&4 com='' - if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then + if $ar t $libc > libc.tmp && \ + $contains '^fprintf$' libc.tmp >/dev/null 2>&1 + then for thisname in $libnames $libc; do $ar t $thisname >>libc.tmp done $sed -e "s/\\$_o\$//" < libc.tmp > libc.list echo "Ok." >&4 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then - # Repeat libc to extract forwarders to DLL entries too for thisname in $libnames $libc; do $ar tv $thisname >>libc.tmp - # Revision 50 of EMX has bug in $ar. - # it will not extract forwarders to DLL entries - # Use emximp which will extract exactly them. emximp -o tmp.imp $thisname \ 2>/dev/null && \ $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \ < tmp.imp >>libc.tmp - $rm tmp.imp + $rm -f tmp.imp done $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list echo "Ok." >&4 else echo "$ar didn't seem to work right." >&4 echo "Maybe this is a Cray...trying bld instead..." >&4 - if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list + if bld t $libc | \ + $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list && + $test -s libc.list then for thisname in $libnames; do bld t $libnames | \ @@ -7611,7 +7728,8 @@ define) *) if $test -f /lib/syscalls.exp; then echo " " echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4 - $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list + $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' \ + /lib/syscalls.exp >>libc.list fi ;; esac @@ -7924,6 +8042,16 @@ EOM ''|' ') dflt='none' ;; esac + case "$ldflags" in + *-fstack-protector*) + case "$dflt" in + *-fstack-protector*) ;; # Don't add it again + *) dflt="$dflt -fstack-protector" ;; + esac + ;; + esac + + rp="Any special flags to pass to $ld to create a dynamically loaded library?" . ./myread case "$ans" in @@ -7962,6 +8090,7 @@ EOM ;; esac +: Do we want a shared libperl? also='' case "$usedl" in $undef) @@ -8024,9 +8153,9 @@ true) # a version-specific architecture-dependent library, the version # number isn't really that important, except for making cc/ld happy. # - # A name such as libperl.so.3.1 + # A name such as libperl.so.10.1 majmin="libperl.$so.$patchlevel.$subversion" - # A name such as libperl.so.301 + # A name such as libperl.so.100 majonly=`echo $patchlevel $subversion | $awk '{printf "%d%02d", $1, $2}'` majonly=libperl.$so.$majonly @@ -8040,8 +8169,12 @@ true) linux*|gnu*) # ld won't link with a bare -lperl otherwise. dflt=libperl.$so ;; - cygwin*) # ld links against an importlib - dflt=libperl$lib_ext + cygwin*) # ld links now against the dll directly + majmin="cygperl5_${patchlevel}_${subversion}.${so}" + majonly=`echo $patchlevel $subversion | + $awk '{printf "%03d%03d", $1, $2}'` + majonly=cygperl5.$majonly.$so + dflt=$majmin ;; *) # Try to guess based on whether libc has major.minor. case "$libc" in @@ -8114,7 +8247,7 @@ shrpdir=$archlibexp/CORE xxx='' tmp_shrpenv='' if "$useshrplib"; then - case "$osname" in + case "$osname" in aix) # We'll set it in Makefile.SH... ;; @@ -8137,13 +8270,16 @@ if "$useshrplib"; then # hpux doesn't like the default, either. tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\"" ;; + cygwin) + # cygwin needs only ldlibpth + ;; *) tmp_shrpenv="env LD_RUN_PATH=$shrpdir" ;; esac case "$xxx" in '') ;; - *) + *) # Only add $xxx if it isn't already in ccdlflags. case " $ccdlflags " in *" $xxx "*) ;; @@ -8151,7 +8287,7 @@ if "$useshrplib"; then cat <&4 Adding $xxx to the flags -passed to $ld so that the perl executable will find the +passed to $ld so that the perl executable will find the installed shared $libperl. EOM @@ -8291,7 +8427,7 @@ You can't have filenames longer than 14 chars. You can't even think about them! EOM val="$undef" -fi +fi set d_flexfnam eval $setvar $rm -rf 123456789abcde* @@ -8576,11 +8712,11 @@ case "$myhostname" in echo "(Attempting domain name extraction from $tans)" dflt=.`$sed -n -e 's/ / /g' \ -e 's/^search *\([^ ]*\).*/\1/p' $tans \ - | ./tr '[A-Z]' '[a-z]' 2>/dev/null` + -e 1q 2>/dev/null` case "$dflt" in .) dflt=.`$sed -n -e 's/ / /g' \ -e 's/^domain *\([^ ]*\).*/\1/p' $tans \ - | ./tr '[A-Z]' '[a-z]' 2>/dev/null` + -e 1q 2>/dev/null` ;; esac fi @@ -8649,6 +8785,7 @@ case "$phostname" in ;; esac +: determine the e-mail address of the user who is running us $cat </dev/null 2>&1 \ - && rm -f perldtrace.tmp - then - echo " " - echo "Good: your $dtrace knows about the -h flag." - else - cat >&2 <&4 - $cat >builtin.c <<'EOCP' + $cat >try.c <<'EOCP' int main(void) { int n = 50; if ( __builtin_expect(n, 0) ) n = 1; + /* Remember shell exit code truth is 0, C truth is non-zero */ + return !(n == 1); } EOCP set try - if eval $compile; then - echo "Your C compiler supports __builtin_choose_expr." + if eval $compile && $run ./try; then + echo "Your C compiler supports __builtin_expect." val="$define" else - echo "Your C compiler doesn't seem to understand __builtin_choose_expr." + echo "Your C compiler doesn't seem to understand __builtin_expect." val="$undef" fi ;; @@ -11026,6 +11101,7 @@ eval $inlibc set clearenv d_clearenv eval $inlibc +: Define hasstruct macro for Configure internal use hasstruct='varname=$1; struct=$2; shift; shift; while $test $# -ge 2; do case "$1" in @@ -11044,9 +11120,9 @@ set $varname; eval $setvar; $rm_try' +: see whether socket exists socketlib='' sockethdr='' -: see whether socket exists echo " " $echo $n "Hmm... $c" >&4 if set socket val -f d_socket; eval $csym; $val; then @@ -11131,7 +11207,7 @@ done set sys/uio.h i_sysuio eval $inhdr - +: Check for cmsghdr support echo " " echo "Checking to see if your system supports struct cmsghdr..." >&4 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h @@ -11619,6 +11695,7 @@ runnm="$xxx_runnm" set dlfcn.h i_dlfcn eval $inhdr +: Check what extension to use for shared libs case "$usedl" in $define|y|true) $cat << EOM @@ -12248,6 +12325,24 @@ set d_open3 eval $setvar $rm_try +: script used to emit important warnings +cat >warn <msg +else + cat >msg +fi +echo "*** WARNING:" >&4 +sed -e 's/^/*** /' &4 +echo "*** " >&4 +cat msg >>config.msg +echo " " >>config.msg +rm -f msg +EOS +chmod +x warn +$eunicefix warn + : see which of string.h or strings.h is needed echo " " strings=`./findhdr string.h` @@ -12260,7 +12355,7 @@ else if $test "$strings" && $test -r "$strings"; then echo "Using instead of ." >&4 else - echo "No string header found -- You'll surely have problems." >&4 + ./warn "No string header found -- You'll surely have problems." fi fi set i_string @@ -13039,7 +13134,6 @@ eval $inlibc set fpclassl d_fpclassl eval $inlibc - : check for fpos64_t echo " " echo "Checking to see if you have fpos64_t..." >&4 @@ -13074,7 +13168,7 @@ eval $inhdr set sys/mount.h i_sysmount eval $inhdr - +: Check for fs_data_s echo " " echo "Checking to see if your system supports struct fs_data..." >&4 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h @@ -13095,12 +13189,10 @@ esac set fsetpos d_fsetpos eval $inlibc - : see if fstatfs exists set fstatfs d_fstatfs eval $inlibc - : see if statvfs exists set statvfs d_statvfs eval $inlibc @@ -13164,7 +13256,6 @@ eval $inlibc set getespwnam d_getespwnam eval $inlibc - : see if getfsstat exists set getfsstat d_getfsstat eval $inlibc @@ -13910,6 +14001,7 @@ eval $hasproto set getpagesize d_getpagsz eval $inlibc +: Optional checks for getprotobyname and getprotobynumber : see if getprotobyname exists set getprotobyname d_getpbyname @@ -14270,6 +14362,7 @@ case "$d_getpwuid_r" in ;; esac +: Optional checks for getsbyname and getsbyport : see if getservbyname exists set getservbyname d_getsbyname @@ -15172,7 +15265,7 @@ fi set d_msg eval $setvar - +: Check for msghdr_s echo " " echo "Checking to see if your system supports struct msghdr..." >&4 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h @@ -15448,6 +15541,89 @@ case "$nv_preserves_uv_bits" in esac $rm_try +$echo "Checking to find the largest integer value your NVs can hold..." >&4 +: volatile so that the compiler has to store it out to memory. +if test X"$d_volatile" = X"$define"; then + volatile=volatile +fi +$cat <try.c +#include + +typedef $nvtype NV; + +int +main() { + NV value = 2; + int count = 1; + + while(count < 256) { + $volatile NV up = value + 1.0; + $volatile NV negated = -value; + $volatile NV down = negated - 1.0; + $volatile NV got_up = up - value; + int up_good = got_up == 1.0; + int got_down = down - negated; + int down_good = got_down == -1.0; + + if (down_good != up_good) { + fprintf(stderr, + "Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n", + up_good, (double) got_up, down_good, (double) got_down, + count, (double) value); + return 1; + } + if (!up_good) { + while (1) { + if (count > 8) { + count -= 8; + fputs("256.0", stdout); + } else { + count--; + fputs("2.0", stdout); + } + if (!count) { + puts(""); + return 0; + } + fputs("*", stdout); + } + } + value *= 2; + ++count; + } + fprintf(stderr, "Cannot overflow integer range, even at 2**%d (%.20f)\n", + count, (double) value); + return 1; +} +EOP +set try + +nv_overflows_integers_at='0' +if eval $compile; then + xxx="`$run ./try`" + case "$?" in + 0) + case "$xxx" in + 2*) cat >&4 <&4 <&4 <&4 : volatile so that the compiler has to store it out to memory. if test X"$d_volatile" = X"$define"; then @@ -15768,7 +15944,6 @@ eval $setvar set pthread_attr_setscope d_pthread_attr_setscope eval $inlibc - : see whether the various POSIXish _yields exist $cat >try.c < @@ -16893,7 +17068,6 @@ eval $inlibc set sfio.h i_sfio eval $inhdr - : see if sfio library is available case "$i_sfio" in $define) @@ -17297,7 +17471,6 @@ int main(int argc, char **argv) { EOP set try -d_sprintf_returns_strlen="$undef" if eval $compile; then xxx="`$run ./try`" case "$?" in @@ -17312,6 +17485,9 @@ EOM d_sprintf_returns_strlen="$undef" ;; esac +else + echo "(I can't seem to compile the test program--assuming it doesn't)" >&4 + d_sprintf_returns_strlen="$undef" fi $rm_try @@ -17411,24 +17587,21 @@ eval $hasproto set sys/stat.h i_sysstat eval $inhdr - : see if stat knows about block sizes echo " " echo "Checking to see if your struct stat has st_blocks field..." >&4 set d_statblks stat st_blocks $i_sysstat sys/stat.h eval $hasfield - : see if this is a sys/vfs.h system set sys/vfs.h i_sysvfs eval $inhdr - : see if this is a sys/statfs.h system set sys/statfs.h i_sysstatfs eval $inhdr - +: Check for statfs_s echo " " echo "Checking to see if your system supports struct statfs..." >&4 set d_statfs_s statfs $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h @@ -17439,10 +17612,9 @@ case "$d_statfs_s" in esac - : see if struct statfs knows about f_flags case "$d_statfs_s" in -define) +define) echo " " echo "Checking to see if your struct statfs has f_flags field..." >&4 set d_statfs_f_flags statfs f_flags $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h @@ -17945,6 +18117,10 @@ if test "X$d_time" = X -o X"$timetype" = X; then eval $setvar fi +: see if timegm exists +set timegm d_timegm +eval $inlibc + : see if this is a sys/times.h system set sys/times.h i_systimes eval $inhdr @@ -18937,7 +19113,7 @@ EOM fi fi fi - $rm_try + $rm -f core try.core core.try.* case "$fflushNULL" in x) $cat >&4 <&4 @@ -19429,6 +19605,7 @@ case "$ivdformat" in ;; esac +: Check format string for GID echo " " $echo "Checking the format string to be used for gids..." >&4 @@ -19476,7 +19653,6 @@ eval $inlibc set setgroups d_setgrps eval $inlibc - : Find type of 2nd arg to 'getgroups()' and 'setgroups()' echo " " case "$d_getgrps$d_setgrps" in @@ -19531,6 +19707,7 @@ esac set mad eval $setvar +: check whether make sets MAKE echo " " echo "Checking if your $make program sets \$(MAKE)..." >&4 case "$make_set_make" in @@ -19774,9 +19951,6 @@ case "$pager" in esac ;; *) dflt="$pager" - : Instruct ./getfile to trust the hinted or previous pager value, - : even if it does not begin with a slash. For example, on os2, - : pager might be cmd /c more. See comments in UU/getfile. fn="f/($pager)" ;; esac @@ -19845,6 +20019,161 @@ else fi $rm -f foo* bar* +: see if this is a values.h system +set values.h i_values +eval $inhdr + +: Check the max offset that gmtime and localtime accept +echo "Checking max offsets that gmtime () accepts" + +case $i_values in + define) yyy="#include " ;; + *) yyy="" ;; + esac + +$cat >try.c < +#include +#include +$yyy + +int i; +struct tm *tmp; +time_t pt; + +void gm_check (time_t t) +{ + tmp = gmtime (&t); + if (tmp == NULL || tmp->tm_year < -1900) + tmp = NULL; + else + pt = t; + } /* gm_check */ + +int check_max () +{ + tmp = NULL; + pt = 0; +#ifdef MAXLONG + gm_check (MAXLONG); +#endif + if (tmp == NULL || tmp->tm_year < 0) { + for (i = 63; i >= 0; i--) { + time_t x = pt | ((time_t)1 << i); + if (x < 0) continue; + gm_check (x); + } + } + printf ("sGMTIME_max=%ld\n", pt); + return (0); + } /* check_max */ + +int check_min () +{ + tmp = NULL; + pt = 0; +#ifdef MINLONG + gm_check (MINLONG); +#endif + if (tmp == NULL) { + for (i = 36; i >= 0; i--) { + time_t x = pt - ((time_t)1 << i); + if (x > 0) continue; + gm_check (x); + } + } + printf ("sGMTIME_min=%ld\n", pt); + return (0); + } /* check_min */ + +int main (int argc, char *argv[]) +{ + fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t)); + check_max (); + check_min (); + return (0); + } /* main */ +EOCP +set try +if eval $compile; then + eval `$run ./try` +else + echo "Cannot determine sGMTIME_max and sGMTIME_min." >&4 + fi +$rm_try + +echo "Checking max offsets that localtime () accepts" + +$cat >try.c < +#include +#include +$yyy + +int i; +struct tm *tmp; +time_t pt; + +void local_check (time_t t) +{ + tmp = localtime (&t); + if (tmp == NULL || tmp->tm_year < -1900) + tmp = NULL; + else + pt = t; + } /* local_check */ + +int check_max () +{ + tmp = NULL; + pt = 0; +#ifdef MAXLONG + local_check (MAXLONG); +#endif + if (tmp == NULL || tmp->tm_year < 0) { + for (i = 63; i >= 0; i--) { + time_t x = pt | ((time_t)1 << i); + if (x < 0) continue; + local_check (x); + } + } + printf ("sLOCALTIME_max=%ld\n", pt); + return (0); + } /* check_max */ + +int check_min () +{ + tmp = NULL; + pt = 0; +#ifdef MINLONG + local_check (MINLONG); +#endif + if (tmp == NULL) { + for (i = 36; i >= 0; i--) { + time_t x = pt - ((time_t)1 << i); + if (x > 0) continue; + local_check (x); + } + } + printf ("sLOCALTIME_min=%ld\n", pt); + return (0); + } /* check_min */ + +int main (int argc, char *argv[]) +{ + check_max (); + check_min (); + return (0); + } /* main */ +EOCP +set try +if eval $compile; then + eval `$run ./try` +else + echo "Cannot determine sLOCALTIME_max and sLOCALTIME_min." >&4 + fi +$rm_try + : check for type of arguments to select. case "$selecttype" in '') case "$d_select" in @@ -20003,11 +20332,6 @@ EOM esac : Trace out the files included by signal.h, then look for SIGxxx names. -: Remove SIGARRAYSIZE used by HPUX. -: Remove SIGSTKSIZE used by Linux. -: Remove SIGSTKSZ used by Posix. -: Remove SIGTYP void lines used by OS2. -: Some cpps, like os390, dont give the file name anywhere if [ "X$fieldn" = X ]; then : Just make some guesses. We check them later. xxx='/usr/include/signal.h /usr/include/sys/signal.h' @@ -20015,16 +20339,13 @@ else xxx=`echo '#include ' | $cppstdin $cppminus $cppflags 2>/dev/null | $grep '^[ ]*#.*include' | - $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq` + $awk "{print \\$$fieldn}" | $sed 's!"!!g' |\ + $sed 's!\\\\\\\\!/!g' | $sort | $uniq` fi -: Check this list of files to be sure we have parsed the cpp output ok. -: This will also avoid potentially non-existent files, such -: as ../foo/bar.h xxxfiles='' for xx in $xxx /dev/null ; do $test -f "$xx" && xxxfiles="$xxxfiles $xx" done -: If we have found no files, at least try signal.h case "$xxxfiles" in '') xxxfiles=`./findhdr signal.h` ;; esac @@ -20172,7 +20493,8 @@ $cat >>signal_cmd <<'EOS' set signal if eval $compile_ok; then - $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst + $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) |\ + $uniq | $awk -f signal.awk >signal.lst else echo "(I can't seem be able to compile the whole test program)" >&4 echo "(I'll try it in little pieces.)" >&4 @@ -20432,8 +20754,7 @@ $rm_try : see what type of char stdio uses. echo " " -echo '#include ' > stdio.c -$cppstdin $cppminus < stdio.c > stdioh +echo '#include ' | $cppstdin $cppminus > stdioh if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then echo "Your stdio uses unsigned chars." >&4 stdchar="unsigned char" @@ -20441,7 +20762,7 @@ else echo "Your stdio uses signed chars." >&4 stdchar="char" fi -$rm -f stdio.* stdioh +$rm -f stdioh : see what type uids are declared as in the kernel echo " " @@ -20540,7 +20861,7 @@ else fi - +: Check format string for UID echo " " $echo "Checking the format string to be used for uids..." >&4 @@ -20579,7 +20900,7 @@ case "$uidsign" in ;; esac - +: Check if site customization support was requested case "$usesitecustomize" in $define|true|[Yy]*) usesitecustomize="$define" @@ -20620,7 +20941,6 @@ case "$yacc" in ;; esac - : see if this is a assert.h system set assert.h i_assert eval $inhdr @@ -20653,6 +20973,35 @@ val="$t_gdbm" set i_gdbm eval $setvar +: see if ndbm.h is available +set ndbm.h i_ndbm +eval $inhdr +: Compatibility location for RedHat 7.1 +set gdbm/ndbm.h i_gdbmndbm +eval $inhdr +: Compatibility location for Debian 4.0 +set gdbm-ndbm.h i_gdbm_ndbm +eval $inhdr + +if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then + : see if dbm_open exists + set dbm_open d_dbm_open + eval $inlibc + case "$d_dbm_open" in + $undef) + i_ndbm="$undef" + i_gdbmndbm="$undef" + i_gdbm_ndbm="$undef" + echo "We won't be including " + val="$undef" + ;; + *) val="$define" + ;; + esac +fi +set d_ndbm +eval $setvar + : see if this is a ieeefp.h system case "$i_ieeefp" in '' ) set ieeefp.h i_ieeefp @@ -20676,40 +21025,6 @@ fi set mntent.h i_mntent eval $inhdr -: see if ndbm.h is available -set ndbm.h t_ndbm -eval $inhdr - -case "$t_ndbm" in -$undef) - # Some Linux distributions such as RedHat 7.1 put the - # ndbm.h header in /usr/include/gdbm/ndbm.h. - if $test -f /usr/include/gdbm/ndbm.h; then - echo ' found.' - ccflags="$ccflags -I/usr/include/gdbm" - cppflags="$cppflags -I/usr/include/gdbm" - t_ndbm=$define - fi - ;; -esac - -case "$t_ndbm" in -$define) - : see if dbm_open exists - set dbm_open d_dbm_open - eval $inlibc - case "$d_dbm_open" in - $undef) - t_ndbm="$undef" - echo "We won't be including " - ;; - esac - ;; -esac -val="$t_ndbm" -set i_ndbm -eval $setvar - : see if net/errno.h is available val='' set net/errno.h val @@ -20992,14 +21307,14 @@ case "$val3" in echo " found." >&4 else echo "System is pyramid with BSD universe." - echo " not found--you could have problems." >&4 + ./warn " not found--you could have problems." fi;; *) if $test `./findhdr termio.h`; then val="$define" echo " found." >&4 else echo "System is pyramid with USG universe." - echo " not found--you could have problems." >&4 + ./warn " not found--you could have problems." fi;; esac elif ./usg; then @@ -21010,7 +21325,7 @@ case "$val3" in echo " found." >&4 val2="$define" else -echo "Neither nor found--you could have problems." >&4 + ./warn "Neither nor found--cross fingers!" fi else if $test `./findhdr sgtty.h`; then @@ -21020,7 +21335,7 @@ echo "Neither nor found--you could have problems." >&4 echo " found." >&4 val="$define" else -echo "Neither nor found--you could have problems." >&4 + ./warn "Neither nor found--cross fingers!" fi fi;; esac @@ -21077,16 +21392,18 @@ fi set i_syssockio eval $setvar - : see if this is a syslog.h system set syslog.h i_syslog eval $inhdr - : see if this is a sys/mode.h system set sys/mode.h i_sysmode eval $inhdr +: see if there is a sys/poll.h file +set sys/poll.h i_syspoll +eval $inhdr + : see if sys/resource.h has to be included set sys/resource.h i_sysresrc eval $inhdr @@ -21103,7 +21420,6 @@ eval $inhdr set sys/un.h i_sysun eval $inhdr - : see if this is a sys/utsname.h system set sys/utsname.h i_sysutsname eval $inhdr @@ -21120,10 +21436,6 @@ eval $inhdr set utime.h i_utime eval $inhdr -: see if this is a values.h system -set values.h i_values -eval $inhdr - : see if this is a vfork system case "$d_vfork" in "$define") @@ -21532,7 +21844,7 @@ sunos*X4*) ;; *) case "$usedl" in $define|true|[yY]*) - set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'` + set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'` shift perllibs="$*" ;; @@ -21565,9 +21877,9 @@ if test -d ../UU; then cd .. fi -: configuration may be patched via a 'config.arch' file +: configuration may be unconditionally patched via a 'config.arch' file if $test -f config.arch; then - echo "I see a config.arch file, loading it." + echo "I see a config.arch file, loading it." >&4 . ./config.arch fi @@ -21615,13 +21927,16 @@ $startsh # Configured by : $cf_by # Target system : $myuname +EOT +$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh +$spitshell <>config.sh + Author='$Author' Date='$Date' Header='$Header' Id='$Id' Locker='$Locker' Log='$Log' -Mcc='$Mcc' RCSfile='$RCSfile' Revision='$Revision' Source='$Source' @@ -21929,6 +22244,7 @@ d_msgsnd='$d_msgsnd' d_msync='$d_msync' d_munmap='$d_munmap' d_mymalloc='$d_mymalloc' +d_ndbm='$d_ndbm' d_nice='$d_nice' d_nl_langinfo='$d_nl_langinfo' d_nv_preserves_uv='$d_nv_preserves_uv' @@ -22086,6 +22402,7 @@ d_tcsetpgrp='$d_tcsetpgrp' d_telldir='$d_telldir' d_telldirproto='$d_telldirproto' d_time='$d_time' +d_timegm='$d_timegm' d_times='$d_times' d_tm_tm_gmtoff='$d_tm_tm_gmtoff' d_tm_tm_zone='$d_tm_tm_zone' @@ -22228,6 +22545,8 @@ i_float='$i_float' i_fp='$i_fp' i_fp_class='$i_fp_class' i_gdbm='$i_gdbm' +i_gdbm_ndbm='$i_gdbm_ndbm' +i_gdbmndbm='$i_gdbmndbm' i_grp='$i_grp' i_ieeefp='$i_ieeefp' i_inttypes='$i_inttypes' @@ -22237,6 +22556,7 @@ i_limits='$i_limits' i_locale='$i_locale' i_machcthr='$i_machcthr' i_malloc='$i_malloc' +i_mallocmalloc='$i_mallocmalloc' i_math='$i_math' i_memory='$i_memory' i_mntent='$i_mntent' @@ -22271,6 +22591,7 @@ i_sysmode='$i_sysmode' i_sysmount='$i_sysmount' i_sysndir='$i_sysndir' i_sysparam='$i_sysparam' +i_syspoll='$i_syspoll' i_sysresrc='$i_sysresrc' i_syssecrt='$i_syssecrt' i_sysselct='$i_sysselct' @@ -22414,6 +22735,7 @@ nroff='$nroff' nvEUformat='$nvEUformat' nvFUformat='$nvFUformat' nvGUformat='$nvGUformat' +nv_overflows_integers_at='$nv_overflows_integers_at' nv_preserves_uv_bits='$nv_preserves_uv_bits' nveformat='$nveformat' nvfformat='$nvfformat' @@ -22468,6 +22790,10 @@ rm_try='$rm_try' rmail='$rmail' run='$run' runnm='$runnm' +sGMTIME_max='$sGMTIME_max' +sGMTIME_min='$sGMTIME_min' +sLOCALTIME_max='$sLOCALTIME_max' +sLOCALTIME_min='$sLOCALTIME_min' sPRIEUldbl='$sPRIEUldbl' sPRIFUldbl='$sPRIFUldbl' sPRIGUldbl='$sPRIGUldbl' @@ -22667,8 +22993,9 @@ echo "PERL_CONFIG_SH=true" >>config.sh : propagate old symbols if $test -f UU/config.sh; then 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 + $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 @@ -22677,7 +23004,7 @@ if $test -f UU/config.sh; then cat <>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}"'"'