3 # If these # comments don't work, trim them. Don't worry about any other
4 # shell scripts, Configure will trim # comments from them for you.
6 # (If you are trying to port this package to a machine without sh,
7 # I would suggest you have a look at the prototypical config_h.SH file
8 # and edit it to reflect your system. Some packages may include samples
9 # of config.h for certain machines, so you might look for one of those.)
11 # Yes, you may rip this off to use in other distribution packages. This
12 # script belongs to the public domain and cannot be copyrighted.
14 # (Note: this Configure script was generated automatically. Rather than
15 # working with this copy of Configure, you may wish to get metaconfig.
16 # The dist-3.0 package (which contains metaconfig) was posted in
17 # comp.sources.misc and is available on CPAN under authors/id/RAM so
18 # you may fetch it yourself from your nearest archive site.)
21 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
23 # Generated on Thu Mar 21 17:43:57 EET 2002 [metaconfig 3.0 PL70]
24 # (with additional metaconfig patches by perlbug@perl.org)
29 SCO csh still thinks true is false. Write to SCO today and tell them that next
30 year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
32 (Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
33 we'd have to do is go in and swap the && and || tokens, wherever they are.)
35 [End of diatribe. We now return you to your regularly scheduled programming...]
39 OOPS! You naughty creature! You didn't run Configure with sh!
40 I will attempt to remedy the situation by running sh for you...
44 true || exec sh $0 $argv:q
46 (exit $?0) || cat c2$$
47 (exit $?0) || exec sh $0 $argv:q
50 : compute my invocation name
54 me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
59 : Proper separator for the PATH environment variable
61 : On OS/2 this directory should exist if this is not floppy only system :-]
62 if test -d c:/. ; then
63 if test -n "$OS2_SHELL"; then
65 PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
66 OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
67 elif test -n "$DJGPP"; then
68 case "X${MACHTYPE:-nonesuchmach}" in
76 paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
77 paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
78 paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
79 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
80 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
81 paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
82 paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
83 paths="$paths /sbin /usr/sbin /usr/libexec"
84 paths="$paths /system/gnu_library/bin"
90 *) test -d $p && PATH=$PATH$p_$p ;;
97 : shall we be using ksh?
103 if (PATH=.; alias -x) >/dev/null 2>&1; then
106 if test -f /hp-ux -a -f /bin/ksh; then
107 needksh='to avoid sh bug in "here document" expansion'
109 if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
110 if test X`/usr/bin/uname -v` = X4; then
111 avoidksh="to avoid AIX 4's /bin/sh"
115 if test -f /osf_boot -a -f /usr/sbin/setld; then
116 if test X`/usr/bin/uname -s` = XOSF1; then
117 avoidksh="to avoid Digital UNIX' ksh"
119 unset BIN_SH # if this is 'xpg4' sh will start up ksh
122 case "$inksh/$needksh" in
129 case "$inksh/$avoidksh" in
135 case "$inksh/$needksh-$avoidksh-" in
138 (I see you are using the Korn shell. Some ksh's blow up on $me,
139 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
146 echo "(Feeding myself to $newsh $reason.)"
148 Configure|*/Configure) exec $newsh $0 "$@";;
149 *) exec $newsh Configure "$@";;
154 : if needed set CDPATH to a harmless value that is not chatty
155 : avoid bash 2.02 problems with empty CDPATH.
159 *bash*) CDPATH='.' ;;
164 : Configure runs within the UU subdirectory
165 test -d UU || mkdir UU
375 endhostent_r_proto=''
381 endprotoent_r_proto=''
387 endservent_r_proto=''
437 gethostbyaddr_r_proto=''
439 gethostbyname_r_proto=''
441 gethostent_r_proto=''
453 getnetbyaddr_r_proto=''
455 getnetbyname_r_proto=''
469 d_getprotobyname_r=''
470 getprotobyname_r_proto=''
471 d_getprotobynumber_r=''
472 getprotobynumber_r_proto=''
474 getprotoent_r_proto=''
486 getservbyname_r_proto=''
488 getservbyport_r_proto=''
490 getservent_r_proto=''
563 d_old_pthread_create_joinable=''
564 old_pthread_create_joinable=''
603 sethostent_r_proto=''
620 setprotoent_r_proto=''
632 setservent_r_proto=''
676 d_stdio_ptr_lval_nochange_cnt=''
677 d_stdio_ptr_lval_sets_cnt=''
871 inc_version_list_init=''
890 ignore_versioned_solibs=''
949 d_perl_otherlibdirs=''
963 version_patchlevel_string=''
978 nv_preserves_uv_bits=''
1067 d_stdio_stream_array=''
1068 stdio_stream_array=''
1078 ccflags_uselargefiles=''
1079 ldflags_uselargefiles=''
1080 libswanted_uselargefiles=''
1100 installvendorarch=''
1126 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1129 : We must find out about Eunice early
1131 if test -f /etc/unixtovms; then
1132 eunicefix=/etc/unixtovms
1134 if test -f /etc/unixtovms.exe; then
1135 eunicefix=/etc/unixtovms.exe
1138 : Set executable suffix now -- needed before hints available
1139 if test -f "/libs/version.library"; then
1142 elif test -f "/system/gnu_library/bin/ar.pm"; then
1145 elif test -n "$DJGPP"; then
1148 elif test -d c:/. ; then
1157 : set useposix=false in your hint file to disable the POSIX extension.
1159 : set useopcode=false in your hint file to disable the Opcode extension.
1161 : Trailing extension. Override this in a hint file, if needed.
1162 : Extra object files, if any, needed on this platform.
1165 : Possible local include directories to search.
1166 : Set locincpth to "" in a hint file to defeat local include searches.
1167 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1168 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1170 : no include file wanted by default
1175 : change the next line if compiling for Xenix/286 on Xenix/386
1176 xlibpth='/usr/lib/386 /lib/386'
1177 : Possible local library directories to search.
1178 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1179 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1181 : general looking path for locating libraries
1182 glibpth="/lib /usr/lib $xlibpth"
1183 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1184 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1185 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1187 : Private path used by Configure to find libraries. Its value
1188 : is prepended to libpth. This variable takes care of special
1189 : machines, like the mips. Usually, it should be empty.
1192 : default library list
1194 : some systems want to use only the non-versioned libso:s
1195 ignore_versioned_solibs=''
1197 ccflags_uselargefiles=''
1198 ldflags_uselargefiles=''
1199 libswanted_uselargefiles=''
1200 : set usemultiplicity on the Configure command line to enable multiplicity.
1201 : set usesocks on the Configure command line to enable socks.
1202 : set usethreads on the Configure command line to enable threads.
1203 usereentrant='undef'
1204 : full support for void wanted by default
1207 : List of libraries we want.
1208 : If anyone needs -lnet, put it in a hint file.
1209 libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
1210 libswanted="$libswanted dld ld sun m c cposix posix"
1211 libswanted="$libswanted ndir dir crypt sec"
1212 libswanted="$libswanted ucb bsd BSD PW x util"
1213 : We probably want to search /usr/shlib before most other libraries.
1214 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1215 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1216 glibpth="/usr/shlib $glibpth"
1217 : Do not use vfork unless overridden by a hint file.
1220 : Find the basic shell for Bourne shell scripts
1224 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1227 if test -f "$xxx"; then
1230 : Build up a list and do a single loop so we can 'break' out.
1231 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1232 for xxx in sh bash ksh pdksh ash; do
1234 try="$try ${p}/${xxx}"
1238 if test -f "$xxx"; then
1241 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1244 elif test -f "$xxx.exe"; then
1255 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1257 Usually it's in /bin/sh. How did you even get this far?
1258 Please contact me (Perl Maintainers) at perlbug@perl.org and
1259 we'll try to straighten this all out.
1265 : see if sh knows # comments
1266 if `$sh -c '#' >/dev/null 2>&1`; then
1270 test -f $xcat$_exe || xcat=/usr/bin/cat
1271 if test ! -f $xcat$_exe; then
1272 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1273 if test -f $p/cat$_exe; then
1278 if test ! -f $xcat$_exe; then
1279 echo "Can't find cat anywhere!"
1283 echo "#!$xcat" >sharp
1287 if test -s today; then
1290 echo "#! $xcat" > sharp
1294 if test -s today; then
1302 echo "Your $sh doesn't grok # comments--I will strip them later on."
1305 echo "exec grep -v '^[ ]*#'" >spitshell
1307 $eunicefix spitshell
1308 spitshell=`pwd`/spitshell
1310 echo "I presume that if # doesn't work, #! won't work either!"
1315 : figure out how to guarantee sh startup
1317 '') startsh=${sharpbang}${sh} ;;
1329 : echo "Yup, it does."
1331 echo "Hmm... '$startsh' does not guarantee sh startup..."
1332 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1337 : Save command line options in file UU/cmdline.opt for later use in
1338 : generating config.sh.
1339 cat > cmdline.opt <<EOSH
1340 # Configure command line arguments.
1349 cat >>cmdline.opt <<EOSH
1350 config_arg$argn='$arg'
1352 # Extreme backslashitis: replace each ' by '"'"'
1353 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1356 arg_exp=`cat cmdl.opt`
1357 args_exp="$args_exp$args_sep'$arg_exp'"
1358 argn=`expr $argn + 1`
1361 # args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
1362 # used by ./hints/os2.sh
1365 : produce awk script to parse command line options
1366 cat >options.awk <<'EOF'
1368 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1370 len = length(optstr);
1371 for (i = 1; i <= len; i++) {
1372 c = substr(optstr, i, 1);
1373 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1384 if (substr(str, 1, 1) != "-") {
1385 printf("'%s'\n", str);
1389 for (i = 2; i <= len; i++) {
1390 c = substr(str, i, 1);
1392 printf("-%s\n", substr(str, i));
1398 printf("'%s'\n", substr(str, i + 1));
1411 : process the command line options
1412 set X `for arg in "$@"; do echo "X$arg"; done |
1413 sed -e s/X// | awk -f options.awk`
1418 : set up default values
1428 rm -f optdef.sh posthint.sh
1429 cat >optdef.sh <<EOS
1435 while test $# -gt 0; do
1437 -d) shift; fastread=yes;;
1438 -e) shift; alldone=cont;;
1442 if test -r "$1"; then
1445 echo "$me: cannot read config file $1." >&2
1450 -h) shift; error=true;;
1451 -r) shift; reuseval=true;;
1452 -s) shift; silent=true; realsilent=true;;
1453 -E) shift; alldone=exit;;
1454 -K) shift; knowitall=true;;
1455 -O) shift; override=true;;
1456 -S) shift; silent=true; extractsh=true;;
1461 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1462 echo "$me: ignoring -D $1" >&2
1465 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1466 *) echo "$1='define'" >> optdef.sh;;
1473 *=) echo "$1" >> optdef.sh;;
1475 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1476 echo "$me: ignoring -U $1" >&2
1478 *) echo "$1='undef'" >> optdef.sh;;
1489 *=*) zzz=`echo $yyy|sed 's!=.*!!'`
1493 zzz=" "`echo $yyy|sed 's!^[^=]*=!!'`
1494 yyy=`echo $yyy|sed 's!=.*!!'` ;;
1500 *:*) xxx=`echo $yyy|sed 's!:.*!!'`
1501 yyy=`echo $yyy|sed 's!^[^:]*:!!'`
1502 zzz=`echo $yyy|sed 's!^[^=]*=!!'`
1503 yyy=`echo $yyy|sed 's!=.*!!'` ;;
1504 *) xxx=`echo $yyy|sed 's!:.*!!'`
1505 yyy=`echo $yyy|sed 's!^[^:]*:!!'` ;;
1511 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1513 echo "$yyy=''" >> posthint.sh ;;
1518 echo "$yyy='$zzz'" >> posthint.sh ;;
1520 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1522 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1527 echo "$yyy=$zzz" >> posthint.sh ;;
1528 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1532 -V) echo "$me generated by metaconfig 3.0 PL70." >&2
1535 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1543 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1544 [-U symbol] [-U symbol=] [-A command:symbol...]
1545 -d : use defaults for all answers.
1546 -e : go on without questioning past the production of config.sh.
1547 -f : specify an alternate default configuration file.
1548 -h : print this help message and exit (with an error status).
1549 -r : reuse C symbols value if possible (skips costly nm extraction).
1550 -s : silent mode, only echoes questions and essential information.
1551 -D : define symbol to have some value:
1552 -D symbol symbol gets the value 'define'
1553 -D symbol=value symbol gets the value 'value'
1554 -E : stop at the end of questions, after having produced config.sh.
1555 -K : do not use unless you know what you are doing.
1556 -O : let -D and -U override definitions from loaded configuration file.
1557 -S : perform variable substitutions on all .SH files (can mix with -f)
1558 -U : undefine symbol:
1559 -U symbol symbol gets the value 'undef'
1560 -U symbol= symbol gets completely empty
1561 -A : manipulate symbol after the platform specific hints have been applied:
1562 -A symbol=value append " "value to symbol
1563 -A append:symbol=value append value to symbol
1564 -A define:symbol=value define symbol to have value
1565 -A clear:symbol define symbol to be ''
1566 -A define:symbol define symbol to be 'define'
1567 -A eval:symbol=value define symbol to be eval of value
1568 -A prepend:symbol=value prepend value to symbol
1569 -A undef:symbol define symbol to be 'undef'
1570 -A undef:symbol= define symbol to be ''
1571 -V : print version number and exit (with a zero status).
1578 case "$fastread$alldone" in
1581 case "$extractsh" in
1584 if test ! -t 0; then
1585 echo "Say 'sh Configure', not 'sh <Configure'"
1595 true) exec 1>/dev/null;;
1598 : run the defines and the undefines, if any, but leave the file out there...
1601 : create the posthint manipulation script and leave the file out there...
1606 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1607 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1608 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1609 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1610 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1613 : Some greps do not return status, grrr.
1614 echo "grimblepritz" >grimble
1615 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1617 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1623 : the following should work in any shell
1627 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1628 cat >contains <<'EOSS'
1629 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1634 : Find the path to the source tree
1637 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1641 *) src=`cd ../$src && pwd` ;;
1654 if test -f $rsrc/Configure && \
1655 $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
1657 : found it, so we are ok.
1660 for src in . .. ../.. ../../.. ../../../..; do
1661 if test -f ../$src/Configure && \
1662 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1673 Sorry, I can't seem to locate the source dir for $package. Please start
1674 Configure with an explicit path -- i.e. /some/path/Configure.
1682 echo "Sources for $package found in \"$src\"." >&4
1686 : script used to extract .SH files with variable substitutions
1687 cat >extract <<'EOS'
1689 echo "Doing variable substitutions on .SH files..."
1690 if test -f MANIFEST; then
1691 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1693 echo "(Looking for .SH files under the source directory.)"
1694 set x `(cd "$src"; find . -name "*.SH" -print)`
1698 0) set x `(cd "$src"; echo *.SH)`; shift;;
1700 if test ! -f "$src/$1"; then
1706 while test $name; do
1707 if test ! -d "$name"; then
1708 create="$name $create";
1709 name=`echo $name | sed -e "s|^[^/]*$||"`;
1710 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1715 for file in $create; do
1724 dir=`expr X$file : 'X\(.*\)/'`
1725 file=`expr X$file : 'X.*/\(.*\)'`
1726 (cd "$dir" && . ./$file)
1736 dir=`expr X$file : 'X\(.*\)/'`
1737 file=`expr X$file : 'X.*/\(.*\)'`
1738 (set x $dir; shift; eval $mkdir_p)
1739 sh <"$src/$dir/$file"
1748 if test -f "$src/config_h.SH"; then
1749 if test ! -f config.h; then
1750 : oops, they left it out of MANIFEST, probably, so do it anyway.
1751 . "$src/config_h.SH"
1756 : extract files and exit if asked to do so
1757 case "$extractsh" in
1759 case "$realsilent" in
1763 case "$config_sh" in
1764 '') config_sh='config.sh';;
1767 echo "Fetching answers from $config_sh..."
1770 test "$override" && . ./optdef.sh
1774 echo "Extraction done."
1779 : Eunice requires " " instead of "", can you believe it
1782 echo "Beginning of configuration questions for $package."
1784 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1786 : first determine how to suppress newline on echo command
1788 echo "Checking echo to see how to suppress newlines..."
1789 (echo "hi there\c" ; echo " ") >.echotmp
1790 if $contains c .echotmp >/dev/null 2>&1 ; then
1801 echo $n "The star should be here-->$c"
1805 : Now test for existence of everything in MANIFEST
1807 if test -f "$rsrc/MANIFEST"; then
1808 echo "First let's make sure your kit is complete. Checking..." >&4
1809 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50)
1812 for filelist in x??; do
1813 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing")
1815 if test -s missing; then
1819 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1821 You have the option of continuing the configuration process, despite the
1822 distinct possibility that your kit is damaged, by typing 'y'es. If you
1823 do, don't blame me if something goes wrong. I advise you to type 'n'o
1824 and contact the author (perlbug@perl.org).
1827 echo $n "Continue? [n] $c" >&4
1831 echo "Continuing..." >&4
1835 echo "ABORTING..." >&4
1840 echo "Looks good..."
1843 echo "There is no MANIFEST file. I hope your kit is complete !"
1848 : Find the appropriate value for a newline for tr
1849 if test -n "$DJGPP"; then
1852 if test X"$trnl" = X; then
1853 case "`echo foo|tr '\n' x 2>/dev/null`" in
1857 if test X"$trnl" = X; then
1858 case "`echo foo|tr '\012' x 2>/dev/null`" in
1859 foox) trnl='\012' ;;
1862 if test X"$trnl" = X; then
1865 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1871 : compute the number of columns on the terminal for proper question formatting
1876 : set up the echo used in my read
1877 myecho="case \"\$xxxm\" in
1878 '') echo $n \"\$rp $c\" >&4;;
1880 '') echo $n \"[\$xxxm] $c\";;
1882 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
1884 echo $n \"[\$xxxm] $c\" >&4
1886 echo $n \"\$rp [\$xxxm] $c\" >&4
1892 : now set up to do reads with possible shell escape and default assignment
1898 case "\$fastread" in
1899 yes) case "\$dflt" in
1902 case "\$silent-\$rp" in
1907 *) case "\$silent" in
1908 true) case "\$rp" in
1913 while expr "X\$ans" : "X!" >/dev/null; do
1917 aok=''; eval "ans=\\"\$answ\\"" && aok=y
1925 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
1934 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
1939 echo "(OK, I'll run with -d after this question.)" >&4
1942 echo "*** Sorry, \$1 not supported yet." >&4
1952 echo "*** Substitution done -- please confirm."
1954 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
1959 echo "*** Error -- try again."
1966 case "\$ans\$xxxm\$nostick" in
1978 : create .config dir to save info across Configure sessions
1979 test -d ../.config || mkdir ../.config
1980 cat >../.config/README <<EOF
1981 This directory created by Configure to save information that should
1982 persist across sessions for $package.
1984 You may safely delete it if you wish.
1987 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
1989 $define|true|[yY]*) ;;
1990 *) case "$xversion" in
1993 *** WHOA THERE!!! ***
1995 This is an UNSTABLE DEVELOPMENT release.
1996 The version of this $package distribution is $xversion, that is, odd,
1997 (as opposed to even) and that signifies a development release.
1998 If you want a maintenance release, you want an even-numbered version.
2000 Do ***NOT*** install this into production use.
2001 Data corruption and crashes are possible.
2003 It is most seriously suggested that you do not continue any further
2004 unless you want to help in developing and debugging Perl.
2006 If you *still* want to build perl, you can answer 'y' now,
2007 or pass -Dusedevel to Configure.
2010 rp='Do you really want to continue?'
2014 [yY]) echo >&4 "Okay, continuing."
2015 usedevel="$define" ;;
2016 *) echo >&4 "Okay, bye."
2026 case "$versiononly" in
2027 '') versiononly="$define" ;;
2029 case "$installusrbinperl" in
2030 '') installusrbinperl="$undef" ;;
2035 : general instructions
2038 user=`(logname) 2>/dev/null`
2040 '') user=`whoami 2>&1`;;
2042 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2045 rp='Would you like to see the instructions?'
2056 This installation shell script will examine your system and ask you questions
2057 to determine how the perl5 package should be installed. If you get
2058 stuck on a question, you may use a ! shell escape to start a subshell or
2059 execute a command. Many of the questions will have default answers in square
2060 brackets; typing carriage return will give you the default.
2062 On some of the questions which ask for file or directory names you are allowed
2063 to use the ~name construct to specify the login directory belonging to "name",
2064 even if you don't have a shell which knows about that. Questions where this is
2065 allowed will be marked "(~name ok)".
2069 dflt='Type carriage return to continue'
2073 The prompter used in this script allows you to use shell variables and
2074 backticks in your answers. You may use $1, $2, etc... to refer to the words
2075 in the default answer, as if the default line was a set of arguments given to a
2076 script shell. This means you may also use $* to repeat the whole default line,
2077 so you do not have to re-type everything to add something to the default.
2079 Everytime there is a substitution, you will have to confirm. If there is an
2080 error (e.g. an unmatched backtick), the default answer will remain unchanged
2081 and you will be prompted again.
2083 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2084 the questions and use the computed defaults (or the previous answers if there
2085 was already a config.sh file). Type 'Configure -h' for a list of options.
2086 You may also start interactively and then answer '& -d' at any prompt to turn
2087 on the non-interactive behaviour for the remainder of the execution.
2093 Much effort has been expended to ensure that this shell script will run on any
2094 Unix system. If despite that it blows up on yours, your best bet is to edit
2095 Configure and run it again. If you can't run Configure for some reason,
2096 you'll have to generate a config.sh file by hand. Whatever problems you
2097 have, let me (perlbug@perl.org) know how I blew it.
2099 This installation script affects things in two ways:
2101 1) it may do direct variable substitutions on some of the files included
2103 2) it builds a config.h file for inclusion in C programs. You may edit
2104 any of these files as the need arises after running this script.
2106 If you make a mistake on a question, there is no easy way to back up to it
2107 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2108 files. Configure will offer to let you do this before it runs the SH files.
2111 dflt='Type carriage return to continue'
2113 case "$firsttime" in
2114 true) echo $user >>../.config/instruct;;
2118 : find out where common programs are
2120 echo "Locating common programs..." >&4
2133 if test -d \$dir/\$thing; then
2139 for thisthing in \$dir/\$thing; do
2140 : just loop through to pick last item
2142 if test -f \$thisthing; then
2145 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2148 elif test -f \$dir/\$thing.exe; then
2149 if test -n "$DJGPP"; then
2150 echo \$dir/\$thing.exe
2152 : on Eunice apparently
2205 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2206 pth="$pth /lib /usr/lib"
2207 for file in $loclist; do
2211 if test -f "$xxx"; then
2214 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2215 xxx=`./loc $file $file $pth`
2218 '') xxx=`./loc $file $file $pth`;;
2219 *) xxx=`./loc $xxx $xxx $pth`;;
2221 eval $file=$xxx$_exe
2225 echo $file is in $xxx.
2228 echo $file is in $xxx.
2231 echo "I don't know where '$file' is, and my life depends on it." >&4
2232 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2238 echo "Don't worry if any of the following aren't found..."
2240 for file in $trylist; do
2244 if test -f "$xxx"; then
2247 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2248 xxx=`./loc $file $file $pth`
2251 '') xxx=`./loc $file $file $pth`;;
2252 *) xxx=`./loc $xxx $xxx $pth`;;
2254 eval $file=$xxx$_exe
2258 echo $file is in $xxx.
2261 echo $file is in $xxx.
2264 echo "I don't see $file out there, $say."
2271 echo "Substituting grep for egrep."
2278 echo "Substituting cp for ln."
2287 echo "I can't find make or gmake, and my life depends on it." >&4
2288 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2296 *) # We can't have osname yet.
2297 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2298 # Assume that gmake, if found, is definitely GNU make
2299 # and prefer it over the system make.
2300 echo "Substituting gmake for make."
2308 echo "Hopefully test is built into your sh."
2311 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2312 echo "Using the test built into your sh."
2320 echo "Hopefully echo is built into your sh."
2325 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2326 $echo $n "hi there$c" >foo1
2327 echo $n "hi there$c" >foo2
2328 if cmp foo1 foo2 >/dev/null 2>&1; then
2329 echo "They are compatible. In fact, they may be identical."
2336 They are not compatible! You are probably running ksh on a non-USG system.
2337 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2338 have echo built in and we may have to run some Bourne shell scripts. That
2339 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2342 $echo $n "The star should be here-->$c"
2352 cat <<'EOSC' >>trygcc
2357 int main(int argc, char *argv[]) {
2361 if $cc -o try $ccflags $ldflags try.c; then
2364 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2370 case "`$cc -v -c try.c 2>&1`" in
2373 if $test X"$trygcc" = Xyes; then
2374 if gcc -o try -c try.c; then
2376 echo "You seem to have a working gcc, though." >&4
2377 rp="Would you like to use it?"
2379 if $test -f myread; then
2382 if $test -f UU/myread; then
2385 echo "Cannot find myread, sorry. Aborting." >&2
2390 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no ;;
2403 cat <<'EOSC' >>checkcc
2408 int main(int argc, char *argv[]) {
2412 if $cc -o try $ccflags $ldflags try.c; then
2415 if $test X"$despair" = Xyes; then
2416 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2419 You need to find a working C compiler.
2420 Either (purchase and) install the C compiler supplied by your OS vendor,
2421 or for a free C compiler try http://gcc.gnu.org/
2422 I cannot continue any further, aborting.
2431 : determine whether symbolic links are supported
2434 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2435 echo "Symbolic links are supported." >&4
2438 echo "Symbolic links are NOT supported." >&4
2443 : determine whether symbolic links are supported
2447 echo "Checking how to test for symbolic links..." >&4
2449 if $test "X$issymlink" = X; then
2451 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2452 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2454 if test $? = 0; then
2457 echo "Your builtin 'test -h' may be broken." >&4
2460 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2463 if test -f "$p/$test"; then
2472 echo "Trying external '$test -h'." >&4
2473 issymlink="$test -h"
2474 if $test ! -h sym >/dev/null 2>&1; then
2475 echo "External '$test -h' is broken, too." >&4
2483 if $test "X$issymlink" = X; then
2484 if $test -L sym 2>/dev/null; then
2485 issymlink="$test -L"
2486 echo "The builtin '$test -L' worked." >&4
2489 if $test "X$issymlink" != X; then
2490 echo "You can test for symbolic links with '$issymlink'." >&4
2492 echo "I do not know how you can test for symbolic links." >&4
2496 *) echo "No symbolic links, so not testing for their testing..." >&4
2502 case "$mksymlinks" in
2505 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2508 *) case "$lns:$issymlink" in
2509 *"ln"*" -s:"*"test -"?)
2510 echo "Creating the symbolic links..." >&4
2511 echo "(First creating the subdirectories...)" >&4
2513 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2515 test -z "$directory" && break
2519 if test ! -d t/base; then
2520 echo "Failed to create the subdirectories. Aborting." >&4
2523 echo "(Then creating the symlinks...)" >&4
2524 awk '{print $1}' $src/MANIFEST | while true; do
2526 test -z "$filename" && break
2527 if test -f $filename; then
2528 if $issymlink $filename; then
2532 if test -f $filename; then
2533 echo "$filename already exists, not symlinking."
2535 ln -s $src/$filename $filename
2539 if test ! -f t/base/lex.t; then
2540 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2545 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2554 case "$usecrosscompile" in
2556 $echo "Cross-compiling..."
2559 *-*-gcc) # A cross-compiling gcc, probably.
2560 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2562 # leave out ld, choosing it is more complex
2564 ranlib=$targetarch-ranlib
2565 $echo 'extern int foo;' > try.c
2566 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2568 if $test $# -gt 0; then
2570 incpth="`$echo $incpth|$sed 's/^ //'`"
2571 echo "Guessing incpth '$incpth'." >&4
2573 j="`$echo $i|$sed 's,/include$,/lib,'`"
2574 if $test -d $j; then
2578 libpth="`$echo $libpth|$sed 's/^ //'`"
2579 echo "Guessing libpth '$libpth'." >&4
2584 case "$targetarch" in
2585 '') echo "Targetarch not defined." >&4; croak=y ;;
2586 *) echo "Using targetarch $targetarch." >&4 ;;
2589 '') echo "Incpth not defined." >&4; croak=y ;;
2590 *) echo "Using incpth '$incpth'." >&4 ;;
2593 '') echo "Libpth not defined." >&4; croak=y ;;
2594 *) echo "Using libpth '$libpth'." >&4 ;;
2597 '') for i in $incpth; do
2598 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2600 echo "Guessing usrinc $usrinc." >&4
2605 '') echo "Usrinc not defined." >&4; croak=y ;;
2608 *) echo "Using usrinc $usrinc." >&4 ;;
2610 case "$targethost" in
2611 '') echo "Targethost not defined." >&4; croak=y ;;
2612 *) echo "Using targethost $targethost." >&4
2617 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2620 /*) run=$src/Cross/run
2621 targetmkdir=$src/Cross/mkdir
2623 from=$src/Cross/from
2625 *) pwd=`$test -f ../Configure & cd ..; pwd`
2627 targetmkdir=$pwd/Cross/mkdir
2629 from=$pwd/Cross/from
2632 case "$targetrun" in
2633 '') targetrun=ssh ;;
2638 case "$targetfrom" in
2639 '') targetfrom=scp ;;
2643 from=$from-$targetfrom
2644 case "$targetdir" in
2646 echo "Guessing targetdir $targetdir." >&4
2649 case "$targetuser" in
2651 echo "Guessing targetuser $targetuser." >&4
2654 case "$targetfrom" in
2658 case "$targetrun" in
2670 '') cwd=$targetdir ;;
2674 if $test ! -f \$exe.xok; then
2678 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2681 *) echo "Unknown targetrun '$targetrun'" >&4
2685 case "$targetmkdir" in
2687 cat >$targetmkdir <<EOF
2689 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2691 $chmod a+rx $targetmkdir
2693 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2705 $targetmkdir \`dirname \$f\`
2706 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2709 $targetmkdir $targetdir/\`dirname \$f\`
2710 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2723 $mkdir -p $targetdir/\`dirname \$f\`
2724 $cp \$f $targetdir/\$f || exit 1
2727 $targetmkdir $targetdir/\`dirname \$f\`
2728 $cp \$f $targetdir/\$f || exit 1
2735 *) echo "Unknown targetto '$targetto'" >&4
2739 case "$targetfrom" in
2746 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2751 cp) cat >$from <<EOF
2756 cp $targetdir/\$f . || exit 1
2761 *) echo "Unknown targetfrom '$targetfrom'" >&4
2765 if $test ! -f $run; then
2766 echo "Target 'run' script '$run' not found." >&4
2770 if $test ! -f $to; then
2771 echo "Target 'to' script '$to' not found." >&4
2775 if $test ! -f $from; then
2776 echo "Target 'from' script '$from' not found." >&4
2780 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2784 Using '$run' for remote execution,
2785 and '$from' and '$to'
2786 for remote file transfer.
2792 usecrosscompile='undef'
2797 : see whether [:lower:] and [:upper:] are supported character classes
2799 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2801 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2805 *) # There is a discontinuity in EBCDIC between 'I' and 'J'
2806 # (0xc9 and 0xd1), therefore that is a nice testing point.
2807 if test "X$up" = X -o "X$low" = X; then
2808 case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
2814 if test "X$up" = X -o "X$low" = X; then
2815 case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
2821 if test "X$up" = X -o "X$low" = X; then
2822 case "`echo IJ | od -x 2>/dev/null`" in
2824 echo "Hey, this might be EBCDIC." >&4
2825 if test "X$up" = X -o "X$low" = X; then
2826 case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2827 ij) up='[A-IJ-RS-Z]'
2832 if test "X$up" = X -o "X$low" = X; then
2833 case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2843 case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
2845 echo "Using $up and $low to convert case." >&4
2848 echo "I don't know how to translate letters from upper to lower case." >&4
2849 echo "Your tr is not acting any way I know of." >&4
2853 : set up the translation script tr, must be called with ./tr of course
2857 '[A-Z][a-z]') exec $tr '$up' '$low';;
2858 '[a-z][A-Z]') exec $tr '$low' '$up';;
2865 : Try to determine whether config.sh was made on this system
2866 case "$config_sh" in
2868 myuname=`$uname -a 2>/dev/null`
2869 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2870 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2871 # because the A-Z/a-z are not consecutive.
2872 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2873 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2874 newmyuname="$myuname"
2876 case "$knowitall" in
2878 if test -f ../config.sh; then
2879 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2880 eval "`grep myuname= ../config.sh`"
2882 if test "X$myuname" = "X$newmyuname"; then
2890 : Get old answers from old config file if Configure was run on the
2891 : same system, otherwise use the hints.
2894 if test -f config.sh; then
2896 rp="I see a config.sh file. Shall I use it to set the defaults?"
2899 n*|N*) echo "OK, I'll ignore it."
2900 mv config.sh config.sh.old
2901 myuname="$newmyuname"
2903 *) echo "Fetching default answers from your old config.sh file..." >&4
2911 : Older versions did not always set $sh. Catch re-use of such
2921 if test ! -f config.sh; then
2924 First time through, eh? I have some defaults handy for some systems
2925 that need some extra help getting the Configure answers right:
2928 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2930 : Half the following guesses are probably wrong... If you have better
2931 : tests or hints, please send them to perlbug@perl.org
2932 : The metaconfig authors would also appreciate a copy...
2933 $test -f /irix && osname=irix
2934 $test -f /xenix && osname=sco_xenix
2935 $test -f /dynix && osname=dynix
2936 $test -f /dnix && osname=dnix
2937 $test -f /lynx.os && osname=lynxos
2938 $test -f /unicos && osname=unicos && osvers=`$uname -r`
2939 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
2940 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
2941 $test -f /bin/mips && /bin/mips && osname=mips
2942 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
2943 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
2944 $test -d /usr/apollo/bin && osname=apollo
2945 $test -f /etc/saf/_sactab && osname=svr4
2946 $test -d /usr/include/minix && osname=minix
2947 $test -f /system/gnu_library/bin/ar.pm && osname=vos
2948 if $test -d /MachTen -o -d /MachTen_Folder; then
2950 if $test -x /sbin/version; then
2951 osvers=`/sbin/version | $awk '{print $2}' |
2952 $sed -e 's/[A-Za-z]$//'`
2953 elif $test -x /usr/etc/version; then
2954 osvers=`/usr/etc/version | $awk '{print $2}' |
2955 $sed -e 's/[A-Za-z]$//'`
2961 $test -f /sys/posix.dll &&
2962 $test -f /usr/bin/what &&
2963 set X `/usr/bin/what /sys/posix.dll` &&
2964 $test "$3" = UWIN &&
2968 if $test -f $uname; then
2976 umips) osname=umips ;;
2979 [23]100) osname=mips ;;
2980 next*) osname=next ;;
2982 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
2983 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
2986 elif $test -f /etc/kconfig; then
2988 if test "$lns" = "$ln -s"; then
2990 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
2992 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
2999 if test -n "$DJGPP"; then
3008 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3010 'not found') osvers="$4"."$3" ;;
3011 '<3240'|'<>3240') osvers=3.2.0 ;;
3012 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3013 '=3250'|'>3250') osvers=3.2.5 ;;
3017 bsd386) osname=bsd386
3020 cygwin*) osname=cygwin
3023 *dc.osx) osname=dcosx
3029 domainos) osname=apollo
3035 dynixptx*) osname=dynixptx
3036 osvers=`echo "$4"|sed 's/^v//'`
3038 freebsd) osname=freebsd
3040 genix) osname=genix ;;
3042 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3058 netbsd*) osname=netbsd
3061 news-os) osvers="$3"
3063 4*) osname=newsos4 ;;
3067 next*) osname=next ;;
3068 nonstop-ux) osname=nonstopux ;;
3069 POSIX-BC | posix-bc ) osname=posix-bc
3072 powerux | power_ux | powermax_os | powermaxos | \
3073 powerunix | power_unix) osname=powerux
3079 solaris) osname=solaris
3081 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3088 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3092 titanos) osname=titanos
3101 ultrix) osname=ultrix
3104 osf1|mls+) case "$5" in
3107 osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3110 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3113 hp*) osname=hp_osf1 ;;
3114 mips) osname=mips_osf1 ;;
3117 unixware) osname=svr5
3125 $2) case "$osname" in
3129 : svr4.x or possibly later
3139 if test -f /stand/boot ; then
3140 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3141 if test -n "$INITPROG" -a -f "$INITPROG"; then
3142 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3143 if test -n "$isesix"; then
3151 *) if test -f /etc/systemid; then
3153 set `echo $3 | $sed 's/\./ /g'` $4
3154 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3156 elif $test -f $src/hints/sco_$1_$2.sh; then
3158 elif $test -f $src/hints/sco_$1.sh; then
3163 '') : Still unknown. Probably a generic Sys V.
3172 *) case "$osname" in
3173 '') : Still unknown. Probably a generic BSD.
3181 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3182 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3183 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3186 $rm -f UU/kernel.what
3187 elif test -d c:/.; then
3194 case "$targetarch" in
3197 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3202 : Now look for a hint file osname_osvers, unless one has been
3203 : specified already.
3206 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3207 : Also try without trailing minor version numbers.
3208 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3209 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3210 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3211 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3214 *) case "$osvers" in
3217 *) if $test -f $src/hints/$file.sh ; then
3219 elif $test -f $src/hints/$xfile.sh ; then
3221 elif $test -f $src/hints/$xxfile.sh ; then
3223 elif $test -f $src/hints/$xxxfile.sh ; then
3225 elif $test -f $src/hints/$xxxxfile.sh ; then
3227 elif $test -f "$src/hints/${osname}.sh" ; then
3236 if $test -f Policy.sh ; then
3239 none) dflt="Policy" ;;
3240 *) dflt="Policy $dflt" ;;
3245 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3249 if $test -f Policy.sh ; then
3252 There's also a Policy hint file available, which should make the
3253 site-specific (policy) questions easier to answer.
3260 You may give one or more space-separated answers, or "none" if appropriate.
3261 A well-behaved OS will have no hints, so answering "none" or just "Policy"
3262 is a good thing. DO NOT give a wrong version or a wrong OS.
3266 rp="Which of these apply, if any?"
3269 for file in $tans; do
3270 if $test X$file = XPolicy -a -f Policy.sh; then
3272 $cat Policy.sh >> UU/config.sh
3273 elif $test -f $src/hints/$file.sh; then
3274 . $src/hints/$file.sh
3275 $cat $src/hints/$file.sh >> UU/config.sh
3276 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3279 : Give one chance to correct a possible typo.
3280 echo "$file.sh does not exist"
3282 rp="hint to use instead?"
3284 for file in $ans; do
3285 if $test -f "$src/hints/$file.sh"; then
3286 . $src/hints/$file.sh
3287 $cat $src/hints/$file.sh >> UU/config.sh
3288 elif $test X$ans = X -o X$ans = Xnone ; then
3291 echo "$file.sh does not exist -- ignored."
3298 : Remember our hint file for later.
3299 if $test -f "$src/hints/$file.sh" ; then
3309 echo "Fetching default answers from $config_sh..." >&4
3313 cp $config_sh config.sh 2>/dev/null
3323 test "$override" && . ./optdef.sh
3325 : Restore computed paths
3326 for file in $loclist $trylist; do
3327 eval $file="\$_$file"
3332 Configure uses the operating system name and version to set some defaults.
3333 The default value is probably right if the name rings a bell. Otherwise,
3334 since spelling matters for me, either accept the default or answer "none"
3341 ''|' '|none) dflt=none ;;
3342 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3345 *) dflt="$osname" ;;
3347 rp="Operating system name?"
3351 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3357 ''|' '|none) dflt=none ;;
3358 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3359 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3361 ''|' ') dflt=none ;;
3366 *) dflt="$osvers" ;;
3368 rp="Operating system version?"
3378 : who configured the system
3379 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3380 cf_by=`(logname) 2>/dev/null`
3383 cf_by=`(whoami) 2>/dev/null`
3385 "") cf_by=unknown ;;
3389 : set up the script used to warn in case of inconsistency
3396 echo "*** WHOA THERE!!! ***" >&4
3397 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
3398 rp=" Keep the $hint value?"
3401 y) td=$was; tu=$was;;
3405 : function used to set $1 to $val
3406 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
3408 $define$undef) . ./whoa; eval "$var=\$td";;
3409 $undef$define) . ./whoa; eval "$var=\$tu";;
3410 *) eval "$var=$val";;
3413 case "$usethreads" in
3414 $define|true|[yY]*) dflt='y';;
3419 Perl can be built to take advantage of threads on some systems.
3420 To do so, Configure can be run with -Dusethreads.
3422 Note that threading is a highly experimental feature, and
3423 some known race conditions still remain. If you choose to try
3424 it, be very sure to not actually deploy it for production
3425 purposes. README.threads has more details, and is required
3426 reading if you enable threads.
3428 If this doesn't make any sense to you, just accept the default '$dflt'.
3430 rp='Build a threading Perl?'
3433 y|Y) val="$define" ;;
3439 case "$usethreads" in
3443 As of release 5.6, Perl has two different threading implementations,
3444 an interpreter-based version (ithreads) with one interpreter per
3445 thread, and the 5.005 version (5005threads). Both implementations
3446 are considered experimental, but since 5.8 ithreads somewhat less so.
3447 The 5005threads is effectively unmaintained.
3450 : Default to ithreads unless overridden on command line or with
3453 case "$use5005threads" in
3454 $define|true|[yY]*) dflt='n';;
3456 case "$useithreads" in
3457 $undef|false|[nN]*) dflt='n';;
3459 rp='Use interpreter-based ithreads?'
3462 y|Y) val="$define" ;;
3467 : Now set use5005threads to the opposite value.
3468 case "$useithreads" in
3469 $define) val="$undef" ;;
3476 useithreads="$undef"
3477 use5005threads="$undef"
3481 case "$useithreads$use5005threads" in
3485 You cannot have both the ithreads and the 5.005 threads enabled
3486 at the same time. Disabling the 5.005 threads since they are
3487 much less stable than the ithreads.
3490 use5005threads="$undef"
3494 case "$d_oldpthreads" in
3495 '') : Configure tests would be welcome here. For now, assume undef.
3497 *) val="$d_oldpthreads" ;;
3503 case "$usethreads" in
3504 "$define"|true|[yY]*)
3505 : Look for a hint-file generated 'call-back-unit'. If the
3506 : user has specified that a threading perl is to be built,
3507 : we may need to set or change some other defaults.
3508 if $test -f usethreads.cbu; then
3509 echo "Your platform has some specific hints for threaded builds, using them..."
3513 (Your platform doesn't have any specific hints for threaded builds.
3514 Assuming POSIX threads, then.)
3522 Perl can be built so that multiple Perl interpreters can coexist
3523 within the same Perl executable.
3526 case "$useithreads" in
3529 This multiple interpreter support is required for interpreter-based threads.
3533 *) case "$usemultiplicity" in
3534 $define|true|[yY]*) dflt='y';;
3538 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
3539 rp='Build Perl for multiplicity?'
3542 y|Y) val="$define" ;;
3551 case "$usemorebits" in
3552 "$define"|true|[yY]*)
3553 use64bitint="$define"
3554 uselongdouble="$define"
3555 usemorebits="$define"
3557 *) usemorebits="$undef"
3561 : make some quick guesses about what we are up against
3563 $echo $n "Hmm... $c"
3573 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
3574 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
3576 echo "Looks kind of like an OSF/1 system, but we'll see..."
3578 elif test `echo abc | $tr a-z A-Z` = Abc ; then
3579 xxx=`./loc addbib blurfl $pth`
3580 if $test -f $xxx; then
3581 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3585 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3586 echo "Looks kind of like an extended USG system, but we'll see..."
3588 echo "Looks kind of like a USG system, but we'll see..."
3592 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3593 echo "Looks kind of like a BSD system, but we'll see..."
3597 echo "Looks kind of like a Version 7 system, but we'll see..."
3600 case "$eunicefix" in
3603 There is, however, a strange, musty smell in the air that reminds me of
3604 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3608 : it so happens the Eunice I know will not run shell scripts in Unix format
3612 echo "Congratulations. You aren't running Eunice."
3616 : Detect OS2. The p_ variable is set above in the Head.U unit.
3617 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
3618 : semicolon as a patch separator
3623 I have the feeling something is not exactly right, however...don't tell me...
3624 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3625 (Or you may be running DOS with DJGPP.)
3630 if test -f /xenix; then
3631 echo "Actually, this looks more like a XENIX system..."
3636 echo "It's not Xenix..."
3641 if test -f /venix; then
3642 echo "Actually, this looks more like a VENIX system..."
3649 echo "Nor is it Venix..."
3652 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3653 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3660 rp="Use which C compiler?"
3664 : See if they have not cc but they do have gcc
3666 : Look for a hint-file generated 'call-back-unit'. Now that the
3667 : user has specified the compiler, we may need to set or change some
3669 if $test -f cc.cbu; then
3675 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3681 printf("%s\n", __VERSION__);
3683 printf("%s\n", "1");
3689 if $cc -o try $ccflags $ldflags try.c; then
3690 gccversion=`$run ./try`
3691 case "$gccversion" in
3692 '') echo "You are not using GNU cc." ;;
3693 *) echo "You are using GNU cc $gccversion."
3699 echo "*** WHOA THERE!!! ***" >&4
3700 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3701 case "$knowitall" in
3703 echo " You'd better start hunting for one and let me know about it." >&4
3709 case "$gccversion" in
3710 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3712 case "$gccversion" in
3713 '') gccosandvers='' ;;
3714 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3715 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3717 case "$gccosandvers" in
3718 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3719 $osname$osvers) ;; # looking good
3720 $osname*) cat <<EOM >&4
3722 *** WHOA THERE!!! ***
3724 Your gcc has not been compiled for the exact release of
3725 your operating system ($gccosandvers versus $osname$osvers).
3727 In general it is a good idea to keep gcc synchronized with
3728 the operating system because otherwise serious problems
3729 may ensue when trying to compile software, like Perl.
3731 I'm trying to be optimistic here, though, and will continue.
3732 If later during the configuration and build icky compilation
3733 problems appear (headerfile conflicts being the most common
3734 manifestation), I suggest reinstalling the gcc to match
3735 your operating system release.
3739 *) gccosandvers='' ;; # failed to parse, better be silent
3748 : decide how portable to be. Allow command line overrides.
3749 case "$d_portable" in
3751 *) d_portable="$define" ;;
3754 : set up shell script to do ~ expansion
3760 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3763 if $test -f /bin/csh; then
3764 /bin/csh -f -c "glob \$1"
3769 name=\`$expr x\$1 : '..\([^/]*\)'\`
3770 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3771 if $test ! -d "\$dir"; then
3773 echo "\$me: can't locate home directory for: \$name" >&2
3778 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3794 : now set up to get a file name
3798 cat <<'EOSC' >>getfile
3814 expr $fn : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3815 fn=`echo $fn | sed 's/(.*)//'`
3821 loc_file=`expr $fn : '.*:\(.*\)'`
3822 fn=`expr $fn : '\(.*\):.*'`
3830 */*) fullpath=true;;
3839 *e*) exp_file=true;;
3842 *p*) nopath_ok=true;;
3847 *d*) type='Directory';;
3848 *l*) type='Locate';;
3853 Locate) what='File';;
3858 case "$d_portable" in
3866 while test "$type"; do
3871 true) rp="$rp (~name ok)";;
3874 if test -f UU/getfile.ok && \
3875 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3894 value=`UU/filexp $ans`
3897 if test "$ans" != "$value"; then
3898 echo "(That expands to $value on this system.)"
3912 /*) value="$ansexp" ;;
3913 [a-zA-Z]:/*) value="$ansexp" ;;
3918 echo "I shall only accept a full path name, as in /bin/ls." >&4
3919 echo "Use a ! shell escape if you wish to check pathnames." >&4
3922 echo "Please give a full path name, starting with slash." >&4
3925 echo "Note that using ~name is ok provided it expands well." >&4
3938 for fp in $gfpth; do
3939 if test "X$fp" = X.; then
3944 if test -f "$pf"; then
3946 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
3948 echo "($value is not a plain file, but that's ok.)"
3951 if test X"$type" = X; then
3958 for fp in $gfpth; do
3959 if test "X$fp" = X.; then
3964 direxp="$fp/$ansexp"
3966 if test -d "$direxp"; then
3974 if test -d "$ansexp"; then
3975 echo "(Looking for $loc_file in directory $value.)"
3976 value="$value/$loc_file"
3977 ansexp="$ansexp/$loc_file"
3979 if test -f "$ansexp"; then
3982 case "$nopath_ok" in
3983 true) case "$value" in
3985 *) echo "Assuming $value will be in people's path."
4001 if test "$fastread" = yes; then
4006 rp="$what $value doesn't exist. Use that name anyway?"
4025 test "X$gfpthkeep" != Xy && gfpth=""
4028 : What should the include directory be ?
4030 $echo $n "Hmm... $c"
4034 if $test -f /bin/mips && /bin/mips; then
4035 echo "Looks like a MIPS system..."
4036 $cat >usr.c <<'EOCP'
4037 #ifdef SYSTYPE_BSD43
4041 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4042 dflt='/bsd43/usr/include'
4046 mips_type='System V'
4048 $rm -f usr.c usr.out
4049 echo "and you're compiling with the $mips_type compiler and libraries."
4053 echo "Doesn't look like a MIPS system."
4063 case "$xxx_prompt" in
4066 rp='Where are the include files you want to use?'
4074 : see how we invoke the C preprocessor
4076 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4077 cat <<'EOT' >testcpp.c
4083 if test ! -f cppstdin; then
4084 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4085 # AIX cc -E doesn't show the absolute headerfile
4086 # locations but we'll cheat by using the -M flag.
4087 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
4089 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4092 echo "Keeping your $hint cppstdin wrapper."
4095 wrapper=`pwd`/cppstdin
4099 if $test "X$cppstdin" != "X" && \
4100 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4101 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4103 echo "You used to use $cppstdin $cppminus so we'll use that again."
4105 '') echo "But let's see if we can live without a wrapper..." ;;
4107 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4108 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4110 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4113 echo "(However, $cpprun $cpplast does not work, let's see...)"
4121 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4128 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4129 $cc -E <testcpp.c >testcpp.out 2>&1; \
4130 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4131 echo "Yup, it does."
4134 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4135 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4136 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4137 echo "Yup, it does."
4140 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4141 $cc -P <testcpp.c >testcpp.out 2>&1; \
4142 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4143 echo "Yipee, that works!"
4146 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4147 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4148 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4149 echo "At long last!"
4152 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4153 $cpp <testcpp.c >testcpp.out 2>&1; \
4154 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4158 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4159 $cpp - <testcpp.c >testcpp.out 2>&1; \
4160 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4161 echo "Hooray, it works! I was beginning to wonder."
4164 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4165 $wrapper <testcpp.c >testcpp.out 2>&1; \
4166 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4172 rp="No dice. I can't find a C preprocessor. Name one:"
4176 $x_cpp <testcpp.c >testcpp.out 2>&1
4177 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4178 echo "OK, that will do." >&4
4180 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4195 echo "Perhaps can we force $cc -E using a wrapper..."
4196 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4197 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4203 echo "Nope, we'll have to live without it..."
4217 "$wrapper"|'cppstdin') ;;
4218 *) $rm -f $wrapper;;
4220 $rm -f testcpp.c testcpp.out
4222 : Set private lib path
4225 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4230 '') dlist="$loclibpth $plibpth $glibpth";;
4231 *) dlist="$libpth";;
4234 : Now check and see which directories actually exist, avoiding duplicates
4238 if $test -d $xxx; then
4241 *) libpth="$libpth $xxx";;
4247 Some systems have incompatible or broken versions of libraries. Among
4248 the directories listed in the question below, please remove any you
4249 know not to be holding relevant libraries, and add any that are needed.
4250 Say "none" for none.
4261 rp="Directories to use for library searches?"
4268 : compute shared library extension
4271 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4281 On some systems, shared libraries may be available. Answer 'none' if
4282 you want to suppress searching of shared libraries for the remainder
4283 of this configuration.
4286 rp='What is the file extension used for shared libraries?'
4290 : Define several unixisms.
4291 : Hints files or command line option can be used to override them.
4292 : The convoluted testing is in case hints files set either the old
4295 '') case "$exe_ext" in
4297 *) _exe="$exe_ext" ;;
4302 '') case "$lib_ext" in
4309 '') case "$obj_ext" in
4316 '') case "$path_sep" in
4327 : Which makefile gets called first. This is used by make depend.
4328 case "$firstmakefile" in
4329 '') firstmakefile='makefile';;
4333 $define|true|[yY]*) dflt='y';;
4338 Perl can be built to use the SOCKS proxy protocol library. To do so,
4339 Configure must be run with -Dusesocks. If you use SOCKS you also need
4340 to use the PerlIO abstraction layer, this will be implicitly selected.
4342 If this doesn't make any sense to you, just accept the default '$dflt'.
4344 rp='Build Perl for SOCKS?'
4347 y|Y) val="$define" ;;
4354 $define|true|[yY]*) useperlio="$define";;
4357 : Looking for optional libraries
4359 echo "Checking for optional libraries..." >&4
4364 case "$libswanted" in
4365 '') libswanted='c_s';;
4368 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4374 for thisdir in $libpth $xlibpth; do
4375 test -d $thisdir && libspath="$libspath $thisdir"
4377 for thislib in $libswanted; do
4378 for thisdir in $libspath; do
4380 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4381 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4382 $test -f "$xxx" && eval $libscheck
4383 $test -f "$xxx" && libstyle=shared
4385 if test ! -f "$xxx"; then
4386 xxx=$thisdir/lib$thislib.$so
4387 $test -f "$xxx" && eval $libscheck
4388 $test -f "$xxx" && libstyle=shared
4390 if test ! -f "$xxx"; then
4391 xxx=$thisdir/lib$thislib$_a
4392 $test -f "$xxx" && eval $libscheck
4393 $test -f "$xxx" && libstyle=static
4395 if test ! -f "$xxx"; then
4396 xxx=$thisdir/$thislib$_a
4397 $test -f "$xxx" && eval $libscheck
4398 $test -f "$xxx" && libstyle=static
4400 if test ! -f "$xxx"; then
4401 xxx=$thisdir/lib${thislib}_s$_a
4402 $test -f "$xxx" && eval $libscheck
4403 $test -f "$xxx" && libstyle=static
4404 $test -f "$xxx" && thislib=${thislib}_s
4406 if test ! -f "$xxx"; then
4407 xxx=$thisdir/Slib$thislib$_a
4408 $test -f "$xxx" && eval $libscheck
4409 $test -f "$xxx" && libstyle=static
4411 if $test -f "$xxx"; then
4413 shared) echo "Found -l$thislib (shared)." ;;
4414 static) echo "Found -l$thislib." ;;
4415 *) echo "Found -l$thislib ($libstyle)." ;;
4419 *) dflt="$dflt -l$thislib"
4420 libsfound="$libsfound $xxx"
4422 libsfiles="$libsfiles $yyy"
4423 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4424 case " $libsdirs " in
4426 *) libsdirs="$libsdirs $yyy" ;;
4433 if $test ! -f "$xxx"; then
4434 echo "No -l$thislib."
4445 ' '|'') dflt='none';;
4450 In order to compile $package on your machine, a number of libraries
4451 are usually needed. Include any other special libraries here as well.
4452 Say "none" for none. The default list is almost always right.
4456 rp="What libraries to use?"
4463 : determine optimization, if desired, or use for debug flag also
4465 ' '|$undef) dflt='none';;
4467 *) dflt="$optimize";;
4471 By default, $package compiles with the -O flag to use the optimizer.
4472 Alternately, you might want to use the symbolic debugger, which uses
4473 the -g flag (on traditional Unix systems). Either flag can be
4474 specified here. To use neither flag, specify the word "none".
4477 rp="What optimizer/debugger flag should be used?"
4481 'none') optimize=" ";;
4485 : We will not override a previous value, but we might want to
4486 : augment a hint file
4488 default|recommended)
4489 case "$gccversion" in
4490 1*) dflt='-fpcc-struct-return' ;;
4493 *-g*) dflt="$dflt -DDEBUGGING";;
4495 case "$gccversion" in
4496 2*) if test -d /etc/conf/kconfig.d &&
4497 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
4503 case "$gccversion" in
4507 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
4508 echo 'int main(void) { return 0; }' > gcctest.c
4509 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
4510 echo "Yes, it does." 2>&1
4513 echo "Leaving current flags $ccflags alone." 2>&1
4515 *) dflt="$dflt -fno-strict-aliasing" ;;
4518 echo "Nope, it doesn't, but that's ok." 2>&1
4525 case "$mips_type" in
4526 *BSD*|'') inclwanted="$locincpth $usrinc";;
4527 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
4529 for thisincl in $inclwanted; do
4530 if $test -d $thisincl; then
4531 if $test x$thisincl != x$usrinc; then
4533 *" -I$thisincl "*);;
4534 *) dflt="$dflt -I$thisincl ";;
4540 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
4542 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
4550 *) dflt="$dflt -D$2";;
4554 set signal.h LANGUAGE_C; eval $inctest
4558 ccflags="$ccflags -DSOCKS"
4563 default|recommended) dflt="$ccflags $dflt" ;;
4564 *) dflt="$ccflags";;
4573 Your C compiler may want other flags. For this question you should include
4574 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
4575 but you should NOT include libraries or ld flags like -lwhatever. If you
4576 want $package to honor its debug switch, you should include -DDEBUGGING here.
4577 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
4579 To use no flags, specify the word "none".
4585 rp="Any additional cc flags?"
4592 : the following weeds options from ccflags that are of no interest to cpp
4594 '') cppflags="$ccflags" ;;
4595 *) cppflags="$cppflags $ccflags" ;;
4597 case "$gccversion" in
4598 1*) cppflags="$cppflags -D__GNUC__"
4600 case "$mips_type" in
4602 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4608 echo "Let me guess what the preprocessor flags are..." >&4
4622 *) ftry="$previous $flag";;
4624 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4625 >cpp1.out 2>/dev/null && \
4626 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4627 >cpp2.out 2>/dev/null && \
4628 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4629 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4631 cppflags="$cppflags $ftry"
4641 *-*) echo "They appear to be: $cppflags";;
4643 $rm -f cpp.c cpp?.out
4647 : flags used in final linking phase
4649 '') if ./venix; then
4655 *-posix*) dflt="$dflt -posix" ;;
4658 *) dflt="$ldflags";;
4661 : Try to guess additional flags to pick up local libraries.
4662 for thislibdir in $libpth; do
4663 case " $loclibpth " in
4666 *"-L$thislibdir "*) ;;
4667 *) dflt="$dflt -L$thislibdir" ;;
4679 Your C linker may need flags. For this question you should
4680 include -L/whatever and any other flags used by the C linker, but you
4681 should NOT include libraries like -lwhatever.
4683 Make sure you include the appropriate -L/path flags if your C linker
4684 does not normally search all of the directories you specified above,
4687 To use no flags, specify the word "none".
4691 rp="Any additional ld flags (NOT including libraries)?"
4697 rmlist="$rmlist pdp11"
4701 echo "Checking your choice of C compiler and flags for coherency..." >&4
4702 $cat > try.c <<'EOF'
4704 int main() { printf("Ok\n"); exit(0); }
4706 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
4708 $cat >try.msg <<'EOM'
4709 I've tried to compile and run the following simple program:
4712 $cat try.c >> try.msg
4714 $cat >> try.msg <<EOM
4721 and I got the following output:
4725 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
4726 if $sh -c "$run ./try" >>try.msg 2>&1; then
4730 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4733 cat >> try.msg <<'EOQS'
4734 If $libs contains -lsfio, and sfio is mis-configured, then it
4735 sometimes (apparently) runs and exits with a 0 status, but with no
4736 output! It may have to do with sfio's use of _exit vs. exit.
4739 rp="You have a big problem. Shall I abort Configure"
4746 echo "The program compiled OK, but exited with status $?." >>try.msg
4747 rp="You have a problem. Shall I abort Configure"
4751 echo "I can't compile the test program." >>try.msg
4752 rp="You have a BIG problem. Shall I abort Configure"
4758 case "$knowitall" in
4760 echo "(The supplied flags or libraries might be incorrect.)"
4768 *) echo "Ok. Stopping Configure." >&4
4773 n) echo "OK, that should do.";;
4775 $rm -f try try.* core
4777 : define a shorthand compile call
4781 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
4782 : define a shorthand compile call for compilations that should be ok.
4786 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
4788 : check for lengths of integral types
4792 echo "Checking to see how big your integers are..." >&4
4793 $cat >try.c <<'EOCP'
4797 printf("intsize=%d;\n", (int)sizeof(int));
4798 printf("longsize=%d;\n", (int)sizeof(long));
4799 printf("shortsize=%d;\n", (int)sizeof(short));
4804 if eval $compile_ok && $run ./try > /dev/null; then
4806 echo "Your integers are $intsize bytes long."
4807 echo "Your long integers are $longsize bytes long."
4808 echo "Your short integers are $shortsize bytes long."
4812 Help! I can't compile and run the intsize test program: please enlighten me!
4813 (This is probably a misconfiguration in your system or libraries, and
4814 you really ought to fix it. Still, I'll try anyway.)
4818 rp="What is the size of an integer (in bytes)?"
4822 rp="What is the size of a long integer (in bytes)?"
4826 rp="What is the size of a short integer (in bytes)?"
4834 : check for void type
4836 echo "Checking to see how well your C compiler groks the void type..." >&4
4837 case "$voidflags" in
4839 $cat >try.c <<'EOCP'
4845 extern void moo(); /* function returning void */
4846 void (*goo)(); /* ptr to func returning void */
4848 void *hue; /* generic ptr */
4861 int main() { sub(); }
4863 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
4864 voidflags=$defvoidused
4865 echo "Good. It appears to support void to the level $package wants.">&4
4866 if $contains warning .out >/dev/null 2>&1; then
4867 echo "However, you might get some warnings that look like this:"
4871 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
4872 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
4873 echo "It supports 1..."
4874 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
4875 echo "It also supports 2..."
4876 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
4878 echo "And it supports 4 but not 8 definitely."
4880 echo "It doesn't support 4..."
4881 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
4883 echo "But it supports 8."
4886 echo "Neither does it support 8."
4890 echo "It does not support 2..."
4891 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
4893 echo "But it supports 4 and 8."
4895 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
4897 echo "And it supports 4 but has not heard about 8."
4899 echo "However it supports 8 but not 4."
4904 echo "There is no support at all for void."
4909 case "$voidflags" in
4912 Support flag bits are:
4913 1: basic void declarations.
4914 2: arrays of pointers to functions returning void.
4915 4: operations between pointers to and addresses of void functions.
4916 8: generic void pointers.
4919 rp="Your void support flags add up to what?"
4926 : check for length of pointer
4930 echo "Checking to see how big your pointers are..." >&4
4931 if test "$voidflags" -gt 7; then
4932 echo '#define VOID_PTR char *' > try.c
4934 echo '#define VOID_PTR void *' > try.c
4936 $cat >>try.c <<'EOCP'
4940 printf("%d\n", (int)sizeof(VOID_PTR));
4945 if eval $compile_ok; then
4946 ptrsize=`$run ./try`
4947 echo "Your pointers are $ptrsize bytes long."
4950 echo "(I can't seem to compile the test program. Guessing...)" >&4
4951 rp="What is the size of a pointer (in bytes)?"
4959 : check for long long
4961 echo "Checking to see if you have long long..." >&4
4962 echo 'int main() { long long x = 7; return 0; }' > try.c
4964 if eval $compile; then
4966 echo "You have long long."
4969 echo "You do not have long long."
4975 : check for length of long long
4976 case "${d_longlong}${longlongsize}" in
4979 echo "Checking to see how big your long longs are..." >&4
4980 $cat >try.c <<'EOCP'
4984 printf("%d\n", (int)sizeof(long long));
4989 if eval $compile_ok; then
4990 longlongsize=`$run ./try`
4991 echo "Your long longs are $longlongsize bytes long."
4995 echo "(I can't seem to compile the test program. Guessing...)"
4996 rp="What is the size of a long long (in bytes)?"
5000 if $test "X$longsize" = "X$longlongsize"; then
5001 echo "(That isn't any different from an ordinary long.)"
5007 : determine filename position in cpp output
5009 echo "Computing filename position in cpp output for #include directives..." >&4
5011 vos) testaccess=-e ;;
5014 echo '#include <stdio.h>' > foo.c
5017 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5018 $grep '^[ ]*#.*stdio\.h' | \
5019 while read cline; do
5022 while $test \$# -gt 0; do
5023 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5028 pos=\`expr \$pos + 1\`
5040 *) pos="${fieldn}th";;
5042 echo "Your cpp writes the filename in the $pos field of the line."
5045 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
5048 : locate header file
5053 for usrincdir in $usrinc
5055 if test -f \$usrincdir/\$wanted; then
5056 echo "\$usrincdir/\$wanted"
5060 awkprg='{ print \$$fieldn }'
5061 echo "#include <\$wanted>" > foo\$\$.c
5062 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5063 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5064 while read cline; do
5065 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5067 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5068 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5073 # status = 0: grep returned 0 lines, case statement not executed
5074 # status = 1: headerfile found
5075 # status = 2: while loop executed, no headerfile found
5079 if test \$status -eq 1; then
5086 : define an alternate in-header-list? function
5087 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5088 cont=true; xxf="echo \"<\$1> found.\" >&4";
5089 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5090 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5092 case $# in 4) instead=instead;; *) instead="at last";; esac;
5093 while $test "$cont"; do
5095 var=$2; eval "was=\$$2";
5096 if $test "$xxx" && $test -r "$xxx";
5098 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5101 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5102 set $yyy; shift; shift; yyy=$@;
5103 case $# in 0) cont="";;
5104 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5105 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5106 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5107 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5111 do set $yyy; var=$2; eval "was=\$$2";
5112 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5113 set $yyy; shift; shift; yyy=$@;
5116 : see if inttypes.h is available
5117 : we want a real compile instead of Inhdr because some systems
5118 : have an inttypes.h which includes non-existent headers
5121 #include <inttypes.h>
5123 static int32_t foo32 = 0x12345678;
5127 if eval $compile; then
5128 echo "<inttypes.h> found." >&4
5131 echo "<inttypes.h> NOT found." >&4
5140 echo "Checking to see if you have int64_t..." >&4
5142 #include <sys/types.h>
5143 #$i_inttypes I_INTTYPES
5145 #include <inttypes.h>
5147 int main() { int64_t x = 7; }
5150 if eval $compile; then
5152 echo "You have int64_t."
5155 echo "You do not have int64_t."
5163 echo "Checking which 64-bit integer type we could use..." >&4
5169 val='"unsigned int"'
5174 *) case "$longsize" in
5178 val='"unsigned long"'
5183 *) case "$d_longlong:$longlongsize" in
5188 val='"unsigned long long"'
5193 *) case "$d_int64_t" in
5212 '') echo "Alas, no 64-bit integer types in sight." >&4
5215 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5221 case "$uselonglong" in
5222 "$define"|true|[yY]*)
5225 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5227 use64bitint="$define"
5230 case "$use64bits" in
5231 "$define"|true|[yY]*)
5234 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5236 use64bitint="$define"
5239 case "$use64bitints" in
5240 "$define"|true|[yY]*)
5243 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5245 use64bitint="$define"
5248 case "$use64bitsint" in
5249 "$define"|true|[yY]*)
5252 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5254 use64bitint="$define"
5257 case "$uselonglongs" in
5258 "$define"|true|[yY]*)
5261 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5263 use64bitint="$define"
5266 case "$use64bitsall" in
5267 "$define"|true|[yY]*)
5270 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5272 use64bitall="$define"
5277 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5279 case "$use64bitall" in
5280 "$define"|true|[yY]*) use64bitint="$define" ;;
5286 You have natively 64-bit long integers.
5290 *) case "$use64bitint" in
5291 "$define"|true|[yY]*) dflt='y';;
5300 Perl can be built to take advantage of 64-bit integer types
5301 on some systems. To do so, Configure can be run with -Duse64bitint.
5302 Choosing this option will most probably introduce binary incompatibilities.
5304 If this doesn't make any sense to you, just accept the default '$dflt'.
5305 (The default has been chosen based on your configuration.)
5307 rp='Try to use 64-bit integers, if available?'
5310 [yY]*) val="$define" ;;
5318 case "$use64bitall" in
5319 "$define"|true|[yY]*) dflt='y' ;;
5320 *) case "$longsize" in
5328 You may also choose to try maximal 64-bitness. It means using as much
5329 64-bitness as possible on the platform. This in turn means even more
5330 binary incompatibilities. On the other hand, your platform may not
5331 have any more 64-bitness available than what you already have chosen.
5333 If this doesn't make any sense to you, just accept the default '$dflt'.
5334 (The default has been chosen based on your configuration.)
5336 rp='Try to use maximal 64-bit support, if available?'
5339 [yY]*) val="$define" ;;
5344 case "$use64bitall" in
5346 case "$use64bitint" in
5350 Since you have chosen a maximally 64-bit build, I'm also turning on
5351 the use of 64-bit integers.
5353 use64bitint="$define" ;;
5358 case "$use64bitall" in
5359 "$define"|true|[yY]*)
5363 *** You have chosen a maximally 64-bit build, but your pointers
5364 *** are only 4 bytes wide, disabling maximal 64-bitness.
5367 use64bitall="$undef"
5368 case "$use64bitint" in
5369 "$define"|true|[yY]*) ;;
5372 *** Downgrading from maximal 64-bitness to using 64-bit integers.
5375 use64bitint="$define"
5383 case "$use64bitint" in
5384 "$define"|true|[yY]*)
5385 : Look for a hint-file generated 'call-back-unit'. If the
5386 : user has specified that a 64-bit perl is to be built,
5387 : we may need to set or change some other defaults.
5388 if $test -f use64bitint.cbu; then
5389 echo "Your platform has some specific hints for 64-bit integers, using them..."
5393 4) case "$archname64" in
5394 '') archname64=64int ;;
5401 case "$use64bitall" in
5402 "$define"|true|[yY]*)
5403 : Look for a hint-file generated 'call-back-unit'. If the
5404 : user has specified that a maximally 64-bit perl is to be built,
5405 : we may need to set or change some other defaults.
5406 if $test -f use64bitall.cbu; then
5407 echo "Your platform has some specific hints for 64-bit builds, using them..."
5411 4) case "$archname64" in
5412 ''|64int) archname64=64all ;;
5420 echo "Checking for GNU C Library..." >&4
5433 if eval $compile_ok && $run ./try; then
5435 echo "You are using the GNU C Library"
5438 echo "You are not using the GNU C Library"
5444 : see if nm is to be used to determine whether a symbol is defined or not
5448 case "$d_gnulibc" in
5451 echo "nm probably won't work on the GNU C Library." >&4
5457 if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
5459 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
5460 echo "'nm' won't be sufficient on this sytem." >&4
5466 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
5467 if $test $dflt -gt 20; then
5477 true|$define) dflt=y;;
5484 I can use $nm to extract the symbols from your C libraries. This
5485 is a time consuming task which may generate huge output on the disk (up
5486 to 3 megabytes) but that should make the symbols extraction faster. The
5487 alternative is to skip the 'nm' extraction part and to compile a small
5488 test program instead to determine whether each symbol is present. If
5489 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
5490 this may be the best solution.
5492 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
5495 rp="Shall I use $nm to extract C symbols from the libraries?"
5498 [Nn]*) usenm=false;;
5507 : nm options which may be necessary
5509 '') if $test -f /mach_boot; then
5511 elif $test -d /usr/ccs/lib; then
5512 nm_opt='-p' # Solaris (and SunOS?)
5513 elif $test -f /dgux; then
5515 elif $test -f /lib64/rld; then
5516 nm_opt='-p' # 64-bit Irix
5522 : nm options which may be necessary for shared libraries but illegal
5523 : for archive libraries. Thank you, Linux.
5524 case "$nm_so_opt" in
5525 '') case "$myuname" in
5527 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
5528 nm_so_opt='--dynamic'
5537 : get list of predefined functions in a handy place
5542 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
5548 *) for thislib in $libs; do
5551 : Handle C library specially below.
5554 thislib=`echo $thislib | $sed -e 's/^-l//'`
5555 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
5557 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
5559 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
5561 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
5563 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
5565 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
5567 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
5572 libnames="$libnames $try"
5574 *) libnames="$libnames $thislib" ;;
5583 for xxx in $libpth; do
5584 $test -r $1 || set $xxx/libc.$so
5585 : The messy sed command sorts on library version numbers.
5587 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
5588 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
5590 s/[0-9][0-9]*/0000&/g
5591 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
5594 $sort | $sed -e 's/^.* //'`
5597 $test -r $1 || set /usr/ccs/lib/libc.$so
5598 $test -r $1 || set /lib/libsys_s$_a
5604 if $test -r "$1"; then
5605 echo "Your (shared) C library seems to be in $1."
5607 elif $test -r /lib/libc && $test -r /lib/clib; then
5608 echo "Your C library seems to be in both /lib/clib and /lib/libc."
5610 libc='/lib/clib /lib/libc'
5611 if $test -r /lib/syslib; then
5612 echo "(Your math library is in /lib/syslib.)"
5613 libc="$libc /lib/syslib"
5615 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5616 echo "Your C library seems to be in $libc, as you said before."
5617 elif $test -r $incpath/usr/lib/libc$_a; then
5618 libc=$incpath/usr/lib/libc$_a;
5619 echo "Your C library seems to be in $libc. That's fine."
5620 elif $test -r /lib/libc$_a; then
5622 echo "Your C library seems to be in $libc. You're normal."
5624 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
5626 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
5627 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
5628 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
5630 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5632 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5635 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
5637 if $test -r "$tans"; then
5638 echo "Your C library seems to be in $tans, of all places."
5644 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5648 If the guess above is wrong (which it might be if you're using a strange
5649 compiler, or your machine supports multiple models), you can override it here.
5654 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
5656 I can't seem to find your C library. I've looked in the following places:
5659 $sed 's/^/ /' libpath
5662 None of these seems to contain your C library. I need to get its name...
5667 rp='Where is your C library?'
5672 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
5673 set X `cat libnames`
5676 case $# in 1) xxx=file; esac
5677 echo "Extracting names from the following $xxx for later perusal:" >&4
5679 $sed 's/^/ /' libnames >&4
5681 $echo $n "This may take a while...$c" >&4
5685 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
5686 *) $nm $nm_opt $file 2>/dev/null;;
5691 $grep fprintf libc.tmp > libc.ptf
5692 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
5693 xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
5695 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
5697 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5699 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
5701 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5703 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
5705 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5707 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
5709 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5711 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
5713 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5715 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
5717 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5719 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
5720 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
5722 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5724 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
5726 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5728 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
5730 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5732 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
5734 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5736 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
5738 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5740 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
5742 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5744 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
5746 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5748 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
5750 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5753 $nm -p $* 2>/dev/null >libc.tmp
5754 $grep fprintf libc.tmp > libc.ptf
5755 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
5756 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
5762 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
5764 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
5765 for thisname in $libnames $libc; do
5766 $ar t $thisname >>libc.tmp
5768 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
5770 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
5771 # Repeat libc to extract forwarders to DLL entries too
5772 for thisname in $libnames $libc; do
5773 $ar tv $thisname >>libc.tmp
5774 # Revision 50 of EMX has bug in $ar.
5775 # it will not extract forwarders to DLL entries
5776 # Use emximp which will extract exactly them.
5777 emximp -o tmp.imp $thisname \
5779 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
5780 < tmp.imp >>libc.tmp
5783 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
5786 echo "$ar didn't seem to work right." >&4
5787 echo "Maybe this is a Cray...trying bld instead..." >&4
5788 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
5790 for thisname in $libnames; do
5792 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
5793 $ar t $thisname >>libc.tmp
5797 echo "That didn't work either. Giving up." >&4
5804 if $test -f /lib/syscalls.exp; then
5806 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
5807 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list
5811 $rm -f libnames libpath
5813 : is a C symbol defined?
5816 -v) tf=libc.tmp; tc=""; tdc="";;
5817 -a) tf=libc.tmp; tc="[0]"; tdc="[]";;
5818 *) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
5821 case "$reuseval-$4" in
5823 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
5829 if $contains $tlook $tf >/dev/null 2>&1;
5834 echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
5835 if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1;
5843 $define) tval=true;;
5849 : define an is-in-libc? function
5850 inlibc='echo " "; td=$define; tu=$undef;
5851 sym=$1; var=$2; eval "was=\$$2";
5853 case "$reuseval$was" in
5863 echo "$sym() found." >&4;
5864 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
5866 echo "$sym() NOT found." >&4;
5867 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
5871 $define) echo "$sym() found." >&4;;
5872 *) echo "$sym() NOT found." >&4;;
5876 : see if sqrtl exists
5880 : check for length of double
5882 case "$doublesize" in
5884 echo "Checking to see how big your double precision numbers are..." >&4
5885 $cat >try.c <<'EOCP'
5889 printf("%d\n", (int)sizeof(double));
5894 if eval $compile_ok; then
5895 doublesize=`$run ./try`
5896 echo "Your double is $doublesize bytes long."
5899 echo "(I can't seem to compile the test program. Guessing...)"
5900 rp="What is the size of a double precision number (in bytes)?"
5908 : check for long doubles
5910 echo "Checking to see if you have long double..." >&4
5911 echo 'int main() { long double x = 7.0; }' > try.c
5913 if eval $compile; then
5915 echo "You have long double."
5918 echo "You do not have long double."
5924 : check for length of long double
5925 case "${d_longdbl}${longdblsize}" in
5928 echo "Checking to see how big your long doubles are..." >&4
5929 $cat >try.c <<'EOCP'
5933 printf("%d\n", sizeof(long double));
5938 if eval $compile; then
5939 longdblsize=`$run ./try`
5940 echo "Your long doubles are $longdblsize bytes long."
5944 echo "(I can't seem to compile the test program. Guessing...)" >&4
5945 rp="What is the size of a long double (in bytes)?"
5949 if $test "X$doublesize" = "X$longdblsize"; then
5950 echo "(That isn't any different from an ordinary double.)"
5958 if $test X"$d_longdbl" = X"$define"; then
5960 echo "Checking how to print long doubles..." >&4
5962 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
5963 $cat >try.c <<'EOCP'
5964 #include <sys/types.h>
5968 printf("%.3f\n", d);
5972 if eval $compile; then
5976 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
5977 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
5978 echo "We will use %f."
5984 if $test X"$sPRIfldbl" = X; then
5985 $cat >try.c <<'EOCP'
5986 #include <sys/types.h>
5989 long double d = 123.456;
5990 printf("%.3Lf\n", d);
5994 if eval $compile; then
5998 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
5999 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
6000 echo "We will use %Lf."
6006 if $test X"$sPRIfldbl" = X; then
6007 $cat >try.c <<'EOCP'
6008 #include <sys/types.h>
6011 long double d = 123.456;
6012 printf("%.3llf\n", d);
6016 if eval $compile; then
6020 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
6021 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
6022 echo "We will use %llf."
6028 if $test X"$sPRIfldbl" = X; then
6029 $cat >try.c <<'EOCP'
6030 #include <sys/types.h>
6033 long double d = 123.456;
6034 printf("%.3lf\n", d);
6038 if eval $compile; then
6042 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
6043 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
6044 echo "We will use %lf."
6050 if $test X"$sPRIfldbl" = X; then
6051 echo "Cannot figure out how to print long doubles." >&4
6053 sSCNfldbl=$sPRIfldbl # expect consistency
6060 case "$sPRIfldbl" in
6061 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
6062 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
6063 d_SCNfldbl="$undef";
6065 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
6066 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
6067 d_SCNfldbl="$define";
6071 : see if modfl exists
6075 d_modfl_pow32_bug="$undef"
6077 case "$d_longdbl$d_modfl" in
6080 Checking to see whether your modfl() is okay for large values...
6086 long double nv = 4294967303.15;
6092 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
6096 case "$osname:$gccversion" in
6097 aix:) saveccflags="$ccflags"
6098 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
6101 if eval $compile; then
6104 *" 4294967303.150000 1.150000 4294967302.000000")
6105 echo >&4 "Your modfl() is broken for large values."
6106 d_modfl_pow32_bug="$define"
6108 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
6112 *" 4294967303.150000 0.150000 4294967303.000000")
6113 echo >&4 "Your modfl() seems okay for large values."
6115 *) echo >&4 "I don't understand your modfl() at all."
6119 $rm -f try.* try core core.try.*
6121 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
6124 case "$osname:$gccversion" in
6125 aix:) ccflags="$saveccflags" ;; # restore
6131 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
6134 case "$uselongdouble" in
6135 $define|true|[yY]*) dflt='y';;
6140 Perl can be built to take advantage of long doubles which
6141 (if available) may give more accuracy and range for floating point numbers.
6143 If this doesn't make any sense to you, just accept the default '$dflt'.
6145 rp='Try to use long doubles if available?'
6148 y|Y) val="$define" ;;
6154 case "$uselongdouble" in
6155 true|[yY]*) uselongdouble="$define" ;;
6158 case "$uselongdouble" in
6160 : Look for a hint-file generated 'call-back-unit'. If the
6161 : user has specified that long doubles should be used,
6162 : we may need to set or change some other defaults.
6163 if $test -f uselongdouble.cbu; then
6164 echo "Your platform has some specific hints for long doubles, using them..."
6165 . ./uselongdouble.cbu
6168 (Your platform doesn't have any specific hints for long doubles.)
6175 case "$uselongdouble:$d_sqrtl:$d_modfl" in
6176 $define:$define:$define)
6179 $define:$define:$undef)
6180 message="I could not find modfl"
6182 $define:$undef:$define)
6183 message="I could not find sqrtl"
6185 $define:$undef:$undef)
6186 message="I found neither sqrtl nor modfl"
6190 if $test "$message" != X; then
6193 *** You requested the use of long doubles but you do not seem to have
6194 *** the mathematic functions for long doubles.
6196 *** I'm disabling the use of long doubles.
6200 uselongdouble=$undef
6203 case "$useperlio" in
6204 $define|true|[yY]*|'') dflt='y';;
6209 Previous version of $package used the standard IO mechanisms as
6210 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
6211 alternate IO mechanisms via the PerlIO abstraction layer, but the
6212 stdio mechanism is still available if needed. The abstraction layer
6213 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
6214 Using PerlIO with sfio may cause problems with some extension modules.
6216 If this doesn't make any sense to you, just accept the default '$dflt'.
6218 rp='Use the PerlIO abstraction layer?'
6225 echo "Ok, doing things the stdio way."
6234 case "$useperlio" in
6235 $define|true|[yY]*) ;;
6238 You are using the SOCKS proxy protocol library which means that you
6239 should also use the PerlIO layer. You may be headed for trouble.
6248 : determine the architecture name
6250 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
6251 tarch=`arch`"-$osname"
6252 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
6253 if uname -m > tmparch 2>&1 ; then
6254 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
6255 -e 's/$/'"-$osname/" tmparch`
6263 case "$myarchname" in
6266 echo "(Your architecture name used to be $myarchname.)"
6270 case "$targetarch" in
6272 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
6277 *) dflt="$archname";;
6279 rp='What is your architecture name'
6282 case "$usethreads" in
6284 echo "Threads selected." >&4
6286 *-thread*) echo "...and architecture name already has -thread." >&4
6288 *) archname="$archname-thread"
6289 echo "...setting architecture name to $archname." >&4
6294 case "$usemultiplicity" in
6296 echo "Multiplicity selected." >&4
6298 *-multi*) echo "...and architecture name already has -multi." >&4
6300 *) archname="$archname-multi"
6301 echo "...setting architecture name to $archname." >&4
6306 case "$use64bitint$use64bitall" in
6308 case "$archname64" in
6310 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
6313 case "$use64bitint" in
6314 "$define") echo "64 bit integers selected." >&4 ;;
6316 case "$use64bitall" in
6317 "$define") echo "Maximal 64 bitness selected." >&4 ;;
6320 *-$archname64*) echo "...and architecture name already has $archname64." >&4
6322 *) archname="$archname-$archname64"
6323 echo "...setting architecture name to $archname." >&4
6329 case "$uselongdouble" in
6331 echo "Long doubles selected." >&4
6332 case "$longdblsize" in
6334 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
6338 *-ld*) echo "...and architecture name already has -ld." >&4
6340 *) archname="$archname-ld"
6341 echo "...setting architecture name to $archname." >&4
6348 case "$useperlio" in
6350 echo "Perlio selected." >&4
6353 echo "Perlio not selected, using stdio." >&4
6355 *-stdio*) echo "...and architecture name already has -stdio." >&4
6357 *) archname="$archname-stdio"
6358 echo "...setting architecture name to $archname." >&4
6364 : determine root of directory hierarchy where package will be installed.
6367 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
6375 By default, $package will be installed in $dflt/bin, manual pages
6376 under $dflt/man, etc..., i.e. with $dflt as prefix for all
6377 installation directories. Typically this is something like /usr/local.
6378 If you wish to have binaries under /usr/bin but other parts of the
6379 installation under /usr/local, that's ok: you will be prompted
6380 separately for each of the installation directories, the prefix being
6381 only used to set the defaults.
6385 rp='Installation prefix to use?'
6393 *) oldprefix="$prefix";;
6402 *) afsroot=$afsroot ;;
6408 $define|true) afs=true ;;
6409 $undef|false) afs=false ;;
6410 *) if test -d $afsroot; then
6418 echo "AFS may be running... I'll be extra cautious then..." >&4
6420 echo "AFS does not seem to be running..." >&4
6423 : determine installation prefix for where package is to be installed.
6427 Since you are running AFS, I need to distinguish the directory in which
6428 files will reside from the directory in which they are installed (and from
6429 which they are presumably copied to the former directory by occult means).
6432 case "$installprefix" in
6433 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
6434 *) dflt="$installprefix";;
6439 In some special cases, particularly when building $package for distribution,
6440 it is convenient to distinguish between the directory in which files should
6441 be installed from the directory ($prefix) in which they
6442 will eventually reside. For most users, these two directories are the same.
6445 case "$installprefix" in
6447 *) dflt=$installprefix;;
6451 rp='What installation prefix should I use for installing files?'
6453 installprefix="$ans"
6454 installprefixexp="$ansexp"
6456 : set the prefixit variable, to compute a suitable default value
6457 prefixit='case "$3" in
6459 case "$oldprefix" in
6460 "") eval "$1=\"\$$2\"";;
6467 ""|" ") eval "$1=\"\$$2\"";;
6473 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
6475 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
6476 /*-$oldprefix/*|\~*-$oldprefix/*)
6477 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
6478 *) eval "$1=\"\$$2\"";;
6482 : get the patchlevel
6484 echo "Getting the current patchlevel..." >&4
6485 if $test -r $rsrc/patchlevel.h;then
6486 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
6487 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
6488 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6489 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
6490 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
6491 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6492 perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
6501 $echo "(You do not have patchlevel.h. Eek.)"
6503 if $test -r $rsrc/.patch ; then
6504 if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
6505 perl_patchlevel=`cat $rsrc/.patch`
6508 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
6509 version_patchlevel_string="version $patchlevel subversion $subversion"
6510 case "$perl_patchlevel" in
6512 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
6515 $echo "(You have $package $version_patchlevel_string.)"
6519 : XXX Should be a Configure test for double-dots in filenames.
6520 version=`echo $revision $patchlevel $subversion | \
6521 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6522 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6523 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6526 version=`echo $revision $patchlevel $subversion | \
6527 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6528 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6529 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6532 : Special case the 5.005_xx maintenance series, which used 5.005
6533 : without any subversion label as a subdirectory in $sitelib
6534 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
6535 api_versionstring='5.005'
6538 : determine installation style
6539 : For now, try to deduce it from prefix unless it is already set.
6540 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
6541 case "$installstyle" in
6542 '') case "$prefix" in
6543 *perl*) dflt='lib';;
6544 *) dflt='lib/perl5' ;;
6547 *) dflt="$installstyle" ;;
6549 : Probably not worth prompting for this since we prompt for all
6550 : the directories individually, and the prompt would be too long and
6554 : determine where private library files go
6555 : Usual default is /usr/local/lib/perl5/$version.
6556 : Also allow things like /opt/perl/lib/$version, since
6557 : /opt/perl/lib/perl5... would be redundant.
6558 : The default "style" setting is made in installstyle.U
6559 case "$installstyle" in
6560 *lib/perl5*) set dflt privlib lib/$package/$version ;;
6561 *) set dflt privlib lib/$version ;;
6566 There are some auxiliary files for $package that need to be put into a
6567 private library directory that is accessible by everyone.
6571 rp='Pathname where the private library files will reside?'
6574 privlibexp="$ansexp"
6575 : Change installation prefix, if necessary.
6576 if $test X"$prefix" != X"$installprefix"; then
6577 installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
6579 installprivlib="$privlibexp"
6582 : set the prefixup variable, to restore leading tilda escape
6583 prefixup='case "$prefixexp" in
6585 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
6588 : determine where public architecture dependent libraries go
6591 : privlib default is /usr/local/lib/$package/$version
6592 : archlib default is /usr/local/lib/$package/$version/$archname
6593 : privlib may have an optional trailing /share.
6594 tdflt=`echo $privlib | $sed 's,/share$,,'`
6595 tdflt=$tdflt/$archname
6604 $spackage contains architecture-dependent library files. If you are
6605 sharing libraries in a heterogeneous environment, you might store
6606 these files in a separate location. Otherwise, you can just include
6607 them with the rest of the public library files.
6611 rp='Where do you want to put the public architecture-dependent libraries?'
6614 archlibexp="$ansexp"
6615 if $test X"$archlib" = X"$privlib"; then
6620 : Change installation prefix, if necessary.
6621 if $test X"$prefix" != X"$installprefix"; then
6622 installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
6624 installarchlib="$archlibexp"
6628 : Binary compatibility with 5.005 is not possible for builds
6629 : with advanced features
6630 case "$usethreads$usemultiplicity" in
6632 bincompat5005="$undef"
6633 d_bincompat5005="$undef"
6637 This version of Perl can be compiled for binary compatibility with 5.005.
6638 If you decide to do so, you will be able to continue using most of the
6639 extensions that were compiled for Perl 5.005.
6642 case "$bincompat5005$d_bincompat5005" in
6643 *"$undef"*) dflt=n ;;
6646 rp='Binary compatibility with Perl 5.005?'
6649 y*) val="$define" ;;
6654 case "$d_bincompat5005" in
6656 bincompat5005="$define"
6658 *) bincompat5005="$undef"
6659 d_bincompat5005="$undef"
6666 : see if setuid scripts can be secure
6669 Some kernels have a bug that prevents setuid #! scripts from being
6670 secure. Some sites have disabled setuid #! scripts because of this.
6672 First let's decide if your kernel supports secure setuid #! scripts.
6673 (If setuid #! scripts would be secure but have been disabled anyway,
6674 don't say that they are secure if asked.)
6679 if $test -d /dev/fd; then
6680 echo "#!$ls" >reflect
6681 chmod +x,u+s reflect
6682 ./reflect >flect 2>&1
6683 if $contains "/dev/fd" flect >/dev/null; then
6684 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6688 If you are not sure if they are secure, I can check but I'll need a
6689 username and password different from the one you are using right now.
6690 If you don't have such a username or don't want me to test, simply
6694 rp='Other username to test security of setuid scripts with?'
6699 case "$d_suidsafe" in
6700 '') echo "I'll assume setuid scripts are *not* secure." >&4
6703 echo "Well, the $hint value is *not* secure." >&4
6705 *) echo "Well, the $hint value *is* secure." >&4
6710 $rm -f reflect flect
6711 echo "#!$ls" >reflect
6712 chmod +x,u+s reflect
6715 echo '"su" will (probably) prompt you for '"$ans's password."
6716 su $ans -c './reflect >flect'
6717 if $contains "/dev/fd" flect >/dev/null; then
6718 echo "Okay, it looks like setuid scripts are secure." >&4
6721 echo "I don't think setuid scripts are secure." >&4
6726 rp='Does your kernel have *secure* setuid scripts?'
6729 [yY]*) val="$define";;
6734 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6735 echo "(That's for file descriptors, not floppy disks.)"
6741 $rm -f reflect flect
6743 : now see if they want to do setuid emulation
6746 case "$d_suidsafe" in
6749 echo "No need to emulate SUID scripts since they are secure here." >&4
6753 Some systems have disabled setuid scripts, especially systems where
6754 setuid scripts cannot be secure. On systems where setuid scripts have
6755 been disabled, the setuid/setgid bits on scripts are currently
6756 useless. It is possible for $package to detect those bits and emulate
6757 setuid/setgid in a secure fashion. This emulation will only work if
6758 setuid scripts have been disabled in your kernel.
6762 "$define") dflt=y ;;
6765 rp="Do you want to do setuid/setgid emulation?"
6768 [yY]*) val="$define";;
6776 : see if this is a malloc.h system
6777 set malloc.h i_malloc
6780 : see if stdlib is available
6781 set stdlib.h i_stdlib
6784 : determine which malloc to compile in
6786 case "$usemymalloc" in
6787 [yY]*|true|$define) dflt='y' ;;
6788 [nN]*|false|$undef) dflt='n' ;;
6789 *) case "$ptrsize" in
6795 rp="Do you wish to attempt to use the malloc that comes with $package?"
6801 mallocsrc='malloc.c'
6802 mallocobj="malloc$_o"
6803 d_mymalloc="$define"
6806 : Remove malloc from list of libraries to use
6807 echo "Removing unneeded -lmalloc from library list" >&4
6808 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6811 echo "libs = $libs" >&4
6823 : compute the return types of malloc and free
6825 $cat >malloc.c <<END
6829 #include <sys/types.h>
6843 case "$malloctype" in
6845 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6852 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6856 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6863 echo "Your system uses $freetype free(), it would seem." >&4
6867 After $package is installed, you may wish to install various
6868 add-on modules and utilities. Typically, these add-ons will
6869 be installed under $prefix with the rest
6870 of this package. However, you may wish to install such add-ons
6871 elsewhere under a different prefix.
6873 If you do not wish to put everything under a single prefix, that's
6874 ok. You will be prompted for the individual locations; this siteprefix
6875 is only used to suggest the defaults.
6877 The default should be fine for most people.
6881 rp='Installation prefix to use for add-on modules and utilities?'
6882 : XXX Here might be another good place for an installstyle setting.
6883 case "$siteprefix" in
6885 *) dflt=$siteprefix ;;
6888 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6890 case "$siteprefix" in
6894 *) oldsiteprefix="$prefix";;
6899 siteprefixexp="$ansexp"
6901 : determine where site specific libraries go.
6902 : Usual default is /usr/local/lib/perl5/site_perl/$version
6903 : The default "style" setting is made in installstyle.U
6904 : XXX No longer works with Prefixit stuff.
6905 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6907 '') case "$installstyle" in
6908 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6909 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6917 The installation process will create a directory for
6918 site-specific extensions and modules. Most users find it convenient
6919 to place all site-specific files in this directory rather than in the
6920 main distribution directory.
6924 rp='Pathname for the site-specific library files?'
6927 sitelibexp="$ansexp"
6928 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
6929 : Change installation prefix, if necessary.
6930 if $test X"$prefix" != X"$installprefix"; then
6931 installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
6933 installsitelib="$sitelibexp"
6936 : determine where site specific architecture-dependent libraries go.
6937 : sitelib default is /usr/local/lib/perl5/site_perl/$version
6938 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
6939 : sitelib may have an optional trailing /share.
6941 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
6942 dflt="$dflt/$archname"
6947 set sitearch sitearch none
6951 The installation process will also create a directory for
6952 architecture-dependent site-specific extensions and modules.
6956 rp='Pathname for the site-specific architecture-dependent library files?'
6959 sitearchexp="$ansexp"
6960 : Change installation prefix, if necessary.
6961 if $test X"$prefix" != X"$installprefix"; then
6962 installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
6964 installsitearch="$sitearchexp"
6969 The installation process will also create a directory for
6970 vendor-supplied add-ons. Vendors who supply perl with their system
6971 may find it convenient to place all vendor-supplied files in this
6972 directory rather than in the main distribution directory. This will
6973 ease upgrades between binary-compatible maintenance versions of perl.
6975 Of course you may also use these directories in whatever way you see
6976 fit. For example, you might use them to access modules shared over a
6977 company-wide network.
6979 The default answer should be fine for most people.
6980 This causes further questions about vendor add-ons to be skipped
6981 and no vendor-specific directories will be configured for perl.
6984 rp='Do you want to configure vendor-specific add-on directories?'
6985 case "$usevendorprefix" in
6986 define|true|[yY]*) dflt=y ;;
6987 *) : User may have set vendorprefix directly on Configure command line.
6988 case "$vendorprefix" in
6997 rp='Installation prefix to use for vendor-supplied add-ons?'
6998 case "$vendorprefix" in
7000 *) dflt=$vendorprefix ;;
7003 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7005 case "$vendorprefix" in
7009 *) oldvendorprefix="$prefix";;
7013 usevendorprefix="$define"
7015 vendorprefixexp="$ansexp"
7017 *) usevendorprefix="$undef"
7023 case "$vendorprefix" in
7024 '') d_vendorlib="$undef"
7028 *) d_vendorlib="$define"
7029 : determine where vendor-supplied modules go.
7030 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
7031 case "$vendorlib" in
7033 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7034 case "$installstyle" in
7035 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
7036 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
7039 *) dflt="$vendorlib"
7043 rp='Pathname for the vendor-supplied library files?'
7046 vendorlibexp="$ansexp"
7049 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
7050 : Change installation prefix, if necessary.
7051 if $test X"$prefix" != X"$installprefix"; then
7052 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
7054 installvendorlib="$vendorlibexp"
7057 case "$vendorprefix" in
7058 '') d_vendorarch="$undef"
7062 *) d_vendorarch="$define"
7063 : determine where vendor-supplied architecture-dependent libraries go.
7064 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
7065 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
7066 : vendorlib may have an optional trailing /share.
7067 case "$vendorarch" in
7068 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
7069 dflt="$dflt/$archname"
7071 *) dflt="$vendorarch" ;;
7074 rp='Pathname for vendor-supplied architecture-dependent files?'
7077 vendorarchexp="$ansexp"
7080 : Change installation prefix, if necessary.
7081 if $test X"$prefix" != X"$installprefix"; then
7082 installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
7084 installvendorarch="$vendorarchexp"
7087 : Final catch-all directories to search
7090 Lastly, you can have perl look in other directories for extensions and
7091 modules in addition to those already specified.
7092 These directories will be searched after
7096 test X"$vendorlib" != "X" && echo ' ' $vendorlib
7097 test X"$vendorarch" != "X" && echo ' ' $vendorarch
7099 case "$otherlibdirs" in
7100 ''|' ') dflt='none' ;;
7101 *) dflt="$otherlibdirs" ;;
7104 Enter a colon-separated set of extra paths to include in perl's @INC
7105 search path, or enter 'none' for no extra paths.
7109 rp='Colon-separated list of additional directories for perl to search?'
7112 ' '|''|none) otherlibdirs=' ' ;;
7113 *) otherlibdirs="$ans" ;;
7115 case "$otherlibdirs" in
7119 set d_perl_otherlibdirs
7122 : Cruising for prototypes
7124 echo "Checking out function prototypes..." >&4
7125 $cat >prototype.c <<'EOCP'
7126 int main(int argc, char *argv[]) {
7129 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
7130 echo "Your C compiler appears to support function prototypes."
7133 echo "Your C compiler doesn't seem to understand function prototypes."
7140 case "$prototype" in
7142 *) ansi2knr='ansi2knr'
7147 This version of $package can only be compiled by a compiler that
7148 understands function prototypes. Unfortunately, your C compiler
7150 doesn't seem to understand them. Sorry about that.
7152 If GNU cc is available for your system, perhaps you could try that instead.
7154 Eventually, we hope to support building Perl with pre-ANSI compilers.
7155 If you would like to help in that effort, please contact <perlbug@perl.org>.
7157 Aborting Configure now.
7163 : determine where public executables go
7168 rp='Pathname where the public executables will reside?'
7170 if $test "X$ansexp" != "X$binexp"; then
7175 : Change installation prefix, if necessary.
7176 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
7177 if $test X"$prefix" != X"$installprefix"; then
7178 installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
7180 installbin="$binexp"
7189 Perl can be built with extra modules or bundles of modules which
7190 will be fetched from the CPAN and installed alongside Perl.
7192 Notice that you will need access to the CPAN; either via the Internet,
7193 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
7194 be asked later to configure the CPAN.pm module which will in turn do
7195 the installation of the rest of the extra modules or bundles.)
7197 Notice also that if the modules require any external software such as
7198 libraries and headers (the libz library and the zlib.h header for the
7199 Compress::Zlib module, for example) you MUST have any such software
7200 already installed, this configuration process will NOT install such
7203 If this doesn't make any sense to you, just accept the default '$dflt'.
7205 rp='Install any extra modules (y or n)?'
7211 Please list any extra modules or bundles to be installed from CPAN,
7212 with spaces between the names. The names can be in any format the
7213 'install' command of CPAN.pm will understand. (Answer 'none',
7214 without the quotes, to install no extra modules or bundles.)
7224 $rm -f ../extras.lst
7226 *) echo "(Saving the list of extras for later...)"
7227 echo "$extras" > ../extras.lst
7235 : Find perl5.005 or later.
7236 echo "Looking for a previously installed perl5.005 or later... "
7238 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
7239 : Check if this perl is recent and can load a simple module
7240 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7243 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7253 '') echo "None found. That's ok.";;
7254 *) echo "Using $perl5." ;;
7257 : Determine list of previous versions to include in @INC
7258 $cat > getverlist <<EOPL
7261 \$api_versionstring = "$api_versionstring";
7262 \$version = "$version";
7263 \$stem = "$sitelib_stem";
7264 \$archname = "$archname";
7266 $cat >> getverlist <<'EOPL'
7267 # Can't have leading @ because metaconfig interprets it as a command!
7268 ;@inc_version_list=();
7269 # XXX Redo to do opendir/readdir?
7272 ;@candidates = glob("5.*");
7278 # XXX ToDo: These comparisons must be reworked when two-digit
7279 # subversions come along, so that 5.7.10 compares as greater than
7280 # 5.7.3! By that time, hope that 5.6.x is sufficiently
7281 # widespread that we can use the built-in version vectors rather
7282 # than reinventing them here. For 5.6.0, however, we must
7283 # assume this script will likely be run by 5.005_0x. --AD 1/2000.
7284 foreach $d (@candidates) {
7285 if ($d lt $version) {
7286 if ($d ge $api_versionstring) {
7287 unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
7289 elsif ($d ge "5.005") {
7290 unshift(@inc_version_list, grep { -d } $d);
7294 # Skip newer version. I.e. don't look in
7295 # 5.7.0 if we're installing 5.6.1.
7299 if (@inc_version_list) {
7300 print join(' ', @inc_version_list);
7303 # Blank space to preserve value for next Configure run.
7308 case "$inc_version_list" in
7309 '') if test -x "$perl5$exe_ext"; then
7310 dflt=`$perl5 getverlist`
7315 $undef) dflt='none' ;;
7316 *) eval dflt=\"$inc_version_list\" ;;
7319 ''|' ') dflt=none ;;
7322 5.005) case "$bincompat5005" in
7323 $define|true|[yY]*) ;;
7330 In order to ease the process of upgrading, this version of perl
7331 can be configured to use modules built and installed with earlier
7332 versions of perl that were installed under $prefix. Specify here
7333 the list of earlier versions that this version of perl should check.
7334 If Configure detected no earlier versions of perl installed under
7335 $prefix, then the list will be empty. Answer 'none' to tell perl
7336 to not search earlier versions.
7338 The default should almost always be sensible, so if you're not sure,
7339 just accept the default.
7342 rp='List of earlier versions to include in @INC?'
7345 [Nn]one|''|' ') inc_version_list=' ' ;;
7346 *) inc_version_list="$ans" ;;
7348 case "$inc_version_list" in
7350 inc_version_list_init='0';;
7351 *) inc_version_list_init=`echo $inc_version_list |
7352 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
7357 : determine whether to install perl also as /usr/bin/perl
7360 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
7362 Many scripts expect perl to be installed as /usr/bin/perl.
7363 I can install the perl you are about to compile also as /usr/bin/perl
7364 (in addition to $installbin/perl).
7366 case "$installusrbinperl" in
7367 "$undef"|[nN]*) dflt='n';;
7370 rp="Do you want to install perl as /usr/bin/perl?"
7373 [yY]*) val="$define";;
7379 set installusrbinperl
7382 : see if dld is available
7386 : see if dlopen exists
7393 : determine which dynamic loading, if any, to compile in
7395 dldir="ext/DynaLoader"
7408 $define) dflt='y' ;;
7411 $define) dflt='y' ;;
7413 : Does a dl_xxx.xs file exist for this operating system
7414 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7417 rp="Do you wish to use dynamic loading?"
7424 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7425 dflt="$dldir/dl_${osname}.xs"
7426 elif $test "$d_dlopen" = "$define" ; then
7427 dflt="$dldir/dl_dlopen.xs"
7428 elif $test "$i_dld" = "$define" ; then
7429 dflt="$dldir/dl_dld.xs"
7434 *) dflt="$dldir/$dlsrc"
7437 echo "The following dynamic loading files are available:"
7438 : Can not go over to $dldir because getfile has path hard-coded in.
7439 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7440 rp="Source file to use for dynamic loading"
7446 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7450 Some systems may require passing special flags to $cc -c to
7451 compile modules that will be used to create a shared library.
7452 To use no flags, say "none".
7455 case "$cccdlflags" in
7456 '') case "$gccversion" in
7457 '') case "$osname" in
7459 next) dflt='none' ;;
7460 irix*) dflt='-KPIC' ;;
7461 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7462 sunos) dflt='-pic' ;;
7466 *) case "$osname" in
7467 darwin) dflt='none' ;;
7468 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7473 *) dflt="$cccdlflags" ;;
7475 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7478 none) cccdlflags=' ' ;;
7479 *) cccdlflags="$ans" ;;
7484 Some systems use ld to create libraries that can be dynamically loaded,
7485 while other systems (such as those using ELF) use $cc.
7489 '') $cat >try.c <<'EOM'
7490 /* Test for whether ELF binaries are produced */
7495 int i = open("a.out",O_RDONLY);
7498 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7499 exit(0); /* succeed (yes, it's ELF) */
7504 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7506 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7510 echo "I'll use ld to build dynamic libraries."
7519 rp="What command should be used to create dynamic libraries?"
7525 Some systems may require passing special flags to $ld to create a
7526 library that can be dynamically loaded. If your ld flags include
7527 -L/other/path options to locate libraries outside your loader's normal
7528 search path, you may need to specify those -L options here as well. To
7529 use no flags, say "none".
7532 case "$lddlflags" in
7533 '') case "$osname" in
7534 beos) dflt='-nostart' ;;
7536 case "$gccversion" in
7537 '') dflt="$dflt +vnocompatwarnings" ;;
7540 linux|irix*) dflt='-shared' ;;
7541 next) dflt='none' ;;
7542 solaris) dflt='-G' ;;
7543 sunos) dflt='-assert nodefinitions' ;;
7544 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
7548 *) dflt="$lddlflags" ;;
7551 : Try to guess additional flags to pick up local libraries.
7552 : Be careful not to append to a plain 'none'
7556 for thisflag in $ldflags; do
7561 *) dflt="$dflt $thisflag" ;;
7568 ''|' ') dflt='none' ;;
7571 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
7574 none) lddlflags=' ' ;;
7575 *) lddlflags="$ans" ;;
7580 Some systems may require passing special flags to $cc to indicate that
7581 the resulting executable will use dynamic linking. To use no flags,
7585 case "$ccdlflags" in
7586 '') case "$osname" in
7587 hpux) dflt='-Wl,-E' ;;
7588 linux) dflt='-rdynamic' ;;
7589 next) dflt='none' ;;
7590 sunos) dflt='none' ;;
7594 *) dflt="$ccdlflags" ;;
7596 rp="Any special flags to pass to $cc to use dynamic linking?"
7599 none) ccdlflags=' ' ;;
7600 *) ccdlflags="$ans" ;;
7614 # No dynamic loading being used, so don't bother even to prompt.
7617 *) case "$useshrplib" in
7618 '') case "$osname" in
7619 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
7621 also='Building a shared libperl is required for dynamic loading to work on your system.'
7626 also='Building a shared libperl is needed for MAB support.'
7644 The perl executable is normally obtained by linking perlmain.c with
7645 libperl${_a}, any static extensions (usually just DynaLoader), and
7646 any other libraries needed on this system (such as -lm, etc.). Since
7647 your system supports dynamic loading, it is probably possible to build
7648 a shared libperl.$so. If you will have more than one executable linked
7649 to libperl.$so, this will significantly reduce the size of each
7650 executable, but it may have a noticeable affect on performance. The
7651 default is probably sensible for your system.
7655 rp="Build a shared libperl.$so (y/n)"
7659 useshrplib='true' ;;
7660 *) useshrplib='false' ;;
7665 case "$useshrplib" in
7669 # Figure out a good name for libperl.so. Since it gets stored in
7670 # a version-specific architecture-dependent library, the version
7671 # number isn't really that important, except for making cc/ld happy.
7673 # A name such as libperl.so.3.1
7674 majmin="libperl.$so.$patchlevel.$subversion"
7675 # A name such as libperl.so.301
7676 majonly=`echo $patchlevel $subversion |
7677 $awk '{printf "%d%02d", $1, $2}'`
7678 majonly=libperl.$so.$majonly
7679 # I'd prefer to keep the os-specific stuff here to a minimum, and
7680 # rely on figuring it out from the naming of libc.
7681 case "${osname}${osvers}" in
7684 # XXX How handle the --version stuff for MAB?
7686 linux*) # ld won't link with a bare -lperl otherwise.
7689 cygwin*) # ld links against an importlib
7690 dflt=libperl$lib_ext
7692 *) # Try to guess based on whether libc has major.minor.
7694 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
7695 *libc.$so.[0-9]*) dflt=$majonly ;;
7696 *) dflt=libperl.$so ;;
7706 I need to select a good name for the shared libperl. If your system uses
7707 library names with major and minor numbers, then you might want something
7708 like $majmin. Alternatively, if your system uses a single version
7709 number for shared libraries, then you might want to use $majonly.
7710 Or, your system might be quite happy with a simple libperl.$so.
7712 Since the shared libperl will get installed into a version-specific
7713 architecture-dependent directory, the version number of the shared perl
7714 library probably isn't important, so the default should be o.k.
7717 rp='What name do you want to give to the shared libperl?'
7720 echo "Ok, I'll use $libperl"
7723 libperl="libperl${_a}"
7727 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
7731 WARNING: Use of the shrpdir variable for the installation location of
7732 the shared $libperl is not supported. It was never documented and
7733 will not work in this version. Let me (perlbug@perl.org)
7734 know of any problems this may cause.
7740 But your current setting of $shrpdir is
7741 the default anyway, so it's harmless.
7746 Further, your current attempted setting of $shrpdir
7747 conflicts with the value of $archlibexp/CORE
7748 that installperl will use.
7755 # How will the perl executable find the installed shared $libperl?
7756 # Add $xxx to ccdlflags.
7757 # If we can't figure out a command-line option, use $shrpenv to
7758 # set env LD_RUN_PATH. The main perl makefile uses this.
7759 shrpdir=$archlibexp/CORE
7762 if "$useshrplib"; then
7765 # We'll set it in Makefile.SH...
7771 xxx="-Wl,-R$shrpdir"
7773 bsdos|linux|irix*|dec_osf)
7774 xxx="-Wl,-rpath,$shrpdir"
7777 # next doesn't like the default...
7780 # beos doesn't like the default, either.
7783 # hpux doesn't like the default, either.
7784 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
7787 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
7793 # Only add $xxx if it isn't already in ccdlflags.
7794 case " $ccdlflags " in
7796 *) ccdlflags="$ccdlflags $xxx"
7799 Adding $xxx to the flags
7800 passed to $ld so that the perl executable will find the
7801 installed shared $libperl.
7809 # Fix ccdlflags in AIX for building external extensions.
7810 # (For building Perl itself bare -bE:perl.exp is needed,
7811 # Makefile.SH takes care of this.)
7813 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
7815 # Respect a hint or command-line value.
7817 '') shrpenv="$tmp_shrpenv" ;;
7819 case "$ldlibpthname" in
7820 '') ldlibpthname=LD_LIBRARY_PATH ;;
7821 none) ldlibpthname='' ;;
7824 : determine where manual pages are on this system
7828 syspath='/usr/share/man/man1 /usr/man/man1'
7829 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
7830 syspath="$syspath /usr/man/u_man/man1"
7831 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
7832 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
7833 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
7834 sysman=`./loc . /usr/man/man1 $syspath`
7837 if $test -d "$sysman"; then
7838 echo "System manual is in $sysman." >&4
7840 echo "Could not find manual pages in source form." >&4
7843 : determine where manual pages go
7844 set man1dir man1dir none
7848 $spackage has manual pages available in source form.
7852 echo "However, you don't have nroff, so they're probably useless to you."
7854 '') man1dir="none";;
7857 echo "If you don't want the manual sources installed, answer 'none'."
7862 lookpath="$prefixexp/share/man/man1"
7863 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
7864 lookpath="$lookpath $prefixexp/man/p_man/man1"
7865 lookpath="$lookpath $prefixexp/man/u_man/man1"
7866 lookpath="$lookpath $prefixexp/man/man.1"
7868 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
7869 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
7879 rp="Where do the main $spackage manual pages (source) go?"
7881 if $test "X$man1direxp" != "X$ansexp"; then
7885 man1direxp="$ansexp"
7891 : Change installation prefix, if necessary.
7892 if $test X"$prefix" != X"$installprefix"; then
7893 installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
7895 installman1dir="$man1direxp"
7898 : What suffix to use on installed man pages
7905 rp="What suffix should be used for the main $spackage man pages?"
7907 '') case "$man1dir" in
7921 *) dflt="$man1ext";;
7928 : see if we can have long filenames
7930 first=123456789abcdef
7932 if (echo hi >$first) 2>/dev/null; then
7933 if $test -f 123456789abcde; then
7934 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
7937 echo 'You can have filenames longer than 14 characters.'>&4
7942 You can't have filenames longer than 14 chars.
7943 You can't even think about them!
7949 $rm -rf 123456789abcde*
7951 : determine where library module manual pages go
7952 set man3dir man3dir none
7956 $spackage has manual pages for many of the library modules.
7962 However, you don't have nroff, so they're probably useless to you.
7965 '') man3dir="none";;
7969 case "$d_flexfnam" in
7972 However, your system can't handle the long file names like File::Basename.3.
7975 '') man3dir="none";;
7979 echo "If you don't want the manual sources installed, answer 'none'."
7980 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7982 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
7983 if $test -d "$privlib/man/man3"; then
7986 WARNING: Previous versions of perl installed man3 pages into
7987 $privlib/man/man3. This version will suggest a
7988 new default of $dflt.
7992 rp='Do you wish to preserve the old behavior?(y/n)'
7995 y*) dflt="$privlib/man/man3" ;;
8000 *) dflt="$man3dir" ;;
8007 rp="Where do the $package library man pages (source) go?"
8010 man3direxp="$ansexp"
8016 : Change installation prefix, if necessary.
8017 if $test X"$prefix" != X"$installprefix"; then
8018 installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
8020 installman3dir="$man3direxp"
8023 : What suffix to use on installed man pages
8029 rp="What suffix should be used for the $package library man pages?"
8031 '') case "$man3dir" in
8045 *) dflt="$man3ext";;
8052 : see if we have to deal with yellow pages, now NIS.
8053 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8054 if $test -f /usr/etc/nibindd; then
8056 echo "I'm fairly confident you're on a NeXT."
8058 rp='Do you get the hosts file via NetInfo?'
8067 y*) hostcat='nidump hosts .';;
8068 *) case "$hostcat" in
8069 nidump*) hostcat='';;
8079 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8087 rp='Are you getting the hosts file via yellow pages?'
8090 y*) hostcat='ypcat hosts';;
8091 *) hostcat='cat /etc/hosts';;
8097 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8100 '') test -f /etc/group && groupcat='cat /etc/group';;
8103 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8106 : now get the host name
8108 echo "Figuring out host name..." >&4
8109 case "$myhostname" in
8111 echo 'Maybe "hostname" will work...'
8112 if tans=`sh -c hostname 2>&1` ; then
8120 if $test "$cont"; then
8122 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8123 if tans=`cat /etc/systemid 2>&1` ; then
8125 phostname='cat /etc/systemid'
8126 echo "Whadyaknow. Xenix always was a bit strange..."
8129 elif $test -r /etc/systemid; then
8130 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8133 if $test "$cont"; then
8134 echo 'No, maybe "uuname -l" will work...'
8135 if tans=`sh -c 'uuname -l' 2>&1` ; then
8137 phostname='uuname -l'
8139 echo 'Strange. Maybe "uname -n" will work...'
8140 if tans=`sh -c 'uname -n' 2>&1` ; then
8142 phostname='uname -n'
8144 echo 'Oh well, maybe I can mine it out of whoami.h...'
8145 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8146 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8147 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8149 case "$myhostname" in
8150 '') echo "Does this machine have an identity crisis or something?"
8153 echo "Well, you said $myhostname before..."
8154 phostname='echo $myhostname';;
8160 case "$myhostname" in
8161 '') myhostname=noname ;;
8163 : you do not want to know about this
8168 if $test "$myhostname" ; then
8170 rp='Your host name appears to be "'$myhostname'".'" Right?"
8178 : bad guess or no guess
8179 while $test "X$myhostname" = X ; do
8181 rp="Please type the (one word) name of your host:"
8186 : translate upper to lower if necessary
8187 case "$myhostname" in
8189 echo "(Normalizing case in your host name)"
8190 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8194 case "$myhostname" in
8196 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8197 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8198 echo "(Trimming domain name from host name--host name is now $myhostname)"
8200 *) case "$mydomain" in
8203 test "X$hostcat" = "Xypcat hosts" &&
8204 ypmatch "$myhostname" hosts 2>/dev/null |\
8205 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8208 test "X$hostcat" != "X" &&
8209 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8210 /[ ]$myhostname[ . ]/p" > hosts
8213 if $test -f hosts; then
8214 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8215 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8216 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8217 hosts | $sort | $uniq | \
8218 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8219 case `$echo X$dflt` in
8220 X*\ *) echo "(Several hosts in the database matched hostname)"
8223 X.) echo "(You do not have fully-qualified names in the hosts database)"
8227 echo "(I cannot locate a hosts database anywhere)"
8232 tans=`./loc resolv.conf X /etc /usr/etc`
8233 if $test -f "$tans"; then
8234 echo "(Attempting domain name extraction from $tans)"
8235 dflt=.`$sed -n -e 's/ / /g' \
8236 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8237 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8239 .) dflt=.`$sed -n -e 's/ / /g' \
8240 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8241 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8248 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8249 dflt=.`sh -c domainname 2>/dev/null`
8252 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8256 case "$dflt$osname" in
8257 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8258 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8262 .) echo "(Lost all hope -- silly guess then)"
8268 *) dflt="$mydomain";;
8272 rp="What is your domain name?"
8282 : translate upper to lower if necessary
8285 echo "(Normalizing case in your domain name)"
8286 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8290 : a little sanity check here
8291 case "$phostname" in
8294 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8295 $myhostname$mydomain|$myhostname) ;;
8297 case "$phostname" in
8299 echo "(That doesn't agree with your whoami.h file, by the way.)"
8302 echo "(That doesn't agree with your $phostname command, by the way.)"
8312 I need to get your e-mail address in Internet format if possible, i.e.
8313 something like user@host.domain. Please answer accurately since I have
8314 no easy means to double check it. The default value provided below
8315 is most probably close to reality but may not be valid from outside
8316 your organization...
8320 while test "$cont"; do
8322 '') dflt="$cf_by@$myhostname$mydomain";;
8323 *) dflt="$cf_email";;
8325 rp='What is your e-mail address?'
8331 rp='Address does not look like an Internet one. Use it anyway?'
8347 If you or somebody else will be maintaining perl at your site, please
8348 fill in the correct e-mail address here so that they may be contacted
8349 if necessary. Currently, the "perlbug" program included with perl
8350 will send mail to this address in addition to perlbug@perl.org. You may
8351 enter "none" for no administrator.
8354 case "$perladmin" in
8355 '') dflt="$cf_email";;
8356 *) dflt="$perladmin";;
8358 rp='Perl administrator e-mail address'
8362 : determine whether to only install version-specific parts.
8365 Do you want to install only the version-specific parts of the perl
8366 distribution? Usually you do *not* want to do this.
8368 case "$versiononly" in
8369 "$define"|[Yy]*|true) dflt='y' ;;
8372 rp="Do you want to install only the version-specific parts of perl?"
8375 [yY]*) val="$define";;
8381 : figure out how to guarantee perl startup
8382 case "$startperl" in
8384 case "$sharpbang" in
8388 I can use the #! construct to start perl on your system. This will
8389 make startup of perl scripts faster, but may cause problems if you
8390 want to share those scripts and perl is not in a standard place
8391 ($binexp/perl) on all your platforms. The alternative is to force
8392 a shell by starting the script with a single ':' character.
8395 case "$versiononly" in
8396 "$define") dflt="$binexp/perl$version";;
8397 *) dflt="$binexp/perl";;
8399 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8402 none) startperl=": # use perl";;
8403 *) startperl="#!$ans"
8404 if $test 30 -lt `echo "$ans" | wc -c`; then
8407 WARNING: Some systems limit the #! command to 32 characters.
8408 If you experience difficulty running Perl scripts with #!, try
8409 installing Perl in a directory with a shorter pathname.
8415 *) startperl=": # use perl"
8420 echo "I'll use $startperl to start perl scripts."
8422 : figure best path for perl in scripts
8425 case "$versiononly" in
8426 "$define") perlpath="$binexp/perl$version";;
8427 *) perlpath="$binexp/perl";;
8429 case "$startperl" in
8434 I will use the "eval 'exec'" idiom to start Perl on your system.
8435 I can use the full path of your Perl binary for this purpose, but
8436 doing so may cause problems if you want to share those scripts and
8437 Perl is not always in a standard place ($binexp/perl).
8441 rp="What path shall I use in \"eval 'exec'\"?"
8448 case "$startperl" in
8450 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8453 : determine where public executable scripts go
8454 set scriptdir scriptdir
8456 case "$scriptdir" in
8459 : guess some guesses
8460 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8461 $test -d /usr/share/bin && dflt=/usr/share/bin
8462 $test -d /usr/local/script && dflt=/usr/local/script
8463 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8464 $test -d $prefixexp/script && dflt=$prefixexp/script
8468 *) dflt="$scriptdir"
8473 Some installations have a separate directory just for executable scripts so
8474 that they can mount it across multiple architectures but keep the scripts in
8475 one spot. You might, for example, have a subdirectory of /usr/share for this.
8476 Or you might just lump your scripts in with all your other executables.
8480 rp='Where do you keep publicly executable scripts?'
8482 if $test "X$ansexp" != "X$scriptdirexp"; then
8486 scriptdirexp="$ansexp"
8487 : Change installation prefix, if necessary.
8488 if $test X"$prefix" != X"$installprefix"; then
8489 installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
8491 installscript="$scriptdirexp"
8494 : determine where add-on public executables go
8496 '') dflt=$siteprefix/bin ;;
8500 rp='Pathname where the add-on public executables should be installed?'
8503 sitebinexp="$ansexp"
8504 : Change installation prefix, if necessary.
8505 if $test X"$prefix" != X"$installprefix"; then
8506 installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
8508 installsitebin="$sitebinexp"
8511 : define an is-a-typedef? function
8512 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8514 "") inclist="sys/types.h";;
8516 eval "varval=\$$var";
8520 for inc in $inclist; do
8521 echo "#include <$inc>" >>temp.c;
8523 echo "#ifdef $type" >> temp.c;
8524 echo "printf(\"We have $type\");" >> temp.c;
8525 echo "#endif" >> temp.c;
8526 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8527 if $contains $type temp.E >/dev/null 2>&1; then
8533 *) eval "$var=\$varval";;
8536 : define an is-a-typedef? function that prompts if the type is not available.
8537 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8539 "") inclist="sys/types.h";;
8541 eval "varval=\$$var";
8545 for inc in $inclist; do
8546 echo "#include <$inc>" >>temp.c;
8548 echo "#ifdef $type" >> temp.c;
8549 echo "printf(\"We have $type\");" >> temp.c;
8550 echo "#endif" >> temp.c;
8551 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8553 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
8554 if $contains $type temp.E >/dev/null 2>&1; then
8555 echo "$type found." >&4;
8558 echo "$type NOT found." >&4;
8564 *) eval "$var=\$varval";;
8567 : see what type lseek is declared as in the kernel
8568 rp="What is the type used for lseek's offset on this system?"
8569 set off_t lseektype long stdio.h sys/types.h
8573 echo "Checking to see how big your file offsets are..." >&4
8575 #include <sys/types.h>
8579 printf("%d\n", (int)sizeof($lseektype));
8584 if eval $compile_ok; then
8585 lseeksize=`$run ./try`
8586 echo "Your file offsets are $lseeksize bytes long."
8590 echo "(I can't seem to compile the test program. Guessing...)"
8591 rp="What is the size of your file offsets (in bytes)?"
8597 : see what type file positions are declared as in the library
8598 rp="What is the type for file position used by fsetpos()?"
8599 set fpos_t fpostype long stdio.h sys/types.h
8604 *_t) zzz="$fpostype" ;;
8607 echo "Checking the size of $zzz..." >&4
8609 #include <sys/types.h>
8612 printf("%d\n", (int)sizeof($fpostype));
8617 if eval $compile_ok; then
8621 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8624 echo "Your $zzz is $fpossize bytes long."
8630 echo "(I can't compile the test program. Guessing...)" >&4
8631 rp="What is the size of your file positions (in bytes)?"
8638 # Backward compatibility (uselfs is deprecated).
8640 "$define"|true|[yY]*)
8643 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
8645 uselargefiles="$define"
8649 case "$lseeksize:$fpossize" in
8652 You can have files larger than 2 gigabytes.
8655 *) case "$uselargefiles" in
8656 "$undef"|false|[nN]*) dflt='n' ;;
8661 Perl can be built to understand large files (files larger than 2 gigabytes)
8662 on some systems. To do so, Configure can be run with -Duselargefiles.
8664 If this doesn't make any sense to you, just accept the default '$dflt'.
8666 rp='Try to understand large files, if available?'
8669 y|Y) val="$define" ;;
8676 case "$uselargefiles" in
8678 : Look for a hint-file generated 'call-back-unit'. If the
8679 : user has specified that a large files perl is to be built,
8680 : we may need to set or change some other defaults.
8681 if $test -f uselargefiles.cbu; then
8682 echo "Your platform has some specific hints for large file builds, using them..."
8683 . ./uselargefiles.cbu
8685 echo "Rechecking to see how big your file offsets are..." >&4
8687 #include <sys/types.h>
8691 printf("%d\n", (int)sizeof($lseektype));
8696 if eval $compile_ok; then
8697 lseeksize=`$run ./try`
8698 $echo "Your file offsets are now $lseeksize bytes long."
8702 echo "(I can't seem to compile the test program. Guessing...)"
8703 rp="What is the size of your file offsets (in bytes)?"
8708 *_t) zzz="$fpostype" ;;
8711 $echo $n "Rechecking the size of $zzz...$c" >&4
8713 #include <sys/types.h>
8716 printf("%d\n", (int)sizeof($fpostype));
8721 if eval $compile_ok; then
8726 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8729 echo " $fpossize bytes." >&4
8735 echo "(I can't compile the test program. Guessing...)" >&4
8736 rp="What is the size of your file positions (in bytes)?"
8745 case "$vendorprefix" in
8746 '') d_vendorbin="$undef"
8750 *) d_vendorbin="$define"
8751 : determine where vendor-supplied executables go.
8752 case "$vendorbin" in
8753 '') dflt=$vendorprefix/bin ;;
8754 *) dflt="$vendorbin" ;;
8757 rp='Pathname for the vendor-supplied executables directory?'
8760 vendorbinexp="$ansexp"
8763 : Change installation prefix, if necessary.
8764 if $test X"$prefix" != X"$installprefix"; then
8765 installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
8767 installvendorbin="$vendorbinexp"
8770 : see if qgcvt exists
8774 : Check how to convert floats to strings.
8776 if test "X$d_Gconvert" = X; then
8779 echo "Checking for an efficient way to convert floats to strings."
8781 case "$uselongdouble" in
8782 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
8784 case "$d_longdbl" in
8785 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
8787 case "$d_PRIgldbl" in
8788 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
8792 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
8793 char *myname = "gconvert";
8796 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
8797 char *myname = "gcvt";
8800 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
8801 char *myname = "qgcvt";
8802 #define DOUBLETYPE long double
8805 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8807 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
8809 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
8812 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
8814 char *myname = "sprintf";
8818 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8819 #define DOUBLETYPE long double
8821 #define DOUBLETYPE double
8827 #define I_STDLIB $i_stdlib
8833 checkit(expect, got)
8837 if (strcmp(expect, got)) {
8838 printf("%s oddity: Expected %s, got %s\n",
8839 myname, expect, got);
8849 /* This must be 1st test on (which?) platform */
8850 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
8851 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
8852 checkit("0.1", buf);
8854 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
8855 checkit("0.01", buf);
8857 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
8858 checkit("0.001", buf);
8860 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
8861 checkit("0.0001", buf);
8863 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
8864 if (strlen(buf) > 5)
8865 checkit("9e-005", buf); /* for Microsoft ?? */
8867 checkit("9e-05", buf);
8869 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
8872 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
8873 checkit("1.1", buf);
8875 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
8876 checkit("1.01", buf);
8878 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
8879 checkit("1.001", buf);
8881 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
8882 checkit("1.0001", buf);
8884 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
8885 checkit("1.00001", buf);
8887 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
8888 checkit("1.000001", buf);
8890 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
8893 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
8896 /* Some Linux gcvt's give 1.e+5 here. */
8897 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
8898 checkit("100000", buf);
8900 /* Some Linux gcvt's give -1.e+5 here. */
8901 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
8902 checkit("-100000", buf);
8904 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
8905 checkit("123.456", buf);
8907 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
8908 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
8909 /* 34 should be enough to scare even long double
8910 * places into using the e notation. */
8911 if (strlen(buf) > 5)
8912 checkit("1e+034", buf); /* for Microsoft */
8914 checkit("1e+34", buf);
8916 /* For Perl, if you add additional tests here, also add them to
8917 * t/base/num.t for benefit of platforms not using Configure or
8918 * overriding d_Gconvert */
8923 : first add preferred functions to our list
8925 for xxx_convert in $gconvert_preference; do
8926 case $xxx_convert in
8927 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
8928 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
8931 : then add any others
8932 for xxx_convert in gconvert gcvt sprintf; do
8935 *) xxx_list="$xxx_list $xxx_convert" ;;
8939 case "$d_longdbl$uselongdouble" in
8941 : again, add prefered functions to our list first
8943 for xxx_convert in $gconvert_ld_preference; do
8944 case $xxx_convert in
8945 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
8946 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
8949 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
8950 for xxx_convert in qgcvt sprintf $xxx_list; do
8951 case "$xxx_ld_list" in
8952 $xxx_convert*|*" $xxx_convert"*) ;;
8953 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
8956 : if sprintf cannot do long doubles, move it to the end
8957 if test "$d_PRIgldbl" != "$define"; then
8958 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
8960 : if no qgcvt, remove it
8961 if test "$d_qgcvt" != "$define"; then
8962 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
8965 xxx_list="$xxx_ld_list"
8969 for xxx_convert in $xxx_list; do
8970 echo "Trying $xxx_convert..."
8972 set try -DTRY_$xxx_convert
8973 if eval $compile; then
8974 echo "$xxx_convert() found." >&4
8976 echo "I'll use $xxx_convert to convert floats into a string." >&4
8979 echo "...But $xxx_convert didn't work as I expected."
8983 echo "$xxx_convert NOT found." >&4
8987 if test X$xxx_convert = X; then
8988 echo "*** WHOA THERE!!! ***" >&4
8989 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
8993 case "$xxx_convert" in
8994 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
8995 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
8996 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
8997 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
8998 "$define$define$define")
8999 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9000 "$define$define$undef")
9001 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9002 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9009 : see if _fwalk exists
9013 : Initialize h_fcntl
9016 : Initialize h_sysfile
9019 : access call always available on UNIX
9023 : locate the flags for 'access()'
9027 $cat >access.c <<'EOCP'
9028 #include <sys/types.h>
9033 #include <sys/file.h>
9042 : check sys/file.h first, no particular reason here
9043 if $test `./findhdr sys/file.h` && \
9044 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9046 echo "<sys/file.h> defines the *_OK access constants." >&4
9047 elif $test `./findhdr fcntl.h` && \
9048 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9050 echo "<fcntl.h> defines the *_OK access constants." >&4
9051 elif $test `./findhdr unistd.h` && \
9052 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9053 echo "<unistd.h> defines the *_OK access constants." >&4
9055 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9061 : see if accessx exists
9062 set accessx d_accessx
9065 : see if alarm exists
9069 : define a fucntion to check prototypes
9070 $cat > protochk <<EOSH
9073 optimize="$optimize"
9075 prototype="$prototype"
9080 $cat >> protochk <<'EOSH'
9085 while test $# -ge 2; do
9087 $define) echo "#include <$2>" >> try.c ;;
9088 literal) echo "$2" >> try.c ;;
9092 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
9093 cat >> try.c <<'EOCP'
9094 #ifdef CAN_PROTOTYPE
9095 #define _(args) args
9100 echo "$foo" >> try.c
9101 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
9102 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
9110 hasproto='varname=$1; func=$2; shift; shift;
9111 while $test $# -ge 2; do
9113 $define) echo "#include <$2>";;
9117 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
9118 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
9119 echo "$func() prototype found.";
9122 echo "$func() prototype NOT found.";
9127 $rm -f try.c tryout.c'
9129 : see if sys/types.h has to be included
9130 set sys/types.h i_systypes
9133 : see if sys/select.h has to be included
9134 set sys/select.h i_sysselct
9137 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9138 while $test $# -ge 2; do
9140 $define) echo "#include <$2>";;
9144 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9146 if eval $compile; then
9155 : see if we should include time.h, sys/time.h, or both
9157 if test "X$timeincl" = X; then
9158 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9159 $echo $n "I'm now running the test program...$c"
9160 $cat >try.c <<'EOCP'
9161 #include <sys/types.h>
9166 #ifdef SYSTIMEKERNEL
9169 #include <sys/time.h>
9172 #include <sys/select.h>
9181 struct timezone tzp;
9183 if (foo.tm_sec == foo.tm_sec)
9186 if (bar.tv_sec == bar.tv_sec)
9193 for s_timezone in '-DS_TIMEZONE' ''; do
9195 for s_timeval in '-DS_TIMEVAL' ''; do
9196 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9197 for i_time in '' '-DI_TIME'; do
9198 for i_systime in '-DI_SYSTIME' ''; do
9201 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9202 if eval $compile; then
9203 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9207 $echo $n "Succeeded with $flags$c"
9219 *SYSTIMEKERNEL*) i_systimek="$define"
9220 timeincl=`./findhdr sys/time.h`
9221 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9222 *) i_systimek="$undef";;
9225 *I_TIME*) i_time="$define"
9226 timeincl=`./findhdr time.h`" $timeincl"
9227 echo "We'll include <time.h>." >&4;;
9228 *) i_time="$undef";;
9231 *I_SYSTIME*) i_systime="$define"
9232 timeincl=`./findhdr sys/time.h`" $timeincl"
9233 echo "We'll include <sys/time.h>." >&4;;
9234 *) i_systime="$undef";;
9238 : see if struct tm knows about tm_zone
9239 case "$i_systime$i_time" in
9242 echo "Checking to see if your struct tm has tm_zone field..." >&4
9243 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
9251 case "$d_tm_tm_zone" in
9252 "$define") echo "Yes, it does." ;;
9253 *) echo "No, it doesn't." ;;
9255 : see if struct tm knows about tm_gmtoff
9256 case "$i_systime$i_time" in
9259 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
9260 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
9268 case "$d_tm_tm_gmtoff" in
9269 "$define") echo "Yes, it does." ;;
9270 *) echo "No, it doesn't." ;;
9273 : see if asctime_r exists
9274 set asctime_r d_asctime_r
9276 case "$d_asctime_r" in
9278 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h"
9281 hdrs="$hdrs $i_systime sys/time.h"
9284 case "$d_asctime_r_proto:$usethreads" in
9285 ":define") d_asctime_r_proto=define
9286 set d_asctime_r_proto asctime_r $hdrs
9290 case "$d_asctime_r_proto" in
9292 case "$asctime_r_proto" in
9293 ''|0) try='char* asctime_r(const struct tm*, char*);'
9294 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;;
9296 case "$asctime_r_proto" in
9297 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
9298 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;;
9300 case "$asctime_r_proto" in
9301 ''|0) try='int asctime_r(const struct tm*, char*);'
9302 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;;
9304 case "$asctime_r_proto" in
9305 ''|0) try='int asctime_r(const struct tm*, char*, int);'
9306 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;;
9308 case "$asctime_r_proto" in
9309 ''|0) d_asctime_r=undef
9311 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
9312 * ) case "$asctime_r_proto" in
9313 REENTRANT_PROTO*) ;;
9314 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
9316 echo "Prototype: $try" ;;
9319 *) case "$usethreads" in
9320 define) echo "asctime_r has no prototype, not using it." >&4 ;;
9327 *) asctime_r_proto=0
9331 : see if atolf exists
9335 : see if atoll exists
9339 : Look for GNU-cc style attribute checking
9341 echo "Checking whether your compiler can handle __attribute__ ..." >&4
9342 $cat >attrib.c <<'EOCP'
9344 void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
9346 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9347 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9348 echo "Your C compiler doesn't fully support __attribute__."
9351 echo "Your C compiler supports __attribute__."
9355 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9362 : see if bcmp exists
9366 : see if bcopy exists
9370 : see if this is a unistd.h system
9371 set unistd.h i_unistd
9374 : see if getpgrp exists
9375 set getpgrp d_getpgrp
9378 case "$d_getpgrp" in
9381 echo "Checking to see which flavor of getpgrp is in use..."
9384 #include <sys/types.h>
9386 # include <unistd.h>
9390 if (getuid() == 0) {
9391 printf("(I see you are running Configure as super-user...)\n");
9395 if (getpgrp(1) == 0)
9404 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9405 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
9407 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9408 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
9411 echo "I can't seem to compile and run the test program."
9413 xxx="a USG one, i.e. you use getpgrp()."
9415 # SVR4 systems can appear rather BSD-ish.
9418 xxx="a BSD one, i.e. you use getpgrp(pid)."
9422 xxx="probably a USG one, i.e. you use getpgrp()."
9427 echo "Assuming your getpgrp is $xxx" >&4
9436 : see if setpgrp exists
9437 set setpgrp d_setpgrp
9440 case "$d_setpgrp" in
9443 echo "Checking to see which flavor of setpgrp is in use..."
9446 #include <sys/types.h>
9448 # include <unistd.h>
9452 if (getuid() == 0) {
9453 printf("(I see you are running Configure as super-user...)\n");
9457 if (-1 == setpgrp(1, 1))
9460 if (setpgrp() != -1)
9466 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9467 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
9469 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9470 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
9473 echo "(I can't seem to compile and run the test program.)"
9475 xxx="a USG one, i.e. you use setpgrp()."
9477 # SVR4 systems can appear rather BSD-ish.
9480 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
9484 xxx="probably a USG one, i.e. you use setpgrp()."
9489 echo "Assuming your setpgrp is $xxx" >&4
9497 : see if bzero exists
9501 : see if signal is declared as pointer to function returning int or void
9503 xxx=`./findhdr signal.h`
9504 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
9505 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9506 echo "You have int (*signal())() instead of void." >&4
9508 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9509 echo "You have void (*signal())()." >&4
9511 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
9512 echo "You have int (*signal())() instead of void." >&4
9514 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
9515 echo "You have void (*signal())()." >&4
9518 case "$d_voidsig" in
9520 echo "I can't determine whether signal handler returns void or int..." >&4
9522 rp="What type does your signal handler return?"
9529 echo "As you already told me, signal handler returns void." >&4
9532 *) echo "As you already told me, signal handler returns int." >&4
9539 case "$d_voidsig" in
9540 "$define") signal_t="void";;
9545 : check for ability to cast large floats to 32-bit ints.
9547 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
9548 if $test "$intsize" -ge 4; then
9555 #include <sys/types.h>
9557 $signal_t blech(s) int s; { exit(3); }
9564 signal(SIGFPE, blech);
9566 /* Don't let compiler optimize the test away. Store the number
9567 in a writable string for gcc to pass to sscanf under HP/UX.
9569 sprintf(str, "2147483647");
9570 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
9574 /* x86 processors will probably give 0x8000 0000, which is a
9575 sign change. We don't want that. We want to mimic SPARC
9576 behavior here, which is to preserve the sign and give
9579 if (i32 != ($xxx) f)
9585 if eval $compile_ok; then
9589 echo "(I can't seem to compile the test program--assuming it can't)"
9597 echo "Nope, it can't."
9604 : check for ability to cast negative floats to unsigned
9606 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
9609 #include <sys/types.h>
9611 $signal_t blech(s) int s; { exit(7); }
9612 $signal_t blech_in_list(s) int s; { exit(4); }
9613 unsigned long dummy_long(p) unsigned long p; { return p; }
9614 unsigned int dummy_int(p) unsigned int p; { return p; }
9615 unsigned short dummy_short(p) unsigned short p; { return p; }
9619 unsigned long along;
9621 unsigned short ashort;
9625 /* Frustrate gcc-2.7.2's optimizer which failed this test with
9626 a direct f = -123. assignment. gcc-2.8.0 reportedly
9627 optimized the whole file away
9629 /* Store the number in a writable string for gcc to pass to
9632 sprintf(str, "-123");
9633 sscanf(str, "%lf", &f); /* f = -123.; */
9635 signal(SIGFPE, blech);
9636 along = (unsigned long)f;
9637 aint = (unsigned int)f;
9638 ashort = (unsigned short)f;
9639 if (along != (unsigned long)-123)
9641 if (aint != (unsigned int)-123)
9643 if (ashort != (unsigned short)-123)
9645 sprintf(str, "1073741824.");
9646 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
9649 along = (unsigned long)f;
9650 if (along != 0x80000000)
9654 along = (unsigned long)f;
9655 if (along != 0x7fffffff)
9659 along = (unsigned long)f;
9660 if (along != 0x80000001)
9664 signal(SIGFPE, blech_in_list);
9665 sprintf(str, "123.");
9666 sscanf(str, "%lf", &f); /* f = 123.; */
9667 along = dummy_long((unsigned long)f);
9668 aint = dummy_int((unsigned int)f);
9669 ashort = dummy_short((unsigned short)f);
9670 if (along != (unsigned long)123)
9672 if (aint != (unsigned int)123)
9674 if (ashort != (unsigned short)123)
9681 if eval $compile_ok; then
9685 echo "(I can't seem to compile the test program--assuming it can't)"
9688 case "$castflags" in
9693 echo "Nope, it can't."
9700 : see if vprintf exists
9702 if set vprintf val -f d_vprintf; eval $csym; $val; then
9703 echo 'vprintf() found.' >&4
9706 #include <varargs.h>
9708 int main() { xxx("foo"); }
9717 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
9721 if eval $compile && $run ./try; then
9722 echo "Your vsprintf() returns (int)." >&4
9725 echo "Your vsprintf() returns (char*)." >&4
9729 echo 'vprintf() NOT found.' >&4
9740 : see if chown exists
9744 : see if chroot exists
9748 : see if chsize exists
9752 : see if class exists
9756 hasstruct='varname=$1; struct=$2; shift; shift;
9757 while $test $# -ge 2; do
9759 $define) echo "#include <$2>";;
9763 echo "int main () { struct $struct foo; }" >> try.c;
9765 if eval $compile; then
9776 : see whether socket exists
9778 $echo $n "Hmm... $c" >&4
9779 if set socket val -f d_socket; eval $csym; $val; then
9780 echo "Looks like you have Berkeley networking support." >&4
9782 if set setsockopt val -f; eval $csym; $val; then
9785 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
9789 if $contains socklib libc.list >/dev/null 2>&1; then
9790 echo "Looks like you have Berkeley networking support." >&4
9792 : we will have to assume that it supports the 4.2 BSD interface
9795 echo "You don't have Berkeley networking in libc$_a..." >&4
9796 if test "X$d_socket" = "X$define"; then
9797 echo "...but you seem to believe that you have sockets." >&4
9799 for net in net socket
9801 if test -f /usr/lib/lib$net$_a; then
9802 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
9803 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
9804 if $contains socket libc.list >/dev/null 2>&1; then
9809 echo "...but the Wollongong group seems to have hacked it in." >&4
9810 sockethdr="-I/usr/netinclude"
9813 echo "Found Berkeley sockets interface in lib$net." >&4
9814 if $contains setsockopt libc.list >/dev/null 2>&1; then
9817 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
9824 if test "X$d_socket" != "X$define"; then
9825 echo "or anywhere else I see." >&4
9833 : see if socketpair exists
9834 set socketpair d_sockpair
9839 echo "Checking the availability of certain socket constants..." >&4
9840 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
9841 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
9843 #include <sys/types.h>
9844 #include <sys/socket.h>
9850 set try; if eval $compile; then
9853 set d_${enum}; eval $setvar
9857 : see if this is a sys/uio.h system
9858 set sys/uio.h i_sysuio
9863 echo "Checking to see if your system supports struct cmsghdr..." >&4
9864 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
9866 case "$d_cmsghdr_s" in
9867 "$define") echo "Yes, it does." ;;
9868 *) echo "No, it doesn't." ;;
9872 : check for const keyword
9874 echo 'Checking to see if your C compiler knows about "const"...' >&4
9875 $cat >const.c <<'EOCP'
9876 typedef struct spug { int drokk; } spug;
9883 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
9885 echo "Yup, it does."
9888 echo "Nope, it doesn't."
9893 : see if crypt exists
9898 $define) cryptlib='' ;;
9899 *) if set crypt val -f d_crypt; eval $csym; $val; then
9900 echo 'crypt() found.' >&4
9904 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
9905 if $test -z "$cryptlib"; then
9906 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
9910 if $test -z "$cryptlib"; then
9911 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
9915 if $test -z "$cryptlib"; then
9916 cryptlib=`./loc libcrypt$_a "" $libpth`
9920 if $test -z "$cryptlib"; then
9921 echo 'crypt() NOT found.' >&4
9932 : see if this is a crypt.h system
9936 : see if crypt_r exists
9937 set crypt_r d_crypt_r
9939 case "$d_crypt_r" in
9941 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
9944 hdrs="$hdrs $i_systime sys/time.h"
9947 case "$d_crypt_r_proto:$usethreads" in
9948 ":define") d_crypt_r_proto=define
9949 set d_crypt_r_proto crypt_r $hdrs
9953 case "$d_crypt_r_proto" in
9955 case "$crypt_r_proto" in
9956 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
9957 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCS ;;
9959 case "$crypt_r_proto" in
9960 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
9961 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCD ;;
9963 case "$crypt_r_proto" in
9964 ''|0) d_crypt_r=undef
9966 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
9967 * ) case "$crypt_r_proto" in
9968 REENTRANT_PROTO*) ;;
9969 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
9971 echo "Prototype: $try" ;;
9974 *) case "$usethreads" in
9975 define) echo "crypt_r has no prototype, not using it." >&4 ;;
9986 : get csh whereabouts
9988 'csh') val="$undef" ;;
9993 : Respect a hint or command line value for full_csh.
9995 '') full_csh=$csh ;;
9998 : see if ctermid_r exists
9999 set ctermid_r d_ctermid_r
10001 case "$d_ctermid_r" in
10003 hdrs="$i_systypes sys/types.h define stdio.h $i_stdio stdio.h"
10006 hdrs="$hdrs $i_systime sys/time.h"
10009 case "$d_ctermid_r_proto:$usethreads" in
10010 ":define") d_ctermid_r_proto=define
10011 set d_ctermid_r_proto ctermid_r $hdrs
10015 case "$d_ctermid_r_proto" in
10017 case "$ctermid_r_proto" in
10018 ''|0) try='char* ctermid_r(char*);'
10019 ./protochk "extern $try" $hdrs && ctermid_r_proto=B_B ;;
10021 case "$ctermid_r_proto" in
10022 ''|0) d_ctermid_r=undef
10024 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
10025 * ) case "$ctermid_r_proto" in
10026 REENTRANT_PROTO*) ;;
10027 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
10029 echo "Prototype: $try" ;;
10032 *) case "$usethreads" in
10033 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
10040 *) ctermid_r_proto=0
10044 : see if ctime_r exists
10045 set ctime_r d_ctime_r
10047 case "$d_ctime_r" in
10049 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h"
10052 hdrs="$hdrs $i_systime sys/time.h"
10055 case "$d_ctime_r_proto:$usethreads" in
10056 ":define") d_ctime_r_proto=define
10057 set d_ctime_r_proto ctime_r $hdrs
10061 case "$d_ctime_r_proto" in
10063 case "$ctime_r_proto" in
10064 ''|0) try='char* ctime_r(const time_t*, char*);'
10065 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;;
10067 case "$ctime_r_proto" in
10068 ''|0) try='char* ctime_r(const time_t*, char*, int);'
10069 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;;
10071 case "$ctime_r_proto" in
10072 ''|0) try='int ctime_r(const time_t*, char*);'
10073 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;;
10075 case "$ctime_r_proto" in
10076 ''|0) try='int ctime_r(const time_t*, char*, int);'
10077 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;;
10079 case "$ctime_r_proto" in
10080 ''|0) d_ctime_r=undef
10082 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
10083 * ) case "$ctime_r_proto" in
10084 REENTRANT_PROTO*) ;;
10085 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
10087 echo "Prototype: $try" ;;
10090 *) case "$usethreads" in
10091 define) echo "ctime_r has no prototype, not using it." >&4 ;;
10102 : see if cuserid exists
10103 set cuserid d_cuserid
10106 : see if this is a limits.h system
10107 set limits.h i_limits
10110 : see if this is a float.h system
10111 set float.h i_float
10114 : See if number of significant digits in a double precision number is known
10116 $cat >dbl_dig.c <<EOM
10117 #$i_limits I_LIMITS
10120 #include <limits.h>
10126 printf("Contains DBL_DIG");
10129 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
10130 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
10131 echo "DBL_DIG found." >&4
10134 echo "DBL_DIG NOT found." >&4
10141 : see if dbm.h is available
10142 : see if dbmclose exists
10143 set dbmclose d_dbmclose
10146 case "$d_dbmclose" in
10156 *) set rpcsvc/dbm.h i_rpcsvcdbm
10161 *) echo "We won't be including <dbm.h>"
10171 : see if prototype for dbminit is available
10173 set d_dbminitproto dbminit $i_dbm dbm.h
10176 : see if difftime exists
10177 set difftime d_difftime
10180 : see if this is a dirent system
10182 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
10184 echo "<dirent.h> found." >&4
10187 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
10188 echo "<sys/dir.h> found." >&4
10191 xinc=`./findhdr sys/ndir.h`
10193 echo "<dirent.h> NOT found." >&4
10198 : Look for type of directory structure.
10200 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10202 case "$direntrytype" in
10204 case "$i_dirent" in
10205 $define) guess1='struct dirent' ;;
10206 *) guess1='struct direct' ;;
10209 *) guess1="$direntrytype"
10214 'struct dirent') guess2='struct direct' ;;
10215 *) guess2='struct dirent' ;;
10218 if $contains "$guess1" try.c >/dev/null 2>&1; then
10219 direntrytype="$guess1"
10220 echo "Your directory entries are $direntrytype." >&4
10221 elif $contains "$guess2" try.c >/dev/null 2>&1; then
10222 direntrytype="$guess2"
10223 echo "Your directory entries seem to be $direntrytype." >&4
10225 echo "I don't recognize your system's directory entries." >&4
10226 rp="What type is used for directory entries on this system?"
10229 direntrytype="$ans"
10234 : see if the directory entry stores field length
10236 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10237 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
10238 echo "Good, your directory entry keeps length information in d_namlen." >&4
10241 echo "Your directory entry does not know about the d_namlen field." >&4
10248 : see if this is an sysdir system
10249 set sys/dir.h i_sysdir
10252 : see if this is an sysndir system
10253 set sys/ndir.h i_sysndir
10258 $cat >dirfd.c <<EOM
10260 #$i_dirent I_DIRENT /**/
10261 #$i_sysdir I_SYS_DIR /**/
10262 #$i_sysndir I_SYS_NDIR /**/
10263 #$i_systypes I_SYS_TYPES /**/
10264 #if defined(I_SYS_TYPES)
10265 #include <sys/types.h>
10267 #if defined(I_DIRENT)
10268 #include <dirent.h>
10269 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
10270 #include <sys/dir.h>
10274 #include <sys/ndir.h>
10278 #include <ndir.h> /* may be wrong in the future */
10280 #include <sys/dir.h>
10286 DIR *dirp = opendir(".");
10287 if (dirfd(dirp) >= 0)
10294 if eval $compile; then
10298 $define) echo "dirfd() found." >&4 ;;
10299 *) echo "dirfd() NOT found." >&4 ;;
10305 : see if dlerror exists
10308 set dlerror d_dlerror
10312 : see if dlfcn is available
10313 set dlfcn.h i_dlfcn
10320 On a few systems, the dynamically loaded modules that perl generates and uses
10321 will need a different extension than shared libs. The default will probably
10327 *) dflt="$dlext" ;;
10329 rp='What is the extension of dynamically loaded modules'
10338 : Check if dlsym need a leading underscore
10344 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
10345 $cat >dyna.c <<'EOM'
10354 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
10356 #include <sys/types.h>
10361 extern int fred() ;
10370 int mode = RTLD_LAZY ;
10372 handle = dlopen("./dyna.$dlext", mode) ;
10373 if (handle == NULL) {
10378 symbol = dlsym(handle, "fred") ;
10379 if (symbol == NULL) {
10380 /* try putting a leading underscore */
10381 symbol = dlsym(handle, "_fred") ;
10382 if (symbol == NULL) {
10395 : Call the object file tmp-dyna.o in case dlext=o.
10396 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
10397 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
10398 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
10399 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
10402 1) echo "Test program failed using dlopen." >&4
10403 echo "Perhaps you should not use dynamic loading." >&4;;
10404 2) echo "Test program failed using dlsym." >&4
10405 echo "Perhaps you should not use dynamic loading." >&4;;
10406 3) echo "dlsym needs a leading underscore" >&4
10408 4) echo "dlsym doesn't need a leading underscore." >&4;;
10411 echo "I can't compile and run the test program." >&4
10412 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
10417 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
10422 : see if drand48_r exists
10423 set drand48_r d_drand48_r
10425 case "$d_drand48_r" in
10427 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
10430 hdrs="$hdrs $i_systime sys/time.h"
10433 case "$d_drand48_r_proto:$usethreads" in
10434 ":define") d_drand48_r_proto=define
10435 set d_drand48_r_proto drand48_r $hdrs
10439 case "$d_drand48_r_proto" in
10441 case "$drand48_r_proto" in
10442 ''|0) try='int drand48_r(struct drand48_data*, double*);'
10443 ./protochk "extern $try" $hdrs && drand48_r_proto=I_ST ;;
10445 case "$drand48_r_proto" in
10446 ''|0) d_drand48_r=undef
10448 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
10449 * ) case "$drand48_r_proto" in
10450 REENTRANT_PROTO*) ;;
10451 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
10453 echo "Prototype: $try" ;;
10456 *) case "$usethreads" in
10457 define) echo "drand48_r has no prototype, not using it." >&4 ;;
10464 *) drand48_r_proto=0
10468 : see if prototype for drand48 is available
10470 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
10473 : see if dup2 exists
10477 : see if eaccess exists
10478 set eaccess d_eaccess
10481 : see if endgrent exists
10482 set endgrent d_endgrent
10485 : see if this is an grp system
10491 xxx=`./findhdr grp.h`
10492 $cppstdin $cppflags $cppminus < $xxx >$$.h
10494 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
10506 set d_grpasswd; eval $setvar
10510 : see if endgrent_r exists
10511 set endgrent_r d_endgrent_r
10513 case "$d_endgrent_r" in
10515 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
10518 hdrs="$hdrs $i_systime sys/time.h"
10521 case "$d_endgrent_r_proto:$usethreads" in
10522 ":define") d_endgrent_r_proto=define
10523 set d_endgrent_r_proto endgrent_r $hdrs
10527 case "$d_endgrent_r_proto" in
10529 case "$endgrent_r_proto" in
10530 ''|0) try='int endgrent_r(FILE**);'
10531 ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;;
10533 case "$endgrent_r_proto" in
10534 ''|0) try='void endgrent_r(FILE**);'
10535 ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;;
10537 case "$endgrent_r_proto" in
10538 ''|0) d_endgrent_r=undef
10540 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
10541 * ) case "$endgrent_r_proto" in
10542 REENTRANT_PROTO*) ;;
10543 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
10545 echo "Prototype: $try" ;;
10548 *) case "$usethreads" in
10549 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
10556 *) endgrent_r_proto=0
10560 : see if endhostent exists
10561 set endhostent d_endhent
10564 : see if this is a netdb.h system
10565 set netdb.h i_netdb
10568 : see if endhostent_r exists
10569 set endhostent_r d_endhostent_r
10571 case "$d_endhostent_r" in
10573 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10576 hdrs="$hdrs $i_systime sys/time.h"
10579 case "$d_endhostent_r_proto:$usethreads" in
10580 ":define") d_endhostent_r_proto=define
10581 set d_endhostent_r_proto endhostent_r $hdrs
10585 case "$d_endhostent_r_proto" in
10587 case "$endhostent_r_proto" in
10588 ''|0) try='int endhostent_r(struct hostent_data*);'
10589 ./protochk "extern $try" $hdrs && endhostent_r_proto=I_S ;;
10591 case "$endhostent_r_proto" in
10592 ''|0) try='void endhostent_r(struct hostent_data*);'
10593 ./protochk "extern $try" $hdrs && endhostent_r_proto=V_S ;;
10595 case "$endhostent_r_proto" in
10596 ''|0) d_endhostent_r=undef
10597 endhostent_r_proto=0
10598 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
10599 * ) case "$endhostent_r_proto" in
10600 REENTRANT_PROTO*) ;;
10601 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
10603 echo "Prototype: $try" ;;
10606 *) case "$usethreads" in
10607 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
10609 d_endhostent_r=undef
10610 endhostent_r_proto=0
10614 *) endhostent_r_proto=0
10618 : see if endnetent exists
10619 set endnetent d_endnent
10622 : see if endnetent_r exists
10623 set endnetent_r d_endnetent_r
10625 case "$d_endnetent_r" in
10627 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10630 hdrs="$hdrs $i_systime sys/time.h"
10633 case "$d_endnetent_r_proto:$usethreads" in
10634 ":define") d_endnetent_r_proto=define
10635 set d_endnetent_r_proto endnetent_r $hdrs
10639 case "$d_endnetent_r_proto" in
10641 case "$endnetent_r_proto" in
10642 ''|0) try='int endnetent_r(struct netent_data*);'
10643 ./protochk "extern $try" $hdrs && endnetent_r_proto=I_S ;;
10645 case "$endnetent_r_proto" in
10646 ''|0) try='void endnetent_r(struct netent_data*);'
10647 ./protochk "extern $try" $hdrs && endnetent_r_proto=V_S ;;
10649 case "$endnetent_r_proto" in
10650 ''|0) d_endnetent_r=undef
10651 endnetent_r_proto=0
10652 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
10653 * ) case "$endnetent_r_proto" in
10654 REENTRANT_PROTO*) ;;
10655 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
10657 echo "Prototype: $try" ;;
10660 *) case "$usethreads" in
10661 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
10663 d_endnetent_r=undef
10664 endnetent_r_proto=0
10668 *) endnetent_r_proto=0
10672 : see if endprotoent exists
10673 set endprotoent d_endpent
10676 : see if endprotoent_r exists
10677 set endprotoent_r d_endprotoent_r
10679 case "$d_endprotoent_r" in
10681 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10684 hdrs="$hdrs $i_systime sys/time.h"
10687 case "$d_endprotoent_r_proto:$usethreads" in
10688 ":define") d_endprotoent_r_proto=define
10689 set d_endprotoent_r_proto endprotoent_r $hdrs
10693 case "$d_endprotoent_r_proto" in
10695 case "$endprotoent_r_proto" in
10696 ''|0) try='int endprotoent_r(struct protoent_data*);'
10697 ./protochk "extern $try" $hdrs && endprotoent_r_proto=I_S ;;
10699 case "$endprotoent_r_proto" in
10700 ''|0) try='void endprotoent_r(struct protoent_data*);'
10701 ./protochk "extern $try" $hdrs && endprotoent_r_proto=V_S ;;
10703 case "$endprotoent_r_proto" in
10704 ''|0) d_endprotoent_r=undef
10705 endprotoent_r_proto=0
10706 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
10707 * ) case "$endprotoent_r_proto" in
10708 REENTRANT_PROTO*) ;;
10709 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
10711 echo "Prototype: $try" ;;
10714 *) case "$usethreads" in
10715 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
10717 d_endprotoent_r=undef
10718 endprotoent_r_proto=0
10722 *) endprotoent_r_proto=0
10726 : see if endpwent exists
10727 set endpwent d_endpwent
10730 : see if this is a pwd.h system
10736 xxx=`./findhdr pwd.h`
10737 $cppstdin $cppflags $cppminus < $xxx >$$.h
10739 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
10747 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
10755 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
10763 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
10771 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
10779 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
10787 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
10795 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
10807 set d_pwquota; eval $setvar
10808 set d_pwage; eval $setvar
10809 set d_pwchange; eval $setvar
10810 set d_pwclass; eval $setvar
10811 set d_pwexpire; eval $setvar
10812 set d_pwcomment; eval $setvar
10813 set d_pwgecos; eval $setvar
10814 set d_pwpasswd; eval $setvar
10818 : see if endpwent_r exists
10819 set endpwent_r d_endpwent_r
10821 case "$d_endpwent_r" in
10823 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
10826 hdrs="$hdrs $i_systime sys/time.h"
10829 case "$d_endpwent_r_proto:$usethreads" in
10830 ":define") d_endpwent_r_proto=define
10831 set d_endpwent_r_proto endpwent_r $hdrs
10835 case "$d_endpwent_r_proto" in
10837 case "$endpwent_r_proto" in
10838 ''|0) try='int endpwent_r(FILE**);'
10839 ./protochk "extern $try" $hdrs && endpwent_r_proto=I_H ;;
10841 case "$endpwent_r_proto" in
10842 ''|0) try='void endpwent_r(FILE**);'
10843 ./protochk "extern $try" $hdrs && endpwent_r_proto=V_H ;;
10845 case "$endpwent_r_proto" in
10846 ''|0) d_endpwent_r=undef
10848 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
10849 * ) case "$endpwent_r_proto" in
10850 REENTRANT_PROTO*) ;;
10851 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
10853 echo "Prototype: $try" ;;
10856 *) case "$usethreads" in
10857 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
10864 *) endpwent_r_proto=0
10868 : see if endservent exists
10869 set endservent d_endsent
10872 : see if endservent_r exists
10873 set endservent_r d_endservent_r
10875 case "$d_endservent_r" in
10877 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10880 hdrs="$hdrs $i_systime sys/time.h"
10883 case "$d_endservent_r_proto:$usethreads" in
10884 ":define") d_endservent_r_proto=define
10885 set d_endservent_r_proto endservent_r $hdrs
10889 case "$d_endservent_r_proto" in
10891 case "$endservent_r_proto" in
10892 ''|0) try='int endservent_r(struct servent_data*);'
10893 ./protochk "extern $try" $hdrs && endservent_r_proto=I_S ;;
10895 case "$endservent_r_proto" in
10896 ''|0) try='void endservent_r(struct servent_data*);'
10897 ./protochk "extern $try" $hdrs && endservent_r_proto=V_S ;;
10899 case "$endservent_r_proto" in
10900 ''|0) d_endservent_r=undef
10901 endservent_r_proto=0
10902 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
10903 * ) case "$endservent_r_proto" in
10904 REENTRANT_PROTO*) ;;
10905 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
10907 echo "Prototype: $try" ;;
10910 *) case "$usethreads" in
10911 define) echo "endservent_r has no prototype, not using it." >&4 ;;
10913 d_endservent_r=undef
10914 endservent_r_proto=0
10918 *) endservent_r_proto=0
10922 : Locate the flags for 'open()'
10924 $cat >try.c <<'EOCP'
10925 #include <sys/types.h>
10930 #include <sys/file.h>
10941 : check sys/file.h first to get FREAD on Sun
10942 if $test `./findhdr sys/file.h` && \
10943 set try -DI_SYS_FILE && eval $compile; then
10945 echo "<sys/file.h> defines the O_* constants..." >&4
10946 if $run ./try; then
10947 echo "and you have the 3 argument form of open()." >&4
10950 echo "but not the 3 argument form of open(). Oh, well." >&4
10953 elif $test `./findhdr fcntl.h` && \
10954 set try -DI_FCNTL && eval $compile; then
10956 echo "<fcntl.h> defines the O_* constants..." >&4
10957 if $run ./try; then
10958 echo "and you have the 3 argument form of open()." >&4
10961 echo "but not the 3 argument form of open(). Oh, well." >&4
10966 echo "I can't find the O_* constant definitions! You got problems." >&4
10972 : see which of string.h or strings.h is needed
10974 strings=`./findhdr string.h`
10975 if $test "$strings" && $test -r "$strings"; then
10976 echo "Using <string.h> instead of <strings.h>." >&4
10980 strings=`./findhdr strings.h`
10981 if $test "$strings" && $test -r "$strings"; then
10982 echo "Using <strings.h> instead of <string.h>." >&4
10984 echo "No string header found -- You'll surely have problems." >&4
10989 case "$i_string" in
10990 "$undef") strings=`./findhdr strings.h`;;
10991 *) strings=`./findhdr string.h`;;
10994 : see if this is a sys/file.h system
10999 : do we need to include sys/file.h ?
11003 if $h_sysfile; then
11005 echo "We'll be including <sys/file.h>." >&4
11008 echo "We won't be including <sys/file.h>." >&4
11018 : see if fcntl.h is there
11023 : see if we can include fcntl.h
11029 echo "We'll be including <fcntl.h>." >&4
11032 if $h_sysfile; then
11033 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
11035 echo "We won't be including <fcntl.h>." >&4
11047 : check for non-blocking I/O stuff
11048 case "$h_sysfile" in
11049 true) echo "#include <sys/file.h>" > head.c;;
11052 true) echo "#include <fcntl.h>" > head.c;;
11053 *) echo "#include <sys/fcntl.h>" > head.c;;
11058 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
11059 case "$o_nonblock" in
11061 $cat head.c > try.c
11062 $cat >>try.c <<EOCP
11064 #include <stdlib.h>
11071 printf("O_NONBLOCK\n");
11075 printf("O_NDELAY\n");
11079 printf("FNDELAY\n");
11086 if eval $compile_ok; then
11087 o_nonblock=`$run ./try`
11088 case "$o_nonblock" in
11089 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
11090 *) echo "Seems like we can use $o_nonblock.";;
11093 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
11096 *) echo "Using $hint value $o_nonblock.";;
11098 $rm -f try try.* .out core
11101 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
11104 $cat head.c > try.c
11105 $cat >>try.c <<EOCP
11107 #include <sys/types.h>
11108 #include <signal.h>
11110 #include <stdlib.h>
11115 #define MY_O_NONBLOCK $o_nonblock
11116 #ifndef errno /* XXX need better Configure test */
11119 #$i_unistd I_UNISTD
11121 #include <unistd.h>
11123 #$i_string I_STRING
11125 #include <string.h>
11127 #include <strings.h>
11129 $signal_t blech(x) int x; { exit(3); }
11131 $cat >> try.c <<'EOCP'
11139 pipe(pd); /* Down: child -> parent */
11140 pipe(pu); /* Up: parent -> child */
11143 close(pd[1]); /* Parent reads from pd[0] */
11144 close(pu[0]); /* Parent writes (blocking) to pu[1] */
11146 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
11151 signal(SIGALRM, blech);
11153 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
11155 sprintf(string, "%d\n", ret);
11156 write(2, string, strlen(string));
11159 if (errno == EAGAIN) {
11160 printf("EAGAIN\n");
11165 if (errno == EWOULDBLOCK)
11166 printf("EWOULDBLOCK\n");
11169 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
11170 sleep(2); /* Give it time to close our pipe */
11172 ret = read(pd[0], buf, 1); /* Should read EOF */
11174 sprintf(string, "%d\n", ret);
11175 write(4, string, strlen(string));
11179 close(pd[0]); /* We write to pd[1] */
11180 close(pu[1]); /* We read from pu[0] */
11181 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
11182 close(pd[1]); /* Pipe pd is now fully closed! */
11183 exit(0); /* Bye bye, thank you for playing! */
11187 if eval $compile_ok; then
11188 echo "$startsh" >mtry
11189 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
11191 ./mtry >/dev/null 2>&1
11193 0) eagain=`$cat try.out`;;
11194 1) echo "Could not perform non-blocking setting!";;
11195 2) echo "I did a successful read() for something that was not there!";;
11196 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
11197 4) echo "Could not find F_SETFL!";;
11198 *) echo "Something terribly wrong happened during testing.";;
11200 rd_nodata=`$cat try.ret`
11201 echo "A read() system call with no data present returns $rd_nodata."
11202 case "$rd_nodata" in
11205 echo "(That's peculiar, fixing that to be -1.)"
11211 echo "Forcing errno EAGAIN on read() with no data available."
11215 echo "Your read() sets errno to $eagain when no data is available."
11218 status=`$cat try.err`
11220 0) echo "And it correctly returns 0 to signal EOF.";;
11221 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
11222 *) echo "However, your read() returns '$status' on EOF??";;
11225 if test "$status" = "$rd_nodata"; then
11226 echo "WARNING: you can't distinguish between EOF and no data!"
11230 echo "I can't compile the test program--assuming errno EAGAIN will do."
11237 echo "Using $hint value $eagain."
11238 echo "Your read() returns $rd_nodata when no data is present."
11239 case "$d_eofnblk" in
11240 "$define") echo "And you can see EOF because read() returns 0.";;
11241 "$undef") echo "But you can't see EOF status from read() returned value.";;
11243 echo "(Assuming you can't see EOF status from read anyway.)"
11249 $rm -f try try.* .out core head.c mtry
11251 : see if fchdir exists
11252 set fchdir d_fchdir
11255 : see if fchmod exists
11256 set fchmod d_fchmod
11259 : see if fchown exists
11260 set fchown d_fchown
11263 : see if this is an fcntl system
11268 : See if fcntl-based locking works.
11270 #include <stdlib.h>
11271 #include <unistd.h>
11273 #include <signal.h>
11274 $signal_t blech(x) int x; { exit(3); }
11276 #if defined(F_SETLK) && defined(F_SETLKW)
11277 struct flock flock;
11279 fd = open("try.c", O_RDONLY);
11280 flock.l_type = F_RDLCK;
11281 flock.l_whence = SEEK_SET;
11282 flock.l_start = flock.l_len = 0;
11283 signal(SIGALRM, blech);
11285 retval = fcntl(fd, F_SETLK, &flock);
11287 (retval < 0 ? exit(2) : exit(0));
11293 echo "Checking if fcntl-based file locking works... "
11297 if eval $compile_ok; then
11298 if $run ./try; then
11299 echo "Yes, it seems to work."
11302 echo "Nope, it didn't work."
11307 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
11308 *** This is (almost) impossible.
11309 *** If your NFS lock daemons are not feeling well, something like
11310 *** this may happen, please investigate. Cannot continue, aborting.
11318 echo "I'm unable to compile the test program, so I'll assume not."
11323 echo "Nope, since you don't even have fcntl()."
11326 set d_fcntl_can_lock
11331 : check for fd_set items
11334 Checking to see how well your C compiler handles fd_set and friends ...
11337 #$i_systime I_SYS_TIME
11338 #$i_sysselct I_SYS_SELECT
11339 #$d_socket HAS_SOCKET
11340 #include <sys/types.h>
11342 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
11345 #include <sys/time.h>
11347 #ifdef I_SYS_SELECT
11348 #include <sys/select.h>
11357 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
11365 if eval $compile; then
11366 d_fds_bits="$define"
11368 echo "Well, your system knows about the normal fd_set typedef..." >&4
11369 if $run ./try; then
11370 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
11371 d_fd_macros="$define"
11374 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
11376 d_fd_macros="$undef"
11380 Hmm, your compiler has some difficulty with fd_set. Checking further...
11383 if eval $compile; then
11384 d_fds_bits="$undef"
11386 echo "Well, your system has some sort of fd_set available..." >&4
11387 if $run ./try; then
11388 echo "and you have the normal fd_set macros." >&4
11389 d_fd_macros="$define"
11392 but not the normal fd_set macros! Gross! More work for me...
11394 d_fd_macros="$undef"
11397 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
11399 d_fds_bits="$undef"
11400 d_fd_macros="$undef"
11405 : see if fgetpos exists
11406 set fgetpos d_fgetpos
11409 : see if finite exists
11410 set finite d_finite
11413 : see if finitel exists
11414 set finitel d_finitel
11417 : see if flock exists
11421 : see if prototype for flock is available
11423 set d_flockproto flock $i_sysfile sys/file.h
11426 : see if fork exists
11430 : see if fp_class exists
11431 set fp_class d_fp_class
11434 : see if pathconf exists
11435 set pathconf d_pathconf
11438 : see if fpathconf exists
11439 set fpathconf d_fpathconf
11442 : see if fpclass exists
11443 set fpclass d_fpclass
11446 : see if fpclassify exists
11447 set fpclassify d_fpclassify
11450 : see if fpclassl exists
11451 set fpclassl d_fpclassl
11455 : check for fpos64_t
11457 echo "Checking to see if you have fpos64_t..." >&4
11460 int main() { fpos64_t x = 7; }
11463 if eval $compile; then
11465 echo "You have fpos64_t."
11468 echo "You do not have fpos64_t."
11469 case "$fpossize" in
11470 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
11477 : see if frexpl exists
11478 set frexpl d_frexpl
11481 : see if this is a sys/param system
11482 set sys/param.h i_sysparam
11485 : see if this is a sys/mount.h system
11486 set sys/mount.h i_sysmount
11491 echo "Checking to see if your system supports struct fs_data..." >&4
11492 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
11494 case "$d_fs_data_s" in
11495 "$define") echo "Yes, it does." ;;
11496 *) echo "No, it doesn't." ;;
11499 : see if fseeko exists
11500 set fseeko d_fseeko
11502 case "$longsize" in
11503 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
11506 : see if fsetpos exists
11507 set fsetpos d_fsetpos
11511 : see if fstatfs exists
11512 set fstatfs d_fstatfs
11516 : see if statvfs exists
11517 set statvfs d_statvfs
11520 : see if fstatvfs exists
11521 set fstatvfs d_fstatvfs
11525 : see if fsync exists
11529 : see if ftello exists
11530 set ftello d_ftello
11532 case "$longsize" in
11533 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
11536 : see if getcwd exists
11537 set getcwd d_getcwd
11540 : see if getespwnam exists
11541 set getespwnam d_getespwnam
11545 : see if getfsstat exists
11546 set getfsstat d_getfsstat
11549 : see if getgrent exists
11550 set getgrent d_getgrent
11553 : see if getgrent_r exists
11554 set getgrent_r d_getgrent_r
11556 case "$d_getgrent_r" in
11558 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11561 hdrs="$hdrs $i_systime sys/time.h"
11564 case "$d_getgrent_r_proto:$usethreads" in
11565 ":define") d_getgrent_r_proto=define
11566 set d_getgrent_r_proto getgrent_r $hdrs
11570 case "$d_getgrent_r_proto" in
11572 case "$getgrent_r_proto" in
11573 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
11574 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBWR ;;
11576 case "$getgrent_r_proto" in
11577 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
11578 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIR ;;
11580 case "$getgrent_r_proto" in
11581 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
11582 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBW ;;
11584 case "$getgrent_r_proto" in
11585 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
11586 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBI ;;
11588 case "$getgrent_r_proto" in
11589 ''|0) try='int getgrent_r(struct group*, char*, int);'
11590 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBI ;;
11592 case "$getgrent_r_proto" in
11593 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
11594 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIH ;;
11596 case "$getgrent_r_proto" in
11597 ''|0) d_getgrent_r=undef
11599 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
11600 * ) case "$getgrent_r_proto" in
11601 REENTRANT_PROTO*) ;;
11602 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
11604 echo "Prototype: $try" ;;
11607 *) case "$usethreads" in
11608 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
11615 *) getgrent_r_proto=0
11619 : see if getgrgid_r exists
11620 set getgrgid_r d_getgrgid_r
11622 case "$d_getgrgid_r" in
11624 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11627 hdrs="$hdrs $i_systime sys/time.h"
11630 case "$d_getgrgid_r_proto:$usethreads" in
11631 ":define") d_getgrgid_r_proto=define
11632 set d_getgrgid_r_proto getgrgid_r $hdrs
11636 case "$d_getgrgid_r_proto" in
11638 case "$getgrgid_r_proto" in
11639 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
11640 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
11642 case "$getgrgid_r_proto" in
11643 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
11644 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
11646 case "$getgrgid_r_proto" in
11647 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
11648 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
11650 case "$getgrgid_r_proto" in
11651 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
11652 ./protochk "extern $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
11654 case "$getgrgid_r_proto" in
11655 ''|0) d_getgrgid_r=undef
11657 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
11658 * ) case "$getgrgid_r_proto" in
11659 REENTRANT_PROTO*) ;;
11660 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
11662 echo "Prototype: $try" ;;
11665 *) case "$usethreads" in
11666 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
11673 *) getgrgid_r_proto=0
11677 : see if getgrnam_r exists
11678 set getgrnam_r d_getgrnam_r
11680 case "$d_getgrnam_r" in
11682 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11685 hdrs="$hdrs $i_systime sys/time.h"
11688 case "$d_getgrnam_r_proto:$usethreads" in
11689 ":define") d_getgrnam_r_proto=define
11690 set d_getgrnam_r_proto getgrnam_r $hdrs
11694 case "$d_getgrnam_r_proto" in
11696 case "$getgrnam_r_proto" in
11697 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
11698 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
11700 case "$getgrnam_r_proto" in
11701 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
11702 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
11704 case "$getgrnam_r_proto" in
11705 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
11706 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CBI ;;
11708 case "$getgrnam_r_proto" in
11709 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
11710 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
11712 case "$getgrnam_r_proto" in
11713 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
11714 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
11716 case "$getgrnam_r_proto" in
11717 ''|0) d_getgrnam_r=undef
11719 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
11720 * ) case "$getgrnam_r_proto" in
11721 REENTRANT_PROTO*) ;;
11722 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
11724 echo "Prototype: $try" ;;
11727 *) case "$usethreads" in
11728 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
11735 *) getgrnam_r_proto=0
11739 : see if gethostbyaddr exists
11740 set gethostbyaddr d_gethbyaddr
11743 : see if gethostbyname exists
11744 set gethostbyname d_gethbyname
11747 : see if gethostent exists
11748 set gethostent d_gethent
11751 : see how we will look up host name
11754 if set gethostname val -f d_gethname; eval $csym; $val; then
11755 echo 'gethostname() found.' >&4
11756 d_gethname="$define"
11759 if set uname val -f d_uname; eval $csym; $val; then
11762 uname() was found, but you're running xenix, and older versions of xenix
11763 have a broken uname(). If you don't really know whether your xenix is old
11764 enough to have a broken system call, use the default answer.
11769 "$define") dflt=n;;
11771 rp='Is your uname() broken?'
11774 n*) d_uname="$define"; call=uname;;
11777 echo 'uname() found.' >&4
11784 case "$d_gethname" in
11785 '') d_gethname="$undef";;
11788 '') d_uname="$undef";;
11790 case "$d_uname$d_gethname" in
11795 Every now and then someone has a $call() that lies about the hostname
11796 but can't be fixed for political or economic reasons. If you wish, I can
11797 pretend $call() isn't there and maybe compute hostname at run-time
11798 thanks to the '$phostname' command.
11801 rp="Shall I ignore $call() from now on?"
11804 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
11807 case "$phostname" in
11808 '') aphostname='';;
11809 *) case "$aphostname" in
11811 *) set X $phostname
11815 file=`./loc $file $file $pth`
11816 aphostname=`echo $file $*`
11821 case "$d_uname$d_gethname" in
11824 case "$phostname" in
11826 echo "There will be no way for $package to get your hostname." >&4;;
11828 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
11832 case "$d_phostname" in
11833 '') d_phostname="$undef";;
11836 : see if gethostbyaddr_r exists
11837 set gethostbyaddr_r d_gethostbyaddr_r
11839 case "$d_gethostbyaddr_r" in
11841 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11844 hdrs="$hdrs $i_systime sys/time.h"
11847 case "$d_gethostbyaddr_r_proto:$usethreads" in
11848 ":define") d_gethostbyaddr_r_proto=define
11849 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
11853 case "$d_gethostbyaddr_r_proto" in
11855 case "$gethostbyaddr_r_proto" in
11856 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
11857 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
11859 case "$gethostbyaddr_r_proto" in
11860 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
11861 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
11863 case "$gethostbyaddr_r_proto" in
11864 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
11865 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
11867 case "$gethostbyaddr_r_proto" in
11868 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
11869 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
11871 case "$gethostbyaddr_r_proto" in
11872 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
11873 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
11875 case "$gethostbyaddr_r_proto" in
11876 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
11877 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
11879 case "$gethostbyaddr_r_proto" in
11880 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
11881 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
11883 case "$gethostbyaddr_r_proto" in
11884 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
11885 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
11887 case "$gethostbyaddr_r_proto" in
11888 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
11889 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
11891 case "$gethostbyaddr_r_proto" in
11892 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
11893 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
11895 case "$gethostbyaddr_r_proto" in
11896 ''|0) d_gethostbyaddr_r=undef
11897 gethostbyaddr_r_proto=0
11898 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
11899 * ) case "$gethostbyaddr_r_proto" in
11900 REENTRANT_PROTO*) ;;
11901 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
11903 echo "Prototype: $try" ;;
11906 *) case "$usethreads" in
11907 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
11909 d_gethostbyaddr_r=undef
11910 gethostbyaddr_r_proto=0
11914 *) gethostbyaddr_r_proto=0
11918 : see if gethostbyname_r exists
11919 set gethostbyname_r d_gethostbyname_r
11921 case "$d_gethostbyname_r" in
11923 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11926 hdrs="$hdrs $i_systime sys/time.h"
11929 case "$d_gethostbyname_r_proto:$usethreads" in
11930 ":define") d_gethostbyname_r_proto=define
11931 set d_gethostbyname_r_proto gethostbyname_r $hdrs
11935 case "$d_gethostbyname_r_proto" in
11937 case "$gethostbyname_r_proto" in
11938 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
11939 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
11941 case "$gethostbyname_r_proto" in
11942 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
11943 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
11945 case "$gethostbyname_r_proto" in
11946 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
11947 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
11949 case "$gethostbyname_r_proto" in
11950 ''|0) d_gethostbyname_r=undef
11951 gethostbyname_r_proto=0
11952 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
11953 * ) case "$gethostbyname_r_proto" in
11954 REENTRANT_PROTO*) ;;
11955 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
11957 echo "Prototype: $try" ;;
11960 *) case "$usethreads" in
11961 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
11963 d_gethostbyname_r=undef
11964 gethostbyname_r_proto=0
11968 *) gethostbyname_r_proto=0
11972 : see if gethostent_r exists
11973 set gethostent_r d_gethostent_r
11975 case "$d_gethostent_r" in
11977 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11980 hdrs="$hdrs $i_systime sys/time.h"
11983 case "$d_gethostent_r_proto:$usethreads" in
11984 ":define") d_gethostent_r_proto=define
11985 set d_gethostent_r_proto gethostent_r $hdrs
11989 case "$d_gethostent_r_proto" in
11991 case "$gethostent_r_proto" in
11992 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
11993 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
11995 case "$gethostent_r_proto" in
11996 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
11997 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBIE ;;
11999 case "$gethostent_r_proto" in
12000 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
12001 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBIE ;;
12003 case "$gethostent_r_proto" in
12004 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
12005 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBI ;;
12007 case "$gethostent_r_proto" in
12008 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
12009 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBI ;;
12011 case "$gethostent_r_proto" in
12012 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
12013 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SD ;;
12015 case "$gethostent_r_proto" in
12016 ''|0) d_gethostent_r=undef
12017 gethostent_r_proto=0
12018 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
12019 * ) case "$gethostent_r_proto" in
12020 REENTRANT_PROTO*) ;;
12021 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
12023 echo "Prototype: $try" ;;
12026 *) case "$usethreads" in
12027 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
12029 d_gethostent_r=undef
12030 gethostent_r_proto=0
12034 *) gethostent_r_proto=0
12038 : see if prototypes for various gethostxxx netdb.h functions are available
12040 set d_gethostprotos gethostent $i_netdb netdb.h
12043 : see if getitimer exists
12044 set getitimer d_getitimer
12047 : see if getlogin exists
12048 set getlogin d_getlogin
12051 : see if getlogin_r exists
12052 set getlogin_r d_getlogin_r
12054 case "$d_getlogin_r" in
12056 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
12059 hdrs="$hdrs $i_systime sys/time.h"
12062 case "$d_getlogin_r_proto:$usethreads" in
12063 ":define") d_getlogin_r_proto=define
12064 set d_getlogin_r_proto getlogin_r $hdrs
12068 case "$d_getlogin_r_proto" in
12070 case "$getlogin_r_proto" in
12071 ''|0) try='int getlogin_r(char*, size_t);'
12072 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BW ;;
12074 case "$getlogin_r_proto" in
12075 ''|0) try='int getlogin_r(char*, int);'
12076 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BI ;;
12078 case "$getlogin_r_proto" in
12079 ''|0) try='char* getlogin_r(char*, size_t);'
12080 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BW ;;
12082 case "$getlogin_r_proto" in
12083 ''|0) try='char* getlogin_r(char*, int);'
12084 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BI ;;
12086 case "$getlogin_r_proto" in
12087 ''|0) d_getlogin_r=undef
12089 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
12090 * ) case "$getlogin_r_proto" in
12091 REENTRANT_PROTO*) ;;
12092 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
12094 echo "Prototype: $try" ;;
12097 *) case "$usethreads" in
12098 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
12105 *) getlogin_r_proto=0
12109 : see if getmnt exists
12110 set getmnt d_getmnt
12113 : see if getmntent exists
12114 set getmntent d_getmntent
12117 : see if getnetbyaddr exists
12118 set getnetbyaddr d_getnbyaddr
12121 : see if getnetbyname exists
12122 set getnetbyname d_getnbyname
12125 : see if getnetent exists
12126 set getnetent d_getnent
12129 : see if getnetbyaddr_r exists
12130 set getnetbyaddr_r d_getnetbyaddr_r
12132 case "$d_getnetbyaddr_r" in
12134 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12137 hdrs="$hdrs $i_systime sys/time.h"
12140 case "$d_getnetbyaddr_r_proto:$usethreads" in
12141 ":define") d_getnetbyaddr_r_proto=define
12142 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
12146 case "$d_getnetbyaddr_r_proto" in
12148 case "$getnetbyaddr_r_proto" in
12149 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
12150 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
12152 case "$getnetbyaddr_r_proto" in
12153 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
12154 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
12156 case "$getnetbyaddr_r_proto" in
12157 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
12158 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
12160 case "$getnetbyaddr_r_proto" in
12161 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
12162 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
12164 case "$getnetbyaddr_r_proto" in
12165 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
12166 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
12168 case "$getnetbyaddr_r_proto" in
12169 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
12170 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
12172 case "$getnetbyaddr_r_proto" in
12173 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
12174 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
12176 case "$getnetbyaddr_r_proto" in
12177 ''|0) d_getnetbyaddr_r=undef
12178 getnetbyaddr_r_proto=0
12179 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
12180 * ) case "$getnetbyaddr_r_proto" in
12181 REENTRANT_PROTO*) ;;
12182 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
12184 echo "Prototype: $try" ;;
12187 *) case "$usethreads" in
12188 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
12190 d_getnetbyaddr_r=undef
12191 getnetbyaddr_r_proto=0
12195 *) getnetbyaddr_r_proto=0
12199 : see if getnetbyname_r exists
12200 set getnetbyname_r d_getnetbyname_r
12202 case "$d_getnetbyname_r" in
12204 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12207 hdrs="$hdrs $i_systime sys/time.h"
12210 case "$d_getnetbyname_r_proto:$usethreads" in
12211 ":define") d_getnetbyname_r_proto=define
12212 set d_getnetbyname_r_proto getnetbyname_r $hdrs
12216 case "$d_getnetbyname_r_proto" in
12218 case "$getnetbyname_r_proto" in
12219 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
12220 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
12222 case "$getnetbyname_r_proto" in
12223 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
12224 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
12226 case "$getnetbyname_r_proto" in
12227 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
12228 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
12230 case "$getnetbyname_r_proto" in
12231 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
12232 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
12234 case "$getnetbyname_r_proto" in
12235 ''|0) d_getnetbyname_r=undef
12236 getnetbyname_r_proto=0
12237 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
12238 * ) case "$getnetbyname_r_proto" in
12239 REENTRANT_PROTO*) ;;
12240 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
12242 echo "Prototype: $try" ;;
12245 *) case "$usethreads" in
12246 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
12248 d_getnetbyname_r=undef
12249 getnetbyname_r_proto=0
12253 *) getnetbyname_r_proto=0
12257 : see if getnetent_r exists
12258 set getnetent_r d_getnetent_r
12260 case "$d_getnetent_r" in
12262 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12265 hdrs="$hdrs $i_systime sys/time.h"
12268 case "$d_getnetent_r_proto:$usethreads" in
12269 ":define") d_getnetent_r_proto=define
12270 set d_getnetent_r_proto getnetent_r $hdrs
12274 case "$d_getnetent_r_proto" in
12276 case "$getnetent_r_proto" in
12277 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
12278 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
12280 case "$getnetent_r_proto" in
12281 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
12282 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBIE ;;
12284 case "$getnetent_r_proto" in
12285 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
12286 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBIE ;;
12288 case "$getnetent_r_proto" in
12289 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
12290 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBI ;;
12292 case "$getnetent_r_proto" in
12293 ''|0) try='int getnetent_r(struct netent*, char*, int);'
12294 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBI ;;
12296 case "$getnetent_r_proto" in
12297 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
12298 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SD ;;
12300 case "$getnetent_r_proto" in
12301 ''|0) d_getnetent_r=undef
12302 getnetent_r_proto=0
12303 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
12304 * ) case "$getnetent_r_proto" in
12305 REENTRANT_PROTO*) ;;
12306 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
12308 echo "Prototype: $try" ;;
12311 *) case "$usethreads" in
12312 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
12314 d_getnetent_r=undef
12315 getnetent_r_proto=0
12319 *) getnetent_r_proto=0
12323 : see if prototypes for various getnetxxx netdb.h functions are available
12325 set d_getnetprotos getnetent $i_netdb netdb.h
12328 : see if getpagesize exists
12329 set getpagesize d_getpagsz
12333 : see if getprotobyname exists
12334 set getprotobyname d_getpbyname
12337 : see if getprotobynumber exists
12338 set getprotobynumber d_getpbynumber
12341 : see if getprotoent exists
12342 set getprotoent d_getpent
12345 : see if getpgid exists
12346 set getpgid d_getpgid
12349 : see if getpgrp2 exists
12350 set getpgrp2 d_getpgrp2
12353 : see if getppid exists
12354 set getppid d_getppid
12357 : see if getpriority exists
12358 set getpriority d_getprior
12361 : see if getprotobyname_r exists
12362 set getprotobyname_r d_getprotobyname_r
12364 case "$d_getprotobyname_r" in
12366 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12369 hdrs="$hdrs $i_systime sys/time.h"
12372 case "$d_getprotobyname_r_proto:$usethreads" in
12373 ":define") d_getprotobyname_r_proto=define
12374 set d_getprotobyname_r_proto getprotobyname_r $hdrs
12378 case "$d_getprotobyname_r_proto" in
12380 case "$getprotobyname_r_proto" in
12381 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
12382 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
12384 case "$getprotobyname_r_proto" in
12385 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
12386 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
12388 case "$getprotobyname_r_proto" in
12389 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
12390 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
12392 case "$getprotobyname_r_proto" in
12393 ''|0) d_getprotobyname_r=undef
12394 getprotobyname_r_proto=0
12395 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
12396 * ) case "$getprotobyname_r_proto" in
12397 REENTRANT_PROTO*) ;;
12398 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
12400 echo "Prototype: $try" ;;
12403 *) case "$usethreads" in
12404 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
12406 d_getprotobyname_r=undef
12407 getprotobyname_r_proto=0
12411 *) getprotobyname_r_proto=0
12415 : see if getprotobynumber_r exists
12416 set getprotobynumber_r d_getprotobynumber_r
12418 case "$d_getprotobynumber_r" in
12420 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12423 hdrs="$hdrs $i_systime sys/time.h"
12426 case "$d_getprotobynumber_r_proto:$usethreads" in
12427 ":define") d_getprotobynumber_r_proto=define
12428 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
12432 case "$d_getprotobynumber_r_proto" in
12434 case "$getprotobynumber_r_proto" in
12435 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
12436 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
12438 case "$getprotobynumber_r_proto" in
12439 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
12440 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
12442 case "$getprotobynumber_r_proto" in
12443 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
12444 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
12446 case "$getprotobynumber_r_proto" in
12447 ''|0) d_getprotobynumber_r=undef
12448 getprotobynumber_r_proto=0
12449 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
12450 * ) case "$getprotobynumber_r_proto" in
12451 REENTRANT_PROTO*) ;;
12452 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
12454 echo "Prototype: $try" ;;
12457 *) case "$usethreads" in
12458 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
12460 d_getprotobynumber_r=undef
12461 getprotobynumber_r_proto=0
12465 *) getprotobynumber_r_proto=0
12469 : see if getprotoent_r exists
12470 set getprotoent_r d_getprotoent_r
12472 case "$d_getprotoent_r" in
12474 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12477 hdrs="$hdrs $i_systime sys/time.h"
12480 case "$d_getprotoent_r_proto:$usethreads" in
12481 ":define") d_getprotoent_r_proto=define
12482 set d_getprotoent_r_proto getprotoent_r $hdrs
12486 case "$d_getprotoent_r_proto" in
12488 case "$getprotoent_r_proto" in
12489 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
12490 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
12492 case "$getprotoent_r_proto" in
12493 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
12494 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBI ;;
12496 case "$getprotoent_r_proto" in
12497 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
12498 ./protochk "extern $try" $hdrs && getprotoent_r_proto=S_SBI ;;
12500 case "$getprotoent_r_proto" in
12501 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
12502 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SD ;;
12504 case "$getprotoent_r_proto" in
12505 ''|0) d_getprotoent_r=undef
12506 getprotoent_r_proto=0
12507 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
12508 * ) case "$getprotoent_r_proto" in
12509 REENTRANT_PROTO*) ;;
12510 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
12512 echo "Prototype: $try" ;;
12515 *) case "$usethreads" in
12516 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
12518 d_getprotoent_r=undef
12519 getprotoent_r_proto=0
12523 *) getprotoent_r_proto=0
12527 : see if prototypes for various getprotoxxx netdb.h functions are available
12529 set d_getprotoprotos getprotoent $i_netdb netdb.h
12532 : see if getprpwnam exists
12533 set getprpwnam d_getprpwnam
12536 : see if getpwent exists
12537 set getpwent d_getpwent
12540 : see if getpwent_r exists
12541 set getpwent_r d_getpwent_r
12543 case "$d_getpwent_r" in
12545 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12548 hdrs="$hdrs $i_systime sys/time.h"
12551 case "$d_getpwent_r_proto:$usethreads" in
12552 ":define") d_getpwent_r_proto=define
12553 set d_getpwent_r_proto getpwent_r $hdrs
12557 case "$d_getpwent_r_proto" in
12559 case "$getpwent_r_proto" in
12560 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
12561 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBWR ;;
12563 case "$getpwent_r_proto" in
12564 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
12565 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIR ;;
12567 case "$getpwent_r_proto" in
12568 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
12569 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBW ;;
12571 case "$getpwent_r_proto" in
12572 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
12573 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBI ;;
12575 case "$getpwent_r_proto" in
12576 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
12577 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBI ;;
12579 case "$getpwent_r_proto" in
12580 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
12581 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIH ;;
12583 case "$getpwent_r_proto" in
12584 ''|0) d_getpwent_r=undef
12586 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
12587 * ) case "$getpwent_r_proto" in
12588 REENTRANT_PROTO*) ;;
12589 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
12591 echo "Prototype: $try" ;;
12594 *) case "$usethreads" in
12595 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
12602 *) getpwent_r_proto=0
12606 : see if getpwnam_r exists
12607 set getpwnam_r d_getpwnam_r
12609 case "$d_getpwnam_r" in
12611 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12614 hdrs="$hdrs $i_systime sys/time.h"
12617 case "$d_getpwnam_r_proto:$usethreads" in
12618 ":define") d_getpwnam_r_proto=define
12619 set d_getpwnam_r_proto getpwnam_r $hdrs
12623 case "$d_getpwnam_r_proto" in
12625 case "$getpwnam_r_proto" in
12626 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
12627 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
12629 case "$getpwnam_r_proto" in
12630 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
12631 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
12633 case "$getpwnam_r_proto" in
12634 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
12635 ./protochk "extern $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
12637 case "$getpwnam_r_proto" in
12638 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
12639 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
12641 case "$getpwnam_r_proto" in
12642 ''|0) d_getpwnam_r=undef
12644 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
12645 * ) case "$getpwnam_r_proto" in
12646 REENTRANT_PROTO*) ;;
12647 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
12649 echo "Prototype: $try" ;;
12652 *) case "$usethreads" in
12653 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
12660 *) getpwnam_r_proto=0
12664 : see if getpwuid_r exists
12665 set getpwuid_r d_getpwuid_r
12667 case "$d_getpwuid_r" in
12669 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12672 hdrs="$hdrs $i_systime sys/time.h"
12675 case "$d_getpwuid_r_proto:$usethreads" in
12676 ":define") d_getpwuid_r_proto=define
12677 set d_getpwuid_r_proto getpwuid_r $hdrs
12681 case "$d_getpwuid_r_proto" in
12683 case "$getpwuid_r_proto" in
12684 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
12685 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
12687 case "$getpwuid_r_proto" in
12688 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
12689 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
12691 case "$getpwuid_r_proto" in
12692 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
12693 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
12695 case "$getpwuid_r_proto" in
12696 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
12697 ./protochk "extern $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
12699 case "$getpwuid_r_proto" in
12700 ''|0) d_getpwuid_r=undef
12702 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
12703 * ) case "$getpwuid_r_proto" in
12704 REENTRANT_PROTO*) ;;
12705 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
12707 echo "Prototype: $try" ;;
12710 *) case "$usethreads" in
12711 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
12718 *) getpwuid_r_proto=0
12723 : see if getservbyname exists
12724 set getservbyname d_getsbyname
12727 : see if getservbyport exists
12728 set getservbyport d_getsbyport
12731 : see if getservent exists
12732 set getservent d_getsent
12735 : see if getservbyname_r exists
12736 set getservbyname_r d_getservbyname_r
12738 case "$d_getservbyname_r" in
12740 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12743 hdrs="$hdrs $i_systime sys/time.h"
12746 case "$d_getservbyname_r_proto:$usethreads" in
12747 ":define") d_getservbyname_r_proto=define
12748 set d_getservbyname_r_proto getservbyname_r $hdrs
12752 case "$d_getservbyname_r_proto" in
12754 case "$getservbyname_r_proto" in
12755 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
12756 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
12758 case "$getservbyname_r_proto" in
12759 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
12760 ./protochk "extern $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
12762 case "$getservbyname_r_proto" in
12763 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
12764 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
12766 case "$getservbyname_r_proto" in
12767 ''|0) d_getservbyname_r=undef
12768 getservbyname_r_proto=0
12769 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
12770 * ) case "$getservbyname_r_proto" in
12771 REENTRANT_PROTO*) ;;
12772 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
12774 echo "Prototype: $try" ;;
12777 *) case "$usethreads" in
12778 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
12780 d_getservbyname_r=undef
12781 getservbyname_r_proto=0
12785 *) getservbyname_r_proto=0
12789 : see if getservbyport_r exists
12790 set getservbyport_r d_getservbyport_r
12792 case "$d_getservbyport_r" in
12794 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12797 hdrs="$hdrs $i_systime sys/time.h"
12800 case "$d_getservbyport_r_proto:$usethreads" in
12801 ":define") d_getservbyport_r_proto=define
12802 set d_getservbyport_r_proto getservbyport_r $hdrs
12806 case "$d_getservbyport_r_proto" in
12808 case "$getservbyport_r_proto" in
12809 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
12810 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
12812 case "$getservbyport_r_proto" in
12813 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
12814 ./protochk "extern $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
12816 case "$getservbyport_r_proto" in
12817 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
12818 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
12820 case "$getservbyport_r_proto" in
12821 ''|0) d_getservbyport_r=undef
12822 getservbyport_r_proto=0
12823 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
12824 * ) case "$getservbyport_r_proto" in
12825 REENTRANT_PROTO*) ;;
12826 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
12828 echo "Prototype: $try" ;;
12831 *) case "$usethreads" in
12832 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
12834 d_getservbyport_r=undef
12835 getservbyport_r_proto=0
12839 *) getservbyport_r_proto=0
12843 : see if getservent_r exists
12844 set getservent_r d_getservent_r
12846 case "$d_getservent_r" in
12848 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12851 hdrs="$hdrs $i_systime sys/time.h"
12854 case "$d_getservent_r_proto:$usethreads" in
12855 ":define") d_getservent_r_proto=define
12856 set d_getservent_r_proto getservent_r $hdrs
12860 case "$d_getservent_r_proto" in
12862 case "$getservent_r_proto" in
12863 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
12864 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBWR ;;
12866 case "$getservent_r_proto" in
12867 ''|0) try='int getservent_r(struct servent*, char*, int);'
12868 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBI ;;
12870 case "$getservent_r_proto" in
12871 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
12872 ./protochk "extern $try" $hdrs && getservent_r_proto=S_SBI ;;
12874 case "$getservent_r_proto" in
12875 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
12876 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SD ;;
12878 case "$getservent_r_proto" in
12879 ''|0) d_getservent_r=undef
12880 getservent_r_proto=0
12881 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
12882 * ) case "$getservent_r_proto" in
12883 REENTRANT_PROTO*) ;;
12884 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
12886 echo "Prototype: $try" ;;
12889 *) case "$usethreads" in
12890 define) echo "getservent_r has no prototype, not using it." >&4 ;;
12892 d_getservent_r=undef
12893 getservent_r_proto=0
12897 *) getservent_r_proto=0
12901 : see if prototypes for various getservxxx netdb.h functions are available
12903 set d_getservprotos getservent $i_netdb netdb.h
12906 : see if getspnam exists
12907 set getspnam d_getspnam
12910 : see if this is a shadow.h system
12911 set shadow.h i_shadow
12914 : see if getspnam_r exists
12915 set getspnam_r d_getspnam_r
12917 case "$d_getspnam_r" in
12919 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
12922 hdrs="$hdrs $i_systime sys/time.h"
12925 case "$d_getspnam_r_proto:$usethreads" in
12926 ":define") d_getspnam_r_proto=define
12927 set d_getspnam_r_proto getspnam_r $hdrs
12931 case "$d_getspnam_r_proto" in
12933 case "$getspnam_r_proto" in
12934 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
12935 ./protochk "extern $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
12937 case "$getspnam_r_proto" in
12938 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
12939 ./protochk "extern $try" $hdrs && getspnam_r_proto=S_CSBI ;;
12941 case "$getspnam_r_proto" in
12942 ''|0) d_getspnam_r=undef
12944 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
12945 * ) case "$getspnam_r_proto" in
12946 REENTRANT_PROTO*) ;;
12947 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
12949 echo "Prototype: $try" ;;
12952 *) case "$usethreads" in
12953 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
12960 *) getspnam_r_proto=0
12964 : see if gettimeofday or ftime exists
12965 set gettimeofday d_gettimeod
12967 case "$d_gettimeod" in
12973 val="$undef"; set d_ftime; eval $setvar
12976 case "$d_gettimeod$d_ftime" in
12979 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
12983 : see if gmtime_r exists
12984 set gmtime_r d_gmtime_r
12986 case "$d_gmtime_r" in
12988 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h"
12991 hdrs="$hdrs $i_systime sys/time.h"
12994 case "$d_gmtime_r_proto:$usethreads" in
12995 ":define") d_gmtime_r_proto=define
12996 set d_gmtime_r_proto gmtime_r $hdrs
13000 case "$d_gmtime_r_proto" in
13002 case "$gmtime_r_proto" in
13003 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
13004 ./protochk "extern $try" $hdrs && gmtime_r_proto=S_TS ;;
13006 case "$gmtime_r_proto" in
13007 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
13008 ./protochk "extern $try" $hdrs && gmtime_r_proto=I_TS ;;
13010 case "$gmtime_r_proto" in
13011 ''|0) d_gmtime_r=undef
13013 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
13014 * ) case "$gmtime_r_proto" in
13015 REENTRANT_PROTO*) ;;
13016 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
13018 echo "Prototype: $try" ;;
13021 *) case "$usethreads" in
13022 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
13029 *) gmtime_r_proto=0
13033 : see if hasmntopt exists
13034 set hasmntopt d_hasmntopt
13037 : see if this is a netinet/in.h or sys/in.h system
13038 set netinet/in.h i_niin sys/in.h i_sysin
13041 : see if arpa/inet.h has to be included
13042 set arpa/inet.h i_arpainet
13045 : see if htonl --and friends-- exists
13050 : Maybe they are macros.
13053 $cat >htonl.c <<EOM
13055 #include <sys/types.h>
13056 #$i_niin I_NETINET_IN
13058 #$i_arpainet I_ARPA_INET
13059 #ifdef I_NETINET_IN
13060 #include <netinet/in.h>
13063 #include <sys/in.h>
13066 #include <arpa/inet.h>
13069 printf("Defined as a macro.");
13072 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
13073 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
13075 echo "But it seems to be defined as a macro." >&4
13085 if set index val -f; eval $csym; $val; then
13086 if set strchr val -f d_strchr; eval $csym; $val; then
13087 if $contains strchr "$strings" >/dev/null 2>&1 ; then
13090 echo "strchr() found." >&4
13094 echo "index() found." >&4
13099 echo "index() found." >&4
13102 if set strchr val -f d_strchr; eval $csym; $val; then
13105 echo "strchr() found." >&4
13107 echo "No index() or strchr() found!" >&4
13112 set d_strchr; eval $setvar
13114 set d_index; eval $setvar
13116 : check whether inet_aton exists
13117 set inet_aton d_inetaton
13122 $cat >isascii.c <<'EOCP'
13134 if eval $compile; then
13135 echo "isascii() found." >&4
13138 echo "isascii() NOT found." >&4
13145 : see if isfinite exists
13146 set isfinite d_isfinite
13149 : see if isinf exists
13153 : see if isnan exists
13157 : see if isnanl exists
13158 set isnanl d_isnanl
13161 : see if killpg exists
13162 set killpg d_killpg
13165 : see if lchown exists
13167 $cat > try.c <<'EOCP'
13168 /* System header to define __stub macros and hopefully few prototypes,
13169 which can conflict with char lchown(); below. */
13170 #include <assert.h>
13171 /* Override any gcc2 internal prototype to avoid an error. */
13172 /* We use char because int might match the return type of a gcc2
13173 builtin and then its argument prototype would still apply. */
13176 /* The GNU C library defines this for functions which it implements
13177 to always fail with ENOSYS. Some functions are actually named
13178 something starting with __ and the normal name is an alias. */
13179 #if defined (__stub_lchown) || defined (__stub___lchown)
13187 if eval $compile; then
13188 $echo "lchown() found." >&4
13191 $echo "lchown() NOT found." >&4
13197 : See if number of significant digits in a double precision number is known
13199 $cat >ldbl_dig.c <<EOM
13200 #$i_limits I_LIMITS
13203 #include <limits.h>
13209 printf("Contains LDBL_DIG");
13212 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
13213 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
13214 echo "LDBL_DIG found." >&4
13217 echo "LDBL_DIG NOT found." >&4
13224 : see if link exists
13228 : see if localtime_r exists
13229 set localtime_r d_localtime_r
13231 case "$d_localtime_r" in
13233 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h"
13236 hdrs="$hdrs $i_systime sys/time.h"
13239 case "$d_localtime_r_proto:$usethreads" in
13240 ":define") d_localtime_r_proto=define
13241 set d_localtime_r_proto localtime_r $hdrs
13245 case "$d_localtime_r_proto" in
13247 case "$localtime_r_proto" in
13248 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
13249 ./protochk "extern $try" $hdrs && localtime_r_proto=S_TS ;;
13251 case "$localtime_r_proto" in
13252 ''|0) try='int localtime_r(const time_t*, struct tm*);'
13253 ./protochk "extern $try" $hdrs && localtime_r_proto=I_TS ;;
13255 case "$localtime_r_proto" in
13256 ''|0) d_localtime_r=undef
13257 localtime_r_proto=0
13258 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
13259 * ) case "$localtime_r_proto" in
13260 REENTRANT_PROTO*) ;;
13261 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
13263 echo "Prototype: $try" ;;
13266 *) case "$usethreads" in
13267 define) echo "localtime_r has no prototype, not using it." >&4 ;;
13269 d_localtime_r=undef
13270 localtime_r_proto=0
13274 *) localtime_r_proto=0
13278 : see if localeconv exists
13279 set localeconv d_locconv
13282 : see if lockf exists
13286 : see if prototype for lseek is available
13288 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
13291 : see if lstat exists
13295 : see if madvise exists
13296 set madvise d_madvise
13299 : see if mblen exists
13303 : see if mbstowcs exists
13304 set mbstowcs d_mbstowcs
13307 : see if mbtowc exists
13308 set mbtowc d_mbtowc
13311 : see if memchr exists
13312 set memchr d_memchr
13315 : see if memcmp exists
13316 set memcmp d_memcmp
13319 : see if memcpy exists
13320 set memcpy d_memcpy
13323 : see if memmove exists
13324 set memmove d_memmove
13327 : see if memset exists
13328 set memset d_memset
13331 : see if mkdir exists
13335 : see if mkdtemp exists
13336 set mkdtemp d_mkdtemp
13339 : see if mkfifo exists
13340 set mkfifo d_mkfifo
13343 : see if mkstemp exists
13344 set mkstemp d_mkstemp
13347 : see if mkstemps exists
13348 set mkstemps d_mkstemps
13351 : see if mktime exists
13352 set mktime d_mktime
13355 : see if this is a sys/mman.h system
13356 set sys/mman.h i_sysmman
13359 : see if mmap exists
13362 : see what shmat returns
13363 : default to something harmless
13365 case "$i_sysmman$d_mmap" in
13367 $cat >mmap.c <<'END'
13368 #include <sys/mman.h>
13371 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
13376 echo "and it returns ($mmaptype)." >&4
13382 : see if mprotect exists
13383 set mprotect d_mprotect
13386 : see if msgctl exists
13387 set msgctl d_msgctl
13390 : see if msgget exists
13391 set msgget d_msgget
13394 : see if msgsnd exists
13395 set msgsnd d_msgsnd
13398 : see if msgrcv exists
13399 set msgrcv d_msgrcv
13402 : see how much of the 'msg*(2)' library is present.
13405 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
13406 *"$undef"*) h_msg=false;;
13410 case "`ipcs 2>&1`" in
13411 "SVID messages"*"not configured"*)
13412 echo "Your $osname does not have the msg*(2) configured." >&4
13415 set msgctl d_msgctl
13417 set msgget d_msgget
13419 set msgsnd d_msgsnd
13421 set msgrcv d_msgrcv
13427 : we could also check for sys/ipc.h ...
13428 if $h_msg && $test `./findhdr sys/msg.h`; then
13429 echo "You have the full msg*(2) library." >&4
13432 echo "You don't have the full msg*(2) library." >&4
13440 echo "Checking to see if your system supports struct msghdr..." >&4
13441 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
13443 case "$d_msghdr_s" in
13444 "$define") echo "Yes, it does." ;;
13445 *) echo "No, it doesn't." ;;
13449 : see if msync exists
13453 : see if munmap exists
13454 set munmap d_munmap
13457 : see if nice exists
13461 : see if this is a langinfo.h system
13462 set langinfo.h i_langinfo
13465 : see if nl_langinfo exists
13466 set nl_langinfo d_nl_langinfo
13469 : check for length of character
13471 case "$charsize" in
13473 echo "Checking to see how big your characters are (hey, you never know)..." >&4
13474 $cat >try.c <<'EOCP'
13478 printf("%d\n", (int)sizeof(char));
13483 if eval $compile_ok; then
13487 echo "(I can't seem to compile the test program. Guessing...)"
13494 rp="What is the size of a character (in bytes)?"
13499 : check for volatile keyword
13501 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
13502 $cat >try.c <<'EOCP'
13505 typedef struct _goo_struct goo_struct;
13506 goo_struct * volatile goo = ((goo_struct *)0);
13507 struct _goo_struct {
13512 typedef unsigned short foo_t;
13513 char *volatile foo;
13515 volatile foo_t blech;
13519 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
13521 echo "Yup, it does."
13524 echo "Nope, it doesn't."
13532 $echo "Choosing the C types to be used for Perl's internal types..." >&4
13534 case "$use64bitint:$d_quad:$quadtype" in
13537 uvtype="$uquadtype"
13542 uvtype="unsigned long"
13548 case "$uselongdouble:$d_longdbl" in
13550 nvtype="long double"
13551 nvsize=$longdblsize
13558 $echo "(IV will be "$ivtype", $ivsize bytes)"
13559 $echo "(UV will be "$uvtype", $uvsize bytes)"
13560 $echo "(NV will be "$nvtype", $nvsize bytes)"
13563 #$i_inttypes I_INTTYPES
13565 #include <inttypes.h>
13570 int8_t i = INT8_MAX;
13571 uint8_t u = UINT8_MAX;
13572 printf("int8_t\n");
13575 int16_t i = INT16_MAX;
13576 uint16_t i = UINT16_MAX;
13577 printf("int16_t\n");
13580 int32_t i = INT32_MAX;
13581 uint32_t u = UINT32_MAX;
13582 printf("int32_t\n");
13588 '') case "$charsize" in
13590 u8type="unsigned char"
13599 if eval $compile; then
13600 case "`$run ./try`" in
13601 int8_t) i8type=int8_t
13611 '') if $test $charsize -ge 1; then
13613 u8type="unsigned char"
13621 '') case "$shortsize" in
13623 u16type="unsigned short"
13631 '') set try -DINT16
13632 if eval $compile; then
13633 case "`$run ./try`" in
13645 '') if $test $shortsize -ge 2; then
13647 u16type="unsigned short"
13655 '') case "$longsize" in
13657 u32type="unsigned long"
13661 *) case "$intsize" in
13663 u32type="unsigned int"
13673 '') set try -DINT32
13674 if eval $compile; then
13675 case "`$run ./try`" in
13687 '') if $test $intsize -ge 4; then
13689 u32type="unsigned int"
13697 '') case "$d_quad:$quadtype" in
13699 i64type="$quadtype"
13700 u64type="$uquadtype"
13708 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
13709 : volatile so that the compiler has to store it out to memory.
13710 if test X"$d_volatile" = X"$define"; then
13715 #include <sys/types.h>
13716 #include <signal.h>
13718 $volatile int bletched = 0;
13719 $signal_t blech(s) int s; { bletched = 1; }
13724 int n = 8 * $uvsize;
13727 signal(SIGFPE, blech);
13730 for (i = 0; i < n; i++) {
13731 u = u << 1 | ($uvtype)1;
13733 if (($uvtype)d != u)
13737 d = ($nvtype)(u - 1);
13738 if (($uvtype)d != (u - 1))
13746 printf("%d\n", ((i == n) ? -n : i));
13752 d_nv_preserves_uv="$undef"
13753 if eval $compile; then
13754 nv_preserves_uv_bits="`$run ./try`"
13756 case "$nv_preserves_uv_bits" in
13758 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
13759 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
13760 d_nv_preserves_uv="$define"
13762 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
13763 d_nv_preserves_uv="$undef" ;;
13764 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
13765 nv_preserves_uv_bits="$undef" ;;
13771 : check for off64_t
13773 echo "Checking to see if you have off64_t..." >&4
13775 #include <sys/types.h>
13776 #include <unistd.h>
13777 int main() { off64_t x = 7; }
13780 if eval $compile; then
13782 echo "You have off64_t."
13785 echo "You do not have off64_t."
13786 case "$lseeksize" in
13787 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
13794 : see if POSIX threads are available
13795 set pthread.h i_pthread
13801 : how to create joinable pthreads
13802 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
13804 echo "Checking what constant to use for creating joinable pthreads..." >&4
13805 $cat >try.c <<'EOCP'
13806 #include <pthread.h>
13808 int detachstate = JOINABLE;
13811 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
13812 if eval $compile; then
13813 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
13814 val="$undef" # Yes, undef.
13815 set d_old_pthread_create_joinable
13818 set old_pthread_create_joinable
13821 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
13822 if eval $compile; then
13823 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
13825 set d_old_pthread_create_joinable
13827 val=PTHREAD_CREATE_UNDETACHED
13828 set old_pthread_create_joinable
13831 set try -DJOINABLE=__UNDETACHED
13832 if eval $compile; then
13833 echo "You seem to use __UNDETACHED." >&4
13835 set d_old_pthread_create_joinable
13838 set old_pthread_create_joinable
13841 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
13843 set d_old_pthread_create_joinable
13846 set old_pthread_create_joinable
13853 d_old_pthread_create_joinable="$undef"
13854 old_pthread_create_joinable=""
13857 : see if pause exists
13861 : see if pipe exists
13865 : see if poll exists
13869 : see if readlink exists
13870 set readlink d_readlink
13876 case "$d_readlink" in
13878 if $issymlink /proc/self/exe ; then
13879 $ls -l /proc/self/exe > reflect
13880 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13881 echo "You have Linux-like /proc/self/exe."
13882 procselfexe='"/proc/self/exe"'
13886 if $issymlink /proc/curproc/file ; then
13887 $ls -l /proc/curproc/file > reflect
13888 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13889 echo "You have BSD-like /proc/curproc/file."
13890 procselfexe='"/proc/curproc/file"'
13900 : see whether the pthread_atfork exists
13902 #include <pthread.h>
13905 #ifdef PTHREAD_ATFORK
13906 pthread_atfork(NULL,NULL,NULL);
13911 : see if pthread_atfork exists
13912 set try -DPTHREAD_ATFORK
13913 if eval $compile; then
13918 case "$usethreads" in
13921 $define) echo 'pthread_atfork found.' >&4 ;;
13922 *) echo 'pthread_atfork NOT found.' >&4 ;;
13925 set d_pthread_atfork
13929 : see whether the various POSIXish _yields exist
13931 #include <pthread.h>
13937 #ifdef PTHREAD_YIELD
13940 #ifdef PTHREAD_YIELD_NULL
13941 pthread_yield(NULL);
13947 : see if sched_yield exists
13948 set try -DSCHED_YIELD
13949 if eval $compile; then
13951 sched_yield='sched_yield()'
13955 case "$usethreads" in
13958 $define) echo 'sched_yield() found.' >&4 ;;
13959 *) echo 'sched_yield() NOT found.' >&4 ;;
13965 : see if pthread_yield exists
13966 set try -DPTHREAD_YIELD
13967 if eval $compile; then
13969 case "$sched_yield" in
13970 '') sched_yield='pthread_yield()' ;;
13973 set try -DPTHREAD_YIELD_NULL
13974 if eval $compile; then
13976 case "$sched_yield" in
13977 '') sched_yield='pthread_yield(NULL)' ;;
13983 case "$usethreads" in
13986 $define) echo 'pthread_yield() found.' >&4 ;;
13987 *) echo 'pthread_yield() NOT found.' >&4 ;;
13991 set d_pthread_yield
13994 case "$sched_yield" in
13995 '') sched_yield=undef ;;
14000 : see if random_r exists
14001 set random_r d_random_r
14003 case "$d_random_r" in
14005 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
14008 hdrs="$hdrs $i_systime sys/time.h"
14011 case "$d_random_r_proto:$usethreads" in
14012 ":define") d_random_r_proto=define
14013 set d_random_r_proto random_r $hdrs
14017 case "$d_random_r_proto" in
14019 case "$random_r_proto" in
14020 ''|0) try='int random_r(int*, struct random_data*);'
14021 ./protochk "extern $try" $hdrs && random_r_proto=I_TS ;;
14023 case "$random_r_proto" in
14024 ''|0) d_random_r=undef
14026 echo "Disabling random_r, cannot determine prototype." >&4 ;;
14027 * ) case "$random_r_proto" in
14028 REENTRANT_PROTO*) ;;
14029 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
14031 echo "Prototype: $try" ;;
14034 *) case "$usethreads" in
14035 define) echo "random_r has no prototype, not using it." >&4 ;;
14042 *) random_r_proto=0
14046 : see if readdir and friends exist
14047 set readdir d_readdir
14049 set seekdir d_seekdir
14051 set telldir d_telldir
14053 set rewinddir d_rewinddir
14056 : see if readdir64_r exists
14057 set readdir64_r d_readdir64_r
14059 case "$d_readdir64_r" in
14061 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
14064 hdrs="$hdrs $i_systime sys/time.h"
14067 case "$d_readdir64_r_proto:$usethreads" in
14068 ":define") d_readdir64_r_proto=define
14069 set d_readdir64_r_proto readdir64_r $hdrs
14073 case "$d_readdir64_r_proto" in
14075 case "$readdir64_r_proto" in
14076 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
14077 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TSR ;;
14079 case "$readdir64_r_proto" in
14080 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
14081 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TS ;;
14083 case "$readdir64_r_proto" in
14084 ''|0) d_readdir64_r=undef
14085 readdir64_r_proto=0
14086 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
14087 * ) case "$readdir64_r_proto" in
14088 REENTRANT_PROTO*) ;;
14089 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
14091 echo "Prototype: $try" ;;
14094 *) case "$usethreads" in
14095 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
14097 d_readdir64_r=undef
14098 readdir64_r_proto=0
14102 *) readdir64_r_proto=0
14106 : see if readdir_r exists
14107 set readdir_r d_readdir_r
14109 case "$d_readdir_r" in
14111 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
14114 hdrs="$hdrs $i_systime sys/time.h"
14117 case "$d_readdir_r_proto:$usethreads" in
14118 ":define") d_readdir_r_proto=define
14119 set d_readdir_r_proto readdir_r $hdrs
14123 case "$d_readdir_r_proto" in
14125 case "$readdir_r_proto" in
14126 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
14127 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TSR ;;
14129 case "$readdir_r_proto" in
14130 ''|0) try='int readdir_r(DIR*, struct dirent*);'
14131 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TS ;;
14133 case "$readdir_r_proto" in
14134 ''|0) d_readdir_r=undef
14136 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
14137 * ) case "$readdir_r_proto" in
14138 REENTRANT_PROTO*) ;;
14139 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
14141 echo "Prototype: $try" ;;
14144 *) case "$usethreads" in
14145 define) echo "readdir_r has no prototype, not using it." >&4 ;;
14152 *) readdir_r_proto=0
14156 : see if readv exists
14160 : see if recvmsg exists
14161 set recvmsg d_recvmsg
14164 : see if rename exists
14165 set rename d_rename
14168 : see if rmdir exists
14172 : see if memory.h is available.
14177 : See if it conflicts with string.h
14183 $cppstdin $cppflags $cppminus < $strings > mem.h
14184 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
14186 echo "We won't be including <memory.h>."
14196 : can bcopy handle overlapping blocks?
14199 case "$d_memmove" in
14200 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
14201 *) case "$d_bcopy" in
14203 echo "Checking to see if bcopy() can do overlapping copies..." >&4
14205 #$i_memory I_MEMORY
14206 #$i_stdlib I_STDLIB
14207 #$i_string I_STRING
14208 #$i_unistd I_UNISTD
14210 $cat >>try.c <<'EOCP'
14213 # include <memory.h>
14216 # include <stdlib.h>
14219 # include <string.h>
14221 # include <strings.h>
14224 # include <unistd.h> /* Needed for NetBSD */
14228 char buf[128], abc[128];
14234 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14235 try to store the string in read-only memory. */
14236 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
14238 for (align = 7; align >= 0; align--) {
14239 for (len = 36; len; len--) {
14241 bcopy(abc, b, len);
14242 for (off = 1; off <= len; off++) {
14243 bcopy(b, b+off, len);
14244 bcopy(b+off, b, len);
14245 if (bcmp(b, abc, len))
14254 if eval $compile_ok; then
14255 if ./try 2>/dev/null; then
14256 echo "Yes, it can."
14259 echo "It can't, sorry."
14262 echo "(I can't compile the test program, so we'll assume not...)"
14266 $rm -f try.* try core
14272 : can memcpy handle overlapping blocks?
14275 case "$d_memmove" in
14276 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
14277 *) case "$d_memcpy" in
14279 echo "Checking to see if memcpy() can do overlapping copies..." >&4
14281 #$i_memory I_MEMORY
14282 #$i_stdlib I_STDLIB
14283 #$i_string I_STRING
14284 #$i_unistd I_UNISTD
14286 $cat >>try.c <<'EOCP'
14289 # include <memory.h>
14292 # include <stdlib.h>
14295 # include <string.h>
14297 # include <strings.h>
14300 # include <unistd.h> /* Needed for NetBSD */
14304 char buf[128], abc[128];
14310 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14311 try to store the string in read-only memory. */
14312 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
14314 for (align = 7; align >= 0; align--) {
14315 for (len = 36; len; len--) {
14317 memcpy(b, abc, len);
14318 for (off = 1; off <= len; off++) {
14319 memcpy(b+off, b, len);
14320 memcpy(b, b+off, len);
14321 if (memcmp(b, abc, len))
14330 if eval $compile_ok; then
14331 if ./try 2>/dev/null; then
14332 echo "Yes, it can."
14335 echo "It can't, sorry."
14338 echo "(I can't compile the test program, so we'll assume not...)"
14342 $rm -f try.* try core
14348 : can memcmp be trusted to compare relative magnitude?
14350 case "$d_memcmp" in
14353 echo "Checking if your memcmp() can compare relative magnitude..." >&4
14355 #$i_memory I_MEMORY
14356 #$i_stdlib I_STDLIB
14357 #$i_string I_STRING
14358 #$i_unistd I_UNISTD
14360 $cat >>try.c <<'EOCP'
14363 # include <memory.h>
14366 # include <stdlib.h>
14369 # include <string.h>
14371 # include <strings.h>
14374 # include <unistd.h> /* Needed for NetBSD */
14380 if ((a < b) && memcmp(&a, &b, 1) < 0)
14386 if eval $compile_ok; then
14387 if $run ./try 2>/dev/null; then
14388 echo "Yes, it can."
14391 echo "No, it can't (it uses signed chars)."
14394 echo "(I can't compile the test program, so we'll assume not...)"
14398 $rm -f try.* try core
14402 : see if prototype for sbrk is available
14404 set d_sbrkproto sbrk $i_unistd unistd.h
14407 : see if select exists
14408 set select d_select
14411 : see if semctl exists
14412 set semctl d_semctl
14415 : see if semget exists
14416 set semget d_semget
14419 : see if semop exists
14423 : see how much of the 'sem*(2)' library is present.
14426 case "$d_semctl$d_semget$d_semop" in
14427 *"$undef"*) h_sem=false;;
14431 case "`ipcs 2>&1`" in
14432 "SVID messages"*"not configured"*)
14433 echo "Your $osname does not have the sem*(2) configured." >&4
14436 set semctl d_semctl
14438 set semget d_semget
14446 : we could also check for sys/ipc.h ...
14447 if $h_sem && $test `./findhdr sys/sem.h`; then
14448 echo "You have the full sem*(2) library." >&4
14451 echo "You don't have the full sem*(2) library." >&4
14457 : see whether sys/sem.h defines union semun
14459 $cat > try.c <<'END'
14460 #include <sys/types.h>
14461 #include <sys/ipc.h>
14462 #include <sys/sem.h>
14463 int main () { union semun semun; semun.buf = 0; }
14466 if eval $compile; then
14467 echo "You have union semun in <sys/sem.h>." >&4
14470 echo "You do not have union semun in <sys/sem.h>." >&4
14473 $rm -f try try.c try.h
14477 : see how to do semctl IPC_STAT
14480 : see whether semctl IPC_STAT can use union semun
14485 # define S_IRUSR S_IREAD
14486 # define S_IWUSR S_IWRITE
14487 # define S_IXUSR S_IEXEC
14489 # define S_IRUSR 0400
14490 # define S_IWUSR 0200
14491 # define S_IXUSR 0100
14493 # define S_IRGRP (S_IRUSR>>3)
14494 # define S_IWGRP (S_IWUSR>>3)
14495 # define S_IXGRP (S_IXUSR>>3)
14496 # define S_IROTH (S_IRUSR>>6)
14497 # define S_IWOTH (S_IWUSR>>6)
14498 # define S_IXOTH (S_IXUSR>>6)
14501 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
14502 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
14503 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
14508 #include <sys/types.h>
14509 #include <sys/ipc.h>
14510 #include <sys/sem.h>
14511 #include <sys/stat.h>
14518 #$d_union_semun HAS_UNION_SEMUN
14521 #ifndef HAS_UNION_SEMUN
14524 struct semid_ds *buf;
14525 unsigned short *array;
14531 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14532 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14534 struct semid_ds argbuf;
14537 st = semctl(sem, 0, IPC_STAT, arg);
14541 # endif /* IPC_STAT */
14542 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14544 if (semctl(sem, 0, IPC_RMID, arg) != 0)
14545 # endif /* IPC_RMID */
14546 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14548 #endif /* IPC_PRIVATE && ... */
14549 printf("semget failed: errno = %d\n", errno);
14555 if eval $compile; then
14558 semun) val="$define" ;;
14564 case "$d_semctl_semun" in
14566 echo "You can use union semun for semctl IPC_STAT." >&4
14569 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
14574 : see whether semctl IPC_STAT can use struct semid_ds pointer
14575 $cat > try.c <<'END'
14576 #include <sys/types.h>
14577 #include <sys/ipc.h>
14578 #include <sys/sem.h>
14579 #include <sys/stat.h>
14587 struct semid_ds arg;
14590 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14591 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14594 st = semctl(sem, 0, IPC_STAT, &arg);
14596 printf("semid_ds\n");
14598 # endif /* IPC_STAT */
14599 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14601 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
14602 # endif /* IPC_RMID */
14603 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14605 #endif /* IPC_PRIVATE && ... */
14606 printf("semget failed: errno = %d\n", errno);
14613 if eval $compile; then
14616 semid_ds) val="$define" ;;
14620 set d_semctl_semid_ds
14622 case "$d_semctl_semid_ds" in
14624 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
14626 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
14633 # We do not have the full sem*(2) library, so assume we can not
14639 set d_semctl_semid_ds
14644 : see if sendmsg exists
14645 set sendmsg d_sendmsg
14648 : see if setegid exists
14649 set setegid d_setegid
14652 : see if seteuid exists
14653 set seteuid d_seteuid
14656 : see if setgrent exists
14657 set setgrent d_setgrent
14660 : see if setgrent_r exists
14661 set setgrent_r d_setgrent_r
14663 case "$d_setgrent_r" in
14665 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14668 hdrs="$hdrs $i_systime sys/time.h"
14671 case "$d_setgrent_r_proto:$usethreads" in
14672 ":define") d_setgrent_r_proto=define
14673 set d_setgrent_r_proto setgrent_r $hdrs
14677 case "$d_setgrent_r_proto" in
14679 case "$setgrent_r_proto" in
14680 ''|0) try='int setgrent_r(FILE**);'
14681 ./protochk "extern $try" $hdrs && setgrent_r_proto=I_H ;;
14683 case "$setgrent_r_proto" in
14684 ''|0) try='void setgrent_r(FILE**);'
14685 ./protochk "extern $try" $hdrs && setgrent_r_proto=V_H ;;
14687 case "$setgrent_r_proto" in
14688 ''|0) d_setgrent_r=undef
14690 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
14691 * ) case "$setgrent_r_proto" in
14692 REENTRANT_PROTO*) ;;
14693 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
14695 echo "Prototype: $try" ;;
14698 *) case "$usethreads" in
14699 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
14706 *) setgrent_r_proto=0
14710 : see if sethostent exists
14711 set sethostent d_sethent
14714 : see if sethostent_r exists
14715 set sethostent_r d_sethostent_r
14717 case "$d_sethostent_r" in
14719 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14722 hdrs="$hdrs $i_systime sys/time.h"
14725 case "$d_sethostent_r_proto:$usethreads" in
14726 ":define") d_sethostent_r_proto=define
14727 set d_sethostent_r_proto sethostent_r $hdrs
14731 case "$d_sethostent_r_proto" in
14733 case "$sethostent_r_proto" in
14734 ''|0) try='int sethostent_r(int, struct hostent_data*);'
14735 ./protochk "extern $try" $hdrs && sethostent_r_proto=I_ID ;;
14737 case "$sethostent_r_proto" in
14738 ''|0) try='void sethostent_r(int, struct hostent_data*);'
14739 ./protochk "extern $try" $hdrs && sethostent_r_proto=V_ID ;;
14741 case "$sethostent_r_proto" in
14742 ''|0) d_sethostent_r=undef
14743 sethostent_r_proto=0
14744 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
14745 * ) case "$sethostent_r_proto" in
14746 REENTRANT_PROTO*) ;;
14747 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
14749 echo "Prototype: $try" ;;
14752 *) case "$usethreads" in
14753 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
14755 d_sethostent_r=undef
14756 sethostent_r_proto=0
14760 *) sethostent_r_proto=0
14764 : see if setitimer exists
14765 set setitimer d_setitimer
14768 : see if setlinebuf exists
14769 set setlinebuf d_setlinebuf
14772 : see if setlocale exists
14773 set setlocale d_setlocale
14776 : see if locale.h is available
14777 set locale.h i_locale
14780 : see if setlocale_r exists
14781 set setlocale_r d_setlocale_r
14783 case "$d_setlocale_r" in
14785 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
14788 hdrs="$hdrs $i_systime sys/time.h"
14791 case "$d_setlocale_r_proto:$usethreads" in
14792 ":define") d_setlocale_r_proto=define
14793 set d_setlocale_r_proto setlocale_r $hdrs
14797 case "$d_setlocale_r_proto" in
14799 case "$setlocale_r_proto" in
14800 ''|0) try='int setlocale_r(int, const char*, char*, int);'
14801 ./protochk "extern $try" $hdrs && setlocale_r_proto=I_ICBI ;;
14803 case "$setlocale_r_proto" in
14804 ''|0) d_setlocale_r=undef
14805 setlocale_r_proto=0
14806 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
14807 * ) case "$setlocale_r_proto" in
14808 REENTRANT_PROTO*) ;;
14809 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
14811 echo "Prototype: $try" ;;
14814 *) case "$usethreads" in
14815 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
14817 d_setlocale_r=undef
14818 setlocale_r_proto=0
14822 *) setlocale_r_proto=0
14826 : see if setnetent exists
14827 set setnetent d_setnent
14830 : see if setnetent_r exists
14831 set setnetent_r d_setnetent_r
14833 case "$d_setnetent_r" in
14835 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14838 hdrs="$hdrs $i_systime sys/time.h"
14841 case "$d_setnetent_r_proto:$usethreads" in
14842 ":define") d_setnetent_r_proto=define
14843 set d_setnetent_r_proto setnetent_r $hdrs
14847 case "$d_setnetent_r_proto" in
14849 case "$setnetent_r_proto" in
14850 ''|0) try='int setnetent_r(int, struct netent_data*);'
14851 ./protochk "extern $try" $hdrs && setnetent_r_proto=I_ID ;;
14853 case "$setnetent_r_proto" in
14854 ''|0) try='void setnetent_r(int, struct netent_data*);'
14855 ./protochk "extern $try" $hdrs && setnetent_r_proto=V_ID ;;
14857 case "$setnetent_r_proto" in
14858 ''|0) d_setnetent_r=undef
14859 setnetent_r_proto=0
14860 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
14861 * ) case "$setnetent_r_proto" in
14862 REENTRANT_PROTO*) ;;
14863 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
14865 echo "Prototype: $try" ;;
14868 *) case "$usethreads" in
14869 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
14871 d_setnetent_r=undef
14872 setnetent_r_proto=0
14876 *) setnetent_r_proto=0
14880 : see if setprotoent exists
14881 set setprotoent d_setpent
14884 : see if setpgid exists
14885 set setpgid d_setpgid
14888 : see if setpgrp2 exists
14889 set setpgrp2 d_setpgrp2
14892 : see if setpriority exists
14893 set setpriority d_setprior
14896 : see if setproctitle exists
14897 set setproctitle d_setproctitle
14900 : see if setprotoent_r exists
14901 set setprotoent_r d_setprotoent_r
14903 case "$d_setprotoent_r" in
14905 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14908 hdrs="$hdrs $i_systime sys/time.h"
14911 case "$d_setprotoent_r_proto:$usethreads" in
14912 ":define") d_setprotoent_r_proto=define
14913 set d_setprotoent_r_proto setprotoent_r $hdrs
14917 case "$d_setprotoent_r_proto" in
14919 case "$setprotoent_r_proto" in
14920 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
14921 ./protochk "extern $try" $hdrs && setprotoent_r_proto=I_ID ;;
14923 case "$setprotoent_r_proto" in
14924 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
14925 ./protochk "extern $try" $hdrs && setprotoent_r_proto=V_ID ;;
14927 case "$setprotoent_r_proto" in
14928 ''|0) d_setprotoent_r=undef
14929 setprotoent_r_proto=0
14930 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
14931 * ) case "$setprotoent_r_proto" in
14932 REENTRANT_PROTO*) ;;
14933 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
14935 echo "Prototype: $try" ;;
14938 *) case "$usethreads" in
14939 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
14941 d_setprotoent_r=undef
14942 setprotoent_r_proto=0
14946 *) setprotoent_r_proto=0
14950 : see if setpwent exists
14951 set setpwent d_setpwent
14954 : see if setpwent_r exists
14955 set setpwent_r d_setpwent_r
14957 case "$d_setpwent_r" in
14959 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14962 hdrs="$hdrs $i_systime sys/time.h"
14965 case "$d_setpwent_r_proto:$usethreads" in
14966 ":define") d_setpwent_r_proto=define
14967 set d_setpwent_r_proto setpwent_r $hdrs
14971 case "$d_setpwent_r_proto" in
14973 case "$setpwent_r_proto" in
14974 ''|0) try='int setpwent_r(FILE**);'
14975 ./protochk "extern $try" $hdrs && setpwent_r_proto=I_H ;;
14977 case "$setpwent_r_proto" in
14978 ''|0) try='void setpwent_r(FILE**);'
14979 ./protochk "extern $try" $hdrs && setpwent_r_proto=V_H ;;
14981 case "$setpwent_r_proto" in
14982 ''|0) d_setpwent_r=undef
14984 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
14985 * ) case "$setpwent_r_proto" in
14986 REENTRANT_PROTO*) ;;
14987 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
14989 echo "Prototype: $try" ;;
14992 *) case "$usethreads" in
14993 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
15000 *) setpwent_r_proto=0
15004 : see if setregid exists
15005 set setregid d_setregid
15007 set setresgid d_setresgid
15010 : see if setreuid exists
15011 set setreuid d_setreuid
15013 set setresuid d_setresuid
15016 : see if setrgid exists
15017 set setrgid d_setrgid
15020 : see if setruid exists
15021 set setruid d_setruid
15024 : see if setservent exists
15025 set setservent d_setsent
15028 : see if setservent_r exists
15029 set setservent_r d_setservent_r
15031 case "$d_setservent_r" in
15033 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15036 hdrs="$hdrs $i_systime sys/time.h"
15039 case "$d_setservent_r_proto:$usethreads" in
15040 ":define") d_setservent_r_proto=define
15041 set d_setservent_r_proto setservent_r $hdrs
15045 case "$d_setservent_r_proto" in
15047 case "$setservent_r_proto" in
15048 ''|0) try='int setservent_r(int, struct servent_data*);'
15049 ./protochk "extern $try" $hdrs && setservent_r_proto=I_ID ;;
15051 case "$setservent_r_proto" in
15052 ''|0) try='void setservent_r(int, struct servent_data*);'
15053 ./protochk "extern $try" $hdrs && setservent_r_proto=V_ID ;;
15055 case "$setservent_r_proto" in
15056 ''|0) d_setservent_r=undef
15057 setservent_r_proto=0
15058 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
15059 * ) case "$setservent_r_proto" in
15060 REENTRANT_PROTO*) ;;
15061 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
15063 echo "Prototype: $try" ;;
15066 *) case "$usethreads" in
15067 define) echo "setservent_r has no prototype, not using it." >&4 ;;
15069 d_setservent_r=undef
15070 setservent_r_proto=0
15074 *) setservent_r_proto=0
15078 : see if setsid exists
15079 set setsid d_setsid
15082 : see if setvbuf exists
15083 set setvbuf d_setvbuf
15086 : see if sfio.h is available
15091 : see if sfio library is available
15102 : Ok, but do we want to use it.
15106 true|$define|[yY]*) dflt='y';;
15109 echo "$package can use the sfio library, but it is experimental."
15110 case "$useperlio" in
15112 echo "For sfio also the PerlIO abstraction layer is needed."
15113 echo "Earlier you said you wouldn't want that."
15116 rp="You seem to have sfio available, do you want to try using it?"
15119 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
15120 useperlio="$define"
15123 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
15128 *) case "$usesfio" in
15129 true|$define|[yY]*)
15130 echo "Sorry, cannot find sfio on this machine." >&4
15131 echo "Ignoring your setting of usesfio=$usesfio." >&4
15140 $define) usesfio='true';;
15141 *) usesfio='false';;
15145 *) : Remove sfio from list of libraries to use
15148 echo "Removing unneeded -lsfio from library list" >&4
15149 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
15152 echo "libs = $libs" >&4
15159 : see if shmctl exists
15160 set shmctl d_shmctl
15163 : see if shmget exists
15164 set shmget d_shmget
15167 : see if shmat exists
15170 : see what shmat returns
15173 $cat >shmat.c <<'END'
15174 #include <sys/shm.h>
15177 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
15182 echo "and it returns ($shmattype)." >&4
15183 : see if a prototype for shmat is available
15184 xxx=`./findhdr sys/shm.h`
15185 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
15186 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
15197 set d_shmatprototype
15200 : see if shmdt exists
15204 : see how much of the 'shm*(2)' library is present.
15207 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
15208 *"$undef"*) h_shm=false;;
15212 case "`ipcs 2>&1`" in
15213 "SVID shared memory"*"not configured"*)
15214 echo "Your $osname does not have the shm*(2) configured." >&4
15217 set shmctl d_shmctl
15219 set shmget d_shmget
15229 : we could also check for sys/ipc.h ...
15230 if $h_shm && $test `./findhdr sys/shm.h`; then
15231 echo "You have the full shm*(2) library." >&4
15234 echo "You don't have the full shm*(2) library." >&4
15241 : see if we have sigaction
15242 if set sigaction val -f d_sigaction; eval $csym; $val; then
15243 echo 'sigaction() found.' >&4
15244 $cat > try.c <<'EOP'
15246 #include <sys/types.h>
15247 #include <signal.h>
15250 struct sigaction act, oact;
15252 oact.sa_handler = 0;
15253 /* so that act and oact are used */
15254 exit(act.sa_flags == 0 && oact.sa_handler == 0);
15258 if eval $compile_ok; then
15261 echo "But you don't seem to have a useable struct sigaction." >&4
15265 echo 'sigaction NOT found.' >&4
15268 set d_sigaction; eval $setvar
15269 $rm -f try try$_o try.c
15271 : see if sigprocmask exists
15272 set sigprocmask d_sigprocmask
15275 : see if sigsetjmp exists
15277 case "$d_sigsetjmp" in
15279 $cat >try.c <<'EOP'
15280 #include <setjmp.h>
15285 if (sigsetjmp(env,1))
15288 siglongjmp(env, 1);
15293 if eval $compile; then
15294 if $run ./try >/dev/null 2>&1; then
15295 echo "POSIX sigsetjmp found." >&4
15299 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
15305 echo "sigsetjmp not found." >&4
15309 *) val="$d_sigsetjmp"
15310 case "$d_sigsetjmp" in
15311 $define) echo "POSIX sigsetjmp found." >&4;;
15312 $undef) echo "sigsetjmp not found." >&4;;
15320 : see if sockatmark exists
15321 set sockatmark d_sockatmark
15324 : see if prototype for sockatmark is available
15326 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
15329 : see if socks5_init exists
15330 set socks5_init d_socks5_init
15333 : see if srand48_r exists
15334 set srand48_r d_srand48_r
15336 case "$d_srand48_r" in
15338 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15341 hdrs="$hdrs $i_systime sys/time.h"
15344 case "$d_srand48_r_proto:$usethreads" in
15345 ":define") d_srand48_r_proto=define
15346 set d_srand48_r_proto srand48_r $hdrs
15350 case "$d_srand48_r_proto" in
15352 case "$srand48_r_proto" in
15353 ''|0) try='int srand48_r(long, struct drand48_data*);'
15354 ./protochk "extern $try" $hdrs && srand48_r_proto=I_LS ;;
15356 case "$srand48_r_proto" in
15357 ''|0) d_srand48_r=undef
15359 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
15360 * ) case "$srand48_r_proto" in
15361 REENTRANT_PROTO*) ;;
15362 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
15364 echo "Prototype: $try" ;;
15367 *) case "$usethreads" in
15368 define) echo "srand48_r has no prototype, not using it." >&4 ;;
15375 *) srand48_r_proto=0
15379 : see if srandom_r exists
15380 set srandom_r d_srandom_r
15382 case "$d_srandom_r" in
15384 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15387 hdrs="$hdrs $i_systime sys/time.h"
15390 case "$d_srandom_r_proto:$usethreads" in
15391 ":define") d_srandom_r_proto=define
15392 set d_srandom_r_proto srandom_r $hdrs
15396 case "$d_srandom_r_proto" in
15398 case "$srandom_r_proto" in
15399 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
15400 ./protochk "extern $try" $hdrs && srandom_r_proto=I_TS ;;
15402 case "$srandom_r_proto" in
15403 ''|0) d_srandom_r=undef
15405 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
15406 * ) case "$srandom_r_proto" in
15407 REENTRANT_PROTO*) ;;
15408 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
15410 echo "Prototype: $try" ;;
15413 *) case "$usethreads" in
15414 define) echo "srandom_r has no prototype, not using it." >&4 ;;
15421 *) srandom_r_proto=0
15425 : see if prototype for setresgid is available
15427 set d_sresgproto setresgid $i_unistd unistd.h
15430 : see if prototype for setresuid is available
15432 set d_sresuproto setresuid $i_unistd unistd.h
15435 : see if sys/stat.h is available
15436 set sys/stat.h i_sysstat
15440 : see if stat knows about block sizes
15442 echo "Checking to see if your struct stat has st_blocks field..." >&4
15443 set d_statblks stat st_blocks $i_sysstat sys/stat.h
15447 : see if this is a sys/vfs.h system
15448 set sys/vfs.h i_sysvfs
15452 : see if this is a sys/statfs.h system
15453 set sys/statfs.h i_sysstatfs
15458 echo "Checking to see if your system supports struct statfs..." >&4
15459 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
15461 case "$d_statfs_s" in
15462 "$define") echo "Yes, it does." ;;
15463 *) echo "No, it doesn't." ;;
15468 : see if struct statfs knows about f_flags
15469 case "$d_statfs_s" in
15472 echo "Checking to see if your struct statfs has f_flags field..." >&4
15473 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
15477 set d_statfs_f_flags
15481 case "$d_statfs_f_flags" in
15482 "$define") echo "Yes, it does." ;;
15483 *) echo "No, it doesn't." ;;
15486 : see if _ptr and _cnt from stdio act std
15489 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
15490 echo "(Looks like you have stdio.h from BSD.)"
15491 case "$stdio_ptr" in
15492 '') stdio_ptr='((fp)->_p)'
15495 *) ptr_lval=$d_stdio_ptr_lval;;
15497 case "$stdio_cnt" in
15498 '') stdio_cnt='((fp)->_r)'
15501 *) cnt_lval=$d_stdio_cnt_lval;;
15503 case "$stdio_base" in
15504 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
15506 case "$stdio_bufsiz" in
15507 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
15509 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
15510 echo "(Looks like you have stdio.h from Linux.)"
15511 case "$stdio_ptr" in
15512 '') stdio_ptr='((fp)->_IO_read_ptr)'
15515 *) ptr_lval=$d_stdio_ptr_lval;;
15517 case "$stdio_cnt" in
15518 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
15521 *) cnt_lval=$d_stdio_cnt_lval;;
15523 case "$stdio_base" in
15524 '') stdio_base='((fp)->_IO_read_base)';;
15526 case "$stdio_bufsiz" in
15527 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
15530 case "$stdio_ptr" in
15531 '') stdio_ptr='((fp)->_ptr)'
15534 *) ptr_lval=$d_stdio_ptr_lval;;
15536 case "$stdio_cnt" in
15537 '') stdio_cnt='((fp)->_cnt)'
15540 *) cnt_lval=$d_stdio_cnt_lval;;
15542 case "$stdio_base" in
15543 '') stdio_base='((fp)->_base)';;
15545 case "$stdio_bufsiz" in
15546 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
15550 : test whether _ptr and _cnt really work
15551 echo "Checking how std your stdio is..." >&4
15554 #define FILE_ptr(fp) $stdio_ptr
15555 #define FILE_cnt(fp) $stdio_cnt
15557 FILE *fp = fopen("try.c", "r");
15560 18 <= FILE_cnt(fp) &&
15561 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15569 if eval $compile && $to try.c; then
15570 if $run ./try; then
15571 echo "Your stdio acts pretty std."
15574 echo "Your stdio isn't very std."
15577 echo "Your stdio doesn't appear very std."
15583 : Can _ptr be used as an lvalue?
15584 case "$d_stdstdio$ptr_lval" in
15585 $define$define) val=$define ;;
15588 set d_stdio_ptr_lval
15591 : Can _cnt be used as an lvalue?
15592 case "$d_stdstdio$cnt_lval" in
15593 $define$define) val=$define ;;
15596 set d_stdio_cnt_lval
15600 : test whether setting _ptr sets _cnt as a side effect
15601 d_stdio_ptr_lval_sets_cnt="$undef"
15602 d_stdio_ptr_lval_nochange_cnt="$undef"
15603 case "$d_stdio_ptr_lval$d_stdstdio" in
15605 echo "Checking to see what happens if we set the stdio ptr..." >&4
15608 /* Can we scream? */
15609 /* Eat dust sed :-) */
15610 /* In the buffer space, no one can hear you scream. */
15611 #define FILE_ptr(fp) $stdio_ptr
15612 #define FILE_cnt(fp) $stdio_cnt
15613 #include <sys/types.h>
15615 FILE *fp = fopen("try.c", "r");
15620 puts("Fail even to read");
15623 c = getc(fp); /* Read away the first # */
15625 puts("Fail even to read");
15629 18 <= FILE_cnt(fp) &&
15630 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15632 puts("Fail even to read");
15635 ptr = (char*) FILE_ptr(fp);
15636 cnt = (size_t)FILE_cnt(fp);
15638 FILE_ptr(fp) += 42;
15640 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
15641 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
15644 if (FILE_cnt(fp) <= 20) {
15645 printf ("Fail (<20 chars to test)");
15648 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
15649 puts("Fail compare");
15652 if (cnt == FILE_cnt(fp)) {
15653 puts("Pass_unchanged");
15656 if (FILE_cnt(fp) == (cnt - 42)) {
15657 puts("Pass_changed");
15660 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
15666 if eval $compile && $to try.c; then
15667 case `$run ./try` in
15669 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
15670 d_stdio_ptr_lval_sets_cnt="$define" ;;
15672 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
15673 d_stdio_ptr_lval_nochange_cnt="$define" ;;
15675 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
15677 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
15680 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
15686 : see if _base is also standard
15688 case "$d_stdstdio" in
15692 #define FILE_base(fp) $stdio_base
15693 #define FILE_bufsiz(fp) $stdio_bufsiz
15695 FILE *fp = fopen("try.c", "r");
15698 19 <= FILE_bufsiz(fp) &&
15699 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
15706 if eval $compile && $to try.c; then
15707 if $run ./try; then
15708 echo "And its _base field acts std."
15711 echo "But its _base field isn't std."
15714 echo "However, it seems to be lacking the _base field."
15723 Checking how to access stdio streams by file descriptor number...
15725 case "$stdio_stream_array" in
15726 '') $cat >try.c <<EOCP
15729 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
15733 for s in _iob __iob __sF
15735 set try -DSTDIO_STREAM_ARRAY=$s
15736 if eval $compile; then
15737 case "`$run ./try`" in
15738 yes) stdio_stream_array=$s; break ;;
15742 $rm -f try.* try$exe_ext
15744 case "$stdio_stream_array" in
15746 I can't figure out how to access stdio streams by file descriptor number.
15748 d_stdio_stream_array="$undef"
15751 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
15753 d_stdio_stream_array="$define"
15757 : see if strcoll exists
15758 set strcoll d_strcoll
15761 : check for structure copying
15763 echo "Checking to see if your C compiler can copy structs..." >&4
15764 $cat >try.c <<'EOCP'
15774 if $cc -c try.c >/dev/null 2>&1 ; then
15776 echo "Yup, it can."
15779 echo "Nope, it can't."
15785 : see if strerror and/or sys_errlist[] exist
15787 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
15788 if set strerror val -f d_strerror; eval $csym; $val; then
15789 echo 'strerror() found.' >&4
15790 d_strerror="$define"
15791 d_strerrm='strerror(e)'
15792 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15793 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
15794 d_syserrlst="$define"
15796 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
15797 d_syserrlst="$undef"
15799 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
15800 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
15801 echo 'strerror() found in string header.' >&4
15802 d_strerror="$define"
15803 d_strerrm='strerror(e)'
15804 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15805 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
15806 d_syserrlst="$define"
15808 echo "(You don't appear to have any sys_errlist[], how can this be?)"
15809 d_syserrlst="$undef"
15811 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15812 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
15813 d_strerror="$undef"
15814 d_syserrlst="$define"
15815 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
15817 echo 'strerror() and sys_errlist[] NOT found.' >&4
15818 d_strerror="$undef"
15819 d_syserrlst="$undef"
15820 d_strerrm='"unknown"'
15824 : see if strerror_r exists
15825 set strerror_r d_strerror_r
15827 case "$d_strerror_r" in
15829 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
15832 hdrs="$hdrs $i_systime sys/time.h"
15835 case "$d_strerror_r_proto:$usethreads" in
15836 ":define") d_strerror_r_proto=define
15837 set d_strerror_r_proto strerror_r $hdrs
15841 case "$d_strerror_r_proto" in
15843 case "$strerror_r_proto" in
15844 ''|0) try='int strerror_r(int, char*, size_t);'
15845 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;;
15847 case "$strerror_r_proto" in
15848 ''|0) try='int strerror_r(int, char*, int);'
15849 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;;
15851 case "$strerror_r_proto" in
15852 ''|0) try='char* strerror_r(int, char*, size_t);'
15853 ./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;;
15855 case "$strerror_r_proto" in
15856 ''|0) d_strerror_r=undef
15858 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
15859 * ) case "$strerror_r_proto" in
15860 REENTRANT_PROTO*) ;;
15861 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
15863 echo "Prototype: $try" ;;
15866 *) case "$usethreads" in
15867 define) echo "strerror_r has no prototype, not using it." >&4 ;;
15874 *) strerror_r_proto=0
15878 : see if strftime exists
15879 set strftime d_strftime
15882 : see if strtod exists
15883 set strtod d_strtod
15886 : see if strtol exists
15887 set strtol d_strtol
15890 : see if strtold exists
15891 set strtold d_strtold
15894 : see if strtoll exists
15895 set strtoll d_strtoll
15898 case "$d_longlong-$d_strtoll" in
15901 Checking whether your strtoll() works okay...
15903 $cat >try.c <<'EOCP'
15906 #define strtoll __strtoll
15909 #define strtoll _strtoll
15912 extern long long int strtoll(char *s, char **, int);
15913 static int bad = 0;
15914 int check(char *s, long long ell, int een) {
15917 gll = strtoll(s, 0, 10);
15918 if (!((gll == ell) && (errno == een)))
15922 check(" 1", 1LL, 0);
15923 check(" 0", 0LL, 0);
15924 check("-1", -1LL, 0);
15925 check("-9223372036854775808", -9223372036854775808LL, 0);
15926 check("-9223372036854775808", -9223372036854775808LL, 0);
15927 check(" 9223372036854775807", 9223372036854775807LL, 0);
15928 check("-9223372036854775808", -9223372036854775808LL, 0);
15929 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
15930 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
15936 if eval $compile; then
15939 ok) echo "Your strtoll() seems to be working okay." ;;
15941 Your strtoll() doesn't seem to be working okay.
15947 echo "(I can't seem to compile the test program--assuming it doesn't)"
15953 : see if strtoq exists
15954 set strtoq d_strtoq
15957 : see if strtoul exists
15958 set strtoul d_strtoul
15961 case "$d_strtoul" in
15964 Checking whether your strtoul() works okay...
15966 $cat >try.c <<'EOCP'
15969 extern unsigned long int strtoul(char *s, char **, int);
15970 static int bad = 0;
15971 void check(char *s, unsigned long eul, int een) {
15974 gul = strtoul(s, 0, 10);
15975 if (!((gul == eul) && (errno == een)))
15979 check(" 1", 1L, 0);
15980 check(" 0", 0L, 0);
15982 case "$longsize" in
15984 $cat >>try.c <<'EOCP'
15985 check("18446744073709551615", 18446744073709551615UL, 0);
15986 check("18446744073709551616", 18446744073709551615UL, ERANGE);
15987 #if 0 /* strtoul() for /^-/ strings is undefined. */
15988 check("-1", 18446744073709551615UL, 0);
15989 check("-18446744073709551614", 2, 0);
15990 check("-18446744073709551615", 1, 0);
15991 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
15992 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
15997 $cat >>try.c <<'EOCP'
15998 check("4294967295", 4294967295UL, 0);
15999 check("4294967296", 4294967295UL, ERANGE);
16000 #if 0 /* strtoul() for /^-/ strings is undefined. */
16001 check("-1", 4294967295UL, 0);
16002 check("-4294967294", 2, 0);
16003 check("-4294967295", 1, 0);
16004 check("-4294967296", 4294967295UL, ERANGE);
16005 check("-4294967297", 4294967295UL, ERANGE);
16010 : Should we write these tests to be more portable by sprintf-ing
16011 : ~0 and then manipulating that char string as input for strtol?
16014 $cat >>try.c <<'EOCP'
16021 if eval $compile; then
16022 case "`$run ./try`" in
16023 ok) echo "Your strtoul() seems to be working okay." ;;
16025 Your strtoul() doesn't seem to be working okay.
16034 : see if strtoull exists
16035 set strtoull d_strtoull
16038 case "$d_longlong-$d_strtoull" in
16041 Checking whether your strtoull() works okay...
16043 $cat >try.c <<'EOCP'
16046 #define strtoull __strtoull
16049 extern unsigned long long int strtoull(char *s, char **, int);
16050 static int bad = 0;
16051 int check(char *s, long long eull, int een) {
16054 gull = strtoull(s, 0, 10);
16055 if (!((gull == eull) && (errno == een)))
16059 check(" 1", 1LL, 0);
16060 check(" 0", 0LL, 0);
16061 check("18446744073709551615", 18446744073709551615ULL, 0);
16062 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
16063 #if 0 /* strtoull() for /^-/ strings is undefined. */
16064 check("-1", 18446744073709551615ULL, 0);
16065 check("-18446744073709551614", 2LL, 0);
16066 check("-18446744073709551615", 1LL, 0);
16067 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
16068 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
16075 if eval $compile; then
16076 case "`$run ./try`" in
16077 ok) echo "Your strtoull() seems to be working okay." ;;
16079 Your strtoull() doesn't seem to be working okay.
16081 d_strtoull="$undef"
16088 : see if strtouq exists
16089 set strtouq d_strtouq
16092 case "$d_strtouq" in
16095 Checking whether your strtouq() works okay...
16097 $cat >try.c <<'EOCP'
16100 extern unsigned long long int strtouq(char *s, char **, int);
16101 static int bad = 0;
16102 void check(char *s, unsigned long long eull, int een) {
16103 unsigned long long gull;
16105 gull = strtouq(s, 0, 10);
16106 if (!((gull == eull) && (errno == een)))
16110 check(" 1", 1LL, 0);
16111 check(" 0", 0LL, 0);
16112 check("18446744073709551615", 18446744073709551615ULL, 0);
16113 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
16114 #if 0 /* strtouq() for /^-/ strings is undefined. */
16115 check("-1", 18446744073709551615ULL, 0);
16116 check("-18446744073709551614", 2LL, 0);
16117 check("-18446744073709551615", 1LL, 0);
16118 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
16119 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
16127 if eval $compile; then
16128 case "`$run ./try`" in
16129 ok) echo "Your strtouq() seems to be working okay." ;;
16131 Your strtouq() doesn't seem to be working okay.
16140 : see if strxfrm exists
16141 set strxfrm d_strxfrm
16144 : see if symlink exists
16145 set symlink d_symlink
16148 : see if syscall exists
16149 set syscall d_syscall
16152 : see if prototype for syscall is available
16154 set d_syscallproto syscall $i_unistd unistd.h
16157 : see if sysconf exists
16158 set sysconf d_sysconf
16161 : see if system exists
16162 set system d_system
16165 : see if tcgetpgrp exists
16166 set tcgetpgrp d_tcgetpgrp
16169 : see if tcsetpgrp exists
16170 set tcsetpgrp d_tcsetpgrp
16173 : see if prototype for telldir is available
16175 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
16178 : see if this is a sys/times.h system
16179 set sys/times.h i_systimes
16182 : see if times exists
16184 if set times val -f d_times; eval $csym; $val; then
16185 echo 'times() found.' >&4
16188 case "$i_systimes" in
16189 "$define") inc='sys/times.h';;
16191 rp="What is the type returned by times() on this system?"
16192 set clock_t clocktype long stdio.h sys/types.h $inc
16195 echo 'times() NOT found, hope that will do.' >&4
16200 : see if tmpnam_r exists
16201 set tmpnam_r d_tmpnam_r
16203 case "$d_tmpnam_r" in
16205 hdrs="$i_systypes sys/types.h define stdio.h $i_stdio stdio.h"
16208 hdrs="$hdrs $i_systime sys/time.h"
16211 case "$d_tmpnam_r_proto:$usethreads" in
16212 ":define") d_tmpnam_r_proto=define
16213 set d_tmpnam_r_proto tmpnam_r $hdrs
16217 case "$d_tmpnam_r_proto" in
16219 case "$tmpnam_r_proto" in
16220 ''|0) try='char* tmpnam_r(char*);'
16221 ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;;
16223 case "$tmpnam_r_proto" in
16224 ''|0) d_tmpnam_r=undef
16226 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
16227 * ) case "$tmpnam_r_proto" in
16228 REENTRANT_PROTO*) ;;
16229 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
16231 echo "Prototype: $try" ;;
16234 *) case "$usethreads" in
16235 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
16242 *) tmpnam_r_proto=0
16246 : see if truncate exists
16247 set truncate d_truncate
16250 : see if ttyname_r exists
16251 set ttyname_r d_ttyname_r
16253 case "$d_ttyname_r" in
16255 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
16258 hdrs="$hdrs $i_systime sys/time.h"
16261 case "$d_ttyname_r_proto:$usethreads" in
16262 ":define") d_ttyname_r_proto=define
16263 set d_ttyname_r_proto ttyname_r $hdrs
16267 case "$d_ttyname_r_proto" in
16269 case "$ttyname_r_proto" in
16270 ''|0) try='int ttyname_r(int, char*, size_t);'
16271 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;;
16273 case "$ttyname_r_proto" in
16274 ''|0) try='int ttyname_r(int, char*, int);'
16275 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;;
16277 case "$ttyname_r_proto" in
16278 ''|0) try='char* ttyname_r(int, char*, int);'
16279 ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;;
16281 case "$ttyname_r_proto" in
16282 ''|0) d_ttyname_r=undef
16284 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
16285 * ) case "$ttyname_r_proto" in
16286 REENTRANT_PROTO*) ;;
16287 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
16289 echo "Prototype: $try" ;;
16292 *) case "$usethreads" in
16293 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
16300 *) ttyname_r_proto=0
16304 : see if tzname[] exists
16306 if set tzname val -a d_tzname; eval $csym; $val; then
16308 echo 'tzname[] found.' >&4
16311 echo 'tzname[] NOT found.' >&4
16317 next|rhapsody|darwin) multiarch="$define" ;;
16319 case "$multiarch" in
16320 ''|[nN]*) multiarch="$undef" ;;
16323 : check for ordering of bytes in a long
16325 case "$usecrosscompile$multiarch" in
16328 You seem to be either cross-compiling or doing a multiarchitecture build,
16329 skipping the byteorder check.
16335 case "$byteorder" in
16338 In the following, larger digits indicate more significance. A big-endian
16339 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
16340 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
16341 machines may have weird orders like 3412. A Cray will report 87654321,
16342 an Alpha will report 12345678. If the test program works the default is
16344 I'm now running the test program...
16346 $cat >try.c <<'EOCP'
16353 char c[sizeof(long)];
16356 if (sizeof(long) > 4)
16357 u.l = (0x08070605L << 32) | 0x04030201L;
16360 for (i = 0; i < sizeof(long); i++)
16361 printf("%c", u.c[i]+'0');
16368 if eval $compile && ./try > /dev/null; then
16371 [1-4][1-4][1-4][1-4]|12345678|87654321)
16372 echo "(The test program ran ok.)"
16373 echo "byteorder=$dflt"
16376 ????|????????) echo "(The test program ran ok.)" ;;
16377 *) echo "(The test program didn't run right for some reason.)" ;;
16382 (I can't seem to compile the test program. Guessing big-endian...)
16385 case "$xxx_prompt" in
16387 rp="What is the order of bytes in a long?"
16403 Checking to see whether you can access character data unalignedly...
16405 case "$d_u32align" in
16406 '') $cat >try.c <<EOCP
16408 #define U32 $u32type
16409 #define BYTEORDER 0x$byteorder
16411 #include <signal.h>
16413 $signal_t bletch(s) int s; { exit(4); }
16416 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
16421 if (sizeof(U32) != 4) {
16422 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
16429 signal(SIGBUS, bletch);
16441 for (i = 0; i < 4; i++) {
16442 up = (U32*)(buf + i);
16443 if (! ((*up == 1 << (8*i)) || /* big-endian */
16444 (*up == 1 << (8*(3-i))) /* little-endian */
16448 printf("read failed (%x)\n", *up);
16454 for (i = 0; i < 4; i++) {
16455 up = (U32*)(buf + i);
16457 if (*up != 0xBeef) {
16458 printf("write failed (%x)\n", *up);
16472 if eval $compile_ok; then
16473 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
16474 $run ./try 2>&1 >/dev/null
16477 You can access character data pretty unalignedly.
16479 d_u32align="$undef"
16482 It seems that you must access character data in an aligned manner.
16484 d_u32align="$define"
16488 rp='Can you access character data at unaligned addresses?'
16492 [yY]*) d_u32align="$undef" ;;
16493 *) d_u32align="$define" ;;
16496 $rm -f core core.try.* try.core
16500 : see if ualarm exists
16501 set ualarm d_ualarm
16504 : see if umask exists
16508 : see if unordered exists
16509 set unordered d_unordered
16512 : see if usleep exists
16513 set usleep d_usleep
16516 : see if prototype for usleep is available
16518 set d_usleepproto usleep $i_unistd unistd.h
16521 : see if ustat exists
16525 : backward compatibility for d_hvfork
16526 if test X$d_hvfork != X; then
16527 d_vfork="$d_hvfork"
16530 : see if there is a vfork
16535 : Ok, but do we want to use it. vfork is reportedly unreliable in
16536 : perl on Solaris 2.x, and probably elsewhere.
16540 case "$usevfork" in
16546 Perl can only use a vfork() that doesn't suffer from strict
16547 restrictions on calling functions or modifying global data in
16548 the child. For example, glibc-2.1 contains such a vfork()
16549 that is unsuitable. If your system provides a proper fork()
16550 call, chances are that you do NOT want perl to use vfork().
16553 rp="Do you still want to use vfork()?"
16558 echo "Ok, we won't use vfork()."
16567 $define) usevfork='true';;
16568 *) usevfork='false';;
16571 : see if closedir exists
16572 set closedir d_closedir
16575 case "$d_closedir" in
16578 echo "Checking whether closedir() returns a status..." >&4
16580 #$i_dirent I_DIRENT /**/
16581 #$i_sysdir I_SYS_DIR /**/
16582 #$i_sysndir I_SYS_NDIR /**/
16583 #$i_systypes I_SYS_TYPES /**/
16585 #if defined(I_SYS_TYPES)
16586 #include <sys/types.h>
16588 #if defined(I_DIRENT)
16589 #include <dirent.h>
16590 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
16591 #include <sys/dir.h>
16595 #include <sys/ndir.h>
16599 #include <ndir.h> /* may be wrong in the future */
16601 #include <sys/dir.h>
16606 int main() { return closedir(opendir(".")); }
16609 if eval $compile_ok; then
16610 if $run ./try > /dev/null 2>&1 ; then
16611 echo "Yes, it does."
16614 echo "No, it doesn't."
16618 echo "(I can't seem to compile the test program--assuming it doesn't)"
16626 set d_void_closedir
16629 : see if there is a wait4
16633 : see if waitpid exists
16634 set waitpid d_waitpid
16637 : see if wcstombs exists
16638 set wcstombs d_wcstombs
16641 : see if wctomb exists
16642 set wctomb d_wctomb
16645 : see if writev exists
16646 set writev d_writev
16649 : preserve RCS keywords in files with variable substitution, grrr
16654 Revision='$Revision'
16656 : check for alignment requirements
16658 case "$usecrosscompile$multiarch" in
16661 You seem to be either cross-compiling or doing a multiarchitecture build,
16662 skipping the memory alignment check.
16665 case "$alignbytes" in
16666 '') alignbytes=8 ;;
16670 case "$alignbytes" in
16671 '') echo "Checking alignment constraints..." >&4
16672 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
16673 $cat >try.c <<'EOCP'
16674 typedef long double NV;
16677 $cat >try.c <<'EOCP'
16681 $cat >>try.c <<'EOCP'
16689 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
16694 if eval $compile_ok; then
16698 echo "(I can't seem to compile the test program...)"
16701 *) dflt="$alignbytes"
16704 rp="Doubles must be aligned on a how-many-byte boundary?"
16712 : set the base revision
16715 : how do we catenate cpp tokens here?
16717 echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
16718 $cat >cpp_stuff.c <<'EOCP'
16719 #define RCAT(a,b)a/**/b
16720 #define ACAT(a,b)a ## b
16724 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
16725 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
16726 echo "Oh! Smells like ANSI's been here." >&4
16727 echo "We can catify or stringify, separately or together!"
16729 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
16730 echo "Ah, yes! The good old days!" >&4
16731 echo "However, in the good old days we don't know how to stringify and"
16732 echo "catify at the same time."
16736 Hmm, I don't seem to be able to catenate tokens with your cpp. You're going
16737 to have to edit the values of CAT[2-5] in config.h...
16739 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
16743 : see if this is a db.h system
16749 : Check db version.
16751 echo "Checking Berkeley DB version ..." >&4
16757 #include <sys/types.h>
16760 int main(int argc, char *argv[])
16762 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
16763 int Major, Minor, Patch ;
16764 unsigned long Version ;
16765 (void)db_version(&Major, &Minor, &Patch) ;
16767 printf("%d %d %d %d %d %d\n",
16768 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
16769 Major, Minor, Patch);
16772 printf("You have Berkeley DB Version 2 or greater.\n");
16774 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
16775 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
16776 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
16777 Major, Minor, Patch) ;
16779 /* check that db.h & libdb are compatible */
16780 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
16781 printf("db.h and libdb are incompatible.\n") ;
16785 printf("db.h and libdb are compatible.\n") ;
16787 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
16788 + DB_VERSION_PATCH ;
16790 /* needs to be >= 2.3.4 */
16791 if (Version < 2003004) {
16792 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
16793 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
16799 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
16804 printf("You have Berkeley DB Version 1.\n");
16805 exit(0); /* DB version < 2: the coast is clear. */
16807 exit(1); /* <db.h> not Berkeley DB? */
16813 if eval $compile_ok && $run ./try; then
16814 echo 'Looks OK.' >&4
16816 db_version_major=$1
16817 db_version_minor=$2
16818 db_version_patch=$3
16820 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
16824 : Remove db from list of libraries to use
16825 echo "Removing unusable -ldb from library list" >&4
16826 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
16829 echo "libs = $libs" >&4
16839 : Check the return type needed for hash
16841 echo "Checking return type needed for hash for Berkeley DB ..." >&4
16847 #include <sys/types.h>
16850 #ifndef DB_VERSION_MAJOR
16851 u_int32_t hash_cb (ptr, size)
16859 info.hash = hash_cb;
16863 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16864 if $contains warning try.out >>/dev/null 2>&1 ; then
16867 db_hashtype='u_int32_t'
16870 : XXX Maybe we should just give up here.
16871 db_hashtype=u_int32_t
16873 echo "Help: I can't seem to compile the db test program." >&4
16874 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
16877 echo "Your version of Berkeley DB uses $db_hashtype for hash."
16879 *) db_hashtype=u_int32_t
16884 : Check the return type needed for prefix
16886 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
16892 #include <sys/types.h>
16895 #ifndef DB_VERSION_MAJOR
16896 size_t prefix_cb (key1, key2)
16904 info.prefix = prefix_cb;
16908 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16909 if $contains warning try.out >>/dev/null 2>&1 ; then
16910 db_prefixtype='int'
16912 db_prefixtype='size_t'
16915 db_prefixtype='size_t'
16916 : XXX Maybe we should just give up here.
16918 echo "Help: I can't seem to compile the db test program." >&4
16919 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
16922 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
16924 *) db_prefixtype='size_t'
16929 : How can we generate normalized random numbers ?
16931 echo "Looking for a random number function..." >&4
16932 case "$randfunc" in
16934 if set drand48 val -f; eval $csym; $val; then
16936 echo "Good, found drand48()." >&4
16937 elif set random val -f; eval $csym; $val; then
16939 echo "OK, found random()." >&4
16942 echo "Yick, looks like I have to use rand()." >&4
16953 *-Dmy_rand=*|*-Dmy_srand=*)
16954 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
16955 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
16956 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
16957 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
16961 while $test "$cont"; do
16962 rp="Use which function to generate random numbers?"
16964 if $test "$ans" = "$dflt"; then
16970 if set $ans val -f; eval $csym; $val; then
16974 rp="I cannot find function $ans. Use that name anyway?"
16983 case "$randfunc" in
16985 drand01="drand48()"
16991 case "$randbits" in
16993 echo "Checking to see how many bits your $randfunc() function produces..." >&4
16995 #$i_unistd I_UNISTD
16996 #$i_stdlib I_STDLIB
16999 # include <unistd.h>
17002 # include <stdlib.h>
17007 register unsigned long tmp;
17008 register unsigned long max = 0L;
17010 for (i = 1000; i; i--) {
17011 tmp = (unsigned long) $randfunc();
17012 if (tmp > max) max = tmp;
17014 for (i = 0; max; i++)
17020 if eval $compile_ok; then
17024 echo "(I can't seem to compile the test program...)"
17031 rp="How many bits does your $randfunc() function produce?"
17035 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
17036 seedfunc="s$randfunc"
17037 randseedtype=unsigned
17041 rp="How many bits does your $randfunc() function produce?"
17044 seedfunc="s$randfunc"
17045 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
17046 if set $seedfunc val -f; eval $csym; $val; then
17047 echo "(Using $seedfunc() to seed random generator)"
17049 echo "(Warning: no $seedfunc() to seed random generator)"
17052 randseedtype=unsigned
17060 echo "Determining whether or not we are on an EBCDIC system..." >&4
17061 $cat >try.c <<'EOM'
17064 if ('M'==0xd4) return 0;
17071 if eval $compile_ok; then
17072 if $run ./try; then
17073 echo "You seem to speak EBCDIC." >&4
17076 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
17079 echo "I'm unable to compile the test program." >&4
17080 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
17088 Checking how to flush all pending stdio output...
17090 # I only know how to find the first 32 possibly open files on SunOS.
17091 # See also hints/sunos_4_1.sh and util.c --AD
17093 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
17095 $cat >>try.c <<EOCP
17097 #$i_unistd I_UNISTD
17099 # include <unistd.h>
17101 #$d_sysconf HAS_SYSCONF
17102 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
17103 #ifdef HAS_STDIO_STREAM_ARRAY
17104 # define STDIO_STREAM_ARRAY $stdio_stream_array
17109 p = fopen("try.out", "w");
17113 # ifdef TRY_FPRINTF
17117 #ifdef TRY_FFLUSH_NULL
17120 #ifdef TRY_FFLUSH_ALL
17122 long open_max = -1;
17123 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
17124 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
17126 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
17127 open_max = sysconf(_SC_OPEN_MAX);
17130 open_max = FOPEN_MAX;
17133 open_max = OPEN_MAX;
17142 # ifdef HAS_STDIO_STREAM_ARRAY
17143 if (open_max > 0) {
17145 for (i = 0; i < open_max; i++)
17146 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
17147 STDIO_STREAM_ARRAY[i]._file < open_max &&
17148 STDIO_STREAM_ARRAY[i]._flag)
17149 fflush(&STDIO_STREAM_ARRAY[i]);
17157 : first we have to find out how _not_ to flush
17159 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
17161 set try -DTRY_FPUTC
17162 if eval $compile; then
17163 $run ./try 2>/dev/null
17166 if $test ! -s try.out -a "X$code" = X42; then
17172 set try -DTRY_FPRINTF
17173 if eval $compile; then
17174 $run ./try 2>/dev/null
17177 if $test ! -s try.out -a "X$code" = X42; then
17178 output=-DTRY_FPRINTF
17184 : check for fflush NULL behaviour
17185 case "$fflushNULL" in
17186 '') set try -DTRY_FFLUSH_NULL $output
17187 if eval $compile; then
17188 $run ./try 2>/dev/null
17191 if $test -s try.out -a "X$code" = X42; then
17192 fflushNULL="`$cat try.out`"
17194 if $test "X$code" != X42; then
17196 (If this test failed, don't worry, we'll try another method shortly.)
17201 $rm -f core try.core core.try.*
17202 case "$fflushNULL" in
17204 Your fflush(NULL) works okay for output streams.
17205 Let's see if it clobbers input pipes...
17207 # As of mid-March 2000 all versions of Solaris appear to have a stdio
17208 # bug that improperly flushes the input end of pipes. So we avoid the
17209 # autoflush on fork/system/exec support for now. :-(
17210 $cat >tryp.c <<EOCP
17213 main(int argc, char **argv)
17219 while ((i = getc(stdin)) != -1
17220 && (*bp++ = i) != '\n'
17221 && bp < &buf[1024])
17224 fprintf(stdout, "%s", buf);
17232 fflushNULL="$define"
17234 if eval $compile; then
17236 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17237 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17239 fflush(NULL) seems to behave okay with input streams.
17241 fflushNULL="$define"
17244 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
17246 fflushNULL="$undef"
17249 $rm -f core tryp.c tryp.core core.tryp.*
17252 Your fflush(NULL) isn't working (contrary to ANSI C).
17254 fflushNULL="$undef"
17257 Cannot figure out whether your fflush(NULL) works or not.
17258 I'm assuming it doesn't (contrary to ANSI C).
17260 fflushNULL="$undef"
17264 $define|true|[yY]*)
17265 fflushNULL="$define"
17268 fflushNULL="$undef"
17271 : check explicit looping only if NULL did not work, and if the pipe
17272 : bug does not show up on an explicit flush too
17273 case "$fflushNULL" in
17275 $cat >tryp.c <<EOCP
17278 main(int argc, char **argv)
17284 while ((i = getc(stdin)) != -1
17285 && (*bp++ = i) != '\n'
17286 && bp < &buf[1024])
17289 fprintf(stdout, "%s", buf);
17298 if eval $compile; then
17300 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17301 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17303 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
17305 : now check for fflushall behaviour
17306 case "$fflushall" in
17307 '') set try -DTRY_FFLUSH_ALL $output
17308 if eval $compile; then
17310 (Now testing the other method--but note that this also may fail.)
17312 $run ./try 2>/dev/null
17315 if $test -s try.out -a "X$code" = X42; then
17316 fflushall="`$cat try.out`"
17319 $rm -f core try.core core.try.*
17320 case "$fflushall" in
17322 Whew. Flushing explicitly all the stdio streams works.
17324 fflushall="$define"
17327 Sigh. Flushing explicitly all the stdio streams doesn't work.
17332 Cannot figure out whether flushing stdio streams explicitly works or not.
17333 I'm assuming it doesn't.
17339 "$define"|true|[yY]*)
17340 fflushall="$define"
17348 All is futile. Even fflush(stdin) clobbers input pipes!
17355 $rm -f core tryp.c tryp.core core.tryp.*
17357 *) fflushall="$undef"
17361 case "$fflushNULL$fflushall" in
17364 OK, I give up. I cannot figure out how to flush pending stdio output.
17365 We won't be flushing handles at all before fork/exec/popen.
17369 $rm -f try.* try$exe_ext
17371 : Store the full pathname to the ar program for use in the C program
17372 : Respect a hint or command line value for full_ar.
17377 : Store the full pathname to the sed program for use in the C program
17380 : see what type gids are declared as in the kernel
17382 echo "Looking for the type for group ids returned by getgid()."
17383 set gid_t gidtype xxx stdio.h sys/types.h
17387 xxx=`./findhdr sys/user.h`
17388 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
17390 unsigned) dflt="$1 $2" ;;
17394 *) dflt="$gidtype";;
17397 gid_t) echo "gid_t found." ;;
17398 *) rp="What is the type for group ids returned by getgid()?"
17406 *_t) zzz="$gidtype" ;;
17409 echo "Checking the size of $zzz..." >&4
17411 #include <sys/types.h>
17414 printf("%d\n", (int)sizeof($gidtype));
17419 if eval $compile_ok; then
17423 echo "(I can't execute the test program--guessing $gidsize.)" >&4
17426 echo "Your $zzz is $gidsize bytes long."
17431 echo "(I can't compile the test program--guessing $gidsize.)" >&4
17437 *_t) zzz="$gidtype" ;;
17440 echo "Checking the sign of $zzz..." >&4
17442 #include <sys/types.h>
17453 if eval $compile; then
17457 echo "(I can't execute the test program--guessing unsigned.)" >&4
17461 1) echo "Your $zzz is unsigned." ;;
17462 -1) echo "Your $zzz is signed." ;;
17468 echo "(I can't compile the test program--guessing unsigned.)" >&4
17474 if $test X"$quadtype" != X; then
17476 echo "Checking how to print 64-bit integers..." >&4
17478 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
17479 $cat >try.c <<'EOCP'
17480 #include <sys/types.h>
17483 int q = 12345678901;
17484 printf("%ld\n", q);
17488 if eval $compile; then
17492 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
17493 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
17494 echo "We will use %d."
17500 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
17501 $cat >try.c <<'EOCP'
17502 #include <sys/types.h>
17505 long q = 12345678901;
17506 printf("%ld\n", q);
17510 if eval $compile; then
17514 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
17515 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
17516 echo "We will use %ld."
17522 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
17523 $cat >try.c <<'EOCP'
17524 #include <sys/types.h>
17525 #include <inttypes.h>
17528 int64_t q = 12345678901;
17529 printf("%" PRId64 "\n", q);
17533 if eval $compile; then
17537 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
17538 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
17539 echo "We will use the C9X style."
17545 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17547 #include <sys/types.h>
17550 $quadtype q = 12345678901;
17551 printf("%Ld\n", q);
17555 if eval $compile; then
17559 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
17560 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
17561 echo "We will use %Ld."
17567 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
17568 $cat >try.c <<'EOCP'
17569 #include <sys/types.h>
17572 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
17573 printf("%lld\n", q);
17577 if eval $compile; then
17581 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
17582 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
17583 echo "We will use the %lld style."
17589 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17591 #include <sys/types.h>
17594 $quadtype q = 12345678901;
17595 printf("%qd\n", q);
17599 if eval $compile; then
17603 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
17604 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
17605 echo "We will use %qd."
17611 if $test X"$sPRId64" = X; then
17612 echo "Cannot figure out how to print 64-bit integers." >&4
17620 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
17621 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
17623 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
17624 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
17630 $echo "Checking the format strings to be used for Perl's internal types..." >&4
17632 if $test X"$ivsize" = X8; then
17633 ivdformat="$sPRId64"
17634 uvuformat="$sPRIu64"
17635 uvoformat="$sPRIo64"
17636 uvxformat="$sPRIx64"
17637 uvXUformat="$sPRIXU64"
17639 if $test X"$ivsize" = X"$longsize"; then
17646 if $test X"$ivsize" = X"$intsize"; then
17654 if $test X"$ivsize" = X"$shortsize"; then
17665 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
17666 nveformat="$sPRIeldbl"
17667 nvfformat="$sPRIfldbl"
17668 nvgformat="$sPRIgldbl"
17669 nvEUformat="$sPRIEUldbl"
17670 nvFUformat="$sPRIFUldbl"
17671 nvGUformat="$sPRIGUldbl"
17681 case "$ivdformat" in
17682 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
17689 $echo "Checking the format string to be used for gids..." >&4
17692 -1) if $test X"$gidsize" = X"$ivsize"; then
17693 gidformat="$ivdformat"
17695 if $test X"$gidsize" = X"$longsize"; then
17698 if $test X"$gidsize" = X"$intsize"; then
17701 if $test X"$gidsize" = X"$shortsize"; then
17708 *) if $test X"$gidsize" = X"$uvsize"; then
17709 gidformat="$uvuformat"
17711 if $test X"$gidsize" = X"$longsize"; then
17714 if $test X"$gidsize" = X"$intsize"; then
17717 if $test X"$gidsize" = X"$shortsize"; then
17726 : see if getgroups exists
17727 set getgroups d_getgrps
17730 : see if setgroups exists
17731 set setgroups d_setgrps
17735 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
17737 case "$d_getgrps$d_setgrps" in
17739 case "$groupstype" in
17740 '') dflt="$gidtype" ;;
17741 *) dflt="$groupstype" ;;
17744 What type of pointer is the second argument to getgroups() and setgroups()?
17745 Usually this is the same as group ids, $gidtype, but not always.
17748 rp='What type pointer is the second argument to getgroups() and setgroups()?'
17752 *) groupstype="$gidtype";;
17756 echo "Checking if your $make program sets \$(MAKE)..." >&4
17757 case "$make_set_make" in
17759 $sed 's/^X //' > testmake.mak << 'EOF'
17761 X @echo 'maketemp="$(MAKE)"'
17763 case "`$make -f testmake.mak 2>/dev/null`" in
17764 *maketemp=*) make_set_make='#' ;;
17765 *) make_set_make="MAKE=$make" ;;
17767 $rm -f testmake.mak
17770 case "$make_set_make" in
17771 '#') echo "Yup, it does.";;
17772 *) echo "Nope, it doesn't.";;
17775 : see what type is used for mode_t
17776 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
17777 set mode_t modetype int stdio.h sys/types.h
17780 : see if stdarg is available
17782 if $test `./findhdr stdarg.h`; then
17783 echo "<stdarg.h> found." >&4
17786 echo "<stdarg.h> NOT found." >&4
17790 : see if varags is available
17792 if $test `./findhdr varargs.h`; then
17793 echo "<varargs.h> found." >&4
17795 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
17798 : set up the varargs testing programs
17799 $cat > varargs.c <<EOP
17801 #include <stdarg.h>
17804 #include <varargs.h>
17808 int f(char *p, ...)
17822 p = va_arg(ap, char *);
17827 $cat > varargs <<EOP
17829 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
17838 : now check which varargs header should be included
17843 if `./varargs I_STDARG`; then
17845 elif `./varargs I_VARARGS`; then
17850 if `./varargs I_VARARGS`; then
17857 echo "I could not find the definition for va_dcl... You have problems..." >&4
17858 val="$undef"; set i_stdarg; eval $setvar
17859 val="$undef"; set i_varargs; eval $setvar
17864 case "$i_varhdr" in
17866 val="$define"; set i_stdarg; eval $setvar
17867 val="$undef"; set i_varargs; eval $setvar
17870 val="$undef"; set i_stdarg; eval $setvar
17871 val="$define"; set i_varargs; eval $setvar
17874 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
17878 : see if we need va_copy
17880 case "$i_stdarg" in
17883 #include <stdarg.h>
17885 #$i_stdlib I_STDLIB
17887 #include <stdlib.h>
17889 #include <signal.h>
17892 ivfprintf(FILE *f, const char *fmt, va_list *valp)
17894 return vfprintf(f, fmt, *valp);
17898 myvfprintf(FILE *f, const char *fmt, va_list val)
17900 return ivfprintf(f, fmt, &val);
17904 myprintf(char *fmt, ...)
17907 va_start(val, fmt);
17908 return myvfprintf(stdout, fmt, val);
17912 main(int ac, char **av)
17914 signal(SIGSEGV, exit);
17916 myprintf("%s%cs all right, then\n", "that", '\'');
17921 if eval $compile && $run ./try 2>&1 >/dev/null; then
17922 case "`$run ./try`" in
17923 "that's all right, then")
17929 yes) echo "It seems that you don't need va_copy()." >&4
17930 need_va_copy="$undef"
17932 *) echo "It seems that va_copy() or similar will be needed." >&4
17933 need_va_copy="$define"
17936 $rm -f try.* core core.* *.core *.core.*
17938 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
17942 : see what type is used for size_t
17943 rp="What is the type used for the length parameter for string functions?"
17944 set size_t sizetype 'unsigned int' stdio.h sys/types.h
17947 : check for type of arguments to gethostbyaddr.
17948 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
17949 case "$d_gethbyaddr" in
17953 Checking to see what type of arguments are accepted by gethostbyaddr().
17955 hdrs="$define sys/types.h
17956 $d_socket sys/socket.h
17957 $i_niin netinet/in.h
17959 $i_unistd unistd.h"
17960 : The first arg can 'char *' or 'void *'
17961 : The second arg is some of integral type
17962 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
17963 for yyy in size_t long int; do
17964 case "$netdb_host_type" in
17965 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
17966 if ./protochk "$try" $hdrs; then
17967 echo "Your system accepts $xxx for the first arg."
17968 echo "...and $yyy for the second arg."
17969 netdb_host_type="$xxx"
17970 netdb_hlen_type="$yyy"
17976 : In case none of those worked, prompt the user.
17977 case "$netdb_host_type" in
17978 '') rp='What is the type for the 1st argument to gethostbyaddr?'
17981 netdb_host_type=$ans
17982 rp='What is the type for the 2nd argument to gethostbyaddr?'
17985 netdb_hlen_type=$ans
17989 *) : no gethostbyaddr, so pick harmless defaults
17990 netdb_host_type='char *'
17991 netdb_hlen_type="$sizetype"
17994 # Remove the "const" if needed. -- but then we'll have a
17996 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
17999 : check for type of argument to gethostbyname.
18000 if test "X$netdb_name_type" = X ; then
18001 case "$d_gethbyname" in
18005 Checking to see what type of argument is accepted by gethostbyname().
18007 hdrs="$define sys/types.h
18008 $d_socket sys/socket.h
18009 $i_niin netinet/in.h
18011 $i_unistd unistd.h"
18012 for xxx in "const char *" "char *"; do
18013 case "$netdb_name_type" in
18014 '') try="extern struct hostent *gethostbyname($xxx);"
18015 if ./protochk "$try" $hdrs; then
18016 echo "Your system accepts $xxx."
18017 netdb_name_type="$xxx"
18022 : In case none of those worked, prompt the user.
18023 case "$netdb_name_type" in
18024 '') rp='What is the type for the 1st argument to gethostbyname?'
18027 netdb_name_type=$ans
18031 *) : no gethostbyname, so pick harmless default
18032 netdb_name_type='char *'
18037 : check for type of 1st argument to getnetbyaddr.
18038 if test "X$netdb_net_type" = X ; then
18039 case "$d_getnbyaddr" in
18043 Checking to see what type of 1st argument is accepted by getnetbyaddr().
18045 hdrs="$define sys/types.h
18046 $d_socket sys/socket.h
18047 $i_niin netinet/in.h
18049 $i_unistd unistd.h"
18050 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
18051 case "$netdb_net_type" in
18052 '') try="extern struct netent *getnetbyaddr($xxx, int);"
18053 if ./protochk "$try" $hdrs; then
18054 echo "Your system accepts $xxx."
18055 netdb_net_type="$xxx"
18060 : In case none of those worked, prompt the user.
18061 case "$netdb_net_type" in
18062 '') rp='What is the type for the 1st argument to getnetbyaddr?'
18065 netdb_net_type=$ans
18069 *) : no getnetbyaddr, so pick harmless default
18070 netdb_net_type='long'
18074 : locate the preferred pager for this system
18080 [a-zA-Z]:/*) dflt=$pg;;
18084 [a-zA-Z]:/*) dflt=$more;;
18088 [a-zA-Z]:/*) dflt=$less;;
18091 '') dflt=/usr/ucb/more;;
18098 rp='What pager is used on your system?'
18102 : see what type pids are declared as in the kernel
18103 rp="What is the type of process ids on this system?"
18104 set pid_t pidtype int stdio.h sys/types.h
18107 : Find earliest binary compatible site_perl subdirectory perl can use.
18108 case "$bincompat5005" in
18109 "$define") xs_apiversion='5.005' ;;
18110 *) xs_apiversion=$version ;; # The current site_perl version.
18112 : Find earliest pure perl site_perl subdirectory perl can use.
18113 : The versioned directories started at 5.005.
18114 pm_apiversion='5.005'
18116 : see if ar generates random libraries by itself
18118 echo "Checking how to generate random libraries on your machine..." >&4
18119 echo 'int bar1() { return bar2(); }' > bar1.c
18120 echo 'int bar2() { return 2; }' > bar2.c
18121 $cat > foo.c <<'EOP'
18122 int main() { printf("%d\n", bar1()); exit(0); }
18124 $cc $ccflags -c bar1.c >/dev/null 2>&1
18125 $cc $ccflags -c bar2.c >/dev/null 2>&1
18126 $cc $ccflags -c foo.c >/dev/null 2>&1
18127 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
18128 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18129 $run ./foobar >/dev/null 2>&1; then
18130 echo "$ar appears to generate random libraries itself."
18133 elif $ar ts bar$_a >/dev/null 2>&1 &&
18134 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18135 $run ./foobar >/dev/null 2>&1; then
18136 echo "a table of contents needs to be added with '$ar ts'."
18143 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
18144 $test -f $ranlib || ranlib=''
18147 if $test -n "$ranlib"; then
18148 echo "your system has '$ranlib'; we'll use that."
18151 echo "your system doesn't seem to support random libraries"
18152 echo "so we'll use lorder and tsort to order the libraries."
18159 : check for type of arguments to select.
18160 case "$selecttype" in
18161 '') case "$d_select" in
18165 Checking to see what type of arguments are accepted by select().
18167 hdrs="$define sys/types.h
18168 $i_systime sys/time.h
18169 $i_sysselct sys/select.h
18170 $d_socket sys/socket.h"
18171 : The first arg can be int, unsigned, or size_t
18172 : The last arg may or may not be 'const'
18174 : void pointer has been seen but using that
18175 : breaks the selectminbits test
18176 for xxx in 'fd_set *' 'int *'; do
18177 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
18178 for tmo in 'struct timeval *' 'const struct timeval *'; do
18180 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
18181 if ./protochk "$try" $hdrs; then
18182 echo "Your system accepts $xxx."
18191 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
18192 case "$d_fd_set" in
18193 $define) dflt="fd_set *" ;;
18202 *) : no select, so pick a harmless default
18209 : check for the select 'width'
18210 case "$selectminbits" in
18211 '') case "$d_select" in
18215 Checking to see on how many bits at a time your select() operates...
18218 #include <sys/types.h>
18220 #$i_systime I_SYS_TIME
18221 #$i_systimek I_SYS_TIME_KERNEL
18226 # ifdef I_SYS_TIME_KERNEL
18229 # include <sys/time.h>
18230 # ifdef I_SYS_TIME_KERNEL
18234 #$i_sysselct I_SYS_SELECT
18235 #ifdef I_SYS_SELECT
18236 #include <sys/select.h>
18238 #$d_socket HAS_SOCKET
18240 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
18244 #define S sizeof(*(b))
18246 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
18247 #define NBITS (NBYTES * 8)
18256 fp = fopen("try.c", "r");
18262 b = ($selecttype)s;
18263 for (i = 0; i < NBITS; i++)
18267 select(fd + 1, b, 0, 0, &t);
18268 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
18269 printf("%d\n", i + 1);
18274 if eval $compile_ok; then
18275 selectminbits=`$run ./try`
18276 case "$selectminbits" in
18278 Cannot figure out on how many bits at a time your select() operates.
18279 I'll play safe and guess it is 32 bits.
18285 *) bits="$selectminbits bits" ;;
18287 echo "Your select() operates on $bits at a time." >&4
18289 rp='What is the minimum number of bits your select() operates on?'
18290 case "$byteorder" in
18291 1234|12345678) dflt=32 ;;
18296 selectminbits="$val"
18300 *) : no select, so pick a harmless default
18307 : Trace out the files included by signal.h, then look for SIGxxx names.
18308 : Remove SIGARRAYSIZE used by HPUX.
18309 : Remove SIGSTKSIZE used by Linux.
18310 : Remove SIGSTKSZ used by Posix.
18311 : Remove SIGTYP void lines used by OS2.
18312 : Some cpps, like os390, dont give the file name anywhere
18313 if [ "X$fieldn" = X ]; then
18314 : Just make some guesses. We check them later.
18315 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
18317 xxx=`echo '#include <signal.h>' |
18318 $cppstdin $cppminus $cppflags 2>/dev/null |
18319 $grep '^[ ]*#.*include' |
18320 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
18322 : Check this list of files to be sure we have parsed the cpp output ok.
18323 : This will also avoid potentially non-existent files, such
18326 for xx in $xxx /dev/null ; do
18327 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
18329 : If we have found no files, at least try signal.h
18330 case "$xxxfiles" in
18331 '') xxxfiles=`./findhdr signal.h` ;;
18334 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
18335 print substr($2, 4, 20)
18337 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
18338 print substr($3, 4, 20)
18340 : Append some common names just in case the awk scan failed.
18341 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
18342 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
18343 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
18344 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
18345 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
18347 : generate a few handy files for later
18348 $cat > signal.c <<'EOCP'
18349 #include <sys/types.h>
18350 #include <signal.h>
18354 /* Strange style to avoid deeply-nested #if/#else/#endif */
18357 # define NSIG (_NSIG)
18363 # define NSIG (SIGMAX+1)
18369 # define NSIG (SIG_MAX+1)
18375 # define NSIG (MAXSIG+1)
18381 # define NSIG (MAX_SIG+1)
18386 # ifdef SIGARRAYSIZE
18387 # define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
18393 # define NSIG (_sys_nsig) /* Solaris 2.5 */
18397 /* Default to some arbitrary number that's big enough to get most
18398 of the common signals.
18404 printf("NSIG %d\n", NSIG);
18410 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
18412 printf "#ifdef SIG"; printf $1; printf "\n"
18413 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
18414 printf $1; printf ");\n"
18418 printf "#endif /* JUST_NSIG */\n";
18419 printf "exit(0);\n}\n";
18422 $cat >signal.awk <<'EOP'
18423 BEGIN { ndups = 0 }
18424 $1 ~ /^NSIG$/ { nsig = $2 }
18425 ($1 !~ /^NSIG$/) && (NF == 2) {
18426 if ($2 > maxsig) { maxsig = $2 }
18427 if (sig_name[$2]) {
18428 dup_name[ndups] = $1
18429 dup_num[ndups] = $2
18441 printf("NSIG %d\n", nsig);
18442 for (n = 1; n < nsig; n++) {
18444 printf("%s %d\n", sig_name[n], sig_num[n])
18447 printf("NUM%d %d\n", n, n)
18450 for (n = 0; n < ndups; n++) {
18451 printf("%s %d\n", dup_name[n], dup_num[n])
18455 $cat >signal_cmd <<EOS
18457 if $test -s signal.lst; then
18458 echo "Using your existing signal.lst file"
18463 $cat >>signal_cmd <<'EOS'
18466 if eval $compile_ok; then
18467 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst
18469 echo "(I can't seem be able to compile the whole test program)" >&4
18470 echo "(I'll try it in little pieces.)" >&4
18471 set signal -DJUST_NSIG
18472 if eval $compile_ok; then
18473 $run ./signal$_exe > signal.nsg
18476 echo "I can't seem to figure out how many signals you have." >&4
18477 echo "Guessing 50." >&4
18478 echo 'NSIG 50' > signal.nsg
18480 : Now look at all the signal names, one at a time.
18481 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
18482 $cat > signal.c <<EOCP
18483 #include <sys/types.h>
18484 #include <signal.h>
18487 printf("$xx %d\n", SIG${xx});
18492 if eval $compile; then
18493 echo "SIG${xx} found."
18494 $run ./signal$_exe >> signal.ls1
18496 echo "SIG${xx} NOT found."
18499 if $test -s signal.ls1; then
18500 $cat signal.nsg signal.ls1 |
18501 $sort -n | $uniq | $awk -f signal.awk >signal.lst
18505 if $test -s signal.lst; then
18508 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
18509 echo 'kill -l' >signal
18510 set X `csh -f <signal`
18514 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
18516 echo $@ | $tr ' ' $trnl | \
18517 $awk '{ printf "%s %d\n", $1, ++s; }
18518 END { printf "NSIG %d\n", ++s }' >signal.lst
18520 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
18522 chmod a+x signal_cmd
18523 $eunicefix signal_cmd
18525 : generate list of signal names
18527 case "$sig_name_init" in
18529 *) case "$sig_num_init" in
18530 ''|*,*) doinit=yes ;;
18535 echo "Generating a list of signal names and numbers..." >&4
18537 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
18538 sig_name=`$awk 'BEGIN { printf "ZERO " }
18539 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
18540 sig_num=`$awk 'BEGIN { printf "0 " }
18541 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
18542 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
18543 !/^NSIG/ { printf "\"%s\", ", $1 }
18544 END { printf "0\n" }' signal.lst`
18545 sig_num_init=`$awk 'BEGIN { printf "0, " }
18546 !/^NSIG/ { printf "%d, ", $2}
18547 END { printf "0\n"}' signal.lst`
18550 echo "The following $sig_count signals are available:"
18552 echo $sig_name | $awk \
18553 'BEGIN { linelen = 0 }
18555 for (i = 1; i <= NF; i++) {
18556 name = "SIG" $i " "
18557 linelen = linelen + length(name)
18558 if (linelen > 70) {
18560 linelen = length(name)
18566 sig_size=`echo $sig_name | awk '{print NF}'`
18567 $rm -f signal signal.c signal.awk signal.lst signal_cmd
18570 case "$sizetype" in
18571 *_t) zzz="$sizetype" ;;
18572 *) zzz="filesize" ;;
18574 echo "Checking the size of $zzz..." >&4
18576 #include <sys/types.h>
18579 printf("%d\n", (int)sizeof($sizetype));
18584 if eval $compile_ok; then
18588 echo "(I can't execute the test program--guessing $sizesize.)" >&4
18591 echo "Your $zzz size is $sizesize bytes."
18596 echo "(I can't compile the test program--guessing $sizesize.)" >&4
18600 : check for socklen_t
18602 echo "Checking to see if you have socklen_t..." >&4
18604 #include <sys/types.h>
18605 #$d_socket HAS_SOCKET
18607 #include <sys/socket.h>
18609 int main() { socklen_t x = 16; }
18612 if eval $compile; then
18614 echo "You have socklen_t."
18617 echo "You do not have socklen_t."
18618 case "$sizetype" in
18619 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
18626 : see if this is a socks.h system
18627 set socks.h i_socks
18630 : check for type of the size argument to socket calls
18631 case "$d_socket" in
18635 Checking to see what type is the last argument of accept().
18638 case "$d_socklen_t" in
18639 "$define") yyy="$yyy socklen_t"
18641 yyy="$yyy $sizetype int long unsigned"
18642 for xxx in $yyy; do
18643 case "$socksizetype" in
18644 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
18645 case "$usesocks" in
18647 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
18648 echo "Your system accepts '$xxx *' for the last argument of accept()."
18649 socksizetype="$xxx"
18652 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
18653 echo "Your system accepts '$xxx *' for the last argument of accept()."
18654 socksizetype="$xxx"
18661 : In case none of those worked, prompt the user.
18662 case "$socksizetype" in
18663 '') rp='What is the type for socket address structure sizes?'
18670 *) : no sockets, so pick relatively harmless default
18675 : see what type is used for signed size_t
18676 set ssize_t ssizetype int stdio.h sys/types.h
18681 #include <sys/types.h>
18682 #define Size_t $sizetype
18683 #define SSize_t $dflt
18686 if (sizeof(Size_t) == sizeof(SSize_t))
18688 else if (sizeof(Size_t) == sizeof(int))
18697 if eval $compile_ok && $run ./try > /dev/null; then
18698 ssizetype=`$run ./try`
18699 echo "I'll be using $ssizetype for functions returning a byte count." >&4
18702 Help! I can't compile and run the ssize_t test program: please enlighten me!
18703 (This is probably a misconfiguration in your system or libraries, and
18704 you really ought to fix it. Still, I'll try anyway.)
18706 I need a type that is the same size as $sizetype, but is guaranteed to
18707 be signed. Common values are ssize_t, int and long.
18710 rp="What signed type is the same size as $sizetype?"
18716 : see what type of char stdio uses.
18718 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
18719 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
18720 echo "Your stdio uses unsigned chars." >&4
18721 stdchar="unsigned char"
18723 echo "Your stdio uses signed chars." >&4
18730 : see if time exists
18732 if test "X$d_time" = X -o X"$timetype" = X; then
18733 if set time val -f d_time; eval $csym; $val; then
18734 echo 'time() found.' >&4
18736 rp="What is the type returned by time() on this system?"
18737 set time_t timetype long stdio.h sys/types.h
18740 echo 'time() not found, hope that will do.' >&4
18748 : see what type uids are declared as in the kernel
18750 echo "Looking for the type for user ids returned by getuid()."
18751 set uid_t uidtype xxx stdio.h sys/types.h
18755 xxx=`./findhdr sys/user.h`
18756 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
18758 unsigned) dflt="$1 $2" ;;
18762 *) dflt="$uidtype";;
18765 uid_t) echo "uid_t found." ;;
18766 *) rp="What is the type for user ids returned by getuid()?"
18774 *_t) zzz="$uidtype" ;;
18777 echo "Checking the size of $zzz..." >&4
18779 #include <sys/types.h>
18782 printf("%d\n", (int)sizeof($uidtype));
18787 if eval $compile_ok; then
18791 echo "(I can't execute the test program--guessing $uidsize.)" >&4
18794 echo "Your $zzz is $uidsize bytes long."
18799 echo "(I can't compile the test program--guessing $uidsize.)" >&4
18804 *_t) zzz="$uidtype" ;;
18807 echo "Checking the sign of $zzz..." >&4
18809 #include <sys/types.h>
18820 if eval $compile; then
18824 echo "(I can't execute the test program--guessing unsigned.)" >&4
18828 1) echo "Your $zzz is unsigned." ;;
18829 -1) echo "Your $zzz is signed." ;;
18835 echo "(I can't compile the test program--guessing unsigned.)" >&4
18841 $echo "Checking the format string to be used for uids..." >&4
18844 -1) if $test X"$uidsize" = X"$ivsize"; then
18845 uidformat="$ivdformat"
18847 if $test X"$uidsize" = X"$longsize"; then
18850 if $test X"$uidsize" = X"$intsize"; then
18853 if $test X"$uidsize" = X"$shortsize"; then
18860 *) if $test X"$uidsize" = X"$uvsize"; then
18861 uidformat="$uvuformat"
18863 if $test X"$uidsize" = X"$longsize"; then
18866 if $test X"$uidsize" = X"$intsize"; then
18869 if $test X"$uidsize" = X"$shortsize"; then
18878 : determine compiler compiler
18887 if $test -f "$byacc$_exe"; then
18889 comp="byacc or $comp"
18891 if $test -f "$bison$_exe"; then
18892 comp="$comp or bison -y"
18894 rp="Which compiler compiler ($comp) shall I use?"
18903 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
18909 : see if this is a fp.h system
18913 : see if this is a fp_class.h system
18914 set fp_class.h i_fp_class
18917 : see if this is a ieeefp.h system
18918 case "$i_ieeefp" in
18919 '' ) set ieeefp.h i_ieeefp
18924 : see if this is a libutil.h system
18925 set libutil.h i_libutil
18928 : see if mach cthreads are available
18929 if test "X$usethreads" = "X$define"; then
18930 set mach/cthreads.h i_machcthr
18933 i_machcthr="$undef"
18938 : see if this is a math.h system
18942 : see if this is a mntent.h system
18943 set mntent.h i_mntent
18946 : see if ndbm.h is available
18952 # Some Linux distributions such as RedHat 7.1 put the
18953 # ndbm.h header in /usr/include/gdbm/ndbm.h.
18954 if $test -f /usr/include/gdbm/ndbm.h; then
18955 echo '<gdbm/ndbm.h> found.'
18956 ccflags="$ccflags -I/usr/include/gdbm"
18957 cppflags="$cppflags -I/usr/include/gdbm"
18965 : see if dbm_open exists
18966 set dbm_open d_dbm_open
18968 case "$d_dbm_open" in
18971 echo "We won't be including <ndbm.h>"
18980 : see if net/errno.h is available
18982 set net/errno.h val
18985 : Unfortunately, it causes problems on some systems. Arrgh.
18988 cat > try.c <<'EOM'
18991 #include <net/errno.h>
18997 if $cc $ccflags -c try.c >/dev/null 2>&1; then
18998 echo "We'll be including <net/errno.h>." >&4
19000 echo "We won't be including <net/errno.h>." >&4
19009 : see if netinet/tcp.h is available
19010 set netinet/tcp.h i_netinettcp
19013 : see if this is a poll.h system
19017 : see if this is a prot.h system
19022 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
19023 $cat <<'EOSH' > Cppsym.know
19024 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
19025 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
19026 alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX
19027 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
19028 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
19029 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
19030 bull c cadmus clipper CMU COFF COMPILER_VERSION
19031 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
19032 CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
19033 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
19034 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
19036 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
19037 H3050R H3050RX hbullx20 hcx host_mips
19038 hp200 hp300 hp700 HP700 hp800 hp9000
19039 hp9000s200 hp9000s300 hp9000s400 hp9000s500
19040 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
19041 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
19042 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
19043 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
19044 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
19045 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
19046 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
19047 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
19048 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
19049 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
19050 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
19051 MATH_HAS_NO_SIDE_EFFECTS
19052 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
19053 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
19054 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
19055 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
19056 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
19057 NetBSD news1500 news1700 news1800 news1900 news3700
19058 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
19059 ns32016 ns32332 ns32k nsc32000
19060 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
19061 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
19062 pc532 pdp11 PGC PIC plexus PORTAR posix
19063 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
19064 POSIX_C_SOURCE POSIX_SOURCE POWER
19065 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
19066 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
19067 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
19068 sony sony_news sonyrisc sparc sparclite spectrum
19069 stardent stdc STDC_EXT stratos sun sun3 sun386
19070 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
19071 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
19072 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
19073 sysV68 sysV88 Tek4132 Tek4300 titan
19074 TM3200 TM5400 TM5600
19075 tower tower32 tower32_200 tower32_600 tower32_700
19076 tower32_800 tower32_850 tss
19077 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
19078 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
19079 unix UNIX95 UNIX99 unixpc unos
19080 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
19081 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
19082 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
19084 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
19085 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
19086 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
19089 # Maybe put other stuff here too.
19090 cat <<EOSH >>Cppsym.know
19093 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
19094 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
19095 $cat Cppsym.know > Cppsym.c
19096 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
19097 $rm -f Cppsym.a Cppsym.b Cppsym.c
19098 cat <<EOSH > Cppsym
19100 if $test \$# -gt 0; then
19101 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
19102 if $test -s Cppsym.got; then
19109 $tr " " "$trnl" | ./Cppsym.try
19115 cat <<EOSH > Cppsym.try
19117 cat <<'EOCP' > try.c
19123 cat <<'EOSH' >> Cppsym.try
19125 printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", (long)%s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
19126 printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", (long)_%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
19127 printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", (long)__%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
19128 printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", (long)__%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
19130 echo 'return 0;}' >> try.c
19132 cat <<EOSH >> Cppsym.try
19134 case "$osname-$gccversion" in
19135 irix-) ccflags="\$ccflags -woff 1178" ;;
19136 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
19138 $cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try
19140 chmod +x Cppsym.try
19141 $eunicefix Cppsym.try
19142 ./Cppsym < Cppsym.know > Cppsym.true
19143 : now check the C compiler for additional symbols
19144 postprocess_cc_v=''
19146 aix) postprocess_cc_v="|$tr , ' '" ;;
19153 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
19156 -D*) echo "\$i" | $sed 's/^-D//';;
19157 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
19162 postprocess_cc_v=''
19165 ./ccsym > ccsym1.raw
19166 if $test -s ccsym1.raw; then
19167 $sort ccsym1.raw | $uniq >ccsym.raw
19169 mv ccsym1.raw ccsym.raw
19172 $awk '/\=/ { print $0; next }
19173 { print $0"=1" }' ccsym.raw >ccsym.list
19174 $awk '/\=/ { print $0; next }
19175 { print $0"=1" }' Cppsym.true >ccsym.true
19176 $comm -13 ccsym.true ccsym.list >ccsym.own
19177 $comm -12 ccsym.true ccsym.list >ccsym.com
19178 $comm -23 ccsym.true ccsym.list >ccsym.cpp
19180 if $test -z ccsym.raw; then
19181 echo "Your C compiler doesn't seem to define any symbols!" >&4
19183 echo "However, your C preprocessor defines the following symbols:"
19186 cppsymbols=`$cat Cppsym.true`
19187 cppsymbols=`echo $cppsymbols`
19188 cppccsymbols="$cppsymbols"
19190 if $test -s ccsym.com; then
19191 echo "Your C compiler and pre-processor define these symbols:"
19192 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
19195 cppccsymbols=`$cat ccsym.com`
19196 cppccsymbols=`echo $cppccsymbols`
19197 $test "$silent" || sleep 1
19199 if $test -s ccsym.cpp; then
19200 $test "$also" && echo " "
19201 echo "Your C pre-processor ${also}defines the following symbols:"
19202 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
19204 cppsymbols=`$cat ccsym.cpp`
19205 cppsymbols=`echo $cppsymbols`
19206 $test "$silent" || sleep 1
19208 if $test -s ccsym.own; then
19209 $test "$also" && echo " "
19210 echo "Your C compiler ${also}defines the following cpp symbols:"
19211 $sed -e 's/\(..*\)=1/\1/' ccsym.own
19212 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
19213 ccsymbols=`$cat ccsym.own`
19214 ccsymbols=`echo $ccsymbols`
19215 $test "$silent" || sleep 1
19219 : see if this is a termio system
19223 if $test `./findhdr termios.h`; then
19224 set tcsetattr i_termios
19230 "$define") echo "You have POSIX termios.h... good!" >&4;;
19231 *) if ./Cppsym pyr; then
19232 case "`/bin/universe`" in
19233 ucb) if $test `./findhdr sgtty.h`; then
19235 echo "<sgtty.h> found." >&4
19237 echo "System is pyramid with BSD universe."
19238 echo "<sgtty.h> not found--you could have problems." >&4
19240 *) if $test `./findhdr termio.h`; then
19242 echo "<termio.h> found." >&4
19244 echo "System is pyramid with USG universe."
19245 echo "<termio.h> not found--you could have problems." >&4
19249 if $test `./findhdr termio.h`; then
19250 echo "<termio.h> found." >&4
19252 elif $test `./findhdr sgtty.h`; then
19253 echo "<sgtty.h> found." >&4
19256 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
19259 if $test `./findhdr sgtty.h`; then
19260 echo "<sgtty.h> found." >&4
19262 elif $test `./findhdr termio.h`; then
19263 echo "<termio.h> found." >&4
19266 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
19270 set i_termio; eval $setvar
19271 val=$val2; set i_sgtty; eval $setvar
19272 val=$val3; set i_termios; eval $setvar
19274 : see if stddef is available
19275 set stddef.h i_stddef
19278 : see if this is a sunmath.h system
19279 set sunmath.h i_sunmath
19282 : see if sys/access.h is available
19283 set sys/access.h i_sysaccess
19286 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
19287 set sys/filio.h i_sysfilio
19290 if $test `./findhdr sys/ioctl.h`; then
19292 echo '<sys/ioctl.h> found.' >&4
19295 if $test $i_sysfilio = "$define"; then
19296 echo '<sys/ioctl.h> NOT found.' >&4
19298 $test $i_sgtty = "$define" && xxx="sgtty.h"
19299 $test $i_termio = "$define" && xxx="termio.h"
19300 $test $i_termios = "$define" && xxx="termios.h"
19301 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
19307 : see if socket ioctl defs are in sys/sockio.h
19309 xxx=`./findhdr sys/sockio.h`
19310 if $test "$xxx"; then
19311 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
19313 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
19316 echo "No socket ioctls found in <sys/sockio.h>." >&4
19321 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
19328 : see if this is a syslog.h system
19329 set syslog.h i_syslog
19333 : see if this is a sys/mode.h system
19334 set sys/mode.h i_sysmode
19337 : see if sys/resource.h has to be included
19338 set sys/resource.h i_sysresrc
19341 : see if sys/security.h is available
19342 set sys/security.h i_syssecrt
19345 : see if this is a sys/statvfs.h system
19346 set sys/statvfs.h i_sysstatvfs
19349 : see if this is a sys/un.h system
19350 set sys/un.h i_sysun
19354 : see if this is a sys/utsname.h system
19355 set sys/utsname.h i_sysutsname
19358 : see if this is a syswait system
19359 set sys/wait.h i_syswait
19362 : see if this is a ustat.h system
19363 set ustat.h i_ustat
19366 : see if this is an utime system
19367 set utime.h i_utime
19370 : see if this is a values.h system
19371 set values.h i_values
19374 : see if this is a vfork system
19377 set vfork.h i_vfork
19385 : see if gdbm.h is available
19390 : see if gdbm_open exists
19391 set gdbm_open d_gdbm_open
19393 case "$d_gdbm_open" in
19396 echo "We won't be including <gdbm.h>"
19406 echo "Looking for extensions..." >&4
19407 : If we are using the old config.sh, known_extensions may contain
19408 : old or inaccurate or duplicate values.
19409 known_extensions=''
19410 nonxs_extensions=''
19411 : We do not use find because it might not be available.
19412 : We do not just use MANIFEST because the user may have dropped
19413 : some additional extensions into the source tree and expect them
19416 : Function to recursively find available extensions, ignoring DynaLoader
19417 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
19421 DynaLoader|dynaload) ;;
19423 if $test -f $xxx/$xxx.xs; then
19424 known_extensions="$known_extensions $1$xxx";
19425 elif $test -f $xxx/Makefile.PL; then
19426 nonxs_extensions="$nonxs_extensions $1$xxx";
19428 if $test -d $xxx -a $# -lt 10; then
19431 eval $find_extensions;
19443 eval $find_extensions
19444 # Special case: Add in threads/shared since it is not picked up by the
19445 # recursive find above (and adding in general recursive finding breaks
19446 # SDBM_File/sdbm). A.D. 10/25/2001.
19447 # Encode::XX need explicit mentions for the same reason.
19449 known_extensions="$known_extensions threads/shared Encode/CN Encode/JP Encode/KR Encode/TW"
19450 set X $nonxs_extensions
19452 nonxs_extensions="$*"
19453 set X $known_extensions
19455 known_extensions="$*"
19458 : Now see which are supported on this system.
19460 for xxx in $known_extensions ; do
19464 $define) avail_ext="$avail_ext $xxx" ;;
19467 GDBM_File|gdbm_fil)
19469 $define) avail_ext="$avail_ext $xxx" ;;
19472 I18N/Langinfo|i18n_lan)
19473 case "$i_langinfo$d_nl_langinfo" in
19474 $define$define) avail_ext="$avail_ext $xxx" ;;
19477 NDBM_File|ndbm_fil)
19480 case "$osname-$use64bitint" in
19481 cygwin-*|hpux-define)
19483 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
19486 *) avail_ext="$avail_ext $xxx" ;;
19491 ODBM_File|odbm_fil)
19492 case "${i_dbm}${i_rpcsvcdbm}" in
19494 case "$osname-$use64bitint" in
19495 cygwin-*|hpux-define)
19497 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
19500 *) avail_ext="$avail_ext $xxx" ;;
19506 case "$useposix" in
19507 true|define|y) avail_ext="$avail_ext $xxx" ;;
19511 case "$useopcode" in
19512 true|define|y) avail_ext="$avail_ext $xxx" ;;
19516 case "$d_socket" in
19519 beos) ;; # not unless BONE
19520 *) avail_ext="$avail_ext $xxx" ;;
19525 Sys/Syslog|sys/syslog)
19526 : XXX syslog requires socket
19527 case "$d_socket" in
19528 true|$define|y) avail_ext="$avail_ext $xxx" ;;
19532 case "$usethreads" in
19534 case "$useithreads" in
19535 $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
19539 threads|threads/shared)
19540 case "$usethreads" in
19542 case "$useithreads" in
19543 $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;;
19548 : XXX Do we need a useipcsysv variable here
19549 case "${d_msg}${d_sem}${d_shm}" in
19550 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
19553 *) avail_ext="$avail_ext $xxx"
19562 : Now see which nonxs extensions are supported on this system.
19563 : For now assume all are.
19565 for xxx in $nonxs_extensions ; do
19567 *) nonxs_ext="$nonxs_ext $xxx"
19579 A number of extensions are supplied with $package. You may choose to
19580 compile these extensions for dynamic loading (the default), compile
19581 them into the $package executable (static loading), or not include
19582 them at all. Answer "none" to include no extensions.
19583 Note that DynaLoader is always built and need not be mentioned here.
19586 case "$dynamic_ext" in
19587 '') dflt="$avail_ext" ;;
19588 *) dflt="$dynamic_ext"
19589 # Perhaps we are reusing an old out-of-date config.sh.
19592 if test X"$dynamic_ext" != X"$avail_ext"; then
19594 NOTICE: Your previous config.sh list may be incorrect.
19595 The extensions now available to you are
19597 but the default list from your previous config.sh is
19609 rp="What extensions do you wish to load dynamically?"
19612 none) dynamic_ext=' ' ;;
19613 *) dynamic_ext="$ans" ;;
19616 case "$static_ext" in
19618 : Exclude those already listed in dynamic linking
19620 for xxx in $avail_ext; do
19621 case " $dynamic_ext " in
19623 *) dflt="$dflt $xxx" ;;
19630 *) dflt="$static_ext"
19637 rp="What extensions do you wish to load statically?"
19640 none) static_ext=' ' ;;
19641 *) static_ext="$ans" ;;
19646 A number of extensions are supplied with $package. Answer "none"
19647 to include no extensions.
19648 Note that DynaLoader is always built and need not be mentioned here.
19651 case "$static_ext" in
19652 '') dflt="$avail_ext" ;;
19653 *) dflt="$static_ext"
19654 # Perhaps we are reusing an old out-of-date config.sh.
19657 if test X"$static_ext" != X"$avail_ext"; then
19659 NOTICE: Your previous config.sh list may be incorrect.
19660 The extensions now available to you are
19662 but the default list from your previous config.sh is
19671 : Exclude those that are not xs extensions
19675 rp="What extensions do you wish to include?"
19678 none) static_ext=' ' ;;
19679 *) static_ext="$ans" ;;
19684 set X $dynamic_ext $static_ext $nonxs_ext
19688 : Remove libraries needed only for extensions
19689 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
19690 : The exception is SunOS 4.x, which needs them.
19691 case "${osname}X${osvers}" in
19695 *) case "$usedl" in
19696 $define|true|[yY]*)
19697 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
19701 *) perllibs="$libs"
19707 : Remove build directory name from cppstdin so it can be used from
19708 : either the present location or the final installed location.
19710 : Get out of the UU directory to get correct path name.
19712 case "$cppstdin" in
19714 echo "Stripping down cppstdin path name"
19720 : end of configuration questions
19722 echo "End of configuration questions."
19725 : back to where it started
19726 if test -d ../UU; then
19730 : configuration may be patched via a 'config.arch' file
19731 if $test -f config.arch; then
19732 echo "I see a config.arch file, loading it."
19736 : configuration may be patched via a 'config.over' file
19737 if $test -f config.over; then
19740 rp='I see a config.over file. Do you wish to load it?'
19743 n*) echo "OK, I'll ignore it.";;
19745 echo "Configuration override changes have been loaded."
19750 : in case they want portability, strip down executable paths
19751 case "$d_portable" in
19754 echo "Stripping down executable paths..." >&4
19755 for file in $loclist $trylist; do
19757 eval $file=`basename $temp`
19762 : create config.sh file
19764 echo "Creating config.sh..." >&4
19765 $spitshell <<EOT >config.sh
19768 # This file was produced by running the Configure script. It holds all the
19769 # definitions figured out by Configure. Should you modify one of these values,
19770 # do not forget to propagate your changes by running "Configure -der". You may
19771 # instead choose to run each of the .SH files by yourself, or "Configure -S".
19774 # Package name : $package
19775 # Source directory : $src
19776 # Configuration time: $cf_time
19777 # Configured by : $cf_by
19778 # Target system : $myuname
19788 Revision='$Revision'
19796 alignbytes='$alignbytes'
19797 ansi2knr='$ansi2knr'
19798 aphostname='$aphostname'
19799 api_revision='$api_revision'
19800 api_subversion='$api_subversion'
19801 api_version='$api_version'
19802 api_versionstring='$api_versionstring'
19805 archlibexp='$archlibexp'
19806 archname64='$archname64'
19807 archname='$archname'
19808 archobjs='$archobjs'
19809 asctime_r_proto='$asctime_r_proto'
19814 bincompat5005='$bincompat5005'
19818 byteorder='$byteorder'
19820 castflags='$castflags'
19823 cccdlflags='$cccdlflags'
19824 ccdlflags='$ccdlflags'
19826 ccflags_uselargefiles='$ccflags_uselargefiles'
19828 ccsymbols='$ccsymbols'
19829 ccversion='$ccversion'
19831 cf_email='$cf_email'
19833 charsize='$charsize'
19837 clocktype='$clocktype'
19839 compress='$compress'
19840 contains='$contains'
19844 cpp_stuff='$cpp_stuff'
19845 cppccsymbols='$cppccsymbols'
19846 cppflags='$cppflags'
19848 cppminus='$cppminus'
19850 cppstdin='$cppstdin'
19851 cppsymbols='$cppsymbols'
19852 crypt_r_proto='$crypt_r_proto'
19853 cryptlib='$cryptlib'
19855 ctermid_r_proto='$ctermid_r_proto'
19856 ctime_r_proto='$ctime_r_proto'
19857 d_Gconvert='$d_Gconvert'
19858 d_PRIEUldbl='$d_PRIEUldbl'
19859 d_PRIFUldbl='$d_PRIFUldbl'
19860 d_PRIGUldbl='$d_PRIGUldbl'
19861 d_PRIXU64='$d_PRIXU64'
19862 d_PRId64='$d_PRId64'
19863 d_PRIeldbl='$d_PRIeldbl'
19864 d_PRIfldbl='$d_PRIfldbl'
19865 d_PRIgldbl='$d_PRIgldbl'
19866 d_PRIi64='$d_PRIi64'
19867 d_PRIo64='$d_PRIo64'
19868 d_PRIu64='$d_PRIu64'
19869 d_PRIx64='$d_PRIx64'
19870 d_SCNfldbl='$d_SCNfldbl'
19871 d__fwalk='$d__fwalk'
19872 d_access='$d_access'
19873 d_accessx='$d_accessx'
19875 d_archlib='$d_archlib'
19876 d_asctime_r='$d_asctime_r'
19879 d_attribut='$d_attribut'
19882 d_bincompat5005='$d_bincompat5005'
19884 d_bsdgetpgrp='$d_bsdgetpgrp'
19885 d_bsdsetpgrp='$d_bsdsetpgrp'
19887 d_casti32='$d_casti32'
19888 d_castneg='$d_castneg'
19889 d_charvspr='$d_charvspr'
19891 d_chroot='$d_chroot'
19892 d_chsize='$d_chsize'
19894 d_closedir='$d_closedir'
19895 d_cmsghdr_s='$d_cmsghdr_s'
19898 d_crypt_r='$d_crypt_r'
19900 d_ctermid_r='$d_ctermid_r'
19901 d_ctime_r='$d_ctime_r'
19902 d_cuserid='$d_cuserid'
19903 d_dbl_dig='$d_dbl_dig'
19904 d_dbminitproto='$d_dbminitproto'
19905 d_difftime='$d_difftime'
19907 d_dirnamlen='$d_dirnamlen'
19908 d_dlerror='$d_dlerror'
19909 d_dlopen='$d_dlopen'
19910 d_dlsymun='$d_dlsymun'
19911 d_dosuid='$d_dosuid'
19912 d_drand48_r='$d_drand48_r'
19913 d_drand48proto='$d_drand48proto'
19915 d_eaccess='$d_eaccess'
19916 d_endgrent='$d_endgrent'
19917 d_endgrent_r='$d_endgrent_r'
19918 d_endhent='$d_endhent'
19919 d_endhostent_r='$d_endhostent_r'
19920 d_endnent='$d_endnent'
19921 d_endnetent_r='$d_endnetent_r'
19922 d_endpent='$d_endpent'
19923 d_endprotoent_r='$d_endprotoent_r'
19924 d_endpwent='$d_endpwent'
19925 d_endpwent_r='$d_endpwent_r'
19926 d_endsent='$d_endsent'
19927 d_endservent_r='$d_endservent_r'
19928 d_eofnblk='$d_eofnblk'
19929 d_eunice='$d_eunice'
19930 d_fchdir='$d_fchdir'
19931 d_fchmod='$d_fchmod'
19932 d_fchown='$d_fchown'
19934 d_fcntl_can_lock='$d_fcntl_can_lock'
19935 d_fd_macros='$d_fd_macros'
19936 d_fd_set='$d_fd_set'
19937 d_fds_bits='$d_fds_bits'
19938 d_fgetpos='$d_fgetpos'
19939 d_finite='$d_finite'
19940 d_finitel='$d_finitel'
19941 d_flexfnam='$d_flexfnam'
19943 d_flockproto='$d_flockproto'
19945 d_fp_class='$d_fp_class'
19946 d_fpathconf='$d_fpathconf'
19947 d_fpclass='$d_fpclass'
19948 d_fpclassify='$d_fpclassify'
19949 d_fpclassl='$d_fpclassl'
19950 d_fpos64_t='$d_fpos64_t'
19951 d_frexpl='$d_frexpl'
19952 d_fs_data_s='$d_fs_data_s'
19953 d_fseeko='$d_fseeko'
19954 d_fsetpos='$d_fsetpos'
19955 d_fstatfs='$d_fstatfs'
19956 d_fstatvfs='$d_fstatvfs'
19958 d_ftello='$d_ftello'
19960 d_getcwd='$d_getcwd'
19961 d_getespwnam='$d_getespwnam'
19962 d_getfsstat='$d_getfsstat'
19963 d_getgrent='$d_getgrent'
19964 d_getgrent_r='$d_getgrent_r'
19965 d_getgrgid_r='$d_getgrgid_r'
19966 d_getgrnam_r='$d_getgrnam_r'
19967 d_getgrps='$d_getgrps'
19968 d_gethbyaddr='$d_gethbyaddr'
19969 d_gethbyname='$d_gethbyname'
19970 d_gethent='$d_gethent'
19971 d_gethname='$d_gethname'
19972 d_gethostbyaddr_r='$d_gethostbyaddr_r'
19973 d_gethostbyname_r='$d_gethostbyname_r'
19974 d_gethostent_r='$d_gethostent_r'
19975 d_gethostprotos='$d_gethostprotos'
19976 d_getitimer='$d_getitimer'
19977 d_getlogin='$d_getlogin'
19978 d_getlogin_r='$d_getlogin_r'
19979 d_getmnt='$d_getmnt'
19980 d_getmntent='$d_getmntent'
19981 d_getnbyaddr='$d_getnbyaddr'
19982 d_getnbyname='$d_getnbyname'
19983 d_getnent='$d_getnent'
19984 d_getnetbyaddr_r='$d_getnetbyaddr_r'
19985 d_getnetbyname_r='$d_getnetbyname_r'
19986 d_getnetent_r='$d_getnetent_r'
19987 d_getnetprotos='$d_getnetprotos'
19988 d_getpagsz='$d_getpagsz'
19989 d_getpbyname='$d_getpbyname'
19990 d_getpbynumber='$d_getpbynumber'
19991 d_getpent='$d_getpent'
19992 d_getpgid='$d_getpgid'
19993 d_getpgrp2='$d_getpgrp2'
19994 d_getpgrp='$d_getpgrp'
19995 d_getppid='$d_getppid'
19996 d_getprior='$d_getprior'
19997 d_getprotobyname_r='$d_getprotobyname_r'
19998 d_getprotobynumber_r='$d_getprotobynumber_r'
19999 d_getprotoent_r='$d_getprotoent_r'
20000 d_getprotoprotos='$d_getprotoprotos'
20001 d_getprpwnam='$d_getprpwnam'
20002 d_getpwent='$d_getpwent'
20003 d_getpwent_r='$d_getpwent_r'
20004 d_getpwnam_r='$d_getpwnam_r'
20005 d_getpwuid_r='$d_getpwuid_r'
20006 d_getsbyname='$d_getsbyname'
20007 d_getsbyport='$d_getsbyport'
20008 d_getsent='$d_getsent'
20009 d_getservbyname_r='$d_getservbyname_r'
20010 d_getservbyport_r='$d_getservbyport_r'
20011 d_getservent_r='$d_getservent_r'
20012 d_getservprotos='$d_getservprotos'
20013 d_getspnam='$d_getspnam'
20014 d_getspnam_r='$d_getspnam_r'
20015 d_gettimeod='$d_gettimeod'
20016 d_gmtime_r='$d_gmtime_r'
20017 d_gnulibc='$d_gnulibc'
20018 d_grpasswd='$d_grpasswd'
20019 d_hasmntopt='$d_hasmntopt'
20022 d_inetaton='$d_inetaton'
20023 d_int64_t='$d_int64_t'
20024 d_isascii='$d_isascii'
20025 d_isfinite='$d_isfinite'
20028 d_isnanl='$d_isnanl'
20029 d_killpg='$d_killpg'
20030 d_lchown='$d_lchown'
20031 d_ldbl_dig='$d_ldbl_dig'
20033 d_localtime_r='$d_localtime_r'
20034 d_locconv='$d_locconv'
20036 d_longdbl='$d_longdbl'
20037 d_longlong='$d_longlong'
20038 d_lseekproto='$d_lseekproto'
20040 d_madvise='$d_madvise'
20042 d_mbstowcs='$d_mbstowcs'
20043 d_mbtowc='$d_mbtowc'
20044 d_memchr='$d_memchr'
20045 d_memcmp='$d_memcmp'
20046 d_memcpy='$d_memcpy'
20047 d_memmove='$d_memmove'
20048 d_memset='$d_memset'
20050 d_mkdtemp='$d_mkdtemp'
20051 d_mkfifo='$d_mkfifo'
20052 d_mkstemp='$d_mkstemp'
20053 d_mkstemps='$d_mkstemps'
20054 d_mktime='$d_mktime'
20057 d_modfl_pow32_bug='$d_modfl_pow32_bug'
20058 d_mprotect='$d_mprotect'
20060 d_msg_ctrunc='$d_msg_ctrunc'
20061 d_msg_dontroute='$d_msg_dontroute'
20062 d_msg_oob='$d_msg_oob'
20063 d_msg_peek='$d_msg_peek'
20064 d_msg_proxy='$d_msg_proxy'
20065 d_msgctl='$d_msgctl'
20066 d_msgget='$d_msgget'
20067 d_msghdr_s='$d_msghdr_s'
20068 d_msgrcv='$d_msgrcv'
20069 d_msgsnd='$d_msgsnd'
20071 d_munmap='$d_munmap'
20072 d_mymalloc='$d_mymalloc'
20074 d_nl_langinfo='$d_nl_langinfo'
20075 d_nv_preserves_uv='$d_nv_preserves_uv'
20076 d_off64_t='$d_off64_t'
20077 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
20078 d_oldpthreads='$d_oldpthreads'
20079 d_oldsock='$d_oldsock'
20081 d_pathconf='$d_pathconf'
20083 d_perl_otherlibdirs='$d_perl_otherlibdirs'
20084 d_phostname='$d_phostname'
20087 d_portable='$d_portable'
20088 d_procselfexe='$d_procselfexe'
20089 d_pthread_atfork='$d_pthread_atfork'
20090 d_pthread_yield='$d_pthread_yield'
20092 d_pwchange='$d_pwchange'
20093 d_pwclass='$d_pwclass'
20094 d_pwcomment='$d_pwcomment'
20095 d_pwexpire='$d_pwexpire'
20096 d_pwgecos='$d_pwgecos'
20097 d_pwpasswd='$d_pwpasswd'
20098 d_pwquota='$d_pwquota'
20101 d_random_r='$d_random_r'
20102 d_readdir64_r='$d_readdir64_r'
20103 d_readdir='$d_readdir'
20104 d_readdir_r='$d_readdir_r'
20105 d_readlink='$d_readlink'
20107 d_recvmsg='$d_recvmsg'
20108 d_rename='$d_rename'
20109 d_rewinddir='$d_rewinddir'
20111 d_safebcpy='$d_safebcpy'
20112 d_safemcpy='$d_safemcpy'
20113 d_sanemcmp='$d_sanemcmp'
20114 d_sbrkproto='$d_sbrkproto'
20115 d_sched_yield='$d_sched_yield'
20116 d_scm_rights='$d_scm_rights'
20117 d_seekdir='$d_seekdir'
20118 d_select='$d_select'
20120 d_semctl='$d_semctl'
20121 d_semctl_semid_ds='$d_semctl_semid_ds'
20122 d_semctl_semun='$d_semctl_semun'
20123 d_semget='$d_semget'
20125 d_sendmsg='$d_sendmsg'
20126 d_setegid='$d_setegid'
20127 d_seteuid='$d_seteuid'
20128 d_setgrent='$d_setgrent'
20129 d_setgrent_r='$d_setgrent_r'
20130 d_setgrps='$d_setgrps'
20131 d_sethent='$d_sethent'
20132 d_sethostent_r='$d_sethostent_r'
20133 d_setitimer='$d_setitimer'
20134 d_setlinebuf='$d_setlinebuf'
20135 d_setlocale='$d_setlocale'
20136 d_setlocale_r='$d_setlocale_r'
20137 d_setnent='$d_setnent'
20138 d_setnetent_r='$d_setnetent_r'
20139 d_setpent='$d_setpent'
20140 d_setpgid='$d_setpgid'
20141 d_setpgrp2='$d_setpgrp2'
20142 d_setpgrp='$d_setpgrp'
20143 d_setprior='$d_setprior'
20144 d_setproctitle='$d_setproctitle'
20145 d_setprotoent_r='$d_setprotoent_r'
20146 d_setpwent='$d_setpwent'
20147 d_setpwent_r='$d_setpwent_r'
20148 d_setregid='$d_setregid'
20149 d_setresgid='$d_setresgid'
20150 d_setresuid='$d_setresuid'
20151 d_setreuid='$d_setreuid'
20152 d_setrgid='$d_setrgid'
20153 d_setruid='$d_setruid'
20154 d_setsent='$d_setsent'
20155 d_setservent_r='$d_setservent_r'
20156 d_setsid='$d_setsid'
20157 d_setvbuf='$d_setvbuf'
20161 d_shmatprototype='$d_shmatprototype'
20162 d_shmctl='$d_shmctl'
20164 d_shmget='$d_shmget'
20165 d_sigaction='$d_sigaction'
20166 d_sigprocmask='$d_sigprocmask'
20167 d_sigsetjmp='$d_sigsetjmp'
20168 d_sockatmark='$d_sockatmark'
20169 d_sockatmarkproto='$d_sockatmarkproto'
20170 d_socket='$d_socket'
20171 d_socklen_t='$d_socklen_t'
20172 d_sockpair='$d_sockpair'
20173 d_socks5_init='$d_socks5_init'
20175 d_srand48_r='$d_srand48_r'
20176 d_srandom_r='$d_srandom_r'
20177 d_sresgproto='$d_sresgproto'
20178 d_sresuproto='$d_sresuproto'
20179 d_statblks='$d_statblks'
20180 d_statfs_f_flags='$d_statfs_f_flags'
20181 d_statfs_s='$d_statfs_s'
20182 d_statvfs='$d_statvfs'
20183 d_stdio_cnt_lval='$d_stdio_cnt_lval'
20184 d_stdio_ptr_lval='$d_stdio_ptr_lval'
20185 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
20186 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
20187 d_stdio_stream_array='$d_stdio_stream_array'
20188 d_stdiobase='$d_stdiobase'
20189 d_stdstdio='$d_stdstdio'
20190 d_strchr='$d_strchr'
20191 d_strcoll='$d_strcoll'
20192 d_strctcpy='$d_strctcpy'
20193 d_strerrm='$d_strerrm'
20194 d_strerror='$d_strerror'
20195 d_strerror_r='$d_strerror_r'
20196 d_strftime='$d_strftime'
20197 d_strtod='$d_strtod'
20198 d_strtol='$d_strtol'
20199 d_strtold='$d_strtold'
20200 d_strtoll='$d_strtoll'
20201 d_strtoq='$d_strtoq'
20202 d_strtoul='$d_strtoul'
20203 d_strtoull='$d_strtoull'
20204 d_strtouq='$d_strtouq'
20205 d_strxfrm='$d_strxfrm'
20206 d_suidsafe='$d_suidsafe'
20207 d_symlink='$d_symlink'
20208 d_syscall='$d_syscall'
20209 d_syscallproto='$d_syscallproto'
20210 d_sysconf='$d_sysconf'
20211 d_sysernlst='$d_sysernlst'
20212 d_syserrlst='$d_syserrlst'
20213 d_system='$d_system'
20214 d_tcgetpgrp='$d_tcgetpgrp'
20215 d_tcsetpgrp='$d_tcsetpgrp'
20216 d_telldir='$d_telldir'
20217 d_telldirproto='$d_telldirproto'
20220 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
20221 d_tm_tm_zone='$d_tm_tm_zone'
20222 d_tmpnam_r='$d_tmpnam_r'
20223 d_truncate='$d_truncate'
20224 d_ttyname_r='$d_ttyname_r'
20225 d_tzname='$d_tzname'
20226 d_u32align='$d_u32align'
20227 d_ualarm='$d_ualarm'
20230 d_union_semun='$d_union_semun'
20231 d_unordered='$d_unordered'
20232 d_usleep='$d_usleep'
20233 d_usleepproto='$d_usleepproto'
20235 d_vendorarch='$d_vendorarch'
20236 d_vendorbin='$d_vendorbin'
20237 d_vendorlib='$d_vendorlib'
20239 d_void_closedir='$d_void_closedir'
20240 d_voidsig='$d_voidsig'
20241 d_voidtty='$d_voidtty'
20242 d_volatile='$d_volatile'
20243 d_vprintf='$d_vprintf'
20245 d_waitpid='$d_waitpid'
20246 d_wcstombs='$d_wcstombs'
20247 d_wctomb='$d_wctomb'
20248 d_writev='$d_writev'
20251 db_hashtype='$db_hashtype'
20252 db_prefixtype='$db_prefixtype'
20253 db_version_major='$db_version_major'
20254 db_version_minor='$db_version_minor'
20255 db_version_patch='$db_version_patch'
20256 defvoidused='$defvoidused'
20257 direntrytype='$direntrytype'
20260 doublesize='$doublesize'
20262 drand48_r_proto='$drand48_r_proto'
20263 dynamic_ext='$dynamic_ext'
20269 endgrent_r_proto='$endgrent_r_proto'
20270 endhostent_r_proto='$endhostent_r_proto'
20271 endnetent_r_proto='$endnetent_r_proto'
20272 endprotoent_r_proto='$endprotoent_r_proto'
20273 endpwent_r_proto='$endpwent_r_proto'
20274 endservent_r_proto='$endservent_r_proto'
20275 eunicefix='$eunicefix'
20278 extensions='$extensions'
20280 fflushNULL='$fflushNULL'
20281 fflushall='$fflushall'
20283 firstmakefile='$firstmakefile'
20285 fpossize='$fpossize'
20286 fpostype='$fpostype'
20287 freetype='$freetype'
20290 full_csh='$full_csh'
20291 full_sed='$full_sed'
20292 gccosandvers='$gccosandvers'
20293 gccversion='$gccversion'
20294 getgrent_r_proto='$getgrent_r_proto'
20295 getgrgid_r_proto='$getgrgid_r_proto'
20296 getgrnam_r_proto='$getgrnam_r_proto'
20297 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
20298 gethostbyname_r_proto='$gethostbyname_r_proto'
20299 gethostent_r_proto='$gethostent_r_proto'
20300 getlogin_r_proto='$getlogin_r_proto'
20301 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
20302 getnetbyname_r_proto='$getnetbyname_r_proto'
20303 getnetent_r_proto='$getnetent_r_proto'
20304 getprotobyname_r_proto='$getprotobyname_r_proto'
20305 getprotobynumber_r_proto='$getprotobynumber_r_proto'
20306 getprotoent_r_proto='$getprotoent_r_proto'
20307 getpwent_r_proto='$getpwent_r_proto'
20308 getpwnam_r_proto='$getpwnam_r_proto'
20309 getpwuid_r_proto='$getpwuid_r_proto'
20310 getservbyname_r_proto='$getservbyname_r_proto'
20311 getservbyport_r_proto='$getservbyport_r_proto'
20312 getservent_r_proto='$getservent_r_proto'
20313 getspnam_r_proto='$getspnam_r_proto'
20314 gidformat='$gidformat'
20320 gmtime_r_proto='$gmtime_r_proto'
20322 groupcat='$groupcat'
20323 groupstype='$groupstype'
20326 h_sysfile='$h_sysfile'
20337 i_arpainet='$i_arpainet'
20338 i_bsdioctl='$i_bsdioctl'
20342 i_dirent='$i_dirent'
20348 i_fp_class='$i_fp_class'
20351 i_ieeefp='$i_ieeefp'
20352 i_inttypes='$i_inttypes'
20353 i_langinfo='$i_langinfo'
20354 i_libutil='$i_libutil'
20355 i_limits='$i_limits'
20356 i_locale='$i_locale'
20357 i_machcthr='$i_machcthr'
20358 i_malloc='$i_malloc'
20360 i_memory='$i_memory'
20361 i_mntent='$i_mntent'
20364 i_neterrno='$i_neterrno'
20365 i_netinettcp='$i_netinettcp'
20369 i_pthread='$i_pthread'
20371 i_rpcsvcdbm='$i_rpcsvcdbm'
20374 i_shadow='$i_shadow'
20376 i_stdarg='$i_stdarg'
20377 i_stddef='$i_stddef'
20378 i_stdlib='$i_stdlib'
20379 i_string='$i_string'
20380 i_sunmath='$i_sunmath'
20381 i_sysaccess='$i_sysaccess'
20382 i_sysdir='$i_sysdir'
20383 i_sysfile='$i_sysfile'
20384 i_sysfilio='$i_sysfilio'
20386 i_sysioctl='$i_sysioctl'
20387 i_syslog='$i_syslog'
20388 i_sysmman='$i_sysmman'
20389 i_sysmode='$i_sysmode'
20390 i_sysmount='$i_sysmount'
20391 i_sysndir='$i_sysndir'
20392 i_sysparam='$i_sysparam'
20393 i_sysresrc='$i_sysresrc'
20394 i_syssecrt='$i_syssecrt'
20395 i_sysselct='$i_sysselct'
20396 i_syssockio='$i_syssockio'
20397 i_sysstat='$i_sysstat'
20398 i_sysstatfs='$i_sysstatfs'
20399 i_sysstatvfs='$i_sysstatvfs'
20400 i_systime='$i_systime'
20401 i_systimek='$i_systimek'
20402 i_systimes='$i_systimes'
20403 i_systypes='$i_systypes'
20404 i_sysuio='$i_sysuio'
20406 i_sysutsname='$i_sysutsname'
20407 i_sysvfs='$i_sysvfs'
20408 i_syswait='$i_syswait'
20409 i_termio='$i_termio'
20410 i_termios='$i_termios'
20412 i_unistd='$i_unistd'
20415 i_values='$i_values'
20416 i_varargs='$i_varargs'
20417 i_varhdr='$i_varhdr'
20419 ignore_versioned_solibs='$ignore_versioned_solibs'
20420 inc_version_list='$inc_version_list'
20421 inc_version_list_init='$inc_version_list_init'
20424 installarchlib='$installarchlib'
20425 installbin='$installbin'
20426 installman1dir='$installman1dir'
20427 installman3dir='$installman3dir'
20428 installprefix='$installprefix'
20429 installprefixexp='$installprefixexp'
20430 installprivlib='$installprivlib'
20431 installscript='$installscript'
20432 installsitearch='$installsitearch'
20433 installsitebin='$installsitebin'
20434 installsitelib='$installsitelib'
20435 installstyle='$installstyle'
20436 installusrbinperl='$installusrbinperl'
20437 installvendorarch='$installvendorarch'
20438 installvendorbin='$installvendorbin'
20439 installvendorlib='$installvendorlib'
20441 issymlink='$issymlink'
20442 ivdformat='$ivdformat'
20445 known_extensions='$known_extensions'
20448 lddlflags='$lddlflags'
20450 ldflags_uselargefiles='$ldflags_uselargefiles'
20451 ldlibpthname='$ldlibpthname'
20458 libsdirs='$libsdirs'
20459 libsfiles='$libsfiles'
20460 libsfound='$libsfound'
20461 libspath='$libspath'
20462 libswanted='$libswanted'
20463 libswanted_uselargefiles='$libswanted_uselargefiles'
20469 localtime_r_proto='$localtime_r_proto'
20470 locincpth='$locincpth'
20471 loclibpth='$loclibpth'
20472 longdblsize='$longdblsize'
20473 longlongsize='$longlongsize'
20474 longsize='$longsize'
20478 lseeksize='$lseeksize'
20479 lseektype='$lseektype'
20483 make_set_make='$make_set_make'
20484 mallocobj='$mallocobj'
20485 mallocsrc='$mallocsrc'
20486 malloctype='$malloctype'
20488 man1direxp='$man1direxp'
20491 man3direxp='$man3direxp'
20493 mips_type='$mips_type'
20495 mmaptype='$mmaptype'
20496 modetype='$modetype'
20498 multiarch='$multiarch'
20500 myarchname='$myarchname'
20501 mydomain='$mydomain'
20502 myhostname='$myhostname'
20505 need_va_copy='$need_va_copy'
20506 netdb_hlen_type='$netdb_hlen_type'
20507 netdb_host_type='$netdb_host_type'
20508 netdb_name_type='$netdb_name_type'
20509 netdb_net_type='$netdb_net_type'
20512 nm_so_opt='$nm_so_opt'
20513 nonxs_ext='$nonxs_ext'
20515 nvEUformat='$nvEUformat'
20516 nvFUformat='$nvFUformat'
20517 nvGUformat='$nvGUformat'
20518 nv_preserves_uv_bits='$nv_preserves_uv_bits'
20519 nveformat='$nveformat'
20520 nvfformat='$nvfformat'
20521 nvgformat='$nvgformat'
20524 o_nonblock='$o_nonblock'
20526 old_pthread_create_joinable='$old_pthread_create_joinable'
20527 optimize='$optimize'
20528 orderlib='$orderlib'
20531 otherlibdirs='$otherlibdirs'
20535 patchlevel='$patchlevel'
20536 path_sep='$path_sep'
20539 perl_patchlevel='$perl_patchlevel'
20540 perladmin='$perladmin'
20541 perllibs='$perllibs'
20542 perlpath='$perlpath'
20544 phostname='$phostname'
20547 pm_apiversion='$pm_apiversion'
20551 prefixexp='$prefixexp'
20553 privlibexp='$privlibexp'
20554 procselfexe='$procselfexe'
20555 prototype='$prototype'
20557 quadkind='$quadkind'
20558 quadtype='$quadtype'
20559 randbits='$randbits'
20560 randfunc='$randfunc'
20561 random_r_proto='$random_r_proto'
20562 randseedtype='$randseedtype'
20564 rd_nodata='$rd_nodata'
20565 readdir64_r_proto='$readdir64_r_proto'
20566 readdir_r_proto='$readdir_r_proto'
20567 revision='$revision'
20572 sPRIEUldbl='$sPRIEUldbl'
20573 sPRIFUldbl='$sPRIFUldbl'
20574 sPRIGUldbl='$sPRIGUldbl'
20575 sPRIXU64='$sPRIXU64'
20577 sPRIeldbl='$sPRIeldbl'
20578 sPRIfldbl='$sPRIfldbl'
20579 sPRIgldbl='$sPRIgldbl'
20584 sSCNfldbl='$sSCNfldbl'
20585 sched_yield='$sched_yield'
20586 scriptdir='$scriptdir'
20587 scriptdirexp='$scriptdirexp'
20589 seedfunc='$seedfunc'
20590 selectminbits='$selectminbits'
20591 selecttype='$selecttype'
20592 sendmail='$sendmail'
20593 setgrent_r_proto='$setgrent_r_proto'
20594 sethostent_r_proto='$sethostent_r_proto'
20595 setlocale_r_proto='$setlocale_r_proto'
20596 setnetent_r_proto='$setnetent_r_proto'
20597 setprotoent_r_proto='$setprotoent_r_proto'
20598 setpwent_r_proto='$setpwent_r_proto'
20599 setservent_r_proto='$setservent_r_proto'
20602 sharpbang='$sharpbang'
20603 shmattype='$shmattype'
20604 shortsize='$shortsize'
20607 sig_count='$sig_count'
20608 sig_name='$sig_name'
20609 sig_name_init='$sig_name_init'
20611 sig_num_init='$sig_num_init'
20612 sig_size='$sig_size'
20613 signal_t='$signal_t'
20614 sitearch='$sitearch'
20615 sitearchexp='$sitearchexp'
20617 sitebinexp='$sitebinexp'
20619 sitelib_stem='$sitelib_stem'
20620 sitelibexp='$sitelibexp'
20621 siteprefix='$siteprefix'
20622 siteprefixexp='$siteprefixexp'
20623 sizesize='$sizesize'
20624 sizetype='$sizetype'
20628 sockethdr='$sockethdr'
20629 socketlib='$socketlib'
20630 socksizetype='$socksizetype'
20632 spackage='$spackage'
20633 spitshell='$spitshell'
20634 srand48_r_proto='$srand48_r_proto'
20635 srandom_r_proto='$srandom_r_proto'
20637 ssizetype='$ssizetype'
20638 startperl='$startperl'
20640 static_ext='$static_ext'
20642 stdio_base='$stdio_base'
20643 stdio_bufsiz='$stdio_bufsiz'
20644 stdio_cnt='$stdio_cnt'
20645 stdio_filbuf='$stdio_filbuf'
20646 stdio_ptr='$stdio_ptr'
20647 stdio_stream_array='$stdio_stream_array'
20648 strerror_r_proto='$strerror_r_proto'
20651 subversion='$subversion'
20655 targetarch='$targetarch'
20659 timeincl='$timeincl'
20660 timetype='$timetype'
20661 tmpnam_r_proto='$tmpnam_r_proto'
20667 ttyname_r_proto='$ttyname_r_proto'
20676 uidformat='$uidformat'
20682 uquadtype='$uquadtype'
20683 use5005threads='$use5005threads'
20684 use64bitall='$use64bitall'
20685 use64bitint='$use64bitint'
20686 usecrosscompile='$usecrosscompile'
20688 useithreads='$useithreads'
20689 uselargefiles='$uselargefiles'
20690 uselongdouble='$uselongdouble'
20691 usemorebits='$usemorebits'
20692 usemultiplicity='$usemultiplicity'
20693 usemymalloc='$usemymalloc'
20695 useopcode='$useopcode'
20696 useperlio='$useperlio'
20697 useposix='$useposix'
20698 usereentrant='$usereentrant'
20700 useshrplib='$useshrplib'
20701 usesocks='$usesocks'
20702 usethreads='$usethreads'
20703 usevendorprefix='$usevendorprefix'
20704 usevfork='$usevfork'
20707 uvXUformat='$uvXUformat'
20708 uvoformat='$uvoformat'
20711 uvuformat='$uvuformat'
20712 uvxformat='$uvxformat'
20713 vendorarch='$vendorarch'
20714 vendorarchexp='$vendorarchexp'
20715 vendorbin='$vendorbin'
20716 vendorbinexp='$vendorbinexp'
20717 vendorlib='$vendorlib'
20718 vendorlib_stem='$vendorlib_stem'
20719 vendorlibexp='$vendorlibexp'
20720 vendorprefix='$vendorprefix'
20721 vendorprefixexp='$vendorprefixexp'
20723 version_patchlevel_string='$version_patchlevel_string'
20724 versiononly='$versiononly'
20726 voidflags='$voidflags'
20728 xs_apiversion='$xs_apiversion'
20730 yaccflags='$yaccflags'
20735 : Add in command line options if available
20736 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
20738 : add special variables
20739 $test -f $src/patchlevel.h && \
20740 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
20741 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
20742 echo "PERL_CONFIG_SH=true" >>config.sh
20744 : propagate old symbols
20745 if $test -f UU/config.sh; then
20746 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
20747 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
20748 $sort | $uniq -u >UU/oldsyms
20749 set X `cat UU/oldsyms`
20755 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
20757 echo "# Variables propagated from previous config.sh file." >>config.sh
20758 for sym in `cat UU/oldsyms`; do
20759 echo " Propagating $hint variable "'$'"$sym..."
20760 eval 'tmp="$'"${sym}"'"'
20762 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
20768 : Finish up by extracting the .SH files
20772 echo "Extraction done."
20782 If you'd like to make any changes to the config.sh file before I begin
20783 to configure things, do it as a shell escape now (e.g. !vi config.sh).
20786 rp="Press return or use a shell escape to edit config.sh:"
20791 *) : in case they cannot read
20792 sh 1>&4 -c "$ans";;
20797 : if this fails, just run all the .SH files by hand
20806 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
20813 Now you need to generate make dependencies by running "$make depend".
20814 You might prefer to run it in background: "$make depend > makedepend.out &"
20815 It can take a while, so you might not want to run it right now.
20820 rp="Run $make depend now?"
20824 $make depend && echo "Now you must run '$make'."
20827 echo "You must run '$make depend' then '$make'."
20830 elif test -f [Mm]akefile; then
20832 echo "Now you must run a $make."
20834 echo "Configure done."
20837 if $test -f Policy.sh; then
20840 If you compile $package on a different machine or from a different object
20841 directory, copy the Policy.sh file from this object directory to the
20842 new one before you run Configure -- this will help you with most of
20843 the policy defaults.
20847 if $test -f config.msg; then
20848 echo "Hmm. I also noted the following information while running:"
20850 $cat config.msg >&4
20853 $rm -f kit*isdone ark*isdone