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 Sep 13 16:29:01 METDST 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
373 endhostent_r_proto=''
379 endprotoent_r_proto=''
385 endservent_r_proto=''
435 gethostbyaddr_r_proto=''
437 gethostbyname_r_proto=''
439 gethostent_r_proto=''
451 getnetbyaddr_r_proto=''
453 getnetbyname_r_proto=''
467 d_getprotobyname_r=''
468 getprotobyname_r_proto=''
469 d_getprotobynumber_r=''
470 getprotobynumber_r_proto=''
472 getprotoent_r_proto=''
484 getservbyname_r_proto=''
486 getservbyport_r_proto=''
488 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
1863 case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
1864 fooxy) trnl='\n\r' ;;
1867 if test X"$trnl" = X; then
1870 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1876 : compute the number of columns on the terminal for proper question formatting
1881 : set up the echo used in my read
1882 myecho="case \"\$xxxm\" in
1883 '') echo $n \"\$rp $c\" >&4;;
1885 '') echo $n \"[\$xxxm] $c\";;
1887 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
1889 echo $n \"[\$xxxm] $c\" >&4
1891 echo $n \"\$rp [\$xxxm] $c\" >&4
1897 : now set up to do reads with possible shell escape and default assignment
1903 case "\$fastread" in
1904 yes) case "\$dflt" in
1907 case "\$silent-\$rp" in
1912 *) case "\$silent" in
1913 true) case "\$rp" in
1918 while expr "X\$ans" : "X!" >/dev/null; do
1922 aok=''; eval "ans=\\"\$answ\\"" && aok=y
1930 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
1939 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
1944 echo "(OK, I'll run with -d after this question.)" >&4
1947 echo "*** Sorry, \$1 not supported yet." >&4
1957 echo "*** Substitution done -- please confirm."
1959 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
1964 echo "*** Error -- try again."
1971 case "\$ans\$xxxm\$nostick" in
1983 : create .config dir to save info across Configure sessions
1984 test -d ../.config || mkdir ../.config
1985 cat >../.config/README <<EOF
1986 This directory created by Configure to save information that should
1987 persist across sessions for $package.
1989 You may safely delete it if you wish.
1992 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
1994 $define|true|[yY]*) ;;
1995 *) case "$xversion" in
1998 *** WHOA THERE!!! ***
2000 This is an UNSTABLE DEVELOPMENT release.
2001 The version of this $package distribution is $xversion, that is, odd,
2002 (as opposed to even) and that signifies a development release.
2003 If you want a maintenance release, you want an even-numbered version.
2005 Do ***NOT*** install this into production use.
2006 Data corruption and crashes are possible.
2008 It is most seriously suggested that you do not continue any further
2009 unless you want to help in developing and debugging Perl.
2011 If you *still* want to build perl, you can answer 'y' now,
2012 or pass -Dusedevel to Configure.
2015 rp='Do you really want to continue?'
2019 [yY]) echo >&4 "Okay, continuing."
2020 usedevel="$define" ;;
2021 *) echo >&4 "Okay, bye."
2031 case "$versiononly" in
2032 '') versiononly="$define" ;;
2034 case "$installusrbinperl" in
2035 '') installusrbinperl="$undef" ;;
2040 : general instructions
2043 user=`(logname) 2>/dev/null`
2045 '') user=`whoami 2>&1`;;
2047 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2050 rp='Would you like to see the instructions?'
2061 This installation shell script will examine your system and ask you questions
2062 to determine how the perl5 package should be installed. If you get
2063 stuck on a question, you may use a ! shell escape to start a subshell or
2064 execute a command. Many of the questions will have default answers in square
2065 brackets; typing carriage return will give you the default.
2067 On some of the questions which ask for file or directory names you are allowed
2068 to use the ~name construct to specify the login directory belonging to "name",
2069 even if you don't have a shell which knows about that. Questions where this is
2070 allowed will be marked "(~name ok)".
2074 dflt='Type carriage return to continue'
2078 The prompter used in this script allows you to use shell variables and
2079 backticks in your answers. You may use $1, $2, etc... to refer to the words
2080 in the default answer, as if the default line was a set of arguments given to a
2081 script shell. This means you may also use $* to repeat the whole default line,
2082 so you do not have to re-type everything to add something to the default.
2084 Everytime there is a substitution, you will have to confirm. If there is an
2085 error (e.g. an unmatched backtick), the default answer will remain unchanged
2086 and you will be prompted again.
2088 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2089 the questions and use the computed defaults (or the previous answers if there
2090 was already a config.sh file). Type 'Configure -h' for a list of options.
2091 You may also start interactively and then answer '& -d' at any prompt to turn
2092 on the non-interactive behaviour for the remainder of the execution.
2098 Much effort has been expended to ensure that this shell script will run on any
2099 Unix system. If despite that it blows up on yours, your best bet is to edit
2100 Configure and run it again. If you can't run Configure for some reason,
2101 you'll have to generate a config.sh file by hand. Whatever problems you
2102 have, let me (perlbug@perl.org) know how I blew it.
2104 This installation script affects things in two ways:
2106 1) it may do direct variable substitutions on some of the files included
2108 2) it builds a config.h file for inclusion in C programs. You may edit
2109 any of these files as the need arises after running this script.
2111 If you make a mistake on a question, there is no easy way to back up to it
2112 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2113 files. Configure will offer to let you do this before it runs the SH files.
2116 dflt='Type carriage return to continue'
2118 case "$firsttime" in
2119 true) echo $user >>../.config/instruct;;
2123 : find out where common programs are
2125 echo "Locating common programs..." >&4
2138 if test -d \$dir/\$thing; then
2144 for thisthing in \$dir/\$thing; do
2145 : just loop through to pick last item
2147 if test -f \$thisthing; then
2150 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2153 elif test -f \$dir/\$thing.exe; then
2154 if test -n "$DJGPP"; then
2155 echo \$dir/\$thing.exe
2157 : on Eunice apparently
2210 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2211 pth="$pth /lib /usr/lib"
2212 for file in $loclist; do
2216 if test -f "$xxx"; then
2219 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2220 xxx=`./loc $file $file $pth`
2223 '') xxx=`./loc $file $file $pth`;;
2224 *) xxx=`./loc $xxx $xxx $pth`;;
2226 eval $file=$xxx$_exe
2230 echo $file is in $xxx.
2233 echo $file is in $xxx.
2236 echo "I don't know where '$file' is, and my life depends on it." >&4
2237 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2243 echo "Don't worry if any of the following aren't found..."
2245 for file in $trylist; do
2249 if test -f "$xxx"; then
2252 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2253 xxx=`./loc $file $file $pth`
2256 '') xxx=`./loc $file $file $pth`;;
2257 *) xxx=`./loc $xxx $xxx $pth`;;
2259 eval $file=$xxx$_exe
2263 echo $file is in $xxx.
2266 echo $file is in $xxx.
2269 echo "I don't see $file out there, $say."
2276 echo "Substituting grep for egrep."
2283 echo "Substituting cp for ln."
2292 echo "I can't find make or gmake, and my life depends on it." >&4
2293 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2301 *) # We can't have osname yet.
2302 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2303 # Assume that gmake, if found, is definitely GNU make
2304 # and prefer it over the system make.
2305 echo "Substituting gmake for make."
2313 echo "Hopefully test is built into your sh."
2316 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2317 echo "Using the test built into your sh."
2325 echo "Hopefully echo is built into your sh."
2330 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2331 $echo $n "hi there$c" >foo1
2332 echo $n "hi there$c" >foo2
2333 if cmp foo1 foo2 >/dev/null 2>&1; then
2334 echo "They are compatible. In fact, they may be identical."
2341 They are not compatible! You are probably running ksh on a non-USG system.
2342 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2343 have echo built in and we may have to run some Bourne shell scripts. That
2344 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2347 $echo $n "The star should be here-->$c"
2357 cat <<'EOSC' >>trygcc
2362 int main(int argc, char *argv[]) {
2366 if $cc -o try $ccflags $ldflags try.c; then
2369 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2375 case "`$cc -v -c try.c 2>&1`" in
2378 if $test X"$trygcc" = Xyes; then
2379 if gcc -o try -c try.c; then
2381 echo "You seem to have a working gcc, though." >&4
2382 rp="Would you like to use it?"
2384 if $test -f myread; then
2387 if $test -f UU/myread; then
2390 echo "Cannot find myread, sorry. Aborting." >&2
2395 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2396 if $test -f usethreads.cbu; then
2399 *** However, any setting of the C compiler flags (e.g. for thread support)
2400 *** has been lost. It may be necessary to pass -Dcc=gcc to Configure
2401 *** (together with e.g. -Dusethreads).
2417 cat <<'EOSC' >>checkcc
2422 int main(int argc, char *argv[]) {
2426 if $cc -o try $ccflags $ldflags try.c; then
2429 if $test X"$despair" = Xyes; then
2430 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2433 You need to find a working C compiler.
2434 Either (purchase and) install the C compiler supplied by your OS vendor,
2435 or for a free C compiler try http://gcc.gnu.org/
2436 I cannot continue any further, aborting.
2445 : determine whether symbolic links are supported
2448 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2449 echo "Symbolic links are supported." >&4
2452 echo "Symbolic links are NOT supported." >&4
2457 : determine whether symbolic links are supported
2461 echo "Checking how to test for symbolic links..." >&4
2463 if $test "X$issymlink" = X; then
2465 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2466 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2468 if test $? = 0; then
2471 echo "Your builtin 'test -h' may be broken." >&4
2474 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2477 if test -f "$p/$test"; then
2486 echo "Trying external '$test -h'." >&4
2487 issymlink="$test -h"
2488 if $test ! -h sym >/dev/null 2>&1; then
2489 echo "External '$test -h' is broken, too." >&4
2497 if $test "X$issymlink" = X; then
2498 if $test -L sym 2>/dev/null; then
2499 issymlink="$test -L"
2500 echo "The builtin '$test -L' worked." >&4
2503 if $test "X$issymlink" != X; then
2504 echo "You can test for symbolic links with '$issymlink'." >&4
2506 echo "I do not know how you can test for symbolic links." >&4
2510 *) echo "No symbolic links, so not testing for their testing..." >&4
2516 case "$mksymlinks" in
2519 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2522 *) case "$lns:$issymlink" in
2523 *"ln"*" -s:"*"test -"?)
2524 echo "Creating the symbolic links..." >&4
2525 echo "(First creating the subdirectories...)" >&4
2527 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2529 test -z "$directory" && break
2533 if test ! -d t/base; then
2534 echo "Failed to create the subdirectories. Aborting." >&4
2537 echo "(Then creating the symlinks...)" >&4
2538 awk '{print $1}' $src/MANIFEST | while true; do
2540 test -z "$filename" && break
2541 if test -f $filename; then
2542 if $issymlink $filename; then
2546 if test -f $filename; then
2547 echo "$filename already exists, not symlinking."
2549 ln -s $src/$filename $filename
2553 if test ! -f t/base/lex.t; then
2554 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2559 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2568 case "$usecrosscompile" in
2570 $echo "Cross-compiling..."
2573 *-*-gcc) # A cross-compiling gcc, probably.
2574 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2576 # leave out ld, choosing it is more complex
2578 ranlib=$targetarch-ranlib
2579 $echo 'extern int foo;' > try.c
2580 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2582 if $test $# -gt 0; then
2584 incpth="`$echo $incpth|$sed 's/^ //'`"
2585 echo "Guessing incpth '$incpth'." >&4
2587 j="`$echo $i|$sed 's,/include$,/lib,'`"
2588 if $test -d $j; then
2592 libpth="`$echo $libpth|$sed 's/^ //'`"
2593 echo "Guessing libpth '$libpth'." >&4
2598 case "$targetarch" in
2599 '') echo "Targetarch not defined." >&4; croak=y ;;
2600 *) echo "Using targetarch $targetarch." >&4 ;;
2603 '') echo "Incpth not defined." >&4; croak=y ;;
2604 *) echo "Using incpth '$incpth'." >&4 ;;
2607 '') echo "Libpth not defined." >&4; croak=y ;;
2608 *) echo "Using libpth '$libpth'." >&4 ;;
2611 '') for i in $incpth; do
2612 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2614 echo "Guessing usrinc $usrinc." >&4
2619 '') echo "Usrinc not defined." >&4; croak=y ;;
2622 *) echo "Using usrinc $usrinc." >&4 ;;
2624 case "$targethost" in
2625 '') echo "Targethost not defined." >&4; croak=y ;;
2626 *) echo "Using targethost $targethost." >&4
2631 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2634 /*) run=$src/Cross/run
2635 targetmkdir=$src/Cross/mkdir
2637 from=$src/Cross/from
2639 *) pwd=`$test -f ../Configure & cd ..; pwd`
2641 targetmkdir=$pwd/Cross/mkdir
2643 from=$pwd/Cross/from
2646 case "$targetrun" in
2647 '') targetrun=ssh ;;
2652 case "$targetfrom" in
2653 '') targetfrom=scp ;;
2657 from=$from-$targetfrom
2658 case "$targetdir" in
2660 echo "Guessing targetdir $targetdir." >&4
2663 case "$targetuser" in
2665 echo "Guessing targetuser $targetuser." >&4
2668 case "$targetfrom" in
2672 case "$targetrun" in
2684 '') cwd=$targetdir ;;
2688 if $test ! -f \$exe.xok; then
2692 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2695 *) echo "Unknown targetrun '$targetrun'" >&4
2699 case "$targetmkdir" in
2701 cat >$targetmkdir <<EOF
2703 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2705 $chmod a+rx $targetmkdir
2707 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2719 $targetmkdir \`dirname \$f\`
2720 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2723 $targetmkdir $targetdir/\`dirname \$f\`
2724 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2737 $mkdir -p $targetdir/\`dirname \$f\`
2738 $cp \$f $targetdir/\$f || exit 1
2741 $targetmkdir $targetdir/\`dirname \$f\`
2742 $cp \$f $targetdir/\$f || exit 1
2749 *) echo "Unknown targetto '$targetto'" >&4
2753 case "$targetfrom" in
2760 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2765 cp) cat >$from <<EOF
2770 cp $targetdir/\$f . || exit 1
2775 *) echo "Unknown targetfrom '$targetfrom'" >&4
2779 if $test ! -f $run; then
2780 echo "Target 'run' script '$run' not found." >&4
2784 if $test ! -f $to; then
2785 echo "Target 'to' script '$to' not found." >&4
2789 if $test ! -f $from; then
2790 echo "Target 'from' script '$from' not found." >&4
2794 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2798 Using '$run' for remote execution,
2799 and '$from' and '$to'
2800 for remote file transfer.
2806 usecrosscompile='undef'
2811 : see whether [:lower:] and [:upper:] are supported character classes
2813 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2815 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2819 *) # There is a discontinuity in EBCDIC between 'I' and 'J'
2820 # (0xc9 and 0xd1), therefore that is a nice testing point.
2821 if test "X$up" = X -o "X$low" = X; then
2822 case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
2828 if test "X$up" = X -o "X$low" = X; then
2829 case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
2835 if test "X$up" = X -o "X$low" = X; then
2836 case "`echo IJ | od -x 2>/dev/null`" in
2838 echo "Hey, this might be EBCDIC." >&4
2839 if test "X$up" = X -o "X$low" = X; then
2840 case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2841 ij) up='[A-IJ-RS-Z]'
2846 if test "X$up" = X -o "X$low" = X; then
2847 case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2857 case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
2859 echo "Using $up and $low to convert case." >&4
2862 echo "I don't know how to translate letters from upper to lower case." >&4
2863 echo "Your tr is not acting any way I know of." >&4
2867 : set up the translation script tr, must be called with ./tr of course
2871 '[A-Z][a-z]') exec $tr '$up' '$low';;
2872 '[a-z][A-Z]') exec $tr '$low' '$up';;
2879 : Try to determine whether config.sh was made on this system
2880 case "$config_sh" in
2882 myuname=`$uname -a 2>/dev/null`
2883 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2884 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2885 # because the A-Z/a-z are not consecutive.
2886 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2887 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2888 newmyuname="$myuname"
2890 case "$knowitall" in
2892 if test -f ../config.sh; then
2893 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2894 eval "`grep myuname= ../config.sh`"
2896 if test "X$myuname" = "X$newmyuname"; then
2904 : Get old answers from old config file if Configure was run on the
2905 : same system, otherwise use the hints.
2908 if test -f config.sh; then
2910 rp="I see a config.sh file. Shall I use it to set the defaults?"
2913 n*|N*) echo "OK, I'll ignore it."
2914 mv config.sh config.sh.old
2915 myuname="$newmyuname"
2917 *) echo "Fetching default answers from your old config.sh file..." >&4
2925 : Older versions did not always set $sh. Catch re-use of such
2935 if test ! -f config.sh; then
2938 First time through, eh? I have some defaults handy for some systems
2939 that need some extra help getting the Configure answers right:
2942 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2944 : Half the following guesses are probably wrong... If you have better
2945 : tests or hints, please send them to perlbug@perl.org
2946 : The metaconfig authors would also appreciate a copy...
2947 $test -f /irix && osname=irix
2948 $test -f /xenix && osname=sco_xenix
2949 $test -f /dynix && osname=dynix
2950 $test -f /dnix && osname=dnix
2951 $test -f /lynx.os && osname=lynxos
2952 $test -f /unicos && osname=unicos && osvers=`$uname -r`
2953 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
2954 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
2955 $test -f /bin/mips && /bin/mips && osname=mips
2956 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
2957 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
2958 $test -d /usr/apollo/bin && osname=apollo
2959 $test -f /etc/saf/_sactab && osname=svr4
2960 $test -d /usr/include/minix && osname=minix
2961 $test -f /system/gnu_library/bin/ar.pm && osname=vos
2962 if $test -d /MachTen -o -d /MachTen_Folder; then
2964 if $test -x /sbin/version; then
2965 osvers=`/sbin/version | $awk '{print $2}' |
2966 $sed -e 's/[A-Za-z]$//'`
2967 elif $test -x /usr/etc/version; then
2968 osvers=`/usr/etc/version | $awk '{print $2}' |
2969 $sed -e 's/[A-Za-z]$//'`
2975 $test -f /sys/posix.dll &&
2976 $test -f /usr/bin/what &&
2977 set X `/usr/bin/what /sys/posix.dll` &&
2978 $test "$3" = UWIN &&
2982 if $test -f $uname; then
2990 umips) osname=umips ;;
2993 [23]100) osname=mips ;;
2994 next*) osname=next ;;
2996 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
2997 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
3000 elif $test -f /etc/kconfig; then
3002 if test "$lns" = "$ln -s"; then
3004 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3006 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3013 if test -n "$DJGPP"; then
3022 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3024 'not found') osvers="$4"."$3" ;;
3025 '<3240'|'<>3240') osvers=3.2.0 ;;
3026 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3027 '=3250'|'>3250') osvers=3.2.5 ;;
3031 bsd386) osname=bsd386
3034 cygwin*) osname=cygwin
3037 *dc.osx) osname=dcosx
3043 domainos) osname=apollo
3049 dynixptx*) osname=dynixptx
3050 osvers=`echo "$4"|sed 's/^v//'`
3052 freebsd) osname=freebsd
3054 genix) osname=genix ;;
3056 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3072 netbsd*) osname=netbsd
3075 news-os) osvers="$3"
3077 4*) osname=newsos4 ;;
3081 next*) osname=next ;;
3082 nonstop-ux) osname=nonstopux ;;
3083 openbsd) osname=openbsd
3086 POSIX-BC | posix-bc ) osname=posix-bc
3089 powerux | power_ux | powermax_os | powermaxos | \
3090 powerunix | power_unix) osname=powerux
3096 solaris) osname=solaris
3098 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3105 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3109 titanos) osname=titanos
3118 ultrix) osname=ultrix
3121 osf1|mls+) case "$5" in
3124 osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3127 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3130 hp*) osname=hp_osf1 ;;
3131 mips) osname=mips_osf1 ;;
3134 unixware) osname=svr5
3142 $2) case "$osname" in
3146 : svr4.x or possibly later
3156 if test -f /stand/boot ; then
3157 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3158 if test -n "$INITPROG" -a -f "$INITPROG"; then
3159 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3160 if test -n "$isesix"; then
3168 *) if test -f /etc/systemid; then
3170 set `echo $3 | $sed 's/\./ /g'` $4
3171 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3173 elif $test -f $src/hints/sco_$1_$2.sh; then
3175 elif $test -f $src/hints/sco_$1.sh; then
3180 '') : Still unknown. Probably a generic Sys V.
3189 *) case "$osname" in
3190 '') : Still unknown. Probably a generic BSD.
3198 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3199 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3200 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3203 $rm -f UU/kernel.what
3204 elif test -d c:/.; then
3211 case "$targetarch" in
3214 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3219 : Now look for a hint file osname_osvers, unless one has been
3220 : specified already.
3223 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3224 : Also try without trailing minor version numbers.
3225 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3226 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3227 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3228 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3231 *) case "$osvers" in
3234 *) if $test -f $src/hints/$file.sh ; then
3236 elif $test -f $src/hints/$xfile.sh ; then
3238 elif $test -f $src/hints/$xxfile.sh ; then
3240 elif $test -f $src/hints/$xxxfile.sh ; then
3242 elif $test -f $src/hints/$xxxxfile.sh ; then
3244 elif $test -f "$src/hints/${osname}.sh" ; then
3253 if $test -f Policy.sh ; then
3256 none) dflt="Policy" ;;
3257 *) dflt="Policy $dflt" ;;
3262 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3266 if $test -f Policy.sh ; then
3269 There's also a Policy hint file available, which should make the
3270 site-specific (policy) questions easier to answer.
3277 You may give one or more space-separated answers, or "none" if appropriate.
3278 A well-behaved OS will have no hints, so answering "none" or just "Policy"
3279 is a good thing. DO NOT give a wrong version or a wrong OS.
3283 rp="Which of these apply, if any?"
3286 for file in $tans; do
3287 if $test X$file = XPolicy -a -f Policy.sh; then
3289 $cat Policy.sh >> UU/config.sh
3290 elif $test -f $src/hints/$file.sh; then
3291 . $src/hints/$file.sh
3292 $cat $src/hints/$file.sh >> UU/config.sh
3293 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3296 : Give one chance to correct a possible typo.
3297 echo "$file.sh does not exist"
3299 rp="hint to use instead?"
3301 for file in $ans; do
3302 if $test -f "$src/hints/$file.sh"; then
3303 . $src/hints/$file.sh
3304 $cat $src/hints/$file.sh >> UU/config.sh
3305 elif $test X$ans = X -o X$ans = Xnone ; then
3308 echo "$file.sh does not exist -- ignored."
3315 : Remember our hint file for later.
3316 if $test -f "$src/hints/$file.sh" ; then
3326 echo "Fetching default answers from $config_sh..." >&4
3330 cp $config_sh config.sh 2>/dev/null
3340 test "$override" && . ./optdef.sh
3342 : Restore computed paths
3343 for file in $loclist $trylist; do
3344 eval $file="\$_$file"
3349 Configure uses the operating system name and version to set some defaults.
3350 The default value is probably right if the name rings a bell. Otherwise,
3351 since spelling matters for me, either accept the default or answer "none"
3358 ''|' '|none) dflt=none ;;
3359 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3362 *) dflt="$osname" ;;
3364 rp="Operating system name?"
3368 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3374 ''|' '|none) dflt=none ;;
3375 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3376 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3378 ''|' ') dflt=none ;;
3383 *) dflt="$osvers" ;;
3385 rp="Operating system version?"
3395 : who configured the system
3396 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3397 cf_by=`(logname) 2>/dev/null`
3400 cf_by=`(whoami) 2>/dev/null`
3402 "") cf_by=unknown ;;
3406 : set up the script used to warn in case of inconsistency
3413 echo "*** WHOA THERE!!! ***" >&4
3414 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
3415 rp=" Keep the $hint value?"
3418 y) td=$was; tu=$was;;
3422 : function used to set $1 to $val
3423 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
3425 $define$undef) . ./whoa; eval "$var=\$td";;
3426 $undef$define) . ./whoa; eval "$var=\$tu";;
3427 *) eval "$var=$val";;
3431 $define|true|[yY]*) dflt='y';;
3436 Perl can be built to use the SOCKS proxy protocol library. To do so,
3437 Configure must be run with -Dusesocks. If you use SOCKS you also need
3438 to use the PerlIO abstraction layer, this will be implicitly selected.
3440 If this doesn't make any sense to you, just accept the default '$dflt'.
3442 rp='Build Perl for SOCKS?'
3445 y|Y) val="$define" ;;
3452 $define|true|[yY]*) useperlio="$define";;
3455 case "$useperlio" in
3456 $define|true|[yY]*|'') dflt='y';;
3461 Previous version of $package used the standard IO mechanisms as
3462 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
3463 alternate IO mechanisms via the PerlIO abstraction layer, but the
3464 stdio mechanism is still available if needed. The abstraction layer
3465 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
3466 Using PerlIO with sfio may cause problems with some extension modules.
3468 If this doesn't make any sense to you, just accept the default '$dflt'.
3470 rp='Use the PerlIO abstraction layer?'
3477 echo "Ok, doing things the stdio way."
3486 case "$useperlio" in
3487 $define|true|[yY]*) ;;
3490 You are using the SOCKS proxy protocol library which means that you
3491 should also use the PerlIO layer. You may be headed for trouble.
3500 case "$usethreads" in
3501 $define|true|[yY]*) dflt='y';;
3502 *) # Catch case where user specified ithreads or 5005threads but
3503 # forgot -Dusethreads (A.D. 4/2002)
3504 case "$useithreads$use5005threads" in
3506 case "$useperlio" in
3507 "$define") dflt='y' ;;
3517 Perl can be built to take advantage of threads on some systems.
3518 To do so, Configure can be run with -Dusethreads.
3520 Note that Perl built with threading support runs slightly slower
3521 and uses more memory than plain Perl. The current implementation
3522 is believed to be stable, but it is fairly new, and so should be
3523 treated with caution.
3525 If this doesn't make any sense to you, just accept the default '$dflt'.
3527 rp='Build a threading Perl?'
3530 y|Y) val="$define" ;;
3536 case "$usethreads" in
3540 Since release 5.6, Perl has had two different threading implementations,
3541 the newer interpreter-based version (ithreads) with one interpreter per
3542 thread, and the older 5.005 version (5005threads).
3543 The 5005threads version is effectively unmaintained and will probably be
3544 removed in Perl 5.10, so there should be no need to build a Perl using it
3545 unless needed for backwards compatibility with some existing 5.005threads
3549 : Default to ithreads unless overridden on command line or with
3552 case "$use5005threads" in
3553 $define|true|[yY]*) dflt='n';;
3555 case "$useithreads" in
3556 $undef|false|[nN]*) dflt='n';;
3558 rp='Use the newer interpreter-based ithreads?'
3561 y|Y) val="$define" ;;
3566 : Now set use5005threads to the opposite value.
3567 case "$useithreads" in
3568 $define) val="$undef" ;;
3575 useithreads="$undef"
3576 use5005threads="$undef"
3580 case "$useithreads$use5005threads" in
3584 You cannot have both the ithreads and the 5.005 threads enabled
3585 at the same time. Disabling the 5.005 threads since they are
3586 much less stable than the ithreads.
3589 use5005threads="$undef"
3593 if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then
3596 *** To build with ithreads you must also use the PerlIO layer.
3597 *** Cannot continue, aborting.
3603 case "$d_oldpthreads" in
3604 '') : Configure tests would be welcome here. For now, assume undef.
3606 *) val="$d_oldpthreads" ;;
3612 case "$usethreads" in
3613 "$define"|true|[yY]*)
3614 : Look for a hint-file generated 'call-back-unit'. If the
3615 : user has specified that a threading perl is to be built,
3616 : we may need to set or change some other defaults.
3617 if $test -f usethreads.cbu; then
3618 echo "Your platform has some specific hints for threaded builds, using them..."
3622 (Your platform doesn't have any specific hints for threaded builds.
3623 Assuming POSIX threads, then.)
3631 Perl can be built so that multiple Perl interpreters can coexist
3632 within the same Perl executable.
3635 case "$useithreads" in
3638 This multiple interpreter support is required for interpreter-based threads.
3642 *) case "$usemultiplicity" in
3643 $define|true|[yY]*) dflt='y';;
3647 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
3648 rp='Build Perl for multiplicity?'
3651 y|Y) val="$define" ;;
3660 case "$usemorebits" in
3661 "$define"|true|[yY]*)
3662 use64bitint="$define"
3663 uselongdouble="$define"
3664 usemorebits="$define"
3666 *) usemorebits="$undef"
3670 : make some quick guesses about what we are up against
3672 $echo $n "Hmm... $c"
3682 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
3683 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
3685 echo "Looks kind of like an OSF/1 system, but we'll see..."
3687 elif test `echo abc | $tr a-z A-Z` = Abc ; then
3688 xxx=`./loc addbib blurfl $pth`
3689 if $test -f $xxx; then
3690 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3694 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3695 echo "Looks kind of like an extended USG system, but we'll see..."
3697 echo "Looks kind of like a USG system, but we'll see..."
3701 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3702 echo "Looks kind of like a BSD system, but we'll see..."
3706 echo "Looks kind of like a Version 7 system, but we'll see..."
3709 case "$eunicefix" in
3712 There is, however, a strange, musty smell in the air that reminds me of
3713 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3717 : it so happens the Eunice I know will not run shell scripts in Unix format
3721 echo "Congratulations. You aren't running Eunice."
3725 : Detect OS2. The p_ variable is set above in the Head.U unit.
3726 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
3727 : semicolon as a patch separator
3732 I have the feeling something is not exactly right, however...don't tell me...
3733 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3734 (Or you may be running DOS with DJGPP.)
3739 if test -f /xenix; then
3740 echo "Actually, this looks more like a XENIX system..."
3745 echo "It's not Xenix..."
3750 if test -f /venix; then
3751 echo "Actually, this looks more like a VENIX system..."
3758 echo "Nor is it Venix..."
3761 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3762 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3769 rp="Use which C compiler?"
3773 : See if they have not cc but they do have gcc
3775 : Look for a hint-file generated 'call-back-unit'. Now that the
3776 : user has specified the compiler, we may need to set or change some
3778 if $test -f cc.cbu; then
3784 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3790 printf("%s\n", __VERSION__);
3792 printf("%s\n", "1");
3798 if $cc -o try $ccflags $ldflags try.c; then
3799 gccversion=`$run ./try`
3800 case "$gccversion" in
3801 '') echo "You are not using GNU cc." ;;
3802 *) echo "You are using GNU cc $gccversion."
3808 echo "*** WHOA THERE!!! ***" >&4
3809 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3810 case "$knowitall" in
3812 echo " You'd better start hunting for one and let me know about it." >&4
3818 case "$gccversion" in
3819 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3821 case "$gccversion" in
3822 '') gccosandvers='' ;;
3823 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3824 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3826 case "$gccosandvers" in
3827 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3828 $osname$osvers) ;; # looking good
3829 $osname*) cat <<EOM >&4
3831 *** WHOA THERE!!! ***
3833 Your gcc has not been compiled for the exact release of
3834 your operating system ($gccosandvers versus $osname$osvers).
3836 In general it is a good idea to keep gcc synchronized with
3837 the operating system because otherwise serious problems
3838 may ensue when trying to compile software, like Perl.
3840 I'm trying to be optimistic here, though, and will continue.
3841 If later during the configuration and build icky compilation
3842 problems appear (headerfile conflicts being the most common
3843 manifestation), I suggest reinstalling the gcc to match
3844 your operating system release.
3848 *) gccosandvers='' ;; # failed to parse, better be silent
3856 # gcc 3.* complain about adding -Idirectories that they already know about,
3857 # so we will take those off from locincpth.
3858 case "$gccversion" in
3860 echo "main(){}">try.c
3861 for incdir in $locincpth; do
3862 warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
3863 grep '^cc1: warning: changing search order '`
3864 if test "X$warn" != X; then
3865 locincpth=`echo " $locincpth " | sed "s! $incdir ! !"`
3871 : decide how portable to be. Allow command line overrides.
3872 case "$d_portable" in
3874 *) d_portable="$define" ;;
3877 : set up shell script to do ~ expansion
3883 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3886 if $test -f /bin/csh; then
3887 /bin/csh -f -c "glob \$1"
3892 name=\`$expr x\$1 : '..\([^/]*\)'\`
3893 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3894 if $test ! -d "\$dir"; then
3896 echo "\$me: can't locate home directory for: \$name" >&2
3901 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3917 : now set up to get a file name
3921 cat <<'EOSC' >>getfile
3937 : getfile will accept an answer from the comma-separated list
3938 : enclosed in parentheses even if it does not meet other criteria.
3939 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3940 fn=`echo $fn | sed 's/(.*)//'`
3946 loc_file=`expr $fn : '.*:\(.*\)'`
3947 fn=`expr $fn : '\(.*\):.*'`
3955 */*) fullpath=true;;
3964 *e*) exp_file=true;;
3967 *p*) nopath_ok=true;;
3972 *d*) type='Directory';;
3973 *l*) type='Locate';;
3978 Locate) what='File';;
3983 case "$d_portable" in
3991 while test "$type"; do
3996 true) rp="$rp (~name ok)";;
3999 if test -f UU/getfile.ok && \
4000 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
4019 value=`UU/filexp $ans`
4022 if test "$ans" != "$value"; then
4023 echo "(That expands to $value on this system.)"
4037 /*) value="$ansexp" ;;
4038 [a-zA-Z]:/*) value="$ansexp" ;;
4043 echo "I shall only accept a full path name, as in /bin/ls." >&4
4044 echo "Use a ! shell escape if you wish to check pathnames." >&4
4047 echo "Please give a full path name, starting with slash." >&4
4050 echo "Note that using ~name is ok provided it expands well." >&4
4063 for fp in $gfpth; do
4064 if test "X$fp" = X.; then
4069 if test -f "$pf"; then
4071 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
4073 echo "($value is not a plain file, but that's ok.)"
4076 if test X"$type" = X; then
4083 for fp in $gfpth; do
4084 if test "X$fp" = X.; then
4089 direxp="$fp/$ansexp"
4091 if test -d "$direxp"; then
4099 if test -d "$ansexp"; then
4100 echo "(Looking for $loc_file in directory $value.)"
4101 value="$value/$loc_file"
4102 ansexp="$ansexp/$loc_file"
4104 if test -f "$ansexp"; then
4107 case "$nopath_ok" in
4108 true) case "$value" in
4110 *) echo "Assuming $value will be in people's path."
4126 if test "$fastread" = yes; then
4131 rp="$what $value doesn't exist. Use that name anyway?"
4150 test "X$gfpthkeep" != Xy && gfpth=""
4153 : What should the include directory be ?
4155 $echo $n "Hmm... $c"
4159 if $test -f /bin/mips && /bin/mips; then
4160 echo "Looks like a MIPS system..."
4161 $cat >usr.c <<'EOCP'
4162 #ifdef SYSTYPE_BSD43
4166 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4167 dflt='/bsd43/usr/include'
4171 mips_type='System V'
4173 $rm -f usr.c usr.out
4174 echo "and you're compiling with the $mips_type compiler and libraries."
4178 echo "Doesn't look like a MIPS system."
4188 case "$xxx_prompt" in
4191 rp='Where are the include files you want to use?'
4199 : see how we invoke the C preprocessor
4201 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4202 cat <<'EOT' >testcpp.c
4208 if test ! -f cppstdin; then
4209 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4210 # AIX cc -E doesn't show the absolute headerfile
4211 # locations but we'll cheat by using the -M flag.
4212 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
4214 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4217 echo "Keeping your $hint cppstdin wrapper."
4220 wrapper=`pwd`/cppstdin
4224 if $test "X$cppstdin" != "X" && \
4225 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4226 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4228 echo "You used to use $cppstdin $cppminus so we'll use that again."
4230 '') echo "But let's see if we can live without a wrapper..." ;;
4232 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4233 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4235 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4238 echo "(However, $cpprun $cpplast does not work, let's see...)"
4246 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4253 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4254 $cc -E <testcpp.c >testcpp.out 2>&1; \
4255 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4256 echo "Yup, it does."
4259 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4260 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4261 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4262 echo "Yup, it does."
4265 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4266 $cc -P <testcpp.c >testcpp.out 2>&1; \
4267 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4268 echo "Yipee, that works!"
4271 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4272 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4273 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4274 echo "At long last!"
4277 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4278 $cpp <testcpp.c >testcpp.out 2>&1; \
4279 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4283 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4284 $cpp - <testcpp.c >testcpp.out 2>&1; \
4285 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4286 echo "Hooray, it works! I was beginning to wonder."
4289 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4290 $wrapper <testcpp.c >testcpp.out 2>&1; \
4291 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4297 rp="No dice. I can't find a C preprocessor. Name one:"
4301 $x_cpp <testcpp.c >testcpp.out 2>&1
4302 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4303 echo "OK, that will do." >&4
4305 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4320 echo "Perhaps can we force $cc -E using a wrapper..."
4321 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4322 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4328 echo "Nope, we'll have to live without it..."
4342 "$wrapper"|'cppstdin') ;;
4343 *) $rm -f $wrapper;;
4345 $rm -f testcpp.c testcpp.out
4347 : Set private lib path
4350 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4355 '') dlist="$loclibpth $plibpth $glibpth";;
4356 *) dlist="$libpth";;
4359 : Now check and see which directories actually exist, avoiding duplicates
4363 if $test -d $xxx; then
4366 *) libpth="$libpth $xxx";;
4372 Some systems have incompatible or broken versions of libraries. Among
4373 the directories listed in the question below, please remove any you
4374 know not to be holding relevant libraries, and add any that are needed.
4375 Say "none" for none.
4386 rp="Directories to use for library searches?"
4393 : compute shared library extension
4396 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4406 On some systems, shared libraries may be available. Answer 'none' if
4407 you want to suppress searching of shared libraries for the remainder
4408 of this configuration.
4411 rp='What is the file extension used for shared libraries?'
4415 : Define several unixisms.
4416 : Hints files or command line option can be used to override them.
4417 : The convoluted testing is in case hints files set either the old
4420 '') case "$exe_ext" in
4422 *) _exe="$exe_ext" ;;
4427 '') case "$lib_ext" in
4434 '') case "$obj_ext" in
4441 '') case "$path_sep" in
4452 : Which makefile gets called first. This is used by make depend.
4453 case "$firstmakefile" in
4454 '') firstmakefile='makefile';;
4457 : Looking for optional libraries
4459 echo "Checking for optional libraries..." >&4
4464 case "$libswanted" in
4465 '') libswanted='c_s';;
4468 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4474 for thisdir in $libpth $xlibpth; do
4475 test -d $thisdir && libspath="$libspath $thisdir"
4477 for thislib in $libswanted; do
4478 for thisdir in $libspath; do
4480 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4481 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4482 $test -f "$xxx" && eval $libscheck
4483 $test -f "$xxx" && libstyle=shared
4485 if test ! -f "$xxx"; then
4486 xxx=$thisdir/lib$thislib.$so
4487 $test -f "$xxx" && eval $libscheck
4488 $test -f "$xxx" && libstyle=shared
4490 if test ! -f "$xxx"; then
4491 xxx=$thisdir/lib$thislib$_a
4492 $test -f "$xxx" && eval $libscheck
4493 $test -f "$xxx" && libstyle=static
4495 if test ! -f "$xxx"; then
4496 xxx=$thisdir/$thislib$_a
4497 $test -f "$xxx" && eval $libscheck
4498 $test -f "$xxx" && libstyle=static
4500 if test ! -f "$xxx"; then
4501 xxx=$thisdir/lib${thislib}_s$_a
4502 $test -f "$xxx" && eval $libscheck
4503 $test -f "$xxx" && libstyle=static
4504 $test -f "$xxx" && thislib=${thislib}_s
4506 if test ! -f "$xxx"; then
4507 xxx=$thisdir/Slib$thislib$_a
4508 $test -f "$xxx" && eval $libscheck
4509 $test -f "$xxx" && libstyle=static
4511 if $test -f "$xxx"; then
4513 shared) echo "Found -l$thislib (shared)." ;;
4514 static) echo "Found -l$thislib." ;;
4515 *) echo "Found -l$thislib ($libstyle)." ;;
4519 *) dflt="$dflt -l$thislib"
4520 libsfound="$libsfound $xxx"
4522 libsfiles="$libsfiles $yyy"
4523 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4524 case " $libsdirs " in
4526 *) libsdirs="$libsdirs $yyy" ;;
4533 if $test ! -f "$xxx"; then
4534 echo "No -l$thislib."
4545 ' '|'') dflt='none';;
4550 In order to compile $package on your machine, a number of libraries
4551 are usually needed. Include any other special libraries here as well.
4552 Say "none" for none. The default list is almost always right.
4556 rp="What libraries to use?"
4563 : determine optimization, if desired, or use for debug flag also
4565 ' '|$undef) dflt='none';;
4567 *) dflt="$optimize";;
4571 By default, $package compiles with the -O flag to use the optimizer.
4572 Alternately, you might want to use the symbolic debugger, which uses
4573 the -g flag (on traditional Unix systems). Either flag can be
4574 specified here. To use neither flag, specify the word "none".
4577 rp="What optimizer/debugger flag should be used?"
4581 'none') optimize=" ";;
4585 : We will not override a previous value, but we might want to
4586 : augment a hint file
4588 default|recommended)
4589 case "$gccversion" in
4590 1*) dflt='-fpcc-struct-return' ;;
4593 *-g*) dflt="$dflt -DDEBUGGING";;
4595 case "$gccversion" in
4596 2*) if test -d /etc/conf/kconfig.d &&
4597 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
4603 case "$gccversion" in
4607 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
4608 echo 'int main(void) { return 0; }' > gcctest.c
4609 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
4610 echo "Yes, it does." 2>&1
4613 echo "Leaving current flags $ccflags alone." 2>&1
4615 *) dflt="$dflt -fno-strict-aliasing" ;;
4618 echo "Nope, it doesn't, but that's ok." 2>&1
4625 case "$mips_type" in
4626 *BSD*|'') inclwanted="$locincpth $usrinc";;
4627 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
4629 for thisincl in $inclwanted; do
4630 if $test -d $thisincl; then
4631 if $test x$thisincl != x$usrinc; then
4633 *" -I$thisincl "*);;
4634 *) dflt="$dflt -I$thisincl ";;
4640 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
4642 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
4650 *) dflt="$dflt -D$2";;
4654 set signal.h LANGUAGE_C; eval $inctest
4658 ccflags="$ccflags -DSOCKS"
4663 default|recommended) dflt="$ccflags $dflt" ;;
4664 *) dflt="$ccflags";;
4673 Your C compiler may want other flags. For this question you should include
4674 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
4675 but you should NOT include libraries or ld flags like -lwhatever. If you
4676 want $package to honor its debug switch, you should include -DDEBUGGING here.
4677 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
4679 To use no flags, specify the word "none".
4685 rp="Any additional cc flags?"
4692 : the following weeds options from ccflags that are of no interest to cpp
4694 '') cppflags="$ccflags" ;;
4695 *) cppflags="$cppflags $ccflags" ;;
4697 case "$gccversion" in
4698 1*) cppflags="$cppflags -D__GNUC__"
4700 case "$mips_type" in
4702 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4708 echo "Let me guess what the preprocessor flags are..." >&4
4722 *) ftry="$previous $flag";;
4724 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4725 >cpp1.out 2>/dev/null && \
4726 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4727 >cpp2.out 2>/dev/null && \
4728 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4729 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4731 cppflags="$cppflags $ftry"
4741 *-*) echo "They appear to be: $cppflags";;
4743 $rm -f cpp.c cpp?.out
4747 : flags used in final linking phase
4749 '') if ./venix; then
4755 *-posix*) dflt="$dflt -posix" ;;
4758 *) dflt="$ldflags";;
4761 : Try to guess additional flags to pick up local libraries.
4762 for thislibdir in $libpth; do
4763 case " $loclibpth " in
4766 *"-L$thislibdir "*) ;;
4767 *) dflt="$dflt -L$thislibdir" ;;
4779 Your C linker may need flags. For this question you should
4780 include -L/whatever and any other flags used by the C linker, but you
4781 should NOT include libraries like -lwhatever.
4783 Make sure you include the appropriate -L/path flags if your C linker
4784 does not normally search all of the directories you specified above,
4787 To use no flags, specify the word "none".
4791 rp="Any additional ld flags (NOT including libraries)?"
4797 rmlist="$rmlist pdp11"
4801 echo "Checking your choice of C compiler and flags for coherency..." >&4
4802 $cat > try.c <<'EOF'
4804 int main() { printf("Ok\n"); exit(0); }
4806 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
4808 $cat >try.msg <<'EOM'
4809 I've tried to compile and run the following simple program:
4812 $cat try.c >> try.msg
4814 $cat >> try.msg <<EOM
4821 and I got the following output:
4825 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
4826 if $sh -c "$run ./try" >>try.msg 2>&1; then
4830 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4833 cat >> try.msg <<'EOQS'
4834 If $libs contains -lsfio, and sfio is mis-configured, then it
4835 sometimes (apparently) runs and exits with a 0 status, but with no
4836 output! It may have to do with sfio's use of _exit vs. exit.
4839 rp="You have a big problem. Shall I abort Configure"
4846 echo "The program compiled OK, but exited with status $?." >>try.msg
4847 rp="You have a problem. Shall I abort Configure"
4851 echo "I can't compile the test program." >>try.msg
4852 rp="You have a BIG problem. Shall I abort Configure"
4858 case "$knowitall" in
4860 echo "(The supplied flags or libraries might be incorrect.)"
4868 *) echo "Ok. Stopping Configure." >&4
4873 n) echo "OK, that should do.";;
4875 $rm -f try try.* core
4877 : define a shorthand compile call
4881 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
4882 : define a shorthand compile call for compilations that should be ok.
4886 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
4888 : check for lengths of integral types
4892 echo "Checking to see how big your integers are..." >&4
4893 $cat >try.c <<'EOCP'
4897 printf("intsize=%d;\n", (int)sizeof(int));
4898 printf("longsize=%d;\n", (int)sizeof(long));
4899 printf("shortsize=%d;\n", (int)sizeof(short));
4904 if eval $compile_ok && $run ./try > /dev/null; then
4906 echo "Your integers are $intsize bytes long."
4907 echo "Your long integers are $longsize bytes long."
4908 echo "Your short integers are $shortsize bytes long."
4912 Help! I can't compile and run the intsize test program: please enlighten me!
4913 (This is probably a misconfiguration in your system or libraries, and
4914 you really ought to fix it. Still, I'll try anyway.)
4918 rp="What is the size of an integer (in bytes)?"
4922 rp="What is the size of a long integer (in bytes)?"
4926 rp="What is the size of a short integer (in bytes)?"
4934 : check for long long
4936 echo "Checking to see if you have long long..." >&4
4937 echo 'int main() { long long x = 7; return 0; }' > try.c
4939 if eval $compile; then
4941 echo "You have long long."
4944 echo "You do not have long long."
4950 : check for length of long long
4951 case "${d_longlong}${longlongsize}" in
4954 echo "Checking to see how big your long longs are..." >&4
4955 $cat >try.c <<'EOCP'
4959 printf("%d\n", (int)sizeof(long long));
4964 if eval $compile_ok; then
4965 longlongsize=`$run ./try`
4966 echo "Your long longs are $longlongsize bytes long."
4970 echo "(I can't seem to compile the test program. Guessing...)"
4971 rp="What is the size of a long long (in bytes)?"
4975 if $test "X$longsize" = "X$longlongsize"; then
4976 echo "(That isn't any different from an ordinary long.)"
4982 : determine filename position in cpp output
4984 echo "Computing filename position in cpp output for #include directives..." >&4
4986 vos) testaccess=-e ;;
4989 echo '#include <stdio.h>' > foo.c
4992 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
4993 $grep '^[ ]*#.*stdio\.h' | \
4994 while read cline; do
4997 while $test \$# -gt 0; do
4998 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5003 pos=\`expr \$pos + 1\`
5015 *) pos="${fieldn}th";;
5017 echo "Your cpp writes the filename in the $pos field of the line."
5020 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
5023 : locate header file
5028 for usrincdir in $usrinc
5030 if test -f \$usrincdir/\$wanted; then
5031 echo "\$usrincdir/\$wanted"
5035 awkprg='{ print \$$fieldn }'
5036 echo "#include <\$wanted>" > foo\$\$.c
5037 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5038 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5039 while read cline; do
5040 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5042 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5043 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5048 # status = 0: grep returned 0 lines, case statement not executed
5049 # status = 1: headerfile found
5050 # status = 2: while loop executed, no headerfile found
5054 if test \$status -eq 1; then
5061 : define an alternate in-header-list? function
5062 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5063 cont=true; xxf="echo \"<\$1> found.\" >&4";
5064 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5065 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5067 case $# in 4) instead=instead;; *) instead="at last";; esac;
5068 while $test "$cont"; do
5070 var=$2; eval "was=\$$2";
5071 if $test "$xxx" && $test -r "$xxx";
5073 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5076 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5077 set $yyy; shift; shift; yyy=$@;
5078 case $# in 0) cont="";;
5079 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5080 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5081 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5082 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5086 do set $yyy; var=$2; eval "was=\$$2";
5087 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5088 set $yyy; shift; shift; yyy=$@;
5091 : see if inttypes.h is available
5092 : we want a real compile instead of Inhdr because some systems
5093 : have an inttypes.h which includes non-existent headers
5096 #include <inttypes.h>
5098 static int32_t foo32 = 0x12345678;
5102 if eval $compile; then
5103 echo "<inttypes.h> found." >&4
5106 echo "<inttypes.h> NOT found." >&4
5115 echo "Checking to see if you have int64_t..." >&4
5117 #include <sys/types.h>
5118 #$i_inttypes I_INTTYPES
5120 #include <inttypes.h>
5122 int main() { int64_t x = 7; }
5125 if eval $compile; then
5127 echo "You have int64_t."
5130 echo "You do not have int64_t."
5138 echo "Checking which 64-bit integer type we could use..." >&4
5144 val='"unsigned int"'
5149 *) case "$longsize" in
5153 val='"unsigned long"'
5158 *) case "$d_longlong:$longlongsize" in
5163 val='"unsigned long long"'
5168 *) case "$d_int64_t" in
5187 '') echo "Alas, no 64-bit integer types in sight." >&4
5190 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5196 case "$uselonglong" in
5197 "$define"|true|[yY]*)
5200 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5202 use64bitint="$define"
5205 case "$use64bits" in
5206 "$define"|true|[yY]*)
5209 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5211 use64bitint="$define"
5214 case "$use64bitints" in
5215 "$define"|true|[yY]*)
5218 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5220 use64bitint="$define"
5223 case "$use64bitsint" in
5224 "$define"|true|[yY]*)
5227 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5229 use64bitint="$define"
5232 case "$uselonglongs" in
5233 "$define"|true|[yY]*)
5236 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5238 use64bitint="$define"
5241 case "$use64bitsall" in
5242 "$define"|true|[yY]*)
5245 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5247 use64bitall="$define"
5252 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5254 case "$use64bitall" in
5255 "$define"|true|[yY]*) use64bitint="$define" ;;
5261 You have natively 64-bit long integers.
5265 *) case "$use64bitint" in
5266 "$define"|true|[yY]*) dflt='y';;
5275 Perl can be built to take advantage of 64-bit integer types
5276 on some systems. To do so, Configure can be run with -Duse64bitint.
5277 Choosing this option will most probably introduce binary incompatibilities.
5279 If this doesn't make any sense to you, just accept the default '$dflt'.
5280 (The default has been chosen based on your configuration.)
5282 rp='Try to use 64-bit integers, if available?'
5285 [yY]*) val="$define" ;;
5293 case "$use64bitall" in
5294 "$define"|true|[yY]*) dflt='y' ;;
5295 *) case "$longsize" in
5303 You may also choose to try maximal 64-bitness. It means using as much
5304 64-bitness as possible on the platform. This in turn means even more
5305 binary incompatibilities. On the other hand, your platform may not
5306 have any more 64-bitness available than what you already have chosen.
5308 If this doesn't make any sense to you, just accept the default '$dflt'.
5309 (The default has been chosen based on your configuration.)
5311 rp='Try to use maximal 64-bit support, if available?'
5314 [yY]*) val="$define" ;;
5319 case "$use64bitall" in
5321 case "$use64bitint" in
5325 Since you have chosen a maximally 64-bit build, I'm also turning on
5326 the use of 64-bit integers.
5328 use64bitint="$define" ;;
5333 case "$use64bitint" in
5334 "$define"|true|[yY]*)
5335 : Look for a hint-file generated 'call-back-unit'. If the
5336 : user has specified that a 64-bit perl is to be built,
5337 : we may need to set or change some other defaults.
5338 if $test -f use64bitint.cbu; then
5339 echo "Your platform has some specific hints for 64-bit integers, using them..."
5343 4) case "$archname64" in
5344 '') archname64=64int ;;
5351 case "$use64bitall" in
5352 "$define"|true|[yY]*)
5353 : Look for a hint-file generated 'call-back-unit'. If the
5354 : user has specified that a maximally 64-bit perl is to be built,
5355 : we may need to set or change some other defaults.
5356 if $test -f use64bitall.cbu; then
5357 echo "Your platform has some specific hints for 64-bit builds, using them..."
5361 4) case "$archname64" in
5362 ''|64int) archname64=64all ;;
5370 echo "Checking for GNU C Library..." >&4
5372 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
5373 alone are insufficient to distinguish different versions, such as
5374 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
5375 libc version 2.1.0. A. Dougherty, June 3, 2002.
5381 # ifdef __GLIBC_MINOR__
5382 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
5383 # include <gnu/libc-version.h>
5384 printf("%s\n", gnu_get_libc_version());
5386 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
5389 printf("%d\n", __GLIBC__);
5398 if eval $compile_ok && $run ./try > glibc.ver; then
5400 gnulibc_version=`$cat glibc.ver`
5401 echo "You are using the GNU C Library version $gnulibc_version"
5405 echo "You are not using the GNU C Library"
5407 $rm -f try try.* glibc.ver
5411 : see if nm is to be used to determine whether a symbol is defined or not
5415 case "$d_gnulibc" in
5418 echo "nm probably won't work on the GNU C Library." >&4
5424 if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
5426 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
5427 echo "'nm' won't be sufficient on this sytem." >&4
5433 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
5434 if $test $dflt -gt 20; then
5444 true|$define) dflt=y;;
5451 I can use $nm to extract the symbols from your C libraries. This
5452 is a time consuming task which may generate huge output on the disk (up
5453 to 3 megabytes) but that should make the symbols extraction faster. The
5454 alternative is to skip the 'nm' extraction part and to compile a small
5455 test program instead to determine whether each symbol is present. If
5456 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
5457 this may be the best solution.
5459 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
5462 rp="Shall I use $nm to extract C symbols from the libraries?"
5465 [Nn]*) usenm=false;;
5474 : nm options which may be necessary
5476 '') if $test -f /mach_boot; then
5478 elif $test -d /usr/ccs/lib; then
5479 nm_opt='-p' # Solaris (and SunOS?)
5480 elif $test -f /dgux; then
5482 elif $test -f /lib64/rld; then
5483 nm_opt='-p' # 64-bit Irix
5489 : nm options which may be necessary for shared libraries but illegal
5490 : for archive libraries. Thank you, Linux.
5491 case "$nm_so_opt" in
5492 '') case "$myuname" in
5494 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
5495 nm_so_opt='--dynamic'
5504 : get list of predefined functions in a handy place
5509 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
5515 *) for thislib in $libs; do
5518 : Handle C library specially below.
5521 thislib=`echo $thislib | $sed -e 's/^-l//'`
5522 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
5524 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
5526 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
5528 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
5530 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
5532 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
5534 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
5539 libnames="$libnames $try"
5541 *) libnames="$libnames $thislib" ;;
5550 for xxx in $libpth; do
5551 $test -r $1 || set $xxx/libc.$so
5552 : The messy sed command sorts on library version numbers.
5554 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
5555 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
5557 s/[0-9][0-9]*/0000&/g
5558 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
5561 $sort | $sed -e 's/^.* //'`
5564 $test -r $1 || set /usr/ccs/lib/libc.$so
5565 $test -r $1 || set /lib/libsys_s$_a
5571 if $test -r "$1"; then
5572 echo "Your (shared) C library seems to be in $1."
5574 elif $test -r /lib/libc && $test -r /lib/clib; then
5575 echo "Your C library seems to be in both /lib/clib and /lib/libc."
5577 libc='/lib/clib /lib/libc'
5578 if $test -r /lib/syslib; then
5579 echo "(Your math library is in /lib/syslib.)"
5580 libc="$libc /lib/syslib"
5582 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5583 echo "Your C library seems to be in $libc, as you said before."
5584 elif $test -r $incpath/usr/lib/libc$_a; then
5585 libc=$incpath/usr/lib/libc$_a;
5586 echo "Your C library seems to be in $libc. That's fine."
5587 elif $test -r /lib/libc$_a; then
5589 echo "Your C library seems to be in $libc. You're normal."
5591 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
5593 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
5594 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
5595 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
5597 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5599 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5602 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
5604 if $test -r "$tans"; then
5605 echo "Your C library seems to be in $tans, of all places."
5611 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5615 If the guess above is wrong (which it might be if you're using a strange
5616 compiler, or your machine supports multiple models), you can override it here.
5621 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
5623 I can't seem to find your C library. I've looked in the following places:
5626 $sed 's/^/ /' libpath
5629 None of these seems to contain your C library. I need to get its name...
5634 rp='Where is your C library?'
5639 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
5640 set X `cat libnames`
5643 case $# in 1) xxx=file; esac
5644 echo "Extracting names from the following $xxx for later perusal:" >&4
5646 $sed 's/^/ /' libnames >&4
5648 $echo $n "This may take a while...$c" >&4
5652 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
5653 *) $nm $nm_opt $file 2>/dev/null;;
5658 $grep fprintf libc.tmp > libc.ptf
5659 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
5660 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
5662 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
5664 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5666 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
5668 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5670 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
5672 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5674 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
5676 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5678 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
5680 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5682 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
5684 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5686 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
5687 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
5689 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5691 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
5693 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5695 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
5697 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5699 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
5701 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5703 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
5705 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5707 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
5709 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5711 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
5713 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5715 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
5717 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5720 $nm -p $* 2>/dev/null >libc.tmp
5721 $grep fprintf libc.tmp > libc.ptf
5722 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
5723 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
5729 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
5731 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
5732 for thisname in $libnames $libc; do
5733 $ar t $thisname >>libc.tmp
5735 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
5737 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
5738 # Repeat libc to extract forwarders to DLL entries too
5739 for thisname in $libnames $libc; do
5740 $ar tv $thisname >>libc.tmp
5741 # Revision 50 of EMX has bug in $ar.
5742 # it will not extract forwarders to DLL entries
5743 # Use emximp which will extract exactly them.
5744 emximp -o tmp.imp $thisname \
5746 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
5747 < tmp.imp >>libc.tmp
5750 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
5753 echo "$ar didn't seem to work right." >&4
5754 echo "Maybe this is a Cray...trying bld instead..." >&4
5755 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
5757 for thisname in $libnames; do
5759 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
5760 $ar t $thisname >>libc.tmp
5764 echo "That didn't work either. Giving up." >&4
5774 echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4
5775 dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list
5777 *) if $test -f /lib/syscalls.exp; then
5779 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
5780 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list
5786 $rm -f libnames libpath
5788 : is a C symbol defined?
5791 -v) tf=libc.tmp; tc=""; tdc="";;
5792 -a) tf=libc.tmp; tc="[0]"; tdc="[]";;
5793 *) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
5796 case "$reuseval-$4" in
5798 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
5804 if $contains $tlook $tf >/dev/null 2>&1;
5809 echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
5810 if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1;
5818 $define) tval=true;;
5824 : define an is-in-libc? function
5825 inlibc='echo " "; td=$define; tu=$undef;
5826 sym=$1; var=$2; eval "was=\$$2";
5828 case "$reuseval$was" in
5838 echo "$sym() found." >&4;
5839 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
5841 echo "$sym() NOT found." >&4;
5842 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
5846 $define) echo "$sym() found." >&4;;
5847 *) echo "$sym() NOT found." >&4;;
5851 : see if sqrtl exists
5855 hasproto='varname=$1; func=$2; shift; shift;
5856 while $test $# -ge 2; do
5858 $define) echo "#include <$2>";;
5862 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
5863 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
5864 echo "$func() prototype found.";
5867 echo "$func() prototype NOT found.";
5872 $rm -f try.c tryout.c'
5874 : check for length of double
5876 case "$doublesize" in
5878 echo "Checking to see how big your double precision numbers are..." >&4
5879 $cat >try.c <<'EOCP'
5883 printf("%d\n", (int)sizeof(double));
5888 if eval $compile_ok; then
5889 doublesize=`$run ./try`
5890 echo "Your double is $doublesize bytes long."
5893 echo "(I can't seem to compile the test program. Guessing...)"
5894 rp="What is the size of a double precision number (in bytes)?"
5902 : check for long doubles
5904 echo "Checking to see if you have long double..." >&4
5905 echo 'int main() { long double x = 7.0; }' > try.c
5907 if eval $compile; then
5909 echo "You have long double."
5912 echo "You do not have long double."
5918 : check for length of long double
5919 case "${d_longdbl}${longdblsize}" in
5922 echo "Checking to see how big your long doubles are..." >&4
5923 $cat >try.c <<'EOCP'
5927 printf("%d\n", sizeof(long double));
5932 if eval $compile; then
5933 longdblsize=`$run ./try`
5934 echo "Your long doubles are $longdblsize bytes long."
5938 echo "(I can't seem to compile the test program. Guessing...)" >&4
5939 rp="What is the size of a long double (in bytes)?"
5943 if $test "X$doublesize" = "X$longdblsize"; then
5944 echo "(That isn't any different from an ordinary double.)"
5952 if $test X"$d_longdbl" = X"$define"; then
5954 echo "Checking how to print long doubles..." >&4
5956 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
5957 $cat >try.c <<'EOCP'
5958 #include <sys/types.h>
5962 printf("%.3f\n", d);
5966 if eval $compile; then
5970 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
5971 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
5972 echo "We will use %f."
5978 if $test X"$sPRIfldbl" = X; then
5979 $cat >try.c <<'EOCP'
5980 #include <sys/types.h>
5983 long double d = 123.456;
5984 printf("%.3Lf\n", d);
5988 if eval $compile; then
5992 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
5993 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
5994 echo "We will use %Lf."
6000 if $test X"$sPRIfldbl" = X; then
6001 $cat >try.c <<'EOCP'
6002 #include <sys/types.h>
6005 long double d = 123.456;
6006 printf("%.3llf\n", d);
6010 if eval $compile; then
6014 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
6015 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
6016 echo "We will use %llf."
6022 if $test X"$sPRIfldbl" = X; then
6023 $cat >try.c <<'EOCP'
6024 #include <sys/types.h>
6027 long double d = 123.456;
6028 printf("%.3lf\n", d);
6032 if eval $compile; then
6036 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
6037 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
6038 echo "We will use %lf."
6044 if $test X"$sPRIfldbl" = X; then
6045 echo "Cannot figure out how to print long doubles." >&4
6047 sSCNfldbl=$sPRIfldbl # expect consistency
6054 case "$sPRIfldbl" in
6055 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
6056 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
6057 d_SCNfldbl="$undef";
6059 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
6060 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
6061 d_SCNfldbl="$define";
6065 : see if modfl exists
6069 : see if prototype for modfl is available
6071 set d_modflproto modfl math.h
6074 d_modfl_pow32_bug="$undef"
6076 case "$d_longdbl$d_modfl" in
6079 Checking to see whether your modfl() is okay for large values...
6085 if $test "X$d_modflproto" != "X$define"; then
6087 /* Sigh. many current glibcs provide the function, but do not prototype it. */
6088 long double modfl (long double, long double *);
6093 long double nv = 4294967303.15;
6099 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
6103 case "$osname:$gccversion" in
6104 aix:) saveccflags="$ccflags"
6105 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
6108 if eval $compile; then
6111 *" 4294967303.150000 1.150000 4294967302.000000")
6112 echo >&4 "Your modfl() is broken for large values."
6113 d_modfl_pow32_bug="$define"
6115 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
6119 *" 4294967303.150000 0.150000 4294967303.000000")
6120 echo >&4 "Your modfl() seems okay for large values."
6122 *) echo >&4 "I don't understand your modfl() at all."
6126 $rm -f try.* try core core.try.*
6128 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
6131 case "$osname:$gccversion" in
6132 aix:) ccflags="$saveccflags" ;; # restore
6138 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
6141 case "$uselongdouble" in
6142 $define|true|[yY]*) dflt='y';;
6147 Perl can be built to take advantage of long doubles which
6148 (if available) may give more accuracy and range for floating point numbers.
6150 If this doesn't make any sense to you, just accept the default '$dflt'.
6152 rp='Try to use long doubles if available?'
6155 y|Y) val="$define" ;;
6161 case "$uselongdouble" in
6162 true|[yY]*) uselongdouble="$define" ;;
6165 case "$uselongdouble" in
6167 : Look for a hint-file generated 'call-back-unit'. If the
6168 : user has specified that long doubles should be used,
6169 : we may need to set or change some other defaults.
6170 if $test -f uselongdouble.cbu; then
6171 echo "Your platform has some specific hints for long doubles, using them..."
6172 . ./uselongdouble.cbu
6175 (Your platform doesn't have any specific hints for long doubles.)
6182 case "$uselongdouble:$d_sqrtl:$d_modfl" in
6183 $define:$define:$define)
6186 $define:$define:$undef)
6187 message="I could not find modfl"
6189 $define:$undef:$define)
6190 message="I could not find sqrtl"
6192 $define:$undef:$undef)
6193 message="I found neither sqrtl nor modfl"
6197 if $test "$message" != X; then
6200 *** You requested the use of long doubles but you do not seem to have
6201 *** the mathematic functions for long doubles.
6203 *** I'm disabling the use of long doubles.
6207 uselongdouble=$undef
6210 : determine the architecture name
6212 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
6213 tarch=`arch`"-$osname"
6214 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
6215 if uname -m > tmparch 2>&1 ; then
6216 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
6217 -e 's/$/'"-$osname/" tmparch`
6225 case "$myarchname" in
6228 echo "(Your architecture name used to be $myarchname.)"
6232 case "$targetarch" in
6234 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
6239 *) dflt="$archname";;
6241 rp='What is your architecture name'
6244 case "$usethreads" in
6246 echo "Threads selected." >&4
6248 *-thread*) echo "...and architecture name already has -thread." >&4
6250 *) archname="$archname-thread"
6251 echo "...setting architecture name to $archname." >&4
6256 case "$usemultiplicity" in
6258 echo "Multiplicity selected." >&4
6260 *-multi*) echo "...and architecture name already has -multi." >&4
6262 *) archname="$archname-multi"
6263 echo "...setting architecture name to $archname." >&4
6268 case "$use64bitint$use64bitall" in
6270 case "$archname64" in
6272 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
6275 case "$use64bitint" in
6276 "$define") echo "64 bit integers selected." >&4 ;;
6278 case "$use64bitall" in
6279 "$define") echo "Maximal 64 bitness selected." >&4 ;;
6282 *-$archname64*) echo "...and architecture name already has $archname64." >&4
6284 *) archname="$archname-$archname64"
6285 echo "...setting architecture name to $archname." >&4
6291 case "$uselongdouble" in
6293 echo "Long doubles selected." >&4
6294 case "$longdblsize" in
6296 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
6300 *-ld*) echo "...and architecture name already has -ld." >&4
6302 *) archname="$archname-ld"
6303 echo "...setting architecture name to $archname." >&4
6310 case "$useperlio" in
6312 echo "Perlio selected." >&4
6315 echo "Perlio not selected, using stdio." >&4
6317 *-stdio*) echo "...and architecture name already has -stdio." >&4
6319 *) archname="$archname-stdio"
6320 echo "...setting architecture name to $archname." >&4
6326 : determine root of directory hierarchy where package will be installed.
6329 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
6332 dflt=`echo "$prefix" | sed 's/.$//'`
6340 By default, $package will be installed in $dflt/bin, manual pages
6341 under $dflt/man, etc..., i.e. with $dflt as prefix for all
6342 installation directories. Typically this is something like /usr/local.
6343 If you wish to have binaries under /usr/bin but other parts of the
6344 installation under /usr/local, that's ok: you will be prompted
6345 separately for each of the installation directories, the prefix being
6346 only used to set the defaults.
6350 rp='Installation prefix to use?'
6358 *) oldprefix="$prefix";;
6367 *) afsroot=$afsroot ;;
6373 $define|true) afs=true ;;
6374 $undef|false) afs=false ;;
6375 *) if test -d $afsroot; then
6383 echo "AFS may be running... I'll be extra cautious then..." >&4
6385 echo "AFS does not seem to be running..." >&4
6388 : determine installation prefix for where package is to be installed.
6392 Since you are running AFS, I need to distinguish the directory in which
6393 files will reside from the directory in which they are installed (and from
6394 which they are presumably copied to the former directory by occult means).
6397 case "$installprefix" in
6398 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
6399 *) dflt="$installprefix";;
6404 In some special cases, particularly when building $package for distribution,
6405 it is convenient to distinguish between the directory in which files should
6406 be installed from the directory ($prefix) in which they
6407 will eventually reside. For most users, these two directories are the same.
6410 case "$installprefix" in
6412 *) dflt=$installprefix;;
6416 rp='What installation prefix should I use for installing files?'
6418 installprefix="$ans"
6419 installprefixexp="$ansexp"
6421 : set the prefixit variable, to compute a suitable default value
6422 prefixit='case "$3" in
6424 case "$oldprefix" in
6425 "") eval "$1=\"\$$2\"";;
6432 ""|" ") eval "$1=\"\$$2\"";;
6438 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
6440 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
6441 /*-$oldprefix/*|\~*-$oldprefix/*)
6442 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
6443 *) eval "$1=\"\$$2\"";;
6447 : get the patchlevel
6449 echo "Getting the current patchlevel..." >&4
6450 if $test -r $rsrc/patchlevel.h;then
6451 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
6452 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
6453 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6454 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
6455 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
6456 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6457 perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
6466 $echo "(You do not have patchlevel.h. Eek.)"
6468 if $test -r $rsrc/.patch ; then
6469 if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
6470 perl_patchlevel=`cat $rsrc/.patch`
6473 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
6474 version_patchlevel_string="version $patchlevel subversion $subversion"
6475 case "$perl_patchlevel" in
6477 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
6480 $echo "(You have $package $version_patchlevel_string.)"
6484 : XXX Should be a Configure test for double-dots in filenames.
6485 version=`echo $revision $patchlevel $subversion | \
6486 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6487 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6488 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6491 version=`echo $revision $patchlevel $subversion | \
6492 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6493 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6494 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6497 : Special case the 5.005_xx maintenance series, which used 5.005
6498 : without any subversion label as a subdirectory in $sitelib
6499 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
6500 api_versionstring='5.005'
6503 : determine installation style
6504 : For now, try to deduce it from prefix unless it is already set.
6505 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
6506 case "$installstyle" in
6507 '') case "$prefix" in
6508 *perl*) dflt='lib';;
6509 *) dflt='lib/perl5' ;;
6512 *) dflt="$installstyle" ;;
6514 : Probably not worth prompting for this since we prompt for all
6515 : the directories individually, and the prompt would be too long and
6519 : determine where private library files go
6520 : Usual default is /usr/local/lib/perl5/$version.
6521 : Also allow things like /opt/perl/lib/$version, since
6522 : /opt/perl/lib/perl5... would be redundant.
6523 : The default "style" setting is made in installstyle.U
6524 case "$installstyle" in
6525 *lib/perl5*) set dflt privlib lib/$package/$version ;;
6526 *) set dflt privlib lib/$version ;;
6531 There are some auxiliary files for $package that need to be put into a
6532 private library directory that is accessible by everyone.
6536 rp='Pathname where the private library files will reside?'
6539 privlibexp="$ansexp"
6540 : Change installation prefix, if necessary.
6541 if $test X"$prefix" != X"$installprefix"; then
6542 installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
6544 installprivlib="$privlibexp"
6547 : set the prefixup variable, to restore leading tilda escape
6548 prefixup='case "$prefixexp" in
6550 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
6553 : determine where public architecture dependent libraries go
6556 : privlib default is /usr/local/lib/$package/$version
6557 : archlib default is /usr/local/lib/$package/$version/$archname
6558 : privlib may have an optional trailing /share.
6559 tdflt=`echo $privlib | $sed 's,/share$,,'`
6560 tdflt=$tdflt/$archname
6569 $spackage contains architecture-dependent library files. If you are
6570 sharing libraries in a heterogeneous environment, you might store
6571 these files in a separate location. Otherwise, you can just include
6572 them with the rest of the public library files.
6576 rp='Where do you want to put the public architecture-dependent libraries?'
6579 archlibexp="$ansexp"
6580 if $test X"$archlib" = X"$privlib"; then
6585 : Change installation prefix, if necessary.
6586 if $test X"$prefix" != X"$installprefix"; then
6587 installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
6589 installarchlib="$archlibexp"
6592 : see if setuid scripts can be secure
6595 Some kernels have a bug that prevents setuid #! scripts from being
6596 secure. Some sites have disabled setuid #! scripts because of this.
6598 First let's decide if your kernel supports secure setuid #! scripts.
6599 (If setuid #! scripts would be secure but have been disabled anyway,
6600 don't say that they are secure if asked.)
6605 if $test -d /dev/fd; then
6606 echo "#!$ls" >reflect
6607 chmod +x,u+s reflect
6608 ./reflect >flect 2>&1
6609 if $contains "/dev/fd" flect >/dev/null; then
6610 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6614 If you are not sure if they are secure, I can check but I'll need a
6615 username and password different from the one you are using right now.
6616 If you don't have such a username or don't want me to test, simply
6620 rp='Other username to test security of setuid scripts with?'
6625 case "$d_suidsafe" in
6626 '') echo "I'll assume setuid scripts are *not* secure." >&4
6629 echo "Well, the $hint value is *not* secure." >&4
6631 *) echo "Well, the $hint value *is* secure." >&4
6636 $rm -f reflect flect
6637 echo "#!$ls" >reflect
6638 chmod +x,u+s reflect
6641 echo '"su" will (probably) prompt you for '"$ans's password."
6642 su $ans -c './reflect >flect'
6643 if $contains "/dev/fd" flect >/dev/null; then
6644 echo "Okay, it looks like setuid scripts are secure." >&4
6647 echo "I don't think setuid scripts are secure." >&4
6652 rp='Does your kernel have *secure* setuid scripts?'
6655 [yY]*) val="$define";;
6660 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6661 echo "(That's for file descriptors, not floppy disks.)"
6667 $rm -f reflect flect
6669 : now see if they want to do setuid emulation
6672 case "$d_suidsafe" in
6675 echo "No need to emulate SUID scripts since they are secure here." >&4
6679 Some systems have disabled setuid scripts, especially systems where
6680 setuid scripts cannot be secure. On systems where setuid scripts have
6681 been disabled, the setuid/setgid bits on scripts are currently
6682 useless. It is possible for $package to detect those bits and emulate
6683 setuid/setgid in a secure fashion. This emulation will only work if
6684 setuid scripts have been disabled in your kernel.
6688 "$define") dflt=y ;;
6691 rp="Do you want to do setuid/setgid emulation?"
6694 [yY]*) val="$define";;
6702 : see if this is a malloc.h system
6703 set malloc.h i_malloc
6706 : see if stdlib is available
6707 set stdlib.h i_stdlib
6710 : check for void type
6712 echo "Checking to see how well your C compiler groks the void type..." >&4
6713 case "$voidflags" in
6715 $cat >try.c <<'EOCP'
6721 extern void moo(); /* function returning void */
6722 void (*goo)(); /* ptr to func returning void */
6724 void *hue; /* generic ptr */
6737 int main() { sub(); }
6739 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
6740 voidflags=$defvoidused
6741 echo "Good. It appears to support void to the level $package wants.">&4
6742 if $contains warning .out >/dev/null 2>&1; then
6743 echo "However, you might get some warnings that look like this:"
6747 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
6748 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
6749 echo "It supports 1..."
6750 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
6751 echo "It also supports 2..."
6752 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
6754 echo "And it supports 4 but not 8 definitely."
6756 echo "It doesn't support 4..."
6757 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
6759 echo "But it supports 8."
6762 echo "Neither does it support 8."
6766 echo "It does not support 2..."
6767 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
6769 echo "But it supports 4 and 8."
6771 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
6773 echo "And it supports 4 but has not heard about 8."
6775 echo "However it supports 8 but not 4."
6780 echo "There is no support at all for void."
6785 case "$voidflags" in
6788 Support flag bits are:
6789 1: basic void declarations.
6790 2: arrays of pointers to functions returning void.
6791 4: operations between pointers to and addresses of void functions.
6792 8: generic void pointers.
6795 rp="Your void support flags add up to what?"
6802 : check for length of pointer
6806 echo "Checking to see how big your pointers are..." >&4
6807 if test "$voidflags" -gt 7; then
6808 echo '#define VOID_PTR char *' > try.c
6810 echo '#define VOID_PTR void *' > try.c
6812 $cat >>try.c <<'EOCP'
6816 printf("%d\n", (int)sizeof(VOID_PTR));
6821 if eval $compile_ok; then
6822 ptrsize=`$run ./try`
6823 echo "Your pointers are $ptrsize bytes long."
6826 echo "(I can't seem to compile the test program. Guessing...)" >&4
6827 rp="What is the size of a pointer (in bytes)?"
6834 case "$use64bitall" in
6835 "$define"|true|[yY]*)
6839 *** You have chosen a maximally 64-bit build, but your pointers
6840 *** are only 4 bytes wide, disabling maximal 64-bitness.
6843 use64bitall="$undef"
6844 case "$use64bitint" in
6845 "$define"|true|[yY]*) ;;
6848 *** Downgrading from maximal 64-bitness to using 64-bit integers.
6851 use64bitint="$define"
6860 : determine which malloc to compile in
6862 case "$usemymalloc" in
6863 [yY]*|true|$define) dflt='y' ;;
6864 [nN]*|false|$undef) dflt='n' ;;
6865 *) case "$ptrsize" in
6871 rp="Do you wish to attempt to use the malloc that comes with $package?"
6877 mallocsrc='malloc.c'
6878 mallocobj="malloc$_o"
6879 d_mymalloc="$define"
6882 : Remove malloc from list of libraries to use
6883 echo "Removing unneeded -lmalloc from library list" >&4
6884 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6887 echo "libs = $libs" >&4
6899 : compute the return types of malloc and free
6901 $cat >malloc.c <<END
6905 #include <sys/types.h>
6919 case "$malloctype" in
6921 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6928 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6932 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6939 echo "Your system uses $freetype free(), it would seem." >&4
6943 After $package is installed, you may wish to install various
6944 add-on modules and utilities. Typically, these add-ons will
6945 be installed under $prefix with the rest
6946 of this package. However, you may wish to install such add-ons
6947 elsewhere under a different prefix.
6949 If you do not wish to put everything under a single prefix, that's
6950 ok. You will be prompted for the individual locations; this siteprefix
6951 is only used to suggest the defaults.
6953 The default should be fine for most people.
6957 rp='Installation prefix to use for add-on modules and utilities?'
6958 : XXX Here might be another good place for an installstyle setting.
6959 case "$siteprefix" in
6961 *) dflt=$siteprefix ;;
6964 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6966 case "$siteprefix" in
6970 *) oldsiteprefix="$prefix";;
6975 siteprefixexp="$ansexp"
6977 : determine where site specific libraries go.
6978 : Usual default is /usr/local/lib/perl5/site_perl/$version
6979 : The default "style" setting is made in installstyle.U
6980 : XXX No longer works with Prefixit stuff.
6981 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6983 '') case "$installstyle" in
6984 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6985 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6993 The installation process will create a directory for
6994 site-specific extensions and modules. Most users find it convenient
6995 to place all site-specific files in this directory rather than in the
6996 main distribution directory.
7000 rp='Pathname for the site-specific library files?'
7003 sitelibexp="$ansexp"
7004 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
7005 : Change installation prefix, if necessary.
7006 if $test X"$prefix" != X"$installprefix"; then
7007 installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
7009 installsitelib="$sitelibexp"
7012 : determine where site specific architecture-dependent libraries go.
7013 : sitelib default is /usr/local/lib/perl5/site_perl/$version
7014 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
7015 : sitelib may have an optional trailing /share.
7017 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
7018 dflt="$dflt/$archname"
7023 set sitearch sitearch none
7027 The installation process will also create a directory for
7028 architecture-dependent site-specific extensions and modules.
7032 rp='Pathname for the site-specific architecture-dependent library files?'
7035 sitearchexp="$ansexp"
7036 : Change installation prefix, if necessary.
7037 if $test X"$prefix" != X"$installprefix"; then
7038 installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
7040 installsitearch="$sitearchexp"
7045 The installation process will also create a directory for
7046 vendor-supplied add-ons. Vendors who supply perl with their system
7047 may find it convenient to place all vendor-supplied files in this
7048 directory rather than in the main distribution directory. This will
7049 ease upgrades between binary-compatible maintenance versions of perl.
7051 Of course you may also use these directories in whatever way you see
7052 fit. For example, you might use them to access modules shared over a
7053 company-wide network.
7055 The default answer should be fine for most people.
7056 This causes further questions about vendor add-ons to be skipped
7057 and no vendor-specific directories will be configured for perl.
7060 rp='Do you want to configure vendor-specific add-on directories?'
7061 case "$usevendorprefix" in
7062 define|true|[yY]*) dflt=y ;;
7063 *) : User may have set vendorprefix directly on Configure command line.
7064 case "$vendorprefix" in
7073 rp='Installation prefix to use for vendor-supplied add-ons?'
7074 case "$vendorprefix" in
7076 *) dflt=$vendorprefix ;;
7079 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7081 case "$vendorprefix" in
7085 *) oldvendorprefix="$prefix";;
7089 usevendorprefix="$define"
7091 vendorprefixexp="$ansexp"
7093 *) usevendorprefix="$undef"
7099 case "$vendorprefix" in
7100 '') d_vendorlib="$undef"
7104 *) d_vendorlib="$define"
7105 : determine where vendor-supplied modules go.
7106 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
7107 case "$vendorlib" in
7109 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7110 case "$installstyle" in
7111 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
7112 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
7115 *) dflt="$vendorlib"
7119 rp='Pathname for the vendor-supplied library files?'
7122 vendorlibexp="$ansexp"
7125 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
7126 : Change installation prefix, if necessary.
7127 if $test X"$prefix" != X"$installprefix"; then
7128 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
7130 installvendorlib="$vendorlibexp"
7133 case "$vendorprefix" in
7134 '') d_vendorarch="$undef"
7138 *) d_vendorarch="$define"
7139 : determine where vendor-supplied architecture-dependent libraries go.
7140 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
7141 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
7142 : vendorlib may have an optional trailing /share.
7143 case "$vendorarch" in
7144 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
7145 dflt="$dflt/$archname"
7147 *) dflt="$vendorarch" ;;
7150 rp='Pathname for vendor-supplied architecture-dependent files?'
7153 vendorarchexp="$ansexp"
7156 : Change installation prefix, if necessary.
7157 if $test X"$prefix" != X"$installprefix"; then
7158 installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
7160 installvendorarch="$vendorarchexp"
7163 : Final catch-all directories to search
7166 Lastly, you can have perl look in other directories for extensions and
7167 modules in addition to those already specified.
7168 These directories will be searched after
7172 test X"$vendorlib" != "X" && echo ' ' $vendorlib
7173 test X"$vendorarch" != "X" && echo ' ' $vendorarch
7175 case "$otherlibdirs" in
7176 ''|' ') dflt='none' ;;
7177 *) dflt="$otherlibdirs" ;;
7180 Enter a colon-separated set of extra paths to include in perl's @INC
7181 search path, or enter 'none' for no extra paths.
7185 rp='Colon-separated list of additional directories for perl to search?'
7188 ' '|''|none) otherlibdirs=' ' ;;
7189 *) otherlibdirs="$ans" ;;
7191 case "$otherlibdirs" in
7195 set d_perl_otherlibdirs
7198 : Cruising for prototypes
7200 echo "Checking out function prototypes..." >&4
7201 $cat >prototype.c <<'EOCP'
7202 int main(int argc, char *argv[]) {
7205 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
7206 echo "Your C compiler appears to support function prototypes."
7209 echo "Your C compiler doesn't seem to understand function prototypes."
7216 case "$prototype" in
7218 *) ansi2knr='ansi2knr'
7223 This version of $package can only be compiled by a compiler that
7224 understands function prototypes. Unfortunately, your C compiler
7226 doesn't seem to understand them. Sorry about that.
7228 If GNU cc is available for your system, perhaps you could try that instead.
7230 Eventually, we hope to support building Perl with pre-ANSI compilers.
7231 If you would like to help in that effort, please contact <perlbug@perl.org>.
7233 Aborting Configure now.
7239 : determine where public executables go
7244 rp='Pathname where the public executables will reside?'
7246 if $test "X$ansexp" != "X$binexp"; then
7251 : Change installation prefix, if necessary.
7252 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
7253 if $test X"$prefix" != X"$installprefix"; then
7254 installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
7256 installbin="$binexp"
7265 Perl can be built with extra modules or bundles of modules which
7266 will be fetched from the CPAN and installed alongside Perl.
7268 Notice that you will need access to the CPAN; either via the Internet,
7269 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
7270 be asked later to configure the CPAN.pm module which will in turn do
7271 the installation of the rest of the extra modules or bundles.)
7273 Notice also that if the modules require any external software such as
7274 libraries and headers (the libz library and the zlib.h header for the
7275 Compress::Zlib module, for example) you MUST have any such software
7276 already installed, this configuration process will NOT install such
7279 If this doesn't make any sense to you, just accept the default '$dflt'.
7281 rp='Install any extra modules (y or n)?'
7287 Please list any extra modules or bundles to be installed from CPAN,
7288 with spaces between the names. The names can be in any format the
7289 'install' command of CPAN.pm will understand. (Answer 'none',
7290 without the quotes, to install no extra modules or bundles.)
7300 $rm -f ../extras.lst
7302 *) echo "(Saving the list of extras for later...)"
7303 echo "$extras" > ../extras.lst
7311 : Find perl5.005 or later.
7312 echo "Looking for a previously installed perl5.005 or later... "
7314 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
7315 : Check if this perl is recent and can load a simple module
7316 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7319 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7329 '') echo "None found. That's ok.";;
7330 *) echo "Using $perl5." ;;
7333 : Determine list of previous versions to include in @INC
7334 $cat > getverlist <<EOPL
7337 \$api_versionstring = "$api_versionstring";
7338 \$version = "$version";
7339 \$stem = "$sitelib_stem";
7340 \$archname = "$archname";
7342 $cat >> getverlist <<'EOPL'
7343 # Can't have leading @ because metaconfig interprets it as a command!
7344 ;@inc_version_list=();
7345 # XXX Redo to do opendir/readdir?
7348 ;@candidates = glob("5.*");
7354 # XXX ToDo: These comparisons must be reworked when two-digit
7355 # subversions come along, so that 5.7.10 compares as greater than
7356 # 5.7.3! By that time, hope that 5.6.x is sufficiently
7357 # widespread that we can use the built-in version vectors rather
7358 # than reinventing them here. For 5.6.0, however, we must
7359 # assume this script will likely be run by 5.005_0x. --AD 1/2000.
7360 foreach $d (@candidates) {
7361 if ($d lt $version) {
7362 if ($d ge $api_versionstring) {
7363 unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
7365 elsif ($d ge "5.005") {
7366 unshift(@inc_version_list, grep { -d } $d);
7370 # Skip newer version. I.e. don't look in
7371 # 5.7.0 if we're installing 5.6.1.
7375 if (@inc_version_list) {
7376 print join(' ', @inc_version_list);
7379 # Blank space to preserve value for next Configure run.
7384 case "$inc_version_list" in
7385 '') if test -x "$perl5$exe_ext"; then
7386 dflt=`$perl5 getverlist`
7391 $undef) dflt='none' ;;
7392 *) eval dflt=\"$inc_version_list\" ;;
7395 ''|' ') dflt=none ;;
7402 In order to ease the process of upgrading, this version of perl
7403 can be configured to use modules built and installed with earlier
7404 versions of perl that were installed under $prefix. Specify here
7405 the list of earlier versions that this version of perl should check.
7406 If Configure detected no earlier versions of perl installed under
7407 $prefix, then the list will be empty. Answer 'none' to tell perl
7408 to not search earlier versions.
7410 The default should almost always be sensible, so if you're not sure,
7411 just accept the default.
7414 rp='List of earlier versions to include in @INC?'
7417 [Nn]one|''|' ') inc_version_list=' ' ;;
7418 *) inc_version_list="$ans" ;;
7420 case "$inc_version_list" in
7422 inc_version_list_init='0';;
7423 *) inc_version_list_init=`echo $inc_version_list |
7424 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
7429 : determine whether to install perl also as /usr/bin/perl
7432 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
7434 Many scripts expect perl to be installed as /usr/bin/perl.
7435 I can install the perl you are about to compile also as /usr/bin/perl
7436 (in addition to $installbin/perl).
7438 case "$installusrbinperl" in
7439 "$undef"|[nN]*) dflt='n';;
7442 rp="Do you want to install perl as /usr/bin/perl?"
7445 [yY]*) val="$define";;
7451 set installusrbinperl
7454 : see if dld is available
7458 : see if dlopen exists
7465 : determine which dynamic loading, if any, to compile in
7467 dldir="ext/DynaLoader"
7480 $define) dflt='y' ;;
7483 $define) dflt='y' ;;
7485 : Does a dl_xxx.xs file exist for this operating system
7486 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7489 rp="Do you wish to use dynamic loading?"
7496 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7497 dflt="$dldir/dl_${osname}.xs"
7498 elif $test "$d_dlopen" = "$define" ; then
7499 dflt="$dldir/dl_dlopen.xs"
7500 elif $test "$i_dld" = "$define" ; then
7501 dflt="$dldir/dl_dld.xs"
7506 *) dflt="$dldir/$dlsrc"
7509 echo "The following dynamic loading files are available:"
7510 : Can not go over to $dldir because getfile has path hard-coded in.
7511 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7512 rp="Source file to use for dynamic loading"
7518 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7522 Some systems may require passing special flags to $cc -c to
7523 compile modules that will be used to create a shared library.
7524 To use no flags, say "none".
7527 case "$cccdlflags" in
7528 '') case "$gccversion" in
7529 '') case "$osname" in
7531 next) dflt='none' ;;
7532 irix*) dflt='-KPIC' ;;
7533 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7534 sunos) dflt='-pic' ;;
7538 *) case "$osname" in
7539 darwin) dflt='none' ;;
7540 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7545 *) dflt="$cccdlflags" ;;
7547 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7550 none) cccdlflags=' ' ;;
7551 *) cccdlflags="$ans" ;;
7556 Some systems use ld to create libraries that can be dynamically loaded,
7557 while other systems (such as those using ELF) use $cc.
7561 '') $cat >try.c <<'EOM'
7562 /* Test for whether ELF binaries are produced */
7567 int i = open("a.out",O_RDONLY);
7570 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7571 exit(0); /* succeed (yes, it's ELF) */
7576 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7578 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7582 echo "I'll use ld to build dynamic libraries."
7591 rp="What command should be used to create dynamic libraries?"
7597 Some systems may require passing special flags to $ld to create a
7598 library that can be dynamically loaded. If your ld flags include
7599 -L/other/path options to locate libraries outside your loader's normal
7600 search path, you may need to specify those -L options here as well. To
7601 use no flags, say "none".
7604 case "$lddlflags" in
7605 '') case "$osname" in
7606 beos) dflt='-nostart' ;;
7608 case "$gccversion" in
7609 '') dflt="$dflt +vnocompatwarnings" ;;
7612 linux|irix*) dflt='-shared' ;;
7613 next) dflt='none' ;;
7614 solaris) dflt='-G' ;;
7615 sunos) dflt='-assert nodefinitions' ;;
7616 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
7620 *) dflt="$lddlflags" ;;
7623 : Try to guess additional flags to pick up local libraries.
7624 : Be careful not to append to a plain 'none'
7628 for thisflag in $ldflags; do
7633 *) dflt="$dflt $thisflag" ;;
7640 ''|' ') dflt='none' ;;
7643 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
7646 none) lddlflags=' ' ;;
7647 *) lddlflags="$ans" ;;
7652 Some systems may require passing special flags to $cc to indicate that
7653 the resulting executable will use dynamic linking. To use no flags,
7657 case "$ccdlflags" in
7658 '') case "$osname" in
7659 hpux) dflt='-Wl,-E' ;;
7660 linux) dflt='-rdynamic' ;;
7661 next) dflt='none' ;;
7662 sunos) dflt='none' ;;
7666 *) dflt="$ccdlflags" ;;
7668 rp="Any special flags to pass to $cc to use dynamic linking?"
7671 none) ccdlflags=' ' ;;
7672 *) ccdlflags="$ans" ;;
7686 # No dynamic loading being used, so don't bother even to prompt.
7689 *) case "$useshrplib" in
7690 '') case "$osname" in
7691 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
7693 also='Building a shared libperl is required for dynamic loading to work on your system.'
7698 also='Building a shared libperl is needed for MAB support.'
7716 The perl executable is normally obtained by linking perlmain.c with
7717 libperl${_a}, any static extensions (usually just DynaLoader), and
7718 any other libraries needed on this system (such as -lm, etc.). Since
7719 your system supports dynamic loading, it is probably possible to build
7720 a shared libperl.$so. If you will have more than one executable linked
7721 to libperl.$so, this will significantly reduce the size of each
7722 executable, but it may have a noticeable affect on performance. The
7723 default is probably sensible for your system.
7727 rp="Build a shared libperl.$so (y/n)"
7731 useshrplib='true' ;;
7732 *) useshrplib='false' ;;
7737 case "$useshrplib" in
7741 # Figure out a good name for libperl.so. Since it gets stored in
7742 # a version-specific architecture-dependent library, the version
7743 # number isn't really that important, except for making cc/ld happy.
7745 # A name such as libperl.so.3.1
7746 majmin="libperl.$so.$patchlevel.$subversion"
7747 # A name such as libperl.so.301
7748 majonly=`echo $patchlevel $subversion |
7749 $awk '{printf "%d%02d", $1, $2}'`
7750 majonly=libperl.$so.$majonly
7751 # I'd prefer to keep the os-specific stuff here to a minimum, and
7752 # rely on figuring it out from the naming of libc.
7753 case "${osname}${osvers}" in
7756 # XXX How handle the --version stuff for MAB?
7758 linux*) # ld won't link with a bare -lperl otherwise.
7761 cygwin*) # ld links against an importlib
7762 dflt=libperl$lib_ext
7764 *) # Try to guess based on whether libc has major.minor.
7766 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
7767 *libc.$so.[0-9]*) dflt=$majonly ;;
7768 *) dflt=libperl.$so ;;
7778 I need to select a good name for the shared libperl. If your system uses
7779 library names with major and minor numbers, then you might want something
7780 like $majmin. Alternatively, if your system uses a single version
7781 number for shared libraries, then you might want to use $majonly.
7782 Or, your system might be quite happy with a simple libperl.$so.
7784 Since the shared libperl will get installed into a version-specific
7785 architecture-dependent directory, the version number of the shared perl
7786 library probably isn't important, so the default should be o.k.
7789 rp='What name do you want to give to the shared libperl?'
7792 echo "Ok, I'll use $libperl"
7795 libperl="libperl${_a}"
7799 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
7803 WARNING: Use of the shrpdir variable for the installation location of
7804 the shared $libperl is not supported. It was never documented and
7805 will not work in this version. Let me (perlbug@perl.org)
7806 know of any problems this may cause.
7812 But your current setting of $shrpdir is
7813 the default anyway, so it's harmless.
7818 Further, your current attempted setting of $shrpdir
7819 conflicts with the value of $archlibexp/CORE
7820 that installperl will use.
7827 # How will the perl executable find the installed shared $libperl?
7828 # Add $xxx to ccdlflags.
7829 # If we can't figure out a command-line option, use $shrpenv to
7830 # set env LD_RUN_PATH. The main perl makefile uses this.
7831 shrpdir=$archlibexp/CORE
7834 if "$useshrplib"; then
7837 # We'll set it in Makefile.SH...
7843 xxx="-Wl,-R$shrpdir"
7845 bsdos|linux|irix*|dec_osf)
7846 xxx="-Wl,-rpath,$shrpdir"
7849 # next doesn't like the default...
7852 # beos doesn't like the default, either.
7855 # hpux doesn't like the default, either.
7856 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
7859 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
7865 # Only add $xxx if it isn't already in ccdlflags.
7866 case " $ccdlflags " in
7868 *) ccdlflags="$ccdlflags $xxx"
7871 Adding $xxx to the flags
7872 passed to $ld so that the perl executable will find the
7873 installed shared $libperl.
7881 # Fix ccdlflags in AIX for building external extensions.
7882 # (For building Perl itself bare -bE:perl.exp is needed,
7883 # Makefile.SH takes care of this.)
7885 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
7887 # Respect a hint or command-line value.
7889 '') shrpenv="$tmp_shrpenv" ;;
7891 case "$ldlibpthname" in
7892 '') ldlibpthname=LD_LIBRARY_PATH ;;
7893 none) ldlibpthname='' ;;
7896 : determine where manual pages are on this system
7900 syspath='/usr/share/man/man1 /usr/man/man1'
7901 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
7902 syspath="$syspath /usr/man/u_man/man1"
7903 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
7904 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
7905 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
7906 sysman=`./loc . /usr/man/man1 $syspath`
7909 if $test -d "$sysman"; then
7910 echo "System manual is in $sysman." >&4
7912 echo "Could not find manual pages in source form." >&4
7915 : determine where manual pages go
7916 set man1dir man1dir none
7920 $spackage has manual pages available in source form.
7924 echo "However, you don't have nroff, so they're probably useless to you."
7926 '') man1dir="none";;
7929 echo "If you don't want the manual sources installed, answer 'none'."
7934 lookpath="$prefixexp/share/man/man1"
7935 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
7936 lookpath="$lookpath $prefixexp/man/p_man/man1"
7937 lookpath="$lookpath $prefixexp/man/u_man/man1"
7938 lookpath="$lookpath $prefixexp/man/man.1"
7940 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
7941 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
7951 rp="Where do the main $spackage manual pages (source) go?"
7953 if $test "X$man1direxp" != "X$ansexp"; then
7957 man1direxp="$ansexp"
7963 : Change installation prefix, if necessary.
7964 if $test X"$prefix" != X"$installprefix"; then
7965 installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
7967 installman1dir="$man1direxp"
7970 : What suffix to use on installed man pages
7977 rp="What suffix should be used for the main $spackage man pages?"
7979 '') case "$man1dir" in
7993 *) dflt="$man1ext";;
8000 : see if we can have long filenames
8002 first=123456789abcdef
8004 if (echo hi >$first) 2>/dev/null; then
8005 if $test -f 123456789abcde; then
8006 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
8009 echo 'You can have filenames longer than 14 characters.'>&4
8014 You can't have filenames longer than 14 chars.
8015 You can't even think about them!
8021 $rm -rf 123456789abcde*
8023 : determine where library module manual pages go
8024 set man3dir man3dir none
8028 $spackage has manual pages for many of the library modules.
8034 However, you don't have nroff, so they're probably useless to you.
8037 '') man3dir="none";;
8041 case "$d_flexfnam" in
8044 However, your system can't handle the long file names like File::Basename.3.
8047 '') man3dir="none";;
8051 echo "If you don't want the manual sources installed, answer 'none'."
8052 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
8054 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
8055 if $test -d "$privlib/man/man3"; then
8058 WARNING: Previous versions of perl installed man3 pages into
8059 $privlib/man/man3. This version will suggest a
8060 new default of $dflt.
8064 rp='Do you wish to preserve the old behavior?(y/n)'
8067 y*) dflt="$privlib/man/man3" ;;
8072 *) dflt="$man3dir" ;;
8079 rp="Where do the $package library man pages (source) go?"
8082 man3direxp="$ansexp"
8088 : Change installation prefix, if necessary.
8089 if $test X"$prefix" != X"$installprefix"; then
8090 installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
8092 installman3dir="$man3direxp"
8095 : What suffix to use on installed man pages
8101 rp="What suffix should be used for the $package library man pages?"
8103 '') case "$man3dir" in
8117 *) dflt="$man3ext";;
8124 : see if we have to deal with yellow pages, now NIS.
8125 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8126 if $test -f /usr/etc/nibindd; then
8128 echo "I'm fairly confident you're on a NeXT."
8130 rp='Do you get the hosts file via NetInfo?'
8139 y*) hostcat='nidump hosts .';;
8140 *) case "$hostcat" in
8141 nidump*) hostcat='';;
8151 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8159 rp='Are you getting the hosts file via yellow pages?'
8162 y*) hostcat='ypcat hosts';;
8163 *) hostcat='cat /etc/hosts';;
8169 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8172 '') test -f /etc/group && groupcat='cat /etc/group';;
8175 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8178 : now get the host name
8180 echo "Figuring out host name..." >&4
8181 case "$myhostname" in
8183 echo 'Maybe "hostname" will work...'
8184 if tans=`sh -c hostname 2>&1` ; then
8192 if $test "$cont"; then
8194 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8195 if tans=`cat /etc/systemid 2>&1` ; then
8197 phostname='cat /etc/systemid'
8198 echo "Whadyaknow. Xenix always was a bit strange..."
8201 elif $test -r /etc/systemid; then
8202 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8205 if $test "$cont"; then
8206 echo 'No, maybe "uuname -l" will work...'
8207 if tans=`sh -c 'uuname -l' 2>&1` ; then
8209 phostname='uuname -l'
8211 echo 'Strange. Maybe "uname -n" will work...'
8212 if tans=`sh -c 'uname -n' 2>&1` ; then
8214 phostname='uname -n'
8216 echo 'Oh well, maybe I can mine it out of whoami.h...'
8217 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8218 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8219 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8221 case "$myhostname" in
8222 '') echo "Does this machine have an identity crisis or something?"
8225 echo "Well, you said $myhostname before..."
8226 phostname='echo $myhostname';;
8232 case "$myhostname" in
8233 '') myhostname=noname ;;
8235 : you do not want to know about this
8240 if $test "$myhostname" ; then
8242 rp='Your host name appears to be "'$myhostname'".'" Right?"
8250 : bad guess or no guess
8251 while $test "X$myhostname" = X ; do
8253 rp="Please type the (one word) name of your host:"
8258 : translate upper to lower if necessary
8259 case "$myhostname" in
8261 echo "(Normalizing case in your host name)"
8262 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8266 case "$myhostname" in
8268 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8269 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8270 echo "(Trimming domain name from host name--host name is now $myhostname)"
8272 *) case "$mydomain" in
8275 test "X$hostcat" = "Xypcat hosts" &&
8276 ypmatch "$myhostname" hosts 2>/dev/null |\
8277 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8280 test "X$hostcat" != "X" &&
8281 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8282 /[ ]$myhostname[ . ]/p" > hosts
8285 if $test -f hosts; then
8286 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8287 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8288 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8289 hosts | $sort | $uniq | \
8290 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8291 case `$echo X$dflt` in
8292 X*\ *) echo "(Several hosts in the database matched hostname)"
8295 X.) echo "(You do not have fully-qualified names in the hosts database)"
8299 echo "(I cannot locate a hosts database anywhere)"
8304 tans=`./loc resolv.conf X /etc /usr/etc`
8305 if $test -f "$tans"; then
8306 echo "(Attempting domain name extraction from $tans)"
8307 dflt=.`$sed -n -e 's/ / /g' \
8308 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8309 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8311 .) dflt=.`$sed -n -e 's/ / /g' \
8312 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8313 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8320 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8321 dflt=.`sh -c domainname 2>/dev/null`
8324 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8328 case "$dflt$osname" in
8329 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8330 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8334 .) echo "(Lost all hope -- silly guess then)"
8340 *) dflt="$mydomain";;
8344 rp="What is your domain name?"
8354 : translate upper to lower if necessary
8357 echo "(Normalizing case in your domain name)"
8358 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8362 : a little sanity check here
8363 case "$phostname" in
8366 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8367 $myhostname$mydomain|$myhostname) ;;
8369 case "$phostname" in
8371 echo "(That doesn't agree with your whoami.h file, by the way.)"
8374 echo "(That doesn't agree with your $phostname command, by the way.)"
8384 I need to get your e-mail address in Internet format if possible, i.e.
8385 something like user@host.domain. Please answer accurately since I have
8386 no easy means to double check it. The default value provided below
8387 is most probably close to reality but may not be valid from outside
8388 your organization...
8392 while test "$cont"; do
8394 '') dflt="$cf_by@$myhostname$mydomain";;
8395 *) dflt="$cf_email";;
8397 rp='What is your e-mail address?'
8403 rp='Address does not look like an Internet one. Use it anyway?'
8419 If you or somebody else will be maintaining perl at your site, please
8420 fill in the correct e-mail address here so that they may be contacted
8421 if necessary. Currently, the "perlbug" program included with perl
8422 will send mail to this address in addition to perlbug@perl.org. You may
8423 enter "none" for no administrator.
8426 case "$perladmin" in
8427 '') dflt="$cf_email";;
8428 *) dflt="$perladmin";;
8430 rp='Perl administrator e-mail address'
8434 : determine whether to only install version-specific parts.
8437 Do you want to install only the version-specific parts of the perl
8438 distribution? Usually you do *not* want to do this.
8440 case "$versiononly" in
8441 "$define"|[Yy]*|true) dflt='y' ;;
8444 rp="Do you want to install only the version-specific parts of perl?"
8447 [yY]*) val="$define";;
8453 case "$versiononly" in
8454 "$define") inc_version_list=''
8455 inc_version_list_init=0
8459 : figure out how to guarantee perl startup
8460 case "$startperl" in
8462 case "$sharpbang" in
8466 I can use the #! construct to start perl on your system. This will
8467 make startup of perl scripts faster, but may cause problems if you
8468 want to share those scripts and perl is not in a standard place
8469 ($binexp/perl) on all your platforms. The alternative is to force
8470 a shell by starting the script with a single ':' character.
8473 case "$versiononly" in
8474 "$define") dflt="$binexp/perl$version";;
8475 *) dflt="$binexp/perl";;
8477 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8480 none) startperl=": # use perl";;
8481 *) startperl="#!$ans"
8482 if $test 30 -lt `echo "$ans" | wc -c`; then
8485 WARNING: Some systems limit the #! command to 32 characters.
8486 If you experience difficulty running Perl scripts with #!, try
8487 installing Perl in a directory with a shorter pathname.
8493 *) startperl=": # use perl"
8498 echo "I'll use $startperl to start perl scripts."
8500 : figure best path for perl in scripts
8503 case "$versiononly" in
8504 "$define") perlpath="$binexp/perl$version";;
8505 *) perlpath="$binexp/perl";;
8507 case "$startperl" in
8512 I will use the "eval 'exec'" idiom to start Perl on your system.
8513 I can use the full path of your Perl binary for this purpose, but
8514 doing so may cause problems if you want to share those scripts and
8515 Perl is not always in a standard place ($binexp/perl).
8519 rp="What path shall I use in \"eval 'exec'\"?"
8526 case "$startperl" in
8528 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8531 : determine where public executable scripts go
8532 set scriptdir scriptdir
8534 case "$scriptdir" in
8537 : guess some guesses
8538 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8539 $test -d /usr/share/bin && dflt=/usr/share/bin
8540 $test -d /usr/local/script && dflt=/usr/local/script
8541 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8542 $test -d $prefixexp/script && dflt=$prefixexp/script
8546 *) dflt="$scriptdir"
8551 Some installations have a separate directory just for executable scripts so
8552 that they can mount it across multiple architectures but keep the scripts in
8553 one spot. You might, for example, have a subdirectory of /usr/share for this.
8554 Or you might just lump your scripts in with all your other executables.
8558 rp='Where do you keep publicly executable scripts?'
8560 if $test "X$ansexp" != "X$scriptdirexp"; then
8564 scriptdirexp="$ansexp"
8565 : Change installation prefix, if necessary.
8566 if $test X"$prefix" != X"$installprefix"; then
8567 installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
8569 installscript="$scriptdirexp"
8572 : determine where add-on public executables go
8574 '') dflt=$siteprefix/bin ;;
8578 rp='Pathname where the add-on public executables should be installed?'
8581 sitebinexp="$ansexp"
8582 : Change installation prefix, if necessary.
8583 if $test X"$prefix" != X"$installprefix"; then
8584 installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
8586 installsitebin="$sitebinexp"
8589 : define an is-a-typedef? function
8590 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8592 "") inclist="sys/types.h";;
8594 eval "varval=\$$var";
8598 for inc in $inclist; do
8599 echo "#include <$inc>" >>temp.c;
8601 echo "#ifdef $type" >> temp.c;
8602 echo "printf(\"We have $type\");" >> temp.c;
8603 echo "#endif" >> temp.c;
8604 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8605 if $contains $type temp.E >/dev/null 2>&1; then
8611 *) eval "$var=\$varval";;
8614 : define an is-a-typedef? function that prompts if the type is not available.
8615 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8617 "") inclist="sys/types.h";;
8619 eval "varval=\$$var";
8623 for inc in $inclist; do
8624 echo "#include <$inc>" >>temp.c;
8626 echo "#ifdef $type" >> temp.c;
8627 echo "printf(\"We have $type\");" >> temp.c;
8628 echo "#endif" >> temp.c;
8629 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8631 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
8632 if $contains $type temp.E >/dev/null 2>&1; then
8633 echo "$type found." >&4;
8636 echo "$type NOT found." >&4;
8642 *) eval "$var=\$varval";;
8645 : see what type lseek is declared as in the kernel
8646 rp="What is the type used for lseek's offset on this system?"
8647 set off_t lseektype long stdio.h sys/types.h
8651 echo "Checking to see how big your file offsets are..." >&4
8653 #include <sys/types.h>
8657 printf("%d\n", (int)sizeof($lseektype));
8662 if eval $compile_ok; then
8663 lseeksize=`$run ./try`
8664 echo "Your file offsets are $lseeksize bytes long."
8668 echo "(I can't seem to compile the test program. Guessing...)"
8669 rp="What is the size of your file offsets (in bytes)?"
8675 : see what type file positions are declared as in the library
8676 rp="What is the type for file position used by fsetpos()?"
8677 set fpos_t fpostype long stdio.h sys/types.h
8682 *_t) zzz="$fpostype" ;;
8685 echo "Checking the size of $zzz..." >&4
8687 #include <sys/types.h>
8690 printf("%d\n", (int)sizeof($fpostype));
8695 if eval $compile_ok; then
8699 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8702 echo "Your $zzz is $fpossize bytes long."
8708 echo "(I can't compile the test program. Guessing...)" >&4
8709 rp="What is the size of your file positions (in bytes)?"
8716 # Backward compatibility (uselfs is deprecated).
8718 "$define"|true|[yY]*)
8721 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
8723 uselargefiles="$define"
8727 case "$lseeksize:$fpossize" in
8730 You can have files larger than 2 gigabytes.
8733 *) case "$uselargefiles" in
8734 "$undef"|false|[nN]*) dflt='n' ;;
8739 Perl can be built to understand large files (files larger than 2 gigabytes)
8740 on some systems. To do so, Configure can be run with -Duselargefiles.
8742 If this doesn't make any sense to you, just accept the default '$dflt'.
8744 rp='Try to understand large files, if available?'
8747 y|Y) val="$define" ;;
8754 case "$uselargefiles" in
8756 : Look for a hint-file generated 'call-back-unit'. If the
8757 : user has specified that a large files perl is to be built,
8758 : we may need to set or change some other defaults.
8759 if $test -f uselargefiles.cbu; then
8760 echo "Your platform has some specific hints for large file builds, using them..."
8761 . ./uselargefiles.cbu
8763 echo "Rechecking to see how big your file offsets are..." >&4
8765 #include <sys/types.h>
8769 printf("%d\n", (int)sizeof($lseektype));
8774 if eval $compile_ok; then
8775 lseeksize=`$run ./try`
8776 $echo "Your file offsets are now $lseeksize bytes long."
8780 echo "(I can't seem to compile the test program. Guessing...)"
8781 rp="What is the size of your file offsets (in bytes)?"
8786 *_t) zzz="$fpostype" ;;
8789 $echo $n "Rechecking the size of $zzz...$c" >&4
8791 #include <sys/types.h>
8794 printf("%d\n", (int)sizeof($fpostype));
8799 if eval $compile_ok; then
8804 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8807 echo " $fpossize bytes." >&4
8813 echo "(I can't compile the test program. Guessing...)" >&4
8814 rp="What is the size of your file positions (in bytes)?"
8823 case "$vendorprefix" in
8824 '') d_vendorbin="$undef"
8828 *) d_vendorbin="$define"
8829 : determine where vendor-supplied executables go.
8830 case "$vendorbin" in
8831 '') dflt=$vendorprefix/bin ;;
8832 *) dflt="$vendorbin" ;;
8835 rp='Pathname for the vendor-supplied executables directory?'
8838 vendorbinexp="$ansexp"
8841 : Change installation prefix, if necessary.
8842 if $test X"$prefix" != X"$installprefix"; then
8843 installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
8845 installvendorbin="$vendorbinexp"
8848 : see if qgcvt exists
8852 : Check how to convert floats to strings.
8854 if test "X$d_Gconvert" = X; then
8857 echo "Checking for an efficient way to convert floats to strings."
8859 case "$uselongdouble" in
8860 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
8862 case "$d_longdbl" in
8863 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
8865 case "$d_PRIgldbl" in
8866 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
8870 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
8871 char *myname = "gconvert";
8874 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
8875 char *myname = "gcvt";
8878 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
8879 char *myname = "qgcvt";
8880 #define DOUBLETYPE long double
8883 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8885 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
8887 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
8890 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
8892 char *myname = "sprintf";
8896 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8897 #define DOUBLETYPE long double
8899 #define DOUBLETYPE double
8905 #define I_STDLIB $i_stdlib
8911 checkit(expect, got)
8915 if (strcmp(expect, got)) {
8916 printf("%s oddity: Expected %s, got %s\n",
8917 myname, expect, got);
8927 /* This must be 1st test on (which?) platform */
8928 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
8929 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
8930 checkit("0.1", buf);
8932 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
8933 checkit("0.01", buf);
8935 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
8936 checkit("0.001", buf);
8938 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
8939 checkit("0.0001", buf);
8941 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
8942 if (strlen(buf) > 5)
8943 checkit("9e-005", buf); /* for Microsoft ?? */
8945 checkit("9e-05", buf);
8947 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
8950 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
8951 checkit("1.1", buf);
8953 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
8954 checkit("1.01", buf);
8956 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
8957 checkit("1.001", buf);
8959 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
8960 checkit("1.0001", buf);
8962 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
8963 checkit("1.00001", buf);
8965 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
8966 checkit("1.000001", buf);
8968 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
8971 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
8974 /* Some Linux gcvt's give 1.e+5 here. */
8975 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
8976 checkit("100000", buf);
8978 /* Some Linux gcvt's give -1.e+5 here. */
8979 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
8980 checkit("-100000", buf);
8982 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
8983 checkit("123.456", buf);
8985 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
8986 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
8987 /* 34 should be enough to scare even long double
8988 * places into using the e notation. */
8989 if (strlen(buf) > 5)
8990 checkit("1e+034", buf); /* for Microsoft */
8992 checkit("1e+34", buf);
8994 /* For Perl, if you add additional tests here, also add them to
8995 * t/base/num.t for benefit of platforms not using Configure or
8996 * overriding d_Gconvert */
9001 : first add preferred functions to our list
9003 for xxx_convert in $gconvert_preference; do
9004 case $xxx_convert in
9005 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
9006 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
9009 : then add any others
9010 for xxx_convert in gconvert gcvt sprintf; do
9013 *) xxx_list="$xxx_list $xxx_convert" ;;
9017 case "$d_longdbl$uselongdouble" in
9019 : again, add prefered functions to our list first
9021 for xxx_convert in $gconvert_ld_preference; do
9022 case $xxx_convert in
9023 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9024 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
9027 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
9028 for xxx_convert in qgcvt sprintf $xxx_list; do
9029 case "$xxx_ld_list" in
9030 $xxx_convert*|*" $xxx_convert"*) ;;
9031 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9034 : if sprintf cannot do long doubles, move it to the end
9035 if test "$d_PRIgldbl" != "$define"; then
9036 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
9038 : if no qgcvt, remove it
9039 if test "$d_qgcvt" != "$define"; then
9040 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
9043 xxx_list="$xxx_ld_list"
9047 for xxx_convert in $xxx_list; do
9048 echo "Trying $xxx_convert..."
9050 set try -DTRY_$xxx_convert
9051 if eval $compile; then
9052 echo "$xxx_convert() found." >&4
9054 echo "I'll use $xxx_convert to convert floats into a string." >&4
9057 echo "...But $xxx_convert didn't work as I expected."
9061 echo "$xxx_convert NOT found." >&4
9065 if test X$xxx_convert = X; then
9066 echo "*** WHOA THERE!!! ***" >&4
9067 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
9071 case "$xxx_convert" in
9072 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
9073 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
9074 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
9075 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
9076 "$define$define$define")
9077 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9078 "$define$define$undef")
9079 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9080 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9087 : see if _fwalk exists
9091 : Initialize h_fcntl
9094 : Initialize h_sysfile
9097 : access call always available on UNIX
9101 : locate the flags for 'access()'
9105 $cat >access.c <<'EOCP'
9106 #include <sys/types.h>
9111 #include <sys/file.h>
9120 : check sys/file.h first, no particular reason here
9121 if $test `./findhdr sys/file.h` && \
9122 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9124 echo "<sys/file.h> defines the *_OK access constants." >&4
9125 elif $test `./findhdr fcntl.h` && \
9126 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9128 echo "<fcntl.h> defines the *_OK access constants." >&4
9129 elif $test `./findhdr unistd.h` && \
9130 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9131 echo "<unistd.h> defines the *_OK access constants." >&4
9133 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9139 : see if accessx exists
9140 set accessx d_accessx
9143 : see if alarm exists
9147 : see if POSIX threads are available
9148 set pthread.h i_pthread
9151 : define a fucntion to check prototypes
9152 $cat > protochk <<EOSH
9155 optimize="$optimize"
9157 prototype="$prototype"
9160 usethreads=$usethreads
9161 i_pthread=$i_pthread
9162 pthread_h_first=$pthread_h_first
9165 $cat >> protochk <<'EOSH'
9170 while test $# -ge 2; do
9172 $define) echo "#include <$2>" >> try.c ;;
9173 literal) echo "$2" >> try.c ;;
9175 # Extra magic for the benefit of systems that need pthread.h
9176 # to be included early to correctly detect threadsafe functions.
9177 # Such functions must guarantee themselves, though, that the usethreads
9178 # and i_pthread have been defined, before calling protochk.
9179 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
9180 echo "#include <pthread.h>" >> try.c
9185 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
9186 cat >> try.c <<'EOCP'
9187 #ifdef CAN_PROTOTYPE
9188 #define _(args) args
9193 echo "$foo" >> try.c
9194 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
9195 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
9203 : see if sys/types.h has to be included
9204 set sys/types.h i_systypes
9207 : see if sys/select.h has to be included
9208 set sys/select.h i_sysselct
9211 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9212 while $test $# -ge 2; do
9214 $define) echo "#include <$2>";;
9218 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9220 if eval $compile; then
9229 : see if we should include time.h, sys/time.h, or both
9231 if test "X$timeincl" = X; then
9232 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9233 $echo $n "I'm now running the test program...$c"
9234 $cat >try.c <<'EOCP'
9235 #include <sys/types.h>
9240 #ifdef SYSTIMEKERNEL
9243 #include <sys/time.h>
9246 #include <sys/select.h>
9255 struct timezone tzp;
9257 if (foo.tm_sec == foo.tm_sec)
9260 if (bar.tv_sec == bar.tv_sec)
9267 for s_timezone in '-DS_TIMEZONE' ''; do
9269 for s_timeval in '-DS_TIMEVAL' ''; do
9270 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9271 for i_time in '' '-DI_TIME'; do
9272 for i_systime in '-DI_SYSTIME' ''; do
9275 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9276 if eval $compile; then
9277 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9281 $echo $n "Succeeded with $flags$c"
9293 *SYSTIMEKERNEL*) i_systimek="$define"
9294 timeincl=`./findhdr sys/time.h`
9295 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9296 *) i_systimek="$undef";;
9299 *I_TIME*) i_time="$define"
9300 timeincl=`./findhdr time.h`" $timeincl"
9301 echo "We'll include <time.h>." >&4;;
9302 *) i_time="$undef";;
9305 *I_SYSTIME*) i_systime="$define"
9306 timeincl=`./findhdr sys/time.h`" $timeincl"
9307 echo "We'll include <sys/time.h>." >&4;;
9308 *) i_systime="$undef";;
9312 : see if struct tm knows about tm_zone
9313 case "$i_systime$i_time" in
9316 echo "Checking to see if your struct tm has tm_zone field..." >&4
9317 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
9325 case "$d_tm_tm_zone" in
9326 "$define") echo "Yes, it does." ;;
9327 *) echo "No, it doesn't." ;;
9329 : see if struct tm knows about tm_gmtoff
9330 case "$i_systime$i_time" in
9333 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
9334 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
9342 case "$d_tm_tm_gmtoff" in
9343 "$define") echo "Yes, it does." ;;
9344 *) echo "No, it doesn't." ;;
9347 : see if asctime_r exists
9348 set asctime_r d_asctime_r
9350 case "$d_asctime_r" in
9352 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
9353 case "$d_asctime_r_proto:$usethreads" in
9354 ":define") d_asctime_r_proto=define
9355 set d_asctime_r_proto asctime_r $hdrs
9359 case "$d_asctime_r_proto" in
9361 case "$asctime_r_proto" in
9362 ''|0) try='char* asctime_r(const struct tm*, char*);'
9363 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;;
9365 case "$asctime_r_proto" in
9366 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
9367 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;;
9369 case "$asctime_r_proto" in
9370 ''|0) try='int asctime_r(const struct tm*, char*);'
9371 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;;
9373 case "$asctime_r_proto" in
9374 ''|0) try='int asctime_r(const struct tm*, char*, int);'
9375 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;;
9377 case "$asctime_r_proto" in
9378 ''|0) d_asctime_r=undef
9380 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
9381 * ) case "$asctime_r_proto" in
9382 REENTRANT_PROTO*) ;;
9383 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
9385 echo "Prototype: $try" ;;
9388 *) case "$usethreads" in
9389 define) echo "asctime_r has no prototype, not using it." >&4 ;;
9396 *) asctime_r_proto=0
9400 : see if atolf exists
9404 : see if atoll exists
9408 : Look for GNU-cc style attribute checking
9410 echo "Checking whether your compiler can handle __attribute__ ..." >&4
9411 $cat >attrib.c <<'EOCP'
9413 void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
9415 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9416 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9417 echo "Your C compiler doesn't fully support __attribute__."
9420 echo "Your C compiler supports __attribute__."
9424 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9431 : see if bcmp exists
9435 : see if bcopy exists
9439 : see if this is a unistd.h system
9440 set unistd.h i_unistd
9443 : see if getpgrp exists
9444 set getpgrp d_getpgrp
9447 case "$d_getpgrp" in
9450 echo "Checking to see which flavor of getpgrp is in use..."
9453 #include <sys/types.h>
9455 # include <unistd.h>
9459 if (getuid() == 0) {
9460 printf("(I see you are running Configure as super-user...)\n");
9464 if (getpgrp(1) == 0)
9473 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9474 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
9476 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9477 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
9480 echo "I can't seem to compile and run the test program."
9482 xxx="a USG one, i.e. you use getpgrp()."
9484 # SVR4 systems can appear rather BSD-ish.
9487 xxx="a BSD one, i.e. you use getpgrp(pid)."
9491 xxx="probably a USG one, i.e. you use getpgrp()."
9496 echo "Assuming your getpgrp is $xxx" >&4
9505 : see if setpgrp exists
9506 set setpgrp d_setpgrp
9509 case "$d_setpgrp" in
9512 echo "Checking to see which flavor of setpgrp is in use..."
9515 #include <sys/types.h>
9517 # include <unistd.h>
9521 if (getuid() == 0) {
9522 printf("(I see you are running Configure as super-user...)\n");
9526 if (-1 == setpgrp(1, 1))
9529 if (setpgrp() != -1)
9535 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9536 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
9538 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9539 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
9542 echo "(I can't seem to compile and run the test program.)"
9544 xxx="a USG one, i.e. you use setpgrp()."
9546 # SVR4 systems can appear rather BSD-ish.
9549 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
9553 xxx="probably a USG one, i.e. you use setpgrp()."
9558 echo "Assuming your setpgrp is $xxx" >&4
9566 : see if bzero exists
9570 : see if signal is declared as pointer to function returning int or void
9572 xxx=`./findhdr signal.h`
9573 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
9574 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9575 echo "You have int (*signal())() instead of void." >&4
9577 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9578 echo "You have void (*signal())()." >&4
9580 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
9581 echo "You have int (*signal())() instead of void." >&4
9583 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
9584 echo "You have void (*signal())()." >&4
9587 case "$d_voidsig" in
9589 echo "I can't determine whether signal handler returns void or int..." >&4
9591 rp="What type does your signal handler return?"
9598 echo "As you already told me, signal handler returns void." >&4
9601 *) echo "As you already told me, signal handler returns int." >&4
9608 case "$d_voidsig" in
9609 "$define") signal_t="void";;
9614 : check for ability to cast large floats to 32-bit ints.
9616 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
9617 if $test "$intsize" -ge 4; then
9624 #include <sys/types.h>
9626 $signal_t blech(s) int s; { exit(3); }
9633 signal(SIGFPE, blech);
9635 /* Don't let compiler optimize the test away. Store the number
9636 in a writable string for gcc to pass to sscanf under HP/UX.
9638 sprintf(str, "2147483647");
9639 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
9643 /* x86 processors will probably give 0x8000 0000, which is a
9644 sign change. We don't want that. We want to mimic SPARC
9645 behavior here, which is to preserve the sign and give
9648 if (i32 != ($xxx) f)
9654 if eval $compile_ok; then
9658 echo "(I can't seem to compile the test program--assuming it can't)"
9666 echo "Nope, it can't."
9673 : check for ability to cast negative floats to unsigned
9675 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
9678 #include <sys/types.h>
9680 $signal_t blech(s) int s; { exit(7); }
9681 $signal_t blech_in_list(s) int s; { exit(4); }
9682 unsigned long dummy_long(p) unsigned long p; { return p; }
9683 unsigned int dummy_int(p) unsigned int p; { return p; }
9684 unsigned short dummy_short(p) unsigned short p; { return p; }
9688 unsigned long along;
9690 unsigned short ashort;
9694 /* Frustrate gcc-2.7.2's optimizer which failed this test with
9695 a direct f = -123. assignment. gcc-2.8.0 reportedly
9696 optimized the whole file away
9698 /* Store the number in a writable string for gcc to pass to
9701 sprintf(str, "-123");
9702 sscanf(str, "%lf", &f); /* f = -123.; */
9704 signal(SIGFPE, blech);
9705 along = (unsigned long)f;
9706 aint = (unsigned int)f;
9707 ashort = (unsigned short)f;
9708 if (along != (unsigned long)-123)
9710 if (aint != (unsigned int)-123)
9712 if (ashort != (unsigned short)-123)
9714 sprintf(str, "1073741824.");
9715 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
9718 along = (unsigned long)f;
9719 if (along != 0x80000000)
9723 along = (unsigned long)f;
9724 if (along != 0x7fffffff)
9728 along = (unsigned long)f;
9729 if (along != 0x80000001)
9733 signal(SIGFPE, blech_in_list);
9734 sprintf(str, "123.");
9735 sscanf(str, "%lf", &f); /* f = 123.; */
9736 along = dummy_long((unsigned long)f);
9737 aint = dummy_int((unsigned int)f);
9738 ashort = dummy_short((unsigned short)f);
9739 if (along != (unsigned long)123)
9741 if (aint != (unsigned int)123)
9743 if (ashort != (unsigned short)123)
9750 if eval $compile_ok; then
9754 echo "(I can't seem to compile the test program--assuming it can't)"
9757 case "$castflags" in
9762 echo "Nope, it can't."
9769 : see if vprintf exists
9771 if set vprintf val -f d_vprintf; eval $csym; $val; then
9772 echo 'vprintf() found.' >&4
9775 #include <varargs.h>
9777 int main() { xxx("foo"); }
9786 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
9790 if eval $compile && $run ./try; then
9791 echo "Your vsprintf() returns (int)." >&4
9794 echo "Your vsprintf() returns (char*)." >&4
9798 echo 'vprintf() NOT found.' >&4
9809 : see if chown exists
9813 : see if chroot exists
9817 : see if chsize exists
9821 : see if class exists
9825 hasstruct='varname=$1; struct=$2; shift; shift;
9826 while $test $# -ge 2; do
9828 $define) echo "#include <$2>";;
9832 echo "int main () { struct $struct foo; }" >> try.c;
9834 if eval $compile; then
9845 : see whether socket exists
9847 $echo $n "Hmm... $c" >&4
9848 if set socket val -f d_socket; eval $csym; $val; then
9849 echo "Looks like you have Berkeley networking support." >&4
9851 if set setsockopt val -f; eval $csym; $val; then
9854 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
9858 if $contains socklib libc.list >/dev/null 2>&1; then
9859 echo "Looks like you have Berkeley networking support." >&4
9861 : we will have to assume that it supports the 4.2 BSD interface
9864 echo "You don't have Berkeley networking in libc$_a..." >&4
9865 if test "X$d_socket" = "X$define"; then
9866 echo "...but you seem to believe that you have sockets." >&4
9868 for net in net socket
9870 if test -f /usr/lib/lib$net$_a; then
9871 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
9872 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
9873 if $contains socket libc.list >/dev/null 2>&1; then
9878 echo "...but the Wollongong group seems to have hacked it in." >&4
9879 sockethdr="-I/usr/netinclude"
9882 echo "Found Berkeley sockets interface in lib$net." >&4
9883 if $contains setsockopt libc.list >/dev/null 2>&1; then
9886 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
9893 if test "X$d_socket" != "X$define"; then
9894 echo "or anywhere else I see." >&4
9902 : see if socketpair exists
9903 set socketpair d_sockpair
9908 echo "Checking the availability of certain socket constants..." >&4
9909 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
9910 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
9912 #include <sys/types.h>
9913 #include <sys/socket.h>
9919 set try; if eval $compile; then
9922 set d_${enum}; eval $setvar
9926 : see if this is a sys/uio.h system
9927 set sys/uio.h i_sysuio
9932 echo "Checking to see if your system supports struct cmsghdr..." >&4
9933 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
9935 case "$d_cmsghdr_s" in
9936 "$define") echo "Yes, it does." ;;
9937 *) echo "No, it doesn't." ;;
9941 : check for const keyword
9943 echo 'Checking to see if your C compiler knows about "const"...' >&4
9944 $cat >const.c <<'EOCP'
9945 typedef struct spug { int drokk; } spug;
9952 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
9954 echo "Yup, it does."
9957 echo "Nope, it doesn't."
9962 : see if crypt exists
9967 $define) cryptlib='' ;;
9968 *) if set crypt val -f d_crypt; eval $csym; $val; then
9969 echo 'crypt() found.' >&4
9973 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
9974 if $test -z "$cryptlib"; then
9975 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
9979 if $test -z "$cryptlib"; then
9980 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
9984 if $test -z "$cryptlib"; then
9985 cryptlib=`./loc libcrypt$_a "" $libpth`
9989 if $test -z "$cryptlib"; then
9990 echo 'crypt() NOT found.' >&4
10001 : see if this is a crypt.h system
10002 set crypt.h i_crypt
10005 : see if crypt_r exists
10006 set crypt_r d_crypt_r
10008 case "$d_crypt_r" in
10010 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
10011 case "$d_crypt_r_proto:$usethreads" in
10012 ":define") d_crypt_r_proto=define
10013 set d_crypt_r_proto crypt_r $hdrs
10017 case "$d_crypt_r_proto" in
10019 case "$crypt_r_proto" in
10020 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
10021 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCS ;;
10023 case "$crypt_r_proto" in
10024 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
10025 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCD ;;
10027 case "$crypt_r_proto" in
10028 ''|0) d_crypt_r=undef
10030 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
10031 * ) case "$crypt_r_proto" in
10032 REENTRANT_PROTO*) ;;
10033 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
10035 echo "Prototype: $try" ;;
10038 *) case "$usethreads" in
10039 define) echo "crypt_r has no prototype, not using it." >&4 ;;
10050 : get csh whereabouts
10052 'csh') val="$undef" ;;
10053 *) val="$define" ;;
10057 : Respect a hint or command line value for full_csh.
10058 case "$full_csh" in
10059 '') full_csh=$csh ;;
10062 : see if ctermid_r exists
10063 set ctermid_r d_ctermid_r
10065 case "$d_ctermid_r" in
10067 hdrs="$i_systypes sys/types.h define stdio.h "
10068 case "$d_ctermid_r_proto:$usethreads" in
10069 ":define") d_ctermid_r_proto=define
10070 set d_ctermid_r_proto ctermid_r $hdrs
10074 case "$d_ctermid_r_proto" in
10076 case "$ctermid_r_proto" in
10077 ''|0) try='char* ctermid_r(char*);'
10078 ./protochk "extern $try" $hdrs && ctermid_r_proto=B_B ;;
10080 case "$ctermid_r_proto" in
10081 ''|0) d_ctermid_r=undef
10083 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
10084 * ) case "$ctermid_r_proto" in
10085 REENTRANT_PROTO*) ;;
10086 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
10088 echo "Prototype: $try" ;;
10091 *) case "$usethreads" in
10092 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
10099 *) ctermid_r_proto=0
10103 : see if ctime_r exists
10104 set ctime_r d_ctime_r
10106 case "$d_ctime_r" in
10108 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
10109 case "$d_ctime_r_proto:$usethreads" in
10110 ":define") d_ctime_r_proto=define
10111 set d_ctime_r_proto ctime_r $hdrs
10115 case "$d_ctime_r_proto" in
10117 case "$ctime_r_proto" in
10118 ''|0) try='char* ctime_r(const time_t*, char*);'
10119 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;;
10121 case "$ctime_r_proto" in
10122 ''|0) try='char* ctime_r(const time_t*, char*, int);'
10123 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;;
10125 case "$ctime_r_proto" in
10126 ''|0) try='int ctime_r(const time_t*, char*);'
10127 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;;
10129 case "$ctime_r_proto" in
10130 ''|0) try='int ctime_r(const time_t*, char*, int);'
10131 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;;
10133 case "$ctime_r_proto" in
10134 ''|0) d_ctime_r=undef
10136 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
10137 * ) case "$ctime_r_proto" in
10138 REENTRANT_PROTO*) ;;
10139 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
10141 echo "Prototype: $try" ;;
10144 *) case "$usethreads" in
10145 define) echo "ctime_r has no prototype, not using it." >&4 ;;
10156 : see if cuserid exists
10157 set cuserid d_cuserid
10160 : see if this is a limits.h system
10161 set limits.h i_limits
10164 : see if this is a float.h system
10165 set float.h i_float
10168 : See if number of significant digits in a double precision number is known
10170 $cat >dbl_dig.c <<EOM
10171 #$i_limits I_LIMITS
10174 #include <limits.h>
10180 printf("Contains DBL_DIG");
10183 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
10184 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
10185 echo "DBL_DIG found." >&4
10188 echo "DBL_DIG NOT found." >&4
10195 : see if dbm.h is available
10196 : see if dbmclose exists
10197 set dbmclose d_dbmclose
10200 case "$d_dbmclose" in
10210 *) set rpcsvc/dbm.h i_rpcsvcdbm
10215 *) echo "We won't be including <dbm.h>"
10225 : see if prototype for dbminit is available
10227 set d_dbminitproto dbminit $i_dbm dbm.h
10230 : see if difftime exists
10231 set difftime d_difftime
10234 : see if this is a dirent system
10236 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
10238 echo "<dirent.h> found." >&4
10241 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
10242 echo "<sys/dir.h> found." >&4
10245 xinc=`./findhdr sys/ndir.h`
10247 echo "<dirent.h> NOT found." >&4
10252 : Look for type of directory structure.
10254 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10256 case "$direntrytype" in
10258 case "$i_dirent" in
10259 $define) guess1='struct dirent' ;;
10260 *) guess1='struct direct' ;;
10263 *) guess1="$direntrytype"
10268 'struct dirent') guess2='struct direct' ;;
10269 *) guess2='struct dirent' ;;
10272 if $contains "$guess1" try.c >/dev/null 2>&1; then
10273 direntrytype="$guess1"
10274 echo "Your directory entries are $direntrytype." >&4
10275 elif $contains "$guess2" try.c >/dev/null 2>&1; then
10276 direntrytype="$guess2"
10277 echo "Your directory entries seem to be $direntrytype." >&4
10279 echo "I don't recognize your system's directory entries." >&4
10280 rp="What type is used for directory entries on this system?"
10283 direntrytype="$ans"
10288 : see if the directory entry stores field length
10290 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10291 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
10292 echo "Good, your directory entry keeps length information in d_namlen." >&4
10295 echo "Your directory entry does not know about the d_namlen field." >&4
10302 : see if this is an sysdir system
10303 set sys/dir.h i_sysdir
10306 : see if this is an sysndir system
10307 set sys/ndir.h i_sysndir
10312 $cat >dirfd.c <<EOM
10314 #$i_dirent I_DIRENT /**/
10315 #$i_sysdir I_SYS_DIR /**/
10316 #$i_sysndir I_SYS_NDIR /**/
10317 #$i_systypes I_SYS_TYPES /**/
10318 #if defined(I_SYS_TYPES)
10319 #include <sys/types.h>
10321 #if defined(I_DIRENT)
10322 #include <dirent.h>
10323 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
10324 #include <sys/dir.h>
10328 #include <sys/ndir.h>
10332 #include <ndir.h> /* may be wrong in the future */
10334 #include <sys/dir.h>
10340 DIR *dirp = opendir(".");
10341 if (dirfd(dirp) >= 0)
10348 if eval $compile; then
10352 $define) echo "dirfd() found." >&4 ;;
10353 *) echo "dirfd() NOT found." >&4 ;;
10359 : see if dlerror exists
10362 set dlerror d_dlerror
10366 : see if dlfcn is available
10367 set dlfcn.h i_dlfcn
10374 On a few systems, the dynamically loaded modules that perl generates and uses
10375 will need a different extension than shared libs. The default will probably
10381 *) dflt="$dlext" ;;
10383 rp='What is the extension of dynamically loaded modules'
10392 : Check if dlsym need a leading underscore
10398 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
10399 $cat >dyna.c <<'EOM'
10408 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
10410 #include <sys/types.h>
10415 extern int fred() ;
10424 int mode = RTLD_LAZY ;
10426 handle = dlopen("./dyna.$dlext", mode) ;
10427 if (handle == NULL) {
10432 symbol = dlsym(handle, "fred") ;
10433 if (symbol == NULL) {
10434 /* try putting a leading underscore */
10435 symbol = dlsym(handle, "_fred") ;
10436 if (symbol == NULL) {
10449 : Call the object file tmp-dyna.o in case dlext=o.
10450 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
10451 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
10452 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
10453 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
10456 1) echo "Test program failed using dlopen." >&4
10457 echo "Perhaps you should not use dynamic loading." >&4;;
10458 2) echo "Test program failed using dlsym." >&4
10459 echo "Perhaps you should not use dynamic loading." >&4;;
10460 3) echo "dlsym needs a leading underscore" >&4
10462 4) echo "dlsym doesn't need a leading underscore." >&4;;
10465 echo "I can't compile and run the test program." >&4
10466 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
10471 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
10476 : see if drand48_r exists
10477 set drand48_r d_drand48_r
10479 case "$d_drand48_r" in
10481 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
10482 case "$d_drand48_r_proto:$usethreads" in
10483 ":define") d_drand48_r_proto=define
10484 set d_drand48_r_proto drand48_r $hdrs
10488 case "$d_drand48_r_proto" in
10490 case "$drand48_r_proto" in
10491 ''|0) try='int drand48_r(struct drand48_data*, double*);'
10492 ./protochk "extern $try" $hdrs && drand48_r_proto=I_ST ;;
10494 case "$drand48_r_proto" in
10495 ''|0) d_drand48_r=undef
10497 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
10498 * ) case "$drand48_r_proto" in
10499 REENTRANT_PROTO*) ;;
10500 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
10502 echo "Prototype: $try" ;;
10505 *) case "$usethreads" in
10506 define) echo "drand48_r has no prototype, not using it." >&4 ;;
10513 *) drand48_r_proto=0
10517 : see if prototype for drand48 is available
10519 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
10522 : see if dup2 exists
10526 : see if eaccess exists
10527 set eaccess d_eaccess
10530 : see if endgrent exists
10531 set endgrent d_endgrent
10534 : see if this is an grp system
10540 xxx=`./findhdr grp.h`
10541 $cppstdin $cppflags $cppminus < $xxx >$$.h
10543 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
10555 set d_grpasswd; eval $setvar
10559 : see if endgrent_r exists
10560 set endgrent_r d_endgrent_r
10562 case "$d_endgrent_r" in
10564 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
10565 case "$d_endgrent_r_proto:$usethreads" in
10566 ":define") d_endgrent_r_proto=define
10567 set d_endgrent_r_proto endgrent_r $hdrs
10571 case "$d_endgrent_r_proto" in
10573 case "$endgrent_r_proto" in
10574 ''|0) try='int endgrent_r(FILE**);'
10575 ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;;
10577 case "$endgrent_r_proto" in
10578 ''|0) try='void endgrent_r(FILE**);'
10579 ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;;
10581 case "$endgrent_r_proto" in
10582 ''|0) d_endgrent_r=undef
10584 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
10585 * ) case "$endgrent_r_proto" in
10586 REENTRANT_PROTO*) ;;
10587 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
10589 echo "Prototype: $try" ;;
10592 *) case "$usethreads" in
10593 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
10600 *) endgrent_r_proto=0
10604 : see if endhostent exists
10605 set endhostent d_endhent
10608 : see if this is a netdb.h system
10609 set netdb.h i_netdb
10612 : see if endhostent_r exists
10613 set endhostent_r d_endhostent_r
10615 case "$d_endhostent_r" in
10617 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10618 case "$d_endhostent_r_proto:$usethreads" in
10619 ":define") d_endhostent_r_proto=define
10620 set d_endhostent_r_proto endhostent_r $hdrs
10624 case "$d_endhostent_r_proto" in
10626 case "$endhostent_r_proto" in
10627 ''|0) try='int endhostent_r(struct hostent_data*);'
10628 ./protochk "extern $try" $hdrs && endhostent_r_proto=I_D ;;
10630 case "$endhostent_r_proto" in
10631 ''|0) try='void endhostent_r(struct hostent_data*);'
10632 ./protochk "extern $try" $hdrs && endhostent_r_proto=V_D ;;
10634 case "$endhostent_r_proto" in
10635 ''|0) d_endhostent_r=undef
10636 endhostent_r_proto=0
10637 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
10638 * ) case "$endhostent_r_proto" in
10639 REENTRANT_PROTO*) ;;
10640 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
10642 echo "Prototype: $try" ;;
10645 *) case "$usethreads" in
10646 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
10648 d_endhostent_r=undef
10649 endhostent_r_proto=0
10653 *) endhostent_r_proto=0
10657 : see if endnetent exists
10658 set endnetent d_endnent
10661 : see if endnetent_r exists
10662 set endnetent_r d_endnetent_r
10664 case "$d_endnetent_r" in
10666 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10667 case "$d_endnetent_r_proto:$usethreads" in
10668 ":define") d_endnetent_r_proto=define
10669 set d_endnetent_r_proto endnetent_r $hdrs
10673 case "$d_endnetent_r_proto" in
10675 case "$endnetent_r_proto" in
10676 ''|0) try='int endnetent_r(struct netent_data*);'
10677 ./protochk "extern $try" $hdrs && endnetent_r_proto=I_D ;;
10679 case "$endnetent_r_proto" in
10680 ''|0) try='void endnetent_r(struct netent_data*);'
10681 ./protochk "extern $try" $hdrs && endnetent_r_proto=V_D ;;
10683 case "$endnetent_r_proto" in
10684 ''|0) d_endnetent_r=undef
10685 endnetent_r_proto=0
10686 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
10687 * ) case "$endnetent_r_proto" in
10688 REENTRANT_PROTO*) ;;
10689 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
10691 echo "Prototype: $try" ;;
10694 *) case "$usethreads" in
10695 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
10697 d_endnetent_r=undef
10698 endnetent_r_proto=0
10702 *) endnetent_r_proto=0
10706 : see if endprotoent exists
10707 set endprotoent d_endpent
10710 : see if endprotoent_r exists
10711 set endprotoent_r d_endprotoent_r
10713 case "$d_endprotoent_r" in
10715 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10716 case "$d_endprotoent_r_proto:$usethreads" in
10717 ":define") d_endprotoent_r_proto=define
10718 set d_endprotoent_r_proto endprotoent_r $hdrs
10722 case "$d_endprotoent_r_proto" in
10724 case "$endprotoent_r_proto" in
10725 ''|0) try='int endprotoent_r(struct protoent_data*);'
10726 ./protochk "extern $try" $hdrs && endprotoent_r_proto=I_D ;;
10728 case "$endprotoent_r_proto" in
10729 ''|0) try='void endprotoent_r(struct protoent_data*);'
10730 ./protochk "extern $try" $hdrs && endprotoent_r_proto=V_D ;;
10732 case "$endprotoent_r_proto" in
10733 ''|0) d_endprotoent_r=undef
10734 endprotoent_r_proto=0
10735 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
10736 * ) case "$endprotoent_r_proto" in
10737 REENTRANT_PROTO*) ;;
10738 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
10740 echo "Prototype: $try" ;;
10743 *) case "$usethreads" in
10744 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
10746 d_endprotoent_r=undef
10747 endprotoent_r_proto=0
10751 *) endprotoent_r_proto=0
10755 : see if endpwent exists
10756 set endpwent d_endpwent
10759 : see if this is a pwd.h system
10765 xxx=`./findhdr pwd.h`
10766 $cppstdin $cppflags $cppminus < $xxx >$$.h
10768 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
10776 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
10784 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
10792 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
10800 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
10808 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
10816 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
10824 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
10836 set d_pwquota; eval $setvar
10837 set d_pwage; eval $setvar
10838 set d_pwchange; eval $setvar
10839 set d_pwclass; eval $setvar
10840 set d_pwexpire; eval $setvar
10841 set d_pwcomment; eval $setvar
10842 set d_pwgecos; eval $setvar
10843 set d_pwpasswd; eval $setvar
10847 : see if endpwent_r exists
10848 set endpwent_r d_endpwent_r
10850 case "$d_endpwent_r" in
10852 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
10853 case "$d_endpwent_r_proto:$usethreads" in
10854 ":define") d_endpwent_r_proto=define
10855 set d_endpwent_r_proto endpwent_r $hdrs
10859 case "$d_endpwent_r_proto" in
10861 case "$endpwent_r_proto" in
10862 ''|0) try='int endpwent_r(FILE**);'
10863 ./protochk "extern $try" $hdrs && endpwent_r_proto=I_H ;;
10865 case "$endpwent_r_proto" in
10866 ''|0) try='void endpwent_r(FILE**);'
10867 ./protochk "extern $try" $hdrs && endpwent_r_proto=V_H ;;
10869 case "$endpwent_r_proto" in
10870 ''|0) d_endpwent_r=undef
10872 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
10873 * ) case "$endpwent_r_proto" in
10874 REENTRANT_PROTO*) ;;
10875 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
10877 echo "Prototype: $try" ;;
10880 *) case "$usethreads" in
10881 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
10888 *) endpwent_r_proto=0
10892 : see if endservent exists
10893 set endservent d_endsent
10896 : see if endservent_r exists
10897 set endservent_r d_endservent_r
10899 case "$d_endservent_r" in
10901 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10902 case "$d_endservent_r_proto:$usethreads" in
10903 ":define") d_endservent_r_proto=define
10904 set d_endservent_r_proto endservent_r $hdrs
10908 case "$d_endservent_r_proto" in
10910 case "$endservent_r_proto" in
10911 ''|0) try='int endservent_r(struct servent_data*);'
10912 ./protochk "extern $try" $hdrs && endservent_r_proto=I_D ;;
10914 case "$endservent_r_proto" in
10915 ''|0) try='void endservent_r(struct servent_data*);'
10916 ./protochk "extern $try" $hdrs && endservent_r_proto=V_D ;;
10918 case "$endservent_r_proto" in
10919 ''|0) d_endservent_r=undef
10920 endservent_r_proto=0
10921 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
10922 * ) case "$endservent_r_proto" in
10923 REENTRANT_PROTO*) ;;
10924 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
10926 echo "Prototype: $try" ;;
10929 *) case "$usethreads" in
10930 define) echo "endservent_r has no prototype, not using it." >&4 ;;
10932 d_endservent_r=undef
10933 endservent_r_proto=0
10937 *) endservent_r_proto=0
10941 : Locate the flags for 'open()'
10943 $cat >try.c <<'EOCP'
10944 #include <sys/types.h>
10949 #include <sys/file.h>
10960 : check sys/file.h first to get FREAD on Sun
10961 if $test `./findhdr sys/file.h` && \
10962 set try -DI_SYS_FILE && eval $compile; then
10964 echo "<sys/file.h> defines the O_* constants..." >&4
10965 if $run ./try; then
10966 echo "and you have the 3 argument form of open()." >&4
10969 echo "but not the 3 argument form of open(). Oh, well." >&4
10972 elif $test `./findhdr fcntl.h` && \
10973 set try -DI_FCNTL && eval $compile; then
10975 echo "<fcntl.h> defines the O_* constants..." >&4
10976 if $run ./try; then
10977 echo "and you have the 3 argument form of open()." >&4
10980 echo "but not the 3 argument form of open(). Oh, well." >&4
10985 echo "I can't find the O_* constant definitions! You got problems." >&4
10991 : see which of string.h or strings.h is needed
10993 strings=`./findhdr string.h`
10994 if $test "$strings" && $test -r "$strings"; then
10995 echo "Using <string.h> instead of <strings.h>." >&4
10999 strings=`./findhdr strings.h`
11000 if $test "$strings" && $test -r "$strings"; then
11001 echo "Using <strings.h> instead of <string.h>." >&4
11003 echo "No string header found -- You'll surely have problems." >&4
11008 case "$i_string" in
11009 "$undef") strings=`./findhdr strings.h`;;
11010 *) strings=`./findhdr string.h`;;
11013 : see if this is a sys/file.h system
11018 : do we need to include sys/file.h ?
11022 if $h_sysfile; then
11024 echo "We'll be including <sys/file.h>." >&4
11027 echo "We won't be including <sys/file.h>." >&4
11037 : see if fcntl.h is there
11042 : see if we can include fcntl.h
11048 echo "We'll be including <fcntl.h>." >&4
11051 if $h_sysfile; then
11052 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
11054 echo "We won't be including <fcntl.h>." >&4
11066 : check for non-blocking I/O stuff
11067 case "$h_sysfile" in
11068 true) echo "#include <sys/file.h>" > head.c;;
11071 true) echo "#include <fcntl.h>" > head.c;;
11072 *) echo "#include <sys/fcntl.h>" > head.c;;
11077 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
11078 case "$o_nonblock" in
11080 $cat head.c > try.c
11081 $cat >>try.c <<EOCP
11083 #include <stdlib.h>
11090 printf("O_NONBLOCK\n");
11094 printf("O_NDELAY\n");
11098 printf("FNDELAY\n");
11105 if eval $compile_ok; then
11106 o_nonblock=`$run ./try`
11107 case "$o_nonblock" in
11108 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
11109 *) echo "Seems like we can use $o_nonblock.";;
11112 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
11115 *) echo "Using $hint value $o_nonblock.";;
11117 $rm -f try try.* .out core
11120 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
11123 $cat head.c > try.c
11124 $cat >>try.c <<EOCP
11126 #include <sys/types.h>
11127 #include <signal.h>
11129 #include <stdlib.h>
11134 #define MY_O_NONBLOCK $o_nonblock
11135 #ifndef errno /* XXX need better Configure test */
11138 #$i_unistd I_UNISTD
11140 #include <unistd.h>
11142 #$i_string I_STRING
11144 #include <string.h>
11146 #include <strings.h>
11148 $signal_t blech(x) int x; { exit(3); }
11150 $cat >> try.c <<'EOCP'
11158 pipe(pd); /* Down: child -> parent */
11159 pipe(pu); /* Up: parent -> child */
11162 close(pd[1]); /* Parent reads from pd[0] */
11163 close(pu[0]); /* Parent writes (blocking) to pu[1] */
11165 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
11170 signal(SIGALRM, blech);
11172 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
11174 sprintf(string, "%d\n", ret);
11175 write(2, string, strlen(string));
11178 if (errno == EAGAIN) {
11179 printf("EAGAIN\n");
11184 if (errno == EWOULDBLOCK)
11185 printf("EWOULDBLOCK\n");
11188 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
11189 sleep(2); /* Give it time to close our pipe */
11191 ret = read(pd[0], buf, 1); /* Should read EOF */
11193 sprintf(string, "%d\n", ret);
11194 write(4, string, strlen(string));
11198 close(pd[0]); /* We write to pd[1] */
11199 close(pu[1]); /* We read from pu[0] */
11200 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
11201 close(pd[1]); /* Pipe pd is now fully closed! */
11202 exit(0); /* Bye bye, thank you for playing! */
11206 if eval $compile_ok; then
11207 echo "$startsh" >mtry
11208 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
11210 ./mtry >/dev/null 2>&1
11212 0) eagain=`$cat try.out`;;
11213 1) echo "Could not perform non-blocking setting!";;
11214 2) echo "I did a successful read() for something that was not there!";;
11215 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
11216 4) echo "Could not find F_SETFL!";;
11217 *) echo "Something terribly wrong happened during testing.";;
11219 rd_nodata=`$cat try.ret`
11220 echo "A read() system call with no data present returns $rd_nodata."
11221 case "$rd_nodata" in
11224 echo "(That's peculiar, fixing that to be -1.)"
11230 echo "Forcing errno EAGAIN on read() with no data available."
11234 echo "Your read() sets errno to $eagain when no data is available."
11237 status=`$cat try.err`
11239 0) echo "And it correctly returns 0 to signal EOF.";;
11240 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
11241 *) echo "However, your read() returns '$status' on EOF??";;
11244 if test "$status" = "$rd_nodata"; then
11245 echo "WARNING: you can't distinguish between EOF and no data!"
11249 echo "I can't compile the test program--assuming errno EAGAIN will do."
11256 echo "Using $hint value $eagain."
11257 echo "Your read() returns $rd_nodata when no data is present."
11258 case "$d_eofnblk" in
11259 "$define") echo "And you can see EOF because read() returns 0.";;
11260 "$undef") echo "But you can't see EOF status from read() returned value.";;
11262 echo "(Assuming you can't see EOF status from read anyway.)"
11268 $rm -f try try.* .out core head.c mtry
11270 : see if fchdir exists
11271 set fchdir d_fchdir
11274 : see if fchmod exists
11275 set fchmod d_fchmod
11278 : see if fchown exists
11279 set fchown d_fchown
11282 : see if this is an fcntl system
11287 : See if fcntl-based locking works.
11289 #include <stdlib.h>
11290 #include <unistd.h>
11292 #include <signal.h>
11293 $signal_t blech(x) int x; { exit(3); }
11295 #if defined(F_SETLK) && defined(F_SETLKW)
11296 struct flock flock;
11298 fd = open("try.c", O_RDONLY);
11299 flock.l_type = F_RDLCK;
11300 flock.l_whence = SEEK_SET;
11301 flock.l_start = flock.l_len = 0;
11302 signal(SIGALRM, blech);
11304 retval = fcntl(fd, F_SETLK, &flock);
11306 (retval < 0 ? exit(2) : exit(0));
11312 echo "Checking if fcntl-based file locking works... "
11316 if eval $compile_ok; then
11317 if $run ./try; then
11318 echo "Yes, it seems to work."
11321 echo "Nope, it didn't work."
11326 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
11327 *** This is (almost) impossible.
11328 *** If your NFS lock daemons are not feeling well, something like
11329 *** this may happen, please investigate. Cannot continue, aborting.
11337 echo "I'm unable to compile the test program, so I'll assume not."
11342 echo "Nope, since you don't even have fcntl()."
11345 set d_fcntl_can_lock
11350 : check for fd_set items
11353 Checking to see how well your C compiler handles fd_set and friends ...
11356 #$i_systime I_SYS_TIME
11357 #$i_sysselct I_SYS_SELECT
11358 #$d_socket HAS_SOCKET
11359 #include <sys/types.h>
11361 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
11364 #include <sys/time.h>
11366 #ifdef I_SYS_SELECT
11367 #include <sys/select.h>
11376 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
11384 if eval $compile; then
11385 d_fds_bits="$define"
11387 echo "Well, your system knows about the normal fd_set typedef..." >&4
11388 if $run ./try; then
11389 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
11390 d_fd_macros="$define"
11393 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
11395 d_fd_macros="$undef"
11399 Hmm, your compiler has some difficulty with fd_set. Checking further...
11402 if eval $compile; then
11403 d_fds_bits="$undef"
11405 echo "Well, your system has some sort of fd_set available..." >&4
11406 if $run ./try; then
11407 echo "and you have the normal fd_set macros." >&4
11408 d_fd_macros="$define"
11411 but not the normal fd_set macros! Gross! More work for me...
11413 d_fd_macros="$undef"
11416 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
11418 d_fds_bits="$undef"
11419 d_fd_macros="$undef"
11424 : see if fgetpos exists
11425 set fgetpos d_fgetpos
11428 : see if finite exists
11429 set finite d_finite
11432 : see if finitel exists
11433 set finitel d_finitel
11436 : see if flock exists
11440 : see if prototype for flock is available
11442 set d_flockproto flock $i_sysfile sys/file.h
11445 : see if fork exists
11449 : see if fp_class exists
11450 set fp_class d_fp_class
11453 : see if pathconf exists
11454 set pathconf d_pathconf
11457 : see if fpathconf exists
11458 set fpathconf d_fpathconf
11461 : see if fpclass exists
11462 set fpclass d_fpclass
11465 : see if fpclassify exists
11466 set fpclassify d_fpclassify
11469 : see if fpclassl exists
11470 set fpclassl d_fpclassl
11474 : check for fpos64_t
11476 echo "Checking to see if you have fpos64_t..." >&4
11479 int main() { fpos64_t x = 7; }
11482 if eval $compile; then
11484 echo "You have fpos64_t."
11487 echo "You do not have fpos64_t."
11488 case "$fpossize" in
11489 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
11496 : see if frexpl exists
11497 set frexpl d_frexpl
11500 : see if this is a sys/param system
11501 set sys/param.h i_sysparam
11504 : see if this is a sys/mount.h system
11505 set sys/mount.h i_sysmount
11510 echo "Checking to see if your system supports struct fs_data..." >&4
11511 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
11513 case "$d_fs_data_s" in
11514 "$define") echo "Yes, it does." ;;
11515 *) echo "No, it doesn't." ;;
11518 : see if fseeko exists
11519 set fseeko d_fseeko
11521 case "$longsize" in
11522 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
11525 : see if fsetpos exists
11526 set fsetpos d_fsetpos
11530 : see if fstatfs exists
11531 set fstatfs d_fstatfs
11535 : see if statvfs exists
11536 set statvfs d_statvfs
11539 : see if fstatvfs exists
11540 set fstatvfs d_fstatvfs
11544 : see if fsync exists
11548 : see if ftello exists
11549 set ftello d_ftello
11551 case "$longsize" in
11552 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
11555 : see if getcwd exists
11556 set getcwd d_getcwd
11559 : see if getespwnam exists
11560 set getespwnam d_getespwnam
11564 : see if getfsstat exists
11565 set getfsstat d_getfsstat
11568 : see if getgrent exists
11569 set getgrent d_getgrent
11572 : see if getgrent_r exists
11573 set getgrent_r d_getgrent_r
11575 case "$d_getgrent_r" in
11577 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11578 case "$d_getgrent_r_proto:$usethreads" in
11579 ":define") d_getgrent_r_proto=define
11580 set d_getgrent_r_proto getgrent_r $hdrs
11584 case "$d_getgrent_r_proto" in
11586 case "$getgrent_r_proto" in
11587 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
11588 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBWR ;;
11590 case "$getgrent_r_proto" in
11591 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
11592 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIR ;;
11594 case "$getgrent_r_proto" in
11595 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
11596 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBW ;;
11598 case "$getgrent_r_proto" in
11599 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
11600 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBI ;;
11602 case "$getgrent_r_proto" in
11603 ''|0) try='int getgrent_r(struct group*, char*, int);'
11604 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBI ;;
11606 case "$getgrent_r_proto" in
11607 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
11608 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIH ;;
11610 case "$getgrent_r_proto" in
11611 ''|0) d_getgrent_r=undef
11613 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
11614 * ) case "$getgrent_r_proto" in
11615 REENTRANT_PROTO*) ;;
11616 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
11618 echo "Prototype: $try" ;;
11621 *) case "$usethreads" in
11622 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
11629 *) getgrent_r_proto=0
11633 : see if getgrgid_r exists
11634 set getgrgid_r d_getgrgid_r
11636 case "$d_getgrgid_r" in
11638 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11639 case "$d_getgrgid_r_proto:$usethreads" in
11640 ":define") d_getgrgid_r_proto=define
11641 set d_getgrgid_r_proto getgrgid_r $hdrs
11645 case "$d_getgrgid_r_proto" in
11647 case "$getgrgid_r_proto" in
11648 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
11649 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
11651 case "$getgrgid_r_proto" in
11652 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
11653 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
11655 case "$getgrgid_r_proto" in
11656 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
11657 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
11659 case "$getgrgid_r_proto" in
11660 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
11661 ./protochk "extern $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
11663 case "$getgrgid_r_proto" in
11664 ''|0) d_getgrgid_r=undef
11666 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
11667 * ) case "$getgrgid_r_proto" in
11668 REENTRANT_PROTO*) ;;
11669 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
11671 echo "Prototype: $try" ;;
11674 *) case "$usethreads" in
11675 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
11682 *) getgrgid_r_proto=0
11686 : see if getgrnam_r exists
11687 set getgrnam_r d_getgrnam_r
11689 case "$d_getgrnam_r" in
11691 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11692 case "$d_getgrnam_r_proto:$usethreads" in
11693 ":define") d_getgrnam_r_proto=define
11694 set d_getgrnam_r_proto getgrnam_r $hdrs
11698 case "$d_getgrnam_r_proto" in
11700 case "$getgrnam_r_proto" in
11701 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
11702 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
11704 case "$getgrnam_r_proto" in
11705 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
11706 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
11708 case "$getgrnam_r_proto" in
11709 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
11710 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CBI ;;
11712 case "$getgrnam_r_proto" in
11713 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
11714 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
11716 case "$getgrnam_r_proto" in
11717 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
11718 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
11720 case "$getgrnam_r_proto" in
11721 ''|0) d_getgrnam_r=undef
11723 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
11724 * ) case "$getgrnam_r_proto" in
11725 REENTRANT_PROTO*) ;;
11726 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
11728 echo "Prototype: $try" ;;
11731 *) case "$usethreads" in
11732 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
11739 *) getgrnam_r_proto=0
11743 : see if gethostbyaddr exists
11744 set gethostbyaddr d_gethbyaddr
11747 : see if gethostbyname exists
11748 set gethostbyname d_gethbyname
11751 : see if gethostent exists
11752 set gethostent d_gethent
11755 : see how we will look up host name
11758 if set gethostname val -f d_gethname; eval $csym; $val; then
11759 echo 'gethostname() found.' >&4
11760 d_gethname="$define"
11763 if set uname val -f d_uname; eval $csym; $val; then
11766 uname() was found, but you're running xenix, and older versions of xenix
11767 have a broken uname(). If you don't really know whether your xenix is old
11768 enough to have a broken system call, use the default answer.
11773 "$define") dflt=n;;
11775 rp='Is your uname() broken?'
11778 n*) d_uname="$define"; call=uname;;
11781 echo 'uname() found.' >&4
11788 case "$d_gethname" in
11789 '') d_gethname="$undef";;
11792 '') d_uname="$undef";;
11794 case "$d_uname$d_gethname" in
11799 Every now and then someone has a $call() that lies about the hostname
11800 but can't be fixed for political or economic reasons. If you wish, I can
11801 pretend $call() isn't there and maybe compute hostname at run-time
11802 thanks to the '$phostname' command.
11805 rp="Shall I ignore $call() from now on?"
11808 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
11811 case "$phostname" in
11812 '') aphostname='';;
11813 *) case "$aphostname" in
11815 *) set X $phostname
11819 file=`./loc $file $file $pth`
11820 aphostname=`echo $file $*`
11825 case "$d_uname$d_gethname" in
11828 case "$phostname" in
11830 echo "There will be no way for $package to get your hostname." >&4;;
11832 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
11836 case "$d_phostname" in
11837 '') d_phostname="$undef";;
11840 : see if gethostbyaddr_r exists
11841 set gethostbyaddr_r d_gethostbyaddr_r
11843 case "$d_gethostbyaddr_r" in
11845 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11846 case "$d_gethostbyaddr_r_proto:$usethreads" in
11847 ":define") d_gethostbyaddr_r_proto=define
11848 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
11852 case "$d_gethostbyaddr_r_proto" in
11854 case "$gethostbyaddr_r_proto" in
11855 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
11856 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
11858 case "$gethostbyaddr_r_proto" in
11859 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
11860 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
11862 case "$gethostbyaddr_r_proto" in
11863 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
11864 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
11866 case "$gethostbyaddr_r_proto" in
11867 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
11868 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
11870 case "$gethostbyaddr_r_proto" in
11871 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
11872 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
11874 case "$gethostbyaddr_r_proto" in
11875 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
11876 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
11878 case "$gethostbyaddr_r_proto" in
11879 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
11880 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
11882 case "$gethostbyaddr_r_proto" in
11883 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
11884 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
11886 case "$gethostbyaddr_r_proto" in
11887 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
11888 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
11890 case "$gethostbyaddr_r_proto" in
11891 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
11892 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
11894 case "$gethostbyaddr_r_proto" in
11895 ''|0) d_gethostbyaddr_r=undef
11896 gethostbyaddr_r_proto=0
11897 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
11898 * ) case "$gethostbyaddr_r_proto" in
11899 REENTRANT_PROTO*) ;;
11900 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
11902 echo "Prototype: $try" ;;
11905 *) case "$usethreads" in
11906 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
11908 d_gethostbyaddr_r=undef
11909 gethostbyaddr_r_proto=0
11913 *) gethostbyaddr_r_proto=0
11917 : see if gethostbyname_r exists
11918 set gethostbyname_r d_gethostbyname_r
11920 case "$d_gethostbyname_r" in
11922 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11923 case "$d_gethostbyname_r_proto:$usethreads" in
11924 ":define") d_gethostbyname_r_proto=define
11925 set d_gethostbyname_r_proto gethostbyname_r $hdrs
11929 case "$d_gethostbyname_r_proto" in
11931 case "$gethostbyname_r_proto" in
11932 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
11933 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
11935 case "$gethostbyname_r_proto" in
11936 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
11937 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
11939 case "$gethostbyname_r_proto" in
11940 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
11941 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
11943 case "$gethostbyname_r_proto" in
11944 ''|0) d_gethostbyname_r=undef
11945 gethostbyname_r_proto=0
11946 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
11947 * ) case "$gethostbyname_r_proto" in
11948 REENTRANT_PROTO*) ;;
11949 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
11951 echo "Prototype: $try" ;;
11954 *) case "$usethreads" in
11955 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
11957 d_gethostbyname_r=undef
11958 gethostbyname_r_proto=0
11962 *) gethostbyname_r_proto=0
11966 : see if gethostent_r exists
11967 set gethostent_r d_gethostent_r
11969 case "$d_gethostent_r" in
11971 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11972 case "$d_gethostent_r_proto:$usethreads" in
11973 ":define") d_gethostent_r_proto=define
11974 set d_gethostent_r_proto gethostent_r $hdrs
11978 case "$d_gethostent_r_proto" in
11980 case "$gethostent_r_proto" in
11981 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
11982 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
11984 case "$gethostent_r_proto" in
11985 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
11986 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBIE ;;
11988 case "$gethostent_r_proto" in
11989 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
11990 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBIE ;;
11992 case "$gethostent_r_proto" in
11993 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
11994 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBI ;;
11996 case "$gethostent_r_proto" in
11997 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
11998 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBI ;;
12000 case "$gethostent_r_proto" in
12001 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
12002 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SD ;;
12004 case "$gethostent_r_proto" in
12005 ''|0) d_gethostent_r=undef
12006 gethostent_r_proto=0
12007 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
12008 * ) case "$gethostent_r_proto" in
12009 REENTRANT_PROTO*) ;;
12010 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
12012 echo "Prototype: $try" ;;
12015 *) case "$usethreads" in
12016 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
12018 d_gethostent_r=undef
12019 gethostent_r_proto=0
12023 *) gethostent_r_proto=0
12027 : see if prototypes for various gethostxxx netdb.h functions are available
12029 set d_gethostprotos gethostent $i_netdb netdb.h
12032 : see if getitimer exists
12033 set getitimer d_getitimer
12036 : see if getlogin exists
12037 set getlogin d_getlogin
12040 : see if getlogin_r exists
12041 set getlogin_r d_getlogin_r
12043 case "$d_getlogin_r" in
12045 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
12046 case "$d_getlogin_r_proto:$usethreads" in
12047 ":define") d_getlogin_r_proto=define
12048 set d_getlogin_r_proto getlogin_r $hdrs
12052 case "$d_getlogin_r_proto" in
12054 case "$getlogin_r_proto" in
12055 ''|0) try='int getlogin_r(char*, size_t);'
12056 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BW ;;
12058 case "$getlogin_r_proto" in
12059 ''|0) try='int getlogin_r(char*, int);'
12060 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BI ;;
12062 case "$getlogin_r_proto" in
12063 ''|0) try='char* getlogin_r(char*, size_t);'
12064 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BW ;;
12066 case "$getlogin_r_proto" in
12067 ''|0) try='char* getlogin_r(char*, int);'
12068 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BI ;;
12070 case "$getlogin_r_proto" in
12071 ''|0) d_getlogin_r=undef
12073 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
12074 * ) case "$getlogin_r_proto" in
12075 REENTRANT_PROTO*) ;;
12076 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
12078 echo "Prototype: $try" ;;
12081 *) case "$usethreads" in
12082 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
12089 *) getlogin_r_proto=0
12093 : see if getmnt exists
12094 set getmnt d_getmnt
12097 : see if getmntent exists
12098 set getmntent d_getmntent
12101 : see if getnetbyaddr exists
12102 set getnetbyaddr d_getnbyaddr
12105 : see if getnetbyname exists
12106 set getnetbyname d_getnbyname
12109 : see if getnetent exists
12110 set getnetent d_getnent
12113 : see if getnetbyaddr_r exists
12114 set getnetbyaddr_r d_getnetbyaddr_r
12116 case "$d_getnetbyaddr_r" in
12118 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12119 case "$d_getnetbyaddr_r_proto:$usethreads" in
12120 ":define") d_getnetbyaddr_r_proto=define
12121 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
12125 case "$d_getnetbyaddr_r_proto" in
12127 case "$getnetbyaddr_r_proto" in
12128 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
12129 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
12131 case "$getnetbyaddr_r_proto" in
12132 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
12133 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
12135 case "$getnetbyaddr_r_proto" in
12136 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
12137 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
12139 case "$getnetbyaddr_r_proto" in
12140 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
12141 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
12143 case "$getnetbyaddr_r_proto" in
12144 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
12145 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
12147 case "$getnetbyaddr_r_proto" in
12148 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
12149 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
12151 case "$getnetbyaddr_r_proto" in
12152 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
12153 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
12155 case "$getnetbyaddr_r_proto" in
12156 ''|0) d_getnetbyaddr_r=undef
12157 getnetbyaddr_r_proto=0
12158 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
12159 * ) case "$getnetbyaddr_r_proto" in
12160 REENTRANT_PROTO*) ;;
12161 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
12163 echo "Prototype: $try" ;;
12166 *) case "$usethreads" in
12167 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
12169 d_getnetbyaddr_r=undef
12170 getnetbyaddr_r_proto=0
12174 *) getnetbyaddr_r_proto=0
12178 : see if getnetbyname_r exists
12179 set getnetbyname_r d_getnetbyname_r
12181 case "$d_getnetbyname_r" in
12183 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12184 case "$d_getnetbyname_r_proto:$usethreads" in
12185 ":define") d_getnetbyname_r_proto=define
12186 set d_getnetbyname_r_proto getnetbyname_r $hdrs
12190 case "$d_getnetbyname_r_proto" in
12192 case "$getnetbyname_r_proto" in
12193 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
12194 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
12196 case "$getnetbyname_r_proto" in
12197 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
12198 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
12200 case "$getnetbyname_r_proto" in
12201 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
12202 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
12204 case "$getnetbyname_r_proto" in
12205 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
12206 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
12208 case "$getnetbyname_r_proto" in
12209 ''|0) d_getnetbyname_r=undef
12210 getnetbyname_r_proto=0
12211 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
12212 * ) case "$getnetbyname_r_proto" in
12213 REENTRANT_PROTO*) ;;
12214 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
12216 echo "Prototype: $try" ;;
12219 *) case "$usethreads" in
12220 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
12222 d_getnetbyname_r=undef
12223 getnetbyname_r_proto=0
12227 *) getnetbyname_r_proto=0
12231 : see if getnetent_r exists
12232 set getnetent_r d_getnetent_r
12234 case "$d_getnetent_r" in
12236 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12237 case "$d_getnetent_r_proto:$usethreads" in
12238 ":define") d_getnetent_r_proto=define
12239 set d_getnetent_r_proto getnetent_r $hdrs
12243 case "$d_getnetent_r_proto" in
12245 case "$getnetent_r_proto" in
12246 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
12247 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
12249 case "$getnetent_r_proto" in
12250 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
12251 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBIE ;;
12253 case "$getnetent_r_proto" in
12254 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
12255 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBIE ;;
12257 case "$getnetent_r_proto" in
12258 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
12259 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBI ;;
12261 case "$getnetent_r_proto" in
12262 ''|0) try='int getnetent_r(struct netent*, char*, int);'
12263 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBI ;;
12265 case "$getnetent_r_proto" in
12266 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
12267 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SD ;;
12269 case "$getnetent_r_proto" in
12270 ''|0) d_getnetent_r=undef
12271 getnetent_r_proto=0
12272 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
12273 * ) case "$getnetent_r_proto" in
12274 REENTRANT_PROTO*) ;;
12275 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
12277 echo "Prototype: $try" ;;
12280 *) case "$usethreads" in
12281 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
12283 d_getnetent_r=undef
12284 getnetent_r_proto=0
12288 *) getnetent_r_proto=0
12292 : see if prototypes for various getnetxxx netdb.h functions are available
12294 set d_getnetprotos getnetent $i_netdb netdb.h
12297 : see if getpagesize exists
12298 set getpagesize d_getpagsz
12302 : see if getprotobyname exists
12303 set getprotobyname d_getpbyname
12306 : see if getprotobynumber exists
12307 set getprotobynumber d_getpbynumber
12310 : see if getprotoent exists
12311 set getprotoent d_getpent
12314 : see if getpgid exists
12315 set getpgid d_getpgid
12318 : see if getpgrp2 exists
12319 set getpgrp2 d_getpgrp2
12322 : see if getppid exists
12323 set getppid d_getppid
12326 : see if getpriority exists
12327 set getpriority d_getprior
12330 : see if getprotobyname_r exists
12331 set getprotobyname_r d_getprotobyname_r
12333 case "$d_getprotobyname_r" in
12335 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12336 case "$d_getprotobyname_r_proto:$usethreads" in
12337 ":define") d_getprotobyname_r_proto=define
12338 set d_getprotobyname_r_proto getprotobyname_r $hdrs
12342 case "$d_getprotobyname_r_proto" in
12344 case "$getprotobyname_r_proto" in
12345 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
12346 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
12348 case "$getprotobyname_r_proto" in
12349 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
12350 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
12352 case "$getprotobyname_r_proto" in
12353 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
12354 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
12356 case "$getprotobyname_r_proto" in
12357 ''|0) d_getprotobyname_r=undef
12358 getprotobyname_r_proto=0
12359 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
12360 * ) case "$getprotobyname_r_proto" in
12361 REENTRANT_PROTO*) ;;
12362 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
12364 echo "Prototype: $try" ;;
12367 *) case "$usethreads" in
12368 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
12370 d_getprotobyname_r=undef
12371 getprotobyname_r_proto=0
12375 *) getprotobyname_r_proto=0
12379 : see if getprotobynumber_r exists
12380 set getprotobynumber_r d_getprotobynumber_r
12382 case "$d_getprotobynumber_r" in
12384 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12385 case "$d_getprotobynumber_r_proto:$usethreads" in
12386 ":define") d_getprotobynumber_r_proto=define
12387 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
12391 case "$d_getprotobynumber_r_proto" in
12393 case "$getprotobynumber_r_proto" in
12394 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
12395 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
12397 case "$getprotobynumber_r_proto" in
12398 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
12399 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
12401 case "$getprotobynumber_r_proto" in
12402 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
12403 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
12405 case "$getprotobynumber_r_proto" in
12406 ''|0) d_getprotobynumber_r=undef
12407 getprotobynumber_r_proto=0
12408 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
12409 * ) case "$getprotobynumber_r_proto" in
12410 REENTRANT_PROTO*) ;;
12411 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
12413 echo "Prototype: $try" ;;
12416 *) case "$usethreads" in
12417 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
12419 d_getprotobynumber_r=undef
12420 getprotobynumber_r_proto=0
12424 *) getprotobynumber_r_proto=0
12428 : see if getprotoent_r exists
12429 set getprotoent_r d_getprotoent_r
12431 case "$d_getprotoent_r" in
12433 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12434 case "$d_getprotoent_r_proto:$usethreads" in
12435 ":define") d_getprotoent_r_proto=define
12436 set d_getprotoent_r_proto getprotoent_r $hdrs
12440 case "$d_getprotoent_r_proto" in
12442 case "$getprotoent_r_proto" in
12443 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
12444 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
12446 case "$getprotoent_r_proto" in
12447 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
12448 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBI ;;
12450 case "$getprotoent_r_proto" in
12451 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
12452 ./protochk "extern $try" $hdrs && getprotoent_r_proto=S_SBI ;;
12454 case "$getprotoent_r_proto" in
12455 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
12456 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SD ;;
12458 case "$getprotoent_r_proto" in
12459 ''|0) d_getprotoent_r=undef
12460 getprotoent_r_proto=0
12461 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
12462 * ) case "$getprotoent_r_proto" in
12463 REENTRANT_PROTO*) ;;
12464 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
12466 echo "Prototype: $try" ;;
12469 *) case "$usethreads" in
12470 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
12472 d_getprotoent_r=undef
12473 getprotoent_r_proto=0
12477 *) getprotoent_r_proto=0
12481 : see if prototypes for various getprotoxxx netdb.h functions are available
12483 set d_getprotoprotos getprotoent $i_netdb netdb.h
12486 : see if getprpwnam exists
12487 set getprpwnam d_getprpwnam
12490 : see if getpwent exists
12491 set getpwent d_getpwent
12494 : see if getpwent_r exists
12495 set getpwent_r d_getpwent_r
12497 case "$d_getpwent_r" in
12499 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12500 case "$d_getpwent_r_proto:$usethreads" in
12501 ":define") d_getpwent_r_proto=define
12502 set d_getpwent_r_proto getpwent_r $hdrs
12506 case "$d_getpwent_r_proto" in
12508 case "$getpwent_r_proto" in
12509 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
12510 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBWR ;;
12512 case "$getpwent_r_proto" in
12513 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
12514 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIR ;;
12516 case "$getpwent_r_proto" in
12517 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
12518 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBW ;;
12520 case "$getpwent_r_proto" in
12521 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
12522 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBI ;;
12524 case "$getpwent_r_proto" in
12525 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
12526 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBI ;;
12528 case "$getpwent_r_proto" in
12529 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
12530 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIH ;;
12532 case "$getpwent_r_proto" in
12533 ''|0) d_getpwent_r=undef
12535 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
12536 * ) case "$getpwent_r_proto" in
12537 REENTRANT_PROTO*) ;;
12538 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
12540 echo "Prototype: $try" ;;
12543 *) case "$usethreads" in
12544 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
12551 *) getpwent_r_proto=0
12555 : see if getpwnam_r exists
12556 set getpwnam_r d_getpwnam_r
12558 case "$d_getpwnam_r" in
12560 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12561 case "$d_getpwnam_r_proto:$usethreads" in
12562 ":define") d_getpwnam_r_proto=define
12563 set d_getpwnam_r_proto getpwnam_r $hdrs
12567 case "$d_getpwnam_r_proto" in
12569 case "$getpwnam_r_proto" in
12570 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
12571 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
12573 case "$getpwnam_r_proto" in
12574 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
12575 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
12577 case "$getpwnam_r_proto" in
12578 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
12579 ./protochk "extern $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
12581 case "$getpwnam_r_proto" in
12582 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
12583 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
12585 case "$getpwnam_r_proto" in
12586 ''|0) d_getpwnam_r=undef
12588 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
12589 * ) case "$getpwnam_r_proto" in
12590 REENTRANT_PROTO*) ;;
12591 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
12593 echo "Prototype: $try" ;;
12596 *) case "$usethreads" in
12597 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
12604 *) getpwnam_r_proto=0
12608 : see if getpwuid_r exists
12609 set getpwuid_r d_getpwuid_r
12611 case "$d_getpwuid_r" in
12613 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12614 case "$d_getpwuid_r_proto:$usethreads" in
12615 ":define") d_getpwuid_r_proto=define
12616 set d_getpwuid_r_proto getpwuid_r $hdrs
12620 case "$d_getpwuid_r_proto" in
12622 case "$getpwuid_r_proto" in
12623 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
12624 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
12626 case "$getpwuid_r_proto" in
12627 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
12628 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
12630 case "$getpwuid_r_proto" in
12631 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
12632 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
12634 case "$getpwuid_r_proto" in
12635 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
12636 ./protochk "extern $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
12638 case "$getpwuid_r_proto" in
12639 ''|0) d_getpwuid_r=undef
12641 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
12642 * ) case "$getpwuid_r_proto" in
12643 REENTRANT_PROTO*) ;;
12644 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
12646 echo "Prototype: $try" ;;
12649 *) case "$usethreads" in
12650 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
12657 *) getpwuid_r_proto=0
12662 : see if getservbyname exists
12663 set getservbyname d_getsbyname
12666 : see if getservbyport exists
12667 set getservbyport d_getsbyport
12670 : see if getservent exists
12671 set getservent d_getsent
12674 : see if getservbyname_r exists
12675 set getservbyname_r d_getservbyname_r
12677 case "$d_getservbyname_r" in
12679 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12680 case "$d_getservbyname_r_proto:$usethreads" in
12681 ":define") d_getservbyname_r_proto=define
12682 set d_getservbyname_r_proto getservbyname_r $hdrs
12686 case "$d_getservbyname_r_proto" in
12688 case "$getservbyname_r_proto" in
12689 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
12690 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
12692 case "$getservbyname_r_proto" in
12693 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
12694 ./protochk "extern $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
12696 case "$getservbyname_r_proto" in
12697 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
12698 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
12700 case "$getservbyname_r_proto" in
12701 ''|0) d_getservbyname_r=undef
12702 getservbyname_r_proto=0
12703 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
12704 * ) case "$getservbyname_r_proto" in
12705 REENTRANT_PROTO*) ;;
12706 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
12708 echo "Prototype: $try" ;;
12711 *) case "$usethreads" in
12712 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
12714 d_getservbyname_r=undef
12715 getservbyname_r_proto=0
12719 *) getservbyname_r_proto=0
12723 : see if getservbyport_r exists
12724 set getservbyport_r d_getservbyport_r
12726 case "$d_getservbyport_r" in
12728 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12729 case "$d_getservbyport_r_proto:$usethreads" in
12730 ":define") d_getservbyport_r_proto=define
12731 set d_getservbyport_r_proto getservbyport_r $hdrs
12735 case "$d_getservbyport_r_proto" in
12737 case "$getservbyport_r_proto" in
12738 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
12739 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
12741 case "$getservbyport_r_proto" in
12742 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
12743 ./protochk "extern $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
12745 case "$getservbyport_r_proto" in
12746 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
12747 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
12749 case "$getservbyport_r_proto" in
12750 ''|0) d_getservbyport_r=undef
12751 getservbyport_r_proto=0
12752 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
12753 * ) case "$getservbyport_r_proto" in
12754 REENTRANT_PROTO*) ;;
12755 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
12757 echo "Prototype: $try" ;;
12760 *) case "$usethreads" in
12761 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
12763 d_getservbyport_r=undef
12764 getservbyport_r_proto=0
12768 *) getservbyport_r_proto=0
12772 : see if getservent_r exists
12773 set getservent_r d_getservent_r
12775 case "$d_getservent_r" in
12777 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12778 case "$d_getservent_r_proto:$usethreads" in
12779 ":define") d_getservent_r_proto=define
12780 set d_getservent_r_proto getservent_r $hdrs
12784 case "$d_getservent_r_proto" in
12786 case "$getservent_r_proto" in
12787 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
12788 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBWR ;;
12790 case "$getservent_r_proto" in
12791 ''|0) try='int getservent_r(struct servent*, char*, int);'
12792 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBI ;;
12794 case "$getservent_r_proto" in
12795 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
12796 ./protochk "extern $try" $hdrs && getservent_r_proto=S_SBI ;;
12798 case "$getservent_r_proto" in
12799 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
12800 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SD ;;
12802 case "$getservent_r_proto" in
12803 ''|0) d_getservent_r=undef
12804 getservent_r_proto=0
12805 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
12806 * ) case "$getservent_r_proto" in
12807 REENTRANT_PROTO*) ;;
12808 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
12810 echo "Prototype: $try" ;;
12813 *) case "$usethreads" in
12814 define) echo "getservent_r has no prototype, not using it." >&4 ;;
12816 d_getservent_r=undef
12817 getservent_r_proto=0
12821 *) getservent_r_proto=0
12825 : see if prototypes for various getservxxx netdb.h functions are available
12827 set d_getservprotos getservent $i_netdb netdb.h
12830 : see if getspnam exists
12831 set getspnam d_getspnam
12834 : see if this is a shadow.h system
12835 set shadow.h i_shadow
12838 : see if getspnam_r exists
12839 set getspnam_r d_getspnam_r
12841 case "$d_getspnam_r" in
12843 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
12844 case "$d_getspnam_r_proto:$usethreads" in
12845 ":define") d_getspnam_r_proto=define
12846 set d_getspnam_r_proto getspnam_r $hdrs
12850 case "$d_getspnam_r_proto" in
12852 case "$getspnam_r_proto" in
12853 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
12854 ./protochk "extern $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
12856 case "$getspnam_r_proto" in
12857 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
12858 ./protochk "extern $try" $hdrs && getspnam_r_proto=S_CSBI ;;
12860 case "$getspnam_r_proto" in
12861 ''|0) d_getspnam_r=undef
12863 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
12864 * ) case "$getspnam_r_proto" in
12865 REENTRANT_PROTO*) ;;
12866 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
12868 echo "Prototype: $try" ;;
12871 *) case "$usethreads" in
12872 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
12879 *) getspnam_r_proto=0
12883 : see if gettimeofday or ftime exists
12884 set gettimeofday d_gettimeod
12886 case "$d_gettimeod" in
12892 val="$undef"; set d_ftime; eval $setvar
12895 case "$d_gettimeod$d_ftime" in
12898 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
12902 : see if gmtime_r exists
12903 set gmtime_r d_gmtime_r
12905 case "$d_gmtime_r" in
12907 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
12908 case "$d_gmtime_r_proto:$usethreads" in
12909 ":define") d_gmtime_r_proto=define
12910 set d_gmtime_r_proto gmtime_r $hdrs
12914 case "$d_gmtime_r_proto" in
12916 case "$gmtime_r_proto" in
12917 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
12918 ./protochk "extern $try" $hdrs && gmtime_r_proto=S_TS ;;
12920 case "$gmtime_r_proto" in
12921 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
12922 ./protochk "extern $try" $hdrs && gmtime_r_proto=I_TS ;;
12924 case "$gmtime_r_proto" in
12925 ''|0) d_gmtime_r=undef
12927 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
12928 * ) case "$gmtime_r_proto" in
12929 REENTRANT_PROTO*) ;;
12930 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
12932 echo "Prototype: $try" ;;
12935 *) case "$usethreads" in
12936 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
12943 *) gmtime_r_proto=0
12947 : see if hasmntopt exists
12948 set hasmntopt d_hasmntopt
12951 : see if this is a netinet/in.h or sys/in.h system
12952 set netinet/in.h i_niin sys/in.h i_sysin
12955 : see if arpa/inet.h has to be included
12956 set arpa/inet.h i_arpainet
12959 : see if htonl --and friends-- exists
12964 : Maybe they are macros.
12967 $cat >htonl.c <<EOM
12969 #include <sys/types.h>
12970 #$i_niin I_NETINET_IN
12972 #$i_arpainet I_ARPA_INET
12973 #ifdef I_NETINET_IN
12974 #include <netinet/in.h>
12977 #include <sys/in.h>
12980 #include <arpa/inet.h>
12983 printf("Defined as a macro.");
12986 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
12987 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
12989 echo "But it seems to be defined as a macro." >&4
12999 if set index val -f; eval $csym; $val; then
13000 if set strchr val -f d_strchr; eval $csym; $val; then
13001 if $contains strchr "$strings" >/dev/null 2>&1 ; then
13004 echo "strchr() found." >&4
13008 echo "index() found." >&4
13013 echo "index() found." >&4
13016 if set strchr val -f d_strchr; eval $csym; $val; then
13019 echo "strchr() found." >&4
13021 echo "No index() or strchr() found!" >&4
13026 set d_strchr; eval $setvar
13028 set d_index; eval $setvar
13030 : check whether inet_aton exists
13031 set inet_aton d_inetaton
13036 $cat >isascii.c <<'EOCP'
13048 if eval $compile; then
13049 echo "isascii() found." >&4
13052 echo "isascii() NOT found." >&4
13059 : see if isfinite exists
13060 set isfinite d_isfinite
13063 : see if isinf exists
13067 : see if isnan exists
13071 : see if isnanl exists
13072 set isnanl d_isnanl
13075 : see if killpg exists
13076 set killpg d_killpg
13079 : see if lchown exists
13081 $cat > try.c <<'EOCP'
13082 /* System header to define __stub macros and hopefully few prototypes,
13083 which can conflict with char lchown(); below. */
13084 #include <assert.h>
13085 /* Override any gcc2 internal prototype to avoid an error. */
13086 /* We use char because int might match the return type of a gcc2
13087 builtin and then its argument prototype would still apply. */
13090 /* The GNU C library defines this for functions which it implements
13091 to always fail with ENOSYS. Some functions are actually named
13092 something starting with __ and the normal name is an alias. */
13093 #if defined (__stub_lchown) || defined (__stub___lchown)
13101 if eval $compile; then
13102 $echo "lchown() found." >&4
13105 $echo "lchown() NOT found." >&4
13111 : See if number of significant digits in a double precision number is known
13113 $cat >ldbl_dig.c <<EOM
13114 #$i_limits I_LIMITS
13117 #include <limits.h>
13123 printf("Contains LDBL_DIG");
13126 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
13127 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
13128 echo "LDBL_DIG found." >&4
13131 echo "LDBL_DIG NOT found." >&4
13138 : see if link exists
13142 : see if localtime_r exists
13143 set localtime_r d_localtime_r
13145 case "$d_localtime_r" in
13147 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
13148 case "$d_localtime_r_proto:$usethreads" in
13149 ":define") d_localtime_r_proto=define
13150 set d_localtime_r_proto localtime_r $hdrs
13154 case "$d_localtime_r_proto" in
13156 case "$localtime_r_proto" in
13157 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
13158 ./protochk "extern $try" $hdrs && localtime_r_proto=S_TS ;;
13160 case "$localtime_r_proto" in
13161 ''|0) try='int localtime_r(const time_t*, struct tm*);'
13162 ./protochk "extern $try" $hdrs && localtime_r_proto=I_TS ;;
13164 case "$localtime_r_proto" in
13165 ''|0) d_localtime_r=undef
13166 localtime_r_proto=0
13167 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
13168 * ) case "$localtime_r_proto" in
13169 REENTRANT_PROTO*) ;;
13170 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
13172 echo "Prototype: $try" ;;
13175 *) case "$usethreads" in
13176 define) echo "localtime_r has no prototype, not using it." >&4 ;;
13178 d_localtime_r=undef
13179 localtime_r_proto=0
13183 *) localtime_r_proto=0
13187 : see if localeconv exists
13188 set localeconv d_locconv
13191 : see if lockf exists
13195 : see if prototype for lseek is available
13197 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
13200 : see if lstat exists
13204 : see if madvise exists
13205 set madvise d_madvise
13208 : see if mblen exists
13212 : see if mbstowcs exists
13213 set mbstowcs d_mbstowcs
13216 : see if mbtowc exists
13217 set mbtowc d_mbtowc
13220 : see if memchr exists
13221 set memchr d_memchr
13224 : see if memcmp exists
13225 set memcmp d_memcmp
13228 : see if memcpy exists
13229 set memcpy d_memcpy
13232 : see if memmove exists
13233 set memmove d_memmove
13236 : see if memset exists
13237 set memset d_memset
13240 : see if mkdir exists
13244 : see if mkdtemp exists
13245 set mkdtemp d_mkdtemp
13248 : see if mkfifo exists
13249 set mkfifo d_mkfifo
13252 : see if mkstemp exists
13253 set mkstemp d_mkstemp
13256 : see if mkstemps exists
13257 set mkstemps d_mkstemps
13260 : see if mktime exists
13261 set mktime d_mktime
13264 : see if this is a sys/mman.h system
13265 set sys/mman.h i_sysmman
13268 : see if mmap exists
13271 : see what shmat returns
13272 : default to something harmless
13274 case "$i_sysmman$d_mmap" in
13276 $cat >mmap.c <<'END'
13277 #include <sys/mman.h>
13280 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
13285 echo "and it returns ($mmaptype)." >&4
13291 : see if mprotect exists
13292 set mprotect d_mprotect
13295 : see if msgctl exists
13296 set msgctl d_msgctl
13299 : see if msgget exists
13300 set msgget d_msgget
13303 : see if msgsnd exists
13304 set msgsnd d_msgsnd
13307 : see if msgrcv exists
13308 set msgrcv d_msgrcv
13311 : see how much of the 'msg*(2)' library is present.
13314 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
13315 *"$undef"*) h_msg=false;;
13319 case "`ipcs 2>&1`" in
13320 "SVID messages"*"not configured"*)
13321 echo "Your $osname does not have the msg*(2) configured." >&4
13324 set msgctl d_msgctl
13326 set msgget d_msgget
13328 set msgsnd d_msgsnd
13330 set msgrcv d_msgrcv
13336 : we could also check for sys/ipc.h ...
13337 if $h_msg && $test `./findhdr sys/msg.h`; then
13338 echo "You have the full msg*(2) library." >&4
13341 echo "You don't have the full msg*(2) library." >&4
13349 echo "Checking to see if your system supports struct msghdr..." >&4
13350 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
13352 case "$d_msghdr_s" in
13353 "$define") echo "Yes, it does." ;;
13354 *) echo "No, it doesn't." ;;
13358 : see if msync exists
13362 : see if munmap exists
13363 set munmap d_munmap
13366 : see if nice exists
13370 : see if this is a langinfo.h system
13371 set langinfo.h i_langinfo
13374 : see if nl_langinfo exists
13375 set nl_langinfo d_nl_langinfo
13378 : check for length of character
13380 case "$charsize" in
13382 echo "Checking to see how big your characters are (hey, you never know)..." >&4
13383 $cat >try.c <<'EOCP'
13387 printf("%d\n", (int)sizeof(char));
13392 if eval $compile_ok; then
13396 echo "(I can't seem to compile the test program. Guessing...)"
13403 rp="What is the size of a character (in bytes)?"
13408 : check for volatile keyword
13410 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
13411 $cat >try.c <<'EOCP'
13414 typedef struct _goo_struct goo_struct;
13415 goo_struct * volatile goo = ((goo_struct *)0);
13416 struct _goo_struct {
13421 typedef unsigned short foo_t;
13422 char *volatile foo;
13424 volatile foo_t blech;
13428 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
13430 echo "Yup, it does."
13433 echo "Nope, it doesn't."
13441 $echo "Choosing the C types to be used for Perl's internal types..." >&4
13443 case "$use64bitint:$d_quad:$quadtype" in
13446 uvtype="$uquadtype"
13451 uvtype="unsigned long"
13457 case "$uselongdouble:$d_longdbl" in
13459 nvtype="long double"
13460 nvsize=$longdblsize
13467 $echo "(IV will be "$ivtype", $ivsize bytes)"
13468 $echo "(UV will be "$uvtype", $uvsize bytes)"
13469 $echo "(NV will be "$nvtype", $nvsize bytes)"
13472 #$i_inttypes I_INTTYPES
13474 #include <inttypes.h>
13479 int8_t i = INT8_MAX;
13480 uint8_t u = UINT8_MAX;
13481 printf("int8_t\n");
13484 int16_t i = INT16_MAX;
13485 uint16_t i = UINT16_MAX;
13486 printf("int16_t\n");
13489 int32_t i = INT32_MAX;
13490 uint32_t u = UINT32_MAX;
13491 printf("int32_t\n");
13497 '') case "$charsize" in
13499 u8type="unsigned char"
13508 if eval $compile; then
13509 case "`$run ./try`" in
13510 int8_t) i8type=int8_t
13520 '') if $test $charsize -ge 1; then
13522 u8type="unsigned char"
13530 '') case "$shortsize" in
13532 u16type="unsigned short"
13540 '') set try -DINT16
13541 if eval $compile; then
13542 case "`$run ./try`" in
13554 '') if $test $shortsize -ge 2; then
13556 u16type="unsigned short"
13564 '') case "$longsize" in
13566 u32type="unsigned long"
13570 *) case "$intsize" in
13572 u32type="unsigned int"
13582 '') set try -DINT32
13583 if eval $compile; then
13584 case "`$run ./try`" in
13596 '') if $test $intsize -ge 4; then
13598 u32type="unsigned int"
13606 '') case "$d_quad:$quadtype" in
13608 i64type="$quadtype"
13609 u64type="$uquadtype"
13617 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
13618 : volatile so that the compiler has to store it out to memory.
13619 if test X"$d_volatile" = X"$define"; then
13624 #include <sys/types.h>
13625 #include <signal.h>
13627 $volatile int bletched = 0;
13628 $signal_t blech(s) int s; { bletched = 1; }
13633 int n = 8 * $uvsize;
13636 signal(SIGFPE, blech);
13639 for (i = 0; i < n; i++) {
13640 u = u << 1 | ($uvtype)1;
13642 if (($uvtype)d != u)
13646 d = ($nvtype)(u - 1);
13647 if (($uvtype)d != (u - 1))
13655 printf("%d\n", ((i == n) ? -n : i));
13661 d_nv_preserves_uv="$undef"
13662 if eval $compile; then
13663 nv_preserves_uv_bits="`$run ./try`"
13665 case "$nv_preserves_uv_bits" in
13667 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
13668 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
13669 d_nv_preserves_uv="$define"
13671 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
13672 d_nv_preserves_uv="$undef" ;;
13673 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
13674 nv_preserves_uv_bits="$undef" ;;
13680 : check for off64_t
13682 echo "Checking to see if you have off64_t..." >&4
13684 #include <sys/types.h>
13685 #include <unistd.h>
13686 int main() { off64_t x = 7; }
13689 if eval $compile; then
13691 echo "You have off64_t."
13694 echo "You do not have off64_t."
13695 case "$lseeksize" in
13696 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
13703 : how to create joinable pthreads
13704 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
13706 echo "Checking what constant to use for creating joinable pthreads..." >&4
13707 $cat >try.c <<'EOCP'
13708 #include <pthread.h>
13710 int detachstate = JOINABLE;
13713 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
13714 if eval $compile; then
13715 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
13716 val="$undef" # Yes, undef.
13717 set d_old_pthread_create_joinable
13720 set old_pthread_create_joinable
13723 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
13724 if eval $compile; then
13725 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
13727 set d_old_pthread_create_joinable
13729 val=PTHREAD_CREATE_UNDETACHED
13730 set old_pthread_create_joinable
13733 set try -DJOINABLE=__UNDETACHED
13734 if eval $compile; then
13735 echo "You seem to use __UNDETACHED." >&4
13737 set d_old_pthread_create_joinable
13740 set old_pthread_create_joinable
13743 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
13745 set d_old_pthread_create_joinable
13748 set old_pthread_create_joinable
13755 d_old_pthread_create_joinable="$undef"
13756 old_pthread_create_joinable=""
13759 : see if pause exists
13763 : see if pipe exists
13767 : see if poll exists
13771 : see if readlink exists
13772 set readlink d_readlink
13778 case "$d_readlink" in
13780 if $issymlink /proc/self/exe ; then
13781 $ls -l /proc/self/exe > reflect
13782 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13783 echo "You have Linux-like /proc/self/exe."
13784 procselfexe='"/proc/self/exe"'
13788 if $issymlink /proc/curproc/file ; then
13789 $ls -l /proc/curproc/file > reflect
13790 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13791 echo "You have BSD-like /proc/curproc/file."
13792 procselfexe='"/proc/curproc/file"'
13802 : see whether the pthread_atfork exists
13804 #include <pthread.h>
13807 #ifdef PTHREAD_ATFORK
13808 pthread_atfork(NULL,NULL,NULL);
13813 : see if pthread_atfork exists
13814 set try -DPTHREAD_ATFORK
13815 if eval $compile; then
13820 case "$usethreads" in
13823 $define) echo 'pthread_atfork found.' >&4 ;;
13824 *) echo 'pthread_atfork NOT found.' >&4 ;;
13827 set d_pthread_atfork
13831 : see whether the various POSIXish _yields exist
13833 #include <pthread.h>
13839 #ifdef PTHREAD_YIELD
13842 #ifdef PTHREAD_YIELD_NULL
13843 pthread_yield(NULL);
13849 : see if sched_yield exists
13850 set try -DSCHED_YIELD
13851 if eval $compile; then
13853 sched_yield='sched_yield()'
13857 case "$usethreads" in
13860 $define) echo 'sched_yield() found.' >&4 ;;
13861 *) echo 'sched_yield() NOT found.' >&4 ;;
13867 : see if pthread_yield exists
13868 set try -DPTHREAD_YIELD
13869 if eval $compile; then
13871 case "$sched_yield" in
13872 '') sched_yield='pthread_yield()' ;;
13875 set try -DPTHREAD_YIELD_NULL
13876 if eval $compile; then
13878 case "$sched_yield" in
13879 '') sched_yield='pthread_yield(NULL)' ;;
13885 case "$usethreads" in
13888 $define) echo 'pthread_yield() found.' >&4 ;;
13889 *) echo 'pthread_yield() NOT found.' >&4 ;;
13893 set d_pthread_yield
13896 case "$sched_yield" in
13897 '') sched_yield=undef ;;
13902 : see if random_r exists
13903 set random_r d_random_r
13905 case "$d_random_r" in
13907 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
13908 case "$d_random_r_proto:$usethreads" in
13909 ":define") d_random_r_proto=define
13910 set d_random_r_proto random_r $hdrs
13914 case "$d_random_r_proto" in
13916 case "$random_r_proto" in
13917 ''|0) try='int random_r(int*, struct random_data*);'
13918 ./protochk "extern $try" $hdrs && random_r_proto=I_TS ;;
13920 case "$random_r_proto" in
13921 ''|0) d_random_r=undef
13923 echo "Disabling random_r, cannot determine prototype." >&4 ;;
13924 * ) case "$random_r_proto" in
13925 REENTRANT_PROTO*) ;;
13926 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
13928 echo "Prototype: $try" ;;
13931 *) case "$usethreads" in
13932 define) echo "random_r has no prototype, not using it." >&4 ;;
13939 *) random_r_proto=0
13943 : see if readdir and friends exist
13944 set readdir d_readdir
13946 set seekdir d_seekdir
13948 set telldir d_telldir
13950 set rewinddir d_rewinddir
13953 : see if readdir64_r exists
13954 set readdir64_r d_readdir64_r
13956 case "$d_readdir64_r" in
13958 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
13959 case "$d_readdir64_r_proto:$usethreads" in
13960 ":define") d_readdir64_r_proto=define
13961 set d_readdir64_r_proto readdir64_r $hdrs
13965 case "$d_readdir64_r_proto" in
13967 case "$readdir64_r_proto" in
13968 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
13969 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TSR ;;
13971 case "$readdir64_r_proto" in
13972 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
13973 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TS ;;
13975 case "$readdir64_r_proto" in
13976 ''|0) d_readdir64_r=undef
13977 readdir64_r_proto=0
13978 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
13979 * ) case "$readdir64_r_proto" in
13980 REENTRANT_PROTO*) ;;
13981 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
13983 echo "Prototype: $try" ;;
13986 *) case "$usethreads" in
13987 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
13989 d_readdir64_r=undef
13990 readdir64_r_proto=0
13994 *) readdir64_r_proto=0
13998 : see if readdir_r exists
13999 set readdir_r d_readdir_r
14001 case "$d_readdir_r" in
14003 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
14004 case "$d_readdir_r_proto:$usethreads" in
14005 ":define") d_readdir_r_proto=define
14006 set d_readdir_r_proto readdir_r $hdrs
14010 case "$d_readdir_r_proto" in
14012 case "$readdir_r_proto" in
14013 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
14014 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TSR ;;
14016 case "$readdir_r_proto" in
14017 ''|0) try='int readdir_r(DIR*, struct dirent*);'
14018 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TS ;;
14020 case "$readdir_r_proto" in
14021 ''|0) d_readdir_r=undef
14023 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
14024 * ) case "$readdir_r_proto" in
14025 REENTRANT_PROTO*) ;;
14026 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
14028 echo "Prototype: $try" ;;
14031 *) case "$usethreads" in
14032 define) echo "readdir_r has no prototype, not using it." >&4 ;;
14039 *) readdir_r_proto=0
14043 : see if readv exists
14047 : see if recvmsg exists
14048 set recvmsg d_recvmsg
14051 : see if rename exists
14052 set rename d_rename
14055 : see if rmdir exists
14059 : see if memory.h is available.
14064 : See if it conflicts with string.h
14070 $cppstdin $cppflags $cppminus < $strings > mem.h
14071 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
14073 echo "We won't be including <memory.h>."
14083 : can bcopy handle overlapping blocks?
14086 case "$d_memmove" in
14087 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
14088 *) case "$d_bcopy" in
14090 echo "Checking to see if bcopy() can do overlapping copies..." >&4
14092 #$i_memory I_MEMORY
14093 #$i_stdlib I_STDLIB
14094 #$i_string I_STRING
14095 #$i_unistd I_UNISTD
14097 $cat >>try.c <<'EOCP'
14100 # include <memory.h>
14103 # include <stdlib.h>
14106 # include <string.h>
14108 # include <strings.h>
14111 # include <unistd.h> /* Needed for NetBSD */
14115 char buf[128], abc[128];
14121 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14122 try to store the string in read-only memory. */
14123 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
14125 for (align = 7; align >= 0; align--) {
14126 for (len = 36; len; len--) {
14128 bcopy(abc, b, len);
14129 for (off = 1; off <= len; off++) {
14130 bcopy(b, b+off, len);
14131 bcopy(b+off, b, len);
14132 if (bcmp(b, abc, len))
14141 if eval $compile_ok; then
14142 if ./try 2>/dev/null; then
14143 echo "Yes, it can."
14146 echo "It can't, sorry."
14149 echo "(I can't compile the test program, so we'll assume not...)"
14153 $rm -f try.* try core
14159 : can memcpy handle overlapping blocks?
14162 case "$d_memmove" in
14163 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
14164 *) case "$d_memcpy" in
14166 echo "Checking to see if memcpy() can do overlapping copies..." >&4
14168 #$i_memory I_MEMORY
14169 #$i_stdlib I_STDLIB
14170 #$i_string I_STRING
14171 #$i_unistd I_UNISTD
14173 $cat >>try.c <<'EOCP'
14176 # include <memory.h>
14179 # include <stdlib.h>
14182 # include <string.h>
14184 # include <strings.h>
14187 # include <unistd.h> /* Needed for NetBSD */
14191 char buf[128], abc[128];
14197 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14198 try to store the string in read-only memory. */
14199 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
14201 for (align = 7; align >= 0; align--) {
14202 for (len = 36; len; len--) {
14204 memcpy(b, abc, len);
14205 for (off = 1; off <= len; off++) {
14206 memcpy(b+off, b, len);
14207 memcpy(b, b+off, len);
14208 if (memcmp(b, abc, len))
14217 if eval $compile_ok; then
14218 if ./try 2>/dev/null; then
14219 echo "Yes, it can."
14222 echo "It can't, sorry."
14225 echo "(I can't compile the test program, so we'll assume not...)"
14229 $rm -f try.* try core
14235 : can memcmp be trusted to compare relative magnitude?
14237 case "$d_memcmp" in
14240 echo "Checking if your memcmp() can compare relative magnitude..." >&4
14242 #$i_memory I_MEMORY
14243 #$i_stdlib I_STDLIB
14244 #$i_string I_STRING
14245 #$i_unistd I_UNISTD
14247 $cat >>try.c <<'EOCP'
14250 # include <memory.h>
14253 # include <stdlib.h>
14256 # include <string.h>
14258 # include <strings.h>
14261 # include <unistd.h> /* Needed for NetBSD */
14267 if ((a < b) && memcmp(&a, &b, 1) < 0)
14273 if eval $compile_ok; then
14274 if $run ./try 2>/dev/null; then
14275 echo "Yes, it can."
14278 echo "No, it can't (it uses signed chars)."
14281 echo "(I can't compile the test program, so we'll assume not...)"
14285 $rm -f try.* try core
14289 : see if prototype for sbrk is available
14291 set d_sbrkproto sbrk $i_unistd unistd.h
14294 : see if select exists
14295 set select d_select
14298 : see if semctl exists
14299 set semctl d_semctl
14302 : see if semget exists
14303 set semget d_semget
14306 : see if semop exists
14310 : see how much of the 'sem*(2)' library is present.
14313 case "$d_semctl$d_semget$d_semop" in
14314 *"$undef"*) h_sem=false;;
14318 case "`ipcs 2>&1`" in
14319 "SVID messages"*"not configured"*)
14320 echo "Your $osname does not have the sem*(2) configured." >&4
14323 set semctl d_semctl
14325 set semget d_semget
14333 : we could also check for sys/ipc.h ...
14334 if $h_sem && $test `./findhdr sys/sem.h`; then
14335 echo "You have the full sem*(2) library." >&4
14338 echo "You don't have the full sem*(2) library." >&4
14344 : see whether sys/sem.h defines union semun
14346 $cat > try.c <<'END'
14347 #include <sys/types.h>
14348 #include <sys/ipc.h>
14349 #include <sys/sem.h>
14350 int main () { union semun semun; semun.buf = 0; }
14353 if eval $compile; then
14354 echo "You have union semun in <sys/sem.h>." >&4
14357 echo "You do not have union semun in <sys/sem.h>." >&4
14360 $rm -f try try.c try.h
14364 : see how to do semctl IPC_STAT
14367 : see whether semctl IPC_STAT can use union semun
14372 # define S_IRUSR S_IREAD
14373 # define S_IWUSR S_IWRITE
14374 # define S_IXUSR S_IEXEC
14376 # define S_IRUSR 0400
14377 # define S_IWUSR 0200
14378 # define S_IXUSR 0100
14380 # define S_IRGRP (S_IRUSR>>3)
14381 # define S_IWGRP (S_IWUSR>>3)
14382 # define S_IXGRP (S_IXUSR>>3)
14383 # define S_IROTH (S_IRUSR>>6)
14384 # define S_IWOTH (S_IWUSR>>6)
14385 # define S_IXOTH (S_IXUSR>>6)
14388 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
14389 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
14390 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
14395 #include <sys/types.h>
14396 #include <sys/ipc.h>
14397 #include <sys/sem.h>
14398 #include <sys/stat.h>
14405 #$d_union_semun HAS_UNION_SEMUN
14408 #ifndef HAS_UNION_SEMUN
14411 struct semid_ds *buf;
14412 unsigned short *array;
14418 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14419 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14421 struct semid_ds argbuf;
14424 st = semctl(sem, 0, IPC_STAT, arg);
14428 # endif /* IPC_STAT */
14429 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14431 if (semctl(sem, 0, IPC_RMID, arg) != 0)
14432 # endif /* IPC_RMID */
14433 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14435 #endif /* IPC_PRIVATE && ... */
14436 printf("semget failed: errno = %d\n", errno);
14442 if eval $compile; then
14445 semun) val="$define" ;;
14451 case "$d_semctl_semun" in
14453 echo "You can use union semun for semctl IPC_STAT." >&4
14456 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
14461 : see whether semctl IPC_STAT can use struct semid_ds pointer
14462 $cat > try.c <<'END'
14463 #include <sys/types.h>
14464 #include <sys/ipc.h>
14465 #include <sys/sem.h>
14466 #include <sys/stat.h>
14474 struct semid_ds arg;
14477 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14478 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14481 st = semctl(sem, 0, IPC_STAT, &arg);
14483 printf("semid_ds\n");
14485 # endif /* IPC_STAT */
14486 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14488 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
14489 # endif /* IPC_RMID */
14490 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14492 #endif /* IPC_PRIVATE && ... */
14493 printf("semget failed: errno = %d\n", errno);
14500 if eval $compile; then
14503 semid_ds) val="$define" ;;
14507 set d_semctl_semid_ds
14509 case "$d_semctl_semid_ds" in
14511 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
14513 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
14520 # We do not have the full sem*(2) library, so assume we can not
14526 set d_semctl_semid_ds
14531 : see if sendmsg exists
14532 set sendmsg d_sendmsg
14535 : see if setegid exists
14536 set setegid d_setegid
14539 : see if seteuid exists
14540 set seteuid d_seteuid
14543 : see if setgrent exists
14544 set setgrent d_setgrent
14547 : see if setgrent_r exists
14548 set setgrent_r d_setgrent_r
14550 case "$d_setgrent_r" in
14552 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14553 case "$d_setgrent_r_proto:$usethreads" in
14554 ":define") d_setgrent_r_proto=define
14555 set d_setgrent_r_proto setgrent_r $hdrs
14559 case "$d_setgrent_r_proto" in
14561 case "$setgrent_r_proto" in
14562 ''|0) try='int setgrent_r(FILE**);'
14563 ./protochk "extern $try" $hdrs && setgrent_r_proto=I_H ;;
14565 case "$setgrent_r_proto" in
14566 ''|0) try='void setgrent_r(FILE**);'
14567 ./protochk "extern $try" $hdrs && setgrent_r_proto=V_H ;;
14569 case "$setgrent_r_proto" in
14570 ''|0) d_setgrent_r=undef
14572 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
14573 * ) case "$setgrent_r_proto" in
14574 REENTRANT_PROTO*) ;;
14575 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
14577 echo "Prototype: $try" ;;
14580 *) case "$usethreads" in
14581 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
14588 *) setgrent_r_proto=0
14592 : see if sethostent exists
14593 set sethostent d_sethent
14596 : see if sethostent_r exists
14597 set sethostent_r d_sethostent_r
14599 case "$d_sethostent_r" in
14601 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14602 case "$d_sethostent_r_proto:$usethreads" in
14603 ":define") d_sethostent_r_proto=define
14604 set d_sethostent_r_proto sethostent_r $hdrs
14608 case "$d_sethostent_r_proto" in
14610 case "$sethostent_r_proto" in
14611 ''|0) try='int sethostent_r(int, struct hostent_data*);'
14612 ./protochk "extern $try" $hdrs && sethostent_r_proto=I_ID ;;
14614 case "$sethostent_r_proto" in
14615 ''|0) try='void sethostent_r(int, struct hostent_data*);'
14616 ./protochk "extern $try" $hdrs && sethostent_r_proto=V_ID ;;
14618 case "$sethostent_r_proto" in
14619 ''|0) d_sethostent_r=undef
14620 sethostent_r_proto=0
14621 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
14622 * ) case "$sethostent_r_proto" in
14623 REENTRANT_PROTO*) ;;
14624 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
14626 echo "Prototype: $try" ;;
14629 *) case "$usethreads" in
14630 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
14632 d_sethostent_r=undef
14633 sethostent_r_proto=0
14637 *) sethostent_r_proto=0
14641 : see if setitimer exists
14642 set setitimer d_setitimer
14645 : see if setlinebuf exists
14646 set setlinebuf d_setlinebuf
14649 : see if setlocale exists
14650 set setlocale d_setlocale
14653 : see if locale.h is available
14654 set locale.h i_locale
14657 : see if setlocale_r exists
14658 set setlocale_r d_setlocale_r
14660 case "$d_setlocale_r" in
14662 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
14663 case "$d_setlocale_r_proto:$usethreads" in
14664 ":define") d_setlocale_r_proto=define
14665 set d_setlocale_r_proto setlocale_r $hdrs
14669 case "$d_setlocale_r_proto" in
14671 case "$setlocale_r_proto" in
14672 ''|0) try='int setlocale_r(int, const char*, char*, int);'
14673 ./protochk "extern $try" $hdrs && setlocale_r_proto=I_ICBI ;;
14675 case "$setlocale_r_proto" in
14676 ''|0) d_setlocale_r=undef
14677 setlocale_r_proto=0
14678 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
14679 * ) case "$setlocale_r_proto" in
14680 REENTRANT_PROTO*) ;;
14681 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
14683 echo "Prototype: $try" ;;
14686 *) case "$usethreads" in
14687 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
14689 d_setlocale_r=undef
14690 setlocale_r_proto=0
14694 *) setlocale_r_proto=0
14698 : see if setnetent exists
14699 set setnetent d_setnent
14702 : see if setnetent_r exists
14703 set setnetent_r d_setnetent_r
14705 case "$d_setnetent_r" in
14707 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14708 case "$d_setnetent_r_proto:$usethreads" in
14709 ":define") d_setnetent_r_proto=define
14710 set d_setnetent_r_proto setnetent_r $hdrs
14714 case "$d_setnetent_r_proto" in
14716 case "$setnetent_r_proto" in
14717 ''|0) try='int setnetent_r(int, struct netent_data*);'
14718 ./protochk "extern $try" $hdrs && setnetent_r_proto=I_ID ;;
14720 case "$setnetent_r_proto" in
14721 ''|0) try='void setnetent_r(int, struct netent_data*);'
14722 ./protochk "extern $try" $hdrs && setnetent_r_proto=V_ID ;;
14724 case "$setnetent_r_proto" in
14725 ''|0) d_setnetent_r=undef
14726 setnetent_r_proto=0
14727 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
14728 * ) case "$setnetent_r_proto" in
14729 REENTRANT_PROTO*) ;;
14730 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
14732 echo "Prototype: $try" ;;
14735 *) case "$usethreads" in
14736 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
14738 d_setnetent_r=undef
14739 setnetent_r_proto=0
14743 *) setnetent_r_proto=0
14747 : see if setprotoent exists
14748 set setprotoent d_setpent
14751 : see if setpgid exists
14752 set setpgid d_setpgid
14755 : see if setpgrp2 exists
14756 set setpgrp2 d_setpgrp2
14759 : see if setpriority exists
14760 set setpriority d_setprior
14763 : see if setproctitle exists
14764 set setproctitle d_setproctitle
14767 : see if setprotoent_r exists
14768 set setprotoent_r d_setprotoent_r
14770 case "$d_setprotoent_r" in
14772 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14773 case "$d_setprotoent_r_proto:$usethreads" in
14774 ":define") d_setprotoent_r_proto=define
14775 set d_setprotoent_r_proto setprotoent_r $hdrs
14779 case "$d_setprotoent_r_proto" in
14781 case "$setprotoent_r_proto" in
14782 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
14783 ./protochk "extern $try" $hdrs && setprotoent_r_proto=I_ID ;;
14785 case "$setprotoent_r_proto" in
14786 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
14787 ./protochk "extern $try" $hdrs && setprotoent_r_proto=V_ID ;;
14789 case "$setprotoent_r_proto" in
14790 ''|0) d_setprotoent_r=undef
14791 setprotoent_r_proto=0
14792 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
14793 * ) case "$setprotoent_r_proto" in
14794 REENTRANT_PROTO*) ;;
14795 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
14797 echo "Prototype: $try" ;;
14800 *) case "$usethreads" in
14801 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
14803 d_setprotoent_r=undef
14804 setprotoent_r_proto=0
14808 *) setprotoent_r_proto=0
14812 : see if setpwent exists
14813 set setpwent d_setpwent
14816 : see if setpwent_r exists
14817 set setpwent_r d_setpwent_r
14819 case "$d_setpwent_r" in
14821 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14822 case "$d_setpwent_r_proto:$usethreads" in
14823 ":define") d_setpwent_r_proto=define
14824 set d_setpwent_r_proto setpwent_r $hdrs
14828 case "$d_setpwent_r_proto" in
14830 case "$setpwent_r_proto" in
14831 ''|0) try='int setpwent_r(FILE**);'
14832 ./protochk "extern $try" $hdrs && setpwent_r_proto=I_H ;;
14834 case "$setpwent_r_proto" in
14835 ''|0) try='void setpwent_r(FILE**);'
14836 ./protochk "extern $try" $hdrs && setpwent_r_proto=V_H ;;
14838 case "$setpwent_r_proto" in
14839 ''|0) d_setpwent_r=undef
14841 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
14842 * ) case "$setpwent_r_proto" in
14843 REENTRANT_PROTO*) ;;
14844 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
14846 echo "Prototype: $try" ;;
14849 *) case "$usethreads" in
14850 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
14857 *) setpwent_r_proto=0
14861 : see if setregid exists
14862 set setregid d_setregid
14864 set setresgid d_setresgid
14867 : see if setreuid exists
14868 set setreuid d_setreuid
14870 set setresuid d_setresuid
14873 : see if setrgid exists
14874 set setrgid d_setrgid
14877 : see if setruid exists
14878 set setruid d_setruid
14881 : see if setservent exists
14882 set setservent d_setsent
14885 : see if setservent_r exists
14886 set setservent_r d_setservent_r
14888 case "$d_setservent_r" in
14890 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14891 case "$d_setservent_r_proto:$usethreads" in
14892 ":define") d_setservent_r_proto=define
14893 set d_setservent_r_proto setservent_r $hdrs
14897 case "$d_setservent_r_proto" in
14899 case "$setservent_r_proto" in
14900 ''|0) try='int setservent_r(int, struct servent_data*);'
14901 ./protochk "extern $try" $hdrs && setservent_r_proto=I_ID ;;
14903 case "$setservent_r_proto" in
14904 ''|0) try='void setservent_r(int, struct servent_data*);'
14905 ./protochk "extern $try" $hdrs && setservent_r_proto=V_ID ;;
14907 case "$setservent_r_proto" in
14908 ''|0) d_setservent_r=undef
14909 setservent_r_proto=0
14910 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
14911 * ) case "$setservent_r_proto" in
14912 REENTRANT_PROTO*) ;;
14913 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
14915 echo "Prototype: $try" ;;
14918 *) case "$usethreads" in
14919 define) echo "setservent_r has no prototype, not using it." >&4 ;;
14921 d_setservent_r=undef
14922 setservent_r_proto=0
14926 *) setservent_r_proto=0
14930 : see if setsid exists
14931 set setsid d_setsid
14934 : see if setvbuf exists
14935 set setvbuf d_setvbuf
14938 : see if sfio.h is available
14943 : see if sfio library is available
14954 : Ok, but do we want to use it.
14958 true|$define|[yY]*) dflt='y';;
14961 echo "$package can use the sfio library, but it is experimental."
14962 case "$useperlio" in
14964 echo "For sfio also the PerlIO abstraction layer is needed."
14965 echo "Earlier you said you wouldn't want that."
14968 rp="You seem to have sfio available, do you want to try using it?"
14971 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
14972 useperlio="$define"
14975 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
14980 *) case "$usesfio" in
14981 true|$define|[yY]*)
14982 echo "Sorry, cannot find sfio on this machine." >&4
14983 echo "Ignoring your setting of usesfio=$usesfio." >&4
14992 $define) usesfio='true';;
14993 *) usesfio='false';;
14997 *) : Remove sfio from list of libraries to use
15000 echo "Removing unneeded -lsfio from library list" >&4
15001 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
15004 echo "libs = $libs" >&4
15011 : see if shmctl exists
15012 set shmctl d_shmctl
15015 : see if shmget exists
15016 set shmget d_shmget
15019 : see if shmat exists
15022 : see what shmat returns
15025 $cat >shmat.c <<'END'
15026 #include <sys/shm.h>
15029 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
15034 echo "and it returns ($shmattype)." >&4
15035 : see if a prototype for shmat is available
15036 xxx=`./findhdr sys/shm.h`
15037 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
15038 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
15049 set d_shmatprototype
15052 : see if shmdt exists
15056 : see how much of the 'shm*(2)' library is present.
15059 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
15060 *"$undef"*) h_shm=false;;
15064 case "`ipcs 2>&1`" in
15065 "SVID shared memory"*"not configured"*)
15066 echo "Your $osname does not have the shm*(2) configured." >&4
15069 set shmctl d_shmctl
15071 set shmget d_shmget
15081 : we could also check for sys/ipc.h ...
15082 if $h_shm && $test `./findhdr sys/shm.h`; then
15083 echo "You have the full shm*(2) library." >&4
15086 echo "You don't have the full shm*(2) library." >&4
15093 : see if we have sigaction
15094 if set sigaction val -f d_sigaction; eval $csym; $val; then
15095 echo 'sigaction() found.' >&4
15096 $cat > try.c <<'EOP'
15098 #include <sys/types.h>
15099 #include <signal.h>
15102 struct sigaction act, oact;
15104 oact.sa_handler = 0;
15105 /* so that act and oact are used */
15106 exit(act.sa_flags == 0 && oact.sa_handler == 0);
15110 if eval $compile_ok; then
15113 echo "But you don't seem to have a useable struct sigaction." >&4
15117 echo 'sigaction NOT found.' >&4
15120 set d_sigaction; eval $setvar
15121 $rm -f try try$_o try.c
15123 : see if sigprocmask exists
15124 set sigprocmask d_sigprocmask
15127 : see if sigsetjmp exists
15129 case "$d_sigsetjmp" in
15131 $cat >try.c <<'EOP'
15132 #include <setjmp.h>
15137 if (sigsetjmp(env,1))
15140 siglongjmp(env, 1);
15145 if eval $compile; then
15146 if $run ./try >/dev/null 2>&1; then
15147 echo "POSIX sigsetjmp found." >&4
15151 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
15157 echo "sigsetjmp not found." >&4
15161 *) val="$d_sigsetjmp"
15162 case "$d_sigsetjmp" in
15163 $define) echo "POSIX sigsetjmp found." >&4;;
15164 $undef) echo "sigsetjmp not found." >&4;;
15172 : see if sockatmark exists
15173 set sockatmark d_sockatmark
15176 : see if prototype for sockatmark is available
15178 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
15181 : see if socks5_init exists
15182 set socks5_init d_socks5_init
15185 : see if srand48_r exists
15186 set srand48_r d_srand48_r
15188 case "$d_srand48_r" in
15190 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15191 case "$d_srand48_r_proto:$usethreads" in
15192 ":define") d_srand48_r_proto=define
15193 set d_srand48_r_proto srand48_r $hdrs
15197 case "$d_srand48_r_proto" in
15199 case "$srand48_r_proto" in
15200 ''|0) try='int srand48_r(long, struct drand48_data*);'
15201 ./protochk "extern $try" $hdrs && srand48_r_proto=I_LS ;;
15203 case "$srand48_r_proto" in
15204 ''|0) d_srand48_r=undef
15206 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
15207 * ) case "$srand48_r_proto" in
15208 REENTRANT_PROTO*) ;;
15209 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
15211 echo "Prototype: $try" ;;
15214 *) case "$usethreads" in
15215 define) echo "srand48_r has no prototype, not using it." >&4 ;;
15222 *) srand48_r_proto=0
15226 : see if srandom_r exists
15227 set srandom_r d_srandom_r
15229 case "$d_srandom_r" in
15231 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15232 case "$d_srandom_r_proto:$usethreads" in
15233 ":define") d_srandom_r_proto=define
15234 set d_srandom_r_proto srandom_r $hdrs
15238 case "$d_srandom_r_proto" in
15240 case "$srandom_r_proto" in
15241 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
15242 ./protochk "extern $try" $hdrs && srandom_r_proto=I_TS ;;
15244 case "$srandom_r_proto" in
15245 ''|0) d_srandom_r=undef
15247 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
15248 * ) case "$srandom_r_proto" in
15249 REENTRANT_PROTO*) ;;
15250 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
15252 echo "Prototype: $try" ;;
15255 *) case "$usethreads" in
15256 define) echo "srandom_r has no prototype, not using it." >&4 ;;
15263 *) srandom_r_proto=0
15267 : see if prototype for setresgid is available
15269 set d_sresgproto setresgid $i_unistd unistd.h
15272 : see if prototype for setresuid is available
15274 set d_sresuproto setresuid $i_unistd unistd.h
15277 : see if sys/stat.h is available
15278 set sys/stat.h i_sysstat
15282 : see if stat knows about block sizes
15284 echo "Checking to see if your struct stat has st_blocks field..." >&4
15285 set d_statblks stat st_blocks $i_sysstat sys/stat.h
15289 : see if this is a sys/vfs.h system
15290 set sys/vfs.h i_sysvfs
15294 : see if this is a sys/statfs.h system
15295 set sys/statfs.h i_sysstatfs
15300 echo "Checking to see if your system supports struct statfs..." >&4
15301 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
15303 case "$d_statfs_s" in
15304 "$define") echo "Yes, it does." ;;
15305 *) echo "No, it doesn't." ;;
15310 : see if struct statfs knows about f_flags
15311 case "$d_statfs_s" in
15314 echo "Checking to see if your struct statfs has f_flags field..." >&4
15315 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
15319 set d_statfs_f_flags
15323 case "$d_statfs_f_flags" in
15324 "$define") echo "Yes, it does." ;;
15325 *) echo "No, it doesn't." ;;
15328 : see if _ptr and _cnt from stdio act std
15331 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
15332 echo "(Looks like you have stdio.h from BSD.)"
15333 case "$stdio_ptr" in
15334 '') stdio_ptr='((fp)->_p)'
15337 *) ptr_lval=$d_stdio_ptr_lval;;
15339 case "$stdio_cnt" in
15340 '') stdio_cnt='((fp)->_r)'
15343 *) cnt_lval=$d_stdio_cnt_lval;;
15345 case "$stdio_base" in
15346 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
15348 case "$stdio_bufsiz" in
15349 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
15351 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
15352 echo "(Looks like you have stdio.h from Linux.)"
15353 case "$stdio_ptr" in
15354 '') stdio_ptr='((fp)->_IO_read_ptr)'
15357 *) ptr_lval=$d_stdio_ptr_lval;;
15359 case "$stdio_cnt" in
15360 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
15363 *) cnt_lval=$d_stdio_cnt_lval;;
15365 case "$stdio_base" in
15366 '') stdio_base='((fp)->_IO_read_base)';;
15368 case "$stdio_bufsiz" in
15369 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
15372 case "$stdio_ptr" in
15373 '') stdio_ptr='((fp)->_ptr)'
15376 *) ptr_lval=$d_stdio_ptr_lval;;
15378 case "$stdio_cnt" in
15379 '') stdio_cnt='((fp)->_cnt)'
15382 *) cnt_lval=$d_stdio_cnt_lval;;
15384 case "$stdio_base" in
15385 '') stdio_base='((fp)->_base)';;
15387 case "$stdio_bufsiz" in
15388 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
15392 : test whether _ptr and _cnt really work
15393 echo "Checking how std your stdio is..." >&4
15396 #define FILE_ptr(fp) $stdio_ptr
15397 #define FILE_cnt(fp) $stdio_cnt
15399 FILE *fp = fopen("try.c", "r");
15402 18 <= FILE_cnt(fp) &&
15403 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15411 if eval $compile && $to try.c; then
15412 if $run ./try; then
15413 echo "Your stdio acts pretty std."
15416 echo "Your stdio isn't very std."
15419 echo "Your stdio doesn't appear very std."
15423 # glibc 2.2.90 and above apparently change stdio streams so Perl's
15424 # direct buffer manipulation no longer works. The Configure tests
15425 # should be changed to correctly detect this, but until then,
15426 # the following check should at least let perl compile and run.
15427 # (This quick fix should be updated before 5.8.1.)
15428 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
15429 # A. Dougherty, June 3, 2002.
15430 case "$d_gnulibc" in
15432 case "$gnulibc_version" in
15436 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
15445 : Can _ptr be used as an lvalue?
15446 case "$d_stdstdio$ptr_lval" in
15447 $define$define) val=$define ;;
15450 set d_stdio_ptr_lval
15453 : Can _cnt be used as an lvalue?
15454 case "$d_stdstdio$cnt_lval" in
15455 $define$define) val=$define ;;
15458 set d_stdio_cnt_lval
15462 : test whether setting _ptr sets _cnt as a side effect
15463 d_stdio_ptr_lval_sets_cnt="$undef"
15464 d_stdio_ptr_lval_nochange_cnt="$undef"
15465 case "$d_stdio_ptr_lval$d_stdstdio" in
15467 echo "Checking to see what happens if we set the stdio ptr..." >&4
15470 /* Can we scream? */
15471 /* Eat dust sed :-) */
15472 /* In the buffer space, no one can hear you scream. */
15473 #define FILE_ptr(fp) $stdio_ptr
15474 #define FILE_cnt(fp) $stdio_cnt
15475 #include <sys/types.h>
15477 FILE *fp = fopen("try.c", "r");
15482 puts("Fail even to read");
15485 c = getc(fp); /* Read away the first # */
15487 puts("Fail even to read");
15491 18 <= FILE_cnt(fp) &&
15492 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15494 puts("Fail even to read");
15497 ptr = (char*) FILE_ptr(fp);
15498 cnt = (size_t)FILE_cnt(fp);
15500 FILE_ptr(fp) += 42;
15502 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
15503 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
15506 if (FILE_cnt(fp) <= 20) {
15507 printf ("Fail (<20 chars to test)");
15510 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
15511 puts("Fail compare");
15514 if (cnt == FILE_cnt(fp)) {
15515 puts("Pass_unchanged");
15518 if (FILE_cnt(fp) == (cnt - 42)) {
15519 puts("Pass_changed");
15522 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
15528 if eval $compile && $to try.c; then
15529 case `$run ./try` in
15531 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
15532 d_stdio_ptr_lval_sets_cnt="$define" ;;
15534 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
15535 d_stdio_ptr_lval_nochange_cnt="$define" ;;
15537 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
15539 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
15542 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
15548 : see if _base is also standard
15550 case "$d_stdstdio" in
15554 #define FILE_base(fp) $stdio_base
15555 #define FILE_bufsiz(fp) $stdio_bufsiz
15557 FILE *fp = fopen("try.c", "r");
15560 19 <= FILE_bufsiz(fp) &&
15561 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
15568 if eval $compile && $to try.c; then
15569 if $run ./try; then
15570 echo "And its _base field acts std."
15573 echo "But its _base field isn't std."
15576 echo "However, it seems to be lacking the _base field."
15585 Checking how to access stdio streams by file descriptor number...
15587 case "$stdio_stream_array" in
15588 '') $cat >try.c <<EOCP
15591 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
15595 for s in _iob __iob __sF
15597 set try -DSTDIO_STREAM_ARRAY=$s
15598 if eval $compile; then
15599 case "`$run ./try`" in
15600 yes) stdio_stream_array=$s; break ;;
15604 $rm -f try.* try$exe_ext
15606 case "$stdio_stream_array" in
15608 I can't figure out how to access stdio streams by file descriptor number.
15610 d_stdio_stream_array="$undef"
15613 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
15615 d_stdio_stream_array="$define"
15619 : see if strcoll exists
15620 set strcoll d_strcoll
15623 : check for structure copying
15625 echo "Checking to see if your C compiler can copy structs..." >&4
15626 $cat >try.c <<'EOCP'
15636 if $cc -c try.c >/dev/null 2>&1 ; then
15638 echo "Yup, it can."
15641 echo "Nope, it can't."
15647 : see if strerror and/or sys_errlist[] exist
15649 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
15650 if set strerror val -f d_strerror; eval $csym; $val; then
15651 echo 'strerror() found.' >&4
15652 d_strerror="$define"
15653 d_strerrm='strerror(e)'
15654 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15655 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
15656 d_syserrlst="$define"
15658 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
15659 d_syserrlst="$undef"
15661 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
15662 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
15663 echo 'strerror() found in string header.' >&4
15664 d_strerror="$define"
15665 d_strerrm='strerror(e)'
15666 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15667 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
15668 d_syserrlst="$define"
15670 echo "(You don't appear to have any sys_errlist[], how can this be?)"
15671 d_syserrlst="$undef"
15673 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15674 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
15675 d_strerror="$undef"
15676 d_syserrlst="$define"
15677 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
15679 echo 'strerror() and sys_errlist[] NOT found.' >&4
15680 d_strerror="$undef"
15681 d_syserrlst="$undef"
15682 d_strerrm='"unknown"'
15686 : see if strerror_r exists
15687 set strerror_r d_strerror_r
15689 case "$d_strerror_r" in
15691 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
15692 case "$d_strerror_r_proto:$usethreads" in
15693 ":define") d_strerror_r_proto=define
15694 set d_strerror_r_proto strerror_r $hdrs
15698 case "$d_strerror_r_proto" in
15700 case "$strerror_r_proto" in
15701 ''|0) try='int strerror_r(int, char*, size_t);'
15702 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;;
15704 case "$strerror_r_proto" in
15705 ''|0) try='int strerror_r(int, char*, int);'
15706 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;;
15708 case "$strerror_r_proto" in
15709 ''|0) try='char* strerror_r(int, char*, size_t);'
15710 ./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;;
15712 case "$strerror_r_proto" in
15713 ''|0) d_strerror_r=undef
15715 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
15716 * ) case "$strerror_r_proto" in
15717 REENTRANT_PROTO*) ;;
15718 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
15720 echo "Prototype: $try" ;;
15723 *) case "$usethreads" in
15724 define) echo "strerror_r has no prototype, not using it." >&4 ;;
15731 *) strerror_r_proto=0
15735 : see if strftime exists
15736 set strftime d_strftime
15739 : see if strtod exists
15740 set strtod d_strtod
15743 : see if strtol exists
15744 set strtol d_strtol
15747 : see if strtold exists
15748 set strtold d_strtold
15751 : see if strtoll exists
15752 set strtoll d_strtoll
15755 case "$d_longlong-$d_strtoll" in
15758 Checking whether your strtoll() works okay...
15760 $cat >try.c <<'EOCP'
15763 #define strtoll __strtoll
15766 #define strtoll _strtoll
15769 extern long long int strtoll(char *s, char **, int);
15770 static int bad = 0;
15771 int check(char *s, long long ell, int een) {
15774 gll = strtoll(s, 0, 10);
15775 if (!((gll == ell) && (errno == een)))
15779 check(" 1", 1LL, 0);
15780 check(" 0", 0LL, 0);
15781 check("-1", -1LL, 0);
15782 check("-9223372036854775808", -9223372036854775808LL, 0);
15783 check("-9223372036854775808", -9223372036854775808LL, 0);
15784 check(" 9223372036854775807", 9223372036854775807LL, 0);
15785 check("-9223372036854775808", -9223372036854775808LL, 0);
15786 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
15787 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
15793 if eval $compile; then
15796 ok) echo "Your strtoll() seems to be working okay." ;;
15798 Your strtoll() doesn't seem to be working okay.
15804 echo "(I can't seem to compile the test program--assuming it doesn't)"
15810 : see if strtoq exists
15811 set strtoq d_strtoq
15814 : see if strtoul exists
15815 set strtoul d_strtoul
15818 case "$d_strtoul" in
15821 Checking whether your strtoul() works okay...
15823 $cat >try.c <<'EOCP'
15826 extern unsigned long int strtoul(char *s, char **, int);
15827 static int bad = 0;
15828 void check(char *s, unsigned long eul, int een) {
15831 gul = strtoul(s, 0, 10);
15832 if (!((gul == eul) && (errno == een)))
15836 check(" 1", 1L, 0);
15837 check(" 0", 0L, 0);
15839 case "$longsize" in
15841 $cat >>try.c <<'EOCP'
15842 check("18446744073709551615", 18446744073709551615UL, 0);
15843 check("18446744073709551616", 18446744073709551615UL, ERANGE);
15844 #if 0 /* strtoul() for /^-/ strings is undefined. */
15845 check("-1", 18446744073709551615UL, 0);
15846 check("-18446744073709551614", 2, 0);
15847 check("-18446744073709551615", 1, 0);
15848 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
15849 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
15854 $cat >>try.c <<'EOCP'
15855 check("4294967295", 4294967295UL, 0);
15856 check("4294967296", 4294967295UL, ERANGE);
15857 #if 0 /* strtoul() for /^-/ strings is undefined. */
15858 check("-1", 4294967295UL, 0);
15859 check("-4294967294", 2, 0);
15860 check("-4294967295", 1, 0);
15861 check("-4294967296", 4294967295UL, ERANGE);
15862 check("-4294967297", 4294967295UL, ERANGE);
15867 : Should we write these tests to be more portable by sprintf-ing
15868 : ~0 and then manipulating that char string as input for strtol?
15871 $cat >>try.c <<'EOCP'
15878 if eval $compile; then
15879 case "`$run ./try`" in
15880 ok) echo "Your strtoul() seems to be working okay." ;;
15882 Your strtoul() doesn't seem to be working okay.
15891 : see if strtoull exists
15892 set strtoull d_strtoull
15895 case "$d_longlong-$d_strtoull" in
15898 Checking whether your strtoull() works okay...
15900 $cat >try.c <<'EOCP'
15903 #define strtoull __strtoull
15906 extern unsigned long long int strtoull(char *s, char **, int);
15907 static int bad = 0;
15908 int check(char *s, long long eull, int een) {
15911 gull = strtoull(s, 0, 10);
15912 if (!((gull == eull) && (errno == een)))
15916 check(" 1", 1LL, 0);
15917 check(" 0", 0LL, 0);
15918 check("18446744073709551615", 18446744073709551615ULL, 0);
15919 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
15920 #if 0 /* strtoull() for /^-/ strings is undefined. */
15921 check("-1", 18446744073709551615ULL, 0);
15922 check("-18446744073709551614", 2LL, 0);
15923 check("-18446744073709551615", 1LL, 0);
15924 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
15925 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
15932 if eval $compile; then
15933 case "`$run ./try`" in
15934 ok) echo "Your strtoull() seems to be working okay." ;;
15936 Your strtoull() doesn't seem to be working okay.
15938 d_strtoull="$undef"
15945 : see if strtouq exists
15946 set strtouq d_strtouq
15949 case "$d_strtouq" in
15952 Checking whether your strtouq() works okay...
15954 $cat >try.c <<'EOCP'
15957 extern unsigned long long int strtouq(char *s, char **, int);
15958 static int bad = 0;
15959 void check(char *s, unsigned long long eull, int een) {
15960 unsigned long long gull;
15962 gull = strtouq(s, 0, 10);
15963 if (!((gull == eull) && (errno == een)))
15967 check(" 1", 1LL, 0);
15968 check(" 0", 0LL, 0);
15969 check("18446744073709551615", 18446744073709551615ULL, 0);
15970 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
15971 #if 0 /* strtouq() for /^-/ strings is undefined. */
15972 check("-1", 18446744073709551615ULL, 0);
15973 check("-18446744073709551614", 2LL, 0);
15974 check("-18446744073709551615", 1LL, 0);
15975 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
15976 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
15984 if eval $compile; then
15985 case "`$run ./try`" in
15986 ok) echo "Your strtouq() seems to be working okay." ;;
15988 Your strtouq() doesn't seem to be working okay.
15997 : see if strxfrm exists
15998 set strxfrm d_strxfrm
16001 : see if symlink exists
16002 set symlink d_symlink
16005 : see if syscall exists
16006 set syscall d_syscall
16009 : see if prototype for syscall is available
16011 set d_syscallproto syscall $i_unistd unistd.h
16014 : see if sysconf exists
16015 set sysconf d_sysconf
16018 : see if system exists
16019 set system d_system
16022 : see if tcgetpgrp exists
16023 set tcgetpgrp d_tcgetpgrp
16026 : see if tcsetpgrp exists
16027 set tcsetpgrp d_tcsetpgrp
16030 : see if prototype for telldir is available
16032 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
16035 : see if time exists
16037 if test "X$d_time" = X -o X"$timetype" = X; then
16038 if set time val -f d_time; eval $csym; $val; then
16039 echo 'time() found.' >&4
16041 rp="What is the type returned by time() on this system?"
16042 set time_t timetype long stdio.h sys/types.h
16045 echo 'time() not found, hope that will do.' >&4
16053 : see if this is a sys/times.h system
16054 set sys/times.h i_systimes
16057 : see if times exists
16059 if set times val -f d_times; eval $csym; $val; then
16060 echo 'times() found.' >&4
16063 case "$i_systimes" in
16064 "$define") inc='sys/times.h';;
16066 rp="What is the type returned by times() on this system?"
16067 set clock_t clocktype long stdio.h sys/types.h $inc
16070 echo 'times() NOT found, hope that will do.' >&4
16075 : see if tmpnam_r exists
16076 set tmpnam_r d_tmpnam_r
16078 case "$d_tmpnam_r" in
16080 hdrs="$i_systypes sys/types.h define stdio.h "
16081 case "$d_tmpnam_r_proto:$usethreads" in
16082 ":define") d_tmpnam_r_proto=define
16083 set d_tmpnam_r_proto tmpnam_r $hdrs
16087 case "$d_tmpnam_r_proto" in
16089 case "$tmpnam_r_proto" in
16090 ''|0) try='char* tmpnam_r(char*);'
16091 ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;;
16093 case "$tmpnam_r_proto" in
16094 ''|0) d_tmpnam_r=undef
16096 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
16097 * ) case "$tmpnam_r_proto" in
16098 REENTRANT_PROTO*) ;;
16099 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
16101 echo "Prototype: $try" ;;
16104 *) case "$usethreads" in
16105 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
16112 *) tmpnam_r_proto=0
16116 : see if truncate exists
16117 set truncate d_truncate
16120 : see if ttyname_r exists
16121 set ttyname_r d_ttyname_r
16123 case "$d_ttyname_r" in
16125 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
16126 case "$d_ttyname_r_proto:$usethreads" in
16127 ":define") d_ttyname_r_proto=define
16128 set d_ttyname_r_proto ttyname_r $hdrs
16132 case "$d_ttyname_r_proto" in
16134 case "$ttyname_r_proto" in
16135 ''|0) try='int ttyname_r(int, char*, size_t);'
16136 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;;
16138 case "$ttyname_r_proto" in
16139 ''|0) try='int ttyname_r(int, char*, int);'
16140 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;;
16142 case "$ttyname_r_proto" in
16143 ''|0) try='char* ttyname_r(int, char*, int);'
16144 ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;;
16146 case "$ttyname_r_proto" in
16147 ''|0) d_ttyname_r=undef
16149 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
16150 * ) case "$ttyname_r_proto" in
16151 REENTRANT_PROTO*) ;;
16152 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
16154 echo "Prototype: $try" ;;
16157 *) case "$usethreads" in
16158 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
16165 *) ttyname_r_proto=0
16169 : see if tzname[] exists
16171 if set tzname val -a d_tzname; eval $csym; $val; then
16173 echo 'tzname[] found.' >&4
16176 echo 'tzname[] NOT found.' >&4
16182 next|rhapsody|darwin) multiarch="$define" ;;
16184 case "$multiarch" in
16185 ''|[nN]*) multiarch="$undef" ;;
16188 : check for ordering of bytes in a UV
16190 case "$usecrosscompile$multiarch" in
16193 You seem to be either cross-compiling or doing a multiarchitecture build,
16194 skipping the byteorder check.
16200 case "$byteorder" in
16203 In the following, larger digits indicate more significance. A big-endian
16204 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
16205 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
16206 machines may have weird orders like 3412. A Cray will report 87654321,
16207 an Alpha will report 12345678. If the test program works the default is
16209 I'm now running the test program...
16213 #include <sys/types.h>
16214 typedef $uvtype UV;
16224 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
16226 u.l = (UV)0x04030201;
16227 for (i = 0; i < $uvsize; i++)
16228 printf("%c", u.c[i]+'0');
16235 if eval $compile && ./try > /dev/null; then
16238 [1-4][1-4][1-4][1-4]|12345678|87654321)
16239 echo "(The test program ran ok.)"
16240 echo "byteorder=$dflt"
16243 ????|????????) echo "(The test program ran ok.)" ;;
16244 *) echo "(The test program didn't run right for some reason.)" ;;
16249 (I can't seem to compile the test program. Guessing big-endian...)
16252 case "$xxx_prompt" in
16254 rp="What is the order of bytes in $uvtype?"
16270 Checking to see whether you can access character data unalignedly...
16272 case "$d_u32align" in
16273 '') $cat >try.c <<EOCP
16275 #define U32 $u32type
16276 #define BYTEORDER 0x$byteorder
16278 #include <signal.h>
16280 $signal_t bletch(s) int s; { exit(4); }
16283 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
16288 if (sizeof(U32) != 4) {
16289 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
16296 signal(SIGBUS, bletch);
16308 for (i = 0; i < 4; i++) {
16309 up = (U32*)(buf + i);
16310 if (! ((*up == 1 << (8*i)) || /* big-endian */
16311 (*up == 1 << (8*(3-i))) /* little-endian */
16315 printf("read failed (%x)\n", *up);
16321 for (i = 0; i < 4; i++) {
16322 up = (U32*)(buf + i);
16324 if (*up != 0xBeef) {
16325 printf("write failed (%x)\n", *up);
16339 if eval $compile_ok; then
16340 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
16341 $run ./try 2>&1 >/dev/null
16344 You can access character data pretty unalignedly.
16346 d_u32align="$undef"
16349 It seems that you must access character data in an aligned manner.
16351 d_u32align="$define"
16355 rp='Can you access character data at unaligned addresses?'
16359 [yY]*) d_u32align="$undef" ;;
16360 *) d_u32align="$define" ;;
16363 $rm -f core core.try.* try.core
16367 : see if ualarm exists
16368 set ualarm d_ualarm
16371 : see if umask exists
16375 : see if unordered exists
16376 set unordered d_unordered
16379 : see if usleep exists
16380 set usleep d_usleep
16383 : see if prototype for usleep is available
16385 set d_usleepproto usleep $i_unistd unistd.h
16388 : see if ustat exists
16392 : backward compatibility for d_hvfork
16393 if test X$d_hvfork != X; then
16394 d_vfork="$d_hvfork"
16397 : see if there is a vfork
16402 : Ok, but do we want to use it. vfork is reportedly unreliable in
16403 : perl on Solaris 2.x, and probably elsewhere.
16407 case "$usevfork" in
16413 Perl can only use a vfork() that doesn't suffer from strict
16414 restrictions on calling functions or modifying global data in
16415 the child. For example, glibc-2.1 contains such a vfork()
16416 that is unsuitable. If your system provides a proper fork()
16417 call, chances are that you do NOT want perl to use vfork().
16420 rp="Do you still want to use vfork()?"
16425 echo "Ok, we won't use vfork()."
16434 $define) usevfork='true';;
16435 *) usevfork='false';;
16438 : see if closedir exists
16439 set closedir d_closedir
16442 case "$d_closedir" in
16445 echo "Checking whether closedir() returns a status..." >&4
16447 #$i_dirent I_DIRENT /**/
16448 #$i_sysdir I_SYS_DIR /**/
16449 #$i_sysndir I_SYS_NDIR /**/
16450 #$i_systypes I_SYS_TYPES /**/
16452 #if defined(I_SYS_TYPES)
16453 #include <sys/types.h>
16455 #if defined(I_DIRENT)
16456 #include <dirent.h>
16457 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
16458 #include <sys/dir.h>
16462 #include <sys/ndir.h>
16466 #include <ndir.h> /* may be wrong in the future */
16468 #include <sys/dir.h>
16473 int main() { return closedir(opendir(".")); }
16476 if eval $compile_ok; then
16477 if $run ./try > /dev/null 2>&1 ; then
16478 echo "Yes, it does."
16481 echo "No, it doesn't."
16485 echo "(I can't seem to compile the test program--assuming it doesn't)"
16493 set d_void_closedir
16496 : see if there is a wait4
16500 : see if waitpid exists
16501 set waitpid d_waitpid
16504 : see if wcstombs exists
16505 set wcstombs d_wcstombs
16508 : see if wctomb exists
16509 set wctomb d_wctomb
16512 : see if writev exists
16513 set writev d_writev
16516 : preserve RCS keywords in files with variable substitution, grrr
16521 Revision='$Revision'
16523 : check for alignment requirements
16525 case "$usecrosscompile$multiarch" in
16528 You seem to be either cross-compiling or doing a multiarchitecture build,
16529 skipping the memory alignment check.
16532 case "$alignbytes" in
16533 '') alignbytes=8 ;;
16537 case "$alignbytes" in
16538 '') echo "Checking alignment constraints..." >&4
16539 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
16540 $cat >try.c <<'EOCP'
16541 typedef long double NV;
16544 $cat >try.c <<'EOCP'
16548 $cat >>try.c <<'EOCP'
16556 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
16561 if eval $compile_ok; then
16565 echo "(I can't seem to compile the test program...)"
16568 *) dflt="$alignbytes"
16571 rp="Doubles must be aligned on a how-many-byte boundary?"
16579 : set the base revision
16582 : how do we catenate cpp tokens here?
16584 echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
16585 $cat >cpp_stuff.c <<'EOCP'
16586 #define RCAT(a,b)a/**/b
16587 #define ACAT(a,b)a ## b
16591 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
16592 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
16593 echo "Oh! Smells like ANSI's been here." >&4
16594 echo "We can catify or stringify, separately or together!"
16596 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
16597 echo "Ah, yes! The good old days!" >&4
16598 echo "However, in the good old days we don't know how to stringify and"
16599 echo "catify at the same time."
16603 Hmm, I don't seem to be able to catenate tokens with your cpp. You're going
16604 to have to edit the values of CAT[2-5] in config.h...
16606 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
16610 : see if this is a db.h system
16616 : Check db version.
16618 echo "Checking Berkeley DB version ..." >&4
16624 #include <sys/types.h>
16627 int main(int argc, char *argv[])
16629 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
16630 int Major, Minor, Patch ;
16631 unsigned long Version ;
16632 (void)db_version(&Major, &Minor, &Patch) ;
16634 printf("%d %d %d %d %d %d\n",
16635 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
16636 Major, Minor, Patch);
16639 printf("You have Berkeley DB Version 2 or greater.\n");
16641 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
16642 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
16643 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
16644 Major, Minor, Patch) ;
16646 /* check that db.h & libdb are compatible */
16647 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
16648 printf("db.h and libdb are incompatible.\n") ;
16652 printf("db.h and libdb are compatible.\n") ;
16654 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
16655 + DB_VERSION_PATCH ;
16657 /* needs to be >= 2.3.4 */
16658 if (Version < 2003004) {
16659 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
16660 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
16666 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
16671 printf("You have Berkeley DB Version 1.\n");
16672 exit(0); /* DB version < 2: the coast is clear. */
16674 exit(1); /* <db.h> not Berkeley DB? */
16680 if eval $compile_ok && $run ./try; then
16681 echo 'Looks OK.' >&4
16683 db_version_major=$1
16684 db_version_minor=$2
16685 db_version_patch=$3
16687 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
16691 : Remove db from list of libraries to use
16692 echo "Removing unusable -ldb from library list" >&4
16693 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
16696 echo "libs = $libs" >&4
16706 : Check the return type needed for hash
16708 echo "Checking return type needed for hash for Berkeley DB ..." >&4
16714 #include <sys/types.h>
16717 #ifndef DB_VERSION_MAJOR
16718 u_int32_t hash_cb (ptr, size)
16726 info.hash = hash_cb;
16730 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16731 if $contains warning try.out >>/dev/null 2>&1 ; then
16734 db_hashtype='u_int32_t'
16737 : XXX Maybe we should just give up here.
16738 db_hashtype=u_int32_t
16740 echo "Help: I can't seem to compile the db test program." >&4
16741 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
16744 echo "Your version of Berkeley DB uses $db_hashtype for hash."
16746 *) db_hashtype=u_int32_t
16751 : Check the return type needed for prefix
16753 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
16759 #include <sys/types.h>
16762 #ifndef DB_VERSION_MAJOR
16763 size_t prefix_cb (key1, key2)
16771 info.prefix = prefix_cb;
16775 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16776 if $contains warning try.out >>/dev/null 2>&1 ; then
16777 db_prefixtype='int'
16779 db_prefixtype='size_t'
16782 db_prefixtype='size_t'
16783 : XXX Maybe we should just give up here.
16785 echo "Help: I can't seem to compile the db test program." >&4
16786 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
16789 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
16791 *) db_prefixtype='size_t'
16796 : How can we generate normalized random numbers ?
16798 echo "Looking for a random number function..." >&4
16799 case "$randfunc" in
16801 if set drand48 val -f; eval $csym; $val; then
16803 echo "Good, found drand48()." >&4
16804 elif set random val -f; eval $csym; $val; then
16806 echo "OK, found random()." >&4
16809 echo "Yick, looks like I have to use rand()." >&4
16820 *-Dmy_rand=*|*-Dmy_srand=*)
16821 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
16822 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
16823 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
16824 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
16828 while $test "$cont"; do
16829 rp="Use which function to generate random numbers?"
16831 if $test "$ans" = "$dflt"; then
16837 if set $ans val -f; eval $csym; $val; then
16841 rp="I cannot find function $ans. Use that name anyway?"
16850 case "$randfunc" in
16852 drand01="drand48()"
16858 case "$randbits" in
16860 echo "Checking to see how many bits your $randfunc() function produces..." >&4
16862 #$i_unistd I_UNISTD
16863 #$i_stdlib I_STDLIB
16866 # include <unistd.h>
16869 # include <stdlib.h>
16874 register unsigned long tmp;
16875 register unsigned long max = 0L;
16877 for (i = 1000; i; i--) {
16878 tmp = (unsigned long) $randfunc();
16879 if (tmp > max) max = tmp;
16881 for (i = 0; max; i++)
16887 if eval $compile_ok; then
16891 echo "(I can't seem to compile the test program...)"
16898 rp="How many bits does your $randfunc() function produce?"
16902 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
16903 seedfunc="s$randfunc"
16904 randseedtype=unsigned
16908 rp="How many bits does your $randfunc() function produce?"
16911 seedfunc="s$randfunc"
16912 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
16913 if set $seedfunc val -f; eval $csym; $val; then
16914 echo "(Using $seedfunc() to seed random generator)"
16916 echo "(Warning: no $seedfunc() to seed random generator)"
16919 randseedtype=unsigned
16927 echo "Determining whether or not we are on an EBCDIC system..." >&4
16928 $cat >try.c <<'EOM'
16931 if ('M'==0xd4) return 0;
16938 if eval $compile_ok; then
16939 if $run ./try; then
16940 echo "You seem to speak EBCDIC." >&4
16943 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
16946 echo "I'm unable to compile the test program." >&4
16947 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
16955 Checking how to flush all pending stdio output...
16957 # I only know how to find the first 32 possibly open files on SunOS.
16958 # See also hints/sunos_4_1.sh and util.c --AD
16960 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
16962 $cat >>try.c <<EOCP
16964 #$i_unistd I_UNISTD
16966 # include <unistd.h>
16968 #$d_sysconf HAS_SYSCONF
16969 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
16970 #ifdef HAS_STDIO_STREAM_ARRAY
16971 # define STDIO_STREAM_ARRAY $stdio_stream_array
16976 p = fopen("try.out", "w");
16980 # ifdef TRY_FPRINTF
16984 #ifdef TRY_FFLUSH_NULL
16987 #ifdef TRY_FFLUSH_ALL
16989 long open_max = -1;
16990 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
16991 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
16993 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
16994 open_max = sysconf(_SC_OPEN_MAX);
16997 open_max = FOPEN_MAX;
17000 open_max = OPEN_MAX;
17009 # ifdef HAS_STDIO_STREAM_ARRAY
17010 if (open_max > 0) {
17012 for (i = 0; i < open_max; i++)
17013 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
17014 STDIO_STREAM_ARRAY[i]._file < open_max &&
17015 STDIO_STREAM_ARRAY[i]._flag)
17016 fflush(&STDIO_STREAM_ARRAY[i]);
17024 : first we have to find out how _not_ to flush
17026 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
17028 set try -DTRY_FPUTC
17029 if eval $compile; then
17030 $run ./try 2>/dev/null
17033 if $test ! -s try.out -a "X$code" = X42; then
17039 set try -DTRY_FPRINTF
17040 if eval $compile; then
17041 $run ./try 2>/dev/null
17044 if $test ! -s try.out -a "X$code" = X42; then
17045 output=-DTRY_FPRINTF
17051 : check for fflush NULL behaviour
17052 case "$fflushNULL" in
17053 '') set try -DTRY_FFLUSH_NULL $output
17054 if eval $compile; then
17055 $run ./try 2>/dev/null
17058 if $test -s try.out -a "X$code" = X42; then
17059 fflushNULL="`$cat try.out`"
17061 if $test "X$code" != X42; then
17063 (If this test failed, don't worry, we'll try another method shortly.)
17068 $rm -f core try.core core.try.*
17069 case "$fflushNULL" in
17071 Your fflush(NULL) works okay for output streams.
17072 Let's see if it clobbers input pipes...
17074 # As of mid-March 2000 all versions of Solaris appear to have a stdio
17075 # bug that improperly flushes the input end of pipes. So we avoid the
17076 # autoflush on fork/system/exec support for now. :-(
17077 $cat >tryp.c <<EOCP
17080 main(int argc, char **argv)
17086 while ((i = getc(stdin)) != -1
17087 && (*bp++ = i) != '\n'
17088 && bp < &buf[1024])
17091 fprintf(stdout, "%s", buf);
17099 fflushNULL="$define"
17101 if eval $compile; then
17103 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17104 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17106 fflush(NULL) seems to behave okay with input streams.
17108 fflushNULL="$define"
17111 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
17113 fflushNULL="$undef"
17116 $rm -f core tryp.c tryp.core core.tryp.*
17119 Your fflush(NULL) isn't working (contrary to ANSI C).
17121 fflushNULL="$undef"
17124 Cannot figure out whether your fflush(NULL) works or not.
17125 I'm assuming it doesn't (contrary to ANSI C).
17127 fflushNULL="$undef"
17131 $define|true|[yY]*)
17132 fflushNULL="$define"
17135 fflushNULL="$undef"
17138 : check explicit looping only if NULL did not work, and if the pipe
17139 : bug does not show up on an explicit flush too
17140 case "$fflushNULL" in
17142 $cat >tryp.c <<EOCP
17145 main(int argc, char **argv)
17151 while ((i = getc(stdin)) != -1
17152 && (*bp++ = i) != '\n'
17153 && bp < &buf[1024])
17156 fprintf(stdout, "%s", buf);
17165 if eval $compile; then
17167 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17168 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17170 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
17172 : now check for fflushall behaviour
17173 case "$fflushall" in
17174 '') set try -DTRY_FFLUSH_ALL $output
17175 if eval $compile; then
17177 (Now testing the other method--but note that this also may fail.)
17179 $run ./try 2>/dev/null
17182 if $test -s try.out -a "X$code" = X42; then
17183 fflushall="`$cat try.out`"
17186 $rm -f core try.core core.try.*
17187 case "$fflushall" in
17189 Whew. Flushing explicitly all the stdio streams works.
17191 fflushall="$define"
17194 Sigh. Flushing explicitly all the stdio streams doesn't work.
17199 Cannot figure out whether flushing stdio streams explicitly works or not.
17200 I'm assuming it doesn't.
17206 "$define"|true|[yY]*)
17207 fflushall="$define"
17215 All is futile. Even fflush(stdin) clobbers input pipes!
17222 $rm -f core tryp.c tryp.core core.tryp.*
17224 *) fflushall="$undef"
17228 case "$fflushNULL$fflushall" in
17231 OK, I give up. I cannot figure out how to flush pending stdio output.
17232 We won't be flushing handles at all before fork/exec/popen.
17236 $rm -f try.* try$exe_ext
17238 : Store the full pathname to the ar program for use in the C program
17239 : Respect a hint or command line value for full_ar.
17244 : Store the full pathname to the sed program for use in the C program
17247 : see what type gids are declared as in the kernel
17249 echo "Looking for the type for group ids returned by getgid()."
17250 set gid_t gidtype xxx stdio.h sys/types.h
17254 xxx=`./findhdr sys/user.h`
17255 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
17257 unsigned) dflt="$1 $2" ;;
17261 *) dflt="$gidtype";;
17264 gid_t) echo "gid_t found." ;;
17265 *) rp="What is the type for group ids returned by getgid()?"
17273 *_t) zzz="$gidtype" ;;
17276 echo "Checking the size of $zzz..." >&4
17278 #include <sys/types.h>
17281 printf("%d\n", (int)sizeof($gidtype));
17286 if eval $compile_ok; then
17290 echo "(I can't execute the test program--guessing $gidsize.)" >&4
17293 echo "Your $zzz is $gidsize bytes long."
17298 echo "(I can't compile the test program--guessing $gidsize.)" >&4
17304 *_t) zzz="$gidtype" ;;
17307 echo "Checking the sign of $zzz..." >&4
17309 #include <sys/types.h>
17320 if eval $compile; then
17324 echo "(I can't execute the test program--guessing unsigned.)" >&4
17328 1) echo "Your $zzz is unsigned." ;;
17329 -1) echo "Your $zzz is signed." ;;
17335 echo "(I can't compile the test program--guessing unsigned.)" >&4
17341 if $test X"$quadtype" != X; then
17343 echo "Checking how to print 64-bit integers..." >&4
17345 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
17346 $cat >try.c <<'EOCP'
17347 #include <sys/types.h>
17350 int q = 12345678901;
17351 printf("%ld\n", q);
17355 if eval $compile; then
17359 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
17360 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
17361 echo "We will use %d."
17367 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
17368 $cat >try.c <<'EOCP'
17369 #include <sys/types.h>
17372 long q = 12345678901;
17373 printf("%ld\n", q);
17377 if eval $compile; then
17381 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
17382 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
17383 echo "We will use %ld."
17389 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
17390 $cat >try.c <<'EOCP'
17391 #include <sys/types.h>
17392 #include <inttypes.h>
17395 int64_t q = 12345678901;
17396 printf("%" PRId64 "\n", q);
17400 if eval $compile; then
17404 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
17405 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
17406 echo "We will use the C9X style."
17412 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17414 #include <sys/types.h>
17417 $quadtype q = 12345678901;
17418 printf("%Ld\n", q);
17422 if eval $compile; then
17426 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
17427 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
17428 echo "We will use %Ld."
17434 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
17435 $cat >try.c <<'EOCP'
17436 #include <sys/types.h>
17439 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
17440 printf("%lld\n", q);
17444 if eval $compile; then
17448 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
17449 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
17450 echo "We will use the %lld style."
17456 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17458 #include <sys/types.h>
17461 $quadtype q = 12345678901;
17462 printf("%qd\n", q);
17466 if eval $compile; then
17470 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
17471 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
17472 echo "We will use %qd."
17478 if $test X"$sPRId64" = X; then
17479 echo "Cannot figure out how to print 64-bit integers." >&4
17487 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
17488 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
17490 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
17491 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
17497 $echo "Checking the format strings to be used for Perl's internal types..." >&4
17499 if $test X"$ivsize" = X8; then
17500 ivdformat="$sPRId64"
17501 uvuformat="$sPRIu64"
17502 uvoformat="$sPRIo64"
17503 uvxformat="$sPRIx64"
17504 uvXUformat="$sPRIXU64"
17506 if $test X"$ivsize" = X"$longsize"; then
17513 if $test X"$ivsize" = X"$intsize"; then
17521 if $test X"$ivsize" = X"$shortsize"; then
17532 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
17533 nveformat="$sPRIeldbl"
17534 nvfformat="$sPRIfldbl"
17535 nvgformat="$sPRIgldbl"
17536 nvEUformat="$sPRIEUldbl"
17537 nvFUformat="$sPRIFUldbl"
17538 nvGUformat="$sPRIGUldbl"
17548 case "$ivdformat" in
17549 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
17556 $echo "Checking the format string to be used for gids..." >&4
17559 -1) if $test X"$gidsize" = X"$ivsize"; then
17560 gidformat="$ivdformat"
17562 if $test X"$gidsize" = X"$longsize"; then
17565 if $test X"$gidsize" = X"$intsize"; then
17568 if $test X"$gidsize" = X"$shortsize"; then
17575 *) if $test X"$gidsize" = X"$uvsize"; then
17576 gidformat="$uvuformat"
17578 if $test X"$gidsize" = X"$longsize"; then
17581 if $test X"$gidsize" = X"$intsize"; then
17584 if $test X"$gidsize" = X"$shortsize"; then
17593 : see if getgroups exists
17594 set getgroups d_getgrps
17597 : see if setgroups exists
17598 set setgroups d_setgrps
17602 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
17604 case "$d_getgrps$d_setgrps" in
17606 case "$groupstype" in
17607 '') dflt="$gidtype" ;;
17608 *) dflt="$groupstype" ;;
17611 What type of pointer is the second argument to getgroups() and setgroups()?
17612 Usually this is the same as group ids, $gidtype, but not always.
17615 rp='What type pointer is the second argument to getgroups() and setgroups()?'
17619 *) groupstype="$gidtype";;
17623 echo "Checking if your $make program sets \$(MAKE)..." >&4
17624 case "$make_set_make" in
17626 $sed 's/^X //' > testmake.mak << 'EOF'
17628 X @echo 'maketemp="$(MAKE)"'
17630 case "`$make -f testmake.mak 2>/dev/null`" in
17631 *maketemp=*) make_set_make='#' ;;
17632 *) make_set_make="MAKE=$make" ;;
17634 $rm -f testmake.mak
17637 case "$make_set_make" in
17638 '#') echo "Yup, it does.";;
17639 *) echo "Nope, it doesn't.";;
17642 : see what type is used for mode_t
17643 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
17644 set mode_t modetype int stdio.h sys/types.h
17647 : see if stdarg is available
17649 if $test `./findhdr stdarg.h`; then
17650 echo "<stdarg.h> found." >&4
17653 echo "<stdarg.h> NOT found." >&4
17657 : see if varags is available
17659 if $test `./findhdr varargs.h`; then
17660 echo "<varargs.h> found." >&4
17662 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
17665 : set up the varargs testing programs
17666 $cat > varargs.c <<EOP
17668 #include <stdarg.h>
17671 #include <varargs.h>
17675 int f(char *p, ...)
17689 p = va_arg(ap, char *);
17694 $cat > varargs <<EOP
17696 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
17705 : now check which varargs header should be included
17710 if `./varargs I_STDARG`; then
17712 elif `./varargs I_VARARGS`; then
17717 if `./varargs I_VARARGS`; then
17724 echo "I could not find the definition for va_dcl... You have problems..." >&4
17725 val="$undef"; set i_stdarg; eval $setvar
17726 val="$undef"; set i_varargs; eval $setvar
17731 case "$i_varhdr" in
17733 val="$define"; set i_stdarg; eval $setvar
17734 val="$undef"; set i_varargs; eval $setvar
17737 val="$undef"; set i_stdarg; eval $setvar
17738 val="$define"; set i_varargs; eval $setvar
17741 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
17745 : see if we need va_copy
17747 case "$i_stdarg" in
17750 #include <stdarg.h>
17752 #$i_stdlib I_STDLIB
17754 #include <stdlib.h>
17756 #include <signal.h>
17759 ivfprintf(FILE *f, const char *fmt, va_list *valp)
17761 return vfprintf(f, fmt, *valp);
17765 myvfprintf(FILE *f, const char *fmt, va_list val)
17767 return ivfprintf(f, fmt, &val);
17771 myprintf(char *fmt, ...)
17774 va_start(val, fmt);
17775 return myvfprintf(stdout, fmt, val);
17779 main(int ac, char **av)
17781 signal(SIGSEGV, exit);
17783 myprintf("%s%cs all right, then\n", "that", '\'');
17788 if eval $compile && $run ./try 2>&1 >/dev/null; then
17789 case "`$run ./try`" in
17790 "that's all right, then")
17796 yes) echo "It seems that you don't need va_copy()." >&4
17797 need_va_copy="$undef"
17799 *) echo "It seems that va_copy() or similar will be needed." >&4
17800 need_va_copy="$define"
17803 $rm -f try.* core core.* *.core *.core.*
17805 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
17809 : see what type is used for size_t
17810 rp="What is the type used for the length parameter for string functions?"
17811 set size_t sizetype 'unsigned int' stdio.h sys/types.h
17814 : check for type of arguments to gethostbyaddr.
17815 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
17816 case "$d_gethbyaddr" in
17820 Checking to see what type of arguments are accepted by gethostbyaddr().
17822 hdrs="$define sys/types.h
17823 $d_socket sys/socket.h
17824 $i_niin netinet/in.h
17826 $i_unistd unistd.h"
17827 : The first arg can 'char *' or 'void *'
17828 : The second arg is some of integral type
17829 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
17830 for yyy in size_t long int; do
17831 case "$netdb_host_type" in
17832 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
17833 if ./protochk "$try" $hdrs; then
17834 echo "Your system accepts $xxx for the first arg."
17835 echo "...and $yyy for the second arg."
17836 netdb_host_type="$xxx"
17837 netdb_hlen_type="$yyy"
17843 : In case none of those worked, prompt the user.
17844 case "$netdb_host_type" in
17845 '') rp='What is the type for the 1st argument to gethostbyaddr?'
17848 netdb_host_type=$ans
17849 rp='What is the type for the 2nd argument to gethostbyaddr?'
17852 netdb_hlen_type=$ans
17856 *) : no gethostbyaddr, so pick harmless defaults
17857 netdb_host_type='char *'
17858 netdb_hlen_type="$sizetype"
17861 # Remove the "const" if needed. -- but then we'll have a
17863 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
17866 : check for type of argument to gethostbyname.
17867 if test "X$netdb_name_type" = X ; then
17868 case "$d_gethbyname" in
17872 Checking to see what type of argument is accepted by gethostbyname().
17874 hdrs="$define sys/types.h
17875 $d_socket sys/socket.h
17876 $i_niin netinet/in.h
17878 $i_unistd unistd.h"
17879 for xxx in "const char *" "char *"; do
17880 case "$netdb_name_type" in
17881 '') try="extern struct hostent *gethostbyname($xxx);"
17882 if ./protochk "$try" $hdrs; then
17883 echo "Your system accepts $xxx."
17884 netdb_name_type="$xxx"
17889 : In case none of those worked, prompt the user.
17890 case "$netdb_name_type" in
17891 '') rp='What is the type for the 1st argument to gethostbyname?'
17894 netdb_name_type=$ans
17898 *) : no gethostbyname, so pick harmless default
17899 netdb_name_type='char *'
17904 : check for type of 1st argument to getnetbyaddr.
17905 if test "X$netdb_net_type" = X ; then
17906 case "$d_getnbyaddr" in
17910 Checking to see what type of 1st argument is accepted by getnetbyaddr().
17912 hdrs="$define sys/types.h
17913 $d_socket sys/socket.h
17914 $i_niin netinet/in.h
17916 $i_unistd unistd.h"
17917 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
17918 case "$netdb_net_type" in
17919 '') try="extern struct netent *getnetbyaddr($xxx, int);"
17920 if ./protochk "$try" $hdrs; then
17921 echo "Your system accepts $xxx."
17922 netdb_net_type="$xxx"
17927 : In case none of those worked, prompt the user.
17928 case "$netdb_net_type" in
17929 '') rp='What is the type for the 1st argument to getnetbyaddr?'
17932 netdb_net_type=$ans
17936 *) : no getnetbyaddr, so pick harmless default
17937 netdb_net_type='long'
17941 : locate the preferred pager for this system
17948 [a-zA-Z]:/*) dflt=$pg;;
17952 [a-zA-Z]:/*) dflt=$more;;
17956 [a-zA-Z]:/*) dflt=$less;;
17959 '') dflt=/usr/ucb/more;;
17963 : Instruct ./getfile to trust the hinted or previous pager value,
17964 : even if it does not begin with a slash. For example, on os2,
17965 : pager might be cmd /c more. See comments in UU/getfile.
17970 rp='What pager is used on your system?'
17974 : see what type pids are declared as in the kernel
17975 rp="What is the type of process ids on this system?"
17976 set pid_t pidtype int stdio.h sys/types.h
17979 : Find earliest binary compatible site_perl subdirectory perl can use.
17980 xs_apiversion=$version # The current site_perl version.
17981 : Find earliest pure perl site_perl subdirectory perl can use.
17982 : The versioned directories started at 5.005.
17983 pm_apiversion='5.005'
17985 : see if ar generates random libraries by itself
17987 echo "Checking how to generate random libraries on your machine..." >&4
17988 echo 'int bar1() { return bar2(); }' > bar1.c
17989 echo 'int bar2() { return 2; }' > bar2.c
17990 $cat > foo.c <<'EOP'
17991 int main() { printf("%d\n", bar1()); exit(0); }
17993 $cc $ccflags -c bar1.c >/dev/null 2>&1
17994 $cc $ccflags -c bar2.c >/dev/null 2>&1
17995 $cc $ccflags -c foo.c >/dev/null 2>&1
17996 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
17997 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
17998 $run ./foobar >/dev/null 2>&1; then
17999 echo "$ar appears to generate random libraries itself."
18002 elif $ar ts bar$_a >/dev/null 2>&1 &&
18003 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18004 $run ./foobar >/dev/null 2>&1; then
18005 echo "a table of contents needs to be added with '$ar ts'."
18012 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
18013 $test -f $ranlib || ranlib=''
18016 if $test -n "$ranlib"; then
18017 echo "your system has '$ranlib'; we'll use that."
18020 echo "your system doesn't seem to support random libraries"
18021 echo "so we'll use lorder and tsort to order the libraries."
18028 : check for type of arguments to select.
18029 case "$selecttype" in
18030 '') case "$d_select" in
18034 Checking to see what type of arguments are accepted by select().
18036 hdrs="$define sys/types.h
18037 $i_systime sys/time.h
18038 $i_sysselct sys/select.h
18039 $d_socket sys/socket.h"
18040 : The first arg can be int, unsigned, or size_t
18041 : The last arg may or may not be 'const'
18043 : void pointer has been seen but using that
18044 : breaks the selectminbits test
18045 for xxx in 'fd_set *' 'int *'; do
18046 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
18047 for tmo in 'struct timeval *' 'const struct timeval *'; do
18049 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
18050 if ./protochk "$try" $hdrs; then
18051 echo "Your system accepts $xxx."
18060 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
18061 case "$d_fd_set" in
18062 $define) dflt="fd_set *" ;;
18071 *) : no select, so pick a harmless default
18078 : check for the select 'width'
18079 case "$selectminbits" in
18080 '') case "$d_select" in
18084 Checking to see on how many bits at a time your select() operates...
18087 #include <sys/types.h>
18089 #$i_systime I_SYS_TIME
18090 #$i_systimek I_SYS_TIME_KERNEL
18095 # ifdef I_SYS_TIME_KERNEL
18098 # include <sys/time.h>
18099 # ifdef I_SYS_TIME_KERNEL
18103 #$i_sysselct I_SYS_SELECT
18104 #ifdef I_SYS_SELECT
18105 #include <sys/select.h>
18107 #$d_socket HAS_SOCKET
18109 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
18113 #define S sizeof(*(b))
18115 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
18116 #define NBITS (NBYTES * 8)
18125 fp = fopen("try.c", "r");
18131 b = ($selecttype)s;
18132 for (i = 0; i < NBITS; i++)
18136 select(fd + 1, b, 0, 0, &t);
18137 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
18138 printf("%d\n", i + 1);
18143 if eval $compile_ok; then
18144 selectminbits=`$run ./try`
18145 case "$selectminbits" in
18147 Cannot figure out on how many bits at a time your select() operates.
18148 I'll play safe and guess it is 32 bits.
18154 *) bits="$selectminbits bits" ;;
18156 echo "Your select() operates on $bits at a time." >&4
18158 rp='What is the minimum number of bits your select() operates on?'
18159 case "$byteorder" in
18160 1234|12345678) dflt=32 ;;
18165 selectminbits="$val"
18169 *) : no select, so pick a harmless default
18176 : Trace out the files included by signal.h, then look for SIGxxx names.
18177 : Remove SIGARRAYSIZE used by HPUX.
18178 : Remove SIGSTKSIZE used by Linux.
18179 : Remove SIGSTKSZ used by Posix.
18180 : Remove SIGTYP void lines used by OS2.
18181 : Some cpps, like os390, dont give the file name anywhere
18182 if [ "X$fieldn" = X ]; then
18183 : Just make some guesses. We check them later.
18184 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
18186 xxx=`echo '#include <signal.h>' |
18187 $cppstdin $cppminus $cppflags 2>/dev/null |
18188 $grep '^[ ]*#.*include' |
18189 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
18191 : Check this list of files to be sure we have parsed the cpp output ok.
18192 : This will also avoid potentially non-existent files, such
18195 for xx in $xxx /dev/null ; do
18196 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
18198 : If we have found no files, at least try signal.h
18199 case "$xxxfiles" in
18200 '') xxxfiles=`./findhdr signal.h` ;;
18203 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
18204 print substr($2, 4, 20)
18206 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
18207 print substr($3, 4, 20)
18209 : Append some common names just in case the awk scan failed.
18210 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
18211 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
18212 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
18213 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
18214 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
18216 : generate a few handy files for later
18217 $cat > signal.c <<'EOCP'
18218 #include <sys/types.h>
18219 #include <signal.h>
18223 /* Strange style to avoid deeply-nested #if/#else/#endif */
18226 # define NSIG (_NSIG)
18232 # define NSIG (SIGMAX+1)
18238 # define NSIG (SIG_MAX+1)
18244 # define NSIG (MAXSIG+1)
18250 # define NSIG (MAX_SIG+1)
18255 # ifdef SIGARRAYSIZE
18256 # define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
18262 # define NSIG (_sys_nsig) /* Solaris 2.5 */
18266 /* Default to some arbitrary number that's big enough to get most
18267 of the common signals.
18273 printf("NSIG %d\n", NSIG);
18279 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
18281 printf "#ifdef SIG"; printf $1; printf "\n"
18282 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
18283 printf $1; printf ");\n"
18287 printf "#endif /* JUST_NSIG */\n";
18288 printf "exit(0);\n}\n";
18291 $cat >signal.awk <<'EOP'
18292 BEGIN { ndups = 0 }
18293 $1 ~ /^NSIG$/ { nsig = $2 }
18294 ($1 !~ /^NSIG$/) && (NF == 2) {
18295 if ($2 > maxsig) { maxsig = $2 }
18296 if (sig_name[$2]) {
18297 dup_name[ndups] = $1
18298 dup_num[ndups] = $2
18310 printf("NSIG %d\n", nsig);
18311 for (n = 1; n < nsig; n++) {
18313 printf("%s %d\n", sig_name[n], sig_num[n])
18316 printf("NUM%d %d\n", n, n)
18319 for (n = 0; n < ndups; n++) {
18320 printf("%s %d\n", dup_name[n], dup_num[n])
18324 $cat >signal_cmd <<EOS
18326 if $test -s signal.lst; then
18327 echo "Using your existing signal.lst file"
18332 $cat >>signal_cmd <<'EOS'
18335 if eval $compile_ok; then
18336 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst
18338 echo "(I can't seem be able to compile the whole test program)" >&4
18339 echo "(I'll try it in little pieces.)" >&4
18340 set signal -DJUST_NSIG
18341 if eval $compile_ok; then
18342 $run ./signal$_exe > signal.nsg
18345 echo "I can't seem to figure out how many signals you have." >&4
18346 echo "Guessing 50." >&4
18347 echo 'NSIG 50' > signal.nsg
18349 : Now look at all the signal names, one at a time.
18350 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
18351 $cat > signal.c <<EOCP
18352 #include <sys/types.h>
18353 #include <signal.h>
18356 printf("$xx %d\n", SIG${xx});
18361 if eval $compile; then
18362 echo "SIG${xx} found."
18363 $run ./signal$_exe >> signal.ls1
18365 echo "SIG${xx} NOT found."
18368 if $test -s signal.ls1; then
18369 $cat signal.nsg signal.ls1 |
18370 $sort -n | $uniq | $awk -f signal.awk >signal.lst
18374 if $test -s signal.lst; then
18377 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
18378 echo 'kill -l' >signal
18379 set X `csh -f <signal`
18383 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
18385 echo $@ | $tr ' ' $trnl | \
18386 $awk '{ printf "%s %d\n", $1, ++s; }
18387 END { printf "NSIG %d\n", ++s }' >signal.lst
18389 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
18391 chmod a+x signal_cmd
18392 $eunicefix signal_cmd
18394 : generate list of signal names
18396 case "$sig_name_init" in
18398 *) case "$sig_num_init" in
18399 ''|*,*) doinit=yes ;;
18404 echo "Generating a list of signal names and numbers..." >&4
18406 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
18407 sig_name=`$awk 'BEGIN { printf "ZERO " }
18408 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
18409 sig_num=`$awk 'BEGIN { printf "0 " }
18410 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
18411 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
18412 !/^NSIG/ { printf "\"%s\", ", $1 }
18413 END { printf "0\n" }' signal.lst`
18414 sig_num_init=`$awk 'BEGIN { printf "0, " }
18415 !/^NSIG/ { printf "%d, ", $2}
18416 END { printf "0\n"}' signal.lst`
18419 echo "The following $sig_count signals are available:"
18421 echo $sig_name | $awk \
18422 'BEGIN { linelen = 0 }
18424 for (i = 1; i <= NF; i++) {
18425 name = "SIG" $i " "
18426 linelen = linelen + length(name)
18427 if (linelen > 70) {
18429 linelen = length(name)
18435 sig_size=`echo $sig_name | awk '{print NF}'`
18436 $rm -f signal signal.c signal.awk signal.lst signal_cmd
18439 case "$sizetype" in
18440 *_t) zzz="$sizetype" ;;
18441 *) zzz="filesize" ;;
18443 echo "Checking the size of $zzz..." >&4
18445 #include <sys/types.h>
18448 printf("%d\n", (int)sizeof($sizetype));
18453 if eval $compile_ok; then
18457 echo "(I can't execute the test program--guessing $sizesize.)" >&4
18460 echo "Your $zzz size is $sizesize bytes."
18465 echo "(I can't compile the test program--guessing $sizesize.)" >&4
18469 : check for socklen_t
18471 echo "Checking to see if you have socklen_t..." >&4
18473 #include <sys/types.h>
18474 #$d_socket HAS_SOCKET
18476 #include <sys/socket.h>
18478 int main() { socklen_t x = 16; }
18481 if eval $compile; then
18483 echo "You have socklen_t."
18486 echo "You do not have socklen_t."
18487 case "$sizetype" in
18488 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
18495 : see if this is a socks.h system
18496 set socks.h i_socks
18499 : check for type of the size argument to socket calls
18500 case "$d_socket" in
18504 Checking to see what type is the last argument of accept().
18507 case "$d_socklen_t" in
18508 "$define") yyy="$yyy socklen_t"
18510 yyy="$yyy $sizetype int long unsigned"
18511 for xxx in $yyy; do
18512 case "$socksizetype" in
18513 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
18514 case "$usesocks" in
18516 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
18517 echo "Your system accepts '$xxx *' for the last argument of accept()."
18518 socksizetype="$xxx"
18521 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
18522 echo "Your system accepts '$xxx *' for the last argument of accept()."
18523 socksizetype="$xxx"
18530 : In case none of those worked, prompt the user.
18531 case "$socksizetype" in
18532 '') rp='What is the type for socket address structure sizes?'
18539 *) : no sockets, so pick relatively harmless default
18544 : see what type is used for signed size_t
18545 set ssize_t ssizetype int stdio.h sys/types.h
18550 #include <sys/types.h>
18551 #define Size_t $sizetype
18552 #define SSize_t $dflt
18555 if (sizeof(Size_t) == sizeof(SSize_t))
18557 else if (sizeof(Size_t) == sizeof(int))
18566 if eval $compile_ok && $run ./try > /dev/null; then
18567 ssizetype=`$run ./try`
18568 echo "I'll be using $ssizetype for functions returning a byte count." >&4
18571 Help! I can't compile and run the ssize_t test program: please enlighten me!
18572 (This is probably a misconfiguration in your system or libraries, and
18573 you really ought to fix it. Still, I'll try anyway.)
18575 I need a type that is the same size as $sizetype, but is guaranteed to
18576 be signed. Common values are ssize_t, int and long.
18579 rp="What signed type is the same size as $sizetype?"
18585 : see what type of char stdio uses.
18587 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
18588 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
18589 echo "Your stdio uses unsigned chars." >&4
18590 stdchar="unsigned char"
18592 echo "Your stdio uses signed chars." >&4
18599 : see what type uids are declared as in the kernel
18601 echo "Looking for the type for user ids returned by getuid()."
18602 set uid_t uidtype xxx stdio.h sys/types.h
18606 xxx=`./findhdr sys/user.h`
18607 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
18609 unsigned) dflt="$1 $2" ;;
18613 *) dflt="$uidtype";;
18616 uid_t) echo "uid_t found." ;;
18617 *) rp="What is the type for user ids returned by getuid()?"
18625 *_t) zzz="$uidtype" ;;
18628 echo "Checking the size of $zzz..." >&4
18630 #include <sys/types.h>
18633 printf("%d\n", (int)sizeof($uidtype));
18638 if eval $compile_ok; then
18642 echo "(I can't execute the test program--guessing $uidsize.)" >&4
18645 echo "Your $zzz is $uidsize bytes long."
18650 echo "(I can't compile the test program--guessing $uidsize.)" >&4
18655 *_t) zzz="$uidtype" ;;
18658 echo "Checking the sign of $zzz..." >&4
18660 #include <sys/types.h>
18671 if eval $compile; then
18675 echo "(I can't execute the test program--guessing unsigned.)" >&4
18679 1) echo "Your $zzz is unsigned." ;;
18680 -1) echo "Your $zzz is signed." ;;
18686 echo "(I can't compile the test program--guessing unsigned.)" >&4
18692 $echo "Checking the format string to be used for uids..." >&4
18695 -1) if $test X"$uidsize" = X"$ivsize"; then
18696 uidformat="$ivdformat"
18698 if $test X"$uidsize" = X"$longsize"; then
18701 if $test X"$uidsize" = X"$intsize"; then
18704 if $test X"$uidsize" = X"$shortsize"; then
18711 *) if $test X"$uidsize" = X"$uvsize"; then
18712 uidformat="$uvuformat"
18714 if $test X"$uidsize" = X"$longsize"; then
18717 if $test X"$uidsize" = X"$intsize"; then
18720 if $test X"$uidsize" = X"$shortsize"; then
18729 : determine compiler compiler
18738 if $test -f "$byacc$_exe"; then
18740 comp="byacc or $comp"
18742 if $test -f "$bison$_exe"; then
18743 comp="$comp or bison -y"
18745 rp="Which compiler compiler ($comp) shall I use?"
18754 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
18760 : see if this is a fp.h system
18764 : see if this is a fp_class.h system
18765 set fp_class.h i_fp_class
18768 : see if this is a ieeefp.h system
18769 case "$i_ieeefp" in
18770 '' ) set ieeefp.h i_ieeefp
18775 : see if this is a libutil.h system
18776 set libutil.h i_libutil
18779 : see if mach cthreads are available
18780 if test "X$usethreads" = "X$define"; then
18781 set mach/cthreads.h i_machcthr
18784 i_machcthr="$undef"
18789 : see if this is a math.h system
18793 : see if this is a mntent.h system
18794 set mntent.h i_mntent
18797 : see if ndbm.h is available
18803 # Some Linux distributions such as RedHat 7.1 put the
18804 # ndbm.h header in /usr/include/gdbm/ndbm.h.
18805 if $test -f /usr/include/gdbm/ndbm.h; then
18806 echo '<gdbm/ndbm.h> found.'
18807 ccflags="$ccflags -I/usr/include/gdbm"
18808 cppflags="$cppflags -I/usr/include/gdbm"
18816 : see if dbm_open exists
18817 set dbm_open d_dbm_open
18819 case "$d_dbm_open" in
18822 echo "We won't be including <ndbm.h>"
18831 : see if net/errno.h is available
18833 set net/errno.h val
18836 : Unfortunately, it causes problems on some systems. Arrgh.
18839 cat > try.c <<'EOM'
18842 #include <net/errno.h>
18848 if $cc $ccflags -c try.c >/dev/null 2>&1; then
18849 echo "We'll be including <net/errno.h>." >&4
18851 echo "We won't be including <net/errno.h>." >&4
18860 : see if netinet/tcp.h is available
18861 set netinet/tcp.h i_netinettcp
18864 : see if this is a poll.h system
18868 : see if this is a prot.h system
18873 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
18874 $cat <<'EOSH' > Cppsym.know
18875 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
18876 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
18877 alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX
18878 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
18879 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
18880 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
18881 bull c cadmus clipper CMU COFF COMPILER_VERSION
18882 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
18883 CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
18884 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
18885 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
18887 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
18888 H3050R H3050RX hbullx20 hcx host_mips
18889 hp200 hp300 hp700 HP700 hp800 hp9000
18890 hp9000s200 hp9000s300 hp9000s400 hp9000s500
18891 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
18892 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
18893 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
18894 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
18895 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
18896 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
18897 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
18898 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
18899 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
18900 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
18901 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
18902 MATH_HAS_NO_SIDE_EFFECTS
18903 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
18904 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
18905 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
18906 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
18907 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
18908 NetBSD news1500 news1700 news1800 news1900 news3700
18909 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
18910 ns32016 ns32332 ns32k nsc32000
18911 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
18912 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
18913 pc532 pdp11 PGC PIC plexus PORTAR posix
18914 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
18915 POSIX_C_SOURCE POSIX_SOURCE POWER
18916 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
18917 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
18918 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
18919 sony sony_news sonyrisc sparc sparclite spectrum
18920 stardent stdc STDC_EXT stratos sun sun3 sun386
18921 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
18922 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
18923 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
18924 sysV68 sysV88 Tek4132 Tek4300 titan
18925 TM3200 TM5400 TM5600
18926 tower tower32 tower32_200 tower32_600 tower32_700
18927 tower32_800 tower32_850 tss
18928 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
18929 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
18930 unix UNIX95 UNIX99 unixpc unos
18931 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
18932 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
18933 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
18935 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
18936 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
18937 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
18940 # Maybe put other stuff here too.
18941 cat <<EOSH >>Cppsym.know
18944 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
18945 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
18946 $cat Cppsym.know > Cppsym.c
18947 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
18948 $rm -f Cppsym.a Cppsym.b Cppsym.c
18949 cat <<EOSH > Cppsym
18951 if $test \$# -gt 0; then
18952 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
18953 if $test -s Cppsym.got; then
18960 $tr " " "$trnl" | ./Cppsym.try
18966 cat <<EOSH > Cppsym.try
18968 cat <<'EOCP' > try.c
18974 cat <<'EOSH' >> Cppsym.try
18976 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
18977 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
18978 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
18979 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
18981 echo 'return 0;}' >> try.c
18983 cat <<EOSH >> Cppsym.try
18985 case "$osname-$gccversion" in
18986 irix-) ccflags="\$ccflags -woff 1178" ;;
18987 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
18989 $cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try
18991 chmod +x Cppsym.try
18992 $eunicefix Cppsym.try
18993 ./Cppsym < Cppsym.know > Cppsym.true
18994 : now check the C compiler for additional symbols
18995 postprocess_cc_v=''
18997 aix) postprocess_cc_v="|$tr , ' '" ;;
19004 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
19007 -D*) echo "\$i" | $sed 's/^-D//';;
19008 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
19013 postprocess_cc_v=''
19016 ./ccsym > ccsym1.raw
19017 if $test -s ccsym1.raw; then
19018 $sort ccsym1.raw | $uniq >ccsym.raw
19020 mv ccsym1.raw ccsym.raw
19023 $awk '/\=/ { print $0; next }
19024 { print $0"=1" }' ccsym.raw >ccsym.list
19025 $awk '/\=/ { print $0; next }
19026 { print $0"=1" }' Cppsym.true >ccsym.true
19027 $comm -13 ccsym.true ccsym.list >ccsym.own
19028 $comm -12 ccsym.true ccsym.list >ccsym.com
19029 $comm -23 ccsym.true ccsym.list >ccsym.cpp
19031 if $test -z ccsym.raw; then
19032 echo "Your C compiler doesn't seem to define any symbols!" >&4
19034 echo "However, your C preprocessor defines the following symbols:"
19037 cppsymbols=`$cat Cppsym.true`
19038 cppsymbols=`echo $cppsymbols`
19039 cppccsymbols="$cppsymbols"
19041 if $test -s ccsym.com; then
19042 echo "Your C compiler and pre-processor define these symbols:"
19043 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
19046 cppccsymbols=`$cat ccsym.com`
19047 cppccsymbols=`echo $cppccsymbols`
19048 $test "$silent" || sleep 1
19050 if $test -s ccsym.cpp; then
19051 $test "$also" && echo " "
19052 echo "Your C pre-processor ${also}defines the following symbols:"
19053 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
19055 cppsymbols=`$cat ccsym.cpp`
19056 cppsymbols=`echo $cppsymbols`
19057 $test "$silent" || sleep 1
19059 if $test -s ccsym.own; then
19060 $test "$also" && echo " "
19061 echo "Your C compiler ${also}defines the following cpp symbols:"
19062 $sed -e 's/\(..*\)=1/\1/' ccsym.own
19063 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
19064 ccsymbols=`$cat ccsym.own`
19065 ccsymbols=`echo $ccsymbols`
19066 $test "$silent" || sleep 1
19070 : see if this is a termio system
19074 if $test `./findhdr termios.h`; then
19075 set tcsetattr i_termios
19081 "$define") echo "You have POSIX termios.h... good!" >&4;;
19082 *) if ./Cppsym pyr; then
19083 case "`/bin/universe`" in
19084 ucb) if $test `./findhdr sgtty.h`; then
19086 echo "<sgtty.h> found." >&4
19088 echo "System is pyramid with BSD universe."
19089 echo "<sgtty.h> not found--you could have problems." >&4
19091 *) if $test `./findhdr termio.h`; then
19093 echo "<termio.h> found." >&4
19095 echo "System is pyramid with USG universe."
19096 echo "<termio.h> not found--you could have problems." >&4
19100 if $test `./findhdr termio.h`; then
19101 echo "<termio.h> found." >&4
19103 elif $test `./findhdr sgtty.h`; then
19104 echo "<sgtty.h> found." >&4
19107 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
19110 if $test `./findhdr sgtty.h`; then
19111 echo "<sgtty.h> found." >&4
19113 elif $test `./findhdr termio.h`; then
19114 echo "<termio.h> found." >&4
19117 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
19121 set i_termio; eval $setvar
19122 val=$val2; set i_sgtty; eval $setvar
19123 val=$val3; set i_termios; eval $setvar
19125 : see if stddef is available
19126 set stddef.h i_stddef
19129 : see if this is a sunmath.h system
19130 set sunmath.h i_sunmath
19133 : see if sys/access.h is available
19134 set sys/access.h i_sysaccess
19137 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
19138 set sys/filio.h i_sysfilio
19141 if $test `./findhdr sys/ioctl.h`; then
19143 echo '<sys/ioctl.h> found.' >&4
19146 if $test $i_sysfilio = "$define"; then
19147 echo '<sys/ioctl.h> NOT found.' >&4
19149 $test $i_sgtty = "$define" && xxx="sgtty.h"
19150 $test $i_termio = "$define" && xxx="termio.h"
19151 $test $i_termios = "$define" && xxx="termios.h"
19152 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
19158 : see if socket ioctl defs are in sys/sockio.h
19160 xxx=`./findhdr sys/sockio.h`
19161 if $test "$xxx"; then
19162 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
19164 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
19167 echo "No socket ioctls found in <sys/sockio.h>." >&4
19172 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
19179 : see if this is a syslog.h system
19180 set syslog.h i_syslog
19184 : see if this is a sys/mode.h system
19185 set sys/mode.h i_sysmode
19188 : see if sys/resource.h has to be included
19189 set sys/resource.h i_sysresrc
19192 : see if sys/security.h is available
19193 set sys/security.h i_syssecrt
19196 : see if this is a sys/statvfs.h system
19197 set sys/statvfs.h i_sysstatvfs
19200 : see if this is a sys/un.h system
19201 set sys/un.h i_sysun
19205 : see if this is a sys/utsname.h system
19206 set sys/utsname.h i_sysutsname
19209 : see if this is a syswait system
19210 set sys/wait.h i_syswait
19213 : see if this is a ustat.h system
19214 set ustat.h i_ustat
19217 : see if this is an utime system
19218 set utime.h i_utime
19221 : see if this is a values.h system
19222 set values.h i_values
19225 : see if this is a vfork system
19228 set vfork.h i_vfork
19236 : see if gdbm.h is available
19241 : see if gdbm_open exists
19242 set gdbm_open d_gdbm_open
19244 case "$d_gdbm_open" in
19247 echo "We won't be including <gdbm.h>"
19257 echo "Looking for extensions..." >&4
19258 : If we are using the old config.sh, known_extensions may contain
19259 : old or inaccurate or duplicate values.
19260 known_extensions=''
19261 nonxs_extensions=''
19262 : We do not use find because it might not be available.
19263 : We do not just use MANIFEST because the user may have dropped
19264 : some additional extensions into the source tree and expect them
19267 : Function to recursively find available extensions, ignoring DynaLoader
19268 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
19272 DynaLoader|dynaload) ;;
19274 if $test -f $xxx/$xxx.xs; then
19275 known_extensions="$known_extensions $1$xxx";
19276 elif $test -f $xxx/Makefile.PL; then
19277 nonxs_extensions="$nonxs_extensions $1$xxx";
19279 if $test -d $xxx -a $# -lt 10; then
19282 eval $find_extensions;
19294 eval $find_extensions
19295 # Special case: Add in threads/shared since it is not picked up by the
19296 # recursive find above (and adding in general recursive finding breaks
19297 # SDBM_File/sdbm). A.D. 10/25/2001.
19298 known_extensions="$known_extensions threads/shared"
19299 set X $nonxs_extensions
19301 nonxs_extensions="$*"
19302 set X $known_extensions
19304 known_extensions="$*"
19307 : Now see which are supported on this system.
19309 for xxx in $known_extensions ; do
19313 $define) avail_ext="$avail_ext $xxx" ;;
19316 GDBM_File|gdbm_fil)
19318 $define) avail_ext="$avail_ext $xxx" ;;
19321 I18N/Langinfo|i18n_lan)
19322 case "$i_langinfo$d_nl_langinfo" in
19323 $define$define) avail_ext="$avail_ext $xxx" ;;
19326 NDBM_File|ndbm_fil)
19329 case "$osname-$use64bitint" in
19332 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
19335 *) avail_ext="$avail_ext $xxx" ;;
19340 ODBM_File|odbm_fil)
19341 case "${i_dbm}${i_rpcsvcdbm}" in
19343 case "$osname-$use64bitint" in
19346 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
19349 *) avail_ext="$avail_ext $xxx" ;;
19355 case "$useposix" in
19356 true|define|y) avail_ext="$avail_ext $xxx" ;;
19360 case "$useopcode" in
19361 true|define|y) avail_ext="$avail_ext $xxx" ;;
19365 case "$d_socket" in
19368 beos) ;; # not unless BONE
19369 *) avail_ext="$avail_ext $xxx" ;;
19374 Sys/Syslog|sys/syslog)
19375 : XXX syslog requires socket
19376 case "$d_socket" in
19377 true|$define|y) avail_ext="$avail_ext $xxx" ;;
19381 case "$usethreads" in
19383 case "$useithreads" in
19384 $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
19388 XS/APItest|xs/apitest)
19389 # This is just for testing. Skip it unless we have dynamic loading.
19392 $define) avail_ext="$avail_ext $xxx" ;;
19395 XS/Typemap|xs/typemap)
19396 # This is just for testing. Skip it unless we have dynamic loading.
19398 $define) avail_ext="$avail_ext $xxx" ;;
19401 threads|threads/shared)
19402 # threads and threads::shared are special cases.
19403 # To stop people from asking "Perl 5.8.0 was supposed
19404 # to have this new fancy threads implementation but my
19405 # perl doesn't have it" and from people trying to
19406 # (re)install the threads module using CPAN.pm and
19407 # CPAN.pm then offering to reinstall Perl 5.8.0,
19408 # the threads.pm and threads/shared.pm will always be
19409 # there, croaking informatively ("you need to rebuild
19410 # all of Perl with threads, sorry") when threads haven't
19411 # been compiled in.
19413 avail_ext="$avail_ext $xxx"
19416 : XXX Do we need a useipcsysv variable here
19417 case "${d_msg}${d_sem}${d_shm}" in
19418 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
19421 *) avail_ext="$avail_ext $xxx"
19430 : Now see which nonxs extensions are supported on this system.
19431 : For now assume all are.
19433 for xxx in $nonxs_extensions ; do
19435 *) nonxs_ext="$nonxs_ext $xxx"
19447 A number of extensions are supplied with $package. You may choose to
19448 compile these extensions for dynamic loading (the default), compile
19449 them into the $package executable (static loading), or not include
19450 them at all. Answer "none" to include no extensions.
19451 Note that DynaLoader is always built and need not be mentioned here.
19454 case "$dynamic_ext" in
19456 : Exclude those listed in static_ext
19458 for xxx in $avail_ext; do
19459 case " $static_ext " in
19461 *) dflt="$dflt $xxx" ;;
19468 *) dflt="$dynamic_ext"
19469 # Perhaps we are reusing an old out-of-date config.sh.
19472 if test X"$dynamic_ext" != X"$avail_ext"; then
19474 NOTICE: Your previous config.sh list may be incorrect.
19475 The extensions now available to you are
19477 but the default list from your previous config.sh is
19489 rp="What extensions do you wish to load dynamically?"
19492 none) dynamic_ext=' ' ;;
19493 *) dynamic_ext="$ans" ;;
19496 case "$static_ext" in
19498 : Exclude those already listed in dynamic linking
19500 for xxx in $avail_ext; do
19501 case " $dynamic_ext " in
19503 *) dflt="$dflt $xxx" ;;
19510 *) dflt="$static_ext"
19517 rp="What extensions do you wish to load statically?"
19520 none) static_ext=' ' ;;
19521 *) static_ext="$ans" ;;
19526 A number of extensions are supplied with $package. Answer "none"
19527 to include no extensions.
19528 Note that DynaLoader is always built and need not be mentioned here.
19531 case "$static_ext" in
19532 '') dflt="$avail_ext" ;;
19533 *) dflt="$static_ext"
19534 # Perhaps we are reusing an old out-of-date config.sh.
19537 if test X"$static_ext" != X"$avail_ext"; then
19539 NOTICE: Your previous config.sh list may be incorrect.
19540 The extensions now available to you are
19542 but the default list from your previous config.sh is
19551 : Exclude those that are not xs extensions
19555 rp="What extensions do you wish to include?"
19558 none) static_ext=' ' ;;
19559 *) static_ext="$ans" ;;
19564 # Encode is a special case. If we are building Encode as a static
19565 # extension, we need to explicitly list its subextensions as well.
19566 # For other nested extensions, this is handled automatically by
19567 # the appropriate Makefile.PL.
19568 case " $static_ext " in
19569 *" Encode "*) # Add the subextensions of Encode
19571 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
19572 static_ext="$static_ext Encode/$xxx"
19578 set X $dynamic_ext $static_ext $nonxs_ext
19582 : Remove libraries needed only for extensions
19583 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
19584 : The exception is SunOS 4.x, which needs them.
19585 case "${osname}X${osvers}" in
19589 *) case "$usedl" in
19590 $define|true|[yY]*)
19591 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
19595 *) perllibs="$libs"
19601 : Remove build directory name from cppstdin so it can be used from
19602 : either the present location or the final installed location.
19604 : Get out of the UU directory to get correct path name.
19606 case "$cppstdin" in
19608 echo "Stripping down cppstdin path name"
19614 : end of configuration questions
19616 echo "End of configuration questions."
19619 : back to where it started
19620 if test -d ../UU; then
19624 : configuration may be patched via a 'config.arch' file
19625 if $test -f config.arch; then
19626 echo "I see a config.arch file, loading it."
19630 : configuration may be patched via a 'config.over' file
19631 if $test -f config.over; then
19634 rp='I see a config.over file. Do you wish to load it?'
19637 n*) echo "OK, I'll ignore it.";;
19639 echo "Configuration override changes have been loaded."
19644 : in case they want portability, strip down executable paths
19645 case "$d_portable" in
19648 echo "Stripping down executable paths..." >&4
19649 for file in $loclist $trylist; do
19651 eval $file=`basename $temp`
19656 : create config.sh file
19658 echo "Creating config.sh..." >&4
19659 $spitshell <<EOT >config.sh
19662 # This file was produced by running the Configure script. It holds all the
19663 # definitions figured out by Configure. Should you modify one of these values,
19664 # do not forget to propagate your changes by running "Configure -der". You may
19665 # instead choose to run each of the .SH files by yourself, or "Configure -S".
19668 # Package name : $package
19669 # Source directory : $src
19670 # Configuration time: $cf_time
19671 # Configured by : $cf_by
19672 # Target system : $myuname
19682 Revision='$Revision'
19690 alignbytes='$alignbytes'
19691 ansi2knr='$ansi2knr'
19692 aphostname='$aphostname'
19693 api_revision='$api_revision'
19694 api_subversion='$api_subversion'
19695 api_version='$api_version'
19696 api_versionstring='$api_versionstring'
19699 archlibexp='$archlibexp'
19700 archname64='$archname64'
19701 archname='$archname'
19702 archobjs='$archobjs'
19703 asctime_r_proto='$asctime_r_proto'
19711 byteorder='$byteorder'
19713 castflags='$castflags'
19716 cccdlflags='$cccdlflags'
19717 ccdlflags='$ccdlflags'
19719 ccflags_uselargefiles='$ccflags_uselargefiles'
19721 ccsymbols='$ccsymbols'
19722 ccversion='$ccversion'
19724 cf_email='$cf_email'
19726 charsize='$charsize'
19730 clocktype='$clocktype'
19732 compress='$compress'
19733 contains='$contains'
19737 cpp_stuff='$cpp_stuff'
19738 cppccsymbols='$cppccsymbols'
19739 cppflags='$cppflags'
19741 cppminus='$cppminus'
19743 cppstdin='$cppstdin'
19744 cppsymbols='$cppsymbols'
19745 crypt_r_proto='$crypt_r_proto'
19746 cryptlib='$cryptlib'
19748 ctermid_r_proto='$ctermid_r_proto'
19749 ctime_r_proto='$ctime_r_proto'
19750 d_Gconvert='$d_Gconvert'
19751 d_PRIEUldbl='$d_PRIEUldbl'
19752 d_PRIFUldbl='$d_PRIFUldbl'
19753 d_PRIGUldbl='$d_PRIGUldbl'
19754 d_PRIXU64='$d_PRIXU64'
19755 d_PRId64='$d_PRId64'
19756 d_PRIeldbl='$d_PRIeldbl'
19757 d_PRIfldbl='$d_PRIfldbl'
19758 d_PRIgldbl='$d_PRIgldbl'
19759 d_PRIi64='$d_PRIi64'
19760 d_PRIo64='$d_PRIo64'
19761 d_PRIu64='$d_PRIu64'
19762 d_PRIx64='$d_PRIx64'
19763 d_SCNfldbl='$d_SCNfldbl'
19764 d__fwalk='$d__fwalk'
19765 d_access='$d_access'
19766 d_accessx='$d_accessx'
19768 d_archlib='$d_archlib'
19769 d_asctime_r='$d_asctime_r'
19772 d_attribut='$d_attribut'
19776 d_bsdgetpgrp='$d_bsdgetpgrp'
19777 d_bsdsetpgrp='$d_bsdsetpgrp'
19779 d_casti32='$d_casti32'
19780 d_castneg='$d_castneg'
19781 d_charvspr='$d_charvspr'
19783 d_chroot='$d_chroot'
19784 d_chsize='$d_chsize'
19786 d_closedir='$d_closedir'
19787 d_cmsghdr_s='$d_cmsghdr_s'
19790 d_crypt_r='$d_crypt_r'
19792 d_ctermid_r='$d_ctermid_r'
19793 d_ctime_r='$d_ctime_r'
19794 d_cuserid='$d_cuserid'
19795 d_dbl_dig='$d_dbl_dig'
19796 d_dbminitproto='$d_dbminitproto'
19797 d_difftime='$d_difftime'
19799 d_dirnamlen='$d_dirnamlen'
19800 d_dlerror='$d_dlerror'
19801 d_dlopen='$d_dlopen'
19802 d_dlsymun='$d_dlsymun'
19803 d_dosuid='$d_dosuid'
19804 d_drand48_r='$d_drand48_r'
19805 d_drand48proto='$d_drand48proto'
19807 d_eaccess='$d_eaccess'
19808 d_endgrent='$d_endgrent'
19809 d_endgrent_r='$d_endgrent_r'
19810 d_endhent='$d_endhent'
19811 d_endhostent_r='$d_endhostent_r'
19812 d_endnent='$d_endnent'
19813 d_endnetent_r='$d_endnetent_r'
19814 d_endpent='$d_endpent'
19815 d_endprotoent_r='$d_endprotoent_r'
19816 d_endpwent='$d_endpwent'
19817 d_endpwent_r='$d_endpwent_r'
19818 d_endsent='$d_endsent'
19819 d_endservent_r='$d_endservent_r'
19820 d_eofnblk='$d_eofnblk'
19821 d_eunice='$d_eunice'
19822 d_fchdir='$d_fchdir'
19823 d_fchmod='$d_fchmod'
19824 d_fchown='$d_fchown'
19826 d_fcntl_can_lock='$d_fcntl_can_lock'
19827 d_fd_macros='$d_fd_macros'
19828 d_fd_set='$d_fd_set'
19829 d_fds_bits='$d_fds_bits'
19830 d_fgetpos='$d_fgetpos'
19831 d_finite='$d_finite'
19832 d_finitel='$d_finitel'
19833 d_flexfnam='$d_flexfnam'
19835 d_flockproto='$d_flockproto'
19837 d_fp_class='$d_fp_class'
19838 d_fpathconf='$d_fpathconf'
19839 d_fpclass='$d_fpclass'
19840 d_fpclassify='$d_fpclassify'
19841 d_fpclassl='$d_fpclassl'
19842 d_fpos64_t='$d_fpos64_t'
19843 d_frexpl='$d_frexpl'
19844 d_fs_data_s='$d_fs_data_s'
19845 d_fseeko='$d_fseeko'
19846 d_fsetpos='$d_fsetpos'
19847 d_fstatfs='$d_fstatfs'
19848 d_fstatvfs='$d_fstatvfs'
19850 d_ftello='$d_ftello'
19852 d_getcwd='$d_getcwd'
19853 d_getespwnam='$d_getespwnam'
19854 d_getfsstat='$d_getfsstat'
19855 d_getgrent='$d_getgrent'
19856 d_getgrent_r='$d_getgrent_r'
19857 d_getgrgid_r='$d_getgrgid_r'
19858 d_getgrnam_r='$d_getgrnam_r'
19859 d_getgrps='$d_getgrps'
19860 d_gethbyaddr='$d_gethbyaddr'
19861 d_gethbyname='$d_gethbyname'
19862 d_gethent='$d_gethent'
19863 d_gethname='$d_gethname'
19864 d_gethostbyaddr_r='$d_gethostbyaddr_r'
19865 d_gethostbyname_r='$d_gethostbyname_r'
19866 d_gethostent_r='$d_gethostent_r'
19867 d_gethostprotos='$d_gethostprotos'
19868 d_getitimer='$d_getitimer'
19869 d_getlogin='$d_getlogin'
19870 d_getlogin_r='$d_getlogin_r'
19871 d_getmnt='$d_getmnt'
19872 d_getmntent='$d_getmntent'
19873 d_getnbyaddr='$d_getnbyaddr'
19874 d_getnbyname='$d_getnbyname'
19875 d_getnent='$d_getnent'
19876 d_getnetbyaddr_r='$d_getnetbyaddr_r'
19877 d_getnetbyname_r='$d_getnetbyname_r'
19878 d_getnetent_r='$d_getnetent_r'
19879 d_getnetprotos='$d_getnetprotos'
19880 d_getpagsz='$d_getpagsz'
19881 d_getpbyname='$d_getpbyname'
19882 d_getpbynumber='$d_getpbynumber'
19883 d_getpent='$d_getpent'
19884 d_getpgid='$d_getpgid'
19885 d_getpgrp2='$d_getpgrp2'
19886 d_getpgrp='$d_getpgrp'
19887 d_getppid='$d_getppid'
19888 d_getprior='$d_getprior'
19889 d_getprotobyname_r='$d_getprotobyname_r'
19890 d_getprotobynumber_r='$d_getprotobynumber_r'
19891 d_getprotoent_r='$d_getprotoent_r'
19892 d_getprotoprotos='$d_getprotoprotos'
19893 d_getprpwnam='$d_getprpwnam'
19894 d_getpwent='$d_getpwent'
19895 d_getpwent_r='$d_getpwent_r'
19896 d_getpwnam_r='$d_getpwnam_r'
19897 d_getpwuid_r='$d_getpwuid_r'
19898 d_getsbyname='$d_getsbyname'
19899 d_getsbyport='$d_getsbyport'
19900 d_getsent='$d_getsent'
19901 d_getservbyname_r='$d_getservbyname_r'
19902 d_getservbyport_r='$d_getservbyport_r'
19903 d_getservent_r='$d_getservent_r'
19904 d_getservprotos='$d_getservprotos'
19905 d_getspnam='$d_getspnam'
19906 d_getspnam_r='$d_getspnam_r'
19907 d_gettimeod='$d_gettimeod'
19908 d_gmtime_r='$d_gmtime_r'
19909 d_gnulibc='$d_gnulibc'
19910 d_grpasswd='$d_grpasswd'
19911 d_hasmntopt='$d_hasmntopt'
19914 d_inetaton='$d_inetaton'
19915 d_int64_t='$d_int64_t'
19916 d_isascii='$d_isascii'
19917 d_isfinite='$d_isfinite'
19920 d_isnanl='$d_isnanl'
19921 d_killpg='$d_killpg'
19922 d_lchown='$d_lchown'
19923 d_ldbl_dig='$d_ldbl_dig'
19925 d_localtime_r='$d_localtime_r'
19926 d_locconv='$d_locconv'
19928 d_longdbl='$d_longdbl'
19929 d_longlong='$d_longlong'
19930 d_lseekproto='$d_lseekproto'
19932 d_madvise='$d_madvise'
19934 d_mbstowcs='$d_mbstowcs'
19935 d_mbtowc='$d_mbtowc'
19936 d_memchr='$d_memchr'
19937 d_memcmp='$d_memcmp'
19938 d_memcpy='$d_memcpy'
19939 d_memmove='$d_memmove'
19940 d_memset='$d_memset'
19942 d_mkdtemp='$d_mkdtemp'
19943 d_mkfifo='$d_mkfifo'
19944 d_mkstemp='$d_mkstemp'
19945 d_mkstemps='$d_mkstemps'
19946 d_mktime='$d_mktime'
19949 d_modfl_pow32_bug='$d_modfl_pow32_bug'
19950 d_modflproto='$d_modflproto'
19951 d_mprotect='$d_mprotect'
19953 d_msg_ctrunc='$d_msg_ctrunc'
19954 d_msg_dontroute='$d_msg_dontroute'
19955 d_msg_oob='$d_msg_oob'
19956 d_msg_peek='$d_msg_peek'
19957 d_msg_proxy='$d_msg_proxy'
19958 d_msgctl='$d_msgctl'
19959 d_msgget='$d_msgget'
19960 d_msghdr_s='$d_msghdr_s'
19961 d_msgrcv='$d_msgrcv'
19962 d_msgsnd='$d_msgsnd'
19964 d_munmap='$d_munmap'
19965 d_mymalloc='$d_mymalloc'
19967 d_nl_langinfo='$d_nl_langinfo'
19968 d_nv_preserves_uv='$d_nv_preserves_uv'
19969 d_off64_t='$d_off64_t'
19970 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
19971 d_oldpthreads='$d_oldpthreads'
19972 d_oldsock='$d_oldsock'
19974 d_pathconf='$d_pathconf'
19976 d_perl_otherlibdirs='$d_perl_otherlibdirs'
19977 d_phostname='$d_phostname'
19980 d_portable='$d_portable'
19981 d_procselfexe='$d_procselfexe'
19982 d_pthread_atfork='$d_pthread_atfork'
19983 d_pthread_yield='$d_pthread_yield'
19985 d_pwchange='$d_pwchange'
19986 d_pwclass='$d_pwclass'
19987 d_pwcomment='$d_pwcomment'
19988 d_pwexpire='$d_pwexpire'
19989 d_pwgecos='$d_pwgecos'
19990 d_pwpasswd='$d_pwpasswd'
19991 d_pwquota='$d_pwquota'
19994 d_random_r='$d_random_r'
19995 d_readdir64_r='$d_readdir64_r'
19996 d_readdir='$d_readdir'
19997 d_readdir_r='$d_readdir_r'
19998 d_readlink='$d_readlink'
20000 d_recvmsg='$d_recvmsg'
20001 d_rename='$d_rename'
20002 d_rewinddir='$d_rewinddir'
20004 d_safebcpy='$d_safebcpy'
20005 d_safemcpy='$d_safemcpy'
20006 d_sanemcmp='$d_sanemcmp'
20007 d_sbrkproto='$d_sbrkproto'
20008 d_sched_yield='$d_sched_yield'
20009 d_scm_rights='$d_scm_rights'
20010 d_seekdir='$d_seekdir'
20011 d_select='$d_select'
20013 d_semctl='$d_semctl'
20014 d_semctl_semid_ds='$d_semctl_semid_ds'
20015 d_semctl_semun='$d_semctl_semun'
20016 d_semget='$d_semget'
20018 d_sendmsg='$d_sendmsg'
20019 d_setegid='$d_setegid'
20020 d_seteuid='$d_seteuid'
20021 d_setgrent='$d_setgrent'
20022 d_setgrent_r='$d_setgrent_r'
20023 d_setgrps='$d_setgrps'
20024 d_sethent='$d_sethent'
20025 d_sethostent_r='$d_sethostent_r'
20026 d_setitimer='$d_setitimer'
20027 d_setlinebuf='$d_setlinebuf'
20028 d_setlocale='$d_setlocale'
20029 d_setlocale_r='$d_setlocale_r'
20030 d_setnent='$d_setnent'
20031 d_setnetent_r='$d_setnetent_r'
20032 d_setpent='$d_setpent'
20033 d_setpgid='$d_setpgid'
20034 d_setpgrp2='$d_setpgrp2'
20035 d_setpgrp='$d_setpgrp'
20036 d_setprior='$d_setprior'
20037 d_setproctitle='$d_setproctitle'
20038 d_setprotoent_r='$d_setprotoent_r'
20039 d_setpwent='$d_setpwent'
20040 d_setpwent_r='$d_setpwent_r'
20041 d_setregid='$d_setregid'
20042 d_setresgid='$d_setresgid'
20043 d_setresuid='$d_setresuid'
20044 d_setreuid='$d_setreuid'
20045 d_setrgid='$d_setrgid'
20046 d_setruid='$d_setruid'
20047 d_setsent='$d_setsent'
20048 d_setservent_r='$d_setservent_r'
20049 d_setsid='$d_setsid'
20050 d_setvbuf='$d_setvbuf'
20054 d_shmatprototype='$d_shmatprototype'
20055 d_shmctl='$d_shmctl'
20057 d_shmget='$d_shmget'
20058 d_sigaction='$d_sigaction'
20059 d_sigprocmask='$d_sigprocmask'
20060 d_sigsetjmp='$d_sigsetjmp'
20061 d_sockatmark='$d_sockatmark'
20062 d_sockatmarkproto='$d_sockatmarkproto'
20063 d_socket='$d_socket'
20064 d_socklen_t='$d_socklen_t'
20065 d_sockpair='$d_sockpair'
20066 d_socks5_init='$d_socks5_init'
20068 d_srand48_r='$d_srand48_r'
20069 d_srandom_r='$d_srandom_r'
20070 d_sresgproto='$d_sresgproto'
20071 d_sresuproto='$d_sresuproto'
20072 d_statblks='$d_statblks'
20073 d_statfs_f_flags='$d_statfs_f_flags'
20074 d_statfs_s='$d_statfs_s'
20075 d_statvfs='$d_statvfs'
20076 d_stdio_cnt_lval='$d_stdio_cnt_lval'
20077 d_stdio_ptr_lval='$d_stdio_ptr_lval'
20078 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
20079 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
20080 d_stdio_stream_array='$d_stdio_stream_array'
20081 d_stdiobase='$d_stdiobase'
20082 d_stdstdio='$d_stdstdio'
20083 d_strchr='$d_strchr'
20084 d_strcoll='$d_strcoll'
20085 d_strctcpy='$d_strctcpy'
20086 d_strerrm='$d_strerrm'
20087 d_strerror='$d_strerror'
20088 d_strerror_r='$d_strerror_r'
20089 d_strftime='$d_strftime'
20090 d_strtod='$d_strtod'
20091 d_strtol='$d_strtol'
20092 d_strtold='$d_strtold'
20093 d_strtoll='$d_strtoll'
20094 d_strtoq='$d_strtoq'
20095 d_strtoul='$d_strtoul'
20096 d_strtoull='$d_strtoull'
20097 d_strtouq='$d_strtouq'
20098 d_strxfrm='$d_strxfrm'
20099 d_suidsafe='$d_suidsafe'
20100 d_symlink='$d_symlink'
20101 d_syscall='$d_syscall'
20102 d_syscallproto='$d_syscallproto'
20103 d_sysconf='$d_sysconf'
20104 d_sysernlst='$d_sysernlst'
20105 d_syserrlst='$d_syserrlst'
20106 d_system='$d_system'
20107 d_tcgetpgrp='$d_tcgetpgrp'
20108 d_tcsetpgrp='$d_tcsetpgrp'
20109 d_telldir='$d_telldir'
20110 d_telldirproto='$d_telldirproto'
20113 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
20114 d_tm_tm_zone='$d_tm_tm_zone'
20115 d_tmpnam_r='$d_tmpnam_r'
20116 d_truncate='$d_truncate'
20117 d_ttyname_r='$d_ttyname_r'
20118 d_tzname='$d_tzname'
20119 d_u32align='$d_u32align'
20120 d_ualarm='$d_ualarm'
20123 d_union_semun='$d_union_semun'
20124 d_unordered='$d_unordered'
20125 d_usleep='$d_usleep'
20126 d_usleepproto='$d_usleepproto'
20128 d_vendorarch='$d_vendorarch'
20129 d_vendorbin='$d_vendorbin'
20130 d_vendorlib='$d_vendorlib'
20132 d_void_closedir='$d_void_closedir'
20133 d_voidsig='$d_voidsig'
20134 d_voidtty='$d_voidtty'
20135 d_volatile='$d_volatile'
20136 d_vprintf='$d_vprintf'
20138 d_waitpid='$d_waitpid'
20139 d_wcstombs='$d_wcstombs'
20140 d_wctomb='$d_wctomb'
20141 d_writev='$d_writev'
20144 db_hashtype='$db_hashtype'
20145 db_prefixtype='$db_prefixtype'
20146 db_version_major='$db_version_major'
20147 db_version_minor='$db_version_minor'
20148 db_version_patch='$db_version_patch'
20149 defvoidused='$defvoidused'
20150 direntrytype='$direntrytype'
20153 doublesize='$doublesize'
20155 drand48_r_proto='$drand48_r_proto'
20156 dynamic_ext='$dynamic_ext'
20162 endgrent_r_proto='$endgrent_r_proto'
20163 endhostent_r_proto='$endhostent_r_proto'
20164 endnetent_r_proto='$endnetent_r_proto'
20165 endprotoent_r_proto='$endprotoent_r_proto'
20166 endpwent_r_proto='$endpwent_r_proto'
20167 endservent_r_proto='$endservent_r_proto'
20168 eunicefix='$eunicefix'
20171 extensions='$extensions'
20173 fflushNULL='$fflushNULL'
20174 fflushall='$fflushall'
20176 firstmakefile='$firstmakefile'
20178 fpossize='$fpossize'
20179 fpostype='$fpostype'
20180 freetype='$freetype'
20183 full_csh='$full_csh'
20184 full_sed='$full_sed'
20185 gccosandvers='$gccosandvers'
20186 gccversion='$gccversion'
20187 getgrent_r_proto='$getgrent_r_proto'
20188 getgrgid_r_proto='$getgrgid_r_proto'
20189 getgrnam_r_proto='$getgrnam_r_proto'
20190 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
20191 gethostbyname_r_proto='$gethostbyname_r_proto'
20192 gethostent_r_proto='$gethostent_r_proto'
20193 getlogin_r_proto='$getlogin_r_proto'
20194 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
20195 getnetbyname_r_proto='$getnetbyname_r_proto'
20196 getnetent_r_proto='$getnetent_r_proto'
20197 getprotobyname_r_proto='$getprotobyname_r_proto'
20198 getprotobynumber_r_proto='$getprotobynumber_r_proto'
20199 getprotoent_r_proto='$getprotoent_r_proto'
20200 getpwent_r_proto='$getpwent_r_proto'
20201 getpwnam_r_proto='$getpwnam_r_proto'
20202 getpwuid_r_proto='$getpwuid_r_proto'
20203 getservbyname_r_proto='$getservbyname_r_proto'
20204 getservbyport_r_proto='$getservbyport_r_proto'
20205 getservent_r_proto='$getservent_r_proto'
20206 getspnam_r_proto='$getspnam_r_proto'
20207 gidformat='$gidformat'
20213 gmtime_r_proto='$gmtime_r_proto'
20214 gnulibc_version='$gnulibc_version'
20216 groupcat='$groupcat'
20217 groupstype='$groupstype'
20220 h_sysfile='$h_sysfile'
20231 i_arpainet='$i_arpainet'
20232 i_bsdioctl='$i_bsdioctl'
20236 i_dirent='$i_dirent'
20242 i_fp_class='$i_fp_class'
20245 i_ieeefp='$i_ieeefp'
20246 i_inttypes='$i_inttypes'
20247 i_langinfo='$i_langinfo'
20248 i_libutil='$i_libutil'
20249 i_limits='$i_limits'
20250 i_locale='$i_locale'
20251 i_machcthr='$i_machcthr'
20252 i_malloc='$i_malloc'
20254 i_memory='$i_memory'
20255 i_mntent='$i_mntent'
20258 i_neterrno='$i_neterrno'
20259 i_netinettcp='$i_netinettcp'
20263 i_pthread='$i_pthread'
20265 i_rpcsvcdbm='$i_rpcsvcdbm'
20268 i_shadow='$i_shadow'
20270 i_stdarg='$i_stdarg'
20271 i_stddef='$i_stddef'
20272 i_stdlib='$i_stdlib'
20273 i_string='$i_string'
20274 i_sunmath='$i_sunmath'
20275 i_sysaccess='$i_sysaccess'
20276 i_sysdir='$i_sysdir'
20277 i_sysfile='$i_sysfile'
20278 i_sysfilio='$i_sysfilio'
20280 i_sysioctl='$i_sysioctl'
20281 i_syslog='$i_syslog'
20282 i_sysmman='$i_sysmman'
20283 i_sysmode='$i_sysmode'
20284 i_sysmount='$i_sysmount'
20285 i_sysndir='$i_sysndir'
20286 i_sysparam='$i_sysparam'
20287 i_sysresrc='$i_sysresrc'
20288 i_syssecrt='$i_syssecrt'
20289 i_sysselct='$i_sysselct'
20290 i_syssockio='$i_syssockio'
20291 i_sysstat='$i_sysstat'
20292 i_sysstatfs='$i_sysstatfs'
20293 i_sysstatvfs='$i_sysstatvfs'
20294 i_systime='$i_systime'
20295 i_systimek='$i_systimek'
20296 i_systimes='$i_systimes'
20297 i_systypes='$i_systypes'
20298 i_sysuio='$i_sysuio'
20300 i_sysutsname='$i_sysutsname'
20301 i_sysvfs='$i_sysvfs'
20302 i_syswait='$i_syswait'
20303 i_termio='$i_termio'
20304 i_termios='$i_termios'
20306 i_unistd='$i_unistd'
20309 i_values='$i_values'
20310 i_varargs='$i_varargs'
20311 i_varhdr='$i_varhdr'
20313 ignore_versioned_solibs='$ignore_versioned_solibs'
20314 inc_version_list='$inc_version_list'
20315 inc_version_list_init='$inc_version_list_init'
20318 installarchlib='$installarchlib'
20319 installbin='$installbin'
20320 installman1dir='$installman1dir'
20321 installman3dir='$installman3dir'
20322 installprefix='$installprefix'
20323 installprefixexp='$installprefixexp'
20324 installprivlib='$installprivlib'
20325 installscript='$installscript'
20326 installsitearch='$installsitearch'
20327 installsitebin='$installsitebin'
20328 installsitelib='$installsitelib'
20329 installstyle='$installstyle'
20330 installusrbinperl='$installusrbinperl'
20331 installvendorarch='$installvendorarch'
20332 installvendorbin='$installvendorbin'
20333 installvendorlib='$installvendorlib'
20335 issymlink='$issymlink'
20336 ivdformat='$ivdformat'
20339 known_extensions='$known_extensions'
20342 lddlflags='$lddlflags'
20344 ldflags_uselargefiles='$ldflags_uselargefiles'
20345 ldlibpthname='$ldlibpthname'
20352 libsdirs='$libsdirs'
20353 libsfiles='$libsfiles'
20354 libsfound='$libsfound'
20355 libspath='$libspath'
20356 libswanted='$libswanted'
20357 libswanted_uselargefiles='$libswanted_uselargefiles'
20363 localtime_r_proto='$localtime_r_proto'
20364 locincpth='$locincpth'
20365 loclibpth='$loclibpth'
20366 longdblsize='$longdblsize'
20367 longlongsize='$longlongsize'
20368 longsize='$longsize'
20372 lseeksize='$lseeksize'
20373 lseektype='$lseektype'
20377 make_set_make='$make_set_make'
20378 mallocobj='$mallocobj'
20379 mallocsrc='$mallocsrc'
20380 malloctype='$malloctype'
20382 man1direxp='$man1direxp'
20385 man3direxp='$man3direxp'
20387 mips_type='$mips_type'
20389 mmaptype='$mmaptype'
20390 modetype='$modetype'
20392 multiarch='$multiarch'
20394 myarchname='$myarchname'
20395 mydomain='$mydomain'
20396 myhostname='$myhostname'
20399 need_va_copy='$need_va_copy'
20400 netdb_hlen_type='$netdb_hlen_type'
20401 netdb_host_type='$netdb_host_type'
20402 netdb_name_type='$netdb_name_type'
20403 netdb_net_type='$netdb_net_type'
20406 nm_so_opt='$nm_so_opt'
20407 nonxs_ext='$nonxs_ext'
20409 nvEUformat='$nvEUformat'
20410 nvFUformat='$nvFUformat'
20411 nvGUformat='$nvGUformat'
20412 nv_preserves_uv_bits='$nv_preserves_uv_bits'
20413 nveformat='$nveformat'
20414 nvfformat='$nvfformat'
20415 nvgformat='$nvgformat'
20418 o_nonblock='$o_nonblock'
20420 old_pthread_create_joinable='$old_pthread_create_joinable'
20421 optimize='$optimize'
20422 orderlib='$orderlib'
20425 otherlibdirs='$otherlibdirs'
20429 patchlevel='$patchlevel'
20430 path_sep='$path_sep'
20433 perl_patchlevel='$perl_patchlevel'
20434 perladmin='$perladmin'
20435 perllibs='$perllibs'
20436 perlpath='$perlpath'
20438 phostname='$phostname'
20441 pm_apiversion='$pm_apiversion'
20445 prefixexp='$prefixexp'
20447 privlibexp='$privlibexp'
20448 procselfexe='$procselfexe'
20449 prototype='$prototype'
20451 quadkind='$quadkind'
20452 quadtype='$quadtype'
20453 randbits='$randbits'
20454 randfunc='$randfunc'
20455 random_r_proto='$random_r_proto'
20456 randseedtype='$randseedtype'
20458 rd_nodata='$rd_nodata'
20459 readdir64_r_proto='$readdir64_r_proto'
20460 readdir_r_proto='$readdir_r_proto'
20461 revision='$revision'
20466 sPRIEUldbl='$sPRIEUldbl'
20467 sPRIFUldbl='$sPRIFUldbl'
20468 sPRIGUldbl='$sPRIGUldbl'
20469 sPRIXU64='$sPRIXU64'
20471 sPRIeldbl='$sPRIeldbl'
20472 sPRIfldbl='$sPRIfldbl'
20473 sPRIgldbl='$sPRIgldbl'
20478 sSCNfldbl='$sSCNfldbl'
20479 sched_yield='$sched_yield'
20480 scriptdir='$scriptdir'
20481 scriptdirexp='$scriptdirexp'
20483 seedfunc='$seedfunc'
20484 selectminbits='$selectminbits'
20485 selecttype='$selecttype'
20486 sendmail='$sendmail'
20487 setgrent_r_proto='$setgrent_r_proto'
20488 sethostent_r_proto='$sethostent_r_proto'
20489 setlocale_r_proto='$setlocale_r_proto'
20490 setnetent_r_proto='$setnetent_r_proto'
20491 setprotoent_r_proto='$setprotoent_r_proto'
20492 setpwent_r_proto='$setpwent_r_proto'
20493 setservent_r_proto='$setservent_r_proto'
20496 sharpbang='$sharpbang'
20497 shmattype='$shmattype'
20498 shortsize='$shortsize'
20501 sig_count='$sig_count'
20502 sig_name='$sig_name'
20503 sig_name_init='$sig_name_init'
20505 sig_num_init='$sig_num_init'
20506 sig_size='$sig_size'
20507 signal_t='$signal_t'
20508 sitearch='$sitearch'
20509 sitearchexp='$sitearchexp'
20511 sitebinexp='$sitebinexp'
20513 sitelib_stem='$sitelib_stem'
20514 sitelibexp='$sitelibexp'
20515 siteprefix='$siteprefix'
20516 siteprefixexp='$siteprefixexp'
20517 sizesize='$sizesize'
20518 sizetype='$sizetype'
20522 sockethdr='$sockethdr'
20523 socketlib='$socketlib'
20524 socksizetype='$socksizetype'
20526 spackage='$spackage'
20527 spitshell='$spitshell'
20528 srand48_r_proto='$srand48_r_proto'
20529 srandom_r_proto='$srandom_r_proto'
20531 ssizetype='$ssizetype'
20532 startperl='$startperl'
20534 static_ext='$static_ext'
20536 stdio_base='$stdio_base'
20537 stdio_bufsiz='$stdio_bufsiz'
20538 stdio_cnt='$stdio_cnt'
20539 stdio_filbuf='$stdio_filbuf'
20540 stdio_ptr='$stdio_ptr'
20541 stdio_stream_array='$stdio_stream_array'
20542 strerror_r_proto='$strerror_r_proto'
20545 subversion='$subversion'
20549 targetarch='$targetarch'
20553 timeincl='$timeincl'
20554 timetype='$timetype'
20555 tmpnam_r_proto='$tmpnam_r_proto'
20561 ttyname_r_proto='$ttyname_r_proto'
20570 uidformat='$uidformat'
20576 uquadtype='$uquadtype'
20577 use5005threads='$use5005threads'
20578 use64bitall='$use64bitall'
20579 use64bitint='$use64bitint'
20580 usecrosscompile='$usecrosscompile'
20582 useithreads='$useithreads'
20583 uselargefiles='$uselargefiles'
20584 uselongdouble='$uselongdouble'
20585 usemorebits='$usemorebits'
20586 usemultiplicity='$usemultiplicity'
20587 usemymalloc='$usemymalloc'
20589 useopcode='$useopcode'
20590 useperlio='$useperlio'
20591 useposix='$useposix'
20592 usereentrant='$usereentrant'
20594 useshrplib='$useshrplib'
20595 usesocks='$usesocks'
20596 usethreads='$usethreads'
20597 usevendorprefix='$usevendorprefix'
20598 usevfork='$usevfork'
20601 uvXUformat='$uvXUformat'
20602 uvoformat='$uvoformat'
20605 uvuformat='$uvuformat'
20606 uvxformat='$uvxformat'
20607 vendorarch='$vendorarch'
20608 vendorarchexp='$vendorarchexp'
20609 vendorbin='$vendorbin'
20610 vendorbinexp='$vendorbinexp'
20611 vendorlib='$vendorlib'
20612 vendorlib_stem='$vendorlib_stem'
20613 vendorlibexp='$vendorlibexp'
20614 vendorprefix='$vendorprefix'
20615 vendorprefixexp='$vendorprefixexp'
20617 version_patchlevel_string='$version_patchlevel_string'
20618 versiononly='$versiononly'
20620 voidflags='$voidflags'
20622 xs_apiversion='$xs_apiversion'
20624 yaccflags='$yaccflags'
20629 : Add in command line options if available
20630 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
20632 : add special variables
20633 $test -f $src/patchlevel.h && \
20634 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
20635 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
20636 echo "PERL_CONFIG_SH=true" >>config.sh
20638 : propagate old symbols
20639 if $test -f UU/config.sh; then
20640 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
20641 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
20642 $sort | $uniq -u >UU/oldsyms
20643 set X `cat UU/oldsyms`
20649 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
20651 echo "# Variables propagated from previous config.sh file." >>config.sh
20652 for sym in `cat UU/oldsyms`; do
20653 echo " Propagating $hint variable "'$'"$sym..."
20654 eval 'tmp="$'"${sym}"'"'
20656 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
20662 : Finish up by extracting the .SH files
20666 echo "Extraction done."
20676 If you'd like to make any changes to the config.sh file before I begin
20677 to configure things, do it as a shell escape now (e.g. !vi config.sh).
20680 rp="Press return or use a shell escape to edit config.sh:"
20685 *) : in case they cannot read
20686 sh 1>&4 -c "$ans";;
20691 : if this fails, just run all the .SH files by hand
20700 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
20707 Now you need to generate make dependencies by running "$make depend".
20708 You might prefer to run it in background: "$make depend > makedepend.out &"
20709 It can take a while, so you might not want to run it right now.
20714 rp="Run $make depend now?"
20718 $make depend && echo "Now you must run '$make'."
20721 echo "You must run '$make depend' then '$make'."
20724 elif test -f [Mm]akefile; then
20726 echo "Now you must run a $make."
20728 echo "Configure done."
20731 if $test -f Policy.sh; then
20734 If you compile $package on a different machine or from a different object
20735 directory, copy the Policy.sh file from this object directory to the
20736 new one before you run Configure -- this will help you with most of
20737 the policy defaults.
20741 if $test -f config.msg; then
20742 echo "Hmm. I also noted the following information while running:"
20744 $cat config.msg >&4
20747 $rm -f kit*isdone ark*isdone