X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=2735828ed35c3d4e54b17f9550922a894f3e9d4a;hb=6626660c229e9b0d6253e2c9cdb46b3db6c33541;hp=8cac5b0da6b92567ce6793f6f9c72387bc0cc114;hpb=ccc7f9b3740d5c1211fbd847d1ae120278f3f710;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 8cac5b0..2735828 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 Fri Feb 19 21:44:45 EET 1999 [metaconfig 3.0 PL70] +# Generated on Fri May 14 00:11:18 EET DST 1999 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <extract <<'EOS' -CONFIG=true +CONFIGDOTSH=true echo "Doing variable substitutions on .SH files..." if test -f $src/MANIFEST; then set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH$'` @@ -1766,7 +1785,6 @@ more nm nroff pg -tee test uname zip @@ -2092,7 +2110,7 @@ EOM osvers=2 fi fi - unset tmp + tmp='' ;; pc*) if test -n "$DJGPP"; then @@ -2528,7 +2546,7 @@ case "$usethreads" in . ./usethreads.cbu fi case "$osname" in - aix|dec_osf|dos_djgpp|freebsd|hpux|irix|linux|openbsd|os2|solaris|vmesa) + aix|dec_osf|dos_djgpp|freebsd|hpux|irix|linux|next|openbsd|os2|solaris|vmesa) # Known thread-capable platforms. ;; *) @@ -4219,7 +4237,7 @@ echo " " echo "Checking your choice of C compiler and flags for coherency..." >&4 $cat > try.c <<'EOF' #include -main() { printf("Ok\n"); exit(0); } +int main() { printf("Ok\n"); exit(0); } EOF set X $cc $optimize $ccflags -o try $ldflags try.c $libs shift @@ -4330,10 +4348,13 @@ $cat >findhdr <" > foo\$\$.c $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \ @@ -4341,7 +4362,8 @@ $grep "^[ ]*#.*\$wanted" | \ while read cline; do name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\` case "\$name" in - */\$wanted) echo "\$name"; exit 0;; + *[/\\\\]\$wanted) echo "\$name"; exit 0;; + *[\\\\/]\$wanted) echo "\$name"; exit 0;; *) name='';; esac; done; @@ -5309,24 +5331,12 @@ EOM useshrplib='true' # Why does next4 have to be so different? case "${osname}${osvers}" in - next4*) xxx='DYLD_LIBRARY_PATH' ;; + next4*|rhapsody*) + xxx='DYLD_LIBRARY_PATH' ;; os2*) xxx='' ;; # Nothing special needed. beos*) xxx='' ;; *) xxx='LD_LIBRARY_PATH' ;; esac - if test X"$xxx" != "X"; then - $cat <&4 - -To build perl, you must add the current working directory to your -$xxx environment variable before running make. You can do -this with - $xxx=\`pwd\`:\$$xxx; export $xxx -for Bourne-style shells, or - setenv $xxx \`pwd\` -for Csh-style shells. You *MUST* do this before running make. - -EOM - fi ;; *) useshrplib='false' ;; esac @@ -5447,6 +5457,10 @@ if "$useshrplib"; then beos) # beos doesn't like the default, either. ;; + hpux*) + # hpux doesn't like the default, either. + tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\"" + ;; *) tmp_shrpenv="env LD_RUN_PATH=$shrpdir" ;; @@ -6146,8 +6160,8 @@ $cat < try.c; echo "int main () { struct $struct foo; foo.$field = 0; }" >> try.c; -if eval $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then +if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then val="$define"; else val="$undef"; @@ -7237,6 +7251,10 @@ if $test X"$use64bits" = X"$define"; then set lockf64 d_lockf64 eval $inlibc + : see if llseek exists + set llseek d_llseek + eval $inlibc + : see if lseek64 exists set lseek64 d_lseek64 eval $inlibc @@ -7278,6 +7296,7 @@ if $test X"$use64bits" = X"$define"; then echo $n "Checking to see if your system supports off64_t...$c" >&4 $cat >try.c < +#include off64_t foo() { off64_t x; x = 7; return x; }' EOCP if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then @@ -7288,7 +7307,26 @@ EOCP echo " Nope, it doesn't." >&4 fi $rm -f try.* - set d_off64t + set d_off64_t + eval $setvar + + : check for offset_t + echo " " + echo $n "Checking to see if your system supports offset_t...$c" >&4 + $cat >try.c < +#include +offset_t foo() { offset_t x; x = 7; return x; }' +EOCP + if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then + val="$define" + echo " Yup, it does." >&4 + else + val="$undef" + echo " Nope, it doesn't." >&4 + fi + $rm -f try.* + set d_offset_t eval $setvar : check for ino64_t @@ -7313,7 +7351,7 @@ EOCP else echo " Nope, it doesn't." >&4 fi - set d_ino64t + set d_ino64_t eval $setvar : check for struct flock64 @@ -7348,7 +7386,7 @@ EOCP else val="$undef" - for xxx in d_fstat64 d_ftruncate64 d_lockf64 d_lseek64 d_lstat64 d_open64 d_opendir64 d_readdir64 d_seekdir64 d_stat64 d_telldir64 d_truncate64 d_off64t d_ino64t d_flock64_s d_dirent64_s + for xxx in d_fstat64 d_ftruncate64 d_lockf64 d_lseek64 d_lstat64 d_open64 d_opendir64 d_readdir64 d_seekdir64 d_stat64 d_telldir64 d_truncate64 d_off64_t d_offset_t d_ino64_t d_flock64_s d_dirent64_s do set $xxx eval $setvar @@ -8055,13 +8093,13 @@ eval $inlibc : see how we will look up host name echo " " -if false; then - : dummy stub to allow use of elif -elif set gethostname val -f d_gethname; eval $csym; $val; then +call='' +if set gethostname val -f d_gethname; eval $csym; $val; then echo 'gethostname() found.' >&4 d_gethname="$define" call=gethostname -elif set uname val -f d_uname; eval $csym; $val; then +fi +if set uname val -f d_uname; eval $csym; $val; then if ./xenix; then $cat <<'EOM' uname() was found, but you're running xenix, and older versions of xenix @@ -8081,7 +8119,9 @@ EOM else echo 'uname() found.' >&4 d_uname="$define" - call=uname + case "$call" in + '') call=uname ;; + esac fi fi case "$d_gethname" in @@ -8642,6 +8682,10 @@ eval $inlibc set mbtowc d_mbtowc eval $inlibc +: see if memchr exists +set memchr d_memchr +eval $inlibc + : see if memcmp exists set memcmp d_memcmp eval $inlibc @@ -8765,8 +8809,18 @@ eval $inlibc set nice d_nice eval $inlibc -: how to create joinable pthreads +: see if POSIX threads are available if test "X$usethreads" = "X$define"; then + set pthread.h i_pthread + eval $inhdr +else + i_pthread="$undef" +fi + + + +: how to create joinable pthreads +if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then echo " " echo "Checking what constant to use for creating joinable pthreads..." >&4 $cat >try.c <<'EOCP' @@ -10139,7 +10193,16 @@ $define) false) dflt='n';; *) dflt='y';; esac - rp="Some systems have problems with vfork(). Do you want to use it?" + cat <<'EOM' + +Perl can only use a vfork() that doesn't suffer from strict +restrictions on calling functions or modifying global data in +the child. For example, glibc-2.1 contains such a vfork() +that is unsuitable. If your system provides a proper fork() +call, chances are that you do NOT want perl to use vfork(). + +EOM + rp="Do you still want to use vfork()?" . ./myread case "$ans" in y|Y) ;; @@ -10281,41 +10344,77 @@ Log='$Log' RCSfile='$RCSfile' Revision='$Revision' +case "$crosscompile" in +''|[nN]*) crosscompile="$undef" ;; +esac + +case "$osname" in +next|rhapsody) multiarch="$define" ;; +esac +case "$multiarch" in +''|[nN]*) multiarch="$undef" ;; +esac + : check for alignment requirements echo " " -case "$alignbytes" in -'') echo "Checking alignment constraints..." >&4 - $cat >try.c <<'EOCP' +case "$crosscompile$multiarch" in +*$define*) + $cat <&4 + $cat >try.c <<'EOCP' struct foobar { char foo; double bar; -} try; +} try_algn; int main() { - printf("%d\n", (char *)&try.bar - (char *)&try.foo); + printf("%d\n", (char *)&try_algn.bar - (char *)&try_algn.foo); } EOCP - set try - if eval $compile_ok; then - dflt=`./try` - else - dflt='8' - echo "(I can't seem to compile the test program...)" - fi - ;; -*) dflt="$alignbytes" + set try + if eval $compile_ok; then + dflt=`./try` + else + dflt='8' + echo "(I can't seem to compile the test program...)" + fi + ;; + *) dflt="$alignbytes" + ;; + esac + rp="Doubles must be aligned on a how-many-byte boundary?" + . ./myread + alignbytes="$ans" + $rm -f try.c try ;; esac -rp="Doubles must be aligned on a how-many-byte boundary?" -. ./myread -alignbytes="$ans" -$rm -f try.c try + : check for ordering of bytes in a long -case "$byteorder" in -'') - $cat <<'EOM' - +echo " " +case "$crosscompile$multiarch" in +*$define*) + $cat <try.c <<'EOCP' + $cat >try.c <<'EOCP' #include int main() { @@ -10343,37 +10442,40 @@ int main() exit(0); } EOCP - xxx_prompt=y - set try - if eval $compile && ./try > /dev/null; then - dflt=`./try` - case "$dflt" in - [1-4][1-4][1-4][1-4]|12345678|87654321) - echo "(The test program ran ok.)" - echo "byteorder=$dflt" - xxx_prompt=n + xxx_prompt=y + set try + if eval $compile && ./try > /dev/null; then + dflt=`./try` + case "$dflt" in + [1-4][1-4][1-4][1-4]|12345678|87654321) + echo "(The test program ran ok.)" + echo "byteorder=$dflt" + xxx_prompt=n ;; - ????|????????) echo "(The test program ran ok.)" ;; - *) echo "(The test program didn't run right for some reason.)" ;; - esac - else - dflt='4321' - cat <<'EOM' + ????|????????) echo "(The test program ran ok.)" ;; + *) echo "(The test program didn't run right for some reason.)" ;; + esac + else + dflt='4321' + cat <<'EOM' (I can't seem to compile the test program. Guessing big-endian...) EOM - fi - case "$xxx_prompt" in - y) - rp="What is the order of bytes in a long?" - . ./myread - byteorder="$ans" - ;; - *) byteorder=$dflt + fi + case "$xxx_prompt" in + y) + rp="What is the order of bytes in a long?" + . ./myread + byteorder="$ans" + ;; + *) byteorder=$dflt + ;; + esac ;; esac + $rm -f try.c try ;; esac -$rm -f try.c try + : how do we catenate cpp tokens here? echo " " @@ -10824,6 +10926,209 @@ $rm -f tebcdic.c tebcdic set ebcdic eval $setvar +$cat >&4 <try.c < +int main() { + if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin) + printf("yes\n"); +} +EOCP + for s in _iob __iob __sF + do + set try -DSTDIO_STREAM_ARRAY=$s + if eval $compile_ok; then + case "`./try$exe_ext`" in + yes) stdio_stream_array=$s; break ;; + esac + fi + done + $rm -f try.* try$exe_ext +esac +case "$stdio_stream_array" in +'') $cat >&4 <&4 < which we generally avoid, but need for this test. +# For everyone else, we'll trust i_unistd. +t_unistd=$i_unistd +case "$osname" in +sunos) $test -f /usr/include/unistd.h && t_unistd=$define ;; +esac +$cat >&4 <try.c < +#$t_unistd I_UNISTD +#ifdef I_UNISTD +#include +#endif +#$d_sysconf HAS_SYSCONF +int main() { + FILE* p = fopen("try.out", "w"); +#ifdef TRY_FPUTC + fputc('x', p); +#else +# ifdef TRY_FPRINTF + fprintf(p, "x"); +# endif +#endif +#ifdef TRY_FFLUSH_NULL + fflush(NULL); +#endif +#ifdef TRY_FFLUSH_ALL + { + long open_max = -1; +# if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX) + open_max = sysconf(_SC_OPEN_MAX); +# else +# ifdef FOPEN_MAX +# open_max = FOPEN_MAX; +# else +# ifdef OPEN_MAX +# open_max = OPEN_MAX; +# else +# ifdef _NFILE +# open_max = _NFILE; +# endif +# endif +# endif +# endif + if (open_max > 0) { + long i; + for (i = 0; i < open_max; i++) + fflush(&$stdio_stream_array[i]); + } + } +#endif + _exit(42); +} +EOCP +: first we have to find out how _not_ to flush +if $test "X$fflushNULL" = X -o "X$fflushall" = X; then + output='' + set try -DTRY_FPUTC + $rm -f try.out + if eval $compile; then + ./try$exe_ext 2>/dev/null + if $test ! -s try.out -a "X$?" = X42; then + output=-DTRY_FPUTC + fi + fi + case "$output" in + '') + set try -DTRY_FPRINTF + $rm -f try.out + if eval $compile; then + ./try$exe_ext 2>/dev/null + if $test ! -s try.out -a "X$?" = X42; then + output=-DTRY_FPRINTF + fi + fi + ;; + esac +fi +: check for fflush NULL behaviour +case "$fflushNULL" in +'') set try -DTRY_FFLUSH_NULL $output + $rm -f try.out + if eval $compile; then + ./try$exe_ext 2>/dev/null + if $test -s try.out -a "X$?" = X42; then + fflushNULL="`$cat try.out`" + fi + fi + $rm -f core try.core core.try.* + case "$fflushNULL" in + x) $cat >&4 <&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 <' | $cppstdin $cppminus $cppflags 2>/dev/null | @@ -11386,7 +11693,7 @@ case "$xxxfiles" in '') xxxfiles=`./findhdr signal.h` ;; esac xxx=`awk ' -$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $3 !~ /void/ { +$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ { print substr($2, 4, 20) } $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ { @@ -11486,20 +11793,22 @@ $1 ~ /^NSIG$/ { nsig = $2 } sig_name[$2] = $1 sig_num[$2] = $2 } - } END { - if (nsig == 0) { nsig = maxsig + 1 } - for (n = 1; n < nsig; n++) { - if (sig_name[n]) { - printf("%s %d\n", sig_name[n], sig_num[n]) - } - else { - printf("NUM%d %d\n", n, n) - } + if (nsig == 0) { + nsig = maxsig + 1 + } + printf("NSIG %d\n", nsig); + for (n = 1; n < nsig; n++) { + if (sig_name[n]) { + printf("%s %d\n", sig_name[n], sig_num[n]) } + else { + printf("NUM%d %d\n", n, n) + } + } for (n = 0; n < ndups; n++) { - printf("%s %d\n", dup_name[n], dup_num[n]) + printf("%s %d\n", dup_name[n], dup_num[n]) } } EOP @@ -11565,7 +11874,8 @@ else 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;; esac echo $@ | $tr ' ' $trnl | \ - $awk '{ printf $1; printf " %d\n", ++s; }' >signal.lst + $awk '{ printf "%s %d\n", $1, ++s; } + END { printf "NSIG %d\n", ++s }' >signal.lst fi $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1 EOS @@ -11584,19 +11894,20 @@ case "$doinit" in yes) echo "Generating a list of signal names and numbers..." >&4 . ./signal_cmd - sig_name=`$awk '{printf "%s ", $1}' signal.lst` - sig_name="ZERO $sig_name" - sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " } - { printf "\"%s\", ", $1 } - END { printf "0\n" }' signal.lst` - sig_num=`$awk '{printf "%d ", $2}' signal.lst` - sig_num="0 $sig_num" - sig_num_init=`$awk 'BEGIN { printf "0, " } - { printf "%d, ", $2} - END { printf "0\n"}' signal.lst` - ;; -esac -echo "The following signals are available:" + sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst` + sig_name=`$awk 'BEGIN { printf "ZERO " } + !/^NSIG/ { printf "%s ", $1 }' signal.lst` + sig_num=`$awk 'BEGIN { printf "0 " } + !/^NSIG/ { printf "%d ", $2 }' signal.lst` + sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " } + !/^NSIG/ { printf "\"%s\", ", $1 } + END { printf "0\n" }' signal.lst` + sig_num_init=`$awk 'BEGIN { printf "0, " } + !/^NSIG/ { printf "%d, ", $2} + END { printf "0\n"}' signal.lst` + ;; +esac +echo "The following $sig_count signals are available:" echo " " echo $sig_name | $awk \ 'BEGIN { linelen = 0 } @@ -11861,6 +12172,10 @@ esac set i_neterrno eval $setvar +: see if netinet/tcp.h is available +set netinet/tcp.h i_netinettcp +eval $inhdr + : see if this is a poll.h system set poll.h i_poll eval $inhdr @@ -11917,12 +12232,16 @@ $eunicefix Cppsym ./Cppsym -l $al | $sort | $grep -v '^$' >Cppsym.true : now check the C compiler for additional symbols +postprocess_cc_v='' +case "$osname" in +aix) postprocess_cc_v="|$tr , ' '" ;; +esac $cat >ccsym <tmp.c <&1\` +for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\` do case "\$i" in -D*) echo "\$i" | $sed 's/^-D//';; @@ -11931,6 +12250,7 @@ do done $rm -f try.c EOS +postprocess_cc_v='' chmod +x ccsym $eunicefix ccsym ./ccsym > ccsym1.raw @@ -12587,6 +12907,7 @@ cppminus='$cppminus' cpprun='$cpprun' cppstdin='$cppstdin' cppsymbols='$cppsymbols' +crosscompile='$crosscompile' cryptlib='$cryptlib' csh='$csh' d_Gconvert='$d_Gconvert' @@ -12699,13 +13020,14 @@ d_hasmntopt='$d_hasmntopt' d_htonl='$d_htonl' d_index='$d_index' d_inetaton='$d_inetaton' -d_ino64t='$d_ino64t' +d_ino64_t='$d_ino64_t' d_int64t='$d_int64t' d_iovec_s='$d_iovec_s' d_isascii='$d_isascii' d_killpg='$d_killpg' d_lchown='$d_lchown' d_link='$d_link' +d_llseek='$d_llseek' d_locconv='$d_locconv' d_lockf64='$d_lockf64' d_lockf='$d_lockf' @@ -12718,6 +13040,7 @@ d_madvise='$d_madvise' d_mblen='$d_mblen' d_mbstowcs='$d_mbstowcs' d_mbtowc='$d_mbtowc' +d_memchr='$d_memchr' d_memcmp='$d_memcmp' d_memcpy='$d_memcpy' d_memmove='$d_memmove' @@ -12743,7 +13066,8 @@ d_munmap='$d_munmap' d_mymalloc='$d_mymalloc' d_nextkey64='$d_nextkey64' d_nice='$d_nice' -d_off64t='$d_off64t' +d_off64_t='$d_off64_t' +d_offset_t='$d_offset_t' d_old_pthread_create_joinable='$d_old_pthread_create_joinable' d_oldpthreads='$d_oldpthreads' d_oldsock='$d_oldsock' @@ -12893,6 +13217,8 @@ eunicefix='$eunicefix' exe_ext='$exe_ext' expr='$expr' extensions='$extensions' +fflushNULL='$fflushNULL' +fflushall='$fflushall' find='$find' firstmakefile='$firstmakefile' flex='$flex' @@ -12935,8 +13261,10 @@ i_mntent='$i_mntent' i_ndbm='$i_ndbm' i_netdb='$i_netdb' i_neterrno='$i_neterrno' +i_netinettcp='$i_netinettcp' i_niin='$i_niin' i_poll='$i_poll' +i_pthread='$i_pthread' i_pwd='$i_pwd' i_rpcsvcdbm='$i_rpcsvcdbm' i_sfio='$i_sfio' @@ -13039,6 +13367,7 @@ mmaptype='$mmaptype' models='$models' modetype='$modetype' more='$more' +multiarch='$multiarch' mv='$mv' myarchname='$myarchname' mydomain='$mydomain' @@ -13104,6 +13433,7 @@ shmattype='$shmattype' shortsize='$shortsize' shrpenv='$shrpenv' shsharp='$shsharp' +sig_count='$sig_count' sig_name='$sig_name' sig_name_init='$sig_name_init' sig_num='$sig_num' @@ -13135,6 +13465,7 @@ stdio_bufsiz='$stdio_bufsiz' stdio_cnt='$stdio_cnt' stdio_filbuf='$stdio_filbuf' stdio_ptr='$stdio_ptr' +stdio_stream_array='$stdio_stream_array' strings='$strings' submit='$submit' subversion='$subversion' @@ -13181,7 +13512,7 @@ $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh : add special variables $test -f $src/patchlevel.h && \ awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh -echo "CONFIG=true" >>config.sh +echo "CONFIGDOTSH=true" >>config.sh : propagate old symbols if $test -f UU/config.sh; then