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 Fri Mar 29 18:09:14 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;
2391 if $test -f usethreads.cbu; then
2394 *** However, any setting of the C compiler flags (e.g. for thread support)
2395 *** has been lost. It may be necessary to pass -Dcc=gcc to Configure
2396 *** (together with e.g. -Dusethreads).
2412 cat <<'EOSC' >>checkcc
2417 int main(int argc, char *argv[]) {
2421 if $cc -o try $ccflags $ldflags try.c; then
2424 if $test X"$despair" = Xyes; then
2425 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2428 You need to find a working C compiler.
2429 Either (purchase and) install the C compiler supplied by your OS vendor,
2430 or for a free C compiler try http://gcc.gnu.org/
2431 I cannot continue any further, aborting.
2440 : determine whether symbolic links are supported
2443 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2444 echo "Symbolic links are supported." >&4
2447 echo "Symbolic links are NOT supported." >&4
2452 : determine whether symbolic links are supported
2456 echo "Checking how to test for symbolic links..." >&4
2458 if $test "X$issymlink" = X; then
2460 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2461 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2463 if test $? = 0; then
2466 echo "Your builtin 'test -h' may be broken." >&4
2469 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2472 if test -f "$p/$test"; then
2481 echo "Trying external '$test -h'." >&4
2482 issymlink="$test -h"
2483 if $test ! -h sym >/dev/null 2>&1; then
2484 echo "External '$test -h' is broken, too." >&4
2492 if $test "X$issymlink" = X; then
2493 if $test -L sym 2>/dev/null; then
2494 issymlink="$test -L"
2495 echo "The builtin '$test -L' worked." >&4
2498 if $test "X$issymlink" != X; then
2499 echo "You can test for symbolic links with '$issymlink'." >&4
2501 echo "I do not know how you can test for symbolic links." >&4
2505 *) echo "No symbolic links, so not testing for their testing..." >&4
2511 case "$mksymlinks" in
2514 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2517 *) case "$lns:$issymlink" in
2518 *"ln"*" -s:"*"test -"?)
2519 echo "Creating the symbolic links..." >&4
2520 echo "(First creating the subdirectories...)" >&4
2522 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2524 test -z "$directory" && break
2528 if test ! -d t/base; then
2529 echo "Failed to create the subdirectories. Aborting." >&4
2532 echo "(Then creating the symlinks...)" >&4
2533 awk '{print $1}' $src/MANIFEST | while true; do
2535 test -z "$filename" && break
2536 if test -f $filename; then
2537 if $issymlink $filename; then
2541 if test -f $filename; then
2542 echo "$filename already exists, not symlinking."
2544 ln -s $src/$filename $filename
2548 if test ! -f t/base/lex.t; then
2549 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2554 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2563 case "$usecrosscompile" in
2565 $echo "Cross-compiling..."
2568 *-*-gcc) # A cross-compiling gcc, probably.
2569 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2571 # leave out ld, choosing it is more complex
2573 ranlib=$targetarch-ranlib
2574 $echo 'extern int foo;' > try.c
2575 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2577 if $test $# -gt 0; then
2579 incpth="`$echo $incpth|$sed 's/^ //'`"
2580 echo "Guessing incpth '$incpth'." >&4
2582 j="`$echo $i|$sed 's,/include$,/lib,'`"
2583 if $test -d $j; then
2587 libpth="`$echo $libpth|$sed 's/^ //'`"
2588 echo "Guessing libpth '$libpth'." >&4
2593 case "$targetarch" in
2594 '') echo "Targetarch not defined." >&4; croak=y ;;
2595 *) echo "Using targetarch $targetarch." >&4 ;;
2598 '') echo "Incpth not defined." >&4; croak=y ;;
2599 *) echo "Using incpth '$incpth'." >&4 ;;
2602 '') echo "Libpth not defined." >&4; croak=y ;;
2603 *) echo "Using libpth '$libpth'." >&4 ;;
2606 '') for i in $incpth; do
2607 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2609 echo "Guessing usrinc $usrinc." >&4
2614 '') echo "Usrinc not defined." >&4; croak=y ;;
2617 *) echo "Using usrinc $usrinc." >&4 ;;
2619 case "$targethost" in
2620 '') echo "Targethost not defined." >&4; croak=y ;;
2621 *) echo "Using targethost $targethost." >&4
2626 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2629 /*) run=$src/Cross/run
2630 targetmkdir=$src/Cross/mkdir
2632 from=$src/Cross/from
2634 *) pwd=`$test -f ../Configure & cd ..; pwd`
2636 targetmkdir=$pwd/Cross/mkdir
2638 from=$pwd/Cross/from
2641 case "$targetrun" in
2642 '') targetrun=ssh ;;
2647 case "$targetfrom" in
2648 '') targetfrom=scp ;;
2652 from=$from-$targetfrom
2653 case "$targetdir" in
2655 echo "Guessing targetdir $targetdir." >&4
2658 case "$targetuser" in
2660 echo "Guessing targetuser $targetuser." >&4
2663 case "$targetfrom" in
2667 case "$targetrun" in
2679 '') cwd=$targetdir ;;
2683 if $test ! -f \$exe.xok; then
2687 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2690 *) echo "Unknown targetrun '$targetrun'" >&4
2694 case "$targetmkdir" in
2696 cat >$targetmkdir <<EOF
2698 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2700 $chmod a+rx $targetmkdir
2702 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2714 $targetmkdir \`dirname \$f\`
2715 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2718 $targetmkdir $targetdir/\`dirname \$f\`
2719 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2732 $mkdir -p $targetdir/\`dirname \$f\`
2733 $cp \$f $targetdir/\$f || exit 1
2736 $targetmkdir $targetdir/\`dirname \$f\`
2737 $cp \$f $targetdir/\$f || exit 1
2744 *) echo "Unknown targetto '$targetto'" >&4
2748 case "$targetfrom" in
2755 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2760 cp) cat >$from <<EOF
2765 cp $targetdir/\$f . || exit 1
2770 *) echo "Unknown targetfrom '$targetfrom'" >&4
2774 if $test ! -f $run; then
2775 echo "Target 'run' script '$run' not found." >&4
2779 if $test ! -f $to; then
2780 echo "Target 'to' script '$to' not found." >&4
2784 if $test ! -f $from; then
2785 echo "Target 'from' script '$from' not found." >&4
2789 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2793 Using '$run' for remote execution,
2794 and '$from' and '$to'
2795 for remote file transfer.
2801 usecrosscompile='undef'
2806 : see whether [:lower:] and [:upper:] are supported character classes
2808 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2810 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2814 *) # There is a discontinuity in EBCDIC between 'I' and 'J'
2815 # (0xc9 and 0xd1), therefore that is a nice testing point.
2816 if test "X$up" = X -o "X$low" = X; then
2817 case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
2823 if test "X$up" = X -o "X$low" = X; then
2824 case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
2830 if test "X$up" = X -o "X$low" = X; then
2831 case "`echo IJ | od -x 2>/dev/null`" in
2833 echo "Hey, this might be EBCDIC." >&4
2834 if test "X$up" = X -o "X$low" = X; then
2835 case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2836 ij) up='[A-IJ-RS-Z]'
2841 if test "X$up" = X -o "X$low" = X; then
2842 case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2852 case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
2854 echo "Using $up and $low to convert case." >&4
2857 echo "I don't know how to translate letters from upper to lower case." >&4
2858 echo "Your tr is not acting any way I know of." >&4
2862 : set up the translation script tr, must be called with ./tr of course
2866 '[A-Z][a-z]') exec $tr '$up' '$low';;
2867 '[a-z][A-Z]') exec $tr '$low' '$up';;
2874 : Try to determine whether config.sh was made on this system
2875 case "$config_sh" in
2877 myuname=`$uname -a 2>/dev/null`
2878 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2879 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2880 # because the A-Z/a-z are not consecutive.
2881 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2882 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2883 newmyuname="$myuname"
2885 case "$knowitall" in
2887 if test -f ../config.sh; then
2888 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2889 eval "`grep myuname= ../config.sh`"
2891 if test "X$myuname" = "X$newmyuname"; then
2899 : Get old answers from old config file if Configure was run on the
2900 : same system, otherwise use the hints.
2903 if test -f config.sh; then
2905 rp="I see a config.sh file. Shall I use it to set the defaults?"
2908 n*|N*) echo "OK, I'll ignore it."
2909 mv config.sh config.sh.old
2910 myuname="$newmyuname"
2912 *) echo "Fetching default answers from your old config.sh file..." >&4
2920 : Older versions did not always set $sh. Catch re-use of such
2930 if test ! -f config.sh; then
2933 First time through, eh? I have some defaults handy for some systems
2934 that need some extra help getting the Configure answers right:
2937 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2939 : Half the following guesses are probably wrong... If you have better
2940 : tests or hints, please send them to perlbug@perl.org
2941 : The metaconfig authors would also appreciate a copy...
2942 $test -f /irix && osname=irix
2943 $test -f /xenix && osname=sco_xenix
2944 $test -f /dynix && osname=dynix
2945 $test -f /dnix && osname=dnix
2946 $test -f /lynx.os && osname=lynxos
2947 $test -f /unicos && osname=unicos && osvers=`$uname -r`
2948 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
2949 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
2950 $test -f /bin/mips && /bin/mips && osname=mips
2951 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
2952 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
2953 $test -d /usr/apollo/bin && osname=apollo
2954 $test -f /etc/saf/_sactab && osname=svr4
2955 $test -d /usr/include/minix && osname=minix
2956 $test -f /system/gnu_library/bin/ar.pm && osname=vos
2957 if $test -d /MachTen -o -d /MachTen_Folder; then
2959 if $test -x /sbin/version; then
2960 osvers=`/sbin/version | $awk '{print $2}' |
2961 $sed -e 's/[A-Za-z]$//'`
2962 elif $test -x /usr/etc/version; then
2963 osvers=`/usr/etc/version | $awk '{print $2}' |
2964 $sed -e 's/[A-Za-z]$//'`
2970 $test -f /sys/posix.dll &&
2971 $test -f /usr/bin/what &&
2972 set X `/usr/bin/what /sys/posix.dll` &&
2973 $test "$3" = UWIN &&
2977 if $test -f $uname; then
2985 umips) osname=umips ;;
2988 [23]100) osname=mips ;;
2989 next*) osname=next ;;
2991 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
2992 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
2995 elif $test -f /etc/kconfig; then
2997 if test "$lns" = "$ln -s"; then
2999 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3001 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3008 if test -n "$DJGPP"; then
3017 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3019 'not found') osvers="$4"."$3" ;;
3020 '<3240'|'<>3240') osvers=3.2.0 ;;
3021 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3022 '=3250'|'>3250') osvers=3.2.5 ;;
3026 bsd386) osname=bsd386
3029 cygwin*) osname=cygwin
3032 *dc.osx) osname=dcosx
3038 domainos) osname=apollo
3044 dynixptx*) osname=dynixptx
3045 osvers=`echo "$4"|sed 's/^v//'`
3047 freebsd) osname=freebsd
3049 genix) osname=genix ;;
3051 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3067 netbsd*) osname=netbsd
3070 news-os) osvers="$3"
3072 4*) osname=newsos4 ;;
3076 next*) osname=next ;;
3077 nonstop-ux) osname=nonstopux ;;
3078 POSIX-BC | posix-bc ) osname=posix-bc
3081 powerux | power_ux | powermax_os | powermaxos | \
3082 powerunix | power_unix) osname=powerux
3088 solaris) osname=solaris
3090 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3097 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3101 titanos) osname=titanos
3110 ultrix) osname=ultrix
3113 osf1|mls+) case "$5" in
3116 osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3119 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3122 hp*) osname=hp_osf1 ;;
3123 mips) osname=mips_osf1 ;;
3126 unixware) osname=svr5
3134 $2) case "$osname" in
3138 : svr4.x or possibly later
3148 if test -f /stand/boot ; then
3149 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3150 if test -n "$INITPROG" -a -f "$INITPROG"; then
3151 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3152 if test -n "$isesix"; then
3160 *) if test -f /etc/systemid; then
3162 set `echo $3 | $sed 's/\./ /g'` $4
3163 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3165 elif $test -f $src/hints/sco_$1_$2.sh; then
3167 elif $test -f $src/hints/sco_$1.sh; then
3172 '') : Still unknown. Probably a generic Sys V.
3181 *) case "$osname" in
3182 '') : Still unknown. Probably a generic BSD.
3190 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3191 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3192 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3195 $rm -f UU/kernel.what
3196 elif test -d c:/.; then
3203 case "$targetarch" in
3206 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3211 : Now look for a hint file osname_osvers, unless one has been
3212 : specified already.
3215 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3216 : Also try without trailing minor version numbers.
3217 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3218 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3219 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3220 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3223 *) case "$osvers" in
3226 *) if $test -f $src/hints/$file.sh ; then
3228 elif $test -f $src/hints/$xfile.sh ; then
3230 elif $test -f $src/hints/$xxfile.sh ; then
3232 elif $test -f $src/hints/$xxxfile.sh ; then
3234 elif $test -f $src/hints/$xxxxfile.sh ; then
3236 elif $test -f "$src/hints/${osname}.sh" ; then
3245 if $test -f Policy.sh ; then
3248 none) dflt="Policy" ;;
3249 *) dflt="Policy $dflt" ;;
3254 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3258 if $test -f Policy.sh ; then
3261 There's also a Policy hint file available, which should make the
3262 site-specific (policy) questions easier to answer.
3269 You may give one or more space-separated answers, or "none" if appropriate.
3270 A well-behaved OS will have no hints, so answering "none" or just "Policy"
3271 is a good thing. DO NOT give a wrong version or a wrong OS.
3275 rp="Which of these apply, if any?"
3278 for file in $tans; do
3279 if $test X$file = XPolicy -a -f Policy.sh; then
3281 $cat Policy.sh >> UU/config.sh
3282 elif $test -f $src/hints/$file.sh; then
3283 . $src/hints/$file.sh
3284 $cat $src/hints/$file.sh >> UU/config.sh
3285 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3288 : Give one chance to correct a possible typo.
3289 echo "$file.sh does not exist"
3291 rp="hint to use instead?"
3293 for file in $ans; do
3294 if $test -f "$src/hints/$file.sh"; then
3295 . $src/hints/$file.sh
3296 $cat $src/hints/$file.sh >> UU/config.sh
3297 elif $test X$ans = X -o X$ans = Xnone ; then
3300 echo "$file.sh does not exist -- ignored."
3307 : Remember our hint file for later.
3308 if $test -f "$src/hints/$file.sh" ; then
3318 echo "Fetching default answers from $config_sh..." >&4
3322 cp $config_sh config.sh 2>/dev/null
3332 test "$override" && . ./optdef.sh
3334 : Restore computed paths
3335 for file in $loclist $trylist; do
3336 eval $file="\$_$file"
3341 Configure uses the operating system name and version to set some defaults.
3342 The default value is probably right if the name rings a bell. Otherwise,
3343 since spelling matters for me, either accept the default or answer "none"
3350 ''|' '|none) dflt=none ;;
3351 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3354 *) dflt="$osname" ;;
3356 rp="Operating system name?"
3360 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3366 ''|' '|none) dflt=none ;;
3367 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3368 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3370 ''|' ') dflt=none ;;
3375 *) dflt="$osvers" ;;
3377 rp="Operating system version?"
3387 : who configured the system
3388 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3389 cf_by=`(logname) 2>/dev/null`
3392 cf_by=`(whoami) 2>/dev/null`
3394 "") cf_by=unknown ;;
3398 : set up the script used to warn in case of inconsistency
3405 echo "*** WHOA THERE!!! ***" >&4
3406 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
3407 rp=" Keep the $hint value?"
3410 y) td=$was; tu=$was;;
3414 : function used to set $1 to $val
3415 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
3417 $define$undef) . ./whoa; eval "$var=\$td";;
3418 $undef$define) . ./whoa; eval "$var=\$tu";;
3419 *) eval "$var=$val";;
3422 case "$usethreads" in
3423 $define|true|[yY]*) dflt='y';;
3428 Perl can be built to take advantage of threads on some systems.
3429 To do so, Configure can be run with -Dusethreads.
3431 Note that threading is a highly experimental feature, and
3432 some known race conditions still remain. If you choose to try
3433 it, be very sure to not actually deploy it for production
3434 purposes. README.threads has more details, and is required
3435 reading if you enable threads.
3437 If this doesn't make any sense to you, just accept the default '$dflt'.
3439 rp='Build a threading Perl?'
3442 y|Y) val="$define" ;;
3448 case "$usethreads" in
3452 As of release 5.6, Perl has two different threading implementations,
3453 an interpreter-based version (ithreads) with one interpreter per
3454 thread, and the 5.005 version (5005threads). Both implementations
3455 are considered experimental, but since 5.8 ithreads somewhat less so.
3456 The 5005threads is effectively unmaintained.
3459 : Default to ithreads unless overridden on command line or with
3462 case "$use5005threads" in
3463 $define|true|[yY]*) dflt='n';;
3465 case "$useithreads" in
3466 $undef|false|[nN]*) dflt='n';;
3468 rp='Use interpreter-based ithreads?'
3471 y|Y) val="$define" ;;
3476 : Now set use5005threads to the opposite value.
3477 case "$useithreads" in
3478 $define) val="$undef" ;;
3485 useithreads="$undef"
3486 use5005threads="$undef"
3490 case "$useithreads$use5005threads" in
3494 You cannot have both the ithreads and the 5.005 threads enabled
3495 at the same time. Disabling the 5.005 threads since they are
3496 much less stable than the ithreads.
3499 use5005threads="$undef"
3503 case "$d_oldpthreads" in
3504 '') : Configure tests would be welcome here. For now, assume undef.
3506 *) val="$d_oldpthreads" ;;
3512 case "$usethreads" in
3513 "$define"|true|[yY]*)
3514 : Look for a hint-file generated 'call-back-unit'. If the
3515 : user has specified that a threading perl is to be built,
3516 : we may need to set or change some other defaults.
3517 if $test -f usethreads.cbu; then
3518 echo "Your platform has some specific hints for threaded builds, using them..."
3522 (Your platform doesn't have any specific hints for threaded builds.
3523 Assuming POSIX threads, then.)
3531 Perl can be built so that multiple Perl interpreters can coexist
3532 within the same Perl executable.
3535 case "$useithreads" in
3538 This multiple interpreter support is required for interpreter-based threads.
3542 *) case "$usemultiplicity" in
3543 $define|true|[yY]*) dflt='y';;
3547 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
3548 rp='Build Perl for multiplicity?'
3551 y|Y) val="$define" ;;
3560 case "$usemorebits" in
3561 "$define"|true|[yY]*)
3562 use64bitint="$define"
3563 uselongdouble="$define"
3564 usemorebits="$define"
3566 *) usemorebits="$undef"
3570 : make some quick guesses about what we are up against
3572 $echo $n "Hmm... $c"
3582 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
3583 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
3585 echo "Looks kind of like an OSF/1 system, but we'll see..."
3587 elif test `echo abc | $tr a-z A-Z` = Abc ; then
3588 xxx=`./loc addbib blurfl $pth`
3589 if $test -f $xxx; then
3590 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3594 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3595 echo "Looks kind of like an extended USG system, but we'll see..."
3597 echo "Looks kind of like a USG system, but we'll see..."
3601 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3602 echo "Looks kind of like a BSD system, but we'll see..."
3606 echo "Looks kind of like a Version 7 system, but we'll see..."
3609 case "$eunicefix" in
3612 There is, however, a strange, musty smell in the air that reminds me of
3613 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3617 : it so happens the Eunice I know will not run shell scripts in Unix format
3621 echo "Congratulations. You aren't running Eunice."
3625 : Detect OS2. The p_ variable is set above in the Head.U unit.
3626 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
3627 : semicolon as a patch separator
3632 I have the feeling something is not exactly right, however...don't tell me...
3633 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3634 (Or you may be running DOS with DJGPP.)
3639 if test -f /xenix; then
3640 echo "Actually, this looks more like a XENIX system..."
3645 echo "It's not Xenix..."
3650 if test -f /venix; then
3651 echo "Actually, this looks more like a VENIX system..."
3658 echo "Nor is it Venix..."
3661 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3662 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3669 rp="Use which C compiler?"
3673 : See if they have not cc but they do have gcc
3675 : Look for a hint-file generated 'call-back-unit'. Now that the
3676 : user has specified the compiler, we may need to set or change some
3678 if $test -f cc.cbu; then
3684 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3690 printf("%s\n", __VERSION__);
3692 printf("%s\n", "1");
3698 if $cc -o try $ccflags $ldflags try.c; then
3699 gccversion=`$run ./try`
3700 case "$gccversion" in
3701 '') echo "You are not using GNU cc." ;;
3702 *) echo "You are using GNU cc $gccversion."
3708 echo "*** WHOA THERE!!! ***" >&4
3709 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3710 case "$knowitall" in
3712 echo " You'd better start hunting for one and let me know about it." >&4
3718 case "$gccversion" in
3719 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3721 case "$gccversion" in
3722 '') gccosandvers='' ;;
3723 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3724 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3726 case "$gccosandvers" in
3727 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3728 $osname$osvers) ;; # looking good
3729 $osname*) cat <<EOM >&4
3731 *** WHOA THERE!!! ***
3733 Your gcc has not been compiled for the exact release of
3734 your operating system ($gccosandvers versus $osname$osvers).
3736 In general it is a good idea to keep gcc synchronized with
3737 the operating system because otherwise serious problems
3738 may ensue when trying to compile software, like Perl.
3740 I'm trying to be optimistic here, though, and will continue.
3741 If later during the configuration and build icky compilation
3742 problems appear (headerfile conflicts being the most common
3743 manifestation), I suggest reinstalling the gcc to match
3744 your operating system release.
3748 *) gccosandvers='' ;; # failed to parse, better be silent
3757 : decide how portable to be. Allow command line overrides.
3758 case "$d_portable" in
3760 *) d_portable="$define" ;;
3763 : set up shell script to do ~ expansion
3769 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3772 if $test -f /bin/csh; then
3773 /bin/csh -f -c "glob \$1"
3778 name=\`$expr x\$1 : '..\([^/]*\)'\`
3779 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3780 if $test ! -d "\$dir"; then
3782 echo "\$me: can't locate home directory for: \$name" >&2
3787 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3803 : now set up to get a file name
3807 cat <<'EOSC' >>getfile
3823 expr $fn : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3824 fn=`echo $fn | sed 's/(.*)//'`
3830 loc_file=`expr $fn : '.*:\(.*\)'`
3831 fn=`expr $fn : '\(.*\):.*'`
3839 */*) fullpath=true;;
3848 *e*) exp_file=true;;
3851 *p*) nopath_ok=true;;
3856 *d*) type='Directory';;
3857 *l*) type='Locate';;
3862 Locate) what='File';;
3867 case "$d_portable" in
3875 while test "$type"; do
3880 true) rp="$rp (~name ok)";;
3883 if test -f UU/getfile.ok && \
3884 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3903 value=`UU/filexp $ans`
3906 if test "$ans" != "$value"; then
3907 echo "(That expands to $value on this system.)"
3921 /*) value="$ansexp" ;;
3922 [a-zA-Z]:/*) value="$ansexp" ;;
3927 echo "I shall only accept a full path name, as in /bin/ls." >&4
3928 echo "Use a ! shell escape if you wish to check pathnames." >&4
3931 echo "Please give a full path name, starting with slash." >&4
3934 echo "Note that using ~name is ok provided it expands well." >&4
3947 for fp in $gfpth; do
3948 if test "X$fp" = X.; then
3953 if test -f "$pf"; then
3955 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
3957 echo "($value is not a plain file, but that's ok.)"
3960 if test X"$type" = X; then
3967 for fp in $gfpth; do
3968 if test "X$fp" = X.; then
3973 direxp="$fp/$ansexp"
3975 if test -d "$direxp"; then
3983 if test -d "$ansexp"; then
3984 echo "(Looking for $loc_file in directory $value.)"
3985 value="$value/$loc_file"
3986 ansexp="$ansexp/$loc_file"
3988 if test -f "$ansexp"; then
3991 case "$nopath_ok" in
3992 true) case "$value" in
3994 *) echo "Assuming $value will be in people's path."
4010 if test "$fastread" = yes; then
4015 rp="$what $value doesn't exist. Use that name anyway?"
4034 test "X$gfpthkeep" != Xy && gfpth=""
4037 : What should the include directory be ?
4039 $echo $n "Hmm... $c"
4043 if $test -f /bin/mips && /bin/mips; then
4044 echo "Looks like a MIPS system..."
4045 $cat >usr.c <<'EOCP'
4046 #ifdef SYSTYPE_BSD43
4050 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4051 dflt='/bsd43/usr/include'
4055 mips_type='System V'
4057 $rm -f usr.c usr.out
4058 echo "and you're compiling with the $mips_type compiler and libraries."
4062 echo "Doesn't look like a MIPS system."
4072 case "$xxx_prompt" in
4075 rp='Where are the include files you want to use?'
4083 : see how we invoke the C preprocessor
4085 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4086 cat <<'EOT' >testcpp.c
4092 if test ! -f cppstdin; then
4093 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4094 # AIX cc -E doesn't show the absolute headerfile
4095 # locations but we'll cheat by using the -M flag.
4096 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
4098 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4101 echo "Keeping your $hint cppstdin wrapper."
4104 wrapper=`pwd`/cppstdin
4108 if $test "X$cppstdin" != "X" && \
4109 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4110 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4112 echo "You used to use $cppstdin $cppminus so we'll use that again."
4114 '') echo "But let's see if we can live without a wrapper..." ;;
4116 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4117 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4119 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4122 echo "(However, $cpprun $cpplast does not work, let's see...)"
4130 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4137 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4138 $cc -E <testcpp.c >testcpp.out 2>&1; \
4139 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4140 echo "Yup, it does."
4143 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4144 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4145 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4146 echo "Yup, it does."
4149 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4150 $cc -P <testcpp.c >testcpp.out 2>&1; \
4151 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4152 echo "Yipee, that works!"
4155 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4156 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4157 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4158 echo "At long last!"
4161 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4162 $cpp <testcpp.c >testcpp.out 2>&1; \
4163 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4167 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4168 $cpp - <testcpp.c >testcpp.out 2>&1; \
4169 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4170 echo "Hooray, it works! I was beginning to wonder."
4173 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4174 $wrapper <testcpp.c >testcpp.out 2>&1; \
4175 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4181 rp="No dice. I can't find a C preprocessor. Name one:"
4185 $x_cpp <testcpp.c >testcpp.out 2>&1
4186 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4187 echo "OK, that will do." >&4
4189 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4204 echo "Perhaps can we force $cc -E using a wrapper..."
4205 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4206 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4212 echo "Nope, we'll have to live without it..."
4226 "$wrapper"|'cppstdin') ;;
4227 *) $rm -f $wrapper;;
4229 $rm -f testcpp.c testcpp.out
4231 : Set private lib path
4234 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4239 '') dlist="$loclibpth $plibpth $glibpth";;
4240 *) dlist="$libpth";;
4243 : Now check and see which directories actually exist, avoiding duplicates
4247 if $test -d $xxx; then
4250 *) libpth="$libpth $xxx";;
4256 Some systems have incompatible or broken versions of libraries. Among
4257 the directories listed in the question below, please remove any you
4258 know not to be holding relevant libraries, and add any that are needed.
4259 Say "none" for none.
4270 rp="Directories to use for library searches?"
4277 : compute shared library extension
4280 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4290 On some systems, shared libraries may be available. Answer 'none' if
4291 you want to suppress searching of shared libraries for the remainder
4292 of this configuration.
4295 rp='What is the file extension used for shared libraries?'
4299 : Define several unixisms.
4300 : Hints files or command line option can be used to override them.
4301 : The convoluted testing is in case hints files set either the old
4304 '') case "$exe_ext" in
4306 *) _exe="$exe_ext" ;;
4311 '') case "$lib_ext" in
4318 '') case "$obj_ext" in
4325 '') case "$path_sep" in
4336 : Which makefile gets called first. This is used by make depend.
4337 case "$firstmakefile" in
4338 '') firstmakefile='makefile';;
4342 $define|true|[yY]*) dflt='y';;
4347 Perl can be built to use the SOCKS proxy protocol library. To do so,
4348 Configure must be run with -Dusesocks. If you use SOCKS you also need
4349 to use the PerlIO abstraction layer, this will be implicitly selected.
4351 If this doesn't make any sense to you, just accept the default '$dflt'.
4353 rp='Build Perl for SOCKS?'
4356 y|Y) val="$define" ;;
4363 $define|true|[yY]*) useperlio="$define";;
4366 : Looking for optional libraries
4368 echo "Checking for optional libraries..." >&4
4373 case "$libswanted" in
4374 '') libswanted='c_s';;
4377 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4383 for thisdir in $libpth $xlibpth; do
4384 test -d $thisdir && libspath="$libspath $thisdir"
4386 for thislib in $libswanted; do
4387 for thisdir in $libspath; do
4389 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4390 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4391 $test -f "$xxx" && eval $libscheck
4392 $test -f "$xxx" && libstyle=shared
4394 if test ! -f "$xxx"; then
4395 xxx=$thisdir/lib$thislib.$so
4396 $test -f "$xxx" && eval $libscheck
4397 $test -f "$xxx" && libstyle=shared
4399 if test ! -f "$xxx"; then
4400 xxx=$thisdir/lib$thislib$_a
4401 $test -f "$xxx" && eval $libscheck
4402 $test -f "$xxx" && libstyle=static
4404 if test ! -f "$xxx"; then
4405 xxx=$thisdir/$thislib$_a
4406 $test -f "$xxx" && eval $libscheck
4407 $test -f "$xxx" && libstyle=static
4409 if test ! -f "$xxx"; then
4410 xxx=$thisdir/lib${thislib}_s$_a
4411 $test -f "$xxx" && eval $libscheck
4412 $test -f "$xxx" && libstyle=static
4413 $test -f "$xxx" && thislib=${thislib}_s
4415 if test ! -f "$xxx"; then
4416 xxx=$thisdir/Slib$thislib$_a
4417 $test -f "$xxx" && eval $libscheck
4418 $test -f "$xxx" && libstyle=static
4420 if $test -f "$xxx"; then
4422 shared) echo "Found -l$thislib (shared)." ;;
4423 static) echo "Found -l$thislib." ;;
4424 *) echo "Found -l$thislib ($libstyle)." ;;
4428 *) dflt="$dflt -l$thislib"
4429 libsfound="$libsfound $xxx"
4431 libsfiles="$libsfiles $yyy"
4432 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4433 case " $libsdirs " in
4435 *) libsdirs="$libsdirs $yyy" ;;
4442 if $test ! -f "$xxx"; then
4443 echo "No -l$thislib."
4454 ' '|'') dflt='none';;
4459 In order to compile $package on your machine, a number of libraries
4460 are usually needed. Include any other special libraries here as well.
4461 Say "none" for none. The default list is almost always right.
4465 rp="What libraries to use?"
4472 : determine optimization, if desired, or use for debug flag also
4474 ' '|$undef) dflt='none';;
4476 *) dflt="$optimize";;
4480 By default, $package compiles with the -O flag to use the optimizer.
4481 Alternately, you might want to use the symbolic debugger, which uses
4482 the -g flag (on traditional Unix systems). Either flag can be
4483 specified here. To use neither flag, specify the word "none".
4486 rp="What optimizer/debugger flag should be used?"
4490 'none') optimize=" ";;
4494 : We will not override a previous value, but we might want to
4495 : augment a hint file
4497 default|recommended)
4498 case "$gccversion" in
4499 1*) dflt='-fpcc-struct-return' ;;
4502 *-g*) dflt="$dflt -DDEBUGGING";;
4504 case "$gccversion" in
4505 2*) if test -d /etc/conf/kconfig.d &&
4506 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
4512 case "$gccversion" in
4516 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
4517 echo 'int main(void) { return 0; }' > gcctest.c
4518 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
4519 echo "Yes, it does." 2>&1
4522 echo "Leaving current flags $ccflags alone." 2>&1
4524 *) dflt="$dflt -fno-strict-aliasing" ;;
4527 echo "Nope, it doesn't, but that's ok." 2>&1
4534 case "$mips_type" in
4535 *BSD*|'') inclwanted="$locincpth $usrinc";;
4536 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
4538 for thisincl in $inclwanted; do
4539 if $test -d $thisincl; then
4540 if $test x$thisincl != x$usrinc; then
4542 *" -I$thisincl "*);;
4543 *) dflt="$dflt -I$thisincl ";;
4549 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
4551 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
4559 *) dflt="$dflt -D$2";;
4563 set signal.h LANGUAGE_C; eval $inctest
4567 ccflags="$ccflags -DSOCKS"
4572 default|recommended) dflt="$ccflags $dflt" ;;
4573 *) dflt="$ccflags";;
4582 Your C compiler may want other flags. For this question you should include
4583 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
4584 but you should NOT include libraries or ld flags like -lwhatever. If you
4585 want $package to honor its debug switch, you should include -DDEBUGGING here.
4586 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
4588 To use no flags, specify the word "none".
4594 rp="Any additional cc flags?"
4601 : the following weeds options from ccflags that are of no interest to cpp
4603 '') cppflags="$ccflags" ;;
4604 *) cppflags="$cppflags $ccflags" ;;
4606 case "$gccversion" in
4607 1*) cppflags="$cppflags -D__GNUC__"
4609 case "$mips_type" in
4611 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4617 echo "Let me guess what the preprocessor flags are..." >&4
4631 *) ftry="$previous $flag";;
4633 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4634 >cpp1.out 2>/dev/null && \
4635 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4636 >cpp2.out 2>/dev/null && \
4637 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4638 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4640 cppflags="$cppflags $ftry"
4650 *-*) echo "They appear to be: $cppflags";;
4652 $rm -f cpp.c cpp?.out
4656 : flags used in final linking phase
4658 '') if ./venix; then
4664 *-posix*) dflt="$dflt -posix" ;;
4667 *) dflt="$ldflags";;
4670 : Try to guess additional flags to pick up local libraries.
4671 for thislibdir in $libpth; do
4672 case " $loclibpth " in
4675 *"-L$thislibdir "*) ;;
4676 *) dflt="$dflt -L$thislibdir" ;;
4688 Your C linker may need flags. For this question you should
4689 include -L/whatever and any other flags used by the C linker, but you
4690 should NOT include libraries like -lwhatever.
4692 Make sure you include the appropriate -L/path flags if your C linker
4693 does not normally search all of the directories you specified above,
4696 To use no flags, specify the word "none".
4700 rp="Any additional ld flags (NOT including libraries)?"
4706 rmlist="$rmlist pdp11"
4710 echo "Checking your choice of C compiler and flags for coherency..." >&4
4711 $cat > try.c <<'EOF'
4713 int main() { printf("Ok\n"); exit(0); }
4715 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
4717 $cat >try.msg <<'EOM'
4718 I've tried to compile and run the following simple program:
4721 $cat try.c >> try.msg
4723 $cat >> try.msg <<EOM
4730 and I got the following output:
4734 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
4735 if $sh -c "$run ./try" >>try.msg 2>&1; then
4739 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4742 cat >> try.msg <<'EOQS'
4743 If $libs contains -lsfio, and sfio is mis-configured, then it
4744 sometimes (apparently) runs and exits with a 0 status, but with no
4745 output! It may have to do with sfio's use of _exit vs. exit.
4748 rp="You have a big problem. Shall I abort Configure"
4755 echo "The program compiled OK, but exited with status $?." >>try.msg
4756 rp="You have a problem. Shall I abort Configure"
4760 echo "I can't compile the test program." >>try.msg
4761 rp="You have a BIG problem. Shall I abort Configure"
4767 case "$knowitall" in
4769 echo "(The supplied flags or libraries might be incorrect.)"
4777 *) echo "Ok. Stopping Configure." >&4
4782 n) echo "OK, that should do.";;
4784 $rm -f try try.* core
4786 : define a shorthand compile call
4790 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
4791 : define a shorthand compile call for compilations that should be ok.
4795 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
4797 : check for lengths of integral types
4801 echo "Checking to see how big your integers are..." >&4
4802 $cat >try.c <<'EOCP'
4806 printf("intsize=%d;\n", (int)sizeof(int));
4807 printf("longsize=%d;\n", (int)sizeof(long));
4808 printf("shortsize=%d;\n", (int)sizeof(short));
4813 if eval $compile_ok && $run ./try > /dev/null; then
4815 echo "Your integers are $intsize bytes long."
4816 echo "Your long integers are $longsize bytes long."
4817 echo "Your short integers are $shortsize bytes long."
4821 Help! I can't compile and run the intsize test program: please enlighten me!
4822 (This is probably a misconfiguration in your system or libraries, and
4823 you really ought to fix it. Still, I'll try anyway.)
4827 rp="What is the size of an integer (in bytes)?"
4831 rp="What is the size of a long integer (in bytes)?"
4835 rp="What is the size of a short integer (in bytes)?"
4843 : check for void type
4845 echo "Checking to see how well your C compiler groks the void type..." >&4
4846 case "$voidflags" in
4848 $cat >try.c <<'EOCP'
4854 extern void moo(); /* function returning void */
4855 void (*goo)(); /* ptr to func returning void */
4857 void *hue; /* generic ptr */
4870 int main() { sub(); }
4872 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
4873 voidflags=$defvoidused
4874 echo "Good. It appears to support void to the level $package wants.">&4
4875 if $contains warning .out >/dev/null 2>&1; then
4876 echo "However, you might get some warnings that look like this:"
4880 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
4881 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
4882 echo "It supports 1..."
4883 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
4884 echo "It also supports 2..."
4885 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
4887 echo "And it supports 4 but not 8 definitely."
4889 echo "It doesn't support 4..."
4890 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
4892 echo "But it supports 8."
4895 echo "Neither does it support 8."
4899 echo "It does not support 2..."
4900 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
4902 echo "But it supports 4 and 8."
4904 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
4906 echo "And it supports 4 but has not heard about 8."
4908 echo "However it supports 8 but not 4."
4913 echo "There is no support at all for void."
4918 case "$voidflags" in
4921 Support flag bits are:
4922 1: basic void declarations.
4923 2: arrays of pointers to functions returning void.
4924 4: operations between pointers to and addresses of void functions.
4925 8: generic void pointers.
4928 rp="Your void support flags add up to what?"
4935 : check for length of pointer
4939 echo "Checking to see how big your pointers are..." >&4
4940 if test "$voidflags" -gt 7; then
4941 echo '#define VOID_PTR char *' > try.c
4943 echo '#define VOID_PTR void *' > try.c
4945 $cat >>try.c <<'EOCP'
4949 printf("%d\n", (int)sizeof(VOID_PTR));
4954 if eval $compile_ok; then
4955 ptrsize=`$run ./try`
4956 echo "Your pointers are $ptrsize bytes long."
4959 echo "(I can't seem to compile the test program. Guessing...)" >&4
4960 rp="What is the size of a pointer (in bytes)?"
4968 : check for long long
4970 echo "Checking to see if you have long long..." >&4
4971 echo 'int main() { long long x = 7; return 0; }' > try.c
4973 if eval $compile; then
4975 echo "You have long long."
4978 echo "You do not have long long."
4984 : check for length of long long
4985 case "${d_longlong}${longlongsize}" in
4988 echo "Checking to see how big your long longs are..." >&4
4989 $cat >try.c <<'EOCP'
4993 printf("%d\n", (int)sizeof(long long));
4998 if eval $compile_ok; then
4999 longlongsize=`$run ./try`
5000 echo "Your long longs are $longlongsize bytes long."
5004 echo "(I can't seem to compile the test program. Guessing...)"
5005 rp="What is the size of a long long (in bytes)?"
5009 if $test "X$longsize" = "X$longlongsize"; then
5010 echo "(That isn't any different from an ordinary long.)"
5016 : determine filename position in cpp output
5018 echo "Computing filename position in cpp output for #include directives..." >&4
5020 vos) testaccess=-e ;;
5023 echo '#include <stdio.h>' > foo.c
5026 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5027 $grep '^[ ]*#.*stdio\.h' | \
5028 while read cline; do
5031 while $test \$# -gt 0; do
5032 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5037 pos=\`expr \$pos + 1\`
5049 *) pos="${fieldn}th";;
5051 echo "Your cpp writes the filename in the $pos field of the line."
5054 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
5057 : locate header file
5062 for usrincdir in $usrinc
5064 if test -f \$usrincdir/\$wanted; then
5065 echo "\$usrincdir/\$wanted"
5069 awkprg='{ print \$$fieldn }'
5070 echo "#include <\$wanted>" > foo\$\$.c
5071 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5072 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5073 while read cline; do
5074 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5076 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5077 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5082 # status = 0: grep returned 0 lines, case statement not executed
5083 # status = 1: headerfile found
5084 # status = 2: while loop executed, no headerfile found
5088 if test \$status -eq 1; then
5095 : define an alternate in-header-list? function
5096 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5097 cont=true; xxf="echo \"<\$1> found.\" >&4";
5098 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5099 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5101 case $# in 4) instead=instead;; *) instead="at last";; esac;
5102 while $test "$cont"; do
5104 var=$2; eval "was=\$$2";
5105 if $test "$xxx" && $test -r "$xxx";
5107 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5110 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5111 set $yyy; shift; shift; yyy=$@;
5112 case $# in 0) cont="";;
5113 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5114 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5115 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5116 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5120 do set $yyy; var=$2; eval "was=\$$2";
5121 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5122 set $yyy; shift; shift; yyy=$@;
5125 : see if inttypes.h is available
5126 : we want a real compile instead of Inhdr because some systems
5127 : have an inttypes.h which includes non-existent headers
5130 #include <inttypes.h>
5132 static int32_t foo32 = 0x12345678;
5136 if eval $compile; then
5137 echo "<inttypes.h> found." >&4
5140 echo "<inttypes.h> NOT found." >&4
5149 echo "Checking to see if you have int64_t..." >&4
5151 #include <sys/types.h>
5152 #$i_inttypes I_INTTYPES
5154 #include <inttypes.h>
5156 int main() { int64_t x = 7; }
5159 if eval $compile; then
5161 echo "You have int64_t."
5164 echo "You do not have int64_t."
5172 echo "Checking which 64-bit integer type we could use..." >&4
5178 val='"unsigned int"'
5183 *) case "$longsize" in
5187 val='"unsigned long"'
5192 *) case "$d_longlong:$longlongsize" in
5197 val='"unsigned long long"'
5202 *) case "$d_int64_t" in
5221 '') echo "Alas, no 64-bit integer types in sight." >&4
5224 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5230 case "$uselonglong" in
5231 "$define"|true|[yY]*)
5234 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5236 use64bitint="$define"
5239 case "$use64bits" in
5240 "$define"|true|[yY]*)
5243 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5245 use64bitint="$define"
5248 case "$use64bitints" in
5249 "$define"|true|[yY]*)
5252 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5254 use64bitint="$define"
5257 case "$use64bitsint" in
5258 "$define"|true|[yY]*)
5261 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5263 use64bitint="$define"
5266 case "$uselonglongs" in
5267 "$define"|true|[yY]*)
5270 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5272 use64bitint="$define"
5275 case "$use64bitsall" in
5276 "$define"|true|[yY]*)
5279 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5281 use64bitall="$define"
5286 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5288 case "$use64bitall" in
5289 "$define"|true|[yY]*) use64bitint="$define" ;;
5295 You have natively 64-bit long integers.
5299 *) case "$use64bitint" in
5300 "$define"|true|[yY]*) dflt='y';;
5309 Perl can be built to take advantage of 64-bit integer types
5310 on some systems. To do so, Configure can be run with -Duse64bitint.
5311 Choosing this option will most probably introduce binary incompatibilities.
5313 If this doesn't make any sense to you, just accept the default '$dflt'.
5314 (The default has been chosen based on your configuration.)
5316 rp='Try to use 64-bit integers, if available?'
5319 [yY]*) val="$define" ;;
5327 case "$use64bitall" in
5328 "$define"|true|[yY]*) dflt='y' ;;
5329 *) case "$longsize" in
5337 You may also choose to try maximal 64-bitness. It means using as much
5338 64-bitness as possible on the platform. This in turn means even more
5339 binary incompatibilities. On the other hand, your platform may not
5340 have any more 64-bitness available than what you already have chosen.
5342 If this doesn't make any sense to you, just accept the default '$dflt'.
5343 (The default has been chosen based on your configuration.)
5345 rp='Try to use maximal 64-bit support, if available?'
5348 [yY]*) val="$define" ;;
5353 case "$use64bitall" in
5355 case "$use64bitint" in
5359 Since you have chosen a maximally 64-bit build, I'm also turning on
5360 the use of 64-bit integers.
5362 use64bitint="$define" ;;
5367 case "$use64bitall" in
5368 "$define"|true|[yY]*)
5372 *** You have chosen a maximally 64-bit build, but your pointers
5373 *** are only 4 bytes wide, disabling maximal 64-bitness.
5376 use64bitall="$undef"
5377 case "$use64bitint" in
5378 "$define"|true|[yY]*) ;;
5381 *** Downgrading from maximal 64-bitness to using 64-bit integers.
5384 use64bitint="$define"
5392 case "$use64bitint" in
5393 "$define"|true|[yY]*)
5394 : Look for a hint-file generated 'call-back-unit'. If the
5395 : user has specified that a 64-bit perl is to be built,
5396 : we may need to set or change some other defaults.
5397 if $test -f use64bitint.cbu; then
5398 echo "Your platform has some specific hints for 64-bit integers, using them..."
5402 4) case "$archname64" in
5403 '') archname64=64int ;;
5410 case "$use64bitall" in
5411 "$define"|true|[yY]*)
5412 : Look for a hint-file generated 'call-back-unit'. If the
5413 : user has specified that a maximally 64-bit perl is to be built,
5414 : we may need to set or change some other defaults.
5415 if $test -f use64bitall.cbu; then
5416 echo "Your platform has some specific hints for 64-bit builds, using them..."
5420 4) case "$archname64" in
5421 ''|64int) archname64=64all ;;
5429 echo "Checking for GNU C Library..." >&4
5442 if eval $compile_ok && $run ./try; then
5444 echo "You are using the GNU C Library"
5447 echo "You are not using the GNU C Library"
5453 : see if nm is to be used to determine whether a symbol is defined or not
5457 case "$d_gnulibc" in
5460 echo "nm probably won't work on the GNU C Library." >&4
5466 if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
5468 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
5469 echo "'nm' won't be sufficient on this sytem." >&4
5475 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
5476 if $test $dflt -gt 20; then
5486 true|$define) dflt=y;;
5493 I can use $nm to extract the symbols from your C libraries. This
5494 is a time consuming task which may generate huge output on the disk (up
5495 to 3 megabytes) but that should make the symbols extraction faster. The
5496 alternative is to skip the 'nm' extraction part and to compile a small
5497 test program instead to determine whether each symbol is present. If
5498 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
5499 this may be the best solution.
5501 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
5504 rp="Shall I use $nm to extract C symbols from the libraries?"
5507 [Nn]*) usenm=false;;
5516 : nm options which may be necessary
5518 '') if $test -f /mach_boot; then
5520 elif $test -d /usr/ccs/lib; then
5521 nm_opt='-p' # Solaris (and SunOS?)
5522 elif $test -f /dgux; then
5524 elif $test -f /lib64/rld; then
5525 nm_opt='-p' # 64-bit Irix
5531 : nm options which may be necessary for shared libraries but illegal
5532 : for archive libraries. Thank you, Linux.
5533 case "$nm_so_opt" in
5534 '') case "$myuname" in
5536 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
5537 nm_so_opt='--dynamic'
5546 : get list of predefined functions in a handy place
5551 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
5557 *) for thislib in $libs; do
5560 : Handle C library specially below.
5563 thislib=`echo $thislib | $sed -e 's/^-l//'`
5564 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
5566 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
5568 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
5570 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
5572 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
5574 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
5576 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
5581 libnames="$libnames $try"
5583 *) libnames="$libnames $thislib" ;;
5592 for xxx in $libpth; do
5593 $test -r $1 || set $xxx/libc.$so
5594 : The messy sed command sorts on library version numbers.
5596 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
5597 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
5599 s/[0-9][0-9]*/0000&/g
5600 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
5603 $sort | $sed -e 's/^.* //'`
5606 $test -r $1 || set /usr/ccs/lib/libc.$so
5607 $test -r $1 || set /lib/libsys_s$_a
5613 if $test -r "$1"; then
5614 echo "Your (shared) C library seems to be in $1."
5616 elif $test -r /lib/libc && $test -r /lib/clib; then
5617 echo "Your C library seems to be in both /lib/clib and /lib/libc."
5619 libc='/lib/clib /lib/libc'
5620 if $test -r /lib/syslib; then
5621 echo "(Your math library is in /lib/syslib.)"
5622 libc="$libc /lib/syslib"
5624 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5625 echo "Your C library seems to be in $libc, as you said before."
5626 elif $test -r $incpath/usr/lib/libc$_a; then
5627 libc=$incpath/usr/lib/libc$_a;
5628 echo "Your C library seems to be in $libc. That's fine."
5629 elif $test -r /lib/libc$_a; then
5631 echo "Your C library seems to be in $libc. You're normal."
5633 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
5635 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
5636 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
5637 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
5639 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5641 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5644 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
5646 if $test -r "$tans"; then
5647 echo "Your C library seems to be in $tans, of all places."
5653 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5657 If the guess above is wrong (which it might be if you're using a strange
5658 compiler, or your machine supports multiple models), you can override it here.
5663 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
5665 I can't seem to find your C library. I've looked in the following places:
5668 $sed 's/^/ /' libpath
5671 None of these seems to contain your C library. I need to get its name...
5676 rp='Where is your C library?'
5681 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
5682 set X `cat libnames`
5685 case $# in 1) xxx=file; esac
5686 echo "Extracting names from the following $xxx for later perusal:" >&4
5688 $sed 's/^/ /' libnames >&4
5690 $echo $n "This may take a while...$c" >&4
5694 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
5695 *) $nm $nm_opt $file 2>/dev/null;;
5700 $grep fprintf libc.tmp > libc.ptf
5701 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
5702 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
5704 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
5706 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5708 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
5710 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5712 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
5714 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5716 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
5718 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5720 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
5722 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5724 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
5726 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5728 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
5729 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
5731 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5733 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
5735 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5737 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
5739 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5741 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
5743 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5745 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
5747 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5749 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
5751 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5753 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
5755 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5757 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
5759 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5762 $nm -p $* 2>/dev/null >libc.tmp
5763 $grep fprintf libc.tmp > libc.ptf
5764 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
5765 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
5771 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
5773 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
5774 for thisname in $libnames $libc; do
5775 $ar t $thisname >>libc.tmp
5777 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
5779 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
5780 # Repeat libc to extract forwarders to DLL entries too
5781 for thisname in $libnames $libc; do
5782 $ar tv $thisname >>libc.tmp
5783 # Revision 50 of EMX has bug in $ar.
5784 # it will not extract forwarders to DLL entries
5785 # Use emximp which will extract exactly them.
5786 emximp -o tmp.imp $thisname \
5788 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
5789 < tmp.imp >>libc.tmp
5792 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
5795 echo "$ar didn't seem to work right." >&4
5796 echo "Maybe this is a Cray...trying bld instead..." >&4
5797 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
5799 for thisname in $libnames; do
5801 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
5802 $ar t $thisname >>libc.tmp
5806 echo "That didn't work either. Giving up." >&4
5813 if $test -f /lib/syscalls.exp; then
5815 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
5816 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list
5820 $rm -f libnames libpath
5822 : is a C symbol defined?
5825 -v) tf=libc.tmp; tc=""; tdc="";;
5826 -a) tf=libc.tmp; tc="[0]"; tdc="[]";;
5827 *) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
5830 case "$reuseval-$4" in
5832 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
5838 if $contains $tlook $tf >/dev/null 2>&1;
5843 echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
5844 if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1;
5852 $define) tval=true;;
5858 : define an is-in-libc? function
5859 inlibc='echo " "; td=$define; tu=$undef;
5860 sym=$1; var=$2; eval "was=\$$2";
5862 case "$reuseval$was" in
5872 echo "$sym() found." >&4;
5873 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
5875 echo "$sym() NOT found." >&4;
5876 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
5880 $define) echo "$sym() found." >&4;;
5881 *) echo "$sym() NOT found." >&4;;
5885 : see if sqrtl exists
5889 : check for length of double
5891 case "$doublesize" in
5893 echo "Checking to see how big your double precision numbers are..." >&4
5894 $cat >try.c <<'EOCP'
5898 printf("%d\n", (int)sizeof(double));
5903 if eval $compile_ok; then
5904 doublesize=`$run ./try`
5905 echo "Your double is $doublesize bytes long."
5908 echo "(I can't seem to compile the test program. Guessing...)"
5909 rp="What is the size of a double precision number (in bytes)?"
5917 : check for long doubles
5919 echo "Checking to see if you have long double..." >&4
5920 echo 'int main() { long double x = 7.0; }' > try.c
5922 if eval $compile; then
5924 echo "You have long double."
5927 echo "You do not have long double."
5933 : check for length of long double
5934 case "${d_longdbl}${longdblsize}" in
5937 echo "Checking to see how big your long doubles are..." >&4
5938 $cat >try.c <<'EOCP'
5942 printf("%d\n", sizeof(long double));
5947 if eval $compile; then
5948 longdblsize=`$run ./try`
5949 echo "Your long doubles are $longdblsize bytes long."
5953 echo "(I can't seem to compile the test program. Guessing...)" >&4
5954 rp="What is the size of a long double (in bytes)?"
5958 if $test "X$doublesize" = "X$longdblsize"; then
5959 echo "(That isn't any different from an ordinary double.)"
5967 if $test X"$d_longdbl" = X"$define"; then
5969 echo "Checking how to print long doubles..." >&4
5971 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
5972 $cat >try.c <<'EOCP'
5973 #include <sys/types.h>
5977 printf("%.3f\n", d);
5981 if eval $compile; then
5985 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
5986 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
5987 echo "We will use %f."
5993 if $test X"$sPRIfldbl" = X; then
5994 $cat >try.c <<'EOCP'
5995 #include <sys/types.h>
5998 long double d = 123.456;
5999 printf("%.3Lf\n", d);
6003 if eval $compile; then
6007 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
6008 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
6009 echo "We will use %Lf."
6015 if $test X"$sPRIfldbl" = X; then
6016 $cat >try.c <<'EOCP'
6017 #include <sys/types.h>
6020 long double d = 123.456;
6021 printf("%.3llf\n", d);
6025 if eval $compile; then
6029 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
6030 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
6031 echo "We will use %llf."
6037 if $test X"$sPRIfldbl" = X; then
6038 $cat >try.c <<'EOCP'
6039 #include <sys/types.h>
6042 long double d = 123.456;
6043 printf("%.3lf\n", d);
6047 if eval $compile; then
6051 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
6052 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
6053 echo "We will use %lf."
6059 if $test X"$sPRIfldbl" = X; then
6060 echo "Cannot figure out how to print long doubles." >&4
6062 sSCNfldbl=$sPRIfldbl # expect consistency
6069 case "$sPRIfldbl" in
6070 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
6071 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
6072 d_SCNfldbl="$undef";
6074 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
6075 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
6076 d_SCNfldbl="$define";
6080 : see if modfl exists
6084 d_modfl_pow32_bug="$undef"
6086 case "$d_longdbl$d_modfl" in
6089 Checking to see whether your modfl() is okay for large values...
6095 long double nv = 4294967303.15;
6101 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
6105 case "$osname:$gccversion" in
6106 aix:) saveccflags="$ccflags"
6107 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
6110 if eval $compile; then
6113 *" 4294967303.150000 1.150000 4294967302.000000")
6114 echo >&4 "Your modfl() is broken for large values."
6115 d_modfl_pow32_bug="$define"
6117 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
6121 *" 4294967303.150000 0.150000 4294967303.000000")
6122 echo >&4 "Your modfl() seems okay for large values."
6124 *) echo >&4 "I don't understand your modfl() at all."
6128 $rm -f try.* try core core.try.*
6130 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
6133 case "$osname:$gccversion" in
6134 aix:) ccflags="$saveccflags" ;; # restore
6140 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
6143 case "$uselongdouble" in
6144 $define|true|[yY]*) dflt='y';;
6149 Perl can be built to take advantage of long doubles which
6150 (if available) may give more accuracy and range for floating point numbers.
6152 If this doesn't make any sense to you, just accept the default '$dflt'.
6154 rp='Try to use long doubles if available?'
6157 y|Y) val="$define" ;;
6163 case "$uselongdouble" in
6164 true|[yY]*) uselongdouble="$define" ;;
6167 case "$uselongdouble" in
6169 : Look for a hint-file generated 'call-back-unit'. If the
6170 : user has specified that long doubles should be used,
6171 : we may need to set or change some other defaults.
6172 if $test -f uselongdouble.cbu; then
6173 echo "Your platform has some specific hints for long doubles, using them..."
6174 . ./uselongdouble.cbu
6177 (Your platform doesn't have any specific hints for long doubles.)
6184 case "$uselongdouble:$d_sqrtl:$d_modfl" in
6185 $define:$define:$define)
6188 $define:$define:$undef)
6189 message="I could not find modfl"
6191 $define:$undef:$define)
6192 message="I could not find sqrtl"
6194 $define:$undef:$undef)
6195 message="I found neither sqrtl nor modfl"
6199 if $test "$message" != X; then
6202 *** You requested the use of long doubles but you do not seem to have
6203 *** the mathematic functions for long doubles.
6205 *** I'm disabling the use of long doubles.
6209 uselongdouble=$undef
6212 case "$useperlio" in
6213 $define|true|[yY]*|'') dflt='y';;
6218 Previous version of $package used the standard IO mechanisms as
6219 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
6220 alternate IO mechanisms via the PerlIO abstraction layer, but the
6221 stdio mechanism is still available if needed. The abstraction layer
6222 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
6223 Using PerlIO with sfio may cause problems with some extension modules.
6225 If this doesn't make any sense to you, just accept the default '$dflt'.
6227 rp='Use the PerlIO abstraction layer?'
6234 echo "Ok, doing things the stdio way."
6243 case "$useperlio" in
6244 $define|true|[yY]*) ;;
6247 You are using the SOCKS proxy protocol library which means that you
6248 should also use the PerlIO layer. You may be headed for trouble.
6257 : determine the architecture name
6259 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
6260 tarch=`arch`"-$osname"
6261 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
6262 if uname -m > tmparch 2>&1 ; then
6263 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
6264 -e 's/$/'"-$osname/" tmparch`
6272 case "$myarchname" in
6275 echo "(Your architecture name used to be $myarchname.)"
6279 case "$targetarch" in
6281 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
6286 *) dflt="$archname";;
6288 rp='What is your architecture name'
6291 case "$usethreads" in
6293 echo "Threads selected." >&4
6295 *-thread*) echo "...and architecture name already has -thread." >&4
6297 *) archname="$archname-thread"
6298 echo "...setting architecture name to $archname." >&4
6303 case "$usemultiplicity" in
6305 echo "Multiplicity selected." >&4
6307 *-multi*) echo "...and architecture name already has -multi." >&4
6309 *) archname="$archname-multi"
6310 echo "...setting architecture name to $archname." >&4
6315 case "$use64bitint$use64bitall" in
6317 case "$archname64" in
6319 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
6322 case "$use64bitint" in
6323 "$define") echo "64 bit integers selected." >&4 ;;
6325 case "$use64bitall" in
6326 "$define") echo "Maximal 64 bitness selected." >&4 ;;
6329 *-$archname64*) echo "...and architecture name already has $archname64." >&4
6331 *) archname="$archname-$archname64"
6332 echo "...setting architecture name to $archname." >&4
6338 case "$uselongdouble" in
6340 echo "Long doubles selected." >&4
6341 case "$longdblsize" in
6343 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
6347 *-ld*) echo "...and architecture name already has -ld." >&4
6349 *) archname="$archname-ld"
6350 echo "...setting architecture name to $archname." >&4
6357 case "$useperlio" in
6359 echo "Perlio selected." >&4
6362 echo "Perlio not selected, using stdio." >&4
6364 *-stdio*) echo "...and architecture name already has -stdio." >&4
6366 *) archname="$archname-stdio"
6367 echo "...setting architecture name to $archname." >&4
6373 : determine root of directory hierarchy where package will be installed.
6376 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
6384 By default, $package will be installed in $dflt/bin, manual pages
6385 under $dflt/man, etc..., i.e. with $dflt as prefix for all
6386 installation directories. Typically this is something like /usr/local.
6387 If you wish to have binaries under /usr/bin but other parts of the
6388 installation under /usr/local, that's ok: you will be prompted
6389 separately for each of the installation directories, the prefix being
6390 only used to set the defaults.
6394 rp='Installation prefix to use?'
6402 *) oldprefix="$prefix";;
6411 *) afsroot=$afsroot ;;
6417 $define|true) afs=true ;;
6418 $undef|false) afs=false ;;
6419 *) if test -d $afsroot; then
6427 echo "AFS may be running... I'll be extra cautious then..." >&4
6429 echo "AFS does not seem to be running..." >&4
6432 : determine installation prefix for where package is to be installed.
6436 Since you are running AFS, I need to distinguish the directory in which
6437 files will reside from the directory in which they are installed (and from
6438 which they are presumably copied to the former directory by occult means).
6441 case "$installprefix" in
6442 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
6443 *) dflt="$installprefix";;
6448 In some special cases, particularly when building $package for distribution,
6449 it is convenient to distinguish between the directory in which files should
6450 be installed from the directory ($prefix) in which they
6451 will eventually reside. For most users, these two directories are the same.
6454 case "$installprefix" in
6456 *) dflt=$installprefix;;
6460 rp='What installation prefix should I use for installing files?'
6462 installprefix="$ans"
6463 installprefixexp="$ansexp"
6465 : set the prefixit variable, to compute a suitable default value
6466 prefixit='case "$3" in
6468 case "$oldprefix" in
6469 "") eval "$1=\"\$$2\"";;
6476 ""|" ") eval "$1=\"\$$2\"";;
6482 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
6484 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
6485 /*-$oldprefix/*|\~*-$oldprefix/*)
6486 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
6487 *) eval "$1=\"\$$2\"";;
6491 : get the patchlevel
6493 echo "Getting the current patchlevel..." >&4
6494 if $test -r $rsrc/patchlevel.h;then
6495 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
6496 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
6497 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6498 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
6499 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
6500 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6501 perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
6510 $echo "(You do not have patchlevel.h. Eek.)"
6512 if $test -r $rsrc/.patch ; then
6513 if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
6514 perl_patchlevel=`cat $rsrc/.patch`
6517 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
6518 version_patchlevel_string="version $patchlevel subversion $subversion"
6519 case "$perl_patchlevel" in
6521 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
6524 $echo "(You have $package $version_patchlevel_string.)"
6528 : XXX Should be a Configure test for double-dots in filenames.
6529 version=`echo $revision $patchlevel $subversion | \
6530 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6531 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6532 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6535 version=`echo $revision $patchlevel $subversion | \
6536 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6537 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6538 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6541 : Special case the 5.005_xx maintenance series, which used 5.005
6542 : without any subversion label as a subdirectory in $sitelib
6543 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
6544 api_versionstring='5.005'
6547 : determine installation style
6548 : For now, try to deduce it from prefix unless it is already set.
6549 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
6550 case "$installstyle" in
6551 '') case "$prefix" in
6552 *perl*) dflt='lib';;
6553 *) dflt='lib/perl5' ;;
6556 *) dflt="$installstyle" ;;
6558 : Probably not worth prompting for this since we prompt for all
6559 : the directories individually, and the prompt would be too long and
6563 : determine where private library files go
6564 : Usual default is /usr/local/lib/perl5/$version.
6565 : Also allow things like /opt/perl/lib/$version, since
6566 : /opt/perl/lib/perl5... would be redundant.
6567 : The default "style" setting is made in installstyle.U
6568 case "$installstyle" in
6569 *lib/perl5*) set dflt privlib lib/$package/$version ;;
6570 *) set dflt privlib lib/$version ;;
6575 There are some auxiliary files for $package that need to be put into a
6576 private library directory that is accessible by everyone.
6580 rp='Pathname where the private library files will reside?'
6583 privlibexp="$ansexp"
6584 : Change installation prefix, if necessary.
6585 if $test X"$prefix" != X"$installprefix"; then
6586 installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
6588 installprivlib="$privlibexp"
6591 : set the prefixup variable, to restore leading tilda escape
6592 prefixup='case "$prefixexp" in
6594 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
6597 : determine where public architecture dependent libraries go
6600 : privlib default is /usr/local/lib/$package/$version
6601 : archlib default is /usr/local/lib/$package/$version/$archname
6602 : privlib may have an optional trailing /share.
6603 tdflt=`echo $privlib | $sed 's,/share$,,'`
6604 tdflt=$tdflt/$archname
6613 $spackage contains architecture-dependent library files. If you are
6614 sharing libraries in a heterogeneous environment, you might store
6615 these files in a separate location. Otherwise, you can just include
6616 them with the rest of the public library files.
6620 rp='Where do you want to put the public architecture-dependent libraries?'
6623 archlibexp="$ansexp"
6624 if $test X"$archlib" = X"$privlib"; then
6629 : Change installation prefix, if necessary.
6630 if $test X"$prefix" != X"$installprefix"; then
6631 installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
6633 installarchlib="$archlibexp"
6637 : Binary compatibility with 5.005 is not possible for builds
6638 : with advanced features
6639 case "$usethreads$usemultiplicity" in
6641 bincompat5005="$undef"
6642 d_bincompat5005="$undef"
6646 This version of Perl can be compiled for binary compatibility with 5.005.
6647 If you decide to do so, you will be able to continue using most of the
6648 extensions that were compiled for Perl 5.005.
6651 case "$bincompat5005$d_bincompat5005" in
6652 *"$undef"*) dflt=n ;;
6655 rp='Binary compatibility with Perl 5.005?'
6658 y*) val="$define" ;;
6663 case "$d_bincompat5005" in
6665 bincompat5005="$define"
6667 *) bincompat5005="$undef"
6668 d_bincompat5005="$undef"
6675 : see if setuid scripts can be secure
6678 Some kernels have a bug that prevents setuid #! scripts from being
6679 secure. Some sites have disabled setuid #! scripts because of this.
6681 First let's decide if your kernel supports secure setuid #! scripts.
6682 (If setuid #! scripts would be secure but have been disabled anyway,
6683 don't say that they are secure if asked.)
6688 if $test -d /dev/fd; then
6689 echo "#!$ls" >reflect
6690 chmod +x,u+s reflect
6691 ./reflect >flect 2>&1
6692 if $contains "/dev/fd" flect >/dev/null; then
6693 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6697 If you are not sure if they are secure, I can check but I'll need a
6698 username and password different from the one you are using right now.
6699 If you don't have such a username or don't want me to test, simply
6703 rp='Other username to test security of setuid scripts with?'
6708 case "$d_suidsafe" in
6709 '') echo "I'll assume setuid scripts are *not* secure." >&4
6712 echo "Well, the $hint value is *not* secure." >&4
6714 *) echo "Well, the $hint value *is* secure." >&4
6719 $rm -f reflect flect
6720 echo "#!$ls" >reflect
6721 chmod +x,u+s reflect
6724 echo '"su" will (probably) prompt you for '"$ans's password."
6725 su $ans -c './reflect >flect'
6726 if $contains "/dev/fd" flect >/dev/null; then
6727 echo "Okay, it looks like setuid scripts are secure." >&4
6730 echo "I don't think setuid scripts are secure." >&4
6735 rp='Does your kernel have *secure* setuid scripts?'
6738 [yY]*) val="$define";;
6743 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6744 echo "(That's for file descriptors, not floppy disks.)"
6750 $rm -f reflect flect
6752 : now see if they want to do setuid emulation
6755 case "$d_suidsafe" in
6758 echo "No need to emulate SUID scripts since they are secure here." >&4
6762 Some systems have disabled setuid scripts, especially systems where
6763 setuid scripts cannot be secure. On systems where setuid scripts have
6764 been disabled, the setuid/setgid bits on scripts are currently
6765 useless. It is possible for $package to detect those bits and emulate
6766 setuid/setgid in a secure fashion. This emulation will only work if
6767 setuid scripts have been disabled in your kernel.
6771 "$define") dflt=y ;;
6774 rp="Do you want to do setuid/setgid emulation?"
6777 [yY]*) val="$define";;
6785 : see if this is a malloc.h system
6786 set malloc.h i_malloc
6789 : see if stdlib is available
6790 set stdlib.h i_stdlib
6793 : determine which malloc to compile in
6795 case "$usemymalloc" in
6796 [yY]*|true|$define) dflt='y' ;;
6797 [nN]*|false|$undef) dflt='n' ;;
6798 *) case "$ptrsize" in
6804 rp="Do you wish to attempt to use the malloc that comes with $package?"
6810 mallocsrc='malloc.c'
6811 mallocobj="malloc$_o"
6812 d_mymalloc="$define"
6815 : Remove malloc from list of libraries to use
6816 echo "Removing unneeded -lmalloc from library list" >&4
6817 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6820 echo "libs = $libs" >&4
6832 : compute the return types of malloc and free
6834 $cat >malloc.c <<END
6838 #include <sys/types.h>
6852 case "$malloctype" in
6854 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6861 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6865 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6872 echo "Your system uses $freetype free(), it would seem." >&4
6876 After $package is installed, you may wish to install various
6877 add-on modules and utilities. Typically, these add-ons will
6878 be installed under $prefix with the rest
6879 of this package. However, you may wish to install such add-ons
6880 elsewhere under a different prefix.
6882 If you do not wish to put everything under a single prefix, that's
6883 ok. You will be prompted for the individual locations; this siteprefix
6884 is only used to suggest the defaults.
6886 The default should be fine for most people.
6890 rp='Installation prefix to use for add-on modules and utilities?'
6891 : XXX Here might be another good place for an installstyle setting.
6892 case "$siteprefix" in
6894 *) dflt=$siteprefix ;;
6897 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6899 case "$siteprefix" in
6903 *) oldsiteprefix="$prefix";;
6908 siteprefixexp="$ansexp"
6910 : determine where site specific libraries go.
6911 : Usual default is /usr/local/lib/perl5/site_perl/$version
6912 : The default "style" setting is made in installstyle.U
6913 : XXX No longer works with Prefixit stuff.
6914 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6916 '') case "$installstyle" in
6917 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6918 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6926 The installation process will create a directory for
6927 site-specific extensions and modules. Most users find it convenient
6928 to place all site-specific files in this directory rather than in the
6929 main distribution directory.
6933 rp='Pathname for the site-specific library files?'
6936 sitelibexp="$ansexp"
6937 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
6938 : Change installation prefix, if necessary.
6939 if $test X"$prefix" != X"$installprefix"; then
6940 installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
6942 installsitelib="$sitelibexp"
6945 : determine where site specific architecture-dependent libraries go.
6946 : sitelib default is /usr/local/lib/perl5/site_perl/$version
6947 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
6948 : sitelib may have an optional trailing /share.
6950 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
6951 dflt="$dflt/$archname"
6956 set sitearch sitearch none
6960 The installation process will also create a directory for
6961 architecture-dependent site-specific extensions and modules.
6965 rp='Pathname for the site-specific architecture-dependent library files?'
6968 sitearchexp="$ansexp"
6969 : Change installation prefix, if necessary.
6970 if $test X"$prefix" != X"$installprefix"; then
6971 installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
6973 installsitearch="$sitearchexp"
6978 The installation process will also create a directory for
6979 vendor-supplied add-ons. Vendors who supply perl with their system
6980 may find it convenient to place all vendor-supplied files in this
6981 directory rather than in the main distribution directory. This will
6982 ease upgrades between binary-compatible maintenance versions of perl.
6984 Of course you may also use these directories in whatever way you see
6985 fit. For example, you might use them to access modules shared over a
6986 company-wide network.
6988 The default answer should be fine for most people.
6989 This causes further questions about vendor add-ons to be skipped
6990 and no vendor-specific directories will be configured for perl.
6993 rp='Do you want to configure vendor-specific add-on directories?'
6994 case "$usevendorprefix" in
6995 define|true|[yY]*) dflt=y ;;
6996 *) : User may have set vendorprefix directly on Configure command line.
6997 case "$vendorprefix" in
7006 rp='Installation prefix to use for vendor-supplied add-ons?'
7007 case "$vendorprefix" in
7009 *) dflt=$vendorprefix ;;
7012 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7014 case "$vendorprefix" in
7018 *) oldvendorprefix="$prefix";;
7022 usevendorprefix="$define"
7024 vendorprefixexp="$ansexp"
7026 *) usevendorprefix="$undef"
7032 case "$vendorprefix" in
7033 '') d_vendorlib="$undef"
7037 *) d_vendorlib="$define"
7038 : determine where vendor-supplied modules go.
7039 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
7040 case "$vendorlib" in
7042 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7043 case "$installstyle" in
7044 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
7045 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
7048 *) dflt="$vendorlib"
7052 rp='Pathname for the vendor-supplied library files?'
7055 vendorlibexp="$ansexp"
7058 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
7059 : Change installation prefix, if necessary.
7060 if $test X"$prefix" != X"$installprefix"; then
7061 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
7063 installvendorlib="$vendorlibexp"
7066 case "$vendorprefix" in
7067 '') d_vendorarch="$undef"
7071 *) d_vendorarch="$define"
7072 : determine where vendor-supplied architecture-dependent libraries go.
7073 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
7074 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
7075 : vendorlib may have an optional trailing /share.
7076 case "$vendorarch" in
7077 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
7078 dflt="$dflt/$archname"
7080 *) dflt="$vendorarch" ;;
7083 rp='Pathname for vendor-supplied architecture-dependent files?'
7086 vendorarchexp="$ansexp"
7089 : Change installation prefix, if necessary.
7090 if $test X"$prefix" != X"$installprefix"; then
7091 installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
7093 installvendorarch="$vendorarchexp"
7096 : Final catch-all directories to search
7099 Lastly, you can have perl look in other directories for extensions and
7100 modules in addition to those already specified.
7101 These directories will be searched after
7105 test X"$vendorlib" != "X" && echo ' ' $vendorlib
7106 test X"$vendorarch" != "X" && echo ' ' $vendorarch
7108 case "$otherlibdirs" in
7109 ''|' ') dflt='none' ;;
7110 *) dflt="$otherlibdirs" ;;
7113 Enter a colon-separated set of extra paths to include in perl's @INC
7114 search path, or enter 'none' for no extra paths.
7118 rp='Colon-separated list of additional directories for perl to search?'
7121 ' '|''|none) otherlibdirs=' ' ;;
7122 *) otherlibdirs="$ans" ;;
7124 case "$otherlibdirs" in
7128 set d_perl_otherlibdirs
7131 : Cruising for prototypes
7133 echo "Checking out function prototypes..." >&4
7134 $cat >prototype.c <<'EOCP'
7135 int main(int argc, char *argv[]) {
7138 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
7139 echo "Your C compiler appears to support function prototypes."
7142 echo "Your C compiler doesn't seem to understand function prototypes."
7149 case "$prototype" in
7151 *) ansi2knr='ansi2knr'
7156 This version of $package can only be compiled by a compiler that
7157 understands function prototypes. Unfortunately, your C compiler
7159 doesn't seem to understand them. Sorry about that.
7161 If GNU cc is available for your system, perhaps you could try that instead.
7163 Eventually, we hope to support building Perl with pre-ANSI compilers.
7164 If you would like to help in that effort, please contact <perlbug@perl.org>.
7166 Aborting Configure now.
7172 : determine where public executables go
7177 rp='Pathname where the public executables will reside?'
7179 if $test "X$ansexp" != "X$binexp"; then
7184 : Change installation prefix, if necessary.
7185 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
7186 if $test X"$prefix" != X"$installprefix"; then
7187 installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
7189 installbin="$binexp"
7198 Perl can be built with extra modules or bundles of modules which
7199 will be fetched from the CPAN and installed alongside Perl.
7201 Notice that you will need access to the CPAN; either via the Internet,
7202 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
7203 be asked later to configure the CPAN.pm module which will in turn do
7204 the installation of the rest of the extra modules or bundles.)
7206 Notice also that if the modules require any external software such as
7207 libraries and headers (the libz library and the zlib.h header for the
7208 Compress::Zlib module, for example) you MUST have any such software
7209 already installed, this configuration process will NOT install such
7212 If this doesn't make any sense to you, just accept the default '$dflt'.
7214 rp='Install any extra modules (y or n)?'
7220 Please list any extra modules or bundles to be installed from CPAN,
7221 with spaces between the names. The names can be in any format the
7222 'install' command of CPAN.pm will understand. (Answer 'none',
7223 without the quotes, to install no extra modules or bundles.)
7233 $rm -f ../extras.lst
7235 *) echo "(Saving the list of extras for later...)"
7236 echo "$extras" > ../extras.lst
7244 : Find perl5.005 or later.
7245 echo "Looking for a previously installed perl5.005 or later... "
7247 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
7248 : Check if this perl is recent and can load a simple module
7249 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7252 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7262 '') echo "None found. That's ok.";;
7263 *) echo "Using $perl5." ;;
7266 : Determine list of previous versions to include in @INC
7267 $cat > getverlist <<EOPL
7270 \$api_versionstring = "$api_versionstring";
7271 \$version = "$version";
7272 \$stem = "$sitelib_stem";
7273 \$archname = "$archname";
7275 $cat >> getverlist <<'EOPL'
7276 # Can't have leading @ because metaconfig interprets it as a command!
7277 ;@inc_version_list=();
7278 # XXX Redo to do opendir/readdir?
7281 ;@candidates = glob("5.*");
7287 # XXX ToDo: These comparisons must be reworked when two-digit
7288 # subversions come along, so that 5.7.10 compares as greater than
7289 # 5.7.3! By that time, hope that 5.6.x is sufficiently
7290 # widespread that we can use the built-in version vectors rather
7291 # than reinventing them here. For 5.6.0, however, we must
7292 # assume this script will likely be run by 5.005_0x. --AD 1/2000.
7293 foreach $d (@candidates) {
7294 if ($d lt $version) {
7295 if ($d ge $api_versionstring) {
7296 unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
7298 elsif ($d ge "5.005") {
7299 unshift(@inc_version_list, grep { -d } $d);
7303 # Skip newer version. I.e. don't look in
7304 # 5.7.0 if we're installing 5.6.1.
7308 if (@inc_version_list) {
7309 print join(' ', @inc_version_list);
7312 # Blank space to preserve value for next Configure run.
7317 case "$inc_version_list" in
7318 '') if test -x "$perl5$exe_ext"; then
7319 dflt=`$perl5 getverlist`
7324 $undef) dflt='none' ;;
7325 *) eval dflt=\"$inc_version_list\" ;;
7328 ''|' ') dflt=none ;;
7331 5.005) case "$bincompat5005" in
7332 $define|true|[yY]*) ;;
7339 In order to ease the process of upgrading, this version of perl
7340 can be configured to use modules built and installed with earlier
7341 versions of perl that were installed under $prefix. Specify here
7342 the list of earlier versions that this version of perl should check.
7343 If Configure detected no earlier versions of perl installed under
7344 $prefix, then the list will be empty. Answer 'none' to tell perl
7345 to not search earlier versions.
7347 The default should almost always be sensible, so if you're not sure,
7348 just accept the default.
7351 rp='List of earlier versions to include in @INC?'
7354 [Nn]one|''|' ') inc_version_list=' ' ;;
7355 *) inc_version_list="$ans" ;;
7357 case "$inc_version_list" in
7359 inc_version_list_init='0';;
7360 *) inc_version_list_init=`echo $inc_version_list |
7361 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
7366 : determine whether to install perl also as /usr/bin/perl
7369 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
7371 Many scripts expect perl to be installed as /usr/bin/perl.
7372 I can install the perl you are about to compile also as /usr/bin/perl
7373 (in addition to $installbin/perl).
7375 case "$installusrbinperl" in
7376 "$undef"|[nN]*) dflt='n';;
7379 rp="Do you want to install perl as /usr/bin/perl?"
7382 [yY]*) val="$define";;
7388 set installusrbinperl
7391 : see if dld is available
7395 : see if dlopen exists
7402 : determine which dynamic loading, if any, to compile in
7404 dldir="ext/DynaLoader"
7417 $define) dflt='y' ;;
7420 $define) dflt='y' ;;
7422 : Does a dl_xxx.xs file exist for this operating system
7423 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7426 rp="Do you wish to use dynamic loading?"
7433 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7434 dflt="$dldir/dl_${osname}.xs"
7435 elif $test "$d_dlopen" = "$define" ; then
7436 dflt="$dldir/dl_dlopen.xs"
7437 elif $test "$i_dld" = "$define" ; then
7438 dflt="$dldir/dl_dld.xs"
7443 *) dflt="$dldir/$dlsrc"
7446 echo "The following dynamic loading files are available:"
7447 : Can not go over to $dldir because getfile has path hard-coded in.
7448 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7449 rp="Source file to use for dynamic loading"
7455 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7459 Some systems may require passing special flags to $cc -c to
7460 compile modules that will be used to create a shared library.
7461 To use no flags, say "none".
7464 case "$cccdlflags" in
7465 '') case "$gccversion" in
7466 '') case "$osname" in
7468 next) dflt='none' ;;
7469 irix*) dflt='-KPIC' ;;
7470 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7471 sunos) dflt='-pic' ;;
7475 *) case "$osname" in
7476 darwin) dflt='none' ;;
7477 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7482 *) dflt="$cccdlflags" ;;
7484 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7487 none) cccdlflags=' ' ;;
7488 *) cccdlflags="$ans" ;;
7493 Some systems use ld to create libraries that can be dynamically loaded,
7494 while other systems (such as those using ELF) use $cc.
7498 '') $cat >try.c <<'EOM'
7499 /* Test for whether ELF binaries are produced */
7504 int i = open("a.out",O_RDONLY);
7507 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7508 exit(0); /* succeed (yes, it's ELF) */
7513 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7515 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7519 echo "I'll use ld to build dynamic libraries."
7528 rp="What command should be used to create dynamic libraries?"
7534 Some systems may require passing special flags to $ld to create a
7535 library that can be dynamically loaded. If your ld flags include
7536 -L/other/path options to locate libraries outside your loader's normal
7537 search path, you may need to specify those -L options here as well. To
7538 use no flags, say "none".
7541 case "$lddlflags" in
7542 '') case "$osname" in
7543 beos) dflt='-nostart' ;;
7545 case "$gccversion" in
7546 '') dflt="$dflt +vnocompatwarnings" ;;
7549 linux|irix*) dflt='-shared' ;;
7550 next) dflt='none' ;;
7551 solaris) dflt='-G' ;;
7552 sunos) dflt='-assert nodefinitions' ;;
7553 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
7557 *) dflt="$lddlflags" ;;
7560 : Try to guess additional flags to pick up local libraries.
7561 : Be careful not to append to a plain 'none'
7565 for thisflag in $ldflags; do
7570 *) dflt="$dflt $thisflag" ;;
7577 ''|' ') dflt='none' ;;
7580 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
7583 none) lddlflags=' ' ;;
7584 *) lddlflags="$ans" ;;
7589 Some systems may require passing special flags to $cc to indicate that
7590 the resulting executable will use dynamic linking. To use no flags,
7594 case "$ccdlflags" in
7595 '') case "$osname" in
7596 hpux) dflt='-Wl,-E' ;;
7597 linux) dflt='-rdynamic' ;;
7598 next) dflt='none' ;;
7599 sunos) dflt='none' ;;
7603 *) dflt="$ccdlflags" ;;
7605 rp="Any special flags to pass to $cc to use dynamic linking?"
7608 none) ccdlflags=' ' ;;
7609 *) ccdlflags="$ans" ;;
7623 # No dynamic loading being used, so don't bother even to prompt.
7626 *) case "$useshrplib" in
7627 '') case "$osname" in
7628 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
7630 also='Building a shared libperl is required for dynamic loading to work on your system.'
7635 also='Building a shared libperl is needed for MAB support.'
7653 The perl executable is normally obtained by linking perlmain.c with
7654 libperl${_a}, any static extensions (usually just DynaLoader), and
7655 any other libraries needed on this system (such as -lm, etc.). Since
7656 your system supports dynamic loading, it is probably possible to build
7657 a shared libperl.$so. If you will have more than one executable linked
7658 to libperl.$so, this will significantly reduce the size of each
7659 executable, but it may have a noticeable affect on performance. The
7660 default is probably sensible for your system.
7664 rp="Build a shared libperl.$so (y/n)"
7668 useshrplib='true' ;;
7669 *) useshrplib='false' ;;
7674 case "$useshrplib" in
7678 # Figure out a good name for libperl.so. Since it gets stored in
7679 # a version-specific architecture-dependent library, the version
7680 # number isn't really that important, except for making cc/ld happy.
7682 # A name such as libperl.so.3.1
7683 majmin="libperl.$so.$patchlevel.$subversion"
7684 # A name such as libperl.so.301
7685 majonly=`echo $patchlevel $subversion |
7686 $awk '{printf "%d%02d", $1, $2}'`
7687 majonly=libperl.$so.$majonly
7688 # I'd prefer to keep the os-specific stuff here to a minimum, and
7689 # rely on figuring it out from the naming of libc.
7690 case "${osname}${osvers}" in
7693 # XXX How handle the --version stuff for MAB?
7695 linux*) # ld won't link with a bare -lperl otherwise.
7698 cygwin*) # ld links against an importlib
7699 dflt=libperl$lib_ext
7701 *) # Try to guess based on whether libc has major.minor.
7703 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
7704 *libc.$so.[0-9]*) dflt=$majonly ;;
7705 *) dflt=libperl.$so ;;
7715 I need to select a good name for the shared libperl. If your system uses
7716 library names with major and minor numbers, then you might want something
7717 like $majmin. Alternatively, if your system uses a single version
7718 number for shared libraries, then you might want to use $majonly.
7719 Or, your system might be quite happy with a simple libperl.$so.
7721 Since the shared libperl will get installed into a version-specific
7722 architecture-dependent directory, the version number of the shared perl
7723 library probably isn't important, so the default should be o.k.
7726 rp='What name do you want to give to the shared libperl?'
7729 echo "Ok, I'll use $libperl"
7732 libperl="libperl${_a}"
7736 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
7740 WARNING: Use of the shrpdir variable for the installation location of
7741 the shared $libperl is not supported. It was never documented and
7742 will not work in this version. Let me (perlbug@perl.org)
7743 know of any problems this may cause.
7749 But your current setting of $shrpdir is
7750 the default anyway, so it's harmless.
7755 Further, your current attempted setting of $shrpdir
7756 conflicts with the value of $archlibexp/CORE
7757 that installperl will use.
7764 # How will the perl executable find the installed shared $libperl?
7765 # Add $xxx to ccdlflags.
7766 # If we can't figure out a command-line option, use $shrpenv to
7767 # set env LD_RUN_PATH. The main perl makefile uses this.
7768 shrpdir=$archlibexp/CORE
7771 if "$useshrplib"; then
7774 # We'll set it in Makefile.SH...
7780 xxx="-Wl,-R$shrpdir"
7782 bsdos|linux|irix*|dec_osf)
7783 xxx="-Wl,-rpath,$shrpdir"
7786 # next doesn't like the default...
7789 # beos doesn't like the default, either.
7792 # hpux doesn't like the default, either.
7793 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
7796 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
7802 # Only add $xxx if it isn't already in ccdlflags.
7803 case " $ccdlflags " in
7805 *) ccdlflags="$ccdlflags $xxx"
7808 Adding $xxx to the flags
7809 passed to $ld so that the perl executable will find the
7810 installed shared $libperl.
7818 # Fix ccdlflags in AIX for building external extensions.
7819 # (For building Perl itself bare -bE:perl.exp is needed,
7820 # Makefile.SH takes care of this.)
7822 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
7824 # Respect a hint or command-line value.
7826 '') shrpenv="$tmp_shrpenv" ;;
7828 case "$ldlibpthname" in
7829 '') ldlibpthname=LD_LIBRARY_PATH ;;
7830 none) ldlibpthname='' ;;
7833 : determine where manual pages are on this system
7837 syspath='/usr/share/man/man1 /usr/man/man1'
7838 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
7839 syspath="$syspath /usr/man/u_man/man1"
7840 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
7841 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
7842 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
7843 sysman=`./loc . /usr/man/man1 $syspath`
7846 if $test -d "$sysman"; then
7847 echo "System manual is in $sysman." >&4
7849 echo "Could not find manual pages in source form." >&4
7852 : determine where manual pages go
7853 set man1dir man1dir none
7857 $spackage has manual pages available in source form.
7861 echo "However, you don't have nroff, so they're probably useless to you."
7863 '') man1dir="none";;
7866 echo "If you don't want the manual sources installed, answer 'none'."
7871 lookpath="$prefixexp/share/man/man1"
7872 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
7873 lookpath="$lookpath $prefixexp/man/p_man/man1"
7874 lookpath="$lookpath $prefixexp/man/u_man/man1"
7875 lookpath="$lookpath $prefixexp/man/man.1"
7877 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
7878 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
7888 rp="Where do the main $spackage manual pages (source) go?"
7890 if $test "X$man1direxp" != "X$ansexp"; then
7894 man1direxp="$ansexp"
7900 : Change installation prefix, if necessary.
7901 if $test X"$prefix" != X"$installprefix"; then
7902 installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
7904 installman1dir="$man1direxp"
7907 : What suffix to use on installed man pages
7914 rp="What suffix should be used for the main $spackage man pages?"
7916 '') case "$man1dir" in
7930 *) dflt="$man1ext";;
7937 : see if we can have long filenames
7939 first=123456789abcdef
7941 if (echo hi >$first) 2>/dev/null; then
7942 if $test -f 123456789abcde; then
7943 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
7946 echo 'You can have filenames longer than 14 characters.'>&4
7951 You can't have filenames longer than 14 chars.
7952 You can't even think about them!
7958 $rm -rf 123456789abcde*
7960 : determine where library module manual pages go
7961 set man3dir man3dir none
7965 $spackage has manual pages for many of the library modules.
7971 However, you don't have nroff, so they're probably useless to you.
7974 '') man3dir="none";;
7978 case "$d_flexfnam" in
7981 However, your system can't handle the long file names like File::Basename.3.
7984 '') man3dir="none";;
7988 echo "If you don't want the manual sources installed, answer 'none'."
7989 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7991 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
7992 if $test -d "$privlib/man/man3"; then
7995 WARNING: Previous versions of perl installed man3 pages into
7996 $privlib/man/man3. This version will suggest a
7997 new default of $dflt.
8001 rp='Do you wish to preserve the old behavior?(y/n)'
8004 y*) dflt="$privlib/man/man3" ;;
8009 *) dflt="$man3dir" ;;
8016 rp="Where do the $package library man pages (source) go?"
8019 man3direxp="$ansexp"
8025 : Change installation prefix, if necessary.
8026 if $test X"$prefix" != X"$installprefix"; then
8027 installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
8029 installman3dir="$man3direxp"
8032 : What suffix to use on installed man pages
8038 rp="What suffix should be used for the $package library man pages?"
8040 '') case "$man3dir" in
8054 *) dflt="$man3ext";;
8061 : see if we have to deal with yellow pages, now NIS.
8062 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8063 if $test -f /usr/etc/nibindd; then
8065 echo "I'm fairly confident you're on a NeXT."
8067 rp='Do you get the hosts file via NetInfo?'
8076 y*) hostcat='nidump hosts .';;
8077 *) case "$hostcat" in
8078 nidump*) hostcat='';;
8088 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8096 rp='Are you getting the hosts file via yellow pages?'
8099 y*) hostcat='ypcat hosts';;
8100 *) hostcat='cat /etc/hosts';;
8106 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8109 '') test -f /etc/group && groupcat='cat /etc/group';;
8112 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8115 : now get the host name
8117 echo "Figuring out host name..." >&4
8118 case "$myhostname" in
8120 echo 'Maybe "hostname" will work...'
8121 if tans=`sh -c hostname 2>&1` ; then
8129 if $test "$cont"; then
8131 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8132 if tans=`cat /etc/systemid 2>&1` ; then
8134 phostname='cat /etc/systemid'
8135 echo "Whadyaknow. Xenix always was a bit strange..."
8138 elif $test -r /etc/systemid; then
8139 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8142 if $test "$cont"; then
8143 echo 'No, maybe "uuname -l" will work...'
8144 if tans=`sh -c 'uuname -l' 2>&1` ; then
8146 phostname='uuname -l'
8148 echo 'Strange. Maybe "uname -n" will work...'
8149 if tans=`sh -c 'uname -n' 2>&1` ; then
8151 phostname='uname -n'
8153 echo 'Oh well, maybe I can mine it out of whoami.h...'
8154 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8155 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8156 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8158 case "$myhostname" in
8159 '') echo "Does this machine have an identity crisis or something?"
8162 echo "Well, you said $myhostname before..."
8163 phostname='echo $myhostname';;
8169 case "$myhostname" in
8170 '') myhostname=noname ;;
8172 : you do not want to know about this
8177 if $test "$myhostname" ; then
8179 rp='Your host name appears to be "'$myhostname'".'" Right?"
8187 : bad guess or no guess
8188 while $test "X$myhostname" = X ; do
8190 rp="Please type the (one word) name of your host:"
8195 : translate upper to lower if necessary
8196 case "$myhostname" in
8198 echo "(Normalizing case in your host name)"
8199 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8203 case "$myhostname" in
8205 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8206 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8207 echo "(Trimming domain name from host name--host name is now $myhostname)"
8209 *) case "$mydomain" in
8212 test "X$hostcat" = "Xypcat hosts" &&
8213 ypmatch "$myhostname" hosts 2>/dev/null |\
8214 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8217 test "X$hostcat" != "X" &&
8218 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8219 /[ ]$myhostname[ . ]/p" > hosts
8222 if $test -f hosts; then
8223 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8224 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8225 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8226 hosts | $sort | $uniq | \
8227 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8228 case `$echo X$dflt` in
8229 X*\ *) echo "(Several hosts in the database matched hostname)"
8232 X.) echo "(You do not have fully-qualified names in the hosts database)"
8236 echo "(I cannot locate a hosts database anywhere)"
8241 tans=`./loc resolv.conf X /etc /usr/etc`
8242 if $test -f "$tans"; then
8243 echo "(Attempting domain name extraction from $tans)"
8244 dflt=.`$sed -n -e 's/ / /g' \
8245 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8246 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8248 .) dflt=.`$sed -n -e 's/ / /g' \
8249 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8250 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8257 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8258 dflt=.`sh -c domainname 2>/dev/null`
8261 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8265 case "$dflt$osname" in
8266 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8267 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8271 .) echo "(Lost all hope -- silly guess then)"
8277 *) dflt="$mydomain";;
8281 rp="What is your domain name?"
8291 : translate upper to lower if necessary
8294 echo "(Normalizing case in your domain name)"
8295 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8299 : a little sanity check here
8300 case "$phostname" in
8303 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8304 $myhostname$mydomain|$myhostname) ;;
8306 case "$phostname" in
8308 echo "(That doesn't agree with your whoami.h file, by the way.)"
8311 echo "(That doesn't agree with your $phostname command, by the way.)"
8321 I need to get your e-mail address in Internet format if possible, i.e.
8322 something like user@host.domain. Please answer accurately since I have
8323 no easy means to double check it. The default value provided below
8324 is most probably close to reality but may not be valid from outside
8325 your organization...
8329 while test "$cont"; do
8331 '') dflt="$cf_by@$myhostname$mydomain";;
8332 *) dflt="$cf_email";;
8334 rp='What is your e-mail address?'
8340 rp='Address does not look like an Internet one. Use it anyway?'
8356 If you or somebody else will be maintaining perl at your site, please
8357 fill in the correct e-mail address here so that they may be contacted
8358 if necessary. Currently, the "perlbug" program included with perl
8359 will send mail to this address in addition to perlbug@perl.org. You may
8360 enter "none" for no administrator.
8363 case "$perladmin" in
8364 '') dflt="$cf_email";;
8365 *) dflt="$perladmin";;
8367 rp='Perl administrator e-mail address'
8371 : determine whether to only install version-specific parts.
8374 Do you want to install only the version-specific parts of the perl
8375 distribution? Usually you do *not* want to do this.
8377 case "$versiononly" in
8378 "$define"|[Yy]*|true) dflt='y' ;;
8381 rp="Do you want to install only the version-specific parts of perl?"
8384 [yY]*) val="$define";;
8390 case "$versiononly" in
8391 "$define") inc_version_list=''
8392 inc_version_list_init=0
8396 : figure out how to guarantee perl startup
8397 case "$startperl" in
8399 case "$sharpbang" in
8403 I can use the #! construct to start perl on your system. This will
8404 make startup of perl scripts faster, but may cause problems if you
8405 want to share those scripts and perl is not in a standard place
8406 ($binexp/perl) on all your platforms. The alternative is to force
8407 a shell by starting the script with a single ':' character.
8410 case "$versiononly" in
8411 "$define") dflt="$binexp/perl$version";;
8412 *) dflt="$binexp/perl";;
8414 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8417 none) startperl=": # use perl";;
8418 *) startperl="#!$ans"
8419 if $test 30 -lt `echo "$ans" | wc -c`; then
8422 WARNING: Some systems limit the #! command to 32 characters.
8423 If you experience difficulty running Perl scripts with #!, try
8424 installing Perl in a directory with a shorter pathname.
8430 *) startperl=": # use perl"
8435 echo "I'll use $startperl to start perl scripts."
8437 : figure best path for perl in scripts
8440 case "$versiononly" in
8441 "$define") perlpath="$binexp/perl$version";;
8442 *) perlpath="$binexp/perl";;
8444 case "$startperl" in
8449 I will use the "eval 'exec'" idiom to start Perl on your system.
8450 I can use the full path of your Perl binary for this purpose, but
8451 doing so may cause problems if you want to share those scripts and
8452 Perl is not always in a standard place ($binexp/perl).
8456 rp="What path shall I use in \"eval 'exec'\"?"
8463 case "$startperl" in
8465 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8468 : determine where public executable scripts go
8469 set scriptdir scriptdir
8471 case "$scriptdir" in
8474 : guess some guesses
8475 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8476 $test -d /usr/share/bin && dflt=/usr/share/bin
8477 $test -d /usr/local/script && dflt=/usr/local/script
8478 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8479 $test -d $prefixexp/script && dflt=$prefixexp/script
8483 *) dflt="$scriptdir"
8488 Some installations have a separate directory just for executable scripts so
8489 that they can mount it across multiple architectures but keep the scripts in
8490 one spot. You might, for example, have a subdirectory of /usr/share for this.
8491 Or you might just lump your scripts in with all your other executables.
8495 rp='Where do you keep publicly executable scripts?'
8497 if $test "X$ansexp" != "X$scriptdirexp"; then
8501 scriptdirexp="$ansexp"
8502 : Change installation prefix, if necessary.
8503 if $test X"$prefix" != X"$installprefix"; then
8504 installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
8506 installscript="$scriptdirexp"
8509 : determine where add-on public executables go
8511 '') dflt=$siteprefix/bin ;;
8515 rp='Pathname where the add-on public executables should be installed?'
8518 sitebinexp="$ansexp"
8519 : Change installation prefix, if necessary.
8520 if $test X"$prefix" != X"$installprefix"; then
8521 installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
8523 installsitebin="$sitebinexp"
8526 : define an is-a-typedef? function
8527 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8529 "") inclist="sys/types.h";;
8531 eval "varval=\$$var";
8535 for inc in $inclist; do
8536 echo "#include <$inc>" >>temp.c;
8538 echo "#ifdef $type" >> temp.c;
8539 echo "printf(\"We have $type\");" >> temp.c;
8540 echo "#endif" >> temp.c;
8541 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8542 if $contains $type temp.E >/dev/null 2>&1; then
8548 *) eval "$var=\$varval";;
8551 : define an is-a-typedef? function that prompts if the type is not available.
8552 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8554 "") inclist="sys/types.h";;
8556 eval "varval=\$$var";
8560 for inc in $inclist; do
8561 echo "#include <$inc>" >>temp.c;
8563 echo "#ifdef $type" >> temp.c;
8564 echo "printf(\"We have $type\");" >> temp.c;
8565 echo "#endif" >> temp.c;
8566 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8568 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
8569 if $contains $type temp.E >/dev/null 2>&1; then
8570 echo "$type found." >&4;
8573 echo "$type NOT found." >&4;
8579 *) eval "$var=\$varval";;
8582 : see what type lseek is declared as in the kernel
8583 rp="What is the type used for lseek's offset on this system?"
8584 set off_t lseektype long stdio.h sys/types.h
8588 echo "Checking to see how big your file offsets are..." >&4
8590 #include <sys/types.h>
8594 printf("%d\n", (int)sizeof($lseektype));
8599 if eval $compile_ok; then
8600 lseeksize=`$run ./try`
8601 echo "Your file offsets are $lseeksize bytes long."
8605 echo "(I can't seem to compile the test program. Guessing...)"
8606 rp="What is the size of your file offsets (in bytes)?"
8612 : see what type file positions are declared as in the library
8613 rp="What is the type for file position used by fsetpos()?"
8614 set fpos_t fpostype long stdio.h sys/types.h
8619 *_t) zzz="$fpostype" ;;
8622 echo "Checking the size of $zzz..." >&4
8624 #include <sys/types.h>
8627 printf("%d\n", (int)sizeof($fpostype));
8632 if eval $compile_ok; then
8636 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8639 echo "Your $zzz is $fpossize bytes long."
8645 echo "(I can't compile the test program. Guessing...)" >&4
8646 rp="What is the size of your file positions (in bytes)?"
8653 # Backward compatibility (uselfs is deprecated).
8655 "$define"|true|[yY]*)
8658 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
8660 uselargefiles="$define"
8664 case "$lseeksize:$fpossize" in
8667 You can have files larger than 2 gigabytes.
8670 *) case "$uselargefiles" in
8671 "$undef"|false|[nN]*) dflt='n' ;;
8676 Perl can be built to understand large files (files larger than 2 gigabytes)
8677 on some systems. To do so, Configure can be run with -Duselargefiles.
8679 If this doesn't make any sense to you, just accept the default '$dflt'.
8681 rp='Try to understand large files, if available?'
8684 y|Y) val="$define" ;;
8691 case "$uselargefiles" in
8693 : Look for a hint-file generated 'call-back-unit'. If the
8694 : user has specified that a large files perl is to be built,
8695 : we may need to set or change some other defaults.
8696 if $test -f uselargefiles.cbu; then
8697 echo "Your platform has some specific hints for large file builds, using them..."
8698 . ./uselargefiles.cbu
8700 echo "Rechecking to see how big your file offsets are..." >&4
8702 #include <sys/types.h>
8706 printf("%d\n", (int)sizeof($lseektype));
8711 if eval $compile_ok; then
8712 lseeksize=`$run ./try`
8713 $echo "Your file offsets are now $lseeksize bytes long."
8717 echo "(I can't seem to compile the test program. Guessing...)"
8718 rp="What is the size of your file offsets (in bytes)?"
8723 *_t) zzz="$fpostype" ;;
8726 $echo $n "Rechecking the size of $zzz...$c" >&4
8728 #include <sys/types.h>
8731 printf("%d\n", (int)sizeof($fpostype));
8736 if eval $compile_ok; then
8741 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8744 echo " $fpossize bytes." >&4
8750 echo "(I can't compile the test program. Guessing...)" >&4
8751 rp="What is the size of your file positions (in bytes)?"
8760 case "$vendorprefix" in
8761 '') d_vendorbin="$undef"
8765 *) d_vendorbin="$define"
8766 : determine where vendor-supplied executables go.
8767 case "$vendorbin" in
8768 '') dflt=$vendorprefix/bin ;;
8769 *) dflt="$vendorbin" ;;
8772 rp='Pathname for the vendor-supplied executables directory?'
8775 vendorbinexp="$ansexp"
8778 : Change installation prefix, if necessary.
8779 if $test X"$prefix" != X"$installprefix"; then
8780 installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
8782 installvendorbin="$vendorbinexp"
8785 : see if qgcvt exists
8789 : Check how to convert floats to strings.
8791 if test "X$d_Gconvert" = X; then
8794 echo "Checking for an efficient way to convert floats to strings."
8796 case "$uselongdouble" in
8797 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
8799 case "$d_longdbl" in
8800 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
8802 case "$d_PRIgldbl" in
8803 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
8807 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
8808 char *myname = "gconvert";
8811 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
8812 char *myname = "gcvt";
8815 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
8816 char *myname = "qgcvt";
8817 #define DOUBLETYPE long double
8820 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8822 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
8824 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
8827 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
8829 char *myname = "sprintf";
8833 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8834 #define DOUBLETYPE long double
8836 #define DOUBLETYPE double
8842 #define I_STDLIB $i_stdlib
8848 checkit(expect, got)
8852 if (strcmp(expect, got)) {
8853 printf("%s oddity: Expected %s, got %s\n",
8854 myname, expect, got);
8864 /* This must be 1st test on (which?) platform */
8865 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
8866 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
8867 checkit("0.1", buf);
8869 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
8870 checkit("0.01", buf);
8872 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
8873 checkit("0.001", buf);
8875 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
8876 checkit("0.0001", buf);
8878 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
8879 if (strlen(buf) > 5)
8880 checkit("9e-005", buf); /* for Microsoft ?? */
8882 checkit("9e-05", buf);
8884 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
8887 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
8888 checkit("1.1", buf);
8890 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
8891 checkit("1.01", buf);
8893 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
8894 checkit("1.001", buf);
8896 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
8897 checkit("1.0001", buf);
8899 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
8900 checkit("1.00001", buf);
8902 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
8903 checkit("1.000001", buf);
8905 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
8908 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
8911 /* Some Linux gcvt's give 1.e+5 here. */
8912 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
8913 checkit("100000", buf);
8915 /* Some Linux gcvt's give -1.e+5 here. */
8916 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
8917 checkit("-100000", buf);
8919 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
8920 checkit("123.456", buf);
8922 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
8923 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
8924 /* 34 should be enough to scare even long double
8925 * places into using the e notation. */
8926 if (strlen(buf) > 5)
8927 checkit("1e+034", buf); /* for Microsoft */
8929 checkit("1e+34", buf);
8931 /* For Perl, if you add additional tests here, also add them to
8932 * t/base/num.t for benefit of platforms not using Configure or
8933 * overriding d_Gconvert */
8938 : first add preferred functions to our list
8940 for xxx_convert in $gconvert_preference; do
8941 case $xxx_convert in
8942 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
8943 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
8946 : then add any others
8947 for xxx_convert in gconvert gcvt sprintf; do
8950 *) xxx_list="$xxx_list $xxx_convert" ;;
8954 case "$d_longdbl$uselongdouble" in
8956 : again, add prefered functions to our list first
8958 for xxx_convert in $gconvert_ld_preference; do
8959 case $xxx_convert in
8960 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
8961 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
8964 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
8965 for xxx_convert in qgcvt sprintf $xxx_list; do
8966 case "$xxx_ld_list" in
8967 $xxx_convert*|*" $xxx_convert"*) ;;
8968 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
8971 : if sprintf cannot do long doubles, move it to the end
8972 if test "$d_PRIgldbl" != "$define"; then
8973 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
8975 : if no qgcvt, remove it
8976 if test "$d_qgcvt" != "$define"; then
8977 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
8980 xxx_list="$xxx_ld_list"
8984 for xxx_convert in $xxx_list; do
8985 echo "Trying $xxx_convert..."
8987 set try -DTRY_$xxx_convert
8988 if eval $compile; then
8989 echo "$xxx_convert() found." >&4
8991 echo "I'll use $xxx_convert to convert floats into a string." >&4
8994 echo "...But $xxx_convert didn't work as I expected."
8998 echo "$xxx_convert NOT found." >&4
9002 if test X$xxx_convert = X; then
9003 echo "*** WHOA THERE!!! ***" >&4
9004 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
9008 case "$xxx_convert" in
9009 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
9010 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
9011 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
9012 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
9013 "$define$define$define")
9014 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9015 "$define$define$undef")
9016 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9017 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9024 : see if _fwalk exists
9028 : Initialize h_fcntl
9031 : Initialize h_sysfile
9034 : access call always available on UNIX
9038 : locate the flags for 'access()'
9042 $cat >access.c <<'EOCP'
9043 #include <sys/types.h>
9048 #include <sys/file.h>
9057 : check sys/file.h first, no particular reason here
9058 if $test `./findhdr sys/file.h` && \
9059 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9061 echo "<sys/file.h> defines the *_OK access constants." >&4
9062 elif $test `./findhdr fcntl.h` && \
9063 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9065 echo "<fcntl.h> defines the *_OK access constants." >&4
9066 elif $test `./findhdr unistd.h` && \
9067 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9068 echo "<unistd.h> defines the *_OK access constants." >&4
9070 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9076 : see if accessx exists
9077 set accessx d_accessx
9080 : see if alarm exists
9084 : define a fucntion to check prototypes
9085 $cat > protochk <<EOSH
9088 optimize="$optimize"
9090 prototype="$prototype"
9095 $cat >> protochk <<'EOSH'
9100 while test $# -ge 2; do
9102 $define) echo "#include <$2>" >> try.c ;;
9103 literal) echo "$2" >> try.c ;;
9107 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
9108 cat >> try.c <<'EOCP'
9109 #ifdef CAN_PROTOTYPE
9110 #define _(args) args
9115 echo "$foo" >> try.c
9116 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
9117 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
9125 hasproto='varname=$1; func=$2; shift; shift;
9126 while $test $# -ge 2; do
9128 $define) echo "#include <$2>";;
9132 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
9133 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
9134 echo "$func() prototype found.";
9137 echo "$func() prototype NOT found.";
9142 $rm -f try.c tryout.c'
9144 : see if sys/types.h has to be included
9145 set sys/types.h i_systypes
9148 : see if sys/select.h has to be included
9149 set sys/select.h i_sysselct
9152 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9153 while $test $# -ge 2; do
9155 $define) echo "#include <$2>";;
9159 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9161 if eval $compile; then
9170 : see if we should include time.h, sys/time.h, or both
9172 if test "X$timeincl" = X; then
9173 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9174 $echo $n "I'm now running the test program...$c"
9175 $cat >try.c <<'EOCP'
9176 #include <sys/types.h>
9181 #ifdef SYSTIMEKERNEL
9184 #include <sys/time.h>
9187 #include <sys/select.h>
9196 struct timezone tzp;
9198 if (foo.tm_sec == foo.tm_sec)
9201 if (bar.tv_sec == bar.tv_sec)
9208 for s_timezone in '-DS_TIMEZONE' ''; do
9210 for s_timeval in '-DS_TIMEVAL' ''; do
9211 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9212 for i_time in '' '-DI_TIME'; do
9213 for i_systime in '-DI_SYSTIME' ''; do
9216 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9217 if eval $compile; then
9218 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9222 $echo $n "Succeeded with $flags$c"
9234 *SYSTIMEKERNEL*) i_systimek="$define"
9235 timeincl=`./findhdr sys/time.h`
9236 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9237 *) i_systimek="$undef";;
9240 *I_TIME*) i_time="$define"
9241 timeincl=`./findhdr time.h`" $timeincl"
9242 echo "We'll include <time.h>." >&4;;
9243 *) i_time="$undef";;
9246 *I_SYSTIME*) i_systime="$define"
9247 timeincl=`./findhdr sys/time.h`" $timeincl"
9248 echo "We'll include <sys/time.h>." >&4;;
9249 *) i_systime="$undef";;
9253 : see if struct tm knows about tm_zone
9254 case "$i_systime$i_time" in
9257 echo "Checking to see if your struct tm has tm_zone field..." >&4
9258 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
9266 case "$d_tm_tm_zone" in
9267 "$define") echo "Yes, it does." ;;
9268 *) echo "No, it doesn't." ;;
9270 : see if struct tm knows about tm_gmtoff
9271 case "$i_systime$i_time" in
9274 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
9275 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
9283 case "$d_tm_tm_gmtoff" in
9284 "$define") echo "Yes, it does." ;;
9285 *) echo "No, it doesn't." ;;
9288 : see if asctime_r exists
9289 set asctime_r d_asctime_r
9291 case "$d_asctime_r" in
9293 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h"
9296 hdrs="$hdrs $i_systime sys/time.h"
9299 case "$d_asctime_r_proto:$usethreads" in
9300 ":define") d_asctime_r_proto=define
9301 set d_asctime_r_proto asctime_r $hdrs
9305 case "$d_asctime_r_proto" in
9307 case "$asctime_r_proto" in
9308 ''|0) try='char* asctime_r(const struct tm*, char*);'
9309 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;;
9311 case "$asctime_r_proto" in
9312 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
9313 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;;
9315 case "$asctime_r_proto" in
9316 ''|0) try='int asctime_r(const struct tm*, char*);'
9317 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;;
9319 case "$asctime_r_proto" in
9320 ''|0) try='int asctime_r(const struct tm*, char*, int);'
9321 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;;
9323 case "$asctime_r_proto" in
9324 ''|0) d_asctime_r=undef
9326 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
9327 * ) case "$asctime_r_proto" in
9328 REENTRANT_PROTO*) ;;
9329 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
9331 echo "Prototype: $try" ;;
9334 *) case "$usethreads" in
9335 define) echo "asctime_r has no prototype, not using it." >&4 ;;
9342 *) asctime_r_proto=0
9346 : see if atolf exists
9350 : see if atoll exists
9354 : Look for GNU-cc style attribute checking
9356 echo "Checking whether your compiler can handle __attribute__ ..." >&4
9357 $cat >attrib.c <<'EOCP'
9359 void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
9361 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9362 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9363 echo "Your C compiler doesn't fully support __attribute__."
9366 echo "Your C compiler supports __attribute__."
9370 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9377 : see if bcmp exists
9381 : see if bcopy exists
9385 : see if this is a unistd.h system
9386 set unistd.h i_unistd
9389 : see if getpgrp exists
9390 set getpgrp d_getpgrp
9393 case "$d_getpgrp" in
9396 echo "Checking to see which flavor of getpgrp is in use..."
9399 #include <sys/types.h>
9401 # include <unistd.h>
9405 if (getuid() == 0) {
9406 printf("(I see you are running Configure as super-user...)\n");
9410 if (getpgrp(1) == 0)
9419 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9420 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
9422 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9423 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
9426 echo "I can't seem to compile and run the test program."
9428 xxx="a USG one, i.e. you use getpgrp()."
9430 # SVR4 systems can appear rather BSD-ish.
9433 xxx="a BSD one, i.e. you use getpgrp(pid)."
9437 xxx="probably a USG one, i.e. you use getpgrp()."
9442 echo "Assuming your getpgrp is $xxx" >&4
9451 : see if setpgrp exists
9452 set setpgrp d_setpgrp
9455 case "$d_setpgrp" in
9458 echo "Checking to see which flavor of setpgrp is in use..."
9461 #include <sys/types.h>
9463 # include <unistd.h>
9467 if (getuid() == 0) {
9468 printf("(I see you are running Configure as super-user...)\n");
9472 if (-1 == setpgrp(1, 1))
9475 if (setpgrp() != -1)
9481 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9482 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
9484 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9485 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
9488 echo "(I can't seem to compile and run the test program.)"
9490 xxx="a USG one, i.e. you use setpgrp()."
9492 # SVR4 systems can appear rather BSD-ish.
9495 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
9499 xxx="probably a USG one, i.e. you use setpgrp()."
9504 echo "Assuming your setpgrp is $xxx" >&4
9512 : see if bzero exists
9516 : see if signal is declared as pointer to function returning int or void
9518 xxx=`./findhdr signal.h`
9519 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
9520 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9521 echo "You have int (*signal())() instead of void." >&4
9523 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9524 echo "You have void (*signal())()." >&4
9526 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
9527 echo "You have int (*signal())() instead of void." >&4
9529 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
9530 echo "You have void (*signal())()." >&4
9533 case "$d_voidsig" in
9535 echo "I can't determine whether signal handler returns void or int..." >&4
9537 rp="What type does your signal handler return?"
9544 echo "As you already told me, signal handler returns void." >&4
9547 *) echo "As you already told me, signal handler returns int." >&4
9554 case "$d_voidsig" in
9555 "$define") signal_t="void";;
9560 : check for ability to cast large floats to 32-bit ints.
9562 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
9563 if $test "$intsize" -ge 4; then
9570 #include <sys/types.h>
9572 $signal_t blech(s) int s; { exit(3); }
9579 signal(SIGFPE, blech);
9581 /* Don't let compiler optimize the test away. Store the number
9582 in a writable string for gcc to pass to sscanf under HP/UX.
9584 sprintf(str, "2147483647");
9585 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
9589 /* x86 processors will probably give 0x8000 0000, which is a
9590 sign change. We don't want that. We want to mimic SPARC
9591 behavior here, which is to preserve the sign and give
9594 if (i32 != ($xxx) f)
9600 if eval $compile_ok; then
9604 echo "(I can't seem to compile the test program--assuming it can't)"
9612 echo "Nope, it can't."
9619 : check for ability to cast negative floats to unsigned
9621 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
9624 #include <sys/types.h>
9626 $signal_t blech(s) int s; { exit(7); }
9627 $signal_t blech_in_list(s) int s; { exit(4); }
9628 unsigned long dummy_long(p) unsigned long p; { return p; }
9629 unsigned int dummy_int(p) unsigned int p; { return p; }
9630 unsigned short dummy_short(p) unsigned short p; { return p; }
9634 unsigned long along;
9636 unsigned short ashort;
9640 /* Frustrate gcc-2.7.2's optimizer which failed this test with
9641 a direct f = -123. assignment. gcc-2.8.0 reportedly
9642 optimized the whole file away
9644 /* Store the number in a writable string for gcc to pass to
9647 sprintf(str, "-123");
9648 sscanf(str, "%lf", &f); /* f = -123.; */
9650 signal(SIGFPE, blech);
9651 along = (unsigned long)f;
9652 aint = (unsigned int)f;
9653 ashort = (unsigned short)f;
9654 if (along != (unsigned long)-123)
9656 if (aint != (unsigned int)-123)
9658 if (ashort != (unsigned short)-123)
9660 sprintf(str, "1073741824.");
9661 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
9664 along = (unsigned long)f;
9665 if (along != 0x80000000)
9669 along = (unsigned long)f;
9670 if (along != 0x7fffffff)
9674 along = (unsigned long)f;
9675 if (along != 0x80000001)
9679 signal(SIGFPE, blech_in_list);
9680 sprintf(str, "123.");
9681 sscanf(str, "%lf", &f); /* f = 123.; */
9682 along = dummy_long((unsigned long)f);
9683 aint = dummy_int((unsigned int)f);
9684 ashort = dummy_short((unsigned short)f);
9685 if (along != (unsigned long)123)
9687 if (aint != (unsigned int)123)
9689 if (ashort != (unsigned short)123)
9696 if eval $compile_ok; then
9700 echo "(I can't seem to compile the test program--assuming it can't)"
9703 case "$castflags" in
9708 echo "Nope, it can't."
9715 : see if vprintf exists
9717 if set vprintf val -f d_vprintf; eval $csym; $val; then
9718 echo 'vprintf() found.' >&4
9721 #include <varargs.h>
9723 int main() { xxx("foo"); }
9732 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
9736 if eval $compile && $run ./try; then
9737 echo "Your vsprintf() returns (int)." >&4
9740 echo "Your vsprintf() returns (char*)." >&4
9744 echo 'vprintf() NOT found.' >&4
9755 : see if chown exists
9759 : see if chroot exists
9763 : see if chsize exists
9767 : see if class exists
9771 hasstruct='varname=$1; struct=$2; shift; shift;
9772 while $test $# -ge 2; do
9774 $define) echo "#include <$2>";;
9778 echo "int main () { struct $struct foo; }" >> try.c;
9780 if eval $compile; then
9791 : see whether socket exists
9793 $echo $n "Hmm... $c" >&4
9794 if set socket val -f d_socket; eval $csym; $val; then
9795 echo "Looks like you have Berkeley networking support." >&4
9797 if set setsockopt val -f; eval $csym; $val; then
9800 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
9804 if $contains socklib libc.list >/dev/null 2>&1; then
9805 echo "Looks like you have Berkeley networking support." >&4
9807 : we will have to assume that it supports the 4.2 BSD interface
9810 echo "You don't have Berkeley networking in libc$_a..." >&4
9811 if test "X$d_socket" = "X$define"; then
9812 echo "...but you seem to believe that you have sockets." >&4
9814 for net in net socket
9816 if test -f /usr/lib/lib$net$_a; then
9817 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
9818 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
9819 if $contains socket libc.list >/dev/null 2>&1; then
9824 echo "...but the Wollongong group seems to have hacked it in." >&4
9825 sockethdr="-I/usr/netinclude"
9828 echo "Found Berkeley sockets interface in lib$net." >&4
9829 if $contains setsockopt libc.list >/dev/null 2>&1; then
9832 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
9839 if test "X$d_socket" != "X$define"; then
9840 echo "or anywhere else I see." >&4
9848 : see if socketpair exists
9849 set socketpair d_sockpair
9854 echo "Checking the availability of certain socket constants..." >&4
9855 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
9856 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
9858 #include <sys/types.h>
9859 #include <sys/socket.h>
9865 set try; if eval $compile; then
9868 set d_${enum}; eval $setvar
9872 : see if this is a sys/uio.h system
9873 set sys/uio.h i_sysuio
9878 echo "Checking to see if your system supports struct cmsghdr..." >&4
9879 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
9881 case "$d_cmsghdr_s" in
9882 "$define") echo "Yes, it does." ;;
9883 *) echo "No, it doesn't." ;;
9887 : check for const keyword
9889 echo 'Checking to see if your C compiler knows about "const"...' >&4
9890 $cat >const.c <<'EOCP'
9891 typedef struct spug { int drokk; } spug;
9898 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
9900 echo "Yup, it does."
9903 echo "Nope, it doesn't."
9908 : see if crypt exists
9913 $define) cryptlib='' ;;
9914 *) if set crypt val -f d_crypt; eval $csym; $val; then
9915 echo 'crypt() found.' >&4
9919 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
9920 if $test -z "$cryptlib"; then
9921 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
9925 if $test -z "$cryptlib"; then
9926 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
9930 if $test -z "$cryptlib"; then
9931 cryptlib=`./loc libcrypt$_a "" $libpth`
9935 if $test -z "$cryptlib"; then
9936 echo 'crypt() NOT found.' >&4
9947 : see if this is a crypt.h system
9951 : see if crypt_r exists
9952 set crypt_r d_crypt_r
9954 case "$d_crypt_r" in
9956 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
9959 hdrs="$hdrs $i_systime sys/time.h"
9962 case "$d_crypt_r_proto:$usethreads" in
9963 ":define") d_crypt_r_proto=define
9964 set d_crypt_r_proto crypt_r $hdrs
9968 case "$d_crypt_r_proto" in
9970 case "$crypt_r_proto" in
9971 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
9972 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCS ;;
9974 case "$crypt_r_proto" in
9975 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
9976 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCD ;;
9978 case "$crypt_r_proto" in
9979 ''|0) d_crypt_r=undef
9981 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
9982 * ) case "$crypt_r_proto" in
9983 REENTRANT_PROTO*) ;;
9984 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
9986 echo "Prototype: $try" ;;
9989 *) case "$usethreads" in
9990 define) echo "crypt_r has no prototype, not using it." >&4 ;;
10001 : get csh whereabouts
10003 'csh') val="$undef" ;;
10004 *) val="$define" ;;
10008 : Respect a hint or command line value for full_csh.
10009 case "$full_csh" in
10010 '') full_csh=$csh ;;
10013 : see if ctermid_r exists
10014 set ctermid_r d_ctermid_r
10016 case "$d_ctermid_r" in
10018 hdrs="$i_systypes sys/types.h define stdio.h "
10021 hdrs="$hdrs $i_systime sys/time.h"
10024 case "$d_ctermid_r_proto:$usethreads" in
10025 ":define") d_ctermid_r_proto=define
10026 set d_ctermid_r_proto ctermid_r $hdrs
10030 case "$d_ctermid_r_proto" in
10032 case "$ctermid_r_proto" in
10033 ''|0) try='char* ctermid_r(char*);'
10034 ./protochk "extern $try" $hdrs && ctermid_r_proto=B_B ;;
10036 case "$ctermid_r_proto" in
10037 ''|0) d_ctermid_r=undef
10039 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
10040 * ) case "$ctermid_r_proto" in
10041 REENTRANT_PROTO*) ;;
10042 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
10044 echo "Prototype: $try" ;;
10047 *) case "$usethreads" in
10048 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
10055 *) ctermid_r_proto=0
10059 : see if ctime_r exists
10060 set ctime_r d_ctime_r
10062 case "$d_ctime_r" in
10064 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h"
10067 hdrs="$hdrs $i_systime sys/time.h"
10070 case "$d_ctime_r_proto:$usethreads" in
10071 ":define") d_ctime_r_proto=define
10072 set d_ctime_r_proto ctime_r $hdrs
10076 case "$d_ctime_r_proto" in
10078 case "$ctime_r_proto" in
10079 ''|0) try='char* ctime_r(const time_t*, char*);'
10080 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;;
10082 case "$ctime_r_proto" in
10083 ''|0) try='char* ctime_r(const time_t*, char*, int);'
10084 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;;
10086 case "$ctime_r_proto" in
10087 ''|0) try='int ctime_r(const time_t*, char*);'
10088 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;;
10090 case "$ctime_r_proto" in
10091 ''|0) try='int ctime_r(const time_t*, char*, int);'
10092 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;;
10094 case "$ctime_r_proto" in
10095 ''|0) d_ctime_r=undef
10097 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
10098 * ) case "$ctime_r_proto" in
10099 REENTRANT_PROTO*) ;;
10100 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
10102 echo "Prototype: $try" ;;
10105 *) case "$usethreads" in
10106 define) echo "ctime_r has no prototype, not using it." >&4 ;;
10117 : see if cuserid exists
10118 set cuserid d_cuserid
10121 : see if this is a limits.h system
10122 set limits.h i_limits
10125 : see if this is a float.h system
10126 set float.h i_float
10129 : See if number of significant digits in a double precision number is known
10131 $cat >dbl_dig.c <<EOM
10132 #$i_limits I_LIMITS
10135 #include <limits.h>
10141 printf("Contains DBL_DIG");
10144 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
10145 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
10146 echo "DBL_DIG found." >&4
10149 echo "DBL_DIG NOT found." >&4
10156 : see if dbm.h is available
10157 : see if dbmclose exists
10158 set dbmclose d_dbmclose
10161 case "$d_dbmclose" in
10171 *) set rpcsvc/dbm.h i_rpcsvcdbm
10176 *) echo "We won't be including <dbm.h>"
10186 : see if prototype for dbminit is available
10188 set d_dbminitproto dbminit $i_dbm dbm.h
10191 : see if difftime exists
10192 set difftime d_difftime
10195 : see if this is a dirent system
10197 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
10199 echo "<dirent.h> found." >&4
10202 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
10203 echo "<sys/dir.h> found." >&4
10206 xinc=`./findhdr sys/ndir.h`
10208 echo "<dirent.h> NOT found." >&4
10213 : Look for type of directory structure.
10215 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10217 case "$direntrytype" in
10219 case "$i_dirent" in
10220 $define) guess1='struct dirent' ;;
10221 *) guess1='struct direct' ;;
10224 *) guess1="$direntrytype"
10229 'struct dirent') guess2='struct direct' ;;
10230 *) guess2='struct dirent' ;;
10233 if $contains "$guess1" try.c >/dev/null 2>&1; then
10234 direntrytype="$guess1"
10235 echo "Your directory entries are $direntrytype." >&4
10236 elif $contains "$guess2" try.c >/dev/null 2>&1; then
10237 direntrytype="$guess2"
10238 echo "Your directory entries seem to be $direntrytype." >&4
10240 echo "I don't recognize your system's directory entries." >&4
10241 rp="What type is used for directory entries on this system?"
10244 direntrytype="$ans"
10249 : see if the directory entry stores field length
10251 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10252 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
10253 echo "Good, your directory entry keeps length information in d_namlen." >&4
10256 echo "Your directory entry does not know about the d_namlen field." >&4
10263 : see if this is an sysdir system
10264 set sys/dir.h i_sysdir
10267 : see if this is an sysndir system
10268 set sys/ndir.h i_sysndir
10273 $cat >dirfd.c <<EOM
10275 #$i_dirent I_DIRENT /**/
10276 #$i_sysdir I_SYS_DIR /**/
10277 #$i_sysndir I_SYS_NDIR /**/
10278 #$i_systypes I_SYS_TYPES /**/
10279 #if defined(I_SYS_TYPES)
10280 #include <sys/types.h>
10282 #if defined(I_DIRENT)
10283 #include <dirent.h>
10284 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
10285 #include <sys/dir.h>
10289 #include <sys/ndir.h>
10293 #include <ndir.h> /* may be wrong in the future */
10295 #include <sys/dir.h>
10301 DIR *dirp = opendir(".");
10302 if (dirfd(dirp) >= 0)
10309 if eval $compile; then
10313 $define) echo "dirfd() found." >&4 ;;
10314 *) echo "dirfd() NOT found." >&4 ;;
10320 : see if dlerror exists
10323 set dlerror d_dlerror
10327 : see if dlfcn is available
10328 set dlfcn.h i_dlfcn
10335 On a few systems, the dynamically loaded modules that perl generates and uses
10336 will need a different extension than shared libs. The default will probably
10342 *) dflt="$dlext" ;;
10344 rp='What is the extension of dynamically loaded modules'
10353 : Check if dlsym need a leading underscore
10359 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
10360 $cat >dyna.c <<'EOM'
10369 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
10371 #include <sys/types.h>
10376 extern int fred() ;
10385 int mode = RTLD_LAZY ;
10387 handle = dlopen("./dyna.$dlext", mode) ;
10388 if (handle == NULL) {
10393 symbol = dlsym(handle, "fred") ;
10394 if (symbol == NULL) {
10395 /* try putting a leading underscore */
10396 symbol = dlsym(handle, "_fred") ;
10397 if (symbol == NULL) {
10410 : Call the object file tmp-dyna.o in case dlext=o.
10411 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
10412 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
10413 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
10414 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
10417 1) echo "Test program failed using dlopen." >&4
10418 echo "Perhaps you should not use dynamic loading." >&4;;
10419 2) echo "Test program failed using dlsym." >&4
10420 echo "Perhaps you should not use dynamic loading." >&4;;
10421 3) echo "dlsym needs a leading underscore" >&4
10423 4) echo "dlsym doesn't need a leading underscore." >&4;;
10426 echo "I can't compile and run the test program." >&4
10427 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
10432 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
10437 : see if drand48_r exists
10438 set drand48_r d_drand48_r
10440 case "$d_drand48_r" in
10442 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
10445 hdrs="$hdrs $i_systime sys/time.h"
10448 case "$d_drand48_r_proto:$usethreads" in
10449 ":define") d_drand48_r_proto=define
10450 set d_drand48_r_proto drand48_r $hdrs
10454 case "$d_drand48_r_proto" in
10456 case "$drand48_r_proto" in
10457 ''|0) try='int drand48_r(struct drand48_data*, double*);'
10458 ./protochk "extern $try" $hdrs && drand48_r_proto=I_ST ;;
10460 case "$drand48_r_proto" in
10461 ''|0) d_drand48_r=undef
10463 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
10464 * ) case "$drand48_r_proto" in
10465 REENTRANT_PROTO*) ;;
10466 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
10468 echo "Prototype: $try" ;;
10471 *) case "$usethreads" in
10472 define) echo "drand48_r has no prototype, not using it." >&4 ;;
10479 *) drand48_r_proto=0
10483 : see if prototype for drand48 is available
10485 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
10488 : see if dup2 exists
10492 : see if eaccess exists
10493 set eaccess d_eaccess
10496 : see if endgrent exists
10497 set endgrent d_endgrent
10500 : see if this is an grp system
10506 xxx=`./findhdr grp.h`
10507 $cppstdin $cppflags $cppminus < $xxx >$$.h
10509 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
10521 set d_grpasswd; eval $setvar
10525 : see if endgrent_r exists
10526 set endgrent_r d_endgrent_r
10528 case "$d_endgrent_r" in
10530 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
10533 hdrs="$hdrs $i_systime sys/time.h"
10536 case "$d_endgrent_r_proto:$usethreads" in
10537 ":define") d_endgrent_r_proto=define
10538 set d_endgrent_r_proto endgrent_r $hdrs
10542 case "$d_endgrent_r_proto" in
10544 case "$endgrent_r_proto" in
10545 ''|0) try='int endgrent_r(FILE**);'
10546 ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;;
10548 case "$endgrent_r_proto" in
10549 ''|0) try='void endgrent_r(FILE**);'
10550 ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;;
10552 case "$endgrent_r_proto" in
10553 ''|0) d_endgrent_r=undef
10555 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
10556 * ) case "$endgrent_r_proto" in
10557 REENTRANT_PROTO*) ;;
10558 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
10560 echo "Prototype: $try" ;;
10563 *) case "$usethreads" in
10564 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
10571 *) endgrent_r_proto=0
10575 : see if endhostent exists
10576 set endhostent d_endhent
10579 : see if this is a netdb.h system
10580 set netdb.h i_netdb
10583 : see if endhostent_r exists
10584 set endhostent_r d_endhostent_r
10586 case "$d_endhostent_r" in
10588 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10591 hdrs="$hdrs $i_systime sys/time.h"
10594 case "$d_endhostent_r_proto:$usethreads" in
10595 ":define") d_endhostent_r_proto=define
10596 set d_endhostent_r_proto endhostent_r $hdrs
10600 case "$d_endhostent_r_proto" in
10602 case "$endhostent_r_proto" in
10603 ''|0) try='int endhostent_r(struct hostent_data*);'
10604 ./protochk "extern $try" $hdrs && endhostent_r_proto=I_D ;;
10606 case "$endhostent_r_proto" in
10607 ''|0) try='void endhostent_r(struct hostent_data*);'
10608 ./protochk "extern $try" $hdrs && endhostent_r_proto=V_D ;;
10610 case "$endhostent_r_proto" in
10611 ''|0) d_endhostent_r=undef
10612 endhostent_r_proto=0
10613 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
10614 * ) case "$endhostent_r_proto" in
10615 REENTRANT_PROTO*) ;;
10616 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
10618 echo "Prototype: $try" ;;
10621 *) case "$usethreads" in
10622 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
10624 d_endhostent_r=undef
10625 endhostent_r_proto=0
10629 *) endhostent_r_proto=0
10633 : see if endnetent exists
10634 set endnetent d_endnent
10637 : see if endnetent_r exists
10638 set endnetent_r d_endnetent_r
10640 case "$d_endnetent_r" in
10642 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10645 hdrs="$hdrs $i_systime sys/time.h"
10648 case "$d_endnetent_r_proto:$usethreads" in
10649 ":define") d_endnetent_r_proto=define
10650 set d_endnetent_r_proto endnetent_r $hdrs
10654 case "$d_endnetent_r_proto" in
10656 case "$endnetent_r_proto" in
10657 ''|0) try='int endnetent_r(struct netent_data*);'
10658 ./protochk "extern $try" $hdrs && endnetent_r_proto=I_D ;;
10660 case "$endnetent_r_proto" in
10661 ''|0) try='void endnetent_r(struct netent_data*);'
10662 ./protochk "extern $try" $hdrs && endnetent_r_proto=V_D ;;
10664 case "$endnetent_r_proto" in
10665 ''|0) d_endnetent_r=undef
10666 endnetent_r_proto=0
10667 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
10668 * ) case "$endnetent_r_proto" in
10669 REENTRANT_PROTO*) ;;
10670 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
10672 echo "Prototype: $try" ;;
10675 *) case "$usethreads" in
10676 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
10678 d_endnetent_r=undef
10679 endnetent_r_proto=0
10683 *) endnetent_r_proto=0
10687 : see if endprotoent exists
10688 set endprotoent d_endpent
10691 : see if endprotoent_r exists
10692 set endprotoent_r d_endprotoent_r
10694 case "$d_endprotoent_r" in
10696 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10699 hdrs="$hdrs $i_systime sys/time.h"
10702 case "$d_endprotoent_r_proto:$usethreads" in
10703 ":define") d_endprotoent_r_proto=define
10704 set d_endprotoent_r_proto endprotoent_r $hdrs
10708 case "$d_endprotoent_r_proto" in
10710 case "$endprotoent_r_proto" in
10711 ''|0) try='int endprotoent_r(struct protoent_data*);'
10712 ./protochk "extern $try" $hdrs && endprotoent_r_proto=I_D ;;
10714 case "$endprotoent_r_proto" in
10715 ''|0) try='void endprotoent_r(struct protoent_data*);'
10716 ./protochk "extern $try" $hdrs && endprotoent_r_proto=V_D ;;
10718 case "$endprotoent_r_proto" in
10719 ''|0) d_endprotoent_r=undef
10720 endprotoent_r_proto=0
10721 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
10722 * ) case "$endprotoent_r_proto" in
10723 REENTRANT_PROTO*) ;;
10724 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
10726 echo "Prototype: $try" ;;
10729 *) case "$usethreads" in
10730 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
10732 d_endprotoent_r=undef
10733 endprotoent_r_proto=0
10737 *) endprotoent_r_proto=0
10741 : see if endpwent exists
10742 set endpwent d_endpwent
10745 : see if this is a pwd.h system
10751 xxx=`./findhdr pwd.h`
10752 $cppstdin $cppflags $cppminus < $xxx >$$.h
10754 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
10762 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
10770 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
10778 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
10786 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
10794 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
10802 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
10810 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
10822 set d_pwquota; eval $setvar
10823 set d_pwage; eval $setvar
10824 set d_pwchange; eval $setvar
10825 set d_pwclass; eval $setvar
10826 set d_pwexpire; eval $setvar
10827 set d_pwcomment; eval $setvar
10828 set d_pwgecos; eval $setvar
10829 set d_pwpasswd; eval $setvar
10833 : see if endpwent_r exists
10834 set endpwent_r d_endpwent_r
10836 case "$d_endpwent_r" in
10838 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
10841 hdrs="$hdrs $i_systime sys/time.h"
10844 case "$d_endpwent_r_proto:$usethreads" in
10845 ":define") d_endpwent_r_proto=define
10846 set d_endpwent_r_proto endpwent_r $hdrs
10850 case "$d_endpwent_r_proto" in
10852 case "$endpwent_r_proto" in
10853 ''|0) try='int endpwent_r(FILE**);'
10854 ./protochk "extern $try" $hdrs && endpwent_r_proto=I_H ;;
10856 case "$endpwent_r_proto" in
10857 ''|0) try='void endpwent_r(FILE**);'
10858 ./protochk "extern $try" $hdrs && endpwent_r_proto=V_H ;;
10860 case "$endpwent_r_proto" in
10861 ''|0) d_endpwent_r=undef
10863 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
10864 * ) case "$endpwent_r_proto" in
10865 REENTRANT_PROTO*) ;;
10866 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
10868 echo "Prototype: $try" ;;
10871 *) case "$usethreads" in
10872 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
10879 *) endpwent_r_proto=0
10883 : see if endservent exists
10884 set endservent d_endsent
10887 : see if endservent_r exists
10888 set endservent_r d_endservent_r
10890 case "$d_endservent_r" in
10892 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10895 hdrs="$hdrs $i_systime sys/time.h"
10898 case "$d_endservent_r_proto:$usethreads" in
10899 ":define") d_endservent_r_proto=define
10900 set d_endservent_r_proto endservent_r $hdrs
10904 case "$d_endservent_r_proto" in
10906 case "$endservent_r_proto" in
10907 ''|0) try='int endservent_r(struct servent_data*);'
10908 ./protochk "extern $try" $hdrs && endservent_r_proto=I_D ;;
10910 case "$endservent_r_proto" in
10911 ''|0) try='void endservent_r(struct servent_data*);'
10912 ./protochk "extern $try" $hdrs && endservent_r_proto=V_D ;;
10914 case "$endservent_r_proto" in
10915 ''|0) d_endservent_r=undef
10916 endservent_r_proto=0
10917 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
10918 * ) case "$endservent_r_proto" in
10919 REENTRANT_PROTO*) ;;
10920 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
10922 echo "Prototype: $try" ;;
10925 *) case "$usethreads" in
10926 define) echo "endservent_r has no prototype, not using it." >&4 ;;
10928 d_endservent_r=undef
10929 endservent_r_proto=0
10933 *) endservent_r_proto=0
10937 : Locate the flags for 'open()'
10939 $cat >try.c <<'EOCP'
10940 #include <sys/types.h>
10945 #include <sys/file.h>
10956 : check sys/file.h first to get FREAD on Sun
10957 if $test `./findhdr sys/file.h` && \
10958 set try -DI_SYS_FILE && eval $compile; then
10960 echo "<sys/file.h> defines the O_* constants..." >&4
10961 if $run ./try; then
10962 echo "and you have the 3 argument form of open()." >&4
10965 echo "but not the 3 argument form of open(). Oh, well." >&4
10968 elif $test `./findhdr fcntl.h` && \
10969 set try -DI_FCNTL && eval $compile; then
10971 echo "<fcntl.h> defines the O_* constants..." >&4
10972 if $run ./try; then
10973 echo "and you have the 3 argument form of open()." >&4
10976 echo "but not the 3 argument form of open(). Oh, well." >&4
10981 echo "I can't find the O_* constant definitions! You got problems." >&4
10987 : see which of string.h or strings.h is needed
10989 strings=`./findhdr string.h`
10990 if $test "$strings" && $test -r "$strings"; then
10991 echo "Using <string.h> instead of <strings.h>." >&4
10995 strings=`./findhdr strings.h`
10996 if $test "$strings" && $test -r "$strings"; then
10997 echo "Using <strings.h> instead of <string.h>." >&4
10999 echo "No string header found -- You'll surely have problems." >&4
11004 case "$i_string" in
11005 "$undef") strings=`./findhdr strings.h`;;
11006 *) strings=`./findhdr string.h`;;
11009 : see if this is a sys/file.h system
11014 : do we need to include sys/file.h ?
11018 if $h_sysfile; then
11020 echo "We'll be including <sys/file.h>." >&4
11023 echo "We won't be including <sys/file.h>." >&4
11033 : see if fcntl.h is there
11038 : see if we can include fcntl.h
11044 echo "We'll be including <fcntl.h>." >&4
11047 if $h_sysfile; then
11048 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
11050 echo "We won't be including <fcntl.h>." >&4
11062 : check for non-blocking I/O stuff
11063 case "$h_sysfile" in
11064 true) echo "#include <sys/file.h>" > head.c;;
11067 true) echo "#include <fcntl.h>" > head.c;;
11068 *) echo "#include <sys/fcntl.h>" > head.c;;
11073 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
11074 case "$o_nonblock" in
11076 $cat head.c > try.c
11077 $cat >>try.c <<EOCP
11079 #include <stdlib.h>
11086 printf("O_NONBLOCK\n");
11090 printf("O_NDELAY\n");
11094 printf("FNDELAY\n");
11101 if eval $compile_ok; then
11102 o_nonblock=`$run ./try`
11103 case "$o_nonblock" in
11104 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
11105 *) echo "Seems like we can use $o_nonblock.";;
11108 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
11111 *) echo "Using $hint value $o_nonblock.";;
11113 $rm -f try try.* .out core
11116 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
11119 $cat head.c > try.c
11120 $cat >>try.c <<EOCP
11122 #include <sys/types.h>
11123 #include <signal.h>
11125 #include <stdlib.h>
11130 #define MY_O_NONBLOCK $o_nonblock
11131 #ifndef errno /* XXX need better Configure test */
11134 #$i_unistd I_UNISTD
11136 #include <unistd.h>
11138 #$i_string I_STRING
11140 #include <string.h>
11142 #include <strings.h>
11144 $signal_t blech(x) int x; { exit(3); }
11146 $cat >> try.c <<'EOCP'
11154 pipe(pd); /* Down: child -> parent */
11155 pipe(pu); /* Up: parent -> child */
11158 close(pd[1]); /* Parent reads from pd[0] */
11159 close(pu[0]); /* Parent writes (blocking) to pu[1] */
11161 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
11166 signal(SIGALRM, blech);
11168 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
11170 sprintf(string, "%d\n", ret);
11171 write(2, string, strlen(string));
11174 if (errno == EAGAIN) {
11175 printf("EAGAIN\n");
11180 if (errno == EWOULDBLOCK)
11181 printf("EWOULDBLOCK\n");
11184 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
11185 sleep(2); /* Give it time to close our pipe */
11187 ret = read(pd[0], buf, 1); /* Should read EOF */
11189 sprintf(string, "%d\n", ret);
11190 write(4, string, strlen(string));
11194 close(pd[0]); /* We write to pd[1] */
11195 close(pu[1]); /* We read from pu[0] */
11196 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
11197 close(pd[1]); /* Pipe pd is now fully closed! */
11198 exit(0); /* Bye bye, thank you for playing! */
11202 if eval $compile_ok; then
11203 echo "$startsh" >mtry
11204 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
11206 ./mtry >/dev/null 2>&1
11208 0) eagain=`$cat try.out`;;
11209 1) echo "Could not perform non-blocking setting!";;
11210 2) echo "I did a successful read() for something that was not there!";;
11211 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
11212 4) echo "Could not find F_SETFL!";;
11213 *) echo "Something terribly wrong happened during testing.";;
11215 rd_nodata=`$cat try.ret`
11216 echo "A read() system call with no data present returns $rd_nodata."
11217 case "$rd_nodata" in
11220 echo "(That's peculiar, fixing that to be -1.)"
11226 echo "Forcing errno EAGAIN on read() with no data available."
11230 echo "Your read() sets errno to $eagain when no data is available."
11233 status=`$cat try.err`
11235 0) echo "And it correctly returns 0 to signal EOF.";;
11236 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
11237 *) echo "However, your read() returns '$status' on EOF??";;
11240 if test "$status" = "$rd_nodata"; then
11241 echo "WARNING: you can't distinguish between EOF and no data!"
11245 echo "I can't compile the test program--assuming errno EAGAIN will do."
11252 echo "Using $hint value $eagain."
11253 echo "Your read() returns $rd_nodata when no data is present."
11254 case "$d_eofnblk" in
11255 "$define") echo "And you can see EOF because read() returns 0.";;
11256 "$undef") echo "But you can't see EOF status from read() returned value.";;
11258 echo "(Assuming you can't see EOF status from read anyway.)"
11264 $rm -f try try.* .out core head.c mtry
11266 : see if fchdir exists
11267 set fchdir d_fchdir
11270 : see if fchmod exists
11271 set fchmod d_fchmod
11274 : see if fchown exists
11275 set fchown d_fchown
11278 : see if this is an fcntl system
11283 : See if fcntl-based locking works.
11285 #include <stdlib.h>
11286 #include <unistd.h>
11288 #include <signal.h>
11289 $signal_t blech(x) int x; { exit(3); }
11291 #if defined(F_SETLK) && defined(F_SETLKW)
11292 struct flock flock;
11294 fd = open("try.c", O_RDONLY);
11295 flock.l_type = F_RDLCK;
11296 flock.l_whence = SEEK_SET;
11297 flock.l_start = flock.l_len = 0;
11298 signal(SIGALRM, blech);
11300 retval = fcntl(fd, F_SETLK, &flock);
11302 (retval < 0 ? exit(2) : exit(0));
11308 echo "Checking if fcntl-based file locking works... "
11312 if eval $compile_ok; then
11313 if $run ./try; then
11314 echo "Yes, it seems to work."
11317 echo "Nope, it didn't work."
11322 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
11323 *** This is (almost) impossible.
11324 *** If your NFS lock daemons are not feeling well, something like
11325 *** this may happen, please investigate. Cannot continue, aborting.
11333 echo "I'm unable to compile the test program, so I'll assume not."
11338 echo "Nope, since you don't even have fcntl()."
11341 set d_fcntl_can_lock
11346 : check for fd_set items
11349 Checking to see how well your C compiler handles fd_set and friends ...
11352 #$i_systime I_SYS_TIME
11353 #$i_sysselct I_SYS_SELECT
11354 #$d_socket HAS_SOCKET
11355 #include <sys/types.h>
11357 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
11360 #include <sys/time.h>
11362 #ifdef I_SYS_SELECT
11363 #include <sys/select.h>
11372 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
11380 if eval $compile; then
11381 d_fds_bits="$define"
11383 echo "Well, your system knows about the normal fd_set typedef..." >&4
11384 if $run ./try; then
11385 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
11386 d_fd_macros="$define"
11389 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
11391 d_fd_macros="$undef"
11395 Hmm, your compiler has some difficulty with fd_set. Checking further...
11398 if eval $compile; then
11399 d_fds_bits="$undef"
11401 echo "Well, your system has some sort of fd_set available..." >&4
11402 if $run ./try; then
11403 echo "and you have the normal fd_set macros." >&4
11404 d_fd_macros="$define"
11407 but not the normal fd_set macros! Gross! More work for me...
11409 d_fd_macros="$undef"
11412 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
11414 d_fds_bits="$undef"
11415 d_fd_macros="$undef"
11420 : see if fgetpos exists
11421 set fgetpos d_fgetpos
11424 : see if finite exists
11425 set finite d_finite
11428 : see if finitel exists
11429 set finitel d_finitel
11432 : see if flock exists
11436 : see if prototype for flock is available
11438 set d_flockproto flock $i_sysfile sys/file.h
11441 : see if fork exists
11445 : see if fp_class exists
11446 set fp_class d_fp_class
11449 : see if pathconf exists
11450 set pathconf d_pathconf
11453 : see if fpathconf exists
11454 set fpathconf d_fpathconf
11457 : see if fpclass exists
11458 set fpclass d_fpclass
11461 : see if fpclassify exists
11462 set fpclassify d_fpclassify
11465 : see if fpclassl exists
11466 set fpclassl d_fpclassl
11470 : check for fpos64_t
11472 echo "Checking to see if you have fpos64_t..." >&4
11475 int main() { fpos64_t x = 7; }
11478 if eval $compile; then
11480 echo "You have fpos64_t."
11483 echo "You do not have fpos64_t."
11484 case "$fpossize" in
11485 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
11492 : see if frexpl exists
11493 set frexpl d_frexpl
11496 : see if this is a sys/param system
11497 set sys/param.h i_sysparam
11500 : see if this is a sys/mount.h system
11501 set sys/mount.h i_sysmount
11506 echo "Checking to see if your system supports struct fs_data..." >&4
11507 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
11509 case "$d_fs_data_s" in
11510 "$define") echo "Yes, it does." ;;
11511 *) echo "No, it doesn't." ;;
11514 : see if fseeko exists
11515 set fseeko d_fseeko
11517 case "$longsize" in
11518 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
11521 : see if fsetpos exists
11522 set fsetpos d_fsetpos
11526 : see if fstatfs exists
11527 set fstatfs d_fstatfs
11531 : see if statvfs exists
11532 set statvfs d_statvfs
11535 : see if fstatvfs exists
11536 set fstatvfs d_fstatvfs
11540 : see if fsync exists
11544 : see if ftello exists
11545 set ftello d_ftello
11547 case "$longsize" in
11548 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
11551 : see if getcwd exists
11552 set getcwd d_getcwd
11555 : see if getespwnam exists
11556 set getespwnam d_getespwnam
11560 : see if getfsstat exists
11561 set getfsstat d_getfsstat
11564 : see if getgrent exists
11565 set getgrent d_getgrent
11568 : see if getgrent_r exists
11569 set getgrent_r d_getgrent_r
11571 case "$d_getgrent_r" in
11573 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11576 hdrs="$hdrs $i_systime sys/time.h"
11579 case "$d_getgrent_r_proto:$usethreads" in
11580 ":define") d_getgrent_r_proto=define
11581 set d_getgrent_r_proto getgrent_r $hdrs
11585 case "$d_getgrent_r_proto" in
11587 case "$getgrent_r_proto" in
11588 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
11589 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBWR ;;
11591 case "$getgrent_r_proto" in
11592 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
11593 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIR ;;
11595 case "$getgrent_r_proto" in
11596 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
11597 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBW ;;
11599 case "$getgrent_r_proto" in
11600 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
11601 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBI ;;
11603 case "$getgrent_r_proto" in
11604 ''|0) try='int getgrent_r(struct group*, char*, int);'
11605 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBI ;;
11607 case "$getgrent_r_proto" in
11608 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
11609 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIH ;;
11611 case "$getgrent_r_proto" in
11612 ''|0) d_getgrent_r=undef
11614 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
11615 * ) case "$getgrent_r_proto" in
11616 REENTRANT_PROTO*) ;;
11617 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
11619 echo "Prototype: $try" ;;
11622 *) case "$usethreads" in
11623 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
11630 *) getgrent_r_proto=0
11634 : see if getgrgid_r exists
11635 set getgrgid_r d_getgrgid_r
11637 case "$d_getgrgid_r" in
11639 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11642 hdrs="$hdrs $i_systime sys/time.h"
11645 case "$d_getgrgid_r_proto:$usethreads" in
11646 ":define") d_getgrgid_r_proto=define
11647 set d_getgrgid_r_proto getgrgid_r $hdrs
11651 case "$d_getgrgid_r_proto" in
11653 case "$getgrgid_r_proto" in
11654 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
11655 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
11657 case "$getgrgid_r_proto" in
11658 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
11659 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
11661 case "$getgrgid_r_proto" in
11662 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
11663 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
11665 case "$getgrgid_r_proto" in
11666 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
11667 ./protochk "extern $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
11669 case "$getgrgid_r_proto" in
11670 ''|0) d_getgrgid_r=undef
11672 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
11673 * ) case "$getgrgid_r_proto" in
11674 REENTRANT_PROTO*) ;;
11675 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
11677 echo "Prototype: $try" ;;
11680 *) case "$usethreads" in
11681 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
11688 *) getgrgid_r_proto=0
11692 : see if getgrnam_r exists
11693 set getgrnam_r d_getgrnam_r
11695 case "$d_getgrnam_r" in
11697 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11700 hdrs="$hdrs $i_systime sys/time.h"
11703 case "$d_getgrnam_r_proto:$usethreads" in
11704 ":define") d_getgrnam_r_proto=define
11705 set d_getgrnam_r_proto getgrnam_r $hdrs
11709 case "$d_getgrnam_r_proto" in
11711 case "$getgrnam_r_proto" in
11712 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
11713 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
11715 case "$getgrnam_r_proto" in
11716 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
11717 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
11719 case "$getgrnam_r_proto" in
11720 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
11721 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CBI ;;
11723 case "$getgrnam_r_proto" in
11724 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
11725 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
11727 case "$getgrnam_r_proto" in
11728 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
11729 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
11731 case "$getgrnam_r_proto" in
11732 ''|0) d_getgrnam_r=undef
11734 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
11735 * ) case "$getgrnam_r_proto" in
11736 REENTRANT_PROTO*) ;;
11737 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
11739 echo "Prototype: $try" ;;
11742 *) case "$usethreads" in
11743 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
11750 *) getgrnam_r_proto=0
11754 : see if gethostbyaddr exists
11755 set gethostbyaddr d_gethbyaddr
11758 : see if gethostbyname exists
11759 set gethostbyname d_gethbyname
11762 : see if gethostent exists
11763 set gethostent d_gethent
11766 : see how we will look up host name
11769 if set gethostname val -f d_gethname; eval $csym; $val; then
11770 echo 'gethostname() found.' >&4
11771 d_gethname="$define"
11774 if set uname val -f d_uname; eval $csym; $val; then
11777 uname() was found, but you're running xenix, and older versions of xenix
11778 have a broken uname(). If you don't really know whether your xenix is old
11779 enough to have a broken system call, use the default answer.
11784 "$define") dflt=n;;
11786 rp='Is your uname() broken?'
11789 n*) d_uname="$define"; call=uname;;
11792 echo 'uname() found.' >&4
11799 case "$d_gethname" in
11800 '') d_gethname="$undef";;
11803 '') d_uname="$undef";;
11805 case "$d_uname$d_gethname" in
11810 Every now and then someone has a $call() that lies about the hostname
11811 but can't be fixed for political or economic reasons. If you wish, I can
11812 pretend $call() isn't there and maybe compute hostname at run-time
11813 thanks to the '$phostname' command.
11816 rp="Shall I ignore $call() from now on?"
11819 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
11822 case "$phostname" in
11823 '') aphostname='';;
11824 *) case "$aphostname" in
11826 *) set X $phostname
11830 file=`./loc $file $file $pth`
11831 aphostname=`echo $file $*`
11836 case "$d_uname$d_gethname" in
11839 case "$phostname" in
11841 echo "There will be no way for $package to get your hostname." >&4;;
11843 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
11847 case "$d_phostname" in
11848 '') d_phostname="$undef";;
11851 : see if gethostbyaddr_r exists
11852 set gethostbyaddr_r d_gethostbyaddr_r
11854 case "$d_gethostbyaddr_r" in
11856 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11859 hdrs="$hdrs $i_systime sys/time.h"
11862 case "$d_gethostbyaddr_r_proto:$usethreads" in
11863 ":define") d_gethostbyaddr_r_proto=define
11864 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
11868 case "$d_gethostbyaddr_r_proto" in
11870 case "$gethostbyaddr_r_proto" in
11871 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
11872 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
11874 case "$gethostbyaddr_r_proto" in
11875 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
11876 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
11878 case "$gethostbyaddr_r_proto" in
11879 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
11880 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
11882 case "$gethostbyaddr_r_proto" in
11883 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
11884 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
11886 case "$gethostbyaddr_r_proto" in
11887 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
11888 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
11890 case "$gethostbyaddr_r_proto" in
11891 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
11892 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
11894 case "$gethostbyaddr_r_proto" in
11895 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
11896 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
11898 case "$gethostbyaddr_r_proto" in
11899 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
11900 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
11902 case "$gethostbyaddr_r_proto" in
11903 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
11904 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
11906 case "$gethostbyaddr_r_proto" in
11907 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
11908 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
11910 case "$gethostbyaddr_r_proto" in
11911 ''|0) d_gethostbyaddr_r=undef
11912 gethostbyaddr_r_proto=0
11913 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
11914 * ) case "$gethostbyaddr_r_proto" in
11915 REENTRANT_PROTO*) ;;
11916 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
11918 echo "Prototype: $try" ;;
11921 *) case "$usethreads" in
11922 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
11924 d_gethostbyaddr_r=undef
11925 gethostbyaddr_r_proto=0
11929 *) gethostbyaddr_r_proto=0
11933 : see if gethostbyname_r exists
11934 set gethostbyname_r d_gethostbyname_r
11936 case "$d_gethostbyname_r" in
11938 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11941 hdrs="$hdrs $i_systime sys/time.h"
11944 case "$d_gethostbyname_r_proto:$usethreads" in
11945 ":define") d_gethostbyname_r_proto=define
11946 set d_gethostbyname_r_proto gethostbyname_r $hdrs
11950 case "$d_gethostbyname_r_proto" in
11952 case "$gethostbyname_r_proto" in
11953 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
11954 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
11956 case "$gethostbyname_r_proto" in
11957 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
11958 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
11960 case "$gethostbyname_r_proto" in
11961 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
11962 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
11964 case "$gethostbyname_r_proto" in
11965 ''|0) d_gethostbyname_r=undef
11966 gethostbyname_r_proto=0
11967 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
11968 * ) case "$gethostbyname_r_proto" in
11969 REENTRANT_PROTO*) ;;
11970 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
11972 echo "Prototype: $try" ;;
11975 *) case "$usethreads" in
11976 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
11978 d_gethostbyname_r=undef
11979 gethostbyname_r_proto=0
11983 *) gethostbyname_r_proto=0
11987 : see if gethostent_r exists
11988 set gethostent_r d_gethostent_r
11990 case "$d_gethostent_r" in
11992 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11995 hdrs="$hdrs $i_systime sys/time.h"
11998 case "$d_gethostent_r_proto:$usethreads" in
11999 ":define") d_gethostent_r_proto=define
12000 set d_gethostent_r_proto gethostent_r $hdrs
12004 case "$d_gethostent_r_proto" in
12006 case "$gethostent_r_proto" in
12007 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
12008 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
12010 case "$gethostent_r_proto" in
12011 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
12012 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBIE ;;
12014 case "$gethostent_r_proto" in
12015 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
12016 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBIE ;;
12018 case "$gethostent_r_proto" in
12019 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
12020 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBI ;;
12022 case "$gethostent_r_proto" in
12023 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
12024 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBI ;;
12026 case "$gethostent_r_proto" in
12027 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
12028 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SD ;;
12030 case "$gethostent_r_proto" in
12031 ''|0) d_gethostent_r=undef
12032 gethostent_r_proto=0
12033 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
12034 * ) case "$gethostent_r_proto" in
12035 REENTRANT_PROTO*) ;;
12036 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
12038 echo "Prototype: $try" ;;
12041 *) case "$usethreads" in
12042 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
12044 d_gethostent_r=undef
12045 gethostent_r_proto=0
12049 *) gethostent_r_proto=0
12053 : see if prototypes for various gethostxxx netdb.h functions are available
12055 set d_gethostprotos gethostent $i_netdb netdb.h
12058 : see if getitimer exists
12059 set getitimer d_getitimer
12062 : see if getlogin exists
12063 set getlogin d_getlogin
12066 : see if getlogin_r exists
12067 set getlogin_r d_getlogin_r
12069 case "$d_getlogin_r" in
12071 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
12074 hdrs="$hdrs $i_systime sys/time.h"
12077 case "$d_getlogin_r_proto:$usethreads" in
12078 ":define") d_getlogin_r_proto=define
12079 set d_getlogin_r_proto getlogin_r $hdrs
12083 case "$d_getlogin_r_proto" in
12085 case "$getlogin_r_proto" in
12086 ''|0) try='int getlogin_r(char*, size_t);'
12087 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BW ;;
12089 case "$getlogin_r_proto" in
12090 ''|0) try='int getlogin_r(char*, int);'
12091 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BI ;;
12093 case "$getlogin_r_proto" in
12094 ''|0) try='char* getlogin_r(char*, size_t);'
12095 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BW ;;
12097 case "$getlogin_r_proto" in
12098 ''|0) try='char* getlogin_r(char*, int);'
12099 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BI ;;
12101 case "$getlogin_r_proto" in
12102 ''|0) d_getlogin_r=undef
12104 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
12105 * ) case "$getlogin_r_proto" in
12106 REENTRANT_PROTO*) ;;
12107 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
12109 echo "Prototype: $try" ;;
12112 *) case "$usethreads" in
12113 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
12120 *) getlogin_r_proto=0
12124 : see if getmnt exists
12125 set getmnt d_getmnt
12128 : see if getmntent exists
12129 set getmntent d_getmntent
12132 : see if getnetbyaddr exists
12133 set getnetbyaddr d_getnbyaddr
12136 : see if getnetbyname exists
12137 set getnetbyname d_getnbyname
12140 : see if getnetent exists
12141 set getnetent d_getnent
12144 : see if getnetbyaddr_r exists
12145 set getnetbyaddr_r d_getnetbyaddr_r
12147 case "$d_getnetbyaddr_r" in
12149 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12152 hdrs="$hdrs $i_systime sys/time.h"
12155 case "$d_getnetbyaddr_r_proto:$usethreads" in
12156 ":define") d_getnetbyaddr_r_proto=define
12157 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
12161 case "$d_getnetbyaddr_r_proto" in
12163 case "$getnetbyaddr_r_proto" in
12164 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
12165 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
12167 case "$getnetbyaddr_r_proto" in
12168 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
12169 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
12171 case "$getnetbyaddr_r_proto" in
12172 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
12173 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
12175 case "$getnetbyaddr_r_proto" in
12176 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
12177 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
12179 case "$getnetbyaddr_r_proto" in
12180 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
12181 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
12183 case "$getnetbyaddr_r_proto" in
12184 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
12185 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
12187 case "$getnetbyaddr_r_proto" in
12188 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
12189 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
12191 case "$getnetbyaddr_r_proto" in
12192 ''|0) d_getnetbyaddr_r=undef
12193 getnetbyaddr_r_proto=0
12194 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
12195 * ) case "$getnetbyaddr_r_proto" in
12196 REENTRANT_PROTO*) ;;
12197 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
12199 echo "Prototype: $try" ;;
12202 *) case "$usethreads" in
12203 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
12205 d_getnetbyaddr_r=undef
12206 getnetbyaddr_r_proto=0
12210 *) getnetbyaddr_r_proto=0
12214 : see if getnetbyname_r exists
12215 set getnetbyname_r d_getnetbyname_r
12217 case "$d_getnetbyname_r" in
12219 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12222 hdrs="$hdrs $i_systime sys/time.h"
12225 case "$d_getnetbyname_r_proto:$usethreads" in
12226 ":define") d_getnetbyname_r_proto=define
12227 set d_getnetbyname_r_proto getnetbyname_r $hdrs
12231 case "$d_getnetbyname_r_proto" in
12233 case "$getnetbyname_r_proto" in
12234 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
12235 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
12237 case "$getnetbyname_r_proto" in
12238 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
12239 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
12241 case "$getnetbyname_r_proto" in
12242 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
12243 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
12245 case "$getnetbyname_r_proto" in
12246 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
12247 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
12249 case "$getnetbyname_r_proto" in
12250 ''|0) d_getnetbyname_r=undef
12251 getnetbyname_r_proto=0
12252 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
12253 * ) case "$getnetbyname_r_proto" in
12254 REENTRANT_PROTO*) ;;
12255 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
12257 echo "Prototype: $try" ;;
12260 *) case "$usethreads" in
12261 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
12263 d_getnetbyname_r=undef
12264 getnetbyname_r_proto=0
12268 *) getnetbyname_r_proto=0
12272 : see if getnetent_r exists
12273 set getnetent_r d_getnetent_r
12275 case "$d_getnetent_r" in
12277 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12280 hdrs="$hdrs $i_systime sys/time.h"
12283 case "$d_getnetent_r_proto:$usethreads" in
12284 ":define") d_getnetent_r_proto=define
12285 set d_getnetent_r_proto getnetent_r $hdrs
12289 case "$d_getnetent_r_proto" in
12291 case "$getnetent_r_proto" in
12292 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
12293 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
12295 case "$getnetent_r_proto" in
12296 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
12297 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBIE ;;
12299 case "$getnetent_r_proto" in
12300 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
12301 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBIE ;;
12303 case "$getnetent_r_proto" in
12304 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
12305 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBI ;;
12307 case "$getnetent_r_proto" in
12308 ''|0) try='int getnetent_r(struct netent*, char*, int);'
12309 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBI ;;
12311 case "$getnetent_r_proto" in
12312 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
12313 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SD ;;
12315 case "$getnetent_r_proto" in
12316 ''|0) d_getnetent_r=undef
12317 getnetent_r_proto=0
12318 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
12319 * ) case "$getnetent_r_proto" in
12320 REENTRANT_PROTO*) ;;
12321 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
12323 echo "Prototype: $try" ;;
12326 *) case "$usethreads" in
12327 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
12329 d_getnetent_r=undef
12330 getnetent_r_proto=0
12334 *) getnetent_r_proto=0
12338 : see if prototypes for various getnetxxx netdb.h functions are available
12340 set d_getnetprotos getnetent $i_netdb netdb.h
12343 : see if getpagesize exists
12344 set getpagesize d_getpagsz
12348 : see if getprotobyname exists
12349 set getprotobyname d_getpbyname
12352 : see if getprotobynumber exists
12353 set getprotobynumber d_getpbynumber
12356 : see if getprotoent exists
12357 set getprotoent d_getpent
12360 : see if getpgid exists
12361 set getpgid d_getpgid
12364 : see if getpgrp2 exists
12365 set getpgrp2 d_getpgrp2
12368 : see if getppid exists
12369 set getppid d_getppid
12372 : see if getpriority exists
12373 set getpriority d_getprior
12376 : see if getprotobyname_r exists
12377 set getprotobyname_r d_getprotobyname_r
12379 case "$d_getprotobyname_r" in
12381 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12384 hdrs="$hdrs $i_systime sys/time.h"
12387 case "$d_getprotobyname_r_proto:$usethreads" in
12388 ":define") d_getprotobyname_r_proto=define
12389 set d_getprotobyname_r_proto getprotobyname_r $hdrs
12393 case "$d_getprotobyname_r_proto" in
12395 case "$getprotobyname_r_proto" in
12396 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
12397 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
12399 case "$getprotobyname_r_proto" in
12400 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
12401 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
12403 case "$getprotobyname_r_proto" in
12404 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
12405 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
12407 case "$getprotobyname_r_proto" in
12408 ''|0) d_getprotobyname_r=undef
12409 getprotobyname_r_proto=0
12410 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
12411 * ) case "$getprotobyname_r_proto" in
12412 REENTRANT_PROTO*) ;;
12413 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
12415 echo "Prototype: $try" ;;
12418 *) case "$usethreads" in
12419 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
12421 d_getprotobyname_r=undef
12422 getprotobyname_r_proto=0
12426 *) getprotobyname_r_proto=0
12430 : see if getprotobynumber_r exists
12431 set getprotobynumber_r d_getprotobynumber_r
12433 case "$d_getprotobynumber_r" in
12435 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12438 hdrs="$hdrs $i_systime sys/time.h"
12441 case "$d_getprotobynumber_r_proto:$usethreads" in
12442 ":define") d_getprotobynumber_r_proto=define
12443 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
12447 case "$d_getprotobynumber_r_proto" in
12449 case "$getprotobynumber_r_proto" in
12450 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
12451 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
12453 case "$getprotobynumber_r_proto" in
12454 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
12455 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
12457 case "$getprotobynumber_r_proto" in
12458 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
12459 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
12461 case "$getprotobynumber_r_proto" in
12462 ''|0) d_getprotobynumber_r=undef
12463 getprotobynumber_r_proto=0
12464 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
12465 * ) case "$getprotobynumber_r_proto" in
12466 REENTRANT_PROTO*) ;;
12467 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
12469 echo "Prototype: $try" ;;
12472 *) case "$usethreads" in
12473 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
12475 d_getprotobynumber_r=undef
12476 getprotobynumber_r_proto=0
12480 *) getprotobynumber_r_proto=0
12484 : see if getprotoent_r exists
12485 set getprotoent_r d_getprotoent_r
12487 case "$d_getprotoent_r" in
12489 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12492 hdrs="$hdrs $i_systime sys/time.h"
12495 case "$d_getprotoent_r_proto:$usethreads" in
12496 ":define") d_getprotoent_r_proto=define
12497 set d_getprotoent_r_proto getprotoent_r $hdrs
12501 case "$d_getprotoent_r_proto" in
12503 case "$getprotoent_r_proto" in
12504 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
12505 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
12507 case "$getprotoent_r_proto" in
12508 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
12509 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBI ;;
12511 case "$getprotoent_r_proto" in
12512 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
12513 ./protochk "extern $try" $hdrs && getprotoent_r_proto=S_SBI ;;
12515 case "$getprotoent_r_proto" in
12516 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
12517 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SD ;;
12519 case "$getprotoent_r_proto" in
12520 ''|0) d_getprotoent_r=undef
12521 getprotoent_r_proto=0
12522 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
12523 * ) case "$getprotoent_r_proto" in
12524 REENTRANT_PROTO*) ;;
12525 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
12527 echo "Prototype: $try" ;;
12530 *) case "$usethreads" in
12531 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
12533 d_getprotoent_r=undef
12534 getprotoent_r_proto=0
12538 *) getprotoent_r_proto=0
12542 : see if prototypes for various getprotoxxx netdb.h functions are available
12544 set d_getprotoprotos getprotoent $i_netdb netdb.h
12547 : see if getprpwnam exists
12548 set getprpwnam d_getprpwnam
12551 : see if getpwent exists
12552 set getpwent d_getpwent
12555 : see if getpwent_r exists
12556 set getpwent_r d_getpwent_r
12558 case "$d_getpwent_r" in
12560 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12563 hdrs="$hdrs $i_systime sys/time.h"
12566 case "$d_getpwent_r_proto:$usethreads" in
12567 ":define") d_getpwent_r_proto=define
12568 set d_getpwent_r_proto getpwent_r $hdrs
12572 case "$d_getpwent_r_proto" in
12574 case "$getpwent_r_proto" in
12575 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
12576 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBWR ;;
12578 case "$getpwent_r_proto" in
12579 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
12580 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIR ;;
12582 case "$getpwent_r_proto" in
12583 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
12584 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBW ;;
12586 case "$getpwent_r_proto" in
12587 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
12588 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBI ;;
12590 case "$getpwent_r_proto" in
12591 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
12592 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBI ;;
12594 case "$getpwent_r_proto" in
12595 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
12596 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIH ;;
12598 case "$getpwent_r_proto" in
12599 ''|0) d_getpwent_r=undef
12601 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
12602 * ) case "$getpwent_r_proto" in
12603 REENTRANT_PROTO*) ;;
12604 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
12606 echo "Prototype: $try" ;;
12609 *) case "$usethreads" in
12610 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
12617 *) getpwent_r_proto=0
12621 : see if getpwnam_r exists
12622 set getpwnam_r d_getpwnam_r
12624 case "$d_getpwnam_r" in
12626 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12629 hdrs="$hdrs $i_systime sys/time.h"
12632 case "$d_getpwnam_r_proto:$usethreads" in
12633 ":define") d_getpwnam_r_proto=define
12634 set d_getpwnam_r_proto getpwnam_r $hdrs
12638 case "$d_getpwnam_r_proto" in
12640 case "$getpwnam_r_proto" in
12641 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
12642 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
12644 case "$getpwnam_r_proto" in
12645 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
12646 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
12648 case "$getpwnam_r_proto" in
12649 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
12650 ./protochk "extern $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
12652 case "$getpwnam_r_proto" in
12653 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
12654 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
12656 case "$getpwnam_r_proto" in
12657 ''|0) d_getpwnam_r=undef
12659 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
12660 * ) case "$getpwnam_r_proto" in
12661 REENTRANT_PROTO*) ;;
12662 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
12664 echo "Prototype: $try" ;;
12667 *) case "$usethreads" in
12668 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
12675 *) getpwnam_r_proto=0
12679 : see if getpwuid_r exists
12680 set getpwuid_r d_getpwuid_r
12682 case "$d_getpwuid_r" in
12684 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12687 hdrs="$hdrs $i_systime sys/time.h"
12690 case "$d_getpwuid_r_proto:$usethreads" in
12691 ":define") d_getpwuid_r_proto=define
12692 set d_getpwuid_r_proto getpwuid_r $hdrs
12696 case "$d_getpwuid_r_proto" in
12698 case "$getpwuid_r_proto" in
12699 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
12700 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
12702 case "$getpwuid_r_proto" in
12703 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
12704 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
12706 case "$getpwuid_r_proto" in
12707 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
12708 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
12710 case "$getpwuid_r_proto" in
12711 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
12712 ./protochk "extern $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
12714 case "$getpwuid_r_proto" in
12715 ''|0) d_getpwuid_r=undef
12717 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
12718 * ) case "$getpwuid_r_proto" in
12719 REENTRANT_PROTO*) ;;
12720 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
12722 echo "Prototype: $try" ;;
12725 *) case "$usethreads" in
12726 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
12733 *) getpwuid_r_proto=0
12738 : see if getservbyname exists
12739 set getservbyname d_getsbyname
12742 : see if getservbyport exists
12743 set getservbyport d_getsbyport
12746 : see if getservent exists
12747 set getservent d_getsent
12750 : see if getservbyname_r exists
12751 set getservbyname_r d_getservbyname_r
12753 case "$d_getservbyname_r" in
12755 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12758 hdrs="$hdrs $i_systime sys/time.h"
12761 case "$d_getservbyname_r_proto:$usethreads" in
12762 ":define") d_getservbyname_r_proto=define
12763 set d_getservbyname_r_proto getservbyname_r $hdrs
12767 case "$d_getservbyname_r_proto" in
12769 case "$getservbyname_r_proto" in
12770 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
12771 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
12773 case "$getservbyname_r_proto" in
12774 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
12775 ./protochk "extern $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
12777 case "$getservbyname_r_proto" in
12778 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
12779 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
12781 case "$getservbyname_r_proto" in
12782 ''|0) d_getservbyname_r=undef
12783 getservbyname_r_proto=0
12784 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
12785 * ) case "$getservbyname_r_proto" in
12786 REENTRANT_PROTO*) ;;
12787 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
12789 echo "Prototype: $try" ;;
12792 *) case "$usethreads" in
12793 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
12795 d_getservbyname_r=undef
12796 getservbyname_r_proto=0
12800 *) getservbyname_r_proto=0
12804 : see if getservbyport_r exists
12805 set getservbyport_r d_getservbyport_r
12807 case "$d_getservbyport_r" in
12809 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12812 hdrs="$hdrs $i_systime sys/time.h"
12815 case "$d_getservbyport_r_proto:$usethreads" in
12816 ":define") d_getservbyport_r_proto=define
12817 set d_getservbyport_r_proto getservbyport_r $hdrs
12821 case "$d_getservbyport_r_proto" in
12823 case "$getservbyport_r_proto" in
12824 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
12825 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
12827 case "$getservbyport_r_proto" in
12828 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
12829 ./protochk "extern $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
12831 case "$getservbyport_r_proto" in
12832 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
12833 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
12835 case "$getservbyport_r_proto" in
12836 ''|0) d_getservbyport_r=undef
12837 getservbyport_r_proto=0
12838 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
12839 * ) case "$getservbyport_r_proto" in
12840 REENTRANT_PROTO*) ;;
12841 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
12843 echo "Prototype: $try" ;;
12846 *) case "$usethreads" in
12847 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
12849 d_getservbyport_r=undef
12850 getservbyport_r_proto=0
12854 *) getservbyport_r_proto=0
12858 : see if getservent_r exists
12859 set getservent_r d_getservent_r
12861 case "$d_getservent_r" in
12863 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12866 hdrs="$hdrs $i_systime sys/time.h"
12869 case "$d_getservent_r_proto:$usethreads" in
12870 ":define") d_getservent_r_proto=define
12871 set d_getservent_r_proto getservent_r $hdrs
12875 case "$d_getservent_r_proto" in
12877 case "$getservent_r_proto" in
12878 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
12879 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBWR ;;
12881 case "$getservent_r_proto" in
12882 ''|0) try='int getservent_r(struct servent*, char*, int);'
12883 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBI ;;
12885 case "$getservent_r_proto" in
12886 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
12887 ./protochk "extern $try" $hdrs && getservent_r_proto=S_SBI ;;
12889 case "$getservent_r_proto" in
12890 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
12891 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SD ;;
12893 case "$getservent_r_proto" in
12894 ''|0) d_getservent_r=undef
12895 getservent_r_proto=0
12896 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
12897 * ) case "$getservent_r_proto" in
12898 REENTRANT_PROTO*) ;;
12899 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
12901 echo "Prototype: $try" ;;
12904 *) case "$usethreads" in
12905 define) echo "getservent_r has no prototype, not using it." >&4 ;;
12907 d_getservent_r=undef
12908 getservent_r_proto=0
12912 *) getservent_r_proto=0
12916 : see if prototypes for various getservxxx netdb.h functions are available
12918 set d_getservprotos getservent $i_netdb netdb.h
12921 : see if getspnam exists
12922 set getspnam d_getspnam
12925 : see if this is a shadow.h system
12926 set shadow.h i_shadow
12929 : see if getspnam_r exists
12930 set getspnam_r d_getspnam_r
12932 case "$d_getspnam_r" in
12934 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
12937 hdrs="$hdrs $i_systime sys/time.h"
12940 case "$d_getspnam_r_proto:$usethreads" in
12941 ":define") d_getspnam_r_proto=define
12942 set d_getspnam_r_proto getspnam_r $hdrs
12946 case "$d_getspnam_r_proto" in
12948 case "$getspnam_r_proto" in
12949 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
12950 ./protochk "extern $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
12952 case "$getspnam_r_proto" in
12953 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
12954 ./protochk "extern $try" $hdrs && getspnam_r_proto=S_CSBI ;;
12956 case "$getspnam_r_proto" in
12957 ''|0) d_getspnam_r=undef
12959 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
12960 * ) case "$getspnam_r_proto" in
12961 REENTRANT_PROTO*) ;;
12962 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
12964 echo "Prototype: $try" ;;
12967 *) case "$usethreads" in
12968 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
12975 *) getspnam_r_proto=0
12979 : see if gettimeofday or ftime exists
12980 set gettimeofday d_gettimeod
12982 case "$d_gettimeod" in
12988 val="$undef"; set d_ftime; eval $setvar
12991 case "$d_gettimeod$d_ftime" in
12994 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
12998 : see if gmtime_r exists
12999 set gmtime_r d_gmtime_r
13001 case "$d_gmtime_r" in
13003 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h"
13006 hdrs="$hdrs $i_systime sys/time.h"
13009 case "$d_gmtime_r_proto:$usethreads" in
13010 ":define") d_gmtime_r_proto=define
13011 set d_gmtime_r_proto gmtime_r $hdrs
13015 case "$d_gmtime_r_proto" in
13017 case "$gmtime_r_proto" in
13018 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
13019 ./protochk "extern $try" $hdrs && gmtime_r_proto=S_TS ;;
13021 case "$gmtime_r_proto" in
13022 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
13023 ./protochk "extern $try" $hdrs && gmtime_r_proto=I_TS ;;
13025 case "$gmtime_r_proto" in
13026 ''|0) d_gmtime_r=undef
13028 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
13029 * ) case "$gmtime_r_proto" in
13030 REENTRANT_PROTO*) ;;
13031 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
13033 echo "Prototype: $try" ;;
13036 *) case "$usethreads" in
13037 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
13044 *) gmtime_r_proto=0
13048 : see if hasmntopt exists
13049 set hasmntopt d_hasmntopt
13052 : see if this is a netinet/in.h or sys/in.h system
13053 set netinet/in.h i_niin sys/in.h i_sysin
13056 : see if arpa/inet.h has to be included
13057 set arpa/inet.h i_arpainet
13060 : see if htonl --and friends-- exists
13065 : Maybe they are macros.
13068 $cat >htonl.c <<EOM
13070 #include <sys/types.h>
13071 #$i_niin I_NETINET_IN
13073 #$i_arpainet I_ARPA_INET
13074 #ifdef I_NETINET_IN
13075 #include <netinet/in.h>
13078 #include <sys/in.h>
13081 #include <arpa/inet.h>
13084 printf("Defined as a macro.");
13087 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
13088 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
13090 echo "But it seems to be defined as a macro." >&4
13100 if set index val -f; eval $csym; $val; then
13101 if set strchr val -f d_strchr; eval $csym; $val; then
13102 if $contains strchr "$strings" >/dev/null 2>&1 ; then
13105 echo "strchr() found." >&4
13109 echo "index() found." >&4
13114 echo "index() found." >&4
13117 if set strchr val -f d_strchr; eval $csym; $val; then
13120 echo "strchr() found." >&4
13122 echo "No index() or strchr() found!" >&4
13127 set d_strchr; eval $setvar
13129 set d_index; eval $setvar
13131 : check whether inet_aton exists
13132 set inet_aton d_inetaton
13137 $cat >isascii.c <<'EOCP'
13149 if eval $compile; then
13150 echo "isascii() found." >&4
13153 echo "isascii() NOT found." >&4
13160 : see if isfinite exists
13161 set isfinite d_isfinite
13164 : see if isinf exists
13168 : see if isnan exists
13172 : see if isnanl exists
13173 set isnanl d_isnanl
13176 : see if killpg exists
13177 set killpg d_killpg
13180 : see if lchown exists
13182 $cat > try.c <<'EOCP'
13183 /* System header to define __stub macros and hopefully few prototypes,
13184 which can conflict with char lchown(); below. */
13185 #include <assert.h>
13186 /* Override any gcc2 internal prototype to avoid an error. */
13187 /* We use char because int might match the return type of a gcc2
13188 builtin and then its argument prototype would still apply. */
13191 /* The GNU C library defines this for functions which it implements
13192 to always fail with ENOSYS. Some functions are actually named
13193 something starting with __ and the normal name is an alias. */
13194 #if defined (__stub_lchown) || defined (__stub___lchown)
13202 if eval $compile; then
13203 $echo "lchown() found." >&4
13206 $echo "lchown() NOT found." >&4
13212 : See if number of significant digits in a double precision number is known
13214 $cat >ldbl_dig.c <<EOM
13215 #$i_limits I_LIMITS
13218 #include <limits.h>
13224 printf("Contains LDBL_DIG");
13227 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
13228 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
13229 echo "LDBL_DIG found." >&4
13232 echo "LDBL_DIG NOT found." >&4
13239 : see if link exists
13243 : see if localtime_r exists
13244 set localtime_r d_localtime_r
13246 case "$d_localtime_r" in
13248 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h"
13251 hdrs="$hdrs $i_systime sys/time.h"
13254 case "$d_localtime_r_proto:$usethreads" in
13255 ":define") d_localtime_r_proto=define
13256 set d_localtime_r_proto localtime_r $hdrs
13260 case "$d_localtime_r_proto" in
13262 case "$localtime_r_proto" in
13263 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
13264 ./protochk "extern $try" $hdrs && localtime_r_proto=S_TS ;;
13266 case "$localtime_r_proto" in
13267 ''|0) try='int localtime_r(const time_t*, struct tm*);'
13268 ./protochk "extern $try" $hdrs && localtime_r_proto=I_TS ;;
13270 case "$localtime_r_proto" in
13271 ''|0) d_localtime_r=undef
13272 localtime_r_proto=0
13273 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
13274 * ) case "$localtime_r_proto" in
13275 REENTRANT_PROTO*) ;;
13276 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
13278 echo "Prototype: $try" ;;
13281 *) case "$usethreads" in
13282 define) echo "localtime_r has no prototype, not using it." >&4 ;;
13284 d_localtime_r=undef
13285 localtime_r_proto=0
13289 *) localtime_r_proto=0
13293 : see if localeconv exists
13294 set localeconv d_locconv
13297 : see if lockf exists
13301 : see if prototype for lseek is available
13303 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
13306 : see if lstat exists
13310 : see if madvise exists
13311 set madvise d_madvise
13314 : see if mblen exists
13318 : see if mbstowcs exists
13319 set mbstowcs d_mbstowcs
13322 : see if mbtowc exists
13323 set mbtowc d_mbtowc
13326 : see if memchr exists
13327 set memchr d_memchr
13330 : see if memcmp exists
13331 set memcmp d_memcmp
13334 : see if memcpy exists
13335 set memcpy d_memcpy
13338 : see if memmove exists
13339 set memmove d_memmove
13342 : see if memset exists
13343 set memset d_memset
13346 : see if mkdir exists
13350 : see if mkdtemp exists
13351 set mkdtemp d_mkdtemp
13354 : see if mkfifo exists
13355 set mkfifo d_mkfifo
13358 : see if mkstemp exists
13359 set mkstemp d_mkstemp
13362 : see if mkstemps exists
13363 set mkstemps d_mkstemps
13366 : see if mktime exists
13367 set mktime d_mktime
13370 : see if this is a sys/mman.h system
13371 set sys/mman.h i_sysmman
13374 : see if mmap exists
13377 : see what shmat returns
13378 : default to something harmless
13380 case "$i_sysmman$d_mmap" in
13382 $cat >mmap.c <<'END'
13383 #include <sys/mman.h>
13386 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
13391 echo "and it returns ($mmaptype)." >&4
13397 : see if mprotect exists
13398 set mprotect d_mprotect
13401 : see if msgctl exists
13402 set msgctl d_msgctl
13405 : see if msgget exists
13406 set msgget d_msgget
13409 : see if msgsnd exists
13410 set msgsnd d_msgsnd
13413 : see if msgrcv exists
13414 set msgrcv d_msgrcv
13417 : see how much of the 'msg*(2)' library is present.
13420 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
13421 *"$undef"*) h_msg=false;;
13425 case "`ipcs 2>&1`" in
13426 "SVID messages"*"not configured"*)
13427 echo "Your $osname does not have the msg*(2) configured." >&4
13430 set msgctl d_msgctl
13432 set msgget d_msgget
13434 set msgsnd d_msgsnd
13436 set msgrcv d_msgrcv
13442 : we could also check for sys/ipc.h ...
13443 if $h_msg && $test `./findhdr sys/msg.h`; then
13444 echo "You have the full msg*(2) library." >&4
13447 echo "You don't have the full msg*(2) library." >&4
13455 echo "Checking to see if your system supports struct msghdr..." >&4
13456 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
13458 case "$d_msghdr_s" in
13459 "$define") echo "Yes, it does." ;;
13460 *) echo "No, it doesn't." ;;
13464 : see if msync exists
13468 : see if munmap exists
13469 set munmap d_munmap
13472 : see if nice exists
13476 : see if this is a langinfo.h system
13477 set langinfo.h i_langinfo
13480 : see if nl_langinfo exists
13481 set nl_langinfo d_nl_langinfo
13484 : check for length of character
13486 case "$charsize" in
13488 echo "Checking to see how big your characters are (hey, you never know)..." >&4
13489 $cat >try.c <<'EOCP'
13493 printf("%d\n", (int)sizeof(char));
13498 if eval $compile_ok; then
13502 echo "(I can't seem to compile the test program. Guessing...)"
13509 rp="What is the size of a character (in bytes)?"
13514 : check for volatile keyword
13516 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
13517 $cat >try.c <<'EOCP'
13520 typedef struct _goo_struct goo_struct;
13521 goo_struct * volatile goo = ((goo_struct *)0);
13522 struct _goo_struct {
13527 typedef unsigned short foo_t;
13528 char *volatile foo;
13530 volatile foo_t blech;
13534 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
13536 echo "Yup, it does."
13539 echo "Nope, it doesn't."
13547 $echo "Choosing the C types to be used for Perl's internal types..." >&4
13549 case "$use64bitint:$d_quad:$quadtype" in
13552 uvtype="$uquadtype"
13557 uvtype="unsigned long"
13563 case "$uselongdouble:$d_longdbl" in
13565 nvtype="long double"
13566 nvsize=$longdblsize
13573 $echo "(IV will be "$ivtype", $ivsize bytes)"
13574 $echo "(UV will be "$uvtype", $uvsize bytes)"
13575 $echo "(NV will be "$nvtype", $nvsize bytes)"
13578 #$i_inttypes I_INTTYPES
13580 #include <inttypes.h>
13585 int8_t i = INT8_MAX;
13586 uint8_t u = UINT8_MAX;
13587 printf("int8_t\n");
13590 int16_t i = INT16_MAX;
13591 uint16_t i = UINT16_MAX;
13592 printf("int16_t\n");
13595 int32_t i = INT32_MAX;
13596 uint32_t u = UINT32_MAX;
13597 printf("int32_t\n");
13603 '') case "$charsize" in
13605 u8type="unsigned char"
13614 if eval $compile; then
13615 case "`$run ./try`" in
13616 int8_t) i8type=int8_t
13626 '') if $test $charsize -ge 1; then
13628 u8type="unsigned char"
13636 '') case "$shortsize" in
13638 u16type="unsigned short"
13646 '') set try -DINT16
13647 if eval $compile; then
13648 case "`$run ./try`" in
13660 '') if $test $shortsize -ge 2; then
13662 u16type="unsigned short"
13670 '') case "$longsize" in
13672 u32type="unsigned long"
13676 *) case "$intsize" in
13678 u32type="unsigned int"
13688 '') set try -DINT32
13689 if eval $compile; then
13690 case "`$run ./try`" in
13702 '') if $test $intsize -ge 4; then
13704 u32type="unsigned int"
13712 '') case "$d_quad:$quadtype" in
13714 i64type="$quadtype"
13715 u64type="$uquadtype"
13723 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
13724 : volatile so that the compiler has to store it out to memory.
13725 if test X"$d_volatile" = X"$define"; then
13730 #include <sys/types.h>
13731 #include <signal.h>
13733 $volatile int bletched = 0;
13734 $signal_t blech(s) int s; { bletched = 1; }
13739 int n = 8 * $uvsize;
13742 signal(SIGFPE, blech);
13745 for (i = 0; i < n; i++) {
13746 u = u << 1 | ($uvtype)1;
13748 if (($uvtype)d != u)
13752 d = ($nvtype)(u - 1);
13753 if (($uvtype)d != (u - 1))
13761 printf("%d\n", ((i == n) ? -n : i));
13767 d_nv_preserves_uv="$undef"
13768 if eval $compile; then
13769 nv_preserves_uv_bits="`$run ./try`"
13771 case "$nv_preserves_uv_bits" in
13773 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
13774 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
13775 d_nv_preserves_uv="$define"
13777 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
13778 d_nv_preserves_uv="$undef" ;;
13779 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
13780 nv_preserves_uv_bits="$undef" ;;
13786 : check for off64_t
13788 echo "Checking to see if you have off64_t..." >&4
13790 #include <sys/types.h>
13791 #include <unistd.h>
13792 int main() { off64_t x = 7; }
13795 if eval $compile; then
13797 echo "You have off64_t."
13800 echo "You do not have off64_t."
13801 case "$lseeksize" in
13802 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
13809 : see if POSIX threads are available
13810 set pthread.h i_pthread
13816 : how to create joinable pthreads
13817 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
13819 echo "Checking what constant to use for creating joinable pthreads..." >&4
13820 $cat >try.c <<'EOCP'
13821 #include <pthread.h>
13823 int detachstate = JOINABLE;
13826 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
13827 if eval $compile; then
13828 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
13829 val="$undef" # Yes, undef.
13830 set d_old_pthread_create_joinable
13833 set old_pthread_create_joinable
13836 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
13837 if eval $compile; then
13838 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
13840 set d_old_pthread_create_joinable
13842 val=PTHREAD_CREATE_UNDETACHED
13843 set old_pthread_create_joinable
13846 set try -DJOINABLE=__UNDETACHED
13847 if eval $compile; then
13848 echo "You seem to use __UNDETACHED." >&4
13850 set d_old_pthread_create_joinable
13853 set old_pthread_create_joinable
13856 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
13858 set d_old_pthread_create_joinable
13861 set old_pthread_create_joinable
13868 d_old_pthread_create_joinable="$undef"
13869 old_pthread_create_joinable=""
13872 : see if pause exists
13876 : see if pipe exists
13880 : see if poll exists
13884 : see if readlink exists
13885 set readlink d_readlink
13891 case "$d_readlink" in
13893 if $issymlink /proc/self/exe ; then
13894 $ls -l /proc/self/exe > reflect
13895 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13896 echo "You have Linux-like /proc/self/exe."
13897 procselfexe='"/proc/self/exe"'
13901 if $issymlink /proc/curproc/file ; then
13902 $ls -l /proc/curproc/file > reflect
13903 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13904 echo "You have BSD-like /proc/curproc/file."
13905 procselfexe='"/proc/curproc/file"'
13915 : see whether the pthread_atfork exists
13917 #include <pthread.h>
13920 #ifdef PTHREAD_ATFORK
13921 pthread_atfork(NULL,NULL,NULL);
13926 : see if pthread_atfork exists
13927 set try -DPTHREAD_ATFORK
13928 if eval $compile; then
13933 case "$usethreads" in
13936 $define) echo 'pthread_atfork found.' >&4 ;;
13937 *) echo 'pthread_atfork NOT found.' >&4 ;;
13940 set d_pthread_atfork
13944 : see whether the various POSIXish _yields exist
13946 #include <pthread.h>
13952 #ifdef PTHREAD_YIELD
13955 #ifdef PTHREAD_YIELD_NULL
13956 pthread_yield(NULL);
13962 : see if sched_yield exists
13963 set try -DSCHED_YIELD
13964 if eval $compile; then
13966 sched_yield='sched_yield()'
13970 case "$usethreads" in
13973 $define) echo 'sched_yield() found.' >&4 ;;
13974 *) echo 'sched_yield() NOT found.' >&4 ;;
13980 : see if pthread_yield exists
13981 set try -DPTHREAD_YIELD
13982 if eval $compile; then
13984 case "$sched_yield" in
13985 '') sched_yield='pthread_yield()' ;;
13988 set try -DPTHREAD_YIELD_NULL
13989 if eval $compile; then
13991 case "$sched_yield" in
13992 '') sched_yield='pthread_yield(NULL)' ;;
13998 case "$usethreads" in
14001 $define) echo 'pthread_yield() found.' >&4 ;;
14002 *) echo 'pthread_yield() NOT found.' >&4 ;;
14006 set d_pthread_yield
14009 case "$sched_yield" in
14010 '') sched_yield=undef ;;
14015 : see if random_r exists
14016 set random_r d_random_r
14018 case "$d_random_r" in
14020 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
14023 hdrs="$hdrs $i_systime sys/time.h"
14026 case "$d_random_r_proto:$usethreads" in
14027 ":define") d_random_r_proto=define
14028 set d_random_r_proto random_r $hdrs
14032 case "$d_random_r_proto" in
14034 case "$random_r_proto" in
14035 ''|0) try='int random_r(int*, struct random_data*);'
14036 ./protochk "extern $try" $hdrs && random_r_proto=I_TS ;;
14038 case "$random_r_proto" in
14039 ''|0) d_random_r=undef
14041 echo "Disabling random_r, cannot determine prototype." >&4 ;;
14042 * ) case "$random_r_proto" in
14043 REENTRANT_PROTO*) ;;
14044 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
14046 echo "Prototype: $try" ;;
14049 *) case "$usethreads" in
14050 define) echo "random_r has no prototype, not using it." >&4 ;;
14057 *) random_r_proto=0
14061 : see if readdir and friends exist
14062 set readdir d_readdir
14064 set seekdir d_seekdir
14066 set telldir d_telldir
14068 set rewinddir d_rewinddir
14071 : see if readdir64_r exists
14072 set readdir64_r d_readdir64_r
14074 case "$d_readdir64_r" in
14076 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
14079 hdrs="$hdrs $i_systime sys/time.h"
14082 case "$d_readdir64_r_proto:$usethreads" in
14083 ":define") d_readdir64_r_proto=define
14084 set d_readdir64_r_proto readdir64_r $hdrs
14088 case "$d_readdir64_r_proto" in
14090 case "$readdir64_r_proto" in
14091 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
14092 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TSR ;;
14094 case "$readdir64_r_proto" in
14095 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
14096 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TS ;;
14098 case "$readdir64_r_proto" in
14099 ''|0) d_readdir64_r=undef
14100 readdir64_r_proto=0
14101 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
14102 * ) case "$readdir64_r_proto" in
14103 REENTRANT_PROTO*) ;;
14104 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
14106 echo "Prototype: $try" ;;
14109 *) case "$usethreads" in
14110 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
14112 d_readdir64_r=undef
14113 readdir64_r_proto=0
14117 *) readdir64_r_proto=0
14121 : see if readdir_r exists
14122 set readdir_r d_readdir_r
14124 case "$d_readdir_r" in
14126 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
14129 hdrs="$hdrs $i_systime sys/time.h"
14132 case "$d_readdir_r_proto:$usethreads" in
14133 ":define") d_readdir_r_proto=define
14134 set d_readdir_r_proto readdir_r $hdrs
14138 case "$d_readdir_r_proto" in
14140 case "$readdir_r_proto" in
14141 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
14142 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TSR ;;
14144 case "$readdir_r_proto" in
14145 ''|0) try='int readdir_r(DIR*, struct dirent*);'
14146 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TS ;;
14148 case "$readdir_r_proto" in
14149 ''|0) d_readdir_r=undef
14151 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
14152 * ) case "$readdir_r_proto" in
14153 REENTRANT_PROTO*) ;;
14154 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
14156 echo "Prototype: $try" ;;
14159 *) case "$usethreads" in
14160 define) echo "readdir_r has no prototype, not using it." >&4 ;;
14167 *) readdir_r_proto=0
14171 : see if readv exists
14175 : see if recvmsg exists
14176 set recvmsg d_recvmsg
14179 : see if rename exists
14180 set rename d_rename
14183 : see if rmdir exists
14187 : see if memory.h is available.
14192 : See if it conflicts with string.h
14198 $cppstdin $cppflags $cppminus < $strings > mem.h
14199 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
14201 echo "We won't be including <memory.h>."
14211 : can bcopy handle overlapping blocks?
14214 case "$d_memmove" in
14215 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
14216 *) case "$d_bcopy" in
14218 echo "Checking to see if bcopy() can do overlapping copies..." >&4
14220 #$i_memory I_MEMORY
14221 #$i_stdlib I_STDLIB
14222 #$i_string I_STRING
14223 #$i_unistd I_UNISTD
14225 $cat >>try.c <<'EOCP'
14228 # include <memory.h>
14231 # include <stdlib.h>
14234 # include <string.h>
14236 # include <strings.h>
14239 # include <unistd.h> /* Needed for NetBSD */
14243 char buf[128], abc[128];
14249 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14250 try to store the string in read-only memory. */
14251 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
14253 for (align = 7; align >= 0; align--) {
14254 for (len = 36; len; len--) {
14256 bcopy(abc, b, len);
14257 for (off = 1; off <= len; off++) {
14258 bcopy(b, b+off, len);
14259 bcopy(b+off, b, len);
14260 if (bcmp(b, abc, len))
14269 if eval $compile_ok; then
14270 if ./try 2>/dev/null; then
14271 echo "Yes, it can."
14274 echo "It can't, sorry."
14277 echo "(I can't compile the test program, so we'll assume not...)"
14281 $rm -f try.* try core
14287 : can memcpy handle overlapping blocks?
14290 case "$d_memmove" in
14291 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
14292 *) case "$d_memcpy" in
14294 echo "Checking to see if memcpy() can do overlapping copies..." >&4
14296 #$i_memory I_MEMORY
14297 #$i_stdlib I_STDLIB
14298 #$i_string I_STRING
14299 #$i_unistd I_UNISTD
14301 $cat >>try.c <<'EOCP'
14304 # include <memory.h>
14307 # include <stdlib.h>
14310 # include <string.h>
14312 # include <strings.h>
14315 # include <unistd.h> /* Needed for NetBSD */
14319 char buf[128], abc[128];
14325 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14326 try to store the string in read-only memory. */
14327 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
14329 for (align = 7; align >= 0; align--) {
14330 for (len = 36; len; len--) {
14332 memcpy(b, abc, len);
14333 for (off = 1; off <= len; off++) {
14334 memcpy(b+off, b, len);
14335 memcpy(b, b+off, len);
14336 if (memcmp(b, abc, len))
14345 if eval $compile_ok; then
14346 if ./try 2>/dev/null; then
14347 echo "Yes, it can."
14350 echo "It can't, sorry."
14353 echo "(I can't compile the test program, so we'll assume not...)"
14357 $rm -f try.* try core
14363 : can memcmp be trusted to compare relative magnitude?
14365 case "$d_memcmp" in
14368 echo "Checking if your memcmp() can compare relative magnitude..." >&4
14370 #$i_memory I_MEMORY
14371 #$i_stdlib I_STDLIB
14372 #$i_string I_STRING
14373 #$i_unistd I_UNISTD
14375 $cat >>try.c <<'EOCP'
14378 # include <memory.h>
14381 # include <stdlib.h>
14384 # include <string.h>
14386 # include <strings.h>
14389 # include <unistd.h> /* Needed for NetBSD */
14395 if ((a < b) && memcmp(&a, &b, 1) < 0)
14401 if eval $compile_ok; then
14402 if $run ./try 2>/dev/null; then
14403 echo "Yes, it can."
14406 echo "No, it can't (it uses signed chars)."
14409 echo "(I can't compile the test program, so we'll assume not...)"
14413 $rm -f try.* try core
14417 : see if prototype for sbrk is available
14419 set d_sbrkproto sbrk $i_unistd unistd.h
14422 : see if select exists
14423 set select d_select
14426 : see if semctl exists
14427 set semctl d_semctl
14430 : see if semget exists
14431 set semget d_semget
14434 : see if semop exists
14438 : see how much of the 'sem*(2)' library is present.
14441 case "$d_semctl$d_semget$d_semop" in
14442 *"$undef"*) h_sem=false;;
14446 case "`ipcs 2>&1`" in
14447 "SVID messages"*"not configured"*)
14448 echo "Your $osname does not have the sem*(2) configured." >&4
14451 set semctl d_semctl
14453 set semget d_semget
14461 : we could also check for sys/ipc.h ...
14462 if $h_sem && $test `./findhdr sys/sem.h`; then
14463 echo "You have the full sem*(2) library." >&4
14466 echo "You don't have the full sem*(2) library." >&4
14472 : see whether sys/sem.h defines union semun
14474 $cat > try.c <<'END'
14475 #include <sys/types.h>
14476 #include <sys/ipc.h>
14477 #include <sys/sem.h>
14478 int main () { union semun semun; semun.buf = 0; }
14481 if eval $compile; then
14482 echo "You have union semun in <sys/sem.h>." >&4
14485 echo "You do not have union semun in <sys/sem.h>." >&4
14488 $rm -f try try.c try.h
14492 : see how to do semctl IPC_STAT
14495 : see whether semctl IPC_STAT can use union semun
14500 # define S_IRUSR S_IREAD
14501 # define S_IWUSR S_IWRITE
14502 # define S_IXUSR S_IEXEC
14504 # define S_IRUSR 0400
14505 # define S_IWUSR 0200
14506 # define S_IXUSR 0100
14508 # define S_IRGRP (S_IRUSR>>3)
14509 # define S_IWGRP (S_IWUSR>>3)
14510 # define S_IXGRP (S_IXUSR>>3)
14511 # define S_IROTH (S_IRUSR>>6)
14512 # define S_IWOTH (S_IWUSR>>6)
14513 # define S_IXOTH (S_IXUSR>>6)
14516 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
14517 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
14518 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
14523 #include <sys/types.h>
14524 #include <sys/ipc.h>
14525 #include <sys/sem.h>
14526 #include <sys/stat.h>
14533 #$d_union_semun HAS_UNION_SEMUN
14536 #ifndef HAS_UNION_SEMUN
14539 struct semid_ds *buf;
14540 unsigned short *array;
14546 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14547 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14549 struct semid_ds argbuf;
14552 st = semctl(sem, 0, IPC_STAT, arg);
14556 # endif /* IPC_STAT */
14557 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14559 if (semctl(sem, 0, IPC_RMID, arg) != 0)
14560 # endif /* IPC_RMID */
14561 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14563 #endif /* IPC_PRIVATE && ... */
14564 printf("semget failed: errno = %d\n", errno);
14570 if eval $compile; then
14573 semun) val="$define" ;;
14579 case "$d_semctl_semun" in
14581 echo "You can use union semun for semctl IPC_STAT." >&4
14584 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
14589 : see whether semctl IPC_STAT can use struct semid_ds pointer
14590 $cat > try.c <<'END'
14591 #include <sys/types.h>
14592 #include <sys/ipc.h>
14593 #include <sys/sem.h>
14594 #include <sys/stat.h>
14602 struct semid_ds arg;
14605 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14606 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14609 st = semctl(sem, 0, IPC_STAT, &arg);
14611 printf("semid_ds\n");
14613 # endif /* IPC_STAT */
14614 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14616 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
14617 # endif /* IPC_RMID */
14618 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14620 #endif /* IPC_PRIVATE && ... */
14621 printf("semget failed: errno = %d\n", errno);
14628 if eval $compile; then
14631 semid_ds) val="$define" ;;
14635 set d_semctl_semid_ds
14637 case "$d_semctl_semid_ds" in
14639 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
14641 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
14648 # We do not have the full sem*(2) library, so assume we can not
14654 set d_semctl_semid_ds
14659 : see if sendmsg exists
14660 set sendmsg d_sendmsg
14663 : see if setegid exists
14664 set setegid d_setegid
14667 : see if seteuid exists
14668 set seteuid d_seteuid
14671 : see if setgrent exists
14672 set setgrent d_setgrent
14675 : see if setgrent_r exists
14676 set setgrent_r d_setgrent_r
14678 case "$d_setgrent_r" in
14680 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14683 hdrs="$hdrs $i_systime sys/time.h"
14686 case "$d_setgrent_r_proto:$usethreads" in
14687 ":define") d_setgrent_r_proto=define
14688 set d_setgrent_r_proto setgrent_r $hdrs
14692 case "$d_setgrent_r_proto" in
14694 case "$setgrent_r_proto" in
14695 ''|0) try='int setgrent_r(FILE**);'
14696 ./protochk "extern $try" $hdrs && setgrent_r_proto=I_H ;;
14698 case "$setgrent_r_proto" in
14699 ''|0) try='void setgrent_r(FILE**);'
14700 ./protochk "extern $try" $hdrs && setgrent_r_proto=V_H ;;
14702 case "$setgrent_r_proto" in
14703 ''|0) d_setgrent_r=undef
14705 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
14706 * ) case "$setgrent_r_proto" in
14707 REENTRANT_PROTO*) ;;
14708 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
14710 echo "Prototype: $try" ;;
14713 *) case "$usethreads" in
14714 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
14721 *) setgrent_r_proto=0
14725 : see if sethostent exists
14726 set sethostent d_sethent
14729 : see if sethostent_r exists
14730 set sethostent_r d_sethostent_r
14732 case "$d_sethostent_r" in
14734 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14737 hdrs="$hdrs $i_systime sys/time.h"
14740 case "$d_sethostent_r_proto:$usethreads" in
14741 ":define") d_sethostent_r_proto=define
14742 set d_sethostent_r_proto sethostent_r $hdrs
14746 case "$d_sethostent_r_proto" in
14748 case "$sethostent_r_proto" in
14749 ''|0) try='int sethostent_r(int, struct hostent_data*);'
14750 ./protochk "extern $try" $hdrs && sethostent_r_proto=I_ID ;;
14752 case "$sethostent_r_proto" in
14753 ''|0) try='void sethostent_r(int, struct hostent_data*);'
14754 ./protochk "extern $try" $hdrs && sethostent_r_proto=V_ID ;;
14756 case "$sethostent_r_proto" in
14757 ''|0) d_sethostent_r=undef
14758 sethostent_r_proto=0
14759 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
14760 * ) case "$sethostent_r_proto" in
14761 REENTRANT_PROTO*) ;;
14762 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
14764 echo "Prototype: $try" ;;
14767 *) case "$usethreads" in
14768 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
14770 d_sethostent_r=undef
14771 sethostent_r_proto=0
14775 *) sethostent_r_proto=0
14779 : see if setitimer exists
14780 set setitimer d_setitimer
14783 : see if setlinebuf exists
14784 set setlinebuf d_setlinebuf
14787 : see if setlocale exists
14788 set setlocale d_setlocale
14791 : see if locale.h is available
14792 set locale.h i_locale
14795 : see if setlocale_r exists
14796 set setlocale_r d_setlocale_r
14798 case "$d_setlocale_r" in
14800 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
14803 hdrs="$hdrs $i_systime sys/time.h"
14806 case "$d_setlocale_r_proto:$usethreads" in
14807 ":define") d_setlocale_r_proto=define
14808 set d_setlocale_r_proto setlocale_r $hdrs
14812 case "$d_setlocale_r_proto" in
14814 case "$setlocale_r_proto" in
14815 ''|0) try='int setlocale_r(int, const char*, char*, int);'
14816 ./protochk "extern $try" $hdrs && setlocale_r_proto=I_ICBI ;;
14818 case "$setlocale_r_proto" in
14819 ''|0) d_setlocale_r=undef
14820 setlocale_r_proto=0
14821 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
14822 * ) case "$setlocale_r_proto" in
14823 REENTRANT_PROTO*) ;;
14824 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
14826 echo "Prototype: $try" ;;
14829 *) case "$usethreads" in
14830 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
14832 d_setlocale_r=undef
14833 setlocale_r_proto=0
14837 *) setlocale_r_proto=0
14841 : see if setnetent exists
14842 set setnetent d_setnent
14845 : see if setnetent_r exists
14846 set setnetent_r d_setnetent_r
14848 case "$d_setnetent_r" in
14850 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14853 hdrs="$hdrs $i_systime sys/time.h"
14856 case "$d_setnetent_r_proto:$usethreads" in
14857 ":define") d_setnetent_r_proto=define
14858 set d_setnetent_r_proto setnetent_r $hdrs
14862 case "$d_setnetent_r_proto" in
14864 case "$setnetent_r_proto" in
14865 ''|0) try='int setnetent_r(int, struct netent_data*);'
14866 ./protochk "extern $try" $hdrs && setnetent_r_proto=I_ID ;;
14868 case "$setnetent_r_proto" in
14869 ''|0) try='void setnetent_r(int, struct netent_data*);'
14870 ./protochk "extern $try" $hdrs && setnetent_r_proto=V_ID ;;
14872 case "$setnetent_r_proto" in
14873 ''|0) d_setnetent_r=undef
14874 setnetent_r_proto=0
14875 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
14876 * ) case "$setnetent_r_proto" in
14877 REENTRANT_PROTO*) ;;
14878 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
14880 echo "Prototype: $try" ;;
14883 *) case "$usethreads" in
14884 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
14886 d_setnetent_r=undef
14887 setnetent_r_proto=0
14891 *) setnetent_r_proto=0
14895 : see if setprotoent exists
14896 set setprotoent d_setpent
14899 : see if setpgid exists
14900 set setpgid d_setpgid
14903 : see if setpgrp2 exists
14904 set setpgrp2 d_setpgrp2
14907 : see if setpriority exists
14908 set setpriority d_setprior
14911 : see if setproctitle exists
14912 set setproctitle d_setproctitle
14915 : see if setprotoent_r exists
14916 set setprotoent_r d_setprotoent_r
14918 case "$d_setprotoent_r" in
14920 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14923 hdrs="$hdrs $i_systime sys/time.h"
14926 case "$d_setprotoent_r_proto:$usethreads" in
14927 ":define") d_setprotoent_r_proto=define
14928 set d_setprotoent_r_proto setprotoent_r $hdrs
14932 case "$d_setprotoent_r_proto" in
14934 case "$setprotoent_r_proto" in
14935 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
14936 ./protochk "extern $try" $hdrs && setprotoent_r_proto=I_ID ;;
14938 case "$setprotoent_r_proto" in
14939 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
14940 ./protochk "extern $try" $hdrs && setprotoent_r_proto=V_ID ;;
14942 case "$setprotoent_r_proto" in
14943 ''|0) d_setprotoent_r=undef
14944 setprotoent_r_proto=0
14945 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
14946 * ) case "$setprotoent_r_proto" in
14947 REENTRANT_PROTO*) ;;
14948 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
14950 echo "Prototype: $try" ;;
14953 *) case "$usethreads" in
14954 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
14956 d_setprotoent_r=undef
14957 setprotoent_r_proto=0
14961 *) setprotoent_r_proto=0
14965 : see if setpwent exists
14966 set setpwent d_setpwent
14969 : see if setpwent_r exists
14970 set setpwent_r d_setpwent_r
14972 case "$d_setpwent_r" in
14974 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14977 hdrs="$hdrs $i_systime sys/time.h"
14980 case "$d_setpwent_r_proto:$usethreads" in
14981 ":define") d_setpwent_r_proto=define
14982 set d_setpwent_r_proto setpwent_r $hdrs
14986 case "$d_setpwent_r_proto" in
14988 case "$setpwent_r_proto" in
14989 ''|0) try='int setpwent_r(FILE**);'
14990 ./protochk "extern $try" $hdrs && setpwent_r_proto=I_H ;;
14992 case "$setpwent_r_proto" in
14993 ''|0) try='void setpwent_r(FILE**);'
14994 ./protochk "extern $try" $hdrs && setpwent_r_proto=V_H ;;
14996 case "$setpwent_r_proto" in
14997 ''|0) d_setpwent_r=undef
14999 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
15000 * ) case "$setpwent_r_proto" in
15001 REENTRANT_PROTO*) ;;
15002 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
15004 echo "Prototype: $try" ;;
15007 *) case "$usethreads" in
15008 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
15015 *) setpwent_r_proto=0
15019 : see if setregid exists
15020 set setregid d_setregid
15022 set setresgid d_setresgid
15025 : see if setreuid exists
15026 set setreuid d_setreuid
15028 set setresuid d_setresuid
15031 : see if setrgid exists
15032 set setrgid d_setrgid
15035 : see if setruid exists
15036 set setruid d_setruid
15039 : see if setservent exists
15040 set setservent d_setsent
15043 : see if setservent_r exists
15044 set setservent_r d_setservent_r
15046 case "$d_setservent_r" in
15048 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15051 hdrs="$hdrs $i_systime sys/time.h"
15054 case "$d_setservent_r_proto:$usethreads" in
15055 ":define") d_setservent_r_proto=define
15056 set d_setservent_r_proto setservent_r $hdrs
15060 case "$d_setservent_r_proto" in
15062 case "$setservent_r_proto" in
15063 ''|0) try='int setservent_r(int, struct servent_data*);'
15064 ./protochk "extern $try" $hdrs && setservent_r_proto=I_ID ;;
15066 case "$setservent_r_proto" in
15067 ''|0) try='void setservent_r(int, struct servent_data*);'
15068 ./protochk "extern $try" $hdrs && setservent_r_proto=V_ID ;;
15070 case "$setservent_r_proto" in
15071 ''|0) d_setservent_r=undef
15072 setservent_r_proto=0
15073 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
15074 * ) case "$setservent_r_proto" in
15075 REENTRANT_PROTO*) ;;
15076 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
15078 echo "Prototype: $try" ;;
15081 *) case "$usethreads" in
15082 define) echo "setservent_r has no prototype, not using it." >&4 ;;
15084 d_setservent_r=undef
15085 setservent_r_proto=0
15089 *) setservent_r_proto=0
15093 : see if setsid exists
15094 set setsid d_setsid
15097 : see if setvbuf exists
15098 set setvbuf d_setvbuf
15101 : see if sfio.h is available
15106 : see if sfio library is available
15117 : Ok, but do we want to use it.
15121 true|$define|[yY]*) dflt='y';;
15124 echo "$package can use the sfio library, but it is experimental."
15125 case "$useperlio" in
15127 echo "For sfio also the PerlIO abstraction layer is needed."
15128 echo "Earlier you said you wouldn't want that."
15131 rp="You seem to have sfio available, do you want to try using it?"
15134 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
15135 useperlio="$define"
15138 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
15143 *) case "$usesfio" in
15144 true|$define|[yY]*)
15145 echo "Sorry, cannot find sfio on this machine." >&4
15146 echo "Ignoring your setting of usesfio=$usesfio." >&4
15155 $define) usesfio='true';;
15156 *) usesfio='false';;
15160 *) : Remove sfio from list of libraries to use
15163 echo "Removing unneeded -lsfio from library list" >&4
15164 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
15167 echo "libs = $libs" >&4
15174 : see if shmctl exists
15175 set shmctl d_shmctl
15178 : see if shmget exists
15179 set shmget d_shmget
15182 : see if shmat exists
15185 : see what shmat returns
15188 $cat >shmat.c <<'END'
15189 #include <sys/shm.h>
15192 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
15197 echo "and it returns ($shmattype)." >&4
15198 : see if a prototype for shmat is available
15199 xxx=`./findhdr sys/shm.h`
15200 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
15201 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
15212 set d_shmatprototype
15215 : see if shmdt exists
15219 : see how much of the 'shm*(2)' library is present.
15222 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
15223 *"$undef"*) h_shm=false;;
15227 case "`ipcs 2>&1`" in
15228 "SVID shared memory"*"not configured"*)
15229 echo "Your $osname does not have the shm*(2) configured." >&4
15232 set shmctl d_shmctl
15234 set shmget d_shmget
15244 : we could also check for sys/ipc.h ...
15245 if $h_shm && $test `./findhdr sys/shm.h`; then
15246 echo "You have the full shm*(2) library." >&4
15249 echo "You don't have the full shm*(2) library." >&4
15256 : see if we have sigaction
15257 if set sigaction val -f d_sigaction; eval $csym; $val; then
15258 echo 'sigaction() found.' >&4
15259 $cat > try.c <<'EOP'
15261 #include <sys/types.h>
15262 #include <signal.h>
15265 struct sigaction act, oact;
15267 oact.sa_handler = 0;
15268 /* so that act and oact are used */
15269 exit(act.sa_flags == 0 && oact.sa_handler == 0);
15273 if eval $compile_ok; then
15276 echo "But you don't seem to have a useable struct sigaction." >&4
15280 echo 'sigaction NOT found.' >&4
15283 set d_sigaction; eval $setvar
15284 $rm -f try try$_o try.c
15286 : see if sigprocmask exists
15287 set sigprocmask d_sigprocmask
15290 : see if sigsetjmp exists
15292 case "$d_sigsetjmp" in
15294 $cat >try.c <<'EOP'
15295 #include <setjmp.h>
15300 if (sigsetjmp(env,1))
15303 siglongjmp(env, 1);
15308 if eval $compile; then
15309 if $run ./try >/dev/null 2>&1; then
15310 echo "POSIX sigsetjmp found." >&4
15314 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
15320 echo "sigsetjmp not found." >&4
15324 *) val="$d_sigsetjmp"
15325 case "$d_sigsetjmp" in
15326 $define) echo "POSIX sigsetjmp found." >&4;;
15327 $undef) echo "sigsetjmp not found." >&4;;
15335 : see if sockatmark exists
15336 set sockatmark d_sockatmark
15339 : see if prototype for sockatmark is available
15341 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
15344 : see if socks5_init exists
15345 set socks5_init d_socks5_init
15348 : see if srand48_r exists
15349 set srand48_r d_srand48_r
15351 case "$d_srand48_r" in
15353 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15356 hdrs="$hdrs $i_systime sys/time.h"
15359 case "$d_srand48_r_proto:$usethreads" in
15360 ":define") d_srand48_r_proto=define
15361 set d_srand48_r_proto srand48_r $hdrs
15365 case "$d_srand48_r_proto" in
15367 case "$srand48_r_proto" in
15368 ''|0) try='int srand48_r(long, struct drand48_data*);'
15369 ./protochk "extern $try" $hdrs && srand48_r_proto=I_LS ;;
15371 case "$srand48_r_proto" in
15372 ''|0) d_srand48_r=undef
15374 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
15375 * ) case "$srand48_r_proto" in
15376 REENTRANT_PROTO*) ;;
15377 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
15379 echo "Prototype: $try" ;;
15382 *) case "$usethreads" in
15383 define) echo "srand48_r has no prototype, not using it." >&4 ;;
15390 *) srand48_r_proto=0
15394 : see if srandom_r exists
15395 set srandom_r d_srandom_r
15397 case "$d_srandom_r" in
15399 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15402 hdrs="$hdrs $i_systime sys/time.h"
15405 case "$d_srandom_r_proto:$usethreads" in
15406 ":define") d_srandom_r_proto=define
15407 set d_srandom_r_proto srandom_r $hdrs
15411 case "$d_srandom_r_proto" in
15413 case "$srandom_r_proto" in
15414 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
15415 ./protochk "extern $try" $hdrs && srandom_r_proto=I_TS ;;
15417 case "$srandom_r_proto" in
15418 ''|0) d_srandom_r=undef
15420 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
15421 * ) case "$srandom_r_proto" in
15422 REENTRANT_PROTO*) ;;
15423 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
15425 echo "Prototype: $try" ;;
15428 *) case "$usethreads" in
15429 define) echo "srandom_r has no prototype, not using it." >&4 ;;
15436 *) srandom_r_proto=0
15440 : see if prototype for setresgid is available
15442 set d_sresgproto setresgid $i_unistd unistd.h
15445 : see if prototype for setresuid is available
15447 set d_sresuproto setresuid $i_unistd unistd.h
15450 : see if sys/stat.h is available
15451 set sys/stat.h i_sysstat
15455 : see if stat knows about block sizes
15457 echo "Checking to see if your struct stat has st_blocks field..." >&4
15458 set d_statblks stat st_blocks $i_sysstat sys/stat.h
15462 : see if this is a sys/vfs.h system
15463 set sys/vfs.h i_sysvfs
15467 : see if this is a sys/statfs.h system
15468 set sys/statfs.h i_sysstatfs
15473 echo "Checking to see if your system supports struct statfs..." >&4
15474 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
15476 case "$d_statfs_s" in
15477 "$define") echo "Yes, it does." ;;
15478 *) echo "No, it doesn't." ;;
15483 : see if struct statfs knows about f_flags
15484 case "$d_statfs_s" in
15487 echo "Checking to see if your struct statfs has f_flags field..." >&4
15488 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
15492 set d_statfs_f_flags
15496 case "$d_statfs_f_flags" in
15497 "$define") echo "Yes, it does." ;;
15498 *) echo "No, it doesn't." ;;
15501 : see if _ptr and _cnt from stdio act std
15504 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
15505 echo "(Looks like you have stdio.h from BSD.)"
15506 case "$stdio_ptr" in
15507 '') stdio_ptr='((fp)->_p)'
15510 *) ptr_lval=$d_stdio_ptr_lval;;
15512 case "$stdio_cnt" in
15513 '') stdio_cnt='((fp)->_r)'
15516 *) cnt_lval=$d_stdio_cnt_lval;;
15518 case "$stdio_base" in
15519 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
15521 case "$stdio_bufsiz" in
15522 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
15524 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
15525 echo "(Looks like you have stdio.h from Linux.)"
15526 case "$stdio_ptr" in
15527 '') stdio_ptr='((fp)->_IO_read_ptr)'
15530 *) ptr_lval=$d_stdio_ptr_lval;;
15532 case "$stdio_cnt" in
15533 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
15536 *) cnt_lval=$d_stdio_cnt_lval;;
15538 case "$stdio_base" in
15539 '') stdio_base='((fp)->_IO_read_base)';;
15541 case "$stdio_bufsiz" in
15542 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
15545 case "$stdio_ptr" in
15546 '') stdio_ptr='((fp)->_ptr)'
15549 *) ptr_lval=$d_stdio_ptr_lval;;
15551 case "$stdio_cnt" in
15552 '') stdio_cnt='((fp)->_cnt)'
15555 *) cnt_lval=$d_stdio_cnt_lval;;
15557 case "$stdio_base" in
15558 '') stdio_base='((fp)->_base)';;
15560 case "$stdio_bufsiz" in
15561 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
15565 : test whether _ptr and _cnt really work
15566 echo "Checking how std your stdio is..." >&4
15569 #define FILE_ptr(fp) $stdio_ptr
15570 #define FILE_cnt(fp) $stdio_cnt
15572 FILE *fp = fopen("try.c", "r");
15575 18 <= FILE_cnt(fp) &&
15576 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15584 if eval $compile && $to try.c; then
15585 if $run ./try; then
15586 echo "Your stdio acts pretty std."
15589 echo "Your stdio isn't very std."
15592 echo "Your stdio doesn't appear very std."
15598 : Can _ptr be used as an lvalue?
15599 case "$d_stdstdio$ptr_lval" in
15600 $define$define) val=$define ;;
15603 set d_stdio_ptr_lval
15606 : Can _cnt be used as an lvalue?
15607 case "$d_stdstdio$cnt_lval" in
15608 $define$define) val=$define ;;
15611 set d_stdio_cnt_lval
15615 : test whether setting _ptr sets _cnt as a side effect
15616 d_stdio_ptr_lval_sets_cnt="$undef"
15617 d_stdio_ptr_lval_nochange_cnt="$undef"
15618 case "$d_stdio_ptr_lval$d_stdstdio" in
15620 echo "Checking to see what happens if we set the stdio ptr..." >&4
15623 /* Can we scream? */
15624 /* Eat dust sed :-) */
15625 /* In the buffer space, no one can hear you scream. */
15626 #define FILE_ptr(fp) $stdio_ptr
15627 #define FILE_cnt(fp) $stdio_cnt
15628 #include <sys/types.h>
15630 FILE *fp = fopen("try.c", "r");
15635 puts("Fail even to read");
15638 c = getc(fp); /* Read away the first # */
15640 puts("Fail even to read");
15644 18 <= FILE_cnt(fp) &&
15645 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15647 puts("Fail even to read");
15650 ptr = (char*) FILE_ptr(fp);
15651 cnt = (size_t)FILE_cnt(fp);
15653 FILE_ptr(fp) += 42;
15655 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
15656 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
15659 if (FILE_cnt(fp) <= 20) {
15660 printf ("Fail (<20 chars to test)");
15663 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
15664 puts("Fail compare");
15667 if (cnt == FILE_cnt(fp)) {
15668 puts("Pass_unchanged");
15671 if (FILE_cnt(fp) == (cnt - 42)) {
15672 puts("Pass_changed");
15675 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
15681 if eval $compile && $to try.c; then
15682 case `$run ./try` in
15684 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
15685 d_stdio_ptr_lval_sets_cnt="$define" ;;
15687 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
15688 d_stdio_ptr_lval_nochange_cnt="$define" ;;
15690 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
15692 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
15695 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
15701 : see if _base is also standard
15703 case "$d_stdstdio" in
15707 #define FILE_base(fp) $stdio_base
15708 #define FILE_bufsiz(fp) $stdio_bufsiz
15710 FILE *fp = fopen("try.c", "r");
15713 19 <= FILE_bufsiz(fp) &&
15714 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
15721 if eval $compile && $to try.c; then
15722 if $run ./try; then
15723 echo "And its _base field acts std."
15726 echo "But its _base field isn't std."
15729 echo "However, it seems to be lacking the _base field."
15738 Checking how to access stdio streams by file descriptor number...
15740 case "$stdio_stream_array" in
15741 '') $cat >try.c <<EOCP
15744 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
15748 for s in _iob __iob __sF
15750 set try -DSTDIO_STREAM_ARRAY=$s
15751 if eval $compile; then
15752 case "`$run ./try`" in
15753 yes) stdio_stream_array=$s; break ;;
15757 $rm -f try.* try$exe_ext
15759 case "$stdio_stream_array" in
15761 I can't figure out how to access stdio streams by file descriptor number.
15763 d_stdio_stream_array="$undef"
15766 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
15768 d_stdio_stream_array="$define"
15772 : see if strcoll exists
15773 set strcoll d_strcoll
15776 : check for structure copying
15778 echo "Checking to see if your C compiler can copy structs..." >&4
15779 $cat >try.c <<'EOCP'
15789 if $cc -c try.c >/dev/null 2>&1 ; then
15791 echo "Yup, it can."
15794 echo "Nope, it can't."
15800 : see if strerror and/or sys_errlist[] exist
15802 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
15803 if set strerror val -f d_strerror; eval $csym; $val; then
15804 echo 'strerror() found.' >&4
15805 d_strerror="$define"
15806 d_strerrm='strerror(e)'
15807 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15808 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
15809 d_syserrlst="$define"
15811 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
15812 d_syserrlst="$undef"
15814 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
15815 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
15816 echo 'strerror() found in string header.' >&4
15817 d_strerror="$define"
15818 d_strerrm='strerror(e)'
15819 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15820 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
15821 d_syserrlst="$define"
15823 echo "(You don't appear to have any sys_errlist[], how can this be?)"
15824 d_syserrlst="$undef"
15826 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15827 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
15828 d_strerror="$undef"
15829 d_syserrlst="$define"
15830 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
15832 echo 'strerror() and sys_errlist[] NOT found.' >&4
15833 d_strerror="$undef"
15834 d_syserrlst="$undef"
15835 d_strerrm='"unknown"'
15839 : see if strerror_r exists
15840 set strerror_r d_strerror_r
15842 case "$d_strerror_r" in
15844 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
15847 hdrs="$hdrs $i_systime sys/time.h"
15850 case "$d_strerror_r_proto:$usethreads" in
15851 ":define") d_strerror_r_proto=define
15852 set d_strerror_r_proto strerror_r $hdrs
15856 case "$d_strerror_r_proto" in
15858 case "$strerror_r_proto" in
15859 ''|0) try='int strerror_r(int, char*, size_t);'
15860 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;;
15862 case "$strerror_r_proto" in
15863 ''|0) try='int strerror_r(int, char*, int);'
15864 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;;
15866 case "$strerror_r_proto" in
15867 ''|0) try='char* strerror_r(int, char*, size_t);'
15868 ./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;;
15870 case "$strerror_r_proto" in
15871 ''|0) d_strerror_r=undef
15873 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
15874 * ) case "$strerror_r_proto" in
15875 REENTRANT_PROTO*) ;;
15876 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
15878 echo "Prototype: $try" ;;
15881 *) case "$usethreads" in
15882 define) echo "strerror_r has no prototype, not using it." >&4 ;;
15889 *) strerror_r_proto=0
15893 : see if strftime exists
15894 set strftime d_strftime
15897 : see if strtod exists
15898 set strtod d_strtod
15901 : see if strtol exists
15902 set strtol d_strtol
15905 : see if strtold exists
15906 set strtold d_strtold
15909 : see if strtoll exists
15910 set strtoll d_strtoll
15913 case "$d_longlong-$d_strtoll" in
15916 Checking whether your strtoll() works okay...
15918 $cat >try.c <<'EOCP'
15921 #define strtoll __strtoll
15924 #define strtoll _strtoll
15927 extern long long int strtoll(char *s, char **, int);
15928 static int bad = 0;
15929 int check(char *s, long long ell, int een) {
15932 gll = strtoll(s, 0, 10);
15933 if (!((gll == ell) && (errno == een)))
15937 check(" 1", 1LL, 0);
15938 check(" 0", 0LL, 0);
15939 check("-1", -1LL, 0);
15940 check("-9223372036854775808", -9223372036854775808LL, 0);
15941 check("-9223372036854775808", -9223372036854775808LL, 0);
15942 check(" 9223372036854775807", 9223372036854775807LL, 0);
15943 check("-9223372036854775808", -9223372036854775808LL, 0);
15944 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
15945 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
15951 if eval $compile; then
15954 ok) echo "Your strtoll() seems to be working okay." ;;
15956 Your strtoll() doesn't seem to be working okay.
15962 echo "(I can't seem to compile the test program--assuming it doesn't)"
15968 : see if strtoq exists
15969 set strtoq d_strtoq
15972 : see if strtoul exists
15973 set strtoul d_strtoul
15976 case "$d_strtoul" in
15979 Checking whether your strtoul() works okay...
15981 $cat >try.c <<'EOCP'
15984 extern unsigned long int strtoul(char *s, char **, int);
15985 static int bad = 0;
15986 void check(char *s, unsigned long eul, int een) {
15989 gul = strtoul(s, 0, 10);
15990 if (!((gul == eul) && (errno == een)))
15994 check(" 1", 1L, 0);
15995 check(" 0", 0L, 0);
15997 case "$longsize" in
15999 $cat >>try.c <<'EOCP'
16000 check("18446744073709551615", 18446744073709551615UL, 0);
16001 check("18446744073709551616", 18446744073709551615UL, ERANGE);
16002 #if 0 /* strtoul() for /^-/ strings is undefined. */
16003 check("-1", 18446744073709551615UL, 0);
16004 check("-18446744073709551614", 2, 0);
16005 check("-18446744073709551615", 1, 0);
16006 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
16007 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
16012 $cat >>try.c <<'EOCP'
16013 check("4294967295", 4294967295UL, 0);
16014 check("4294967296", 4294967295UL, ERANGE);
16015 #if 0 /* strtoul() for /^-/ strings is undefined. */
16016 check("-1", 4294967295UL, 0);
16017 check("-4294967294", 2, 0);
16018 check("-4294967295", 1, 0);
16019 check("-4294967296", 4294967295UL, ERANGE);
16020 check("-4294967297", 4294967295UL, ERANGE);
16025 : Should we write these tests to be more portable by sprintf-ing
16026 : ~0 and then manipulating that char string as input for strtol?
16029 $cat >>try.c <<'EOCP'
16036 if eval $compile; then
16037 case "`$run ./try`" in
16038 ok) echo "Your strtoul() seems to be working okay." ;;
16040 Your strtoul() doesn't seem to be working okay.
16049 : see if strtoull exists
16050 set strtoull d_strtoull
16053 case "$d_longlong-$d_strtoull" in
16056 Checking whether your strtoull() works okay...
16058 $cat >try.c <<'EOCP'
16061 #define strtoull __strtoull
16064 extern unsigned long long int strtoull(char *s, char **, int);
16065 static int bad = 0;
16066 int check(char *s, long long eull, int een) {
16069 gull = strtoull(s, 0, 10);
16070 if (!((gull == eull) && (errno == een)))
16074 check(" 1", 1LL, 0);
16075 check(" 0", 0LL, 0);
16076 check("18446744073709551615", 18446744073709551615ULL, 0);
16077 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
16078 #if 0 /* strtoull() for /^-/ strings is undefined. */
16079 check("-1", 18446744073709551615ULL, 0);
16080 check("-18446744073709551614", 2LL, 0);
16081 check("-18446744073709551615", 1LL, 0);
16082 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
16083 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
16090 if eval $compile; then
16091 case "`$run ./try`" in
16092 ok) echo "Your strtoull() seems to be working okay." ;;
16094 Your strtoull() doesn't seem to be working okay.
16096 d_strtoull="$undef"
16103 : see if strtouq exists
16104 set strtouq d_strtouq
16107 case "$d_strtouq" in
16110 Checking whether your strtouq() works okay...
16112 $cat >try.c <<'EOCP'
16115 extern unsigned long long int strtouq(char *s, char **, int);
16116 static int bad = 0;
16117 void check(char *s, unsigned long long eull, int een) {
16118 unsigned long long gull;
16120 gull = strtouq(s, 0, 10);
16121 if (!((gull == eull) && (errno == een)))
16125 check(" 1", 1LL, 0);
16126 check(" 0", 0LL, 0);
16127 check("18446744073709551615", 18446744073709551615ULL, 0);
16128 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
16129 #if 0 /* strtouq() for /^-/ strings is undefined. */
16130 check("-1", 18446744073709551615ULL, 0);
16131 check("-18446744073709551614", 2LL, 0);
16132 check("-18446744073709551615", 1LL, 0);
16133 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
16134 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
16142 if eval $compile; then
16143 case "`$run ./try`" in
16144 ok) echo "Your strtouq() seems to be working okay." ;;
16146 Your strtouq() doesn't seem to be working okay.
16155 : see if strxfrm exists
16156 set strxfrm d_strxfrm
16159 : see if symlink exists
16160 set symlink d_symlink
16163 : see if syscall exists
16164 set syscall d_syscall
16167 : see if prototype for syscall is available
16169 set d_syscallproto syscall $i_unistd unistd.h
16172 : see if sysconf exists
16173 set sysconf d_sysconf
16176 : see if system exists
16177 set system d_system
16180 : see if tcgetpgrp exists
16181 set tcgetpgrp d_tcgetpgrp
16184 : see if tcsetpgrp exists
16185 set tcsetpgrp d_tcsetpgrp
16188 : see if prototype for telldir is available
16190 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
16193 : see if time exists
16195 if test "X$d_time" = X -o X"$timetype" = X; then
16196 if set time val -f d_time; eval $csym; $val; then
16197 echo 'time() found.' >&4
16199 rp="What is the type returned by time() on this system?"
16200 set time_t timetype long stdio.h sys/types.h
16203 echo 'time() not found, hope that will do.' >&4
16211 : see if this is a sys/times.h system
16212 set sys/times.h i_systimes
16215 : see if times exists
16217 if set times val -f d_times; eval $csym; $val; then
16218 echo 'times() found.' >&4
16221 case "$i_systimes" in
16222 "$define") inc='sys/times.h';;
16224 rp="What is the type returned by times() on this system?"
16225 set clock_t clocktype long stdio.h sys/types.h $inc
16228 echo 'times() NOT found, hope that will do.' >&4
16233 : see if tmpnam_r exists
16234 set tmpnam_r d_tmpnam_r
16236 case "$d_tmpnam_r" in
16238 hdrs="$i_systypes sys/types.h define stdio.h "
16241 hdrs="$hdrs $i_systime sys/time.h"
16244 case "$d_tmpnam_r_proto:$usethreads" in
16245 ":define") d_tmpnam_r_proto=define
16246 set d_tmpnam_r_proto tmpnam_r $hdrs
16250 case "$d_tmpnam_r_proto" in
16252 case "$tmpnam_r_proto" in
16253 ''|0) try='char* tmpnam_r(char*);'
16254 ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;;
16256 case "$tmpnam_r_proto" in
16257 ''|0) d_tmpnam_r=undef
16259 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
16260 * ) case "$tmpnam_r_proto" in
16261 REENTRANT_PROTO*) ;;
16262 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
16264 echo "Prototype: $try" ;;
16267 *) case "$usethreads" in
16268 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
16275 *) tmpnam_r_proto=0
16279 : see if truncate exists
16280 set truncate d_truncate
16283 : see if ttyname_r exists
16284 set ttyname_r d_ttyname_r
16286 case "$d_ttyname_r" in
16288 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
16291 hdrs="$hdrs $i_systime sys/time.h"
16294 case "$d_ttyname_r_proto:$usethreads" in
16295 ":define") d_ttyname_r_proto=define
16296 set d_ttyname_r_proto ttyname_r $hdrs
16300 case "$d_ttyname_r_proto" in
16302 case "$ttyname_r_proto" in
16303 ''|0) try='int ttyname_r(int, char*, size_t);'
16304 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;;
16306 case "$ttyname_r_proto" in
16307 ''|0) try='int ttyname_r(int, char*, int);'
16308 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;;
16310 case "$ttyname_r_proto" in
16311 ''|0) try='char* ttyname_r(int, char*, int);'
16312 ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;;
16314 case "$ttyname_r_proto" in
16315 ''|0) d_ttyname_r=undef
16317 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
16318 * ) case "$ttyname_r_proto" in
16319 REENTRANT_PROTO*) ;;
16320 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
16322 echo "Prototype: $try" ;;
16325 *) case "$usethreads" in
16326 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
16333 *) ttyname_r_proto=0
16337 : see if tzname[] exists
16339 if set tzname val -a d_tzname; eval $csym; $val; then
16341 echo 'tzname[] found.' >&4
16344 echo 'tzname[] NOT found.' >&4
16350 next|rhapsody|darwin) multiarch="$define" ;;
16352 case "$multiarch" in
16353 ''|[nN]*) multiarch="$undef" ;;
16356 : check for ordering of bytes in a long
16358 case "$usecrosscompile$multiarch" in
16361 You seem to be either cross-compiling or doing a multiarchitecture build,
16362 skipping the byteorder check.
16368 case "$byteorder" in
16371 In the following, larger digits indicate more significance. A big-endian
16372 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
16373 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
16374 machines may have weird orders like 3412. A Cray will report 87654321,
16375 an Alpha will report 12345678. If the test program works the default is
16377 I'm now running the test program...
16379 $cat >try.c <<'EOCP'
16386 char c[sizeof(long)];
16389 if (sizeof(long) > 4)
16390 u.l = (0x08070605L << 32) | 0x04030201L;
16393 for (i = 0; i < sizeof(long); i++)
16394 printf("%c", u.c[i]+'0');
16401 if eval $compile && ./try > /dev/null; then
16404 [1-4][1-4][1-4][1-4]|12345678|87654321)
16405 echo "(The test program ran ok.)"
16406 echo "byteorder=$dflt"
16409 ????|????????) echo "(The test program ran ok.)" ;;
16410 *) echo "(The test program didn't run right for some reason.)" ;;
16415 (I can't seem to compile the test program. Guessing big-endian...)
16418 case "$xxx_prompt" in
16420 rp="What is the order of bytes in a long?"
16436 Checking to see whether you can access character data unalignedly...
16438 case "$d_u32align" in
16439 '') $cat >try.c <<EOCP
16441 #define U32 $u32type
16442 #define BYTEORDER 0x$byteorder
16444 #include <signal.h>
16446 $signal_t bletch(s) int s; { exit(4); }
16449 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
16454 if (sizeof(U32) != 4) {
16455 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
16462 signal(SIGBUS, bletch);
16474 for (i = 0; i < 4; i++) {
16475 up = (U32*)(buf + i);
16476 if (! ((*up == 1 << (8*i)) || /* big-endian */
16477 (*up == 1 << (8*(3-i))) /* little-endian */
16481 printf("read failed (%x)\n", *up);
16487 for (i = 0; i < 4; i++) {
16488 up = (U32*)(buf + i);
16490 if (*up != 0xBeef) {
16491 printf("write failed (%x)\n", *up);
16505 if eval $compile_ok; then
16506 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
16507 $run ./try 2>&1 >/dev/null
16510 You can access character data pretty unalignedly.
16512 d_u32align="$undef"
16515 It seems that you must access character data in an aligned manner.
16517 d_u32align="$define"
16521 rp='Can you access character data at unaligned addresses?'
16525 [yY]*) d_u32align="$undef" ;;
16526 *) d_u32align="$define" ;;
16529 $rm -f core core.try.* try.core
16533 : see if ualarm exists
16534 set ualarm d_ualarm
16537 : see if umask exists
16541 : see if unordered exists
16542 set unordered d_unordered
16545 : see if usleep exists
16546 set usleep d_usleep
16549 : see if prototype for usleep is available
16551 set d_usleepproto usleep $i_unistd unistd.h
16554 : see if ustat exists
16558 : backward compatibility for d_hvfork
16559 if test X$d_hvfork != X; then
16560 d_vfork="$d_hvfork"
16563 : see if there is a vfork
16568 : Ok, but do we want to use it. vfork is reportedly unreliable in
16569 : perl on Solaris 2.x, and probably elsewhere.
16573 case "$usevfork" in
16579 Perl can only use a vfork() that doesn't suffer from strict
16580 restrictions on calling functions or modifying global data in
16581 the child. For example, glibc-2.1 contains such a vfork()
16582 that is unsuitable. If your system provides a proper fork()
16583 call, chances are that you do NOT want perl to use vfork().
16586 rp="Do you still want to use vfork()?"
16591 echo "Ok, we won't use vfork()."
16600 $define) usevfork='true';;
16601 *) usevfork='false';;
16604 : see if closedir exists
16605 set closedir d_closedir
16608 case "$d_closedir" in
16611 echo "Checking whether closedir() returns a status..." >&4
16613 #$i_dirent I_DIRENT /**/
16614 #$i_sysdir I_SYS_DIR /**/
16615 #$i_sysndir I_SYS_NDIR /**/
16616 #$i_systypes I_SYS_TYPES /**/
16618 #if defined(I_SYS_TYPES)
16619 #include <sys/types.h>
16621 #if defined(I_DIRENT)
16622 #include <dirent.h>
16623 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
16624 #include <sys/dir.h>
16628 #include <sys/ndir.h>
16632 #include <ndir.h> /* may be wrong in the future */
16634 #include <sys/dir.h>
16639 int main() { return closedir(opendir(".")); }
16642 if eval $compile_ok; then
16643 if $run ./try > /dev/null 2>&1 ; then
16644 echo "Yes, it does."
16647 echo "No, it doesn't."
16651 echo "(I can't seem to compile the test program--assuming it doesn't)"
16659 set d_void_closedir
16662 : see if there is a wait4
16666 : see if waitpid exists
16667 set waitpid d_waitpid
16670 : see if wcstombs exists
16671 set wcstombs d_wcstombs
16674 : see if wctomb exists
16675 set wctomb d_wctomb
16678 : see if writev exists
16679 set writev d_writev
16682 : preserve RCS keywords in files with variable substitution, grrr
16687 Revision='$Revision'
16689 : check for alignment requirements
16691 case "$usecrosscompile$multiarch" in
16694 You seem to be either cross-compiling or doing a multiarchitecture build,
16695 skipping the memory alignment check.
16698 case "$alignbytes" in
16699 '') alignbytes=8 ;;
16703 case "$alignbytes" in
16704 '') echo "Checking alignment constraints..." >&4
16705 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
16706 $cat >try.c <<'EOCP'
16707 typedef long double NV;
16710 $cat >try.c <<'EOCP'
16714 $cat >>try.c <<'EOCP'
16722 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
16727 if eval $compile_ok; then
16731 echo "(I can't seem to compile the test program...)"
16734 *) dflt="$alignbytes"
16737 rp="Doubles must be aligned on a how-many-byte boundary?"
16745 : set the base revision
16748 : how do we catenate cpp tokens here?
16750 echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
16751 $cat >cpp_stuff.c <<'EOCP'
16752 #define RCAT(a,b)a/**/b
16753 #define ACAT(a,b)a ## b
16757 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
16758 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
16759 echo "Oh! Smells like ANSI's been here." >&4
16760 echo "We can catify or stringify, separately or together!"
16762 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
16763 echo "Ah, yes! The good old days!" >&4
16764 echo "However, in the good old days we don't know how to stringify and"
16765 echo "catify at the same time."
16769 Hmm, I don't seem to be able to catenate tokens with your cpp. You're going
16770 to have to edit the values of CAT[2-5] in config.h...
16772 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
16776 : see if this is a db.h system
16782 : Check db version.
16784 echo "Checking Berkeley DB version ..." >&4
16790 #include <sys/types.h>
16793 int main(int argc, char *argv[])
16795 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
16796 int Major, Minor, Patch ;
16797 unsigned long Version ;
16798 (void)db_version(&Major, &Minor, &Patch) ;
16800 printf("%d %d %d %d %d %d\n",
16801 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
16802 Major, Minor, Patch);
16805 printf("You have Berkeley DB Version 2 or greater.\n");
16807 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
16808 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
16809 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
16810 Major, Minor, Patch) ;
16812 /* check that db.h & libdb are compatible */
16813 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
16814 printf("db.h and libdb are incompatible.\n") ;
16818 printf("db.h and libdb are compatible.\n") ;
16820 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
16821 + DB_VERSION_PATCH ;
16823 /* needs to be >= 2.3.4 */
16824 if (Version < 2003004) {
16825 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
16826 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
16832 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
16837 printf("You have Berkeley DB Version 1.\n");
16838 exit(0); /* DB version < 2: the coast is clear. */
16840 exit(1); /* <db.h> not Berkeley DB? */
16846 if eval $compile_ok && $run ./try; then
16847 echo 'Looks OK.' >&4
16849 db_version_major=$1
16850 db_version_minor=$2
16851 db_version_patch=$3
16853 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
16857 : Remove db from list of libraries to use
16858 echo "Removing unusable -ldb from library list" >&4
16859 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
16862 echo "libs = $libs" >&4
16872 : Check the return type needed for hash
16874 echo "Checking return type needed for hash for Berkeley DB ..." >&4
16880 #include <sys/types.h>
16883 #ifndef DB_VERSION_MAJOR
16884 u_int32_t hash_cb (ptr, size)
16892 info.hash = hash_cb;
16896 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16897 if $contains warning try.out >>/dev/null 2>&1 ; then
16900 db_hashtype='u_int32_t'
16903 : XXX Maybe we should just give up here.
16904 db_hashtype=u_int32_t
16906 echo "Help: I can't seem to compile the db test program." >&4
16907 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
16910 echo "Your version of Berkeley DB uses $db_hashtype for hash."
16912 *) db_hashtype=u_int32_t
16917 : Check the return type needed for prefix
16919 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
16925 #include <sys/types.h>
16928 #ifndef DB_VERSION_MAJOR
16929 size_t prefix_cb (key1, key2)
16937 info.prefix = prefix_cb;
16941 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16942 if $contains warning try.out >>/dev/null 2>&1 ; then
16943 db_prefixtype='int'
16945 db_prefixtype='size_t'
16948 db_prefixtype='size_t'
16949 : XXX Maybe we should just give up here.
16951 echo "Help: I can't seem to compile the db test program." >&4
16952 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
16955 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
16957 *) db_prefixtype='size_t'
16962 : How can we generate normalized random numbers ?
16964 echo "Looking for a random number function..." >&4
16965 case "$randfunc" in
16967 if set drand48 val -f; eval $csym; $val; then
16969 echo "Good, found drand48()." >&4
16970 elif set random val -f; eval $csym; $val; then
16972 echo "OK, found random()." >&4
16975 echo "Yick, looks like I have to use rand()." >&4
16986 *-Dmy_rand=*|*-Dmy_srand=*)
16987 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
16988 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
16989 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
16990 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
16994 while $test "$cont"; do
16995 rp="Use which function to generate random numbers?"
16997 if $test "$ans" = "$dflt"; then
17003 if set $ans val -f; eval $csym; $val; then
17007 rp="I cannot find function $ans. Use that name anyway?"
17016 case "$randfunc" in
17018 drand01="drand48()"
17024 case "$randbits" in
17026 echo "Checking to see how many bits your $randfunc() function produces..." >&4
17028 #$i_unistd I_UNISTD
17029 #$i_stdlib I_STDLIB
17032 # include <unistd.h>
17035 # include <stdlib.h>
17040 register unsigned long tmp;
17041 register unsigned long max = 0L;
17043 for (i = 1000; i; i--) {
17044 tmp = (unsigned long) $randfunc();
17045 if (tmp > max) max = tmp;
17047 for (i = 0; max; i++)
17053 if eval $compile_ok; then
17057 echo "(I can't seem to compile the test program...)"
17064 rp="How many bits does your $randfunc() function produce?"
17068 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
17069 seedfunc="s$randfunc"
17070 randseedtype=unsigned
17074 rp="How many bits does your $randfunc() function produce?"
17077 seedfunc="s$randfunc"
17078 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
17079 if set $seedfunc val -f; eval $csym; $val; then
17080 echo "(Using $seedfunc() to seed random generator)"
17082 echo "(Warning: no $seedfunc() to seed random generator)"
17085 randseedtype=unsigned
17093 echo "Determining whether or not we are on an EBCDIC system..." >&4
17094 $cat >try.c <<'EOM'
17097 if ('M'==0xd4) return 0;
17104 if eval $compile_ok; then
17105 if $run ./try; then
17106 echo "You seem to speak EBCDIC." >&4
17109 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
17112 echo "I'm unable to compile the test program." >&4
17113 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
17121 Checking how to flush all pending stdio output...
17123 # I only know how to find the first 32 possibly open files on SunOS.
17124 # See also hints/sunos_4_1.sh and util.c --AD
17126 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
17128 $cat >>try.c <<EOCP
17130 #$i_unistd I_UNISTD
17132 # include <unistd.h>
17134 #$d_sysconf HAS_SYSCONF
17135 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
17136 #ifdef HAS_STDIO_STREAM_ARRAY
17137 # define STDIO_STREAM_ARRAY $stdio_stream_array
17142 p = fopen("try.out", "w");
17146 # ifdef TRY_FPRINTF
17150 #ifdef TRY_FFLUSH_NULL
17153 #ifdef TRY_FFLUSH_ALL
17155 long open_max = -1;
17156 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
17157 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
17159 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
17160 open_max = sysconf(_SC_OPEN_MAX);
17163 open_max = FOPEN_MAX;
17166 open_max = OPEN_MAX;
17175 # ifdef HAS_STDIO_STREAM_ARRAY
17176 if (open_max > 0) {
17178 for (i = 0; i < open_max; i++)
17179 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
17180 STDIO_STREAM_ARRAY[i]._file < open_max &&
17181 STDIO_STREAM_ARRAY[i]._flag)
17182 fflush(&STDIO_STREAM_ARRAY[i]);
17190 : first we have to find out how _not_ to flush
17192 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
17194 set try -DTRY_FPUTC
17195 if eval $compile; then
17196 $run ./try 2>/dev/null
17199 if $test ! -s try.out -a "X$code" = X42; then
17205 set try -DTRY_FPRINTF
17206 if eval $compile; then
17207 $run ./try 2>/dev/null
17210 if $test ! -s try.out -a "X$code" = X42; then
17211 output=-DTRY_FPRINTF
17217 : check for fflush NULL behaviour
17218 case "$fflushNULL" in
17219 '') set try -DTRY_FFLUSH_NULL $output
17220 if eval $compile; then
17221 $run ./try 2>/dev/null
17224 if $test -s try.out -a "X$code" = X42; then
17225 fflushNULL="`$cat try.out`"
17227 if $test "X$code" != X42; then
17229 (If this test failed, don't worry, we'll try another method shortly.)
17234 $rm -f core try.core core.try.*
17235 case "$fflushNULL" in
17237 Your fflush(NULL) works okay for output streams.
17238 Let's see if it clobbers input pipes...
17240 # As of mid-March 2000 all versions of Solaris appear to have a stdio
17241 # bug that improperly flushes the input end of pipes. So we avoid the
17242 # autoflush on fork/system/exec support for now. :-(
17243 $cat >tryp.c <<EOCP
17246 main(int argc, char **argv)
17252 while ((i = getc(stdin)) != -1
17253 && (*bp++ = i) != '\n'
17254 && bp < &buf[1024])
17257 fprintf(stdout, "%s", buf);
17265 fflushNULL="$define"
17267 if eval $compile; then
17269 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17270 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17272 fflush(NULL) seems to behave okay with input streams.
17274 fflushNULL="$define"
17277 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
17279 fflushNULL="$undef"
17282 $rm -f core tryp.c tryp.core core.tryp.*
17285 Your fflush(NULL) isn't working (contrary to ANSI C).
17287 fflushNULL="$undef"
17290 Cannot figure out whether your fflush(NULL) works or not.
17291 I'm assuming it doesn't (contrary to ANSI C).
17293 fflushNULL="$undef"
17297 $define|true|[yY]*)
17298 fflushNULL="$define"
17301 fflushNULL="$undef"
17304 : check explicit looping only if NULL did not work, and if the pipe
17305 : bug does not show up on an explicit flush too
17306 case "$fflushNULL" in
17308 $cat >tryp.c <<EOCP
17311 main(int argc, char **argv)
17317 while ((i = getc(stdin)) != -1
17318 && (*bp++ = i) != '\n'
17319 && bp < &buf[1024])
17322 fprintf(stdout, "%s", buf);
17331 if eval $compile; then
17333 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17334 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17336 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
17338 : now check for fflushall behaviour
17339 case "$fflushall" in
17340 '') set try -DTRY_FFLUSH_ALL $output
17341 if eval $compile; then
17343 (Now testing the other method--but note that this also may fail.)
17345 $run ./try 2>/dev/null
17348 if $test -s try.out -a "X$code" = X42; then
17349 fflushall="`$cat try.out`"
17352 $rm -f core try.core core.try.*
17353 case "$fflushall" in
17355 Whew. Flushing explicitly all the stdio streams works.
17357 fflushall="$define"
17360 Sigh. Flushing explicitly all the stdio streams doesn't work.
17365 Cannot figure out whether flushing stdio streams explicitly works or not.
17366 I'm assuming it doesn't.
17372 "$define"|true|[yY]*)
17373 fflushall="$define"
17381 All is futile. Even fflush(stdin) clobbers input pipes!
17388 $rm -f core tryp.c tryp.core core.tryp.*
17390 *) fflushall="$undef"
17394 case "$fflushNULL$fflushall" in
17397 OK, I give up. I cannot figure out how to flush pending stdio output.
17398 We won't be flushing handles at all before fork/exec/popen.
17402 $rm -f try.* try$exe_ext
17404 : Store the full pathname to the ar program for use in the C program
17405 : Respect a hint or command line value for full_ar.
17410 : Store the full pathname to the sed program for use in the C program
17413 : see what type gids are declared as in the kernel
17415 echo "Looking for the type for group ids returned by getgid()."
17416 set gid_t gidtype xxx stdio.h sys/types.h
17420 xxx=`./findhdr sys/user.h`
17421 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
17423 unsigned) dflt="$1 $2" ;;
17427 *) dflt="$gidtype";;
17430 gid_t) echo "gid_t found." ;;
17431 *) rp="What is the type for group ids returned by getgid()?"
17439 *_t) zzz="$gidtype" ;;
17442 echo "Checking the size of $zzz..." >&4
17444 #include <sys/types.h>
17447 printf("%d\n", (int)sizeof($gidtype));
17452 if eval $compile_ok; then
17456 echo "(I can't execute the test program--guessing $gidsize.)" >&4
17459 echo "Your $zzz is $gidsize bytes long."
17464 echo "(I can't compile the test program--guessing $gidsize.)" >&4
17470 *_t) zzz="$gidtype" ;;
17473 echo "Checking the sign of $zzz..." >&4
17475 #include <sys/types.h>
17486 if eval $compile; then
17490 echo "(I can't execute the test program--guessing unsigned.)" >&4
17494 1) echo "Your $zzz is unsigned." ;;
17495 -1) echo "Your $zzz is signed." ;;
17501 echo "(I can't compile the test program--guessing unsigned.)" >&4
17507 if $test X"$quadtype" != X; then
17509 echo "Checking how to print 64-bit integers..." >&4
17511 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
17512 $cat >try.c <<'EOCP'
17513 #include <sys/types.h>
17516 int q = 12345678901;
17517 printf("%ld\n", q);
17521 if eval $compile; then
17525 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
17526 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
17527 echo "We will use %d."
17533 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
17534 $cat >try.c <<'EOCP'
17535 #include <sys/types.h>
17538 long q = 12345678901;
17539 printf("%ld\n", q);
17543 if eval $compile; then
17547 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
17548 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
17549 echo "We will use %ld."
17555 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
17556 $cat >try.c <<'EOCP'
17557 #include <sys/types.h>
17558 #include <inttypes.h>
17561 int64_t q = 12345678901;
17562 printf("%" PRId64 "\n", q);
17566 if eval $compile; then
17570 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
17571 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
17572 echo "We will use the C9X style."
17578 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17580 #include <sys/types.h>
17583 $quadtype q = 12345678901;
17584 printf("%Ld\n", q);
17588 if eval $compile; then
17592 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
17593 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
17594 echo "We will use %Ld."
17600 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
17601 $cat >try.c <<'EOCP'
17602 #include <sys/types.h>
17605 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
17606 printf("%lld\n", q);
17610 if eval $compile; then
17614 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
17615 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
17616 echo "We will use the %lld style."
17622 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17624 #include <sys/types.h>
17627 $quadtype q = 12345678901;
17628 printf("%qd\n", q);
17632 if eval $compile; then
17636 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
17637 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
17638 echo "We will use %qd."
17644 if $test X"$sPRId64" = X; then
17645 echo "Cannot figure out how to print 64-bit integers." >&4
17653 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
17654 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
17656 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
17657 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
17663 $echo "Checking the format strings to be used for Perl's internal types..." >&4
17665 if $test X"$ivsize" = X8; then
17666 ivdformat="$sPRId64"
17667 uvuformat="$sPRIu64"
17668 uvoformat="$sPRIo64"
17669 uvxformat="$sPRIx64"
17670 uvXUformat="$sPRIXU64"
17672 if $test X"$ivsize" = X"$longsize"; then
17679 if $test X"$ivsize" = X"$intsize"; then
17687 if $test X"$ivsize" = X"$shortsize"; then
17698 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
17699 nveformat="$sPRIeldbl"
17700 nvfformat="$sPRIfldbl"
17701 nvgformat="$sPRIgldbl"
17702 nvEUformat="$sPRIEUldbl"
17703 nvFUformat="$sPRIFUldbl"
17704 nvGUformat="$sPRIGUldbl"
17714 case "$ivdformat" in
17715 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
17722 $echo "Checking the format string to be used for gids..." >&4
17725 -1) if $test X"$gidsize" = X"$ivsize"; then
17726 gidformat="$ivdformat"
17728 if $test X"$gidsize" = X"$longsize"; then
17731 if $test X"$gidsize" = X"$intsize"; then
17734 if $test X"$gidsize" = X"$shortsize"; then
17741 *) if $test X"$gidsize" = X"$uvsize"; then
17742 gidformat="$uvuformat"
17744 if $test X"$gidsize" = X"$longsize"; then
17747 if $test X"$gidsize" = X"$intsize"; then
17750 if $test X"$gidsize" = X"$shortsize"; then
17759 : see if getgroups exists
17760 set getgroups d_getgrps
17763 : see if setgroups exists
17764 set setgroups d_setgrps
17768 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
17770 case "$d_getgrps$d_setgrps" in
17772 case "$groupstype" in
17773 '') dflt="$gidtype" ;;
17774 *) dflt="$groupstype" ;;
17777 What type of pointer is the second argument to getgroups() and setgroups()?
17778 Usually this is the same as group ids, $gidtype, but not always.
17781 rp='What type pointer is the second argument to getgroups() and setgroups()?'
17785 *) groupstype="$gidtype";;
17789 echo "Checking if your $make program sets \$(MAKE)..." >&4
17790 case "$make_set_make" in
17792 $sed 's/^X //' > testmake.mak << 'EOF'
17794 X @echo 'maketemp="$(MAKE)"'
17796 case "`$make -f testmake.mak 2>/dev/null`" in
17797 *maketemp=*) make_set_make='#' ;;
17798 *) make_set_make="MAKE=$make" ;;
17800 $rm -f testmake.mak
17803 case "$make_set_make" in
17804 '#') echo "Yup, it does.";;
17805 *) echo "Nope, it doesn't.";;
17808 : see what type is used for mode_t
17809 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
17810 set mode_t modetype int stdio.h sys/types.h
17813 : see if stdarg is available
17815 if $test `./findhdr stdarg.h`; then
17816 echo "<stdarg.h> found." >&4
17819 echo "<stdarg.h> NOT found." >&4
17823 : see if varags is available
17825 if $test `./findhdr varargs.h`; then
17826 echo "<varargs.h> found." >&4
17828 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
17831 : set up the varargs testing programs
17832 $cat > varargs.c <<EOP
17834 #include <stdarg.h>
17837 #include <varargs.h>
17841 int f(char *p, ...)
17855 p = va_arg(ap, char *);
17860 $cat > varargs <<EOP
17862 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
17871 : now check which varargs header should be included
17876 if `./varargs I_STDARG`; then
17878 elif `./varargs I_VARARGS`; then
17883 if `./varargs I_VARARGS`; then
17890 echo "I could not find the definition for va_dcl... You have problems..." >&4
17891 val="$undef"; set i_stdarg; eval $setvar
17892 val="$undef"; set i_varargs; eval $setvar
17897 case "$i_varhdr" in
17899 val="$define"; set i_stdarg; eval $setvar
17900 val="$undef"; set i_varargs; eval $setvar
17903 val="$undef"; set i_stdarg; eval $setvar
17904 val="$define"; set i_varargs; eval $setvar
17907 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
17911 : see if we need va_copy
17913 case "$i_stdarg" in
17916 #include <stdarg.h>
17918 #$i_stdlib I_STDLIB
17920 #include <stdlib.h>
17922 #include <signal.h>
17925 ivfprintf(FILE *f, const char *fmt, va_list *valp)
17927 return vfprintf(f, fmt, *valp);
17931 myvfprintf(FILE *f, const char *fmt, va_list val)
17933 return ivfprintf(f, fmt, &val);
17937 myprintf(char *fmt, ...)
17940 va_start(val, fmt);
17941 return myvfprintf(stdout, fmt, val);
17945 main(int ac, char **av)
17947 signal(SIGSEGV, exit);
17949 myprintf("%s%cs all right, then\n", "that", '\'');
17954 if eval $compile && $run ./try 2>&1 >/dev/null; then
17955 case "`$run ./try`" in
17956 "that's all right, then")
17962 yes) echo "It seems that you don't need va_copy()." >&4
17963 need_va_copy="$undef"
17965 *) echo "It seems that va_copy() or similar will be needed." >&4
17966 need_va_copy="$define"
17969 $rm -f try.* core core.* *.core *.core.*
17971 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
17975 : see what type is used for size_t
17976 rp="What is the type used for the length parameter for string functions?"
17977 set size_t sizetype 'unsigned int' stdio.h sys/types.h
17980 : check for type of arguments to gethostbyaddr.
17981 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
17982 case "$d_gethbyaddr" in
17986 Checking to see what type of arguments are accepted by gethostbyaddr().
17988 hdrs="$define sys/types.h
17989 $d_socket sys/socket.h
17990 $i_niin netinet/in.h
17992 $i_unistd unistd.h"
17993 : The first arg can 'char *' or 'void *'
17994 : The second arg is some of integral type
17995 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
17996 for yyy in size_t long int; do
17997 case "$netdb_host_type" in
17998 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
17999 if ./protochk "$try" $hdrs; then
18000 echo "Your system accepts $xxx for the first arg."
18001 echo "...and $yyy for the second arg."
18002 netdb_host_type="$xxx"
18003 netdb_hlen_type="$yyy"
18009 : In case none of those worked, prompt the user.
18010 case "$netdb_host_type" in
18011 '') rp='What is the type for the 1st argument to gethostbyaddr?'
18014 netdb_host_type=$ans
18015 rp='What is the type for the 2nd argument to gethostbyaddr?'
18018 netdb_hlen_type=$ans
18022 *) : no gethostbyaddr, so pick harmless defaults
18023 netdb_host_type='char *'
18024 netdb_hlen_type="$sizetype"
18027 # Remove the "const" if needed. -- but then we'll have a
18029 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
18032 : check for type of argument to gethostbyname.
18033 if test "X$netdb_name_type" = X ; then
18034 case "$d_gethbyname" in
18038 Checking to see what type of argument is accepted by gethostbyname().
18040 hdrs="$define sys/types.h
18041 $d_socket sys/socket.h
18042 $i_niin netinet/in.h
18044 $i_unistd unistd.h"
18045 for xxx in "const char *" "char *"; do
18046 case "$netdb_name_type" in
18047 '') try="extern struct hostent *gethostbyname($xxx);"
18048 if ./protochk "$try" $hdrs; then
18049 echo "Your system accepts $xxx."
18050 netdb_name_type="$xxx"
18055 : In case none of those worked, prompt the user.
18056 case "$netdb_name_type" in
18057 '') rp='What is the type for the 1st argument to gethostbyname?'
18060 netdb_name_type=$ans
18064 *) : no gethostbyname, so pick harmless default
18065 netdb_name_type='char *'
18070 : check for type of 1st argument to getnetbyaddr.
18071 if test "X$netdb_net_type" = X ; then
18072 case "$d_getnbyaddr" in
18076 Checking to see what type of 1st argument is accepted by getnetbyaddr().
18078 hdrs="$define sys/types.h
18079 $d_socket sys/socket.h
18080 $i_niin netinet/in.h
18082 $i_unistd unistd.h"
18083 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
18084 case "$netdb_net_type" in
18085 '') try="extern struct netent *getnetbyaddr($xxx, int);"
18086 if ./protochk "$try" $hdrs; then
18087 echo "Your system accepts $xxx."
18088 netdb_net_type="$xxx"
18093 : In case none of those worked, prompt the user.
18094 case "$netdb_net_type" in
18095 '') rp='What is the type for the 1st argument to getnetbyaddr?'
18098 netdb_net_type=$ans
18102 *) : no getnetbyaddr, so pick harmless default
18103 netdb_net_type='long'
18107 : locate the preferred pager for this system
18113 [a-zA-Z]:/*) dflt=$pg;;
18117 [a-zA-Z]:/*) dflt=$more;;
18121 [a-zA-Z]:/*) dflt=$less;;
18124 '') dflt=/usr/ucb/more;;
18131 rp='What pager is used on your system?'
18135 : see what type pids are declared as in the kernel
18136 rp="What is the type of process ids on this system?"
18137 set pid_t pidtype int stdio.h sys/types.h
18140 : Find earliest binary compatible site_perl subdirectory perl can use.
18141 case "$bincompat5005" in
18142 "$define") xs_apiversion='5.005' ;;
18143 *) xs_apiversion=$version ;; # The current site_perl version.
18145 : Find earliest pure perl site_perl subdirectory perl can use.
18146 : The versioned directories started at 5.005.
18147 pm_apiversion='5.005'
18149 : see if ar generates random libraries by itself
18151 echo "Checking how to generate random libraries on your machine..." >&4
18152 echo 'int bar1() { return bar2(); }' > bar1.c
18153 echo 'int bar2() { return 2; }' > bar2.c
18154 $cat > foo.c <<'EOP'
18155 int main() { printf("%d\n", bar1()); exit(0); }
18157 $cc $ccflags -c bar1.c >/dev/null 2>&1
18158 $cc $ccflags -c bar2.c >/dev/null 2>&1
18159 $cc $ccflags -c foo.c >/dev/null 2>&1
18160 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
18161 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18162 $run ./foobar >/dev/null 2>&1; then
18163 echo "$ar appears to generate random libraries itself."
18166 elif $ar ts bar$_a >/dev/null 2>&1 &&
18167 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18168 $run ./foobar >/dev/null 2>&1; then
18169 echo "a table of contents needs to be added with '$ar ts'."
18176 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
18177 $test -f $ranlib || ranlib=''
18180 if $test -n "$ranlib"; then
18181 echo "your system has '$ranlib'; we'll use that."
18184 echo "your system doesn't seem to support random libraries"
18185 echo "so we'll use lorder and tsort to order the libraries."
18192 : check for type of arguments to select.
18193 case "$selecttype" in
18194 '') case "$d_select" in
18198 Checking to see what type of arguments are accepted by select().
18200 hdrs="$define sys/types.h
18201 $i_systime sys/time.h
18202 $i_sysselct sys/select.h
18203 $d_socket sys/socket.h"
18204 : The first arg can be int, unsigned, or size_t
18205 : The last arg may or may not be 'const'
18207 : void pointer has been seen but using that
18208 : breaks the selectminbits test
18209 for xxx in 'fd_set *' 'int *'; do
18210 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
18211 for tmo in 'struct timeval *' 'const struct timeval *'; do
18213 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
18214 if ./protochk "$try" $hdrs; then
18215 echo "Your system accepts $xxx."
18224 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
18225 case "$d_fd_set" in
18226 $define) dflt="fd_set *" ;;
18235 *) : no select, so pick a harmless default
18242 : check for the select 'width'
18243 case "$selectminbits" in
18244 '') case "$d_select" in
18248 Checking to see on how many bits at a time your select() operates...
18251 #include <sys/types.h>
18253 #$i_systime I_SYS_TIME
18254 #$i_systimek I_SYS_TIME_KERNEL
18259 # ifdef I_SYS_TIME_KERNEL
18262 # include <sys/time.h>
18263 # ifdef I_SYS_TIME_KERNEL
18267 #$i_sysselct I_SYS_SELECT
18268 #ifdef I_SYS_SELECT
18269 #include <sys/select.h>
18271 #$d_socket HAS_SOCKET
18273 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
18277 #define S sizeof(*(b))
18279 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
18280 #define NBITS (NBYTES * 8)
18289 fp = fopen("try.c", "r");
18295 b = ($selecttype)s;
18296 for (i = 0; i < NBITS; i++)
18300 select(fd + 1, b, 0, 0, &t);
18301 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
18302 printf("%d\n", i + 1);
18307 if eval $compile_ok; then
18308 selectminbits=`$run ./try`
18309 case "$selectminbits" in
18311 Cannot figure out on how many bits at a time your select() operates.
18312 I'll play safe and guess it is 32 bits.
18318 *) bits="$selectminbits bits" ;;
18320 echo "Your select() operates on $bits at a time." >&4
18322 rp='What is the minimum number of bits your select() operates on?'
18323 case "$byteorder" in
18324 1234|12345678) dflt=32 ;;
18329 selectminbits="$val"
18333 *) : no select, so pick a harmless default
18340 : Trace out the files included by signal.h, then look for SIGxxx names.
18341 : Remove SIGARRAYSIZE used by HPUX.
18342 : Remove SIGSTKSIZE used by Linux.
18343 : Remove SIGSTKSZ used by Posix.
18344 : Remove SIGTYP void lines used by OS2.
18345 : Some cpps, like os390, dont give the file name anywhere
18346 if [ "X$fieldn" = X ]; then
18347 : Just make some guesses. We check them later.
18348 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
18350 xxx=`echo '#include <signal.h>' |
18351 $cppstdin $cppminus $cppflags 2>/dev/null |
18352 $grep '^[ ]*#.*include' |
18353 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
18355 : Check this list of files to be sure we have parsed the cpp output ok.
18356 : This will also avoid potentially non-existent files, such
18359 for xx in $xxx /dev/null ; do
18360 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
18362 : If we have found no files, at least try signal.h
18363 case "$xxxfiles" in
18364 '') xxxfiles=`./findhdr signal.h` ;;
18367 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
18368 print substr($2, 4, 20)
18370 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
18371 print substr($3, 4, 20)
18373 : Append some common names just in case the awk scan failed.
18374 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
18375 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
18376 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
18377 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
18378 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
18380 : generate a few handy files for later
18381 $cat > signal.c <<'EOCP'
18382 #include <sys/types.h>
18383 #include <signal.h>
18387 /* Strange style to avoid deeply-nested #if/#else/#endif */
18390 # define NSIG (_NSIG)
18396 # define NSIG (SIGMAX+1)
18402 # define NSIG (SIG_MAX+1)
18408 # define NSIG (MAXSIG+1)
18414 # define NSIG (MAX_SIG+1)
18419 # ifdef SIGARRAYSIZE
18420 # define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
18426 # define NSIG (_sys_nsig) /* Solaris 2.5 */
18430 /* Default to some arbitrary number that's big enough to get most
18431 of the common signals.
18437 printf("NSIG %d\n", NSIG);
18443 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
18445 printf "#ifdef SIG"; printf $1; printf "\n"
18446 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
18447 printf $1; printf ");\n"
18451 printf "#endif /* JUST_NSIG */\n";
18452 printf "exit(0);\n}\n";
18455 $cat >signal.awk <<'EOP'
18456 BEGIN { ndups = 0 }
18457 $1 ~ /^NSIG$/ { nsig = $2 }
18458 ($1 !~ /^NSIG$/) && (NF == 2) {
18459 if ($2 > maxsig) { maxsig = $2 }
18460 if (sig_name[$2]) {
18461 dup_name[ndups] = $1
18462 dup_num[ndups] = $2
18474 printf("NSIG %d\n", nsig);
18475 for (n = 1; n < nsig; n++) {
18477 printf("%s %d\n", sig_name[n], sig_num[n])
18480 printf("NUM%d %d\n", n, n)
18483 for (n = 0; n < ndups; n++) {
18484 printf("%s %d\n", dup_name[n], dup_num[n])
18488 $cat >signal_cmd <<EOS
18490 if $test -s signal.lst; then
18491 echo "Using your existing signal.lst file"
18496 $cat >>signal_cmd <<'EOS'
18499 if eval $compile_ok; then
18500 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst
18502 echo "(I can't seem be able to compile the whole test program)" >&4
18503 echo "(I'll try it in little pieces.)" >&4
18504 set signal -DJUST_NSIG
18505 if eval $compile_ok; then
18506 $run ./signal$_exe > signal.nsg
18509 echo "I can't seem to figure out how many signals you have." >&4
18510 echo "Guessing 50." >&4
18511 echo 'NSIG 50' > signal.nsg
18513 : Now look at all the signal names, one at a time.
18514 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
18515 $cat > signal.c <<EOCP
18516 #include <sys/types.h>
18517 #include <signal.h>
18520 printf("$xx %d\n", SIG${xx});
18525 if eval $compile; then
18526 echo "SIG${xx} found."
18527 $run ./signal$_exe >> signal.ls1
18529 echo "SIG${xx} NOT found."
18532 if $test -s signal.ls1; then
18533 $cat signal.nsg signal.ls1 |
18534 $sort -n | $uniq | $awk -f signal.awk >signal.lst
18538 if $test -s signal.lst; then
18541 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
18542 echo 'kill -l' >signal
18543 set X `csh -f <signal`
18547 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
18549 echo $@ | $tr ' ' $trnl | \
18550 $awk '{ printf "%s %d\n", $1, ++s; }
18551 END { printf "NSIG %d\n", ++s }' >signal.lst
18553 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
18555 chmod a+x signal_cmd
18556 $eunicefix signal_cmd
18558 : generate list of signal names
18560 case "$sig_name_init" in
18562 *) case "$sig_num_init" in
18563 ''|*,*) doinit=yes ;;
18568 echo "Generating a list of signal names and numbers..." >&4
18570 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
18571 sig_name=`$awk 'BEGIN { printf "ZERO " }
18572 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
18573 sig_num=`$awk 'BEGIN { printf "0 " }
18574 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
18575 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
18576 !/^NSIG/ { printf "\"%s\", ", $1 }
18577 END { printf "0\n" }' signal.lst`
18578 sig_num_init=`$awk 'BEGIN { printf "0, " }
18579 !/^NSIG/ { printf "%d, ", $2}
18580 END { printf "0\n"}' signal.lst`
18583 echo "The following $sig_count signals are available:"
18585 echo $sig_name | $awk \
18586 'BEGIN { linelen = 0 }
18588 for (i = 1; i <= NF; i++) {
18589 name = "SIG" $i " "
18590 linelen = linelen + length(name)
18591 if (linelen > 70) {
18593 linelen = length(name)
18599 sig_size=`echo $sig_name | awk '{print NF}'`
18600 $rm -f signal signal.c signal.awk signal.lst signal_cmd
18603 case "$sizetype" in
18604 *_t) zzz="$sizetype" ;;
18605 *) zzz="filesize" ;;
18607 echo "Checking the size of $zzz..." >&4
18609 #include <sys/types.h>
18612 printf("%d\n", (int)sizeof($sizetype));
18617 if eval $compile_ok; then
18621 echo "(I can't execute the test program--guessing $sizesize.)" >&4
18624 echo "Your $zzz size is $sizesize bytes."
18629 echo "(I can't compile the test program--guessing $sizesize.)" >&4
18633 : check for socklen_t
18635 echo "Checking to see if you have socklen_t..." >&4
18637 #include <sys/types.h>
18638 #$d_socket HAS_SOCKET
18640 #include <sys/socket.h>
18642 int main() { socklen_t x = 16; }
18645 if eval $compile; then
18647 echo "You have socklen_t."
18650 echo "You do not have socklen_t."
18651 case "$sizetype" in
18652 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
18659 : see if this is a socks.h system
18660 set socks.h i_socks
18663 : check for type of the size argument to socket calls
18664 case "$d_socket" in
18668 Checking to see what type is the last argument of accept().
18671 case "$d_socklen_t" in
18672 "$define") yyy="$yyy socklen_t"
18674 yyy="$yyy $sizetype int long unsigned"
18675 for xxx in $yyy; do
18676 case "$socksizetype" in
18677 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
18678 case "$usesocks" in
18680 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
18681 echo "Your system accepts '$xxx *' for the last argument of accept()."
18682 socksizetype="$xxx"
18685 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
18686 echo "Your system accepts '$xxx *' for the last argument of accept()."
18687 socksizetype="$xxx"
18694 : In case none of those worked, prompt the user.
18695 case "$socksizetype" in
18696 '') rp='What is the type for socket address structure sizes?'
18703 *) : no sockets, so pick relatively harmless default
18708 : see what type is used for signed size_t
18709 set ssize_t ssizetype int stdio.h sys/types.h
18714 #include <sys/types.h>
18715 #define Size_t $sizetype
18716 #define SSize_t $dflt
18719 if (sizeof(Size_t) == sizeof(SSize_t))
18721 else if (sizeof(Size_t) == sizeof(int))
18730 if eval $compile_ok && $run ./try > /dev/null; then
18731 ssizetype=`$run ./try`
18732 echo "I'll be using $ssizetype for functions returning a byte count." >&4
18735 Help! I can't compile and run the ssize_t test program: please enlighten me!
18736 (This is probably a misconfiguration in your system or libraries, and
18737 you really ought to fix it. Still, I'll try anyway.)
18739 I need a type that is the same size as $sizetype, but is guaranteed to
18740 be signed. Common values are ssize_t, int and long.
18743 rp="What signed type is the same size as $sizetype?"
18749 : see what type of char stdio uses.
18751 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
18752 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
18753 echo "Your stdio uses unsigned chars." >&4
18754 stdchar="unsigned char"
18756 echo "Your stdio uses signed chars." >&4
18763 : see what type uids are declared as in the kernel
18765 echo "Looking for the type for user ids returned by getuid()."
18766 set uid_t uidtype xxx stdio.h sys/types.h
18770 xxx=`./findhdr sys/user.h`
18771 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
18773 unsigned) dflt="$1 $2" ;;
18777 *) dflt="$uidtype";;
18780 uid_t) echo "uid_t found." ;;
18781 *) rp="What is the type for user ids returned by getuid()?"
18789 *_t) zzz="$uidtype" ;;
18792 echo "Checking the size of $zzz..." >&4
18794 #include <sys/types.h>
18797 printf("%d\n", (int)sizeof($uidtype));
18802 if eval $compile_ok; then
18806 echo "(I can't execute the test program--guessing $uidsize.)" >&4
18809 echo "Your $zzz is $uidsize bytes long."
18814 echo "(I can't compile the test program--guessing $uidsize.)" >&4
18819 *_t) zzz="$uidtype" ;;
18822 echo "Checking the sign of $zzz..." >&4
18824 #include <sys/types.h>
18835 if eval $compile; then
18839 echo "(I can't execute the test program--guessing unsigned.)" >&4
18843 1) echo "Your $zzz is unsigned." ;;
18844 -1) echo "Your $zzz is signed." ;;
18850 echo "(I can't compile the test program--guessing unsigned.)" >&4
18856 $echo "Checking the format string to be used for uids..." >&4
18859 -1) if $test X"$uidsize" = X"$ivsize"; then
18860 uidformat="$ivdformat"
18862 if $test X"$uidsize" = X"$longsize"; then
18865 if $test X"$uidsize" = X"$intsize"; then
18868 if $test X"$uidsize" = X"$shortsize"; then
18875 *) if $test X"$uidsize" = X"$uvsize"; then
18876 uidformat="$uvuformat"
18878 if $test X"$uidsize" = X"$longsize"; then
18881 if $test X"$uidsize" = X"$intsize"; then
18884 if $test X"$uidsize" = X"$shortsize"; then
18893 : determine compiler compiler
18902 if $test -f "$byacc$_exe"; then
18904 comp="byacc or $comp"
18906 if $test -f "$bison$_exe"; then
18907 comp="$comp or bison -y"
18909 rp="Which compiler compiler ($comp) shall I use?"
18918 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
18924 : see if this is a fp.h system
18928 : see if this is a fp_class.h system
18929 set fp_class.h i_fp_class
18932 : see if this is a ieeefp.h system
18933 case "$i_ieeefp" in
18934 '' ) set ieeefp.h i_ieeefp
18939 : see if this is a libutil.h system
18940 set libutil.h i_libutil
18943 : see if mach cthreads are available
18944 if test "X$usethreads" = "X$define"; then
18945 set mach/cthreads.h i_machcthr
18948 i_machcthr="$undef"
18953 : see if this is a math.h system
18957 : see if this is a mntent.h system
18958 set mntent.h i_mntent
18961 : see if ndbm.h is available
18967 # Some Linux distributions such as RedHat 7.1 put the
18968 # ndbm.h header in /usr/include/gdbm/ndbm.h.
18969 if $test -f /usr/include/gdbm/ndbm.h; then
18970 echo '<gdbm/ndbm.h> found.'
18971 ccflags="$ccflags -I/usr/include/gdbm"
18972 cppflags="$cppflags -I/usr/include/gdbm"
18980 : see if dbm_open exists
18981 set dbm_open d_dbm_open
18983 case "$d_dbm_open" in
18986 echo "We won't be including <ndbm.h>"
18995 : see if net/errno.h is available
18997 set net/errno.h val
19000 : Unfortunately, it causes problems on some systems. Arrgh.
19003 cat > try.c <<'EOM'
19006 #include <net/errno.h>
19012 if $cc $ccflags -c try.c >/dev/null 2>&1; then
19013 echo "We'll be including <net/errno.h>." >&4
19015 echo "We won't be including <net/errno.h>." >&4
19024 : see if netinet/tcp.h is available
19025 set netinet/tcp.h i_netinettcp
19028 : see if this is a poll.h system
19032 : see if this is a prot.h system
19037 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
19038 $cat <<'EOSH' > Cppsym.know
19039 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
19040 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
19041 alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX
19042 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
19043 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
19044 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
19045 bull c cadmus clipper CMU COFF COMPILER_VERSION
19046 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
19047 CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
19048 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
19049 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
19051 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
19052 H3050R H3050RX hbullx20 hcx host_mips
19053 hp200 hp300 hp700 HP700 hp800 hp9000
19054 hp9000s200 hp9000s300 hp9000s400 hp9000s500
19055 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
19056 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
19057 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
19058 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
19059 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
19060 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
19061 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
19062 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
19063 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
19064 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
19065 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
19066 MATH_HAS_NO_SIDE_EFFECTS
19067 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
19068 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
19069 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
19070 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
19071 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
19072 NetBSD news1500 news1700 news1800 news1900 news3700
19073 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
19074 ns32016 ns32332 ns32k nsc32000
19075 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
19076 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
19077 pc532 pdp11 PGC PIC plexus PORTAR posix
19078 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
19079 POSIX_C_SOURCE POSIX_SOURCE POWER
19080 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
19081 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
19082 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
19083 sony sony_news sonyrisc sparc sparclite spectrum
19084 stardent stdc STDC_EXT stratos sun sun3 sun386
19085 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
19086 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
19087 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
19088 sysV68 sysV88 Tek4132 Tek4300 titan
19089 TM3200 TM5400 TM5600
19090 tower tower32 tower32_200 tower32_600 tower32_700
19091 tower32_800 tower32_850 tss
19092 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
19093 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
19094 unix UNIX95 UNIX99 unixpc unos
19095 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
19096 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
19097 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
19099 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
19100 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
19101 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
19104 # Maybe put other stuff here too.
19105 cat <<EOSH >>Cppsym.know
19108 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
19109 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
19110 $cat Cppsym.know > Cppsym.c
19111 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
19112 $rm -f Cppsym.a Cppsym.b Cppsym.c
19113 cat <<EOSH > Cppsym
19115 if $test \$# -gt 0; then
19116 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
19117 if $test -s Cppsym.got; then
19124 $tr " " "$trnl" | ./Cppsym.try
19130 cat <<EOSH > Cppsym.try
19132 cat <<'EOCP' > try.c
19138 cat <<'EOSH' >> Cppsym.try
19140 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
19141 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
19142 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
19143 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
19145 echo 'return 0;}' >> try.c
19147 cat <<EOSH >> Cppsym.try
19149 case "$osname-$gccversion" in
19150 irix-) ccflags="\$ccflags -woff 1178" ;;
19151 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
19153 $cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try
19155 chmod +x Cppsym.try
19156 $eunicefix Cppsym.try
19157 ./Cppsym < Cppsym.know > Cppsym.true
19158 : now check the C compiler for additional symbols
19159 postprocess_cc_v=''
19161 aix) postprocess_cc_v="|$tr , ' '" ;;
19168 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
19171 -D*) echo "\$i" | $sed 's/^-D//';;
19172 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
19177 postprocess_cc_v=''
19180 ./ccsym > ccsym1.raw
19181 if $test -s ccsym1.raw; then
19182 $sort ccsym1.raw | $uniq >ccsym.raw
19184 mv ccsym1.raw ccsym.raw
19187 $awk '/\=/ { print $0; next }
19188 { print $0"=1" }' ccsym.raw >ccsym.list
19189 $awk '/\=/ { print $0; next }
19190 { print $0"=1" }' Cppsym.true >ccsym.true
19191 $comm -13 ccsym.true ccsym.list >ccsym.own
19192 $comm -12 ccsym.true ccsym.list >ccsym.com
19193 $comm -23 ccsym.true ccsym.list >ccsym.cpp
19195 if $test -z ccsym.raw; then
19196 echo "Your C compiler doesn't seem to define any symbols!" >&4
19198 echo "However, your C preprocessor defines the following symbols:"
19201 cppsymbols=`$cat Cppsym.true`
19202 cppsymbols=`echo $cppsymbols`
19203 cppccsymbols="$cppsymbols"
19205 if $test -s ccsym.com; then
19206 echo "Your C compiler and pre-processor define these symbols:"
19207 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
19210 cppccsymbols=`$cat ccsym.com`
19211 cppccsymbols=`echo $cppccsymbols`
19212 $test "$silent" || sleep 1
19214 if $test -s ccsym.cpp; then
19215 $test "$also" && echo " "
19216 echo "Your C pre-processor ${also}defines the following symbols:"
19217 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
19219 cppsymbols=`$cat ccsym.cpp`
19220 cppsymbols=`echo $cppsymbols`
19221 $test "$silent" || sleep 1
19223 if $test -s ccsym.own; then
19224 $test "$also" && echo " "
19225 echo "Your C compiler ${also}defines the following cpp symbols:"
19226 $sed -e 's/\(..*\)=1/\1/' ccsym.own
19227 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
19228 ccsymbols=`$cat ccsym.own`
19229 ccsymbols=`echo $ccsymbols`
19230 $test "$silent" || sleep 1
19234 : see if this is a termio system
19238 if $test `./findhdr termios.h`; then
19239 set tcsetattr i_termios
19245 "$define") echo "You have POSIX termios.h... good!" >&4;;
19246 *) if ./Cppsym pyr; then
19247 case "`/bin/universe`" in
19248 ucb) if $test `./findhdr sgtty.h`; then
19250 echo "<sgtty.h> found." >&4
19252 echo "System is pyramid with BSD universe."
19253 echo "<sgtty.h> not found--you could have problems." >&4
19255 *) if $test `./findhdr termio.h`; then
19257 echo "<termio.h> found." >&4
19259 echo "System is pyramid with USG universe."
19260 echo "<termio.h> not found--you could have problems." >&4
19264 if $test `./findhdr termio.h`; then
19265 echo "<termio.h> found." >&4
19267 elif $test `./findhdr sgtty.h`; then
19268 echo "<sgtty.h> found." >&4
19271 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
19274 if $test `./findhdr sgtty.h`; then
19275 echo "<sgtty.h> found." >&4
19277 elif $test `./findhdr termio.h`; then
19278 echo "<termio.h> found." >&4
19281 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
19285 set i_termio; eval $setvar
19286 val=$val2; set i_sgtty; eval $setvar
19287 val=$val3; set i_termios; eval $setvar
19289 : see if stddef is available
19290 set stddef.h i_stddef
19293 : see if this is a sunmath.h system
19294 set sunmath.h i_sunmath
19297 : see if sys/access.h is available
19298 set sys/access.h i_sysaccess
19301 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
19302 set sys/filio.h i_sysfilio
19305 if $test `./findhdr sys/ioctl.h`; then
19307 echo '<sys/ioctl.h> found.' >&4
19310 if $test $i_sysfilio = "$define"; then
19311 echo '<sys/ioctl.h> NOT found.' >&4
19313 $test $i_sgtty = "$define" && xxx="sgtty.h"
19314 $test $i_termio = "$define" && xxx="termio.h"
19315 $test $i_termios = "$define" && xxx="termios.h"
19316 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
19322 : see if socket ioctl defs are in sys/sockio.h
19324 xxx=`./findhdr sys/sockio.h`
19325 if $test "$xxx"; then
19326 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
19328 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
19331 echo "No socket ioctls found in <sys/sockio.h>." >&4
19336 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
19343 : see if this is a syslog.h system
19344 set syslog.h i_syslog
19348 : see if this is a sys/mode.h system
19349 set sys/mode.h i_sysmode
19352 : see if sys/resource.h has to be included
19353 set sys/resource.h i_sysresrc
19356 : see if sys/security.h is available
19357 set sys/security.h i_syssecrt
19360 : see if this is a sys/statvfs.h system
19361 set sys/statvfs.h i_sysstatvfs
19364 : see if this is a sys/un.h system
19365 set sys/un.h i_sysun
19369 : see if this is a sys/utsname.h system
19370 set sys/utsname.h i_sysutsname
19373 : see if this is a syswait system
19374 set sys/wait.h i_syswait
19377 : see if this is a ustat.h system
19378 set ustat.h i_ustat
19381 : see if this is an utime system
19382 set utime.h i_utime
19385 : see if this is a values.h system
19386 set values.h i_values
19389 : see if this is a vfork system
19392 set vfork.h i_vfork
19400 : see if gdbm.h is available
19405 : see if gdbm_open exists
19406 set gdbm_open d_gdbm_open
19408 case "$d_gdbm_open" in
19411 echo "We won't be including <gdbm.h>"
19421 echo "Looking for extensions..." >&4
19422 : If we are using the old config.sh, known_extensions may contain
19423 : old or inaccurate or duplicate values.
19424 known_extensions=''
19425 nonxs_extensions=''
19426 : We do not use find because it might not be available.
19427 : We do not just use MANIFEST because the user may have dropped
19428 : some additional extensions into the source tree and expect them
19431 : Function to recursively find available extensions, ignoring DynaLoader
19432 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
19436 DynaLoader|dynaload) ;;
19438 if $test -f $xxx/$xxx.xs; then
19439 known_extensions="$known_extensions $1$xxx";
19440 elif $test -f $xxx/Makefile.PL; then
19441 nonxs_extensions="$nonxs_extensions $1$xxx";
19443 if $test -d $xxx -a $# -lt 10; then
19446 eval $find_extensions;
19458 eval $find_extensions
19459 # Special case: Add in threads/shared since it is not picked up by the
19460 # recursive find above (and adding in general recursive finding breaks
19461 # SDBM_File/sdbm). A.D. 10/25/2001.
19462 known_extensions="$known_extensions threads/shared"
19463 set X $nonxs_extensions
19465 nonxs_extensions="$*"
19466 set X $known_extensions
19468 known_extensions="$*"
19471 : Now see which are supported on this system.
19473 for xxx in $known_extensions ; do
19477 $define) avail_ext="$avail_ext $xxx" ;;
19480 GDBM_File|gdbm_fil)
19482 $define) avail_ext="$avail_ext $xxx" ;;
19485 I18N/Langinfo|i18n_lan)
19486 case "$i_langinfo$d_nl_langinfo" in
19487 $define$define) avail_ext="$avail_ext $xxx" ;;
19490 NDBM_File|ndbm_fil)
19493 case "$osname-$use64bitint" in
19494 cygwin-*|hpux-define)
19496 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
19499 *) avail_ext="$avail_ext $xxx" ;;
19504 ODBM_File|odbm_fil)
19505 case "${i_dbm}${i_rpcsvcdbm}" in
19507 case "$osname-$use64bitint" in
19508 cygwin-*|hpux-define)
19510 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
19513 *) avail_ext="$avail_ext $xxx" ;;
19519 case "$useposix" in
19520 true|define|y) avail_ext="$avail_ext $xxx" ;;
19524 case "$useopcode" in
19525 true|define|y) avail_ext="$avail_ext $xxx" ;;
19529 case "$d_socket" in
19532 beos) ;; # not unless BONE
19533 *) avail_ext="$avail_ext $xxx" ;;
19538 Sys/Syslog|sys/syslog)
19539 : XXX syslog requires socket
19540 case "$d_socket" in
19541 true|$define|y) avail_ext="$avail_ext $xxx" ;;
19545 case "$usethreads" in
19547 case "$useithreads" in
19548 $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
19552 threads|threads/shared)
19553 case "$usethreads" in
19555 case "$useithreads" in
19556 $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;;
19561 : XXX Do we need a useipcsysv variable here
19562 case "${d_msg}${d_sem}${d_shm}" in
19563 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
19566 *) avail_ext="$avail_ext $xxx"
19575 : Now see which nonxs extensions are supported on this system.
19576 : For now assume all are.
19578 for xxx in $nonxs_extensions ; do
19580 *) nonxs_ext="$nonxs_ext $xxx"
19592 A number of extensions are supplied with $package. You may choose to
19593 compile these extensions for dynamic loading (the default), compile
19594 them into the $package executable (static loading), or not include
19595 them at all. Answer "none" to include no extensions.
19596 Note that DynaLoader is always built and need not be mentioned here.
19599 case "$dynamic_ext" in
19600 '') dflt="$avail_ext" ;;
19601 *) dflt="$dynamic_ext"
19602 # Perhaps we are reusing an old out-of-date config.sh.
19605 if test X"$dynamic_ext" != X"$avail_ext"; then
19607 NOTICE: Your previous config.sh list may be incorrect.
19608 The extensions now available to you are
19610 but the default list from your previous config.sh is
19622 rp="What extensions do you wish to load dynamically?"
19625 none) dynamic_ext=' ' ;;
19626 *) dynamic_ext="$ans" ;;
19629 case "$static_ext" in
19631 : Exclude those already listed in dynamic linking
19633 for xxx in $avail_ext; do
19634 case " $dynamic_ext " in
19636 *) dflt="$dflt $xxx" ;;
19643 *) dflt="$static_ext"
19650 rp="What extensions do you wish to load statically?"
19653 none) static_ext=' ' ;;
19654 *) static_ext="$ans" ;;
19659 A number of extensions are supplied with $package. Answer "none"
19660 to include no extensions.
19661 Note that DynaLoader is always built and need not be mentioned here.
19664 case "$static_ext" in
19665 '') dflt="$avail_ext" ;;
19666 *) dflt="$static_ext"
19667 # Perhaps we are reusing an old out-of-date config.sh.
19670 if test X"$static_ext" != X"$avail_ext"; then
19672 NOTICE: Your previous config.sh list may be incorrect.
19673 The extensions now available to you are
19675 but the default list from your previous config.sh is
19684 : Exclude those that are not xs extensions
19687 *) case " $dflt " in
19688 *" Encode "*) # Add the subextensions of Encode
19690 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
19691 dflt="$dflt Encode/$xxx"
19698 rp="What extensions do you wish to include?"
19701 none) static_ext=' ' ;;
19702 *) static_ext="$ans" ;;
19707 set X $dynamic_ext $static_ext $nonxs_ext
19711 : Remove libraries needed only for extensions
19712 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
19713 : The exception is SunOS 4.x, which needs them.
19714 case "${osname}X${osvers}" in
19718 *) case "$usedl" in
19719 $define|true|[yY]*)
19720 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
19724 *) perllibs="$libs"
19730 : Remove build directory name from cppstdin so it can be used from
19731 : either the present location or the final installed location.
19733 : Get out of the UU directory to get correct path name.
19735 case "$cppstdin" in
19737 echo "Stripping down cppstdin path name"
19743 : end of configuration questions
19745 echo "End of configuration questions."
19748 : back to where it started
19749 if test -d ../UU; then
19753 : configuration may be patched via a 'config.arch' file
19754 if $test -f config.arch; then
19755 echo "I see a config.arch file, loading it."
19759 : configuration may be patched via a 'config.over' file
19760 if $test -f config.over; then
19763 rp='I see a config.over file. Do you wish to load it?'
19766 n*) echo "OK, I'll ignore it.";;
19768 echo "Configuration override changes have been loaded."
19773 : in case they want portability, strip down executable paths
19774 case "$d_portable" in
19777 echo "Stripping down executable paths..." >&4
19778 for file in $loclist $trylist; do
19780 eval $file=`basename $temp`
19785 : create config.sh file
19787 echo "Creating config.sh..." >&4
19788 $spitshell <<EOT >config.sh
19791 # This file was produced by running the Configure script. It holds all the
19792 # definitions figured out by Configure. Should you modify one of these values,
19793 # do not forget to propagate your changes by running "Configure -der". You may
19794 # instead choose to run each of the .SH files by yourself, or "Configure -S".
19797 # Package name : $package
19798 # Source directory : $src
19799 # Configuration time: $cf_time
19800 # Configured by : $cf_by
19801 # Target system : $myuname
19811 Revision='$Revision'
19819 alignbytes='$alignbytes'
19820 ansi2knr='$ansi2knr'
19821 aphostname='$aphostname'
19822 api_revision='$api_revision'
19823 api_subversion='$api_subversion'
19824 api_version='$api_version'
19825 api_versionstring='$api_versionstring'
19828 archlibexp='$archlibexp'
19829 archname64='$archname64'
19830 archname='$archname'
19831 archobjs='$archobjs'
19832 asctime_r_proto='$asctime_r_proto'
19837 bincompat5005='$bincompat5005'
19841 byteorder='$byteorder'
19843 castflags='$castflags'
19846 cccdlflags='$cccdlflags'
19847 ccdlflags='$ccdlflags'
19849 ccflags_uselargefiles='$ccflags_uselargefiles'
19851 ccsymbols='$ccsymbols'
19852 ccversion='$ccversion'
19854 cf_email='$cf_email'
19856 charsize='$charsize'
19860 clocktype='$clocktype'
19862 compress='$compress'
19863 contains='$contains'
19867 cpp_stuff='$cpp_stuff'
19868 cppccsymbols='$cppccsymbols'
19869 cppflags='$cppflags'
19871 cppminus='$cppminus'
19873 cppstdin='$cppstdin'
19874 cppsymbols='$cppsymbols'
19875 crypt_r_proto='$crypt_r_proto'
19876 cryptlib='$cryptlib'
19878 ctermid_r_proto='$ctermid_r_proto'
19879 ctime_r_proto='$ctime_r_proto'
19880 d_Gconvert='$d_Gconvert'
19881 d_PRIEUldbl='$d_PRIEUldbl'
19882 d_PRIFUldbl='$d_PRIFUldbl'
19883 d_PRIGUldbl='$d_PRIGUldbl'
19884 d_PRIXU64='$d_PRIXU64'
19885 d_PRId64='$d_PRId64'
19886 d_PRIeldbl='$d_PRIeldbl'
19887 d_PRIfldbl='$d_PRIfldbl'
19888 d_PRIgldbl='$d_PRIgldbl'
19889 d_PRIi64='$d_PRIi64'
19890 d_PRIo64='$d_PRIo64'
19891 d_PRIu64='$d_PRIu64'
19892 d_PRIx64='$d_PRIx64'
19893 d_SCNfldbl='$d_SCNfldbl'
19894 d__fwalk='$d__fwalk'
19895 d_access='$d_access'
19896 d_accessx='$d_accessx'
19898 d_archlib='$d_archlib'
19899 d_asctime_r='$d_asctime_r'
19902 d_attribut='$d_attribut'
19905 d_bincompat5005='$d_bincompat5005'
19907 d_bsdgetpgrp='$d_bsdgetpgrp'
19908 d_bsdsetpgrp='$d_bsdsetpgrp'
19910 d_casti32='$d_casti32'
19911 d_castneg='$d_castneg'
19912 d_charvspr='$d_charvspr'
19914 d_chroot='$d_chroot'
19915 d_chsize='$d_chsize'
19917 d_closedir='$d_closedir'
19918 d_cmsghdr_s='$d_cmsghdr_s'
19921 d_crypt_r='$d_crypt_r'
19923 d_ctermid_r='$d_ctermid_r'
19924 d_ctime_r='$d_ctime_r'
19925 d_cuserid='$d_cuserid'
19926 d_dbl_dig='$d_dbl_dig'
19927 d_dbminitproto='$d_dbminitproto'
19928 d_difftime='$d_difftime'
19930 d_dirnamlen='$d_dirnamlen'
19931 d_dlerror='$d_dlerror'
19932 d_dlopen='$d_dlopen'
19933 d_dlsymun='$d_dlsymun'
19934 d_dosuid='$d_dosuid'
19935 d_drand48_r='$d_drand48_r'
19936 d_drand48proto='$d_drand48proto'
19938 d_eaccess='$d_eaccess'
19939 d_endgrent='$d_endgrent'
19940 d_endgrent_r='$d_endgrent_r'
19941 d_endhent='$d_endhent'
19942 d_endhostent_r='$d_endhostent_r'
19943 d_endnent='$d_endnent'
19944 d_endnetent_r='$d_endnetent_r'
19945 d_endpent='$d_endpent'
19946 d_endprotoent_r='$d_endprotoent_r'
19947 d_endpwent='$d_endpwent'
19948 d_endpwent_r='$d_endpwent_r'
19949 d_endsent='$d_endsent'
19950 d_endservent_r='$d_endservent_r'
19951 d_eofnblk='$d_eofnblk'
19952 d_eunice='$d_eunice'
19953 d_fchdir='$d_fchdir'
19954 d_fchmod='$d_fchmod'
19955 d_fchown='$d_fchown'
19957 d_fcntl_can_lock='$d_fcntl_can_lock'
19958 d_fd_macros='$d_fd_macros'
19959 d_fd_set='$d_fd_set'
19960 d_fds_bits='$d_fds_bits'
19961 d_fgetpos='$d_fgetpos'
19962 d_finite='$d_finite'
19963 d_finitel='$d_finitel'
19964 d_flexfnam='$d_flexfnam'
19966 d_flockproto='$d_flockproto'
19968 d_fp_class='$d_fp_class'
19969 d_fpathconf='$d_fpathconf'
19970 d_fpclass='$d_fpclass'
19971 d_fpclassify='$d_fpclassify'
19972 d_fpclassl='$d_fpclassl'
19973 d_fpos64_t='$d_fpos64_t'
19974 d_frexpl='$d_frexpl'
19975 d_fs_data_s='$d_fs_data_s'
19976 d_fseeko='$d_fseeko'
19977 d_fsetpos='$d_fsetpos'
19978 d_fstatfs='$d_fstatfs'
19979 d_fstatvfs='$d_fstatvfs'
19981 d_ftello='$d_ftello'
19983 d_getcwd='$d_getcwd'
19984 d_getespwnam='$d_getespwnam'
19985 d_getfsstat='$d_getfsstat'
19986 d_getgrent='$d_getgrent'
19987 d_getgrent_r='$d_getgrent_r'
19988 d_getgrgid_r='$d_getgrgid_r'
19989 d_getgrnam_r='$d_getgrnam_r'
19990 d_getgrps='$d_getgrps'
19991 d_gethbyaddr='$d_gethbyaddr'
19992 d_gethbyname='$d_gethbyname'
19993 d_gethent='$d_gethent'
19994 d_gethname='$d_gethname'
19995 d_gethostbyaddr_r='$d_gethostbyaddr_r'
19996 d_gethostbyname_r='$d_gethostbyname_r'
19997 d_gethostent_r='$d_gethostent_r'
19998 d_gethostprotos='$d_gethostprotos'
19999 d_getitimer='$d_getitimer'
20000 d_getlogin='$d_getlogin'
20001 d_getlogin_r='$d_getlogin_r'
20002 d_getmnt='$d_getmnt'
20003 d_getmntent='$d_getmntent'
20004 d_getnbyaddr='$d_getnbyaddr'
20005 d_getnbyname='$d_getnbyname'
20006 d_getnent='$d_getnent'
20007 d_getnetbyaddr_r='$d_getnetbyaddr_r'
20008 d_getnetbyname_r='$d_getnetbyname_r'
20009 d_getnetent_r='$d_getnetent_r'
20010 d_getnetprotos='$d_getnetprotos'
20011 d_getpagsz='$d_getpagsz'
20012 d_getpbyname='$d_getpbyname'
20013 d_getpbynumber='$d_getpbynumber'
20014 d_getpent='$d_getpent'
20015 d_getpgid='$d_getpgid'
20016 d_getpgrp2='$d_getpgrp2'
20017 d_getpgrp='$d_getpgrp'
20018 d_getppid='$d_getppid'
20019 d_getprior='$d_getprior'
20020 d_getprotobyname_r='$d_getprotobyname_r'
20021 d_getprotobynumber_r='$d_getprotobynumber_r'
20022 d_getprotoent_r='$d_getprotoent_r'
20023 d_getprotoprotos='$d_getprotoprotos'
20024 d_getprpwnam='$d_getprpwnam'
20025 d_getpwent='$d_getpwent'
20026 d_getpwent_r='$d_getpwent_r'
20027 d_getpwnam_r='$d_getpwnam_r'
20028 d_getpwuid_r='$d_getpwuid_r'
20029 d_getsbyname='$d_getsbyname'
20030 d_getsbyport='$d_getsbyport'
20031 d_getsent='$d_getsent'
20032 d_getservbyname_r='$d_getservbyname_r'
20033 d_getservbyport_r='$d_getservbyport_r'
20034 d_getservent_r='$d_getservent_r'
20035 d_getservprotos='$d_getservprotos'
20036 d_getspnam='$d_getspnam'
20037 d_getspnam_r='$d_getspnam_r'
20038 d_gettimeod='$d_gettimeod'
20039 d_gmtime_r='$d_gmtime_r'
20040 d_gnulibc='$d_gnulibc'
20041 d_grpasswd='$d_grpasswd'
20042 d_hasmntopt='$d_hasmntopt'
20045 d_inetaton='$d_inetaton'
20046 d_int64_t='$d_int64_t'
20047 d_isascii='$d_isascii'
20048 d_isfinite='$d_isfinite'
20051 d_isnanl='$d_isnanl'
20052 d_killpg='$d_killpg'
20053 d_lchown='$d_lchown'
20054 d_ldbl_dig='$d_ldbl_dig'
20056 d_localtime_r='$d_localtime_r'
20057 d_locconv='$d_locconv'
20059 d_longdbl='$d_longdbl'
20060 d_longlong='$d_longlong'
20061 d_lseekproto='$d_lseekproto'
20063 d_madvise='$d_madvise'
20065 d_mbstowcs='$d_mbstowcs'
20066 d_mbtowc='$d_mbtowc'
20067 d_memchr='$d_memchr'
20068 d_memcmp='$d_memcmp'
20069 d_memcpy='$d_memcpy'
20070 d_memmove='$d_memmove'
20071 d_memset='$d_memset'
20073 d_mkdtemp='$d_mkdtemp'
20074 d_mkfifo='$d_mkfifo'
20075 d_mkstemp='$d_mkstemp'
20076 d_mkstemps='$d_mkstemps'
20077 d_mktime='$d_mktime'
20080 d_modfl_pow32_bug='$d_modfl_pow32_bug'
20081 d_mprotect='$d_mprotect'
20083 d_msg_ctrunc='$d_msg_ctrunc'
20084 d_msg_dontroute='$d_msg_dontroute'
20085 d_msg_oob='$d_msg_oob'
20086 d_msg_peek='$d_msg_peek'
20087 d_msg_proxy='$d_msg_proxy'
20088 d_msgctl='$d_msgctl'
20089 d_msgget='$d_msgget'
20090 d_msghdr_s='$d_msghdr_s'
20091 d_msgrcv='$d_msgrcv'
20092 d_msgsnd='$d_msgsnd'
20094 d_munmap='$d_munmap'
20095 d_mymalloc='$d_mymalloc'
20097 d_nl_langinfo='$d_nl_langinfo'
20098 d_nv_preserves_uv='$d_nv_preserves_uv'
20099 d_off64_t='$d_off64_t'
20100 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
20101 d_oldpthreads='$d_oldpthreads'
20102 d_oldsock='$d_oldsock'
20104 d_pathconf='$d_pathconf'
20106 d_perl_otherlibdirs='$d_perl_otherlibdirs'
20107 d_phostname='$d_phostname'
20110 d_portable='$d_portable'
20111 d_procselfexe='$d_procselfexe'
20112 d_pthread_atfork='$d_pthread_atfork'
20113 d_pthread_yield='$d_pthread_yield'
20115 d_pwchange='$d_pwchange'
20116 d_pwclass='$d_pwclass'
20117 d_pwcomment='$d_pwcomment'
20118 d_pwexpire='$d_pwexpire'
20119 d_pwgecos='$d_pwgecos'
20120 d_pwpasswd='$d_pwpasswd'
20121 d_pwquota='$d_pwquota'
20124 d_random_r='$d_random_r'
20125 d_readdir64_r='$d_readdir64_r'
20126 d_readdir='$d_readdir'
20127 d_readdir_r='$d_readdir_r'
20128 d_readlink='$d_readlink'
20130 d_recvmsg='$d_recvmsg'
20131 d_rename='$d_rename'
20132 d_rewinddir='$d_rewinddir'
20134 d_safebcpy='$d_safebcpy'
20135 d_safemcpy='$d_safemcpy'
20136 d_sanemcmp='$d_sanemcmp'
20137 d_sbrkproto='$d_sbrkproto'
20138 d_sched_yield='$d_sched_yield'
20139 d_scm_rights='$d_scm_rights'
20140 d_seekdir='$d_seekdir'
20141 d_select='$d_select'
20143 d_semctl='$d_semctl'
20144 d_semctl_semid_ds='$d_semctl_semid_ds'
20145 d_semctl_semun='$d_semctl_semun'
20146 d_semget='$d_semget'
20148 d_sendmsg='$d_sendmsg'
20149 d_setegid='$d_setegid'
20150 d_seteuid='$d_seteuid'
20151 d_setgrent='$d_setgrent'
20152 d_setgrent_r='$d_setgrent_r'
20153 d_setgrps='$d_setgrps'
20154 d_sethent='$d_sethent'
20155 d_sethostent_r='$d_sethostent_r'
20156 d_setitimer='$d_setitimer'
20157 d_setlinebuf='$d_setlinebuf'
20158 d_setlocale='$d_setlocale'
20159 d_setlocale_r='$d_setlocale_r'
20160 d_setnent='$d_setnent'
20161 d_setnetent_r='$d_setnetent_r'
20162 d_setpent='$d_setpent'
20163 d_setpgid='$d_setpgid'
20164 d_setpgrp2='$d_setpgrp2'
20165 d_setpgrp='$d_setpgrp'
20166 d_setprior='$d_setprior'
20167 d_setproctitle='$d_setproctitle'
20168 d_setprotoent_r='$d_setprotoent_r'
20169 d_setpwent='$d_setpwent'
20170 d_setpwent_r='$d_setpwent_r'
20171 d_setregid='$d_setregid'
20172 d_setresgid='$d_setresgid'
20173 d_setresuid='$d_setresuid'
20174 d_setreuid='$d_setreuid'
20175 d_setrgid='$d_setrgid'
20176 d_setruid='$d_setruid'
20177 d_setsent='$d_setsent'
20178 d_setservent_r='$d_setservent_r'
20179 d_setsid='$d_setsid'
20180 d_setvbuf='$d_setvbuf'
20184 d_shmatprototype='$d_shmatprototype'
20185 d_shmctl='$d_shmctl'
20187 d_shmget='$d_shmget'
20188 d_sigaction='$d_sigaction'
20189 d_sigprocmask='$d_sigprocmask'
20190 d_sigsetjmp='$d_sigsetjmp'
20191 d_sockatmark='$d_sockatmark'
20192 d_sockatmarkproto='$d_sockatmarkproto'
20193 d_socket='$d_socket'
20194 d_socklen_t='$d_socklen_t'
20195 d_sockpair='$d_sockpair'
20196 d_socks5_init='$d_socks5_init'
20198 d_srand48_r='$d_srand48_r'
20199 d_srandom_r='$d_srandom_r'
20200 d_sresgproto='$d_sresgproto'
20201 d_sresuproto='$d_sresuproto'
20202 d_statblks='$d_statblks'
20203 d_statfs_f_flags='$d_statfs_f_flags'
20204 d_statfs_s='$d_statfs_s'
20205 d_statvfs='$d_statvfs'
20206 d_stdio_cnt_lval='$d_stdio_cnt_lval'
20207 d_stdio_ptr_lval='$d_stdio_ptr_lval'
20208 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
20209 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
20210 d_stdio_stream_array='$d_stdio_stream_array'
20211 d_stdiobase='$d_stdiobase'
20212 d_stdstdio='$d_stdstdio'
20213 d_strchr='$d_strchr'
20214 d_strcoll='$d_strcoll'
20215 d_strctcpy='$d_strctcpy'
20216 d_strerrm='$d_strerrm'
20217 d_strerror='$d_strerror'
20218 d_strerror_r='$d_strerror_r'
20219 d_strftime='$d_strftime'
20220 d_strtod='$d_strtod'
20221 d_strtol='$d_strtol'
20222 d_strtold='$d_strtold'
20223 d_strtoll='$d_strtoll'
20224 d_strtoq='$d_strtoq'
20225 d_strtoul='$d_strtoul'
20226 d_strtoull='$d_strtoull'
20227 d_strtouq='$d_strtouq'
20228 d_strxfrm='$d_strxfrm'
20229 d_suidsafe='$d_suidsafe'
20230 d_symlink='$d_symlink'
20231 d_syscall='$d_syscall'
20232 d_syscallproto='$d_syscallproto'
20233 d_sysconf='$d_sysconf'
20234 d_sysernlst='$d_sysernlst'
20235 d_syserrlst='$d_syserrlst'
20236 d_system='$d_system'
20237 d_tcgetpgrp='$d_tcgetpgrp'
20238 d_tcsetpgrp='$d_tcsetpgrp'
20239 d_telldir='$d_telldir'
20240 d_telldirproto='$d_telldirproto'
20243 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
20244 d_tm_tm_zone='$d_tm_tm_zone'
20245 d_tmpnam_r='$d_tmpnam_r'
20246 d_truncate='$d_truncate'
20247 d_ttyname_r='$d_ttyname_r'
20248 d_tzname='$d_tzname'
20249 d_u32align='$d_u32align'
20250 d_ualarm='$d_ualarm'
20253 d_union_semun='$d_union_semun'
20254 d_unordered='$d_unordered'
20255 d_usleep='$d_usleep'
20256 d_usleepproto='$d_usleepproto'
20258 d_vendorarch='$d_vendorarch'
20259 d_vendorbin='$d_vendorbin'
20260 d_vendorlib='$d_vendorlib'
20262 d_void_closedir='$d_void_closedir'
20263 d_voidsig='$d_voidsig'
20264 d_voidtty='$d_voidtty'
20265 d_volatile='$d_volatile'
20266 d_vprintf='$d_vprintf'
20268 d_waitpid='$d_waitpid'
20269 d_wcstombs='$d_wcstombs'
20270 d_wctomb='$d_wctomb'
20271 d_writev='$d_writev'
20274 db_hashtype='$db_hashtype'
20275 db_prefixtype='$db_prefixtype'
20276 db_version_major='$db_version_major'
20277 db_version_minor='$db_version_minor'
20278 db_version_patch='$db_version_patch'
20279 defvoidused='$defvoidused'
20280 direntrytype='$direntrytype'
20283 doublesize='$doublesize'
20285 drand48_r_proto='$drand48_r_proto'
20286 dynamic_ext='$dynamic_ext'
20292 endgrent_r_proto='$endgrent_r_proto'
20293 endhostent_r_proto='$endhostent_r_proto'
20294 endnetent_r_proto='$endnetent_r_proto'
20295 endprotoent_r_proto='$endprotoent_r_proto'
20296 endpwent_r_proto='$endpwent_r_proto'
20297 endservent_r_proto='$endservent_r_proto'
20298 eunicefix='$eunicefix'
20301 extensions='$extensions'
20303 fflushNULL='$fflushNULL'
20304 fflushall='$fflushall'
20306 firstmakefile='$firstmakefile'
20308 fpossize='$fpossize'
20309 fpostype='$fpostype'
20310 freetype='$freetype'
20313 full_csh='$full_csh'
20314 full_sed='$full_sed'
20315 gccosandvers='$gccosandvers'
20316 gccversion='$gccversion'
20317 getgrent_r_proto='$getgrent_r_proto'
20318 getgrgid_r_proto='$getgrgid_r_proto'
20319 getgrnam_r_proto='$getgrnam_r_proto'
20320 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
20321 gethostbyname_r_proto='$gethostbyname_r_proto'
20322 gethostent_r_proto='$gethostent_r_proto'
20323 getlogin_r_proto='$getlogin_r_proto'
20324 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
20325 getnetbyname_r_proto='$getnetbyname_r_proto'
20326 getnetent_r_proto='$getnetent_r_proto'
20327 getprotobyname_r_proto='$getprotobyname_r_proto'
20328 getprotobynumber_r_proto='$getprotobynumber_r_proto'
20329 getprotoent_r_proto='$getprotoent_r_proto'
20330 getpwent_r_proto='$getpwent_r_proto'
20331 getpwnam_r_proto='$getpwnam_r_proto'
20332 getpwuid_r_proto='$getpwuid_r_proto'
20333 getservbyname_r_proto='$getservbyname_r_proto'
20334 getservbyport_r_proto='$getservbyport_r_proto'
20335 getservent_r_proto='$getservent_r_proto'
20336 getspnam_r_proto='$getspnam_r_proto'
20337 gidformat='$gidformat'
20343 gmtime_r_proto='$gmtime_r_proto'
20345 groupcat='$groupcat'
20346 groupstype='$groupstype'
20349 h_sysfile='$h_sysfile'
20360 i_arpainet='$i_arpainet'
20361 i_bsdioctl='$i_bsdioctl'
20365 i_dirent='$i_dirent'
20371 i_fp_class='$i_fp_class'
20374 i_ieeefp='$i_ieeefp'
20375 i_inttypes='$i_inttypes'
20376 i_langinfo='$i_langinfo'
20377 i_libutil='$i_libutil'
20378 i_limits='$i_limits'
20379 i_locale='$i_locale'
20380 i_machcthr='$i_machcthr'
20381 i_malloc='$i_malloc'
20383 i_memory='$i_memory'
20384 i_mntent='$i_mntent'
20387 i_neterrno='$i_neterrno'
20388 i_netinettcp='$i_netinettcp'
20392 i_pthread='$i_pthread'
20394 i_rpcsvcdbm='$i_rpcsvcdbm'
20397 i_shadow='$i_shadow'
20399 i_stdarg='$i_stdarg'
20400 i_stddef='$i_stddef'
20401 i_stdlib='$i_stdlib'
20402 i_string='$i_string'
20403 i_sunmath='$i_sunmath'
20404 i_sysaccess='$i_sysaccess'
20405 i_sysdir='$i_sysdir'
20406 i_sysfile='$i_sysfile'
20407 i_sysfilio='$i_sysfilio'
20409 i_sysioctl='$i_sysioctl'
20410 i_syslog='$i_syslog'
20411 i_sysmman='$i_sysmman'
20412 i_sysmode='$i_sysmode'
20413 i_sysmount='$i_sysmount'
20414 i_sysndir='$i_sysndir'
20415 i_sysparam='$i_sysparam'
20416 i_sysresrc='$i_sysresrc'
20417 i_syssecrt='$i_syssecrt'
20418 i_sysselct='$i_sysselct'
20419 i_syssockio='$i_syssockio'
20420 i_sysstat='$i_sysstat'
20421 i_sysstatfs='$i_sysstatfs'
20422 i_sysstatvfs='$i_sysstatvfs'
20423 i_systime='$i_systime'
20424 i_systimek='$i_systimek'
20425 i_systimes='$i_systimes'
20426 i_systypes='$i_systypes'
20427 i_sysuio='$i_sysuio'
20429 i_sysutsname='$i_sysutsname'
20430 i_sysvfs='$i_sysvfs'
20431 i_syswait='$i_syswait'
20432 i_termio='$i_termio'
20433 i_termios='$i_termios'
20435 i_unistd='$i_unistd'
20438 i_values='$i_values'
20439 i_varargs='$i_varargs'
20440 i_varhdr='$i_varhdr'
20442 ignore_versioned_solibs='$ignore_versioned_solibs'
20443 inc_version_list='$inc_version_list'
20444 inc_version_list_init='$inc_version_list_init'
20447 installarchlib='$installarchlib'
20448 installbin='$installbin'
20449 installman1dir='$installman1dir'
20450 installman3dir='$installman3dir'
20451 installprefix='$installprefix'
20452 installprefixexp='$installprefixexp'
20453 installprivlib='$installprivlib'
20454 installscript='$installscript'
20455 installsitearch='$installsitearch'
20456 installsitebin='$installsitebin'
20457 installsitelib='$installsitelib'
20458 installstyle='$installstyle'
20459 installusrbinperl='$installusrbinperl'
20460 installvendorarch='$installvendorarch'
20461 installvendorbin='$installvendorbin'
20462 installvendorlib='$installvendorlib'
20464 issymlink='$issymlink'
20465 ivdformat='$ivdformat'
20468 known_extensions='$known_extensions'
20471 lddlflags='$lddlflags'
20473 ldflags_uselargefiles='$ldflags_uselargefiles'
20474 ldlibpthname='$ldlibpthname'
20481 libsdirs='$libsdirs'
20482 libsfiles='$libsfiles'
20483 libsfound='$libsfound'
20484 libspath='$libspath'
20485 libswanted='$libswanted'
20486 libswanted_uselargefiles='$libswanted_uselargefiles'
20492 localtime_r_proto='$localtime_r_proto'
20493 locincpth='$locincpth'
20494 loclibpth='$loclibpth'
20495 longdblsize='$longdblsize'
20496 longlongsize='$longlongsize'
20497 longsize='$longsize'
20501 lseeksize='$lseeksize'
20502 lseektype='$lseektype'
20506 make_set_make='$make_set_make'
20507 mallocobj='$mallocobj'
20508 mallocsrc='$mallocsrc'
20509 malloctype='$malloctype'
20511 man1direxp='$man1direxp'
20514 man3direxp='$man3direxp'
20516 mips_type='$mips_type'
20518 mmaptype='$mmaptype'
20519 modetype='$modetype'
20521 multiarch='$multiarch'
20523 myarchname='$myarchname'
20524 mydomain='$mydomain'
20525 myhostname='$myhostname'
20528 need_va_copy='$need_va_copy'
20529 netdb_hlen_type='$netdb_hlen_type'
20530 netdb_host_type='$netdb_host_type'
20531 netdb_name_type='$netdb_name_type'
20532 netdb_net_type='$netdb_net_type'
20535 nm_so_opt='$nm_so_opt'
20536 nonxs_ext='$nonxs_ext'
20538 nvEUformat='$nvEUformat'
20539 nvFUformat='$nvFUformat'
20540 nvGUformat='$nvGUformat'
20541 nv_preserves_uv_bits='$nv_preserves_uv_bits'
20542 nveformat='$nveformat'
20543 nvfformat='$nvfformat'
20544 nvgformat='$nvgformat'
20547 o_nonblock='$o_nonblock'
20549 old_pthread_create_joinable='$old_pthread_create_joinable'
20550 optimize='$optimize'
20551 orderlib='$orderlib'
20554 otherlibdirs='$otherlibdirs'
20558 patchlevel='$patchlevel'
20559 path_sep='$path_sep'
20562 perl_patchlevel='$perl_patchlevel'
20563 perladmin='$perladmin'
20564 perllibs='$perllibs'
20565 perlpath='$perlpath'
20567 phostname='$phostname'
20570 pm_apiversion='$pm_apiversion'
20574 prefixexp='$prefixexp'
20576 privlibexp='$privlibexp'
20577 procselfexe='$procselfexe'
20578 prototype='$prototype'
20580 quadkind='$quadkind'
20581 quadtype='$quadtype'
20582 randbits='$randbits'
20583 randfunc='$randfunc'
20584 random_r_proto='$random_r_proto'
20585 randseedtype='$randseedtype'
20587 rd_nodata='$rd_nodata'
20588 readdir64_r_proto='$readdir64_r_proto'
20589 readdir_r_proto='$readdir_r_proto'
20590 revision='$revision'
20595 sPRIEUldbl='$sPRIEUldbl'
20596 sPRIFUldbl='$sPRIFUldbl'
20597 sPRIGUldbl='$sPRIGUldbl'
20598 sPRIXU64='$sPRIXU64'
20600 sPRIeldbl='$sPRIeldbl'
20601 sPRIfldbl='$sPRIfldbl'
20602 sPRIgldbl='$sPRIgldbl'
20607 sSCNfldbl='$sSCNfldbl'
20608 sched_yield='$sched_yield'
20609 scriptdir='$scriptdir'
20610 scriptdirexp='$scriptdirexp'
20612 seedfunc='$seedfunc'
20613 selectminbits='$selectminbits'
20614 selecttype='$selecttype'
20615 sendmail='$sendmail'
20616 setgrent_r_proto='$setgrent_r_proto'
20617 sethostent_r_proto='$sethostent_r_proto'
20618 setlocale_r_proto='$setlocale_r_proto'
20619 setnetent_r_proto='$setnetent_r_proto'
20620 setprotoent_r_proto='$setprotoent_r_proto'
20621 setpwent_r_proto='$setpwent_r_proto'
20622 setservent_r_proto='$setservent_r_proto'
20625 sharpbang='$sharpbang'
20626 shmattype='$shmattype'
20627 shortsize='$shortsize'
20630 sig_count='$sig_count'
20631 sig_name='$sig_name'
20632 sig_name_init='$sig_name_init'
20634 sig_num_init='$sig_num_init'
20635 sig_size='$sig_size'
20636 signal_t='$signal_t'
20637 sitearch='$sitearch'
20638 sitearchexp='$sitearchexp'
20640 sitebinexp='$sitebinexp'
20642 sitelib_stem='$sitelib_stem'
20643 sitelibexp='$sitelibexp'
20644 siteprefix='$siteprefix'
20645 siteprefixexp='$siteprefixexp'
20646 sizesize='$sizesize'
20647 sizetype='$sizetype'
20651 sockethdr='$sockethdr'
20652 socketlib='$socketlib'
20653 socksizetype='$socksizetype'
20655 spackage='$spackage'
20656 spitshell='$spitshell'
20657 srand48_r_proto='$srand48_r_proto'
20658 srandom_r_proto='$srandom_r_proto'
20660 ssizetype='$ssizetype'
20661 startperl='$startperl'
20663 static_ext='$static_ext'
20665 stdio_base='$stdio_base'
20666 stdio_bufsiz='$stdio_bufsiz'
20667 stdio_cnt='$stdio_cnt'
20668 stdio_filbuf='$stdio_filbuf'
20669 stdio_ptr='$stdio_ptr'
20670 stdio_stream_array='$stdio_stream_array'
20671 strerror_r_proto='$strerror_r_proto'
20674 subversion='$subversion'
20678 targetarch='$targetarch'
20682 timeincl='$timeincl'
20683 timetype='$timetype'
20684 tmpnam_r_proto='$tmpnam_r_proto'
20690 ttyname_r_proto='$ttyname_r_proto'
20699 uidformat='$uidformat'
20705 uquadtype='$uquadtype'
20706 use5005threads='$use5005threads'
20707 use64bitall='$use64bitall'
20708 use64bitint='$use64bitint'
20709 usecrosscompile='$usecrosscompile'
20711 useithreads='$useithreads'
20712 uselargefiles='$uselargefiles'
20713 uselongdouble='$uselongdouble'
20714 usemorebits='$usemorebits'
20715 usemultiplicity='$usemultiplicity'
20716 usemymalloc='$usemymalloc'
20718 useopcode='$useopcode'
20719 useperlio='$useperlio'
20720 useposix='$useposix'
20721 usereentrant='$usereentrant'
20723 useshrplib='$useshrplib'
20724 usesocks='$usesocks'
20725 usethreads='$usethreads'
20726 usevendorprefix='$usevendorprefix'
20727 usevfork='$usevfork'
20730 uvXUformat='$uvXUformat'
20731 uvoformat='$uvoformat'
20734 uvuformat='$uvuformat'
20735 uvxformat='$uvxformat'
20736 vendorarch='$vendorarch'
20737 vendorarchexp='$vendorarchexp'
20738 vendorbin='$vendorbin'
20739 vendorbinexp='$vendorbinexp'
20740 vendorlib='$vendorlib'
20741 vendorlib_stem='$vendorlib_stem'
20742 vendorlibexp='$vendorlibexp'
20743 vendorprefix='$vendorprefix'
20744 vendorprefixexp='$vendorprefixexp'
20746 version_patchlevel_string='$version_patchlevel_string'
20747 versiononly='$versiononly'
20749 voidflags='$voidflags'
20751 xs_apiversion='$xs_apiversion'
20753 yaccflags='$yaccflags'
20758 : Add in command line options if available
20759 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
20761 : add special variables
20762 $test -f $src/patchlevel.h && \
20763 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
20764 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
20765 echo "PERL_CONFIG_SH=true" >>config.sh
20767 : propagate old symbols
20768 if $test -f UU/config.sh; then
20769 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
20770 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
20771 $sort | $uniq -u >UU/oldsyms
20772 set X `cat UU/oldsyms`
20778 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
20780 echo "# Variables propagated from previous config.sh file." >>config.sh
20781 for sym in `cat UU/oldsyms`; do
20782 echo " Propagating $hint variable "'$'"$sym..."
20783 eval 'tmp="$'"${sym}"'"'
20785 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
20791 : Finish up by extracting the .SH files
20795 echo "Extraction done."
20805 If you'd like to make any changes to the config.sh file before I begin
20806 to configure things, do it as a shell escape now (e.g. !vi config.sh).
20809 rp="Press return or use a shell escape to edit config.sh:"
20814 *) : in case they cannot read
20815 sh 1>&4 -c "$ans";;
20820 : if this fails, just run all the .SH files by hand
20829 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
20836 Now you need to generate make dependencies by running "$make depend".
20837 You might prefer to run it in background: "$make depend > makedepend.out &"
20838 It can take a while, so you might not want to run it right now.
20843 rp="Run $make depend now?"
20847 $make depend && echo "Now you must run '$make'."
20850 echo "You must run '$make depend' then '$make'."
20853 elif test -f [Mm]akefile; then
20855 echo "Now you must run a $make."
20857 echo "Configure done."
20860 if $test -f Policy.sh; then
20863 If you compile $package on a different machine or from a different object
20864 directory, copy the Policy.sh file from this object directory to the
20865 new one before you run Configure -- this will help you with most of
20866 the policy defaults.
20870 if $test -f config.msg; then
20871 echo "Hmm. I also noted the following information while running:"
20873 $cat config.msg >&4
20876 $rm -f kit*isdone ark*isdone