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 Mon Sep 30 10:11:20 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=''
564 d_old_pthread_create_joinable=''
565 old_pthread_create_joinable=''
604 sethostent_r_proto=''
621 setprotoent_r_proto=''
633 setservent_r_proto=''
677 d_stdio_ptr_lval_nochange_cnt=''
678 d_stdio_ptr_lval_sets_cnt=''
873 inc_version_list_init=''
892 ignore_versioned_solibs=''
951 d_perl_otherlibdirs=''
965 version_patchlevel_string=''
980 nv_preserves_uv_bits=''
1069 d_stdio_stream_array=''
1070 stdio_stream_array=''
1080 ccflags_uselargefiles=''
1081 ldflags_uselargefiles=''
1082 libswanted_uselargefiles=''
1102 installvendorarch=''
1128 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1131 : We must find out about Eunice early
1133 if test -f /etc/unixtovms; then
1134 eunicefix=/etc/unixtovms
1136 if test -f /etc/unixtovms.exe; then
1137 eunicefix=/etc/unixtovms.exe
1140 : Set executable suffix now -- needed before hints available
1141 if test -f "/libs/version.library"; then
1144 elif test -f "/system/gnu_library/bin/ar.pm"; then
1147 elif test -n "$DJGPP"; then
1150 elif test -d c:/. ; then
1159 : set useposix=false in your hint file to disable the POSIX extension.
1161 : set useopcode=false in your hint file to disable the Opcode extension.
1163 : Trailing extension. Override this in a hint file, if needed.
1164 : Extra object files, if any, needed on this platform.
1167 : Possible local include directories to search.
1168 : Set locincpth to "" in a hint file to defeat local include searches.
1169 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1170 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1172 : no include file wanted by default
1177 : change the next line if compiling for Xenix/286 on Xenix/386
1178 xlibpth='/usr/lib/386 /lib/386'
1179 : Possible local library directories to search.
1180 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1181 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1183 : general looking path for locating libraries
1184 glibpth="/lib /usr/lib $xlibpth"
1185 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1186 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1187 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1189 : Private path used by Configure to find libraries. Its value
1190 : is prepended to libpth. This variable takes care of special
1191 : machines, like the mips. Usually, it should be empty.
1194 : default library list
1196 : some systems want to use only the non-versioned libso:s
1197 ignore_versioned_solibs=''
1199 ccflags_uselargefiles=''
1200 ldflags_uselargefiles=''
1201 libswanted_uselargefiles=''
1202 : set usemultiplicity on the Configure command line to enable multiplicity.
1203 : set usesocks on the Configure command line to enable socks.
1204 : set usethreads on the Configure command line to enable threads.
1205 usereentrant='undef'
1206 : full support for void wanted by default
1209 : List of libraries we want.
1210 : If anyone needs -lnet, put it in a hint file.
1211 libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
1212 libswanted="$libswanted dld ld sun m c cposix posix"
1213 libswanted="$libswanted ndir dir crypt sec"
1214 libswanted="$libswanted ucb bsd BSD PW x util"
1215 : We probably want to search /usr/shlib before most other libraries.
1216 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1217 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1218 glibpth="/usr/shlib $glibpth"
1219 : Do not use vfork unless overridden by a hint file.
1222 : Find the basic shell for Bourne shell scripts
1226 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1229 if test -f "$xxx"; then
1232 : Build up a list and do a single loop so we can 'break' out.
1233 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1234 for xxx in sh bash ksh pdksh ash; do
1236 try="$try ${p}/${xxx}"
1240 if test -f "$xxx"; then
1243 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1246 elif test -f "$xxx.exe"; then
1257 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1259 Usually it's in /bin/sh. How did you even get this far?
1260 Please contact me (Perl Maintainers) at perlbug@perl.org and
1261 we'll try to straighten this all out.
1267 : see if sh knows # comments
1268 if `$sh -c '#' >/dev/null 2>&1`; then
1272 test -f $xcat$_exe || xcat=/usr/bin/cat
1273 if test ! -f $xcat$_exe; then
1274 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1275 if test -f $p/cat$_exe; then
1280 if test ! -f $xcat$_exe; then
1281 echo "Can't find cat anywhere!"
1285 echo "#!$xcat" >sharp
1289 if test -s today; then
1292 echo "#! $xcat" > sharp
1296 if test -s today; then
1304 echo "Your $sh doesn't grok # comments--I will strip them later on."
1307 echo "exec grep -v '^[ ]*#'" >spitshell
1309 $eunicefix spitshell
1310 spitshell=`pwd`/spitshell
1312 echo "I presume that if # doesn't work, #! won't work either!"
1317 : figure out how to guarantee sh startup
1319 '') startsh=${sharpbang}${sh} ;;
1331 : echo "Yup, it does."
1333 echo "Hmm... '$startsh' does not guarantee sh startup..."
1334 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1339 : Save command line options in file UU/cmdline.opt for later use in
1340 : generating config.sh.
1341 cat > cmdline.opt <<EOSH
1342 # Configure command line arguments.
1351 cat >>cmdline.opt <<EOSH
1352 config_arg$argn='$arg'
1354 # Extreme backslashitis: replace each ' by '"'"'
1355 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1358 arg_exp=`cat cmdl.opt`
1359 args_exp="$args_exp$args_sep'$arg_exp'"
1360 argn=`expr $argn + 1`
1363 # args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
1364 # used by ./hints/os2.sh
1367 : produce awk script to parse command line options
1368 cat >options.awk <<'EOF'
1370 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1372 len = length(optstr);
1373 for (i = 1; i <= len; i++) {
1374 c = substr(optstr, i, 1);
1375 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1386 if (substr(str, 1, 1) != "-") {
1387 printf("'%s'\n", str);
1391 for (i = 2; i <= len; i++) {
1392 c = substr(str, i, 1);
1394 printf("-%s\n", substr(str, i));
1400 printf("'%s'\n", substr(str, i + 1));
1413 : process the command line options
1414 set X `for arg in "$@"; do echo "X$arg"; done |
1415 sed -e s/X// | awk -f options.awk`
1420 : set up default values
1430 rm -f optdef.sh posthint.sh
1431 cat >optdef.sh <<EOS
1437 while test $# -gt 0; do
1439 -d) shift; fastread=yes;;
1440 -e) shift; alldone=cont;;
1444 if test -r "$1"; then
1447 echo "$me: cannot read config file $1." >&2
1452 -h) shift; error=true;;
1453 -r) shift; reuseval=true;;
1454 -s) shift; silent=true; realsilent=true;;
1455 -E) shift; alldone=exit;;
1456 -K) shift; knowitall=true;;
1457 -O) shift; override=true;;
1458 -S) shift; silent=true; extractsh=true;;
1463 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1464 echo "$me: ignoring -D $1" >&2
1467 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1468 *) echo "$1='define'" >> optdef.sh;;
1475 *=) echo "$1" >> optdef.sh;;
1477 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1478 echo "$me: ignoring -U $1" >&2
1480 *) echo "$1='undef'" >> optdef.sh;;
1491 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
1495 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
1496 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1502 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1503 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1504 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1505 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1506 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1507 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
1513 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1515 echo "$yyy=''" >> posthint.sh ;;
1520 echo "$yyy='$zzz'" >> posthint.sh ;;
1522 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1524 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1529 echo "$yyy=$zzz" >> posthint.sh ;;
1530 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1534 -V) echo "$me generated by metaconfig 3.0 PL70." >&2
1537 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1545 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1546 [-U symbol] [-U symbol=] [-A command:symbol...]
1547 -d : use defaults for all answers.
1548 -e : go on without questioning past the production of config.sh.
1549 -f : specify an alternate default configuration file.
1550 -h : print this help message and exit (with an error status).
1551 -r : reuse C symbols value if possible (skips costly nm extraction).
1552 -s : silent mode, only echoes questions and essential information.
1553 -D : define symbol to have some value:
1554 -D symbol symbol gets the value 'define'
1555 -D symbol=value symbol gets the value 'value'
1556 -E : stop at the end of questions, after having produced config.sh.
1557 -K : do not use unless you know what you are doing.
1558 -O : let -D and -U override definitions from loaded configuration file.
1559 -S : perform variable substitutions on all .SH files (can mix with -f)
1560 -U : undefine symbol:
1561 -U symbol symbol gets the value 'undef'
1562 -U symbol= symbol gets completely empty
1563 -A : manipulate symbol after the platform specific hints have been applied:
1564 -A symbol=value append " "value to symbol
1565 -A append:symbol=value append value to symbol
1566 -A define:symbol=value define symbol to have value
1567 -A clear:symbol define symbol to be ''
1568 -A define:symbol define symbol to be 'define'
1569 -A eval:symbol=value define symbol to be eval of value
1570 -A prepend:symbol=value prepend value to symbol
1571 -A undef:symbol define symbol to be 'undef'
1572 -A undef:symbol= define symbol to be ''
1573 -V : print version number and exit (with a zero status).
1580 case "$fastread$alldone" in
1583 case "$extractsh" in
1586 if test ! -t 0; then
1587 echo "Say 'sh Configure', not 'sh <Configure'"
1597 true) exec 1>/dev/null;;
1600 : run the defines and the undefines, if any, but leave the file out there...
1603 : create the posthint manipulation script and leave the file out there...
1608 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1609 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1610 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1611 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1612 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1615 : Some greps do not return status, grrr.
1616 echo "grimblepritz" >grimble
1617 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1619 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1625 : the following should work in any shell
1629 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1630 cat >contains <<'EOSS'
1631 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1636 : Find the path to the source tree
1639 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1643 *) src=`cd ../$src && pwd` ;;
1656 if test -f $rsrc/Configure && \
1657 $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
1659 : found it, so we are ok.
1662 for src in . .. ../.. ../../.. ../../../..; do
1663 if test -f ../$src/Configure && \
1664 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1675 Sorry, I can't seem to locate the source dir for $package. Please start
1676 Configure with an explicit path -- i.e. /some/path/Configure.
1684 echo "Sources for $package found in \"$src\"." >&4
1688 : script used to extract .SH files with variable substitutions
1689 cat >extract <<'EOS'
1691 echo "Doing variable substitutions on .SH files..."
1692 if test -f MANIFEST; then
1693 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1695 echo "(Looking for .SH files under the source directory.)"
1696 set x `(cd "$src"; find . -name "*.SH" -print)`
1700 0) set x `(cd "$src"; echo *.SH)`; shift;;
1702 if test ! -f "$src/$1"; then
1708 while test $name; do
1709 if test ! -d "$name"; then
1710 create="$name $create";
1711 name=`echo $name | sed -e "s|^[^/]*$||"`;
1712 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1717 for file in $create; do
1726 dir=`expr X$file : 'X\(.*\)/'`
1727 file=`expr X$file : 'X.*/\(.*\)'`
1728 (cd "$dir" && . ./$file)
1738 dir=`expr X$file : 'X\(.*\)/'`
1739 file=`expr X$file : 'X.*/\(.*\)'`
1740 (set x $dir; shift; eval $mkdir_p)
1741 sh <"$src/$dir/$file"
1750 if test -f "$src/config_h.SH"; then
1751 if test ! -f config.h; then
1752 : oops, they left it out of MANIFEST, probably, so do it anyway.
1753 . "$src/config_h.SH"
1758 : extract files and exit if asked to do so
1759 case "$extractsh" in
1761 case "$realsilent" in
1765 case "$config_sh" in
1766 '') config_sh='config.sh';;
1769 echo "Fetching answers from $config_sh..."
1772 test "$override" && . ./optdef.sh
1776 echo "Extraction done."
1781 : Eunice requires " " instead of "", can you believe it
1784 echo "Beginning of configuration questions for $package."
1786 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1788 : first determine how to suppress newline on echo command
1790 echo "Checking echo to see how to suppress newlines..."
1791 (echo "hi there\c" ; echo " ") >.echotmp
1792 if $contains c .echotmp >/dev/null 2>&1 ; then
1803 echo $n "The star should be here-->$c"
1807 : Now test for existence of everything in MANIFEST
1809 if test -f "$rsrc/MANIFEST"; then
1810 echo "First let's make sure your kit is complete. Checking..." >&4
1811 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50)
1814 for filelist in x??; do
1815 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing")
1817 if test -s missing; then
1821 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1823 You have the option of continuing the configuration process, despite the
1824 distinct possibility that your kit is damaged, by typing 'y'es. If you
1825 do, don't blame me if something goes wrong. I advise you to type 'n'o
1826 and contact the author (perlbug@perl.org).
1829 echo $n "Continue? [n] $c" >&4
1833 echo "Continuing..." >&4
1837 echo "ABORTING..." >&4
1842 echo "Looks good..."
1845 echo "There is no MANIFEST file. I hope your kit is complete !"
1850 : Find the appropriate value for a newline for tr
1851 if test -n "$DJGPP"; then
1854 if test X"$trnl" = X; then
1855 case "`echo foo|tr '\n' x 2>/dev/null`" in
1859 if test X"$trnl" = X; then
1860 case "`echo foo|tr '\012' x 2>/dev/null`" in
1861 foox) trnl='\012' ;;
1864 if test X"$trnl" = X; then
1865 case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
1866 fooxy) trnl='\n\r' ;;
1869 if test X"$trnl" = X; then
1872 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1878 : compute the number of columns on the terminal for proper question formatting
1883 : set up the echo used in my read
1884 myecho="case \"\$xxxm\" in
1885 '') echo $n \"\$rp $c\" >&4;;
1887 '') echo $n \"[\$xxxm] $c\";;
1889 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
1891 echo $n \"[\$xxxm] $c\" >&4
1893 echo $n \"\$rp [\$xxxm] $c\" >&4
1899 : now set up to do reads with possible shell escape and default assignment
1905 case "\$fastread" in
1906 yes) case "\$dflt" in
1909 case "\$silent-\$rp" in
1914 *) case "\$silent" in
1915 true) case "\$rp" in
1920 while expr "X\$ans" : "X!" >/dev/null; do
1924 aok=''; eval "ans=\\"\$answ\\"" && aok=y
1932 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
1941 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
1946 echo "(OK, I'll run with -d after this question.)" >&4
1949 echo "*** Sorry, \$1 not supported yet." >&4
1959 echo "*** Substitution done -- please confirm."
1961 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
1966 echo "*** Error -- try again."
1973 case "\$ans\$xxxm\$nostick" in
1985 : create .config dir to save info across Configure sessions
1986 test -d ../.config || mkdir ../.config
1987 cat >../.config/README <<EOF
1988 This directory created by Configure to save information that should
1989 persist across sessions for $package.
1991 You may safely delete it if you wish.
1994 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
1996 $define|true|[yY]*) ;;
1997 *) case "$xversion" in
2000 *** WHOA THERE!!! ***
2002 This is an UNSTABLE DEVELOPMENT release.
2003 The version of this $package distribution is $xversion, that is, odd,
2004 (as opposed to even) and that signifies a development release.
2005 If you want a maintenance release, you want an even-numbered version.
2007 Do ***NOT*** install this into production use.
2008 Data corruption and crashes are possible.
2010 It is most seriously suggested that you do not continue any further
2011 unless you want to help in developing and debugging Perl.
2013 If you *still* want to build perl, you can answer 'y' now,
2014 or pass -Dusedevel to Configure.
2017 rp='Do you really want to continue?'
2021 [yY]) echo >&4 "Okay, continuing."
2022 usedevel="$define" ;;
2023 *) echo >&4 "Okay, bye."
2033 case "$versiononly" in
2034 '') versiononly="$define" ;;
2036 case "$installusrbinperl" in
2037 '') installusrbinperl="$undef" ;;
2042 : general instructions
2045 user=`(logname) 2>/dev/null`
2047 '') user=`whoami 2>&1`;;
2049 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2052 rp='Would you like to see the instructions?'
2063 This installation shell script will examine your system and ask you questions
2064 to determine how the perl5 package should be installed. If you get
2065 stuck on a question, you may use a ! shell escape to start a subshell or
2066 execute a command. Many of the questions will have default answers in square
2067 brackets; typing carriage return will give you the default.
2069 On some of the questions which ask for file or directory names you are allowed
2070 to use the ~name construct to specify the login directory belonging to "name",
2071 even if you don't have a shell which knows about that. Questions where this is
2072 allowed will be marked "(~name ok)".
2076 dflt='Type carriage return to continue'
2080 The prompter used in this script allows you to use shell variables and
2081 backticks in your answers. You may use $1, $2, etc... to refer to the words
2082 in the default answer, as if the default line was a set of arguments given to a
2083 script shell. This means you may also use $* to repeat the whole default line,
2084 so you do not have to re-type everything to add something to the default.
2086 Everytime there is a substitution, you will have to confirm. If there is an
2087 error (e.g. an unmatched backtick), the default answer will remain unchanged
2088 and you will be prompted again.
2090 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2091 the questions and use the computed defaults (or the previous answers if there
2092 was already a config.sh file). Type 'Configure -h' for a list of options.
2093 You may also start interactively and then answer '& -d' at any prompt to turn
2094 on the non-interactive behaviour for the remainder of the execution.
2100 Much effort has been expended to ensure that this shell script will run on any
2101 Unix system. If despite that it blows up on yours, your best bet is to edit
2102 Configure and run it again. If you can't run Configure for some reason,
2103 you'll have to generate a config.sh file by hand. Whatever problems you
2104 have, let me (perlbug@perl.org) know how I blew it.
2106 This installation script affects things in two ways:
2108 1) it may do direct variable substitutions on some of the files included
2110 2) it builds a config.h file for inclusion in C programs. You may edit
2111 any of these files as the need arises after running this script.
2113 If you make a mistake on a question, there is no easy way to back up to it
2114 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2115 files. Configure will offer to let you do this before it runs the SH files.
2118 dflt='Type carriage return to continue'
2120 case "$firsttime" in
2121 true) echo $user >>../.config/instruct;;
2125 : find out where common programs are
2127 echo "Locating common programs..." >&4
2140 if test -d \$dir/\$thing; then
2146 for thisthing in \$dir/\$thing; do
2147 : just loop through to pick last item
2149 if test -f \$thisthing; then
2152 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2155 elif test -f \$dir/\$thing.exe; then
2156 if test -n "$DJGPP"; then
2157 echo \$dir/\$thing.exe
2158 elif test "$eunicefix" != ":"; then
2159 : on Eunice apparently
2213 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2214 pth="$pth /lib /usr/lib"
2215 for file in $loclist; do
2219 if test -f "$xxx"; then
2222 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2223 xxx=`./loc $file $file $pth`
2226 '') xxx=`./loc $file $file $pth`;;
2227 *) xxx=`./loc $xxx $xxx $pth`;;
2229 eval $file=$xxx$_exe
2233 echo $file is in $xxx.
2236 echo $file is in $xxx.
2239 echo "I don't know where '$file' is, and my life depends on it." >&4
2240 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2246 echo "Don't worry if any of the following aren't found..."
2248 for file in $trylist; do
2252 if test -f "$xxx"; then
2255 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2256 xxx=`./loc $file $file $pth`
2259 '') xxx=`./loc $file $file $pth`;;
2260 *) xxx=`./loc $xxx $xxx $pth`;;
2262 eval $file=$xxx$_exe
2266 echo $file is in $xxx.
2269 echo $file is in $xxx.
2272 echo "I don't see $file out there, $say."
2279 echo "Substituting grep for egrep."
2286 echo "Substituting cp for ln."
2295 echo "I can't find make or gmake, and my life depends on it." >&4
2296 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2304 *) # We can't have osname yet.
2305 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2306 # Assume that gmake, if found, is definitely GNU make
2307 # and prefer it over the system make.
2308 echo "Substituting gmake for make."
2316 echo "Hopefully test is built into your sh."
2319 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2320 echo "Using the test built into your sh."
2328 echo "Hopefully echo is built into your sh."
2333 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2334 $echo $n "hi there$c" >foo1
2335 echo $n "hi there$c" >foo2
2336 if cmp foo1 foo2 >/dev/null 2>&1; then
2337 echo "They are compatible. In fact, they may be identical."
2344 They are not compatible! You are probably running ksh on a non-USG system.
2345 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2346 have echo built in and we may have to run some Bourne shell scripts. That
2347 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2350 $echo $n "The star should be here-->$c"
2360 cat <<'EOSC' >>trygcc
2365 int main(int argc, char *argv[]) {
2369 if $cc -o try $ccflags $ldflags try.c; then
2372 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2378 case "`$cc -v -c try.c 2>&1`" in
2381 if $test X"$trygcc" = Xyes; then
2382 if gcc -o try -c try.c; then
2384 echo "You seem to have a working gcc, though." >&4
2385 rp="Would you like to use it?"
2387 if $test -f myread; then
2390 if $test -f UU/myread; then
2393 echo "Cannot find myread, sorry. Aborting." >&2
2398 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2399 if $test -f usethreads.cbu; then
2402 *** However, any setting of the C compiler flags (e.g. for thread support)
2403 *** has been lost. It may be necessary to pass -Dcc=gcc to Configure
2404 *** (together with e.g. -Dusethreads).
2420 cat <<'EOSC' >>checkcc
2425 int main(int argc, char *argv[]) {
2429 if $cc -o try $ccflags $ldflags try.c; then
2432 if $test X"$despair" = Xyes; then
2433 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2436 You need to find a working C compiler.
2437 Either (purchase and) install the C compiler supplied by your OS vendor,
2438 or for a free C compiler try http://gcc.gnu.org/
2439 I cannot continue any further, aborting.
2448 : determine whether symbolic links are supported
2451 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2452 echo "Symbolic links are supported." >&4
2455 echo "Symbolic links are NOT supported." >&4
2460 : determine whether symbolic links are supported
2464 echo "Checking how to test for symbolic links..." >&4
2466 if $test "X$issymlink" = X; then
2468 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2469 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2471 if test $? = 0; then
2474 echo "Your builtin 'test -h' may be broken." >&4
2477 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2480 if test -f "$p/$test"; then
2489 echo "Trying external '$test -h'." >&4
2490 issymlink="$test -h"
2491 if $test ! -h sym >/dev/null 2>&1; then
2492 echo "External '$test -h' is broken, too." >&4
2500 if $test "X$issymlink" = X; then
2501 if $test -L sym 2>/dev/null; then
2502 issymlink="$test -L"
2503 echo "The builtin '$test -L' worked." >&4
2506 if $test "X$issymlink" != X; then
2507 echo "You can test for symbolic links with '$issymlink'." >&4
2509 echo "I do not know how you can test for symbolic links." >&4
2513 *) echo "No symbolic links, so not testing for their testing..." >&4
2519 case "$mksymlinks" in
2522 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2525 *) case "$lns:$issymlink" in
2526 *"ln"*" -s:"*"test -"?)
2527 echo "Creating the symbolic links..." >&4
2528 echo "(First creating the subdirectories...)" >&4
2530 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2532 test -z "$directory" && break
2536 if test ! -d t/base; then
2537 echo "Failed to create the subdirectories. Aborting." >&4
2540 echo "(Then creating the symlinks...)" >&4
2541 awk '{print $1}' $src/MANIFEST | while true; do
2543 test -z "$filename" && break
2544 if test -f $filename; then
2545 if $issymlink $filename; then
2549 if test -f $filename; then
2550 echo "$filename already exists, not symlinking."
2552 ln -s $src/$filename $filename
2556 if test ! -f t/base/lex.t; then
2557 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2562 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2571 case "$usecrosscompile" in
2573 $echo "Cross-compiling..."
2576 *-*-gcc) # A cross-compiling gcc, probably.
2577 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2579 # leave out ld, choosing it is more complex
2581 ranlib=$targetarch-ranlib
2582 $echo 'extern int foo;' > try.c
2583 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2585 if $test $# -gt 0; then
2587 incpth="`$echo $incpth|$sed 's/^ //'`"
2588 echo "Guessing incpth '$incpth'." >&4
2590 j="`$echo $i|$sed 's,/include$,/lib,'`"
2591 if $test -d $j; then
2595 libpth="`$echo $libpth|$sed 's/^ //'`"
2596 echo "Guessing libpth '$libpth'." >&4
2601 case "$targetarch" in
2602 '') echo "Targetarch not defined." >&4; croak=y ;;
2603 *) echo "Using targetarch $targetarch." >&4 ;;
2606 '') echo "Incpth not defined." >&4; croak=y ;;
2607 *) echo "Using incpth '$incpth'." >&4 ;;
2610 '') echo "Libpth not defined." >&4; croak=y ;;
2611 *) echo "Using libpth '$libpth'." >&4 ;;
2614 '') for i in $incpth; do
2615 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2617 echo "Guessing usrinc $usrinc." >&4
2622 '') echo "Usrinc not defined." >&4; croak=y ;;
2625 *) echo "Using usrinc $usrinc." >&4 ;;
2627 case "$targethost" in
2628 '') echo "Targethost not defined." >&4; croak=y ;;
2629 *) echo "Using targethost $targethost." >&4
2634 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2637 /*) run=$src/Cross/run
2638 targetmkdir=$src/Cross/mkdir
2640 from=$src/Cross/from
2642 *) pwd=`$test -f ../Configure & cd ..; pwd`
2644 targetmkdir=$pwd/Cross/mkdir
2646 from=$pwd/Cross/from
2649 case "$targetrun" in
2650 '') targetrun=ssh ;;
2655 case "$targetfrom" in
2656 '') targetfrom=scp ;;
2660 from=$from-$targetfrom
2661 case "$targetdir" in
2663 echo "Guessing targetdir $targetdir." >&4
2666 case "$targetuser" in
2668 echo "Guessing targetuser $targetuser." >&4
2671 case "$targetfrom" in
2675 case "$targetrun" in
2687 '') cwd=$targetdir ;;
2691 if $test ! -f \$exe.xok; then
2695 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2698 *) echo "Unknown targetrun '$targetrun'" >&4
2702 case "$targetmkdir" in
2704 cat >$targetmkdir <<EOF
2706 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2708 $chmod a+rx $targetmkdir
2710 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2722 $targetmkdir \`dirname \$f\`
2723 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2726 $targetmkdir $targetdir/\`dirname \$f\`
2727 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2740 $mkdir -p $targetdir/\`dirname \$f\`
2741 $cp \$f $targetdir/\$f || exit 1
2744 $targetmkdir $targetdir/\`dirname \$f\`
2745 $cp \$f $targetdir/\$f || exit 1
2752 *) echo "Unknown targetto '$targetto'" >&4
2756 case "$targetfrom" in
2763 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2768 cp) cat >$from <<EOF
2773 cp $targetdir/\$f . || exit 1
2778 *) echo "Unknown targetfrom '$targetfrom'" >&4
2782 if $test ! -f $run; then
2783 echo "Target 'run' script '$run' not found." >&4
2787 if $test ! -f $to; then
2788 echo "Target 'to' script '$to' not found." >&4
2792 if $test ! -f $from; then
2793 echo "Target 'from' script '$from' not found." >&4
2797 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2801 Using '$run' for remote execution,
2802 and '$from' and '$to'
2803 for remote file transfer.
2809 usecrosscompile='undef'
2814 : see whether [:lower:] and [:upper:] are supported character classes
2816 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2818 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2822 *) # There is a discontinuity in EBCDIC between 'I' and 'J'
2823 # (0xc9 and 0xd1), therefore that is a nice testing point.
2824 if test "X$up" = X -o "X$low" = X; then
2825 case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
2831 if test "X$up" = X -o "X$low" = X; then
2832 case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
2838 if test "X$up" = X -o "X$low" = X; then
2839 case "`echo IJ | od -x 2>/dev/null`" in
2841 echo "Hey, this might be EBCDIC." >&4
2842 if test "X$up" = X -o "X$low" = X; then
2843 case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2844 ij) up='[A-IJ-RS-Z]'
2849 if test "X$up" = X -o "X$low" = X; then
2850 case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2860 case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
2862 echo "Using $up and $low to convert case." >&4
2865 echo "I don't know how to translate letters from upper to lower case." >&4
2866 echo "Your tr is not acting any way I know of." >&4
2870 : set up the translation script tr, must be called with ./tr of course
2874 '[A-Z][a-z]') exec $tr '$up' '$low';;
2875 '[a-z][A-Z]') exec $tr '$low' '$up';;
2882 : Try to determine whether config.sh was made on this system
2883 case "$config_sh" in
2885 myuname=`$uname -a 2>/dev/null`
2886 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2887 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2888 # because the A-Z/a-z are not consecutive.
2889 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2890 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2891 newmyuname="$myuname"
2893 case "$knowitall" in
2895 if test -f ../config.sh; then
2896 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2897 eval "`grep myuname= ../config.sh`"
2899 if test "X$myuname" = "X$newmyuname"; then
2907 : Get old answers from old config file if Configure was run on the
2908 : same system, otherwise use the hints.
2911 if test -f config.sh; then
2913 rp="I see a config.sh file. Shall I use it to set the defaults?"
2916 n*|N*) echo "OK, I'll ignore it."
2917 mv config.sh config.sh.old
2918 myuname="$newmyuname"
2920 *) echo "Fetching default answers from your old config.sh file..." >&4
2928 : Older versions did not always set $sh. Catch re-use of such
2938 if test ! -f config.sh; then
2941 First time through, eh? I have some defaults handy for some systems
2942 that need some extra help getting the Configure answers right:
2945 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2947 : Half the following guesses are probably wrong... If you have better
2948 : tests or hints, please send them to perlbug@perl.org
2949 : The metaconfig authors would also appreciate a copy...
2950 $test -f /irix && osname=irix
2951 $test -f /xenix && osname=sco_xenix
2952 $test -f /dynix && osname=dynix
2953 $test -f /dnix && osname=dnix
2954 $test -f /lynx.os && osname=lynxos
2955 $test -f /unicos && osname=unicos && osvers=`$uname -r`
2956 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
2957 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
2958 $test -f /bin/mips && /bin/mips && osname=mips
2959 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
2960 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
2961 $test -d /usr/apollo/bin && osname=apollo
2962 $test -f /etc/saf/_sactab && osname=svr4
2963 $test -d /usr/include/minix && osname=minix
2964 $test -f /system/gnu_library/bin/ar.pm && osname=vos
2965 if $test -d /MachTen -o -d /MachTen_Folder; then
2967 if $test -x /sbin/version; then
2968 osvers=`/sbin/version | $awk '{print $2}' |
2969 $sed -e 's/[A-Za-z]$//'`
2970 elif $test -x /usr/etc/version; then
2971 osvers=`/usr/etc/version | $awk '{print $2}' |
2972 $sed -e 's/[A-Za-z]$//'`
2978 $test -f /sys/posix.dll &&
2979 $test -f /usr/bin/what &&
2980 set X `/usr/bin/what /sys/posix.dll` &&
2981 $test "$3" = UWIN &&
2985 if $test -f $uname; then
2993 umips) osname=umips ;;
2996 [23]100) osname=mips ;;
2997 next*) osname=next ;;
2999 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
3000 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
3003 elif $test -f /etc/kconfig; then
3005 if test "$lns" = "$ln -s"; then
3007 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3009 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3016 if test -n "$DJGPP"; then
3025 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3027 'not found') osvers="$4"."$3" ;;
3028 '<3240'|'<>3240') osvers=3.2.0 ;;
3029 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3030 '=3250'|'>3250') osvers=3.2.5 ;;
3034 bsd386) osname=bsd386
3037 cygwin*) osname=cygwin
3040 *dc.osx) osname=dcosx
3046 domainos) osname=apollo
3052 dynixptx*) osname=dynixptx
3053 osvers=`echo "$4"|sed 's/^v//'`
3055 freebsd) osname=freebsd
3057 genix) osname=genix ;;
3059 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3075 netbsd*) osname=netbsd
3078 news-os) osvers="$3"
3080 4*) osname=newsos4 ;;
3084 next*) osname=next ;;
3085 nonstop-ux) osname=nonstopux ;;
3086 openbsd) osname=openbsd
3089 POSIX-BC | posix-bc ) osname=posix-bc
3092 powerux | power_ux | powermax_os | powermaxos | \
3093 powerunix | power_unix) osname=powerux
3099 solaris) osname=solaris
3101 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3108 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3112 titanos) osname=titanos
3121 ultrix) osname=ultrix
3124 osf1|mls+) case "$5" in
3127 osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3130 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3133 hp*) osname=hp_osf1 ;;
3134 mips) osname=mips_osf1 ;;
3137 unixware) osname=svr5
3145 $2) case "$osname" in
3149 : svr4.x or possibly later
3159 if test -f /stand/boot ; then
3160 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3161 if test -n "$INITPROG" -a -f "$INITPROG"; then
3162 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3163 if test -n "$isesix"; then
3171 *) if test -f /etc/systemid; then
3173 set `echo $3 | $sed 's/\./ /g'` $4
3174 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3176 elif $test -f $src/hints/sco_$1_$2.sh; then
3178 elif $test -f $src/hints/sco_$1.sh; then
3183 '') : Still unknown. Probably a generic Sys V.
3192 *) case "$osname" in
3193 '') : Still unknown. Probably a generic BSD.
3201 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3202 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3203 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3206 $rm -f UU/kernel.what
3207 elif test -d c:/.; then
3214 case "$targetarch" in
3217 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3222 : Now look for a hint file osname_osvers, unless one has been
3223 : specified already.
3226 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3227 : Also try without trailing minor version numbers.
3228 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3229 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3230 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3231 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3234 *) case "$osvers" in
3237 *) if $test -f $src/hints/$file.sh ; then
3239 elif $test -f $src/hints/$xfile.sh ; then
3241 elif $test -f $src/hints/$xxfile.sh ; then
3243 elif $test -f $src/hints/$xxxfile.sh ; then
3245 elif $test -f $src/hints/$xxxxfile.sh ; then
3247 elif $test -f "$src/hints/${osname}.sh" ; then
3256 if $test -f Policy.sh ; then
3259 none) dflt="Policy" ;;
3260 *) dflt="Policy $dflt" ;;
3265 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3269 if $test -f Policy.sh ; then
3272 There's also a Policy hint file available, which should make the
3273 site-specific (policy) questions easier to answer.
3280 You may give one or more space-separated answers, or "none" if appropriate.
3281 A well-behaved OS will have no hints, so answering "none" or just "Policy"
3282 is a good thing. DO NOT give a wrong version or a wrong OS.
3286 rp="Which of these apply, if any?"
3289 for file in $tans; do
3290 if $test X$file = XPolicy -a -f Policy.sh; then
3292 $cat Policy.sh >> UU/config.sh
3293 elif $test -f $src/hints/$file.sh; then
3294 . $src/hints/$file.sh
3295 $cat $src/hints/$file.sh >> UU/config.sh
3296 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3299 : Give one chance to correct a possible typo.
3300 echo "$file.sh does not exist"
3302 rp="hint to use instead?"
3304 for file in $ans; do
3305 if $test -f "$src/hints/$file.sh"; then
3306 . $src/hints/$file.sh
3307 $cat $src/hints/$file.sh >> UU/config.sh
3308 elif $test X$ans = X -o X$ans = Xnone ; then
3311 echo "$file.sh does not exist -- ignored."
3318 : Remember our hint file for later.
3319 if $test -f "$src/hints/$file.sh" ; then
3329 echo "Fetching default answers from $config_sh..." >&4
3333 cp $config_sh config.sh 2>/dev/null
3343 test "$override" && . ./optdef.sh
3345 : Restore computed paths
3346 for file in $loclist $trylist; do
3347 eval $file="\$_$file"
3352 Configure uses the operating system name and version to set some defaults.
3353 The default value is probably right if the name rings a bell. Otherwise,
3354 since spelling matters for me, either accept the default or answer "none"
3361 ''|' '|none) dflt=none ;;
3362 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3365 *) dflt="$osname" ;;
3367 rp="Operating system name?"
3371 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3377 ''|' '|none) dflt=none ;;
3378 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3379 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3381 ''|' ') dflt=none ;;
3386 *) dflt="$osvers" ;;
3388 rp="Operating system version?"
3398 : who configured the system
3399 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3400 cf_by=`(logname) 2>/dev/null`
3403 cf_by=`(whoami) 2>/dev/null`
3405 "") cf_by=unknown ;;
3409 : set up the script used to warn in case of inconsistency
3416 echo "*** WHOA THERE!!! ***" >&4
3417 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
3418 rp=" Keep the $hint value?"
3421 y) td=$was; tu=$was;;
3425 : function used to set $1 to $val
3426 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
3428 $define$undef) . ./whoa; eval "$var=\$td";;
3429 $undef$define) . ./whoa; eval "$var=\$tu";;
3430 *) eval "$var=$val";;
3434 $define|true|[yY]*) dflt='y';;
3439 Perl can be built to use the SOCKS proxy protocol library. To do so,
3440 Configure must be run with -Dusesocks. If you use SOCKS you also need
3441 to use the PerlIO abstraction layer, this will be implicitly selected.
3443 If this doesn't make any sense to you, just accept the default '$dflt'.
3445 rp='Build Perl for SOCKS?'
3448 y|Y) val="$define" ;;
3455 $define|true|[yY]*) useperlio="$define";;
3458 case "$useperlio" in
3459 $define|true|[yY]*|'') dflt='y';;
3464 Previous version of $package used the standard IO mechanisms as
3465 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
3466 alternate IO mechanisms via the PerlIO abstraction layer, but the
3467 stdio mechanism is still available if needed. The abstraction layer
3468 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
3469 Using PerlIO with sfio may cause problems with some extension modules.
3471 If this doesn't make any sense to you, just accept the default '$dflt'.
3473 rp='Use the PerlIO abstraction layer?'
3480 echo "Ok, doing things the stdio way."
3489 case "$useperlio" in
3490 $define|true|[yY]*) ;;
3493 You are using the SOCKS proxy protocol library which means that you
3494 should also use the PerlIO layer. You may be headed for trouble.
3503 case "$usethreads" in
3504 $define|true|[yY]*) dflt='y';;
3505 *) # Catch case where user specified ithreads or 5005threads but
3506 # forgot -Dusethreads (A.D. 4/2002)
3507 case "$useithreads$use5005threads" in
3509 case "$useperlio" in
3510 "$define") dflt='y' ;;
3520 Perl can be built to take advantage of threads on some systems.
3521 To do so, Configure can be run with -Dusethreads.
3523 Note that Perl built with threading support runs slightly slower
3524 and uses more memory than plain Perl. The current implementation
3525 is believed to be stable, but it is fairly new, and so should be
3526 treated with caution.
3528 If this doesn't make any sense to you, just accept the default '$dflt'.
3530 rp='Build a threading Perl?'
3533 y|Y) val="$define" ;;
3539 case "$usethreads" in
3543 Since release 5.6, Perl has had two different threading implementations,
3544 the newer interpreter-based version (ithreads) with one interpreter per
3545 thread, and the older 5.005 version (5005threads).
3546 The 5005threads version is effectively unmaintained and will probably be
3547 removed in Perl 5.10, so there should be no need to build a Perl using it
3548 unless needed for backwards compatibility with some existing 5.005threads
3552 : Default to ithreads unless overridden on command line or with
3555 case "$use5005threads" in
3556 $define|true|[yY]*) dflt='n';;
3558 case "$useithreads" in
3559 $undef|false|[nN]*) dflt='n';;
3561 rp='Use the newer interpreter-based ithreads?'
3564 y|Y) val="$define" ;;
3569 : Now set use5005threads to the opposite value.
3570 case "$useithreads" in
3571 $define) val="$undef" ;;
3578 useithreads="$undef"
3579 use5005threads="$undef"
3583 case "$useithreads$use5005threads" in
3587 You cannot have both the ithreads and the 5.005 threads enabled
3588 at the same time. Disabling the 5.005 threads since they are
3589 much less stable than the ithreads.
3592 use5005threads="$undef"
3596 if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then
3599 *** To build with ithreads you must also use the PerlIO layer.
3600 *** Cannot continue, aborting.
3606 case "$d_oldpthreads" in
3607 '') : Configure tests would be welcome here. For now, assume undef.
3609 *) val="$d_oldpthreads" ;;
3615 case "$usethreads" in
3616 "$define"|true|[yY]*)
3617 : Look for a hint-file generated 'call-back-unit'. If the
3618 : user has specified that a threading perl is to be built,
3619 : we may need to set or change some other defaults.
3620 if $test -f usethreads.cbu; then
3621 echo "Your platform has some specific hints for threaded builds, using them..."
3625 (Your platform doesn't have any specific hints for threaded builds.
3626 Assuming POSIX threads, then.)
3634 Perl can be built so that multiple Perl interpreters can coexist
3635 within the same Perl executable.
3638 case "$useithreads" in
3641 This multiple interpreter support is required for interpreter-based threads.
3645 *) case "$usemultiplicity" in
3646 $define|true|[yY]*) dflt='y';;
3650 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
3651 rp='Build Perl for multiplicity?'
3654 y|Y) val="$define" ;;
3663 case "$usemorebits" in
3664 "$define"|true|[yY]*)
3665 use64bitint="$define"
3666 uselongdouble="$define"
3667 usemorebits="$define"
3669 *) usemorebits="$undef"
3673 : make some quick guesses about what we are up against
3675 $echo $n "Hmm... $c"
3685 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
3686 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
3688 echo "Looks kind of like an OSF/1 system, but we'll see..."
3690 elif test `echo abc | $tr a-z A-Z` = Abc ; then
3691 xxx=`./loc addbib blurfl $pth`
3692 if $test -f $xxx; then
3693 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3697 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3698 echo "Looks kind of like an extended USG system, but we'll see..."
3700 echo "Looks kind of like a USG system, but we'll see..."
3704 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3705 echo "Looks kind of like a BSD system, but we'll see..."
3709 echo "Looks kind of like a Version 7 system, but we'll see..."
3712 case "$eunicefix" in
3715 There is, however, a strange, musty smell in the air that reminds me of
3716 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3720 : it so happens the Eunice I know will not run shell scripts in Unix format
3724 echo "Congratulations. You aren't running Eunice."
3728 : Detect OS2. The p_ variable is set above in the Head.U unit.
3729 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
3730 : semicolon as a patch separator
3735 I have the feeling something is not exactly right, however...don't tell me...
3736 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3737 (Or you may be running DOS with DJGPP.)
3742 if test -f /xenix; then
3743 echo "Actually, this looks more like a XENIX system..."
3748 echo "It's not Xenix..."
3753 if test -f /venix; then
3754 echo "Actually, this looks more like a VENIX system..."
3761 echo "Nor is it Venix..."
3764 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3765 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3772 rp="Use which C compiler?"
3776 : See if they have not cc but they do have gcc
3778 : Look for a hint-file generated 'call-back-unit'. Now that the
3779 : user has specified the compiler, we may need to set or change some
3781 if $test -f cc.cbu; then
3787 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3793 printf("%s\n", __VERSION__);
3795 printf("%s\n", "1");
3801 if $cc -o try $ccflags $ldflags try.c; then
3802 gccversion=`$run ./try`
3803 case "$gccversion" in
3804 '') echo "You are not using GNU cc." ;;
3805 *) echo "You are using GNU cc $gccversion."
3811 echo "*** WHOA THERE!!! ***" >&4
3812 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3813 case "$knowitall" in
3815 echo " You'd better start hunting for one and let me know about it." >&4
3821 case "$gccversion" in
3822 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3824 case "$gccversion" in
3825 '') gccosandvers='' ;;
3826 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3827 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3829 case "$gccosandvers" in
3830 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3831 $osname$osvers) ;; # looking good
3832 $osname*) cat <<EOM >&4
3834 *** WHOA THERE!!! ***
3836 Your gcc has not been compiled for the exact release of
3837 your operating system ($gccosandvers versus $osname$osvers).
3839 In general it is a good idea to keep gcc synchronized with
3840 the operating system because otherwise serious problems
3841 may ensue when trying to compile software, like Perl.
3843 I'm trying to be optimistic here, though, and will continue.
3844 If later during the configuration and build icky compilation
3845 problems appear (headerfile conflicts being the most common
3846 manifestation), I suggest reinstalling the gcc to match
3847 your operating system release.
3851 *) gccosandvers='' ;; # failed to parse, better be silent
3859 # gcc 3.* complain about adding -Idirectories that they already know about,
3860 # so we will take those off from locincpth.
3861 case "$gccversion" in
3863 echo "main(){}">try.c
3864 for incdir in $locincpth; do
3865 warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
3866 grep '^cc1: warning: changing search order '`
3867 if test "X$warn" != X; then
3868 locincpth=`echo " $locincpth " | sed "s! $incdir ! !"`
3874 : decide how portable to be. Allow command line overrides.
3875 case "$d_portable" in
3877 *) d_portable="$define" ;;
3880 : set up shell script to do ~ expansion
3886 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3889 if $test -f /bin/csh; then
3890 /bin/csh -f -c "glob \$1"
3895 name=\`$expr x\$1 : '..\([^/]*\)'\`
3896 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3897 if $test ! -d "\$dir"; then
3899 echo "\$me: can't locate home directory for: \$name" >&2
3904 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3920 : now set up to get a file name
3924 cat <<'EOSC' >>getfile
3940 : getfile will accept an answer from the comma-separated list
3941 : enclosed in parentheses even if it does not meet other criteria.
3942 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3943 fn=`echo $fn | sed 's/(.*)//'`
3949 loc_file=`expr $fn : '.*:\(.*\)'`
3950 fn=`expr $fn : '\(.*\):.*'`
3958 */*) fullpath=true;;
3967 *e*) exp_file=true;;
3970 *p*) nopath_ok=true;;
3975 *d*) type='Directory';;
3976 *l*) type='Locate';;
3981 Locate) what='File';;
3986 case "$d_portable" in
3994 while test "$type"; do
3999 true) rp="$rp (~name ok)";;
4002 if test -f UU/getfile.ok && \
4003 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
4022 value=`UU/filexp $ans`
4025 if test "$ans" != "$value"; then
4026 echo "(That expands to $value on this system.)"
4040 /*) value="$ansexp" ;;
4041 [a-zA-Z]:/*) value="$ansexp" ;;
4046 echo "I shall only accept a full path name, as in /bin/ls." >&4
4047 echo "Use a ! shell escape if you wish to check pathnames." >&4
4050 echo "Please give a full path name, starting with slash." >&4
4053 echo "Note that using ~name is ok provided it expands well." >&4
4066 for fp in $gfpth; do
4067 if test "X$fp" = X.; then
4072 if test -f "$pf"; then
4074 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
4076 echo "($value is not a plain file, but that's ok.)"
4079 if test X"$type" = X; then
4086 for fp in $gfpth; do
4087 if test "X$fp" = X.; then
4092 direxp="$fp/$ansexp"
4094 if test -d "$direxp"; then
4102 if test -d "$ansexp"; then
4103 echo "(Looking for $loc_file in directory $value.)"
4104 value="$value/$loc_file"
4105 ansexp="$ansexp/$loc_file"
4107 if test -f "$ansexp"; then
4110 case "$nopath_ok" in
4111 true) case "$value" in
4113 *) echo "Assuming $value will be in people's path."
4129 if test "$fastread" = yes; then
4134 rp="$what $value doesn't exist. Use that name anyway?"
4153 test "X$gfpthkeep" != Xy && gfpth=""
4156 : What should the include directory be ?
4158 $echo $n "Hmm... $c"
4162 if $test -f /bin/mips && /bin/mips; then
4163 echo "Looks like a MIPS system..."
4164 $cat >usr.c <<'EOCP'
4165 #ifdef SYSTYPE_BSD43
4169 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4170 dflt='/bsd43/usr/include'
4174 mips_type='System V'
4176 $rm -f usr.c usr.out
4177 echo "and you're compiling with the $mips_type compiler and libraries."
4181 echo "Doesn't look like a MIPS system."
4191 case "$xxx_prompt" in
4194 rp='Where are the include files you want to use?'
4202 : see how we invoke the C preprocessor
4204 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4205 cat <<'EOT' >testcpp.c
4211 if test ! -f cppstdin; then
4212 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4213 # AIX cc -E doesn't show the absolute headerfile
4214 # locations but we'll cheat by using the -M flag.
4215 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
4217 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4220 echo "Keeping your $hint cppstdin wrapper."
4223 wrapper=`pwd`/cppstdin
4227 if $test "X$cppstdin" != "X" && \
4228 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4229 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4231 echo "You used to use $cppstdin $cppminus so we'll use that again."
4233 '') echo "But let's see if we can live without a wrapper..." ;;
4235 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4236 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4238 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4241 echo "(However, $cpprun $cpplast does not work, let's see...)"
4249 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4256 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4257 $cc -E <testcpp.c >testcpp.out 2>&1; \
4258 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4259 echo "Yup, it does."
4262 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4263 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4264 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4265 echo "Yup, it does."
4268 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4269 $cc -P <testcpp.c >testcpp.out 2>&1; \
4270 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4271 echo "Yipee, that works!"
4274 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4275 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4276 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4277 echo "At long last!"
4280 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4281 $cpp <testcpp.c >testcpp.out 2>&1; \
4282 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4286 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4287 $cpp - <testcpp.c >testcpp.out 2>&1; \
4288 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4289 echo "Hooray, it works! I was beginning to wonder."
4292 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4293 $wrapper <testcpp.c >testcpp.out 2>&1; \
4294 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4300 rp="No dice. I can't find a C preprocessor. Name one:"
4304 $x_cpp <testcpp.c >testcpp.out 2>&1
4305 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4306 echo "OK, that will do." >&4
4308 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4323 echo "Perhaps can we force $cc -E using a wrapper..."
4324 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4325 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4331 echo "Nope, we'll have to live without it..."
4345 "$wrapper"|'cppstdin') ;;
4346 *) $rm -f $wrapper;;
4348 $rm -f testcpp.c testcpp.out
4350 : Set private lib path
4353 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4358 '') dlist="$loclibpth $plibpth $glibpth";;
4359 *) dlist="$libpth";;
4362 : Now check and see which directories actually exist, avoiding duplicates
4366 if $test -d $xxx; then
4369 *) libpth="$libpth $xxx";;
4375 Some systems have incompatible or broken versions of libraries. Among
4376 the directories listed in the question below, please remove any you
4377 know not to be holding relevant libraries, and add any that are needed.
4378 Say "none" for none.
4389 rp="Directories to use for library searches?"
4396 : compute shared library extension
4399 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4409 On some systems, shared libraries may be available. Answer 'none' if
4410 you want to suppress searching of shared libraries for the remainder
4411 of this configuration.
4414 rp='What is the file extension used for shared libraries?'
4418 : Define several unixisms.
4419 : Hints files or command line option can be used to override them.
4420 : The convoluted testing is in case hints files set either the old
4423 '') case "$exe_ext" in
4425 *) _exe="$exe_ext" ;;
4430 '') case "$lib_ext" in
4437 '') case "$obj_ext" in
4444 '') case "$path_sep" in
4455 : Which makefile gets called first. This is used by make depend.
4456 case "$firstmakefile" in
4457 '') firstmakefile='makefile';;
4460 : Looking for optional libraries
4462 echo "Checking for optional libraries..." >&4
4467 case "$libswanted" in
4468 '') libswanted='c_s';;
4471 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4477 for thisdir in $libpth $xlibpth; do
4478 test -d $thisdir && libspath="$libspath $thisdir"
4480 for thislib in $libswanted; do
4481 for thisdir in $libspath; do
4483 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4484 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4485 $test -f "$xxx" && eval $libscheck
4486 $test -f "$xxx" && libstyle=shared
4488 if test ! -f "$xxx"; then
4489 xxx=$thisdir/lib$thislib.$so
4490 $test -f "$xxx" && eval $libscheck
4491 $test -f "$xxx" && libstyle=shared
4493 if test ! -f "$xxx"; then
4494 xxx=$thisdir/lib$thislib$_a
4495 $test -f "$xxx" && eval $libscheck
4496 $test -f "$xxx" && libstyle=static
4498 if test ! -f "$xxx"; then
4499 xxx=$thisdir/$thislib$_a
4500 $test -f "$xxx" && eval $libscheck
4501 $test -f "$xxx" && libstyle=static
4503 if test ! -f "$xxx"; then
4504 xxx=$thisdir/lib${thislib}_s$_a
4505 $test -f "$xxx" && eval $libscheck
4506 $test -f "$xxx" && libstyle=static
4507 $test -f "$xxx" && thislib=${thislib}_s
4509 if test ! -f "$xxx"; then
4510 xxx=$thisdir/Slib$thislib$_a
4511 $test -f "$xxx" && eval $libscheck
4512 $test -f "$xxx" && libstyle=static
4514 if $test -f "$xxx"; then
4516 shared) echo "Found -l$thislib (shared)." ;;
4517 static) echo "Found -l$thislib." ;;
4518 *) echo "Found -l$thislib ($libstyle)." ;;
4522 *) dflt="$dflt -l$thislib"
4523 libsfound="$libsfound $xxx"
4525 libsfiles="$libsfiles $yyy"
4526 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4527 case " $libsdirs " in
4529 *) libsdirs="$libsdirs $yyy" ;;
4536 if $test ! -f "$xxx"; then
4537 echo "No -l$thislib."
4548 ' '|'') dflt='none';;
4553 In order to compile $package on your machine, a number of libraries
4554 are usually needed. Include any other special libraries here as well.
4555 Say "none" for none. The default list is almost always right.
4559 rp="What libraries to use?"
4566 : determine optimization, if desired, or use for debug flag also
4568 ' '|$undef) dflt='none';;
4570 *) dflt="$optimize";;
4574 By default, $package compiles with the -O flag to use the optimizer.
4575 Alternately, you might want to use the symbolic debugger, which uses
4576 the -g flag (on traditional Unix systems). Either flag can be
4577 specified here. To use neither flag, specify the word "none".
4580 rp="What optimizer/debugger flag should be used?"
4584 'none') optimize=" ";;
4588 : We will not override a previous value, but we might want to
4589 : augment a hint file
4591 default|recommended)
4592 case "$gccversion" in
4593 1*) dflt='-fpcc-struct-return' ;;
4596 *-g*) dflt="$dflt -DDEBUGGING";;
4598 case "$gccversion" in
4599 2*) if test -d /etc/conf/kconfig.d &&
4600 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
4606 case "$gccversion" in
4610 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
4611 echo 'int main(void) { return 0; }' > gcctest.c
4612 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
4613 echo "Yes, it does." 2>&1
4616 echo "Leaving current flags $ccflags alone." 2>&1
4618 *) dflt="$dflt -fno-strict-aliasing" ;;
4621 echo "Nope, it doesn't, but that's ok." 2>&1
4628 case "$mips_type" in
4629 *BSD*|'') inclwanted="$locincpth $usrinc";;
4630 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
4632 for thisincl in $inclwanted; do
4633 if $test -d $thisincl; then
4634 if $test x$thisincl != x$usrinc; then
4636 *" -I$thisincl "*);;
4637 *) dflt="$dflt -I$thisincl ";;
4643 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
4645 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
4653 *) dflt="$dflt -D$2";;
4657 set signal.h LANGUAGE_C; eval $inctest
4661 ccflags="$ccflags -DSOCKS"
4666 default|recommended) dflt="$ccflags $dflt" ;;
4667 *) dflt="$ccflags";;
4676 Your C compiler may want other flags. For this question you should include
4677 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
4678 but you should NOT include libraries or ld flags like -lwhatever. If you
4679 want $package to honor its debug switch, you should include -DDEBUGGING here.
4680 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
4682 To use no flags, specify the word "none".
4688 rp="Any additional cc flags?"
4695 : the following weeds options from ccflags that are of no interest to cpp
4697 '') cppflags="$ccflags" ;;
4698 *) cppflags="$cppflags $ccflags" ;;
4700 case "$gccversion" in
4701 1*) cppflags="$cppflags -D__GNUC__"
4703 case "$mips_type" in
4705 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4711 echo "Let me guess what the preprocessor flags are..." >&4
4725 *) ftry="$previous $flag";;
4727 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4728 >cpp1.out 2>/dev/null && \
4729 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4730 >cpp2.out 2>/dev/null && \
4731 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4732 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4734 cppflags="$cppflags $ftry"
4744 *-*) echo "They appear to be: $cppflags";;
4746 $rm -f cpp.c cpp?.out
4750 : flags used in final linking phase
4752 '') if ./venix; then
4758 *-posix*) dflt="$dflt -posix" ;;
4761 *) dflt="$ldflags";;
4764 : Try to guess additional flags to pick up local libraries.
4765 for thislibdir in $libpth; do
4766 case " $loclibpth " in
4769 *"-L$thislibdir "*) ;;
4770 *) dflt="$dflt -L$thislibdir" ;;
4782 Your C linker may need flags. For this question you should
4783 include -L/whatever and any other flags used by the C linker, but you
4784 should NOT include libraries like -lwhatever.
4786 Make sure you include the appropriate -L/path flags if your C linker
4787 does not normally search all of the directories you specified above,
4790 To use no flags, specify the word "none".
4794 rp="Any additional ld flags (NOT including libraries)?"
4800 rmlist="$rmlist pdp11"
4804 echo "Checking your choice of C compiler and flags for coherency..." >&4
4805 $cat > try.c <<'EOF'
4807 int main() { printf("Ok\n"); exit(0); }
4809 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
4811 $cat >try.msg <<'EOM'
4812 I've tried to compile and run the following simple program:
4815 $cat try.c >> try.msg
4817 $cat >> try.msg <<EOM
4824 and I got the following output:
4828 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
4829 if $sh -c "$run ./try" >>try.msg 2>&1; then
4833 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4836 cat >> try.msg <<'EOQS'
4837 If $libs contains -lsfio, and sfio is mis-configured, then it
4838 sometimes (apparently) runs and exits with a 0 status, but with no
4839 output! It may have to do with sfio's use of _exit vs. exit.
4842 rp="You have a big problem. Shall I abort Configure"
4849 echo "The program compiled OK, but exited with status $?." >>try.msg
4850 rp="You have a problem. Shall I abort Configure"
4854 echo "I can't compile the test program." >>try.msg
4855 rp="You have a BIG problem. Shall I abort Configure"
4861 case "$knowitall" in
4863 echo "(The supplied flags or libraries might be incorrect.)"
4871 *) echo "Ok. Stopping Configure." >&4
4876 n) echo "OK, that should do.";;
4878 $rm -f try try.* core
4880 : define a shorthand compile call
4884 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
4885 : define a shorthand compile call for compilations that should be ok.
4889 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
4891 : check for lengths of integral types
4895 echo "Checking to see how big your integers are..." >&4
4896 $cat >try.c <<'EOCP'
4900 printf("intsize=%d;\n", (int)sizeof(int));
4901 printf("longsize=%d;\n", (int)sizeof(long));
4902 printf("shortsize=%d;\n", (int)sizeof(short));
4907 if eval $compile_ok && $run ./try > /dev/null; then
4909 echo "Your integers are $intsize bytes long."
4910 echo "Your long integers are $longsize bytes long."
4911 echo "Your short integers are $shortsize bytes long."
4915 Help! I can't compile and run the intsize test program: please enlighten me!
4916 (This is probably a misconfiguration in your system or libraries, and
4917 you really ought to fix it. Still, I'll try anyway.)
4921 rp="What is the size of an integer (in bytes)?"
4925 rp="What is the size of a long integer (in bytes)?"
4929 rp="What is the size of a short integer (in bytes)?"
4937 : check for long long
4939 echo "Checking to see if you have long long..." >&4
4940 echo 'int main() { long long x = 7; return 0; }' > try.c
4942 if eval $compile; then
4944 echo "You have long long."
4947 echo "You do not have long long."
4953 : check for length of long long
4954 case "${d_longlong}${longlongsize}" in
4957 echo "Checking to see how big your long longs are..." >&4
4958 $cat >try.c <<'EOCP'
4962 printf("%d\n", (int)sizeof(long long));
4967 if eval $compile_ok; then
4968 longlongsize=`$run ./try`
4969 echo "Your long longs are $longlongsize bytes long."
4973 echo "(I can't seem to compile the test program. Guessing...)"
4974 rp="What is the size of a long long (in bytes)?"
4978 if $test "X$longsize" = "X$longlongsize"; then
4979 echo "(That isn't any different from an ordinary long.)"
4985 : determine filename position in cpp output
4987 echo "Computing filename position in cpp output for #include directives..." >&4
4989 vos) testaccess=-e ;;
4992 echo '#include <stdio.h>' > foo.c
4995 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
4996 $grep '^[ ]*#.*stdio\.h' | \
4997 while read cline; do
5000 while $test \$# -gt 0; do
5001 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5006 pos=\`expr \$pos + 1\`
5018 *) pos="${fieldn}th";;
5020 echo "Your cpp writes the filename in the $pos field of the line."
5023 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
5026 : locate header file
5031 for usrincdir in $usrinc
5033 if test -f \$usrincdir/\$wanted; then
5034 echo "\$usrincdir/\$wanted"
5038 awkprg='{ print \$$fieldn }'
5039 echo "#include <\$wanted>" > foo\$\$.c
5040 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5041 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5042 while read cline; do
5043 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5045 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5046 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5051 # status = 0: grep returned 0 lines, case statement not executed
5052 # status = 1: headerfile found
5053 # status = 2: while loop executed, no headerfile found
5057 if test \$status -eq 1; then
5064 : define an alternate in-header-list? function
5065 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5066 cont=true; xxf="echo \"<\$1> found.\" >&4";
5067 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5068 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5070 case $# in 4) instead=instead;; *) instead="at last";; esac;
5071 while $test "$cont"; do
5073 var=$2; eval "was=\$$2";
5074 if $test "$xxx" && $test -r "$xxx";
5076 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5079 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5080 set $yyy; shift; shift; yyy=$@;
5081 case $# in 0) cont="";;
5082 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5083 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5084 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5085 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5089 do set $yyy; var=$2; eval "was=\$$2";
5090 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5091 set $yyy; shift; shift; yyy=$@;
5094 : see if inttypes.h is available
5095 : we want a real compile instead of Inhdr because some systems
5096 : have an inttypes.h which includes non-existent headers
5099 #include <inttypes.h>
5101 static int32_t foo32 = 0x12345678;
5105 if eval $compile; then
5106 echo "<inttypes.h> found." >&4
5109 echo "<inttypes.h> NOT found." >&4
5118 echo "Checking to see if you have int64_t..." >&4
5120 #include <sys/types.h>
5121 #$i_inttypes I_INTTYPES
5123 #include <inttypes.h>
5125 int main() { int64_t x = 7; }
5128 if eval $compile; then
5130 echo "You have int64_t."
5133 echo "You do not have int64_t."
5141 echo "Checking which 64-bit integer type we could use..." >&4
5147 val='"unsigned int"'
5152 *) case "$longsize" in
5156 val='"unsigned long"'
5161 *) case "$d_longlong:$longlongsize" in
5166 val='"unsigned long long"'
5171 *) case "$d_int64_t" in
5190 '') echo "Alas, no 64-bit integer types in sight." >&4
5193 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5199 case "$uselonglong" in
5200 "$define"|true|[yY]*)
5203 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5205 use64bitint="$define"
5208 case "$use64bits" in
5209 "$define"|true|[yY]*)
5212 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5214 use64bitint="$define"
5217 case "$use64bitints" in
5218 "$define"|true|[yY]*)
5221 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5223 use64bitint="$define"
5226 case "$use64bitsint" in
5227 "$define"|true|[yY]*)
5230 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5232 use64bitint="$define"
5235 case "$uselonglongs" in
5236 "$define"|true|[yY]*)
5239 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5241 use64bitint="$define"
5244 case "$use64bitsall" in
5245 "$define"|true|[yY]*)
5248 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5250 use64bitall="$define"
5255 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5257 case "$use64bitall" in
5258 "$define"|true|[yY]*) use64bitint="$define" ;;
5264 You have natively 64-bit long integers.
5268 *) case "$use64bitint" in
5269 "$define"|true|[yY]*) dflt='y';;
5278 Perl can be built to take advantage of 64-bit integer types
5279 on some systems. To do so, Configure can be run with -Duse64bitint.
5280 Choosing this option will most probably introduce binary incompatibilities.
5282 If this doesn't make any sense to you, just accept the default '$dflt'.
5283 (The default has been chosen based on your configuration.)
5285 rp='Try to use 64-bit integers, if available?'
5288 [yY]*) val="$define" ;;
5296 case "$use64bitall" in
5297 "$define"|true|[yY]*) dflt='y' ;;
5298 *) case "$longsize" in
5306 You may also choose to try maximal 64-bitness. It means using as much
5307 64-bitness as possible on the platform. This in turn means even more
5308 binary incompatibilities. On the other hand, your platform may not
5309 have any more 64-bitness available than what you already have chosen.
5311 If this doesn't make any sense to you, just accept the default '$dflt'.
5312 (The default has been chosen based on your configuration.)
5314 rp='Try to use maximal 64-bit support, if available?'
5317 [yY]*) val="$define" ;;
5322 case "$use64bitall" in
5324 case "$use64bitint" in
5328 Since you have chosen a maximally 64-bit build, I'm also turning on
5329 the use of 64-bit integers.
5331 use64bitint="$define" ;;
5336 case "$use64bitint" in
5337 "$define"|true|[yY]*)
5338 : Look for a hint-file generated 'call-back-unit'. If the
5339 : user has specified that a 64-bit perl is to be built,
5340 : we may need to set or change some other defaults.
5341 if $test -f use64bitint.cbu; then
5342 echo "Your platform has some specific hints for 64-bit integers, using them..."
5346 4) case "$archname64" in
5347 '') archname64=64int ;;
5354 case "$use64bitall" in
5355 "$define"|true|[yY]*)
5356 : Look for a hint-file generated 'call-back-unit'. If the
5357 : user has specified that a maximally 64-bit perl is to be built,
5358 : we may need to set or change some other defaults.
5359 if $test -f use64bitall.cbu; then
5360 echo "Your platform has some specific hints for 64-bit builds, using them..."
5364 4) case "$archname64" in
5365 ''|64int) archname64=64all ;;
5373 echo "Checking for GNU C Library..." >&4
5375 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
5376 alone are insufficient to distinguish different versions, such as
5377 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
5378 libc version 2.1.0. A. Dougherty, June 3, 2002.
5384 # ifdef __GLIBC_MINOR__
5385 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
5386 # include <gnu/libc-version.h>
5387 printf("%s\n", gnu_get_libc_version());
5389 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
5392 printf("%d\n", __GLIBC__);
5401 if eval $compile_ok && $run ./try > glibc.ver; then
5403 gnulibc_version=`$cat glibc.ver`
5404 echo "You are using the GNU C Library version $gnulibc_version"
5408 echo "You are not using the GNU C Library"
5410 $rm -f try try.* glibc.ver
5414 : see if nm is to be used to determine whether a symbol is defined or not
5418 case "$d_gnulibc" in
5421 echo "nm probably won't work on the GNU C Library." >&4
5427 if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
5429 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
5430 echo "'nm' won't be sufficient on this sytem." >&4
5436 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
5437 if $test $dflt -gt 20; then
5447 true|$define) dflt=y;;
5454 I can use $nm to extract the symbols from your C libraries. This
5455 is a time consuming task which may generate huge output on the disk (up
5456 to 3 megabytes) but that should make the symbols extraction faster. The
5457 alternative is to skip the 'nm' extraction part and to compile a small
5458 test program instead to determine whether each symbol is present. If
5459 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
5460 this may be the best solution.
5462 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
5465 rp="Shall I use $nm to extract C symbols from the libraries?"
5468 [Nn]*) usenm=false;;
5477 : nm options which may be necessary
5479 '') if $test -f /mach_boot; then
5481 elif $test -d /usr/ccs/lib; then
5482 nm_opt='-p' # Solaris (and SunOS?)
5483 elif $test -f /dgux; then
5485 elif $test -f /lib64/rld; then
5486 nm_opt='-p' # 64-bit Irix
5492 : nm options which may be necessary for shared libraries but illegal
5493 : for archive libraries. Thank you, Linux.
5494 case "$nm_so_opt" in
5495 '') case "$myuname" in
5497 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
5498 nm_so_opt='--dynamic'
5507 : get list of predefined functions in a handy place
5512 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
5518 *) for thislib in $libs; do
5521 : Handle C library specially below.
5524 thislib=`echo $thislib | $sed -e 's/^-l//'`
5525 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
5527 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
5529 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
5531 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
5533 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
5535 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
5537 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
5542 libnames="$libnames $try"
5544 *) libnames="$libnames $thislib" ;;
5553 for xxx in $libpth; do
5554 $test -r $1 || set $xxx/libc.$so
5555 : The messy sed command sorts on library version numbers.
5557 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
5558 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
5560 s/[0-9][0-9]*/0000&/g
5561 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
5564 $sort | $sed -e 's/^.* //'`
5567 $test -r $1 || set /usr/ccs/lib/libc.$so
5568 $test -r $1 || set /lib/libsys_s$_a
5574 if $test -r "$1"; then
5575 echo "Your (shared) C library seems to be in $1."
5577 elif $test -r /lib/libc && $test -r /lib/clib; then
5578 echo "Your C library seems to be in both /lib/clib and /lib/libc."
5580 libc='/lib/clib /lib/libc'
5581 if $test -r /lib/syslib; then
5582 echo "(Your math library is in /lib/syslib.)"
5583 libc="$libc /lib/syslib"
5585 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5586 echo "Your C library seems to be in $libc, as you said before."
5587 elif $test -r $incpath/usr/lib/libc$_a; then
5588 libc=$incpath/usr/lib/libc$_a;
5589 echo "Your C library seems to be in $libc. That's fine."
5590 elif $test -r /lib/libc$_a; then
5592 echo "Your C library seems to be in $libc. You're normal."
5594 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
5596 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
5597 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
5598 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
5600 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5602 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5605 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
5607 if $test -r "$tans"; then
5608 echo "Your C library seems to be in $tans, of all places."
5614 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5618 If the guess above is wrong (which it might be if you're using a strange
5619 compiler, or your machine supports multiple models), you can override it here.
5624 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
5626 I can't seem to find your C library. I've looked in the following places:
5629 $sed 's/^/ /' libpath
5632 None of these seems to contain your C library. I need to get its name...
5637 rp='Where is your C library?'
5642 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
5643 set X `cat libnames`
5646 case $# in 1) xxx=file; esac
5647 echo "Extracting names from the following $xxx for later perusal:" >&4
5649 $sed 's/^/ /' libnames >&4
5651 $echo $n "This may take a while...$c" >&4
5655 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
5656 *) $nm $nm_opt $file 2>/dev/null;;
5661 $grep fprintf libc.tmp > libc.ptf
5662 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
5663 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
5665 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
5667 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5669 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
5671 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5673 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
5675 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5677 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
5679 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5681 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
5683 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5685 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
5687 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5689 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
5690 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
5692 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5694 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
5696 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5698 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
5700 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5702 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
5704 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5706 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
5708 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5710 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
5712 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5714 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
5716 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5718 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
5720 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5723 $nm -p $* 2>/dev/null >libc.tmp
5724 $grep fprintf libc.tmp > libc.ptf
5725 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
5726 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
5732 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
5734 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
5735 for thisname in $libnames $libc; do
5736 $ar t $thisname >>libc.tmp
5738 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
5740 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
5741 # Repeat libc to extract forwarders to DLL entries too
5742 for thisname in $libnames $libc; do
5743 $ar tv $thisname >>libc.tmp
5744 # Revision 50 of EMX has bug in $ar.
5745 # it will not extract forwarders to DLL entries
5746 # Use emximp which will extract exactly them.
5747 emximp -o tmp.imp $thisname \
5749 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
5750 < tmp.imp >>libc.tmp
5753 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
5756 echo "$ar didn't seem to work right." >&4
5757 echo "Maybe this is a Cray...trying bld instead..." >&4
5758 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
5760 for thisname in $libnames; do
5762 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
5763 $ar t $thisname >>libc.tmp
5767 echo "That didn't work either. Giving up." >&4
5777 echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4
5778 dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list
5780 *) if $test -f /lib/syscalls.exp; then
5782 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
5783 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list
5789 $rm -f libnames libpath
5791 : is a C symbol defined?
5794 -v) tf=libc.tmp; tc=""; tdc="";;
5795 -a) tf=libc.tmp; tc="[0]"; tdc="[]";;
5796 *) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
5799 case "$reuseval-$4" in
5801 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
5807 if $contains $tlook $tf >/dev/null 2>&1;
5812 echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
5813 if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1;
5821 $define) tval=true;;
5827 : define an is-in-libc? function
5828 inlibc='echo " "; td=$define; tu=$undef;
5829 sym=$1; var=$2; eval "was=\$$2";
5831 case "$reuseval$was" in
5841 echo "$sym() found." >&4;
5842 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
5844 echo "$sym() NOT found." >&4;
5845 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
5849 $define) echo "$sym() found." >&4;;
5850 *) echo "$sym() NOT found." >&4;;
5854 : see if sqrtl exists
5858 hasproto='varname=$1; func=$2; shift; shift;
5859 while $test $# -ge 2; do
5861 $define) echo "#include <$2>";;
5865 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
5866 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
5867 echo "$func() prototype found.";
5870 echo "$func() prototype NOT found.";
5875 $rm -f try.c tryout.c'
5877 : check for length of double
5879 case "$doublesize" in
5881 echo "Checking to see how big your double precision numbers are..." >&4
5882 $cat >try.c <<'EOCP'
5886 printf("%d\n", (int)sizeof(double));
5891 if eval $compile_ok; then
5892 doublesize=`$run ./try`
5893 echo "Your double is $doublesize bytes long."
5896 echo "(I can't seem to compile the test program. Guessing...)"
5897 rp="What is the size of a double precision number (in bytes)?"
5905 : check for long doubles
5907 echo "Checking to see if you have long double..." >&4
5908 echo 'int main() { long double x = 7.0; }' > try.c
5910 if eval $compile; then
5912 echo "You have long double."
5915 echo "You do not have long double."
5921 : check for length of long double
5922 case "${d_longdbl}${longdblsize}" in
5925 echo "Checking to see how big your long doubles are..." >&4
5926 $cat >try.c <<'EOCP'
5930 printf("%d\n", sizeof(long double));
5935 if eval $compile; then
5936 longdblsize=`$run ./try`
5937 echo "Your long doubles are $longdblsize bytes long."
5941 echo "(I can't seem to compile the test program. Guessing...)" >&4
5942 rp="What is the size of a long double (in bytes)?"
5946 if $test "X$doublesize" = "X$longdblsize"; then
5947 echo "(That isn't any different from an ordinary double.)"
5955 if $test X"$d_longdbl" = X"$define"; then
5957 echo "Checking how to print long doubles..." >&4
5959 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
5960 $cat >try.c <<'EOCP'
5961 #include <sys/types.h>
5965 printf("%.3f\n", d);
5969 if eval $compile; then
5973 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
5974 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
5975 echo "We will use %f."
5981 if $test X"$sPRIfldbl" = X; then
5982 $cat >try.c <<'EOCP'
5983 #include <sys/types.h>
5986 long double d = 123.456;
5987 printf("%.3Lf\n", d);
5991 if eval $compile; then
5995 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
5996 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
5997 echo "We will use %Lf."
6003 if $test X"$sPRIfldbl" = X; then
6004 $cat >try.c <<'EOCP'
6005 #include <sys/types.h>
6008 long double d = 123.456;
6009 printf("%.3llf\n", d);
6013 if eval $compile; then
6017 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
6018 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
6019 echo "We will use %llf."
6025 if $test X"$sPRIfldbl" = X; then
6026 $cat >try.c <<'EOCP'
6027 #include <sys/types.h>
6030 long double d = 123.456;
6031 printf("%.3lf\n", d);
6035 if eval $compile; then
6039 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
6040 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
6041 echo "We will use %lf."
6047 if $test X"$sPRIfldbl" = X; then
6048 echo "Cannot figure out how to print long doubles." >&4
6050 sSCNfldbl=$sPRIfldbl # expect consistency
6057 case "$sPRIfldbl" in
6058 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
6059 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
6060 d_SCNfldbl="$undef";
6062 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
6063 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
6064 d_SCNfldbl="$define";
6068 : see if modfl exists
6072 : see if prototype for modfl is available
6074 set d_modflproto modfl math.h
6077 d_modfl_pow32_bug="$undef"
6079 case "$d_longdbl$d_modfl" in
6082 Checking to see whether your modfl() is okay for large values...
6088 if $test "X$d_modflproto" != "X$define"; then
6090 /* Sigh. many current glibcs provide the function, but do not prototype it. */
6091 long double modfl (long double, long double *);
6096 long double nv = 4294967303.15;
6102 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
6106 case "$osname:$gccversion" in
6107 aix:) saveccflags="$ccflags"
6108 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
6111 if eval $compile; then
6114 *" 4294967303.150000 1.150000 4294967302.000000")
6115 echo >&4 "Your modfl() is broken for large values."
6116 d_modfl_pow32_bug="$define"
6118 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
6122 *" 4294967303.150000 0.150000 4294967303.000000")
6123 echo >&4 "Your modfl() seems okay for large values."
6125 *) echo >&4 "I don't understand your modfl() at all."
6129 $rm -f try.* try core core.try.*
6131 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
6134 case "$osname:$gccversion" in
6135 aix:) ccflags="$saveccflags" ;; # restore
6141 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
6144 case "$uselongdouble" in
6145 $define|true|[yY]*) dflt='y';;
6150 Perl can be built to take advantage of long doubles which
6151 (if available) may give more accuracy and range for floating point numbers.
6153 If this doesn't make any sense to you, just accept the default '$dflt'.
6155 rp='Try to use long doubles if available?'
6158 y|Y) val="$define" ;;
6164 case "$uselongdouble" in
6165 true|[yY]*) uselongdouble="$define" ;;
6168 case "$uselongdouble" in
6170 : Look for a hint-file generated 'call-back-unit'. If the
6171 : user has specified that long doubles should be used,
6172 : we may need to set or change some other defaults.
6173 if $test -f uselongdouble.cbu; then
6174 echo "Your platform has some specific hints for long doubles, using them..."
6175 . ./uselongdouble.cbu
6178 (Your platform doesn't have any specific hints for long doubles.)
6185 case "$uselongdouble:$d_sqrtl:$d_modfl" in
6186 $define:$define:$define)
6189 $define:$define:$undef)
6190 message="I could not find modfl"
6192 $define:$undef:$define)
6193 message="I could not find sqrtl"
6195 $define:$undef:$undef)
6196 message="I found neither sqrtl nor modfl"
6200 if $test "$message" != X; then
6203 *** You requested the use of long doubles but you do not seem to have
6204 *** the mathematic functions for long doubles.
6206 *** I'm disabling the use of long doubles.
6210 uselongdouble=$undef
6213 : determine the architecture name
6215 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
6216 tarch=`arch`"-$osname"
6217 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
6218 if uname -m > tmparch 2>&1 ; then
6219 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
6220 -e 's/$/'"-$osname/" tmparch`
6228 case "$myarchname" in
6231 echo "(Your architecture name used to be $myarchname.)"
6235 case "$targetarch" in
6237 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
6242 *) dflt="$archname";;
6244 rp='What is your architecture name'
6247 case "$usethreads" in
6249 echo "Threads selected." >&4
6251 *-thread*) echo "...and architecture name already has -thread." >&4
6253 *) archname="$archname-thread"
6254 echo "...setting architecture name to $archname." >&4
6259 case "$usemultiplicity" in
6261 echo "Multiplicity selected." >&4
6263 *-multi*) echo "...and architecture name already has -multi." >&4
6265 *) archname="$archname-multi"
6266 echo "...setting architecture name to $archname." >&4
6271 case "$use64bitint$use64bitall" in
6273 case "$archname64" in
6275 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
6278 case "$use64bitint" in
6279 "$define") echo "64 bit integers selected." >&4 ;;
6281 case "$use64bitall" in
6282 "$define") echo "Maximal 64 bitness selected." >&4 ;;
6285 *-$archname64*) echo "...and architecture name already has $archname64." >&4
6287 *) archname="$archname-$archname64"
6288 echo "...setting architecture name to $archname." >&4
6294 case "$uselongdouble" in
6296 echo "Long doubles selected." >&4
6297 case "$longdblsize" in
6299 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
6303 *-ld*) echo "...and architecture name already has -ld." >&4
6305 *) archname="$archname-ld"
6306 echo "...setting architecture name to $archname." >&4
6313 case "$useperlio" in
6315 echo "Perlio selected." >&4
6318 echo "Perlio not selected, using stdio." >&4
6320 *-stdio*) echo "...and architecture name already has -stdio." >&4
6322 *) archname="$archname-stdio"
6323 echo "...setting architecture name to $archname." >&4
6329 : determine root of directory hierarchy where package will be installed.
6332 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
6335 dflt=`echo "$prefix" | sed 's/.$//'`
6343 By default, $package will be installed in $dflt/bin, manual pages
6344 under $dflt/man, etc..., i.e. with $dflt as prefix for all
6345 installation directories. Typically this is something like /usr/local.
6346 If you wish to have binaries under /usr/bin but other parts of the
6347 installation under /usr/local, that's ok: you will be prompted
6348 separately for each of the installation directories, the prefix being
6349 only used to set the defaults.
6353 rp='Installation prefix to use?'
6361 *) oldprefix="$prefix";;
6370 *) afsroot=$afsroot ;;
6376 $define|true) afs=true ;;
6377 $undef|false) afs=false ;;
6378 *) if test -d $afsroot; then
6386 echo "AFS may be running... I'll be extra cautious then..." >&4
6388 echo "AFS does not seem to be running..." >&4
6391 : determine installation prefix for where package is to be installed.
6395 Since you are running AFS, I need to distinguish the directory in which
6396 files will reside from the directory in which they are installed (and from
6397 which they are presumably copied to the former directory by occult means).
6400 case "$installprefix" in
6401 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
6402 *) dflt="$installprefix";;
6407 In some special cases, particularly when building $package for distribution,
6408 it is convenient to distinguish between the directory in which files should
6409 be installed from the directory ($prefix) in which they
6410 will eventually reside. For most users, these two directories are the same.
6413 case "$installprefix" in
6415 *) dflt=$installprefix;;
6419 rp='What installation prefix should I use for installing files?'
6421 installprefix="$ans"
6422 installprefixexp="$ansexp"
6424 : set the prefixit variable, to compute a suitable default value
6425 prefixit='case "$3" in
6427 case "$oldprefix" in
6428 "") eval "$1=\"\$$2\"";;
6435 ""|" ") eval "$1=\"\$$2\"";;
6441 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
6443 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
6444 /*-$oldprefix/*|\~*-$oldprefix/*)
6445 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
6446 *) eval "$1=\"\$$2\"";;
6450 : get the patchlevel
6452 echo "Getting the current patchlevel..." >&4
6453 if $test -r $rsrc/patchlevel.h;then
6454 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
6455 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
6456 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6457 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
6458 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
6459 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6460 perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
6469 $echo "(You do not have patchlevel.h. Eek.)"
6471 if $test -r $rsrc/.patch ; then
6472 if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
6473 perl_patchlevel=`cat $rsrc/.patch`
6476 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
6477 version_patchlevel_string="version $patchlevel subversion $subversion"
6478 case "$perl_patchlevel" in
6480 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
6483 $echo "(You have $package $version_patchlevel_string.)"
6487 : XXX Should be a Configure test for double-dots in filenames.
6488 version=`echo $revision $patchlevel $subversion | \
6489 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6490 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6491 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6494 version=`echo $revision $patchlevel $subversion | \
6495 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6496 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6497 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6500 : Special case the 5.005_xx maintenance series, which used 5.005
6501 : without any subversion label as a subdirectory in $sitelib
6502 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
6503 api_versionstring='5.005'
6506 : determine installation style
6507 : For now, try to deduce it from prefix unless it is already set.
6508 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
6509 case "$installstyle" in
6510 '') case "$prefix" in
6511 *perl*) dflt='lib';;
6512 *) dflt='lib/perl5' ;;
6515 *) dflt="$installstyle" ;;
6517 : Probably not worth prompting for this since we prompt for all
6518 : the directories individually, and the prompt would be too long and
6522 : determine where private library files go
6523 : Usual default is /usr/local/lib/perl5/$version.
6524 : Also allow things like /opt/perl/lib/$version, since
6525 : /opt/perl/lib/perl5... would be redundant.
6526 : The default "style" setting is made in installstyle.U
6527 case "$installstyle" in
6528 *lib/perl5*) set dflt privlib lib/$package/$version ;;
6529 *) set dflt privlib lib/$version ;;
6534 There are some auxiliary files for $package that need to be put into a
6535 private library directory that is accessible by everyone.
6539 rp='Pathname where the private library files will reside?'
6542 privlibexp="$ansexp"
6543 : Change installation prefix, if necessary.
6544 if $test X"$prefix" != X"$installprefix"; then
6545 installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
6547 installprivlib="$privlibexp"
6550 : set the prefixup variable, to restore leading tilda escape
6551 prefixup='case "$prefixexp" in
6553 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
6556 : determine where public architecture dependent libraries go
6559 : privlib default is /usr/local/lib/$package/$version
6560 : archlib default is /usr/local/lib/$package/$version/$archname
6561 : privlib may have an optional trailing /share.
6562 tdflt=`echo $privlib | $sed 's,/share$,,'`
6563 tdflt=$tdflt/$archname
6572 $spackage contains architecture-dependent library files. If you are
6573 sharing libraries in a heterogeneous environment, you might store
6574 these files in a separate location. Otherwise, you can just include
6575 them with the rest of the public library files.
6579 rp='Where do you want to put the public architecture-dependent libraries?'
6582 archlibexp="$ansexp"
6583 if $test X"$archlib" = X"$privlib"; then
6588 : Change installation prefix, if necessary.
6589 if $test X"$prefix" != X"$installprefix"; then
6590 installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
6592 installarchlib="$archlibexp"
6595 : see if setuid scripts can be secure
6598 Some kernels have a bug that prevents setuid #! scripts from being
6599 secure. Some sites have disabled setuid #! scripts because of this.
6601 First let's decide if your kernel supports secure setuid #! scripts.
6602 (If setuid #! scripts would be secure but have been disabled anyway,
6603 don't say that they are secure if asked.)
6608 if $test -d /dev/fd; then
6609 echo "#!$ls" >reflect
6610 chmod +x,u+s reflect
6611 ./reflect >flect 2>&1
6612 if $contains "/dev/fd" flect >/dev/null; then
6613 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6617 If you are not sure if they are secure, I can check but I'll need a
6618 username and password different from the one you are using right now.
6619 If you don't have such a username or don't want me to test, simply
6623 rp='Other username to test security of setuid scripts with?'
6628 case "$d_suidsafe" in
6629 '') echo "I'll assume setuid scripts are *not* secure." >&4
6632 echo "Well, the $hint value is *not* secure." >&4
6634 *) echo "Well, the $hint value *is* secure." >&4
6639 $rm -f reflect flect
6640 echo "#!$ls" >reflect
6641 chmod +x,u+s reflect
6644 echo '"su" will (probably) prompt you for '"$ans's password."
6645 su $ans -c './reflect >flect'
6646 if $contains "/dev/fd" flect >/dev/null; then
6647 echo "Okay, it looks like setuid scripts are secure." >&4
6650 echo "I don't think setuid scripts are secure." >&4
6655 rp='Does your kernel have *secure* setuid scripts?'
6658 [yY]*) val="$define";;
6663 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6664 echo "(That's for file descriptors, not floppy disks.)"
6670 $rm -f reflect flect
6672 : now see if they want to do setuid emulation
6675 case "$d_suidsafe" in
6678 echo "No need to emulate SUID scripts since they are secure here." >&4
6682 Some systems have disabled setuid scripts, especially systems where
6683 setuid scripts cannot be secure. On systems where setuid scripts have
6684 been disabled, the setuid/setgid bits on scripts are currently
6685 useless. It is possible for $package to detect those bits and emulate
6686 setuid/setgid in a secure fashion. This emulation will only work if
6687 setuid scripts have been disabled in your kernel.
6691 "$define") dflt=y ;;
6694 rp="Do you want to do setuid/setgid emulation?"
6697 [yY]*) val="$define";;
6705 : see if this is a malloc.h system
6706 set malloc.h i_malloc
6709 : see if stdlib is available
6710 set stdlib.h i_stdlib
6713 : check for void type
6715 echo "Checking to see how well your C compiler groks the void type..." >&4
6716 case "$voidflags" in
6718 $cat >try.c <<'EOCP'
6724 extern void moo(); /* function returning void */
6725 void (*goo)(); /* ptr to func returning void */
6727 void *hue; /* generic ptr */
6740 int main() { sub(); }
6742 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
6743 voidflags=$defvoidused
6744 echo "Good. It appears to support void to the level $package wants.">&4
6745 if $contains warning .out >/dev/null 2>&1; then
6746 echo "However, you might get some warnings that look like this:"
6750 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
6751 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
6752 echo "It supports 1..."
6753 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
6754 echo "It also supports 2..."
6755 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
6757 echo "And it supports 4 but not 8 definitely."
6759 echo "It doesn't support 4..."
6760 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
6762 echo "But it supports 8."
6765 echo "Neither does it support 8."
6769 echo "It does not support 2..."
6770 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
6772 echo "But it supports 4 and 8."
6774 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
6776 echo "And it supports 4 but has not heard about 8."
6778 echo "However it supports 8 but not 4."
6783 echo "There is no support at all for void."
6788 case "$voidflags" in
6791 Support flag bits are:
6792 1: basic void declarations.
6793 2: arrays of pointers to functions returning void.
6794 4: operations between pointers to and addresses of void functions.
6795 8: generic void pointers.
6798 rp="Your void support flags add up to what?"
6805 : check for length of pointer
6809 echo "Checking to see how big your pointers are..." >&4
6810 if test "$voidflags" -gt 7; then
6811 echo '#define VOID_PTR char *' > try.c
6813 echo '#define VOID_PTR void *' > try.c
6815 $cat >>try.c <<'EOCP'
6819 printf("%d\n", (int)sizeof(VOID_PTR));
6824 if eval $compile_ok; then
6825 ptrsize=`$run ./try`
6826 echo "Your pointers are $ptrsize bytes long."
6829 echo "(I can't seem to compile the test program. Guessing...)" >&4
6830 rp="What is the size of a pointer (in bytes)?"
6837 case "$use64bitall" in
6838 "$define"|true|[yY]*)
6842 *** You have chosen a maximally 64-bit build, but your pointers
6843 *** are only 4 bytes wide, disabling maximal 64-bitness.
6846 use64bitall="$undef"
6847 case "$use64bitint" in
6848 "$define"|true|[yY]*) ;;
6851 *** Downgrading from maximal 64-bitness to using 64-bit integers.
6854 use64bitint="$define"
6863 : determine which malloc to compile in
6865 case "$usemymalloc" in
6866 [yY]*|true|$define) dflt='y' ;;
6867 [nN]*|false|$undef) dflt='n' ;;
6868 *) case "$ptrsize" in
6874 rp="Do you wish to attempt to use the malloc that comes with $package?"
6880 mallocsrc='malloc.c'
6881 mallocobj="malloc$_o"
6882 d_mymalloc="$define"
6885 : Remove malloc from list of libraries to use
6886 echo "Removing unneeded -lmalloc from library list" >&4
6887 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6890 echo "libs = $libs" >&4
6902 : compute the return types of malloc and free
6904 $cat >malloc.c <<END
6908 #include <sys/types.h>
6922 case "$malloctype" in
6924 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6931 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6935 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6942 echo "Your system uses $freetype free(), it would seem." >&4
6946 After $package is installed, you may wish to install various
6947 add-on modules and utilities. Typically, these add-ons will
6948 be installed under $prefix with the rest
6949 of this package. However, you may wish to install such add-ons
6950 elsewhere under a different prefix.
6952 If you do not wish to put everything under a single prefix, that's
6953 ok. You will be prompted for the individual locations; this siteprefix
6954 is only used to suggest the defaults.
6956 The default should be fine for most people.
6960 rp='Installation prefix to use for add-on modules and utilities?'
6961 : XXX Here might be another good place for an installstyle setting.
6962 case "$siteprefix" in
6964 *) dflt=$siteprefix ;;
6967 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6969 case "$siteprefix" in
6973 *) oldsiteprefix="$prefix";;
6978 siteprefixexp="$ansexp"
6980 : determine where site specific libraries go.
6981 : Usual default is /usr/local/lib/perl5/site_perl/$version
6982 : The default "style" setting is made in installstyle.U
6983 : XXX No longer works with Prefixit stuff.
6984 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6986 '') case "$installstyle" in
6987 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6988 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6996 The installation process will create a directory for
6997 site-specific extensions and modules. Most users find it convenient
6998 to place all site-specific files in this directory rather than in the
6999 main distribution directory.
7003 rp='Pathname for the site-specific library files?'
7006 sitelibexp="$ansexp"
7007 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
7008 : Change installation prefix, if necessary.
7009 if $test X"$prefix" != X"$installprefix"; then
7010 installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
7012 installsitelib="$sitelibexp"
7015 : determine where site specific architecture-dependent libraries go.
7016 : sitelib default is /usr/local/lib/perl5/site_perl/$version
7017 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
7018 : sitelib may have an optional trailing /share.
7020 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
7021 dflt="$dflt/$archname"
7026 set sitearch sitearch none
7030 The installation process will also create a directory for
7031 architecture-dependent site-specific extensions and modules.
7035 rp='Pathname for the site-specific architecture-dependent library files?'
7038 sitearchexp="$ansexp"
7039 : Change installation prefix, if necessary.
7040 if $test X"$prefix" != X"$installprefix"; then
7041 installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
7043 installsitearch="$sitearchexp"
7048 The installation process will also create a directory for
7049 vendor-supplied add-ons. Vendors who supply perl with their system
7050 may find it convenient to place all vendor-supplied files in this
7051 directory rather than in the main distribution directory. This will
7052 ease upgrades between binary-compatible maintenance versions of perl.
7054 Of course you may also use these directories in whatever way you see
7055 fit. For example, you might use them to access modules shared over a
7056 company-wide network.
7058 The default answer should be fine for most people.
7059 This causes further questions about vendor add-ons to be skipped
7060 and no vendor-specific directories will be configured for perl.
7063 rp='Do you want to configure vendor-specific add-on directories?'
7064 case "$usevendorprefix" in
7065 define|true|[yY]*) dflt=y ;;
7066 *) : User may have set vendorprefix directly on Configure command line.
7067 case "$vendorprefix" in
7076 rp='Installation prefix to use for vendor-supplied add-ons?'
7077 case "$vendorprefix" in
7079 *) dflt=$vendorprefix ;;
7082 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7084 case "$vendorprefix" in
7088 *) oldvendorprefix="$prefix";;
7092 usevendorprefix="$define"
7094 vendorprefixexp="$ansexp"
7096 *) usevendorprefix="$undef"
7102 case "$vendorprefix" in
7103 '') d_vendorlib="$undef"
7107 *) d_vendorlib="$define"
7108 : determine where vendor-supplied modules go.
7109 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
7110 case "$vendorlib" in
7112 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7113 case "$installstyle" in
7114 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
7115 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
7118 *) dflt="$vendorlib"
7122 rp='Pathname for the vendor-supplied library files?'
7125 vendorlibexp="$ansexp"
7128 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
7129 : Change installation prefix, if necessary.
7130 if $test X"$prefix" != X"$installprefix"; then
7131 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
7133 installvendorlib="$vendorlibexp"
7136 case "$vendorprefix" in
7137 '') d_vendorarch="$undef"
7141 *) d_vendorarch="$define"
7142 : determine where vendor-supplied architecture-dependent libraries go.
7143 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
7144 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
7145 : vendorlib may have an optional trailing /share.
7146 case "$vendorarch" in
7147 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
7148 dflt="$dflt/$archname"
7150 *) dflt="$vendorarch" ;;
7153 rp='Pathname for vendor-supplied architecture-dependent files?'
7156 vendorarchexp="$ansexp"
7159 : Change installation prefix, if necessary.
7160 if $test X"$prefix" != X"$installprefix"; then
7161 installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
7163 installvendorarch="$vendorarchexp"
7166 : Final catch-all directories to search
7169 Lastly, you can have perl look in other directories for extensions and
7170 modules in addition to those already specified.
7171 These directories will be searched after
7175 test X"$vendorlib" != "X" && echo ' ' $vendorlib
7176 test X"$vendorarch" != "X" && echo ' ' $vendorarch
7178 case "$otherlibdirs" in
7179 ''|' ') dflt='none' ;;
7180 *) dflt="$otherlibdirs" ;;
7183 Enter a colon-separated set of extra paths to include in perl's @INC
7184 search path, or enter 'none' for no extra paths.
7188 rp='Colon-separated list of additional directories for perl to search?'
7191 ' '|''|none) otherlibdirs=' ' ;;
7192 *) otherlibdirs="$ans" ;;
7194 case "$otherlibdirs" in
7198 set d_perl_otherlibdirs
7201 : Cruising for prototypes
7203 echo "Checking out function prototypes..." >&4
7204 $cat >prototype.c <<'EOCP'
7205 int main(int argc, char *argv[]) {
7208 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
7209 echo "Your C compiler appears to support function prototypes."
7212 echo "Your C compiler doesn't seem to understand function prototypes."
7219 case "$prototype" in
7221 *) ansi2knr='ansi2knr'
7226 This version of $package can only be compiled by a compiler that
7227 understands function prototypes. Unfortunately, your C compiler
7229 doesn't seem to understand them. Sorry about that.
7231 If GNU cc is available for your system, perhaps you could try that instead.
7233 Eventually, we hope to support building Perl with pre-ANSI compilers.
7234 If you would like to help in that effort, please contact <perlbug@perl.org>.
7236 Aborting Configure now.
7242 : determine where public executables go
7247 rp='Pathname where the public executables will reside?'
7249 if $test "X$ansexp" != "X$binexp"; then
7254 : Change installation prefix, if necessary.
7255 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
7256 if $test X"$prefix" != X"$installprefix"; then
7257 installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
7259 installbin="$binexp"
7268 Perl can be built with extra modules or bundles of modules which
7269 will be fetched from the CPAN and installed alongside Perl.
7271 Notice that you will need access to the CPAN; either via the Internet,
7272 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
7273 be asked later to configure the CPAN.pm module which will in turn do
7274 the installation of the rest of the extra modules or bundles.)
7276 Notice also that if the modules require any external software such as
7277 libraries and headers (the libz library and the zlib.h header for the
7278 Compress::Zlib module, for example) you MUST have any such software
7279 already installed, this configuration process will NOT install such
7282 If this doesn't make any sense to you, just accept the default '$dflt'.
7284 rp='Install any extra modules (y or n)?'
7290 Please list any extra modules or bundles to be installed from CPAN,
7291 with spaces between the names. The names can be in any format the
7292 'install' command of CPAN.pm will understand. (Answer 'none',
7293 without the quotes, to install no extra modules or bundles.)
7303 $rm -f ../extras.lst
7305 *) echo "(Saving the list of extras for later...)"
7306 echo "$extras" > ../extras.lst
7314 : Find perl5.005 or later.
7315 echo "Looking for a previously installed perl5.005 or later... "
7317 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
7318 : Check if this perl is recent and can load a simple module
7319 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7322 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7332 '') echo "None found. That's ok.";;
7333 *) echo "Using $perl5." ;;
7336 : Determine list of previous versions to include in @INC
7337 $cat > getverlist <<EOPL
7340 \$api_versionstring = "$api_versionstring";
7341 \$version = "$version";
7342 \$stem = "$sitelib_stem";
7343 \$archname = "$archname";
7345 $cat >> getverlist <<'EOPL'
7346 # Can't have leading @ because metaconfig interprets it as a command!
7347 ;@inc_version_list=();
7348 # XXX Redo to do opendir/readdir?
7351 ;@candidates = glob("5.*");
7357 # XXX ToDo: These comparisons must be reworked when two-digit
7358 # subversions come along, so that 5.7.10 compares as greater than
7359 # 5.7.3! By that time, hope that 5.6.x is sufficiently
7360 # widespread that we can use the built-in version vectors rather
7361 # than reinventing them here. For 5.6.0, however, we must
7362 # assume this script will likely be run by 5.005_0x. --AD 1/2000.
7363 foreach $d (@candidates) {
7364 if ($d lt $version) {
7365 if ($d ge $api_versionstring) {
7366 unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
7368 elsif ($d ge "5.005") {
7369 unshift(@inc_version_list, grep { -d } $d);
7373 # Skip newer version. I.e. don't look in
7374 # 5.7.0 if we're installing 5.6.1.
7378 if (@inc_version_list) {
7379 print join(' ', @inc_version_list);
7382 # Blank space to preserve value for next Configure run.
7387 case "$inc_version_list" in
7388 '') if test -x "$perl5$exe_ext"; then
7389 dflt=`$perl5 getverlist`
7394 $undef) dflt='none' ;;
7395 *) eval dflt=\"$inc_version_list\" ;;
7398 ''|' ') dflt=none ;;
7405 In order to ease the process of upgrading, this version of perl
7406 can be configured to use modules built and installed with earlier
7407 versions of perl that were installed under $prefix. Specify here
7408 the list of earlier versions that this version of perl should check.
7409 If Configure detected no earlier versions of perl installed under
7410 $prefix, then the list will be empty. Answer 'none' to tell perl
7411 to not search earlier versions.
7413 The default should almost always be sensible, so if you're not sure,
7414 just accept the default.
7417 rp='List of earlier versions to include in @INC?'
7420 [Nn]one|''|' ') inc_version_list=' ' ;;
7421 *) inc_version_list="$ans" ;;
7423 case "$inc_version_list" in
7425 inc_version_list_init='0';;
7426 *) inc_version_list_init=`echo $inc_version_list |
7427 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
7432 : determine whether to install perl also as /usr/bin/perl
7435 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
7437 Many scripts expect perl to be installed as /usr/bin/perl.
7439 If you want to, I can install the perl you are about to compile
7440 as /usr/bin/perl (in addition to $bin/perl).
7442 if test -f /usr/bin/perl; then
7445 However, please note that because you already have a /usr/bin/perl,
7446 overwriting that with a new Perl would very probably cause problems.
7447 Therefore I'm assuming you don't want to do that (unless you insist).
7450 case "$installusrbinperl" in
7451 "$define"|[yY]*) dflt='y';;
7457 Since you don't have a /usr/bin/perl I'm assuming creating one is okay.
7460 case "$installusrbinperl" in
7461 "$undef"|[nN]*) dflt='n';;
7465 rp="Do you want to install perl as /usr/bin/perl?"
7468 [yY]*) val="$define";;
7474 set installusrbinperl
7477 : see if dld is available
7481 : see if dlopen exists
7488 : determine which dynamic loading, if any, to compile in
7490 dldir="ext/DynaLoader"
7503 $define) dflt='y' ;;
7506 $define) dflt='y' ;;
7508 : Does a dl_xxx.xs file exist for this operating system
7509 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7512 rp="Do you wish to use dynamic loading?"
7519 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7520 dflt="$dldir/dl_${osname}.xs"
7521 elif $test "$d_dlopen" = "$define" ; then
7522 dflt="$dldir/dl_dlopen.xs"
7523 elif $test "$i_dld" = "$define" ; then
7524 dflt="$dldir/dl_dld.xs"
7529 *) dflt="$dldir/$dlsrc"
7532 echo "The following dynamic loading files are available:"
7533 : Can not go over to $dldir because getfile has path hard-coded in.
7534 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7535 rp="Source file to use for dynamic loading"
7541 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7545 Some systems may require passing special flags to $cc -c to
7546 compile modules that will be used to create a shared library.
7547 To use no flags, say "none".
7550 case "$cccdlflags" in
7551 '') case "$gccversion" in
7552 '') case "$osname" in
7554 next) dflt='none' ;;
7555 irix*) dflt='-KPIC' ;;
7556 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7557 sunos) dflt='-pic' ;;
7561 *) case "$osname" in
7562 darwin) dflt='none' ;;
7563 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7568 *) dflt="$cccdlflags" ;;
7570 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7573 none) cccdlflags=' ' ;;
7574 *) cccdlflags="$ans" ;;
7579 Some systems use ld to create libraries that can be dynamically loaded,
7580 while other systems (such as those using ELF) use $cc.
7584 '') $cat >try.c <<'EOM'
7585 /* Test for whether ELF binaries are produced */
7590 int i = open("a.out",O_RDONLY);
7593 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7594 exit(0); /* succeed (yes, it's ELF) */
7599 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7601 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7605 echo "I'll use ld to build dynamic libraries."
7614 rp="What command should be used to create dynamic libraries?"
7620 Some systems may require passing special flags to $ld to create a
7621 library that can be dynamically loaded. If your ld flags include
7622 -L/other/path options to locate libraries outside your loader's normal
7623 search path, you may need to specify those -L options here as well. To
7624 use no flags, say "none".
7627 case "$lddlflags" in
7628 '') case "$osname" in
7629 beos) dflt='-nostart' ;;
7631 case "$gccversion" in
7632 '') dflt="$dflt +vnocompatwarnings" ;;
7635 linux|irix*) dflt='-shared' ;;
7636 next) dflt='none' ;;
7637 solaris) dflt='-G' ;;
7638 sunos) dflt='-assert nodefinitions' ;;
7639 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
7643 *) dflt="$lddlflags" ;;
7646 : Try to guess additional flags to pick up local libraries.
7647 : Be careful not to append to a plain 'none'
7651 for thisflag in $ldflags; do
7656 *) dflt="$dflt $thisflag" ;;
7663 ''|' ') dflt='none' ;;
7666 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
7669 none) lddlflags=' ' ;;
7670 *) lddlflags="$ans" ;;
7675 Some systems may require passing special flags to $cc to indicate that
7676 the resulting executable will use dynamic linking. To use no flags,
7680 case "$ccdlflags" in
7681 '') case "$osname" in
7682 hpux) dflt='-Wl,-E' ;;
7683 linux) dflt='-rdynamic' ;;
7684 next) dflt='none' ;;
7685 sunos) dflt='none' ;;
7689 *) dflt="$ccdlflags" ;;
7691 rp="Any special flags to pass to $cc to use dynamic linking?"
7694 none) ccdlflags=' ' ;;
7695 *) ccdlflags="$ans" ;;
7709 # No dynamic loading being used, so don't bother even to prompt.
7712 *) case "$useshrplib" in
7713 '') case "$osname" in
7714 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
7716 also='Building a shared libperl is required for dynamic loading to work on your system.'
7721 also='Building a shared libperl is needed for MAB support.'
7739 The perl executable is normally obtained by linking perlmain.c with
7740 libperl${_a}, any static extensions (usually just DynaLoader), and
7741 any other libraries needed on this system (such as -lm, etc.). Since
7742 your system supports dynamic loading, it is probably possible to build
7743 a shared libperl.$so. If you will have more than one executable linked
7744 to libperl.$so, this will significantly reduce the size of each
7745 executable, but it may have a noticeable affect on performance. The
7746 default is probably sensible for your system.
7750 rp="Build a shared libperl.$so (y/n)"
7754 useshrplib='true' ;;
7755 *) useshrplib='false' ;;
7760 case "$useshrplib" in
7764 # Figure out a good name for libperl.so. Since it gets stored in
7765 # a version-specific architecture-dependent library, the version
7766 # number isn't really that important, except for making cc/ld happy.
7768 # A name such as libperl.so.3.1
7769 majmin="libperl.$so.$patchlevel.$subversion"
7770 # A name such as libperl.so.301
7771 majonly=`echo $patchlevel $subversion |
7772 $awk '{printf "%d%02d", $1, $2}'`
7773 majonly=libperl.$so.$majonly
7774 # I'd prefer to keep the os-specific stuff here to a minimum, and
7775 # rely on figuring it out from the naming of libc.
7776 case "${osname}${osvers}" in
7779 # XXX How handle the --version stuff for MAB?
7781 linux*) # ld won't link with a bare -lperl otherwise.
7784 cygwin*) # ld links against an importlib
7785 dflt=libperl$lib_ext
7787 *) # Try to guess based on whether libc has major.minor.
7789 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
7790 *libc.$so.[0-9]*) dflt=$majonly ;;
7791 *) dflt=libperl.$so ;;
7801 I need to select a good name for the shared libperl. If your system uses
7802 library names with major and minor numbers, then you might want something
7803 like $majmin. Alternatively, if your system uses a single version
7804 number for shared libraries, then you might want to use $majonly.
7805 Or, your system might be quite happy with a simple libperl.$so.
7807 Since the shared libperl will get installed into a version-specific
7808 architecture-dependent directory, the version number of the shared perl
7809 library probably isn't important, so the default should be o.k.
7812 rp='What name do you want to give to the shared libperl?'
7815 echo "Ok, I'll use $libperl"
7818 libperl="libperl${_a}"
7822 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
7826 WARNING: Use of the shrpdir variable for the installation location of
7827 the shared $libperl is not supported. It was never documented and
7828 will not work in this version. Let me (perlbug@perl.org)
7829 know of any problems this may cause.
7835 But your current setting of $shrpdir is
7836 the default anyway, so it's harmless.
7841 Further, your current attempted setting of $shrpdir
7842 conflicts with the value of $archlibexp/CORE
7843 that installperl will use.
7850 # How will the perl executable find the installed shared $libperl?
7851 # Add $xxx to ccdlflags.
7852 # If we can't figure out a command-line option, use $shrpenv to
7853 # set env LD_RUN_PATH. The main perl makefile uses this.
7854 shrpdir=$archlibexp/CORE
7857 if "$useshrplib"; then
7860 # We'll set it in Makefile.SH...
7866 xxx="-Wl,-R$shrpdir"
7868 bsdos|linux|irix*|dec_osf)
7869 xxx="-Wl,-rpath,$shrpdir"
7872 # next doesn't like the default...
7875 # beos doesn't like the default, either.
7878 # hpux doesn't like the default, either.
7879 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
7882 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
7888 # Only add $xxx if it isn't already in ccdlflags.
7889 case " $ccdlflags " in
7891 *) ccdlflags="$ccdlflags $xxx"
7894 Adding $xxx to the flags
7895 passed to $ld so that the perl executable will find the
7896 installed shared $libperl.
7904 # Fix ccdlflags in AIX for building external extensions.
7905 # (For building Perl itself bare -bE:perl.exp is needed,
7906 # Makefile.SH takes care of this.)
7908 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
7910 # Respect a hint or command-line value.
7912 '') shrpenv="$tmp_shrpenv" ;;
7914 case "$ldlibpthname" in
7915 '') ldlibpthname=LD_LIBRARY_PATH ;;
7916 none) ldlibpthname='' ;;
7919 : determine where manual pages are on this system
7923 syspath='/usr/share/man/man1 /usr/man/man1'
7924 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
7925 syspath="$syspath /usr/man/u_man/man1"
7926 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
7927 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
7928 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
7929 sysman=`./loc . /usr/man/man1 $syspath`
7932 if $test -d "$sysman"; then
7933 echo "System manual is in $sysman." >&4
7935 echo "Could not find manual pages in source form." >&4
7938 : determine where manual pages go
7939 set man1dir man1dir none
7943 $spackage has manual pages available in source form.
7947 echo "However, you don't have nroff, so they're probably useless to you."
7949 '') man1dir="none";;
7952 echo "If you don't want the manual sources installed, answer 'none'."
7957 lookpath="$prefixexp/share/man/man1"
7958 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
7959 lookpath="$lookpath $prefixexp/man/p_man/man1"
7960 lookpath="$lookpath $prefixexp/man/u_man/man1"
7961 lookpath="$lookpath $prefixexp/man/man.1"
7963 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
7964 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
7974 rp="Where do the main $spackage manual pages (source) go?"
7976 if $test "X$man1direxp" != "X$ansexp"; then
7980 man1direxp="$ansexp"
7986 : Change installation prefix, if necessary.
7987 if $test X"$prefix" != X"$installprefix"; then
7988 installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
7990 installman1dir="$man1direxp"
7993 : What suffix to use on installed man pages
8000 rp="What suffix should be used for the main $spackage man pages?"
8002 '') case "$man1dir" in
8016 *) dflt="$man1ext";;
8023 : see if we can have long filenames
8025 first=123456789abcdef
8027 if (echo hi >$first) 2>/dev/null; then
8028 if $test -f 123456789abcde; then
8029 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
8032 echo 'You can have filenames longer than 14 characters.'>&4
8037 You can't have filenames longer than 14 chars.
8038 You can't even think about them!
8044 $rm -rf 123456789abcde*
8046 : determine where library module manual pages go
8047 set man3dir man3dir none
8051 $spackage has manual pages for many of the library modules.
8057 However, you don't have nroff, so they're probably useless to you.
8060 '') man3dir="none";;
8064 case "$d_flexfnam" in
8067 However, your system can't handle the long file names like File::Basename.3.
8070 '') man3dir="none";;
8074 echo "If you don't want the manual sources installed, answer 'none'."
8075 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
8077 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
8078 if $test -d "$privlib/man/man3"; then
8081 WARNING: Previous versions of perl installed man3 pages into
8082 $privlib/man/man3. This version will suggest a
8083 new default of $dflt.
8087 rp='Do you wish to preserve the old behavior?(y/n)'
8090 y*) dflt="$privlib/man/man3" ;;
8095 *) dflt="$man3dir" ;;
8102 rp="Where do the $package library man pages (source) go?"
8105 man3direxp="$ansexp"
8111 : Change installation prefix, if necessary.
8112 if $test X"$prefix" != X"$installprefix"; then
8113 installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
8115 installman3dir="$man3direxp"
8118 : What suffix to use on installed man pages
8124 rp="What suffix should be used for the $package library man pages?"
8126 '') case "$man3dir" in
8140 *) dflt="$man3ext";;
8147 : see if we have to deal with yellow pages, now NIS.
8148 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8149 if $test -f /usr/etc/nibindd; then
8151 echo "I'm fairly confident you're on a NeXT."
8153 rp='Do you get the hosts file via NetInfo?'
8162 y*) hostcat='nidump hosts .';;
8163 *) case "$hostcat" in
8164 nidump*) hostcat='';;
8174 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8182 rp='Are you getting the hosts file via yellow pages?'
8185 y*) hostcat='ypcat hosts';;
8186 *) hostcat='cat /etc/hosts';;
8192 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8195 '') test -f /etc/group && groupcat='cat /etc/group';;
8198 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8201 : now get the host name
8203 echo "Figuring out host name..." >&4
8204 case "$myhostname" in
8206 echo 'Maybe "hostname" will work...'
8207 if tans=`sh -c hostname 2>&1` ; then
8215 if $test "$cont"; then
8217 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8218 if tans=`cat /etc/systemid 2>&1` ; then
8220 phostname='cat /etc/systemid'
8221 echo "Whadyaknow. Xenix always was a bit strange..."
8224 elif $test -r /etc/systemid; then
8225 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8228 if $test "$cont"; then
8229 echo 'No, maybe "uuname -l" will work...'
8230 if tans=`sh -c 'uuname -l' 2>&1` ; then
8232 phostname='uuname -l'
8234 echo 'Strange. Maybe "uname -n" will work...'
8235 if tans=`sh -c 'uname -n' 2>&1` ; then
8237 phostname='uname -n'
8239 echo 'Oh well, maybe I can mine it out of whoami.h...'
8240 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8241 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8242 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8244 case "$myhostname" in
8245 '') echo "Does this machine have an identity crisis or something?"
8248 echo "Well, you said $myhostname before..."
8249 phostname='echo $myhostname';;
8255 case "$myhostname" in
8256 '') myhostname=noname ;;
8258 : you do not want to know about this
8263 if $test "$myhostname" ; then
8265 rp='Your host name appears to be "'$myhostname'".'" Right?"
8273 : bad guess or no guess
8274 while $test "X$myhostname" = X ; do
8276 rp="Please type the (one word) name of your host:"
8281 : translate upper to lower if necessary
8282 case "$myhostname" in
8284 echo "(Normalizing case in your host name)"
8285 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8289 case "$myhostname" in
8291 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8292 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8293 echo "(Trimming domain name from host name--host name is now $myhostname)"
8295 *) case "$mydomain" in
8298 test "X$hostcat" = "Xypcat hosts" &&
8299 ypmatch "$myhostname" hosts 2>/dev/null |\
8300 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8303 test "X$hostcat" != "X" &&
8304 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8305 /[ ]$myhostname[ . ]/p" > hosts
8308 if $test -f hosts; then
8309 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8310 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8311 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8312 hosts | $sort | $uniq | \
8313 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8314 case `$echo X$dflt` in
8315 X*\ *) echo "(Several hosts in the database matched hostname)"
8318 X.) echo "(You do not have fully-qualified names in the hosts database)"
8322 echo "(I cannot locate a hosts database anywhere)"
8327 tans=`./loc resolv.conf X /etc /usr/etc`
8328 if $test -f "$tans"; then
8329 echo "(Attempting domain name extraction from $tans)"
8330 dflt=.`$sed -n -e 's/ / /g' \
8331 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8332 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8334 .) dflt=.`$sed -n -e 's/ / /g' \
8335 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8336 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8343 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8344 dflt=.`sh -c domainname 2>/dev/null`
8347 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8351 case "$dflt$osname" in
8352 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8353 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8357 .) echo "(Lost all hope -- silly guess then)"
8363 *) dflt="$mydomain";;
8367 rp="What is your domain name?"
8377 : translate upper to lower if necessary
8380 echo "(Normalizing case in your domain name)"
8381 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8385 : a little sanity check here
8386 case "$phostname" in
8389 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8390 $myhostname$mydomain|$myhostname) ;;
8392 case "$phostname" in
8394 echo "(That doesn't agree with your whoami.h file, by the way.)"
8397 echo "(That doesn't agree with your $phostname command, by the way.)"
8407 I need to get your e-mail address in Internet format if possible, i.e.
8408 something like user@host.domain. Please answer accurately since I have
8409 no easy means to double check it. The default value provided below
8410 is most probably close to reality but may not be valid from outside
8411 your organization...
8415 while test "$cont"; do
8417 '') dflt="$cf_by@$myhostname$mydomain";;
8418 *) dflt="$cf_email";;
8420 rp='What is your e-mail address?'
8426 rp='Address does not look like an Internet one. Use it anyway?'
8442 If you or somebody else will be maintaining perl at your site, please
8443 fill in the correct e-mail address here so that they may be contacted
8444 if necessary. Currently, the "perlbug" program included with perl
8445 will send mail to this address in addition to perlbug@perl.org. You may
8446 enter "none" for no administrator.
8449 case "$perladmin" in
8450 '') dflt="$cf_email";;
8451 *) dflt="$perladmin";;
8453 rp='Perl administrator e-mail address'
8457 : determine whether to only install version-specific parts.
8460 Do you want to install only the version-specific parts of the perl
8461 distribution? Usually you do *not* want to do this.
8463 case "$versiononly" in
8464 "$define"|[Yy]*|true) dflt='y' ;;
8467 rp="Do you want to install only the version-specific parts of perl?"
8470 [yY]*) val="$define";;
8476 case "$versiononly" in
8477 "$define") inc_version_list=''
8478 inc_version_list_init=0
8482 : figure out how to guarantee perl startup
8483 case "$startperl" in
8485 case "$sharpbang" in
8489 I can use the #! construct to start perl on your system. This will
8490 make startup of perl scripts faster, but may cause problems if you
8491 want to share those scripts and perl is not in a standard place
8492 ($binexp/perl) on all your platforms. The alternative is to force
8493 a shell by starting the script with a single ':' character.
8496 case "$versiononly" in
8497 "$define") dflt="$binexp/perl$version";;
8498 *) dflt="$binexp/perl";;
8500 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8503 none) startperl=": # use perl";;
8504 *) startperl="#!$ans"
8505 if $test 30 -lt `echo "$ans" | wc -c`; then
8508 WARNING: Some systems limit the #! command to 32 characters.
8509 If you experience difficulty running Perl scripts with #!, try
8510 installing Perl in a directory with a shorter pathname.
8516 *) startperl=": # use perl"
8521 echo "I'll use $startperl to start perl scripts."
8523 : figure best path for perl in scripts
8526 case "$versiononly" in
8527 "$define") perlpath="$binexp/perl$version";;
8528 *) perlpath="$binexp/perl";;
8530 case "$startperl" in
8535 I will use the "eval 'exec'" idiom to start Perl on your system.
8536 I can use the full path of your Perl binary for this purpose, but
8537 doing so may cause problems if you want to share those scripts and
8538 Perl is not always in a standard place ($binexp/perl).
8542 rp="What path shall I use in \"eval 'exec'\"?"
8549 case "$startperl" in
8551 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8554 : determine where public executable scripts go
8555 set scriptdir scriptdir
8557 case "$scriptdir" in
8560 : guess some guesses
8561 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8562 $test -d /usr/share/bin && dflt=/usr/share/bin
8563 $test -d /usr/local/script && dflt=/usr/local/script
8564 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8565 $test -d $prefixexp/script && dflt=$prefixexp/script
8569 *) dflt="$scriptdir"
8574 Some installations have a separate directory just for executable scripts so
8575 that they can mount it across multiple architectures but keep the scripts in
8576 one spot. You might, for example, have a subdirectory of /usr/share for this.
8577 Or you might just lump your scripts in with all your other executables.
8581 rp='Where do you keep publicly executable scripts?'
8583 if $test "X$ansexp" != "X$scriptdirexp"; then
8587 scriptdirexp="$ansexp"
8588 : Change installation prefix, if necessary.
8589 if $test X"$prefix" != X"$installprefix"; then
8590 installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
8592 installscript="$scriptdirexp"
8595 : determine where add-on public executables go
8597 '') dflt=$siteprefix/bin ;;
8601 rp='Pathname where the add-on public executables should be installed?'
8604 sitebinexp="$ansexp"
8605 : Change installation prefix, if necessary.
8606 if $test X"$prefix" != X"$installprefix"; then
8607 installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
8609 installsitebin="$sitebinexp"
8612 : define an is-a-typedef? function
8613 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8615 "") inclist="sys/types.h";;
8617 eval "varval=\$$var";
8621 for inc in $inclist; do
8622 echo "#include <$inc>" >>temp.c;
8624 echo "#ifdef $type" >> temp.c;
8625 echo "printf(\"We have $type\");" >> temp.c;
8626 echo "#endif" >> temp.c;
8627 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8628 if $contains $type temp.E >/dev/null 2>&1; then
8634 *) eval "$var=\$varval";;
8637 : define an is-a-typedef? function that prompts if the type is not available.
8638 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8640 "") inclist="sys/types.h";;
8642 eval "varval=\$$var";
8646 for inc in $inclist; do
8647 echo "#include <$inc>" >>temp.c;
8649 echo "#ifdef $type" >> temp.c;
8650 echo "printf(\"We have $type\");" >> temp.c;
8651 echo "#endif" >> temp.c;
8652 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8654 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
8655 if $contains $type temp.E >/dev/null 2>&1; then
8656 echo "$type found." >&4;
8659 echo "$type NOT found." >&4;
8665 *) eval "$var=\$varval";;
8668 : see what type lseek is declared as in the kernel
8669 rp="What is the type used for lseek's offset on this system?"
8670 set off_t lseektype long stdio.h sys/types.h
8674 echo "Checking to see how big your file offsets are..." >&4
8676 #include <sys/types.h>
8680 printf("%d\n", (int)sizeof($lseektype));
8685 if eval $compile_ok; then
8686 lseeksize=`$run ./try`
8687 echo "Your file offsets are $lseeksize bytes long."
8691 echo "(I can't seem to compile the test program. Guessing...)"
8692 rp="What is the size of your file offsets (in bytes)?"
8698 : see what type file positions are declared as in the library
8699 rp="What is the type for file position used by fsetpos()?"
8700 set fpos_t fpostype long stdio.h sys/types.h
8705 *_t) zzz="$fpostype" ;;
8708 echo "Checking the size of $zzz..." >&4
8710 #include <sys/types.h>
8713 printf("%d\n", (int)sizeof($fpostype));
8718 if eval $compile_ok; then
8722 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8725 echo "Your $zzz is $fpossize bytes long."
8731 echo "(I can't compile the test program. Guessing...)" >&4
8732 rp="What is the size of your file positions (in bytes)?"
8739 # Backward compatibility (uselfs is deprecated).
8741 "$define"|true|[yY]*)
8744 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
8746 uselargefiles="$define"
8750 case "$lseeksize:$fpossize" in
8753 You can have files larger than 2 gigabytes.
8756 *) case "$uselargefiles" in
8757 "$undef"|false|[nN]*) dflt='n' ;;
8762 Perl can be built to understand large files (files larger than 2 gigabytes)
8763 on some systems. To do so, Configure can be run with -Duselargefiles.
8765 If this doesn't make any sense to you, just accept the default '$dflt'.
8767 rp='Try to understand large files, if available?'
8770 y|Y) val="$define" ;;
8777 case "$uselargefiles" in
8779 : Look for a hint-file generated 'call-back-unit'. If the
8780 : user has specified that a large files perl is to be built,
8781 : we may need to set or change some other defaults.
8782 if $test -f uselargefiles.cbu; then
8783 echo "Your platform has some specific hints for large file builds, using them..."
8784 . ./uselargefiles.cbu
8786 echo "Rechecking to see how big your file offsets are..." >&4
8788 #include <sys/types.h>
8792 printf("%d\n", (int)sizeof($lseektype));
8797 if eval $compile_ok; then
8798 lseeksize=`$run ./try`
8799 $echo "Your file offsets are now $lseeksize bytes long."
8803 echo "(I can't seem to compile the test program. Guessing...)"
8804 rp="What is the size of your file offsets (in bytes)?"
8809 *_t) zzz="$fpostype" ;;
8812 $echo $n "Rechecking the size of $zzz...$c" >&4
8814 #include <sys/types.h>
8817 printf("%d\n", (int)sizeof($fpostype));
8822 if eval $compile_ok; then
8827 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8830 echo " $fpossize bytes." >&4
8836 echo "(I can't compile the test program. Guessing...)" >&4
8837 rp="What is the size of your file positions (in bytes)?"
8846 case "$vendorprefix" in
8847 '') d_vendorbin="$undef"
8851 *) d_vendorbin="$define"
8852 : determine where vendor-supplied executables go.
8853 case "$vendorbin" in
8854 '') dflt=$vendorprefix/bin ;;
8855 *) dflt="$vendorbin" ;;
8858 rp='Pathname for the vendor-supplied executables directory?'
8861 vendorbinexp="$ansexp"
8864 : Change installation prefix, if necessary.
8865 if $test X"$prefix" != X"$installprefix"; then
8866 installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
8868 installvendorbin="$vendorbinexp"
8871 : see if qgcvt exists
8875 : Check how to convert floats to strings.
8877 if test "X$d_Gconvert" = X; then
8880 echo "Checking for an efficient way to convert floats to strings."
8882 case "$uselongdouble" in
8883 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
8885 case "$d_longdbl" in
8886 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
8888 case "$d_PRIgldbl" in
8889 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
8893 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
8894 char *myname = "gconvert";
8897 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
8898 char *myname = "gcvt";
8901 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
8902 char *myname = "qgcvt";
8903 #define DOUBLETYPE long double
8906 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8908 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
8910 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
8913 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
8915 char *myname = "sprintf";
8919 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8920 #define DOUBLETYPE long double
8922 #define DOUBLETYPE double
8928 #define I_STDLIB $i_stdlib
8934 checkit(expect, got)
8938 if (strcmp(expect, got)) {
8939 printf("%s oddity: Expected %s, got %s\n",
8940 myname, expect, got);
8950 /* This must be 1st test on (which?) platform */
8951 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
8952 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
8953 checkit("0.1", buf);
8955 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
8956 checkit("0.01", buf);
8958 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
8959 checkit("0.001", buf);
8961 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
8962 checkit("0.0001", buf);
8964 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
8965 if (strlen(buf) > 5)
8966 checkit("9e-005", buf); /* for Microsoft ?? */
8968 checkit("9e-05", buf);
8970 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
8973 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
8974 checkit("1.1", buf);
8976 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
8977 checkit("1.01", buf);
8979 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
8980 checkit("1.001", buf);
8982 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
8983 checkit("1.0001", buf);
8985 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
8986 checkit("1.00001", buf);
8988 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
8989 checkit("1.000001", buf);
8991 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
8994 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
8997 /* Some Linux gcvt's give 1.e+5 here. */
8998 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
8999 checkit("100000", buf);
9001 /* Some Linux gcvt's give -1.e+5 here. */
9002 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
9003 checkit("-100000", buf);
9005 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
9006 checkit("123.456", buf);
9008 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
9009 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
9010 /* 34 should be enough to scare even long double
9011 * places into using the e notation. */
9012 if (strlen(buf) > 5)
9013 checkit("1e+034", buf); /* for Microsoft */
9015 checkit("1e+34", buf);
9017 /* For Perl, if you add additional tests here, also add them to
9018 * t/base/num.t for benefit of platforms not using Configure or
9019 * overriding d_Gconvert */
9024 : first add preferred functions to our list
9026 for xxx_convert in $gconvert_preference; do
9027 case $xxx_convert in
9028 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
9029 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
9032 : then add any others
9033 for xxx_convert in gconvert gcvt sprintf; do
9036 *) xxx_list="$xxx_list $xxx_convert" ;;
9040 case "$d_longdbl$uselongdouble" in
9042 : again, add prefered functions to our list first
9044 for xxx_convert in $gconvert_ld_preference; do
9045 case $xxx_convert in
9046 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9047 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
9050 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
9051 for xxx_convert in qgcvt sprintf $xxx_list; do
9052 case "$xxx_ld_list" in
9053 $xxx_convert*|*" $xxx_convert"*) ;;
9054 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9057 : if sprintf cannot do long doubles, move it to the end
9058 if test "$d_PRIgldbl" != "$define"; then
9059 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
9061 : if no qgcvt, remove it
9062 if test "$d_qgcvt" != "$define"; then
9063 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
9066 xxx_list="$xxx_ld_list"
9070 for xxx_convert in $xxx_list; do
9071 echo "Trying $xxx_convert..."
9073 set try -DTRY_$xxx_convert
9074 if eval $compile; then
9075 echo "$xxx_convert() found." >&4
9077 echo "I'll use $xxx_convert to convert floats into a string." >&4
9080 echo "...But $xxx_convert didn't work as I expected."
9084 echo "$xxx_convert NOT found." >&4
9088 if test X$xxx_convert = X; then
9089 echo "*** WHOA THERE!!! ***" >&4
9090 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
9094 case "$xxx_convert" in
9095 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
9096 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
9097 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
9098 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
9099 "$define$define$define")
9100 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9101 "$define$define$undef")
9102 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9103 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9110 : see if _fwalk exists
9114 : Initialize h_fcntl
9117 : Initialize h_sysfile
9120 : access call always available on UNIX
9124 : locate the flags for 'access()'
9128 $cat >access.c <<'EOCP'
9129 #include <sys/types.h>
9134 #include <sys/file.h>
9143 : check sys/file.h first, no particular reason here
9144 if $test `./findhdr sys/file.h` && \
9145 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9147 echo "<sys/file.h> defines the *_OK access constants." >&4
9148 elif $test `./findhdr fcntl.h` && \
9149 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9151 echo "<fcntl.h> defines the *_OK access constants." >&4
9152 elif $test `./findhdr unistd.h` && \
9153 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9154 echo "<unistd.h> defines the *_OK access constants." >&4
9156 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9162 : see if accessx exists
9163 set accessx d_accessx
9166 : see if alarm exists
9170 : see if POSIX threads are available
9171 set pthread.h i_pthread
9174 : define a fucntion to check prototypes
9175 $cat > protochk <<EOSH
9178 optimize="$optimize"
9180 prototype="$prototype"
9183 usethreads=$usethreads
9184 i_pthread=$i_pthread
9185 pthread_h_first=$pthread_h_first
9188 $cat >> protochk <<'EOSH'
9193 while test $# -ge 2; do
9195 $define) echo "#include <$2>" >> try.c ;;
9196 literal) echo "$2" >> try.c ;;
9198 # Extra magic for the benefit of systems that need pthread.h
9199 # to be included early to correctly detect threadsafe functions.
9200 # Such functions must guarantee themselves, though, that the usethreads
9201 # and i_pthread have been defined, before calling protochk.
9202 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
9203 echo "#include <pthread.h>" >> try.c
9208 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
9209 cat >> try.c <<'EOCP'
9210 #ifdef CAN_PROTOTYPE
9211 #define _(args) args
9216 echo "$foo" >> try.c
9217 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
9218 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
9226 : see if sys/types.h has to be included
9227 set sys/types.h i_systypes
9230 : see if sys/select.h has to be included
9231 set sys/select.h i_sysselct
9234 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9235 while $test $# -ge 2; do
9237 $define) echo "#include <$2>";;
9241 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9243 if eval $compile; then
9252 : see if we should include time.h, sys/time.h, or both
9254 if test "X$timeincl" = X; then
9255 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9256 $echo $n "I'm now running the test program...$c"
9257 $cat >try.c <<'EOCP'
9258 #include <sys/types.h>
9263 #ifdef SYSTIMEKERNEL
9266 #include <sys/time.h>
9269 #include <sys/select.h>
9278 struct timezone tzp;
9280 if (foo.tm_sec == foo.tm_sec)
9283 if (bar.tv_sec == bar.tv_sec)
9290 for s_timezone in '-DS_TIMEZONE' ''; do
9292 for s_timeval in '-DS_TIMEVAL' ''; do
9293 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9294 for i_time in '' '-DI_TIME'; do
9295 for i_systime in '-DI_SYSTIME' ''; do
9298 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9299 if eval $compile; then
9300 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9304 $echo $n "Succeeded with $flags$c"
9316 *SYSTIMEKERNEL*) i_systimek="$define"
9317 timeincl=`./findhdr sys/time.h`
9318 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9319 *) i_systimek="$undef";;
9322 *I_TIME*) i_time="$define"
9323 timeincl=`./findhdr time.h`" $timeincl"
9324 echo "We'll include <time.h>." >&4;;
9325 *) i_time="$undef";;
9328 *I_SYSTIME*) i_systime="$define"
9329 timeincl=`./findhdr sys/time.h`" $timeincl"
9330 echo "We'll include <sys/time.h>." >&4;;
9331 *) i_systime="$undef";;
9335 : see if struct tm knows about tm_zone
9336 case "$i_systime$i_time" in
9339 echo "Checking to see if your struct tm has tm_zone field..." >&4
9340 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
9348 case "$d_tm_tm_zone" in
9349 "$define") echo "Yes, it does." ;;
9350 *) echo "No, it doesn't." ;;
9352 : see if struct tm knows about tm_gmtoff
9353 case "$i_systime$i_time" in
9356 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
9357 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
9365 case "$d_tm_tm_gmtoff" in
9366 "$define") echo "Yes, it does." ;;
9367 *) echo "No, it doesn't." ;;
9370 : see if asctime_r exists
9371 set asctime_r d_asctime_r
9373 case "$d_asctime_r" in
9375 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
9376 case "$d_asctime_r_proto:$usethreads" in
9377 ":define") d_asctime_r_proto=define
9378 set d_asctime_r_proto asctime_r $hdrs
9382 case "$d_asctime_r_proto" in
9384 case "$asctime_r_proto" in
9385 ''|0) try='char* asctime_r(const struct tm*, char*);'
9386 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;;
9388 case "$asctime_r_proto" in
9389 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
9390 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;;
9392 case "$asctime_r_proto" in
9393 ''|0) try='int asctime_r(const struct tm*, char*);'
9394 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;;
9396 case "$asctime_r_proto" in
9397 ''|0) try='int asctime_r(const struct tm*, char*, int);'
9398 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;;
9400 case "$asctime_r_proto" in
9401 ''|0) d_asctime_r=undef
9403 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
9404 * ) case "$asctime_r_proto" in
9405 REENTRANT_PROTO*) ;;
9406 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
9408 echo "Prototype: $try" ;;
9411 *) case "$usethreads" in
9412 define) echo "asctime_r has no prototype, not using it." >&4 ;;
9419 *) asctime_r_proto=0
9423 : see if atolf exists
9427 : see if atoll exists
9431 : Look for GNU-cc style attribute checking
9433 echo "Checking whether your compiler can handle __attribute__ ..." >&4
9434 $cat >attrib.c <<'EOCP'
9436 void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
9438 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9439 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9440 echo "Your C compiler doesn't fully support __attribute__."
9443 echo "Your C compiler supports __attribute__."
9447 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9454 : see if bcmp exists
9458 : see if bcopy exists
9462 : see if this is a unistd.h system
9463 set unistd.h i_unistd
9466 : see if getpgrp exists
9467 set getpgrp d_getpgrp
9470 case "$d_getpgrp" in
9473 echo "Checking to see which flavor of getpgrp is in use..."
9476 #include <sys/types.h>
9478 # include <unistd.h>
9482 if (getuid() == 0) {
9483 printf("(I see you are running Configure as super-user...)\n");
9487 if (getpgrp(1) == 0)
9496 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9497 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
9499 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9500 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
9503 echo "I can't seem to compile and run the test program."
9505 xxx="a USG one, i.e. you use getpgrp()."
9507 # SVR4 systems can appear rather BSD-ish.
9510 xxx="a BSD one, i.e. you use getpgrp(pid)."
9514 xxx="probably a USG one, i.e. you use getpgrp()."
9519 echo "Assuming your getpgrp is $xxx" >&4
9528 : see if setpgrp exists
9529 set setpgrp d_setpgrp
9532 case "$d_setpgrp" in
9535 echo "Checking to see which flavor of setpgrp is in use..."
9538 #include <sys/types.h>
9540 # include <unistd.h>
9544 if (getuid() == 0) {
9545 printf("(I see you are running Configure as super-user...)\n");
9549 if (-1 == setpgrp(1, 1))
9552 if (setpgrp() != -1)
9558 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9559 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
9561 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9562 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
9565 echo "(I can't seem to compile and run the test program.)"
9567 xxx="a USG one, i.e. you use setpgrp()."
9569 # SVR4 systems can appear rather BSD-ish.
9572 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
9576 xxx="probably a USG one, i.e. you use setpgrp()."
9581 echo "Assuming your setpgrp is $xxx" >&4
9589 : see if bzero exists
9593 : see if signal is declared as pointer to function returning int or void
9595 xxx=`./findhdr signal.h`
9596 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
9597 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9598 echo "You have int (*signal())() instead of void." >&4
9600 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9601 echo "You have void (*signal())()." >&4
9603 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
9604 echo "You have int (*signal())() instead of void." >&4
9606 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
9607 echo "You have void (*signal())()." >&4
9610 case "$d_voidsig" in
9612 echo "I can't determine whether signal handler returns void or int..." >&4
9614 rp="What type does your signal handler return?"
9621 echo "As you already told me, signal handler returns void." >&4
9624 *) echo "As you already told me, signal handler returns int." >&4
9631 case "$d_voidsig" in
9632 "$define") signal_t="void";;
9637 : check for ability to cast large floats to 32-bit ints.
9639 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
9640 if $test "$intsize" -ge 4; then
9647 #include <sys/types.h>
9649 $signal_t blech(s) int s; { exit(3); }
9656 signal(SIGFPE, blech);
9658 /* Don't let compiler optimize the test away. Store the number
9659 in a writable string for gcc to pass to sscanf under HP/UX.
9661 sprintf(str, "2147483647");
9662 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
9666 /* x86 processors will probably give 0x8000 0000, which is a
9667 sign change. We don't want that. We want to mimic SPARC
9668 behavior here, which is to preserve the sign and give
9671 if (i32 != ($xxx) f)
9677 if eval $compile_ok; then
9681 echo "(I can't seem to compile the test program--assuming it can't)"
9689 echo "Nope, it can't."
9696 : check for ability to cast negative floats to unsigned
9698 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
9701 #include <sys/types.h>
9703 $signal_t blech(s) int s; { exit(7); }
9704 $signal_t blech_in_list(s) int s; { exit(4); }
9705 unsigned long dummy_long(p) unsigned long p; { return p; }
9706 unsigned int dummy_int(p) unsigned int p; { return p; }
9707 unsigned short dummy_short(p) unsigned short p; { return p; }
9711 unsigned long along;
9713 unsigned short ashort;
9717 /* Frustrate gcc-2.7.2's optimizer which failed this test with
9718 a direct f = -123. assignment. gcc-2.8.0 reportedly
9719 optimized the whole file away
9721 /* Store the number in a writable string for gcc to pass to
9724 sprintf(str, "-123");
9725 sscanf(str, "%lf", &f); /* f = -123.; */
9727 signal(SIGFPE, blech);
9728 along = (unsigned long)f;
9729 aint = (unsigned int)f;
9730 ashort = (unsigned short)f;
9731 if (along != (unsigned long)-123)
9733 if (aint != (unsigned int)-123)
9735 if (ashort != (unsigned short)-123)
9737 sprintf(str, "1073741824.");
9738 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
9741 along = (unsigned long)f;
9742 if (along != 0x80000000)
9746 along = (unsigned long)f;
9747 if (along != 0x7fffffff)
9751 along = (unsigned long)f;
9752 if (along != 0x80000001)
9756 signal(SIGFPE, blech_in_list);
9757 sprintf(str, "123.");
9758 sscanf(str, "%lf", &f); /* f = 123.; */
9759 along = dummy_long((unsigned long)f);
9760 aint = dummy_int((unsigned int)f);
9761 ashort = dummy_short((unsigned short)f);
9762 if (along != (unsigned long)123)
9764 if (aint != (unsigned int)123)
9766 if (ashort != (unsigned short)123)
9773 if eval $compile_ok; then
9777 echo "(I can't seem to compile the test program--assuming it can't)"
9780 case "$castflags" in
9785 echo "Nope, it can't."
9792 : see if vprintf exists
9794 if set vprintf val -f d_vprintf; eval $csym; $val; then
9795 echo 'vprintf() found.' >&4
9798 #include <varargs.h>
9800 int main() { xxx("foo"); }
9809 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
9813 if eval $compile && $run ./try; then
9814 echo "Your vsprintf() returns (int)." >&4
9817 echo "Your vsprintf() returns (char*)." >&4
9821 echo 'vprintf() NOT found.' >&4
9832 : see if chown exists
9836 : see if chroot exists
9840 : see if chsize exists
9844 : see if class exists
9848 hasstruct='varname=$1; struct=$2; shift; shift;
9849 while $test $# -ge 2; do
9851 $define) echo "#include <$2>";;
9855 echo "int main () { struct $struct foo; }" >> try.c;
9857 if eval $compile; then
9868 : see whether socket exists
9870 $echo $n "Hmm... $c" >&4
9871 if set socket val -f d_socket; eval $csym; $val; then
9872 echo "Looks like you have Berkeley networking support." >&4
9874 if set setsockopt val -f; eval $csym; $val; then
9877 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
9881 if $contains socklib libc.list >/dev/null 2>&1; then
9882 echo "Looks like you have Berkeley networking support." >&4
9884 : we will have to assume that it supports the 4.2 BSD interface
9887 echo "You don't have Berkeley networking in libc$_a..." >&4
9888 if test "X$d_socket" = "X$define"; then
9889 echo "...but you seem to believe that you have sockets." >&4
9891 for net in net socket
9893 if test -f /usr/lib/lib$net$_a; then
9894 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
9895 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
9896 if $contains socket libc.list >/dev/null 2>&1; then
9901 echo "...but the Wollongong group seems to have hacked it in." >&4
9902 sockethdr="-I/usr/netinclude"
9905 echo "Found Berkeley sockets interface in lib$net." >&4
9906 if $contains setsockopt libc.list >/dev/null 2>&1; then
9909 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
9916 if test "X$d_socket" != "X$define"; then
9917 echo "or anywhere else I see." >&4
9925 : see if socketpair exists
9926 set socketpair d_sockpair
9931 echo "Checking the availability of certain socket constants..." >&4
9932 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
9933 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
9935 #include <sys/types.h>
9936 #include <sys/socket.h>
9942 set try; if eval $compile; then
9945 set d_${enum}; eval $setvar
9949 : see if this is a sys/uio.h system
9950 set sys/uio.h i_sysuio
9955 echo "Checking to see if your system supports struct cmsghdr..." >&4
9956 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
9958 case "$d_cmsghdr_s" in
9959 "$define") echo "Yes, it does." ;;
9960 *) echo "No, it doesn't." ;;
9964 : check for const keyword
9966 echo 'Checking to see if your C compiler knows about "const"...' >&4
9967 $cat >const.c <<'EOCP'
9968 typedef struct spug { int drokk; } spug;
9975 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
9977 echo "Yup, it does."
9980 echo "Nope, it doesn't."
9985 : see if crypt exists
9990 $define) cryptlib='' ;;
9991 *) if set crypt val -f d_crypt; eval $csym; $val; then
9992 echo 'crypt() found.' >&4
9996 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
9997 if $test -z "$cryptlib"; then
9998 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
10002 if $test -z "$cryptlib"; then
10003 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
10007 if $test -z "$cryptlib"; then
10008 cryptlib=`./loc libcrypt$_a "" $libpth`
10012 if $test -z "$cryptlib"; then
10013 echo 'crypt() NOT found.' >&4
10024 : see if this is a crypt.h system
10025 set crypt.h i_crypt
10028 : see if crypt_r exists
10029 set crypt_r d_crypt_r
10031 case "$d_crypt_r" in
10033 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
10034 case "$d_crypt_r_proto:$usethreads" in
10035 ":define") d_crypt_r_proto=define
10036 set d_crypt_r_proto crypt_r $hdrs
10040 case "$d_crypt_r_proto" in
10042 case "$crypt_r_proto" in
10043 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
10044 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCS ;;
10046 case "$crypt_r_proto" in
10047 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
10048 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCD ;;
10050 case "$crypt_r_proto" in
10051 ''|0) d_crypt_r=undef
10053 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
10054 * ) case "$crypt_r_proto" in
10055 REENTRANT_PROTO*) ;;
10056 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
10058 echo "Prototype: $try" ;;
10061 *) case "$usethreads" in
10062 define) echo "crypt_r has no prototype, not using it." >&4 ;;
10073 : get csh whereabouts
10075 'csh') val="$undef" ;;
10076 *) val="$define" ;;
10080 : Respect a hint or command line value for full_csh.
10081 case "$full_csh" in
10082 '') full_csh=$csh ;;
10085 : see if ctermid_r exists
10086 set ctermid_r d_ctermid_r
10088 case "$d_ctermid_r" in
10090 hdrs="$i_systypes sys/types.h define stdio.h "
10091 case "$d_ctermid_r_proto:$usethreads" in
10092 ":define") d_ctermid_r_proto=define
10093 set d_ctermid_r_proto ctermid_r $hdrs
10097 case "$d_ctermid_r_proto" in
10099 case "$ctermid_r_proto" in
10100 ''|0) try='char* ctermid_r(char*);'
10101 ./protochk "extern $try" $hdrs && ctermid_r_proto=B_B ;;
10103 case "$ctermid_r_proto" in
10104 ''|0) d_ctermid_r=undef
10106 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
10107 * ) case "$ctermid_r_proto" in
10108 REENTRANT_PROTO*) ;;
10109 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
10111 echo "Prototype: $try" ;;
10114 *) case "$usethreads" in
10115 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
10122 *) ctermid_r_proto=0
10126 : see if ctime_r exists
10127 set ctime_r d_ctime_r
10129 case "$d_ctime_r" in
10131 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
10132 case "$d_ctime_r_proto:$usethreads" in
10133 ":define") d_ctime_r_proto=define
10134 set d_ctime_r_proto ctime_r $hdrs
10138 case "$d_ctime_r_proto" in
10140 case "$ctime_r_proto" in
10141 ''|0) try='char* ctime_r(const time_t*, char*);'
10142 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;;
10144 case "$ctime_r_proto" in
10145 ''|0) try='char* ctime_r(const time_t*, char*, int);'
10146 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;;
10148 case "$ctime_r_proto" in
10149 ''|0) try='int ctime_r(const time_t*, char*);'
10150 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;;
10152 case "$ctime_r_proto" in
10153 ''|0) try='int ctime_r(const time_t*, char*, int);'
10154 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;;
10156 case "$ctime_r_proto" in
10157 ''|0) d_ctime_r=undef
10159 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
10160 * ) case "$ctime_r_proto" in
10161 REENTRANT_PROTO*) ;;
10162 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
10164 echo "Prototype: $try" ;;
10167 *) case "$usethreads" in
10168 define) echo "ctime_r has no prototype, not using it." >&4 ;;
10179 : see if cuserid exists
10180 set cuserid d_cuserid
10183 : see if this is a limits.h system
10184 set limits.h i_limits
10187 : see if this is a float.h system
10188 set float.h i_float
10191 : See if number of significant digits in a double precision number is known
10193 $cat >dbl_dig.c <<EOM
10194 #$i_limits I_LIMITS
10197 #include <limits.h>
10203 printf("Contains DBL_DIG");
10206 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
10207 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
10208 echo "DBL_DIG found." >&4
10211 echo "DBL_DIG NOT found." >&4
10218 : see if dbm.h is available
10219 : see if dbmclose exists
10220 set dbmclose d_dbmclose
10223 case "$d_dbmclose" in
10233 *) set rpcsvc/dbm.h i_rpcsvcdbm
10238 *) echo "We won't be including <dbm.h>"
10248 : see if prototype for dbminit is available
10250 set d_dbminitproto dbminit $i_dbm dbm.h
10253 : see if difftime exists
10254 set difftime d_difftime
10257 : see if this is a dirent system
10259 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
10261 echo "<dirent.h> found." >&4
10264 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
10265 echo "<sys/dir.h> found." >&4
10268 xinc=`./findhdr sys/ndir.h`
10270 echo "<dirent.h> NOT found." >&4
10275 : Look for type of directory structure.
10277 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10279 case "$direntrytype" in
10281 case "$i_dirent" in
10282 $define) guess1='struct dirent' ;;
10283 *) guess1='struct direct' ;;
10286 *) guess1="$direntrytype"
10291 'struct dirent') guess2='struct direct' ;;
10292 *) guess2='struct dirent' ;;
10295 if $contains "$guess1" try.c >/dev/null 2>&1; then
10296 direntrytype="$guess1"
10297 echo "Your directory entries are $direntrytype." >&4
10298 elif $contains "$guess2" try.c >/dev/null 2>&1; then
10299 direntrytype="$guess2"
10300 echo "Your directory entries seem to be $direntrytype." >&4
10302 echo "I don't recognize your system's directory entries." >&4
10303 rp="What type is used for directory entries on this system?"
10306 direntrytype="$ans"
10311 : see if the directory entry stores field length
10313 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10314 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
10315 echo "Good, your directory entry keeps length information in d_namlen." >&4
10318 echo "Your directory entry does not know about the d_namlen field." >&4
10325 : see if this is an sysdir system
10326 set sys/dir.h i_sysdir
10329 : see if this is an sysndir system
10330 set sys/ndir.h i_sysndir
10335 $cat >dirfd.c <<EOM
10337 #$i_dirent I_DIRENT /**/
10338 #$i_sysdir I_SYS_DIR /**/
10339 #$i_sysndir I_SYS_NDIR /**/
10340 #$i_systypes I_SYS_TYPES /**/
10341 #if defined(I_SYS_TYPES)
10342 #include <sys/types.h>
10344 #if defined(I_DIRENT)
10345 #include <dirent.h>
10346 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
10347 #include <sys/dir.h>
10351 #include <sys/ndir.h>
10355 #include <ndir.h> /* may be wrong in the future */
10357 #include <sys/dir.h>
10363 DIR *dirp = opendir(".");
10364 if (dirfd(dirp) >= 0)
10371 if eval $compile; then
10375 $define) echo "dirfd() found." >&4 ;;
10376 *) echo "dirfd() NOT found." >&4 ;;
10382 : see if dlerror exists
10385 set dlerror d_dlerror
10389 : see if dlfcn is available
10390 set dlfcn.h i_dlfcn
10397 On a few systems, the dynamically loaded modules that perl generates and uses
10398 will need a different extension than shared libs. The default will probably
10404 *) dflt="$dlext" ;;
10406 rp='What is the extension of dynamically loaded modules'
10415 : Check if dlsym need a leading underscore
10421 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
10422 $cat >dyna.c <<'EOM'
10431 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
10433 #include <sys/types.h>
10438 extern int fred() ;
10447 int mode = RTLD_LAZY ;
10449 handle = dlopen("./dyna.$dlext", mode) ;
10450 if (handle == NULL) {
10455 symbol = dlsym(handle, "fred") ;
10456 if (symbol == NULL) {
10457 /* try putting a leading underscore */
10458 symbol = dlsym(handle, "_fred") ;
10459 if (symbol == NULL) {
10472 : Call the object file tmp-dyna.o in case dlext=o.
10473 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
10474 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
10475 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
10476 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
10479 1) echo "Test program failed using dlopen." >&4
10480 echo "Perhaps you should not use dynamic loading." >&4;;
10481 2) echo "Test program failed using dlsym." >&4
10482 echo "Perhaps you should not use dynamic loading." >&4;;
10483 3) echo "dlsym needs a leading underscore" >&4
10485 4) echo "dlsym doesn't need a leading underscore." >&4;;
10488 echo "I can't compile and run the test program." >&4
10489 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
10494 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
10499 : see if drand48_r exists
10500 set drand48_r d_drand48_r
10502 case "$d_drand48_r" in
10504 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
10505 case "$d_drand48_r_proto:$usethreads" in
10506 ":define") d_drand48_r_proto=define
10507 set d_drand48_r_proto drand48_r $hdrs
10511 case "$d_drand48_r_proto" in
10513 case "$drand48_r_proto" in
10514 ''|0) try='int drand48_r(struct drand48_data*, double*);'
10515 ./protochk "extern $try" $hdrs && drand48_r_proto=I_ST ;;
10517 case "$drand48_r_proto" in
10518 ''|0) d_drand48_r=undef
10520 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
10521 * ) case "$drand48_r_proto" in
10522 REENTRANT_PROTO*) ;;
10523 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
10525 echo "Prototype: $try" ;;
10528 *) case "$usethreads" in
10529 define) echo "drand48_r has no prototype, not using it." >&4 ;;
10536 *) drand48_r_proto=0
10540 : see if prototype for drand48 is available
10542 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
10545 : see if dup2 exists
10549 : see if eaccess exists
10550 set eaccess d_eaccess
10553 : see if endgrent exists
10554 set endgrent d_endgrent
10557 : see if this is an grp system
10563 xxx=`./findhdr grp.h`
10564 $cppstdin $cppflags $cppminus < $xxx >$$.h
10566 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
10578 set d_grpasswd; eval $setvar
10582 : see if endgrent_r exists
10583 set endgrent_r d_endgrent_r
10585 case "$d_endgrent_r" in
10587 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
10588 case "$d_endgrent_r_proto:$usethreads" in
10589 ":define") d_endgrent_r_proto=define
10590 set d_endgrent_r_proto endgrent_r $hdrs
10594 case "$d_endgrent_r_proto" in
10596 case "$endgrent_r_proto" in
10597 ''|0) try='int endgrent_r(FILE**);'
10598 ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;;
10600 case "$endgrent_r_proto" in
10601 ''|0) try='void endgrent_r(FILE**);'
10602 ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;;
10604 case "$endgrent_r_proto" in
10605 ''|0) d_endgrent_r=undef
10607 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
10608 * ) case "$endgrent_r_proto" in
10609 REENTRANT_PROTO*) ;;
10610 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
10612 echo "Prototype: $try" ;;
10615 *) case "$usethreads" in
10616 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
10623 *) endgrent_r_proto=0
10627 : see if endhostent exists
10628 set endhostent d_endhent
10631 : see if this is a netdb.h system
10632 set netdb.h i_netdb
10635 : see if endhostent_r exists
10636 set endhostent_r d_endhostent_r
10638 case "$d_endhostent_r" in
10640 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10641 case "$d_endhostent_r_proto:$usethreads" in
10642 ":define") d_endhostent_r_proto=define
10643 set d_endhostent_r_proto endhostent_r $hdrs
10647 case "$d_endhostent_r_proto" in
10649 case "$endhostent_r_proto" in
10650 ''|0) try='int endhostent_r(struct hostent_data*);'
10651 ./protochk "extern $try" $hdrs && endhostent_r_proto=I_D ;;
10653 case "$endhostent_r_proto" in
10654 ''|0) try='void endhostent_r(struct hostent_data*);'
10655 ./protochk "extern $try" $hdrs && endhostent_r_proto=V_D ;;
10657 case "$endhostent_r_proto" in
10658 ''|0) d_endhostent_r=undef
10659 endhostent_r_proto=0
10660 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
10661 * ) case "$endhostent_r_proto" in
10662 REENTRANT_PROTO*) ;;
10663 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
10665 echo "Prototype: $try" ;;
10668 *) case "$usethreads" in
10669 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
10671 d_endhostent_r=undef
10672 endhostent_r_proto=0
10676 *) endhostent_r_proto=0
10680 : see if endnetent exists
10681 set endnetent d_endnent
10684 : see if endnetent_r exists
10685 set endnetent_r d_endnetent_r
10687 case "$d_endnetent_r" in
10689 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10690 case "$d_endnetent_r_proto:$usethreads" in
10691 ":define") d_endnetent_r_proto=define
10692 set d_endnetent_r_proto endnetent_r $hdrs
10696 case "$d_endnetent_r_proto" in
10698 case "$endnetent_r_proto" in
10699 ''|0) try='int endnetent_r(struct netent_data*);'
10700 ./protochk "extern $try" $hdrs && endnetent_r_proto=I_D ;;
10702 case "$endnetent_r_proto" in
10703 ''|0) try='void endnetent_r(struct netent_data*);'
10704 ./protochk "extern $try" $hdrs && endnetent_r_proto=V_D ;;
10706 case "$endnetent_r_proto" in
10707 ''|0) d_endnetent_r=undef
10708 endnetent_r_proto=0
10709 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
10710 * ) case "$endnetent_r_proto" in
10711 REENTRANT_PROTO*) ;;
10712 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
10714 echo "Prototype: $try" ;;
10717 *) case "$usethreads" in
10718 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
10720 d_endnetent_r=undef
10721 endnetent_r_proto=0
10725 *) endnetent_r_proto=0
10729 : see if endprotoent exists
10730 set endprotoent d_endpent
10733 : see if endprotoent_r exists
10734 set endprotoent_r d_endprotoent_r
10736 case "$d_endprotoent_r" in
10738 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10739 case "$d_endprotoent_r_proto:$usethreads" in
10740 ":define") d_endprotoent_r_proto=define
10741 set d_endprotoent_r_proto endprotoent_r $hdrs
10745 case "$d_endprotoent_r_proto" in
10747 case "$endprotoent_r_proto" in
10748 ''|0) try='int endprotoent_r(struct protoent_data*);'
10749 ./protochk "extern $try" $hdrs && endprotoent_r_proto=I_D ;;
10751 case "$endprotoent_r_proto" in
10752 ''|0) try='void endprotoent_r(struct protoent_data*);'
10753 ./protochk "extern $try" $hdrs && endprotoent_r_proto=V_D ;;
10755 case "$endprotoent_r_proto" in
10756 ''|0) d_endprotoent_r=undef
10757 endprotoent_r_proto=0
10758 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
10759 * ) case "$endprotoent_r_proto" in
10760 REENTRANT_PROTO*) ;;
10761 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
10763 echo "Prototype: $try" ;;
10766 *) case "$usethreads" in
10767 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
10769 d_endprotoent_r=undef
10770 endprotoent_r_proto=0
10774 *) endprotoent_r_proto=0
10778 : see if endpwent exists
10779 set endpwent d_endpwent
10782 : see if this is a pwd.h system
10788 xxx=`./findhdr pwd.h`
10789 $cppstdin $cppflags $cppminus < $xxx >$$.h
10791 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
10799 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
10807 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
10815 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
10823 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
10831 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
10839 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
10847 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
10859 set d_pwquota; eval $setvar
10860 set d_pwage; eval $setvar
10861 set d_pwchange; eval $setvar
10862 set d_pwclass; eval $setvar
10863 set d_pwexpire; eval $setvar
10864 set d_pwcomment; eval $setvar
10865 set d_pwgecos; eval $setvar
10866 set d_pwpasswd; eval $setvar
10870 : see if endpwent_r exists
10871 set endpwent_r d_endpwent_r
10873 case "$d_endpwent_r" in
10875 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
10876 case "$d_endpwent_r_proto:$usethreads" in
10877 ":define") d_endpwent_r_proto=define
10878 set d_endpwent_r_proto endpwent_r $hdrs
10882 case "$d_endpwent_r_proto" in
10884 case "$endpwent_r_proto" in
10885 ''|0) try='int endpwent_r(FILE**);'
10886 ./protochk "extern $try" $hdrs && endpwent_r_proto=I_H ;;
10888 case "$endpwent_r_proto" in
10889 ''|0) try='void endpwent_r(FILE**);'
10890 ./protochk "extern $try" $hdrs && endpwent_r_proto=V_H ;;
10892 case "$endpwent_r_proto" in
10893 ''|0) d_endpwent_r=undef
10895 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
10896 * ) case "$endpwent_r_proto" in
10897 REENTRANT_PROTO*) ;;
10898 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
10900 echo "Prototype: $try" ;;
10903 *) case "$usethreads" in
10904 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
10911 *) endpwent_r_proto=0
10915 : see if endservent exists
10916 set endservent d_endsent
10919 : see if endservent_r exists
10920 set endservent_r d_endservent_r
10922 case "$d_endservent_r" in
10924 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10925 case "$d_endservent_r_proto:$usethreads" in
10926 ":define") d_endservent_r_proto=define
10927 set d_endservent_r_proto endservent_r $hdrs
10931 case "$d_endservent_r_proto" in
10933 case "$endservent_r_proto" in
10934 ''|0) try='int endservent_r(struct servent_data*);'
10935 ./protochk "extern $try" $hdrs && endservent_r_proto=I_D ;;
10937 case "$endservent_r_proto" in
10938 ''|0) try='void endservent_r(struct servent_data*);'
10939 ./protochk "extern $try" $hdrs && endservent_r_proto=V_D ;;
10941 case "$endservent_r_proto" in
10942 ''|0) d_endservent_r=undef
10943 endservent_r_proto=0
10944 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
10945 * ) case "$endservent_r_proto" in
10946 REENTRANT_PROTO*) ;;
10947 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
10949 echo "Prototype: $try" ;;
10952 *) case "$usethreads" in
10953 define) echo "endservent_r has no prototype, not using it." >&4 ;;
10955 d_endservent_r=undef
10956 endservent_r_proto=0
10960 *) endservent_r_proto=0
10964 : Locate the flags for 'open()'
10966 $cat >try.c <<'EOCP'
10967 #include <sys/types.h>
10972 #include <sys/file.h>
10983 : check sys/file.h first to get FREAD on Sun
10984 if $test `./findhdr sys/file.h` && \
10985 set try -DI_SYS_FILE && eval $compile; then
10987 echo "<sys/file.h> defines the O_* constants..." >&4
10988 if $run ./try; then
10989 echo "and you have the 3 argument form of open()." >&4
10992 echo "but not the 3 argument form of open(). Oh, well." >&4
10995 elif $test `./findhdr fcntl.h` && \
10996 set try -DI_FCNTL && eval $compile; then
10998 echo "<fcntl.h> defines the O_* constants..." >&4
10999 if $run ./try; then
11000 echo "and you have the 3 argument form of open()." >&4
11003 echo "but not the 3 argument form of open(). Oh, well." >&4
11008 echo "I can't find the O_* constant definitions! You got problems." >&4
11014 : see which of string.h or strings.h is needed
11016 strings=`./findhdr string.h`
11017 if $test "$strings" && $test -r "$strings"; then
11018 echo "Using <string.h> instead of <strings.h>." >&4
11022 strings=`./findhdr strings.h`
11023 if $test "$strings" && $test -r "$strings"; then
11024 echo "Using <strings.h> instead of <string.h>." >&4
11026 echo "No string header found -- You'll surely have problems." >&4
11031 case "$i_string" in
11032 "$undef") strings=`./findhdr strings.h`;;
11033 *) strings=`./findhdr string.h`;;
11036 : see if this is a sys/file.h system
11041 : do we need to include sys/file.h ?
11045 if $h_sysfile; then
11047 echo "We'll be including <sys/file.h>." >&4
11050 echo "We won't be including <sys/file.h>." >&4
11060 : see if fcntl.h is there
11065 : see if we can include fcntl.h
11071 echo "We'll be including <fcntl.h>." >&4
11074 if $h_sysfile; then
11075 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
11077 echo "We won't be including <fcntl.h>." >&4
11089 : check for non-blocking I/O stuff
11090 case "$h_sysfile" in
11091 true) echo "#include <sys/file.h>" > head.c;;
11094 true) echo "#include <fcntl.h>" > head.c;;
11095 *) echo "#include <sys/fcntl.h>" > head.c;;
11100 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
11101 case "$o_nonblock" in
11103 $cat head.c > try.c
11104 $cat >>try.c <<EOCP
11106 #include <stdlib.h>
11113 printf("O_NONBLOCK\n");
11117 printf("O_NDELAY\n");
11121 printf("FNDELAY\n");
11128 if eval $compile_ok; then
11129 o_nonblock=`$run ./try`
11130 case "$o_nonblock" in
11131 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
11132 *) echo "Seems like we can use $o_nonblock.";;
11135 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
11138 *) echo "Using $hint value $o_nonblock.";;
11140 $rm -f try try.* .out core
11143 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
11146 $cat head.c > try.c
11147 $cat >>try.c <<EOCP
11149 #include <sys/types.h>
11150 #include <signal.h>
11152 #include <stdlib.h>
11157 #define MY_O_NONBLOCK $o_nonblock
11158 #ifndef errno /* XXX need better Configure test */
11161 #$i_unistd I_UNISTD
11163 #include <unistd.h>
11165 #$i_string I_STRING
11167 #include <string.h>
11169 #include <strings.h>
11171 $signal_t blech(x) int x; { exit(3); }
11173 $cat >> try.c <<'EOCP'
11181 pipe(pd); /* Down: child -> parent */
11182 pipe(pu); /* Up: parent -> child */
11185 close(pd[1]); /* Parent reads from pd[0] */
11186 close(pu[0]); /* Parent writes (blocking) to pu[1] */
11188 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
11193 signal(SIGALRM, blech);
11195 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
11197 sprintf(string, "%d\n", ret);
11198 write(2, string, strlen(string));
11201 if (errno == EAGAIN) {
11202 printf("EAGAIN\n");
11207 if (errno == EWOULDBLOCK)
11208 printf("EWOULDBLOCK\n");
11211 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
11212 sleep(2); /* Give it time to close our pipe */
11214 ret = read(pd[0], buf, 1); /* Should read EOF */
11216 sprintf(string, "%d\n", ret);
11217 write(4, string, strlen(string));
11221 close(pd[0]); /* We write to pd[1] */
11222 close(pu[1]); /* We read from pu[0] */
11223 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
11224 close(pd[1]); /* Pipe pd is now fully closed! */
11225 exit(0); /* Bye bye, thank you for playing! */
11229 if eval $compile_ok; then
11230 echo "$startsh" >mtry
11231 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
11233 ./mtry >/dev/null 2>&1
11235 0) eagain=`$cat try.out`;;
11236 1) echo "Could not perform non-blocking setting!";;
11237 2) echo "I did a successful read() for something that was not there!";;
11238 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
11239 4) echo "Could not find F_SETFL!";;
11240 *) echo "Something terribly wrong happened during testing.";;
11242 rd_nodata=`$cat try.ret`
11243 echo "A read() system call with no data present returns $rd_nodata."
11244 case "$rd_nodata" in
11247 echo "(That's peculiar, fixing that to be -1.)"
11253 echo "Forcing errno EAGAIN on read() with no data available."
11257 echo "Your read() sets errno to $eagain when no data is available."
11260 status=`$cat try.err`
11262 0) echo "And it correctly returns 0 to signal EOF.";;
11263 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
11264 *) echo "However, your read() returns '$status' on EOF??";;
11267 if test "$status" = "$rd_nodata"; then
11268 echo "WARNING: you can't distinguish between EOF and no data!"
11272 echo "I can't compile the test program--assuming errno EAGAIN will do."
11279 echo "Using $hint value $eagain."
11280 echo "Your read() returns $rd_nodata when no data is present."
11281 case "$d_eofnblk" in
11282 "$define") echo "And you can see EOF because read() returns 0.";;
11283 "$undef") echo "But you can't see EOF status from read() returned value.";;
11285 echo "(Assuming you can't see EOF status from read anyway.)"
11291 $rm -f try try.* .out core head.c mtry
11293 : see if fchdir exists
11294 set fchdir d_fchdir
11297 : see if fchmod exists
11298 set fchmod d_fchmod
11301 : see if fchown exists
11302 set fchown d_fchown
11305 : see if this is an fcntl system
11310 : See if fcntl-based locking works.
11312 #include <stdlib.h>
11313 #include <unistd.h>
11315 #include <signal.h>
11316 $signal_t blech(x) int x; { exit(3); }
11318 #if defined(F_SETLK) && defined(F_SETLKW)
11319 struct flock flock;
11321 fd = open("try.c", O_RDONLY);
11322 flock.l_type = F_RDLCK;
11323 flock.l_whence = SEEK_SET;
11324 flock.l_start = flock.l_len = 0;
11325 signal(SIGALRM, blech);
11327 retval = fcntl(fd, F_SETLK, &flock);
11329 (retval < 0 ? exit(2) : exit(0));
11335 echo "Checking if fcntl-based file locking works... "
11339 if eval $compile_ok; then
11340 if $run ./try; then
11341 echo "Yes, it seems to work."
11344 echo "Nope, it didn't work."
11349 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
11350 *** This is (almost) impossible.
11351 *** If your NFS lock daemons are not feeling well, something like
11352 *** this may happen, please investigate. Cannot continue, aborting.
11360 echo "I'm unable to compile the test program, so I'll assume not."
11365 echo "Nope, since you don't even have fcntl()."
11368 set d_fcntl_can_lock
11373 : check for fd_set items
11376 Checking to see how well your C compiler handles fd_set and friends ...
11379 #$i_systime I_SYS_TIME
11380 #$i_sysselct I_SYS_SELECT
11381 #$d_socket HAS_SOCKET
11382 #include <sys/types.h>
11384 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
11387 #include <sys/time.h>
11389 #ifdef I_SYS_SELECT
11390 #include <sys/select.h>
11399 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
11407 if eval $compile; then
11408 d_fds_bits="$define"
11410 echo "Well, your system knows about the normal fd_set typedef..." >&4
11411 if $run ./try; then
11412 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
11413 d_fd_macros="$define"
11416 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
11418 d_fd_macros="$undef"
11422 Hmm, your compiler has some difficulty with fd_set. Checking further...
11425 if eval $compile; then
11426 d_fds_bits="$undef"
11428 echo "Well, your system has some sort of fd_set available..." >&4
11429 if $run ./try; then
11430 echo "and you have the normal fd_set macros." >&4
11431 d_fd_macros="$define"
11434 but not the normal fd_set macros! Gross! More work for me...
11436 d_fd_macros="$undef"
11439 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
11441 d_fds_bits="$undef"
11442 d_fd_macros="$undef"
11447 : see if fgetpos exists
11448 set fgetpos d_fgetpos
11451 : see if finite exists
11452 set finite d_finite
11455 : see if finitel exists
11456 set finitel d_finitel
11459 : see if flock exists
11463 : see if prototype for flock is available
11465 set d_flockproto flock $i_sysfile sys/file.h
11468 : see if fork exists
11472 : see if fp_class exists
11473 set fp_class d_fp_class
11476 : see if pathconf exists
11477 set pathconf d_pathconf
11480 : see if fpathconf exists
11481 set fpathconf d_fpathconf
11484 : see if fpclass exists
11485 set fpclass d_fpclass
11488 : see if fpclassify exists
11489 set fpclassify d_fpclassify
11492 : see if fpclassl exists
11493 set fpclassl d_fpclassl
11497 : check for fpos64_t
11499 echo "Checking to see if you have fpos64_t..." >&4
11502 int main() { fpos64_t x = 7; }
11505 if eval $compile; then
11507 echo "You have fpos64_t."
11510 echo "You do not have fpos64_t."
11511 case "$fpossize" in
11512 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
11519 : see if frexpl exists
11520 set frexpl d_frexpl
11523 : see if this is a sys/param system
11524 set sys/param.h i_sysparam
11527 : see if this is a sys/mount.h system
11528 set sys/mount.h i_sysmount
11533 echo "Checking to see if your system supports struct fs_data..." >&4
11534 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
11536 case "$d_fs_data_s" in
11537 "$define") echo "Yes, it does." ;;
11538 *) echo "No, it doesn't." ;;
11541 : see if fseeko exists
11542 set fseeko d_fseeko
11544 case "$longsize" in
11545 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
11548 : see if fsetpos exists
11549 set fsetpos d_fsetpos
11553 : see if fstatfs exists
11554 set fstatfs d_fstatfs
11558 : see if statvfs exists
11559 set statvfs d_statvfs
11562 : see if fstatvfs exists
11563 set fstatvfs d_fstatvfs
11567 : see if fsync exists
11571 : see if ftello exists
11572 set ftello d_ftello
11574 case "$longsize" in
11575 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
11578 : see if getcwd exists
11579 set getcwd d_getcwd
11582 : see if getespwnam exists
11583 set getespwnam d_getespwnam
11587 : see if getfsstat exists
11588 set getfsstat d_getfsstat
11591 : see if getgrent exists
11592 set getgrent d_getgrent
11595 : see if getgrent_r exists
11596 set getgrent_r d_getgrent_r
11598 case "$d_getgrent_r" in
11600 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11601 case "$d_getgrent_r_proto:$usethreads" in
11602 ":define") d_getgrent_r_proto=define
11603 set d_getgrent_r_proto getgrent_r $hdrs
11607 case "$d_getgrent_r_proto" in
11609 case "$getgrent_r_proto" in
11610 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
11611 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBWR ;;
11613 case "$getgrent_r_proto" in
11614 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
11615 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIR ;;
11617 case "$getgrent_r_proto" in
11618 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
11619 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBW ;;
11621 case "$getgrent_r_proto" in
11622 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
11623 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBI ;;
11625 case "$getgrent_r_proto" in
11626 ''|0) try='int getgrent_r(struct group*, char*, int);'
11627 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBI ;;
11629 case "$getgrent_r_proto" in
11630 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
11631 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIH ;;
11633 case "$getgrent_r_proto" in
11634 ''|0) d_getgrent_r=undef
11636 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
11637 * ) case "$getgrent_r_proto" in
11638 REENTRANT_PROTO*) ;;
11639 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
11641 echo "Prototype: $try" ;;
11644 *) case "$usethreads" in
11645 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
11652 *) getgrent_r_proto=0
11656 : see if getgrgid_r exists
11657 set getgrgid_r d_getgrgid_r
11659 case "$d_getgrgid_r" in
11661 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11662 case "$d_getgrgid_r_proto:$usethreads" in
11663 ":define") d_getgrgid_r_proto=define
11664 set d_getgrgid_r_proto getgrgid_r $hdrs
11668 case "$d_getgrgid_r_proto" in
11670 case "$getgrgid_r_proto" in
11671 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
11672 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
11674 case "$getgrgid_r_proto" in
11675 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
11676 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
11678 case "$getgrgid_r_proto" in
11679 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
11680 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
11682 case "$getgrgid_r_proto" in
11683 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
11684 ./protochk "extern $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
11686 case "$getgrgid_r_proto" in
11687 ''|0) d_getgrgid_r=undef
11689 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
11690 * ) case "$getgrgid_r_proto" in
11691 REENTRANT_PROTO*) ;;
11692 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
11694 echo "Prototype: $try" ;;
11697 *) case "$usethreads" in
11698 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
11705 *) getgrgid_r_proto=0
11709 : see if getgrnam_r exists
11710 set getgrnam_r d_getgrnam_r
11712 case "$d_getgrnam_r" in
11714 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11715 case "$d_getgrnam_r_proto:$usethreads" in
11716 ":define") d_getgrnam_r_proto=define
11717 set d_getgrnam_r_proto getgrnam_r $hdrs
11721 case "$d_getgrnam_r_proto" in
11723 case "$getgrnam_r_proto" in
11724 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
11725 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
11727 case "$getgrnam_r_proto" in
11728 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
11729 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
11731 case "$getgrnam_r_proto" in
11732 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
11733 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CBI ;;
11735 case "$getgrnam_r_proto" in
11736 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
11737 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
11739 case "$getgrnam_r_proto" in
11740 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
11741 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
11743 case "$getgrnam_r_proto" in
11744 ''|0) d_getgrnam_r=undef
11746 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
11747 * ) case "$getgrnam_r_proto" in
11748 REENTRANT_PROTO*) ;;
11749 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
11751 echo "Prototype: $try" ;;
11754 *) case "$usethreads" in
11755 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
11762 *) getgrnam_r_proto=0
11766 : see if gethostbyaddr exists
11767 set gethostbyaddr d_gethbyaddr
11770 : see if gethostbyname exists
11771 set gethostbyname d_gethbyname
11774 : see if gethostent exists
11775 set gethostent d_gethent
11778 : see how we will look up host name
11781 if set gethostname val -f d_gethname; eval $csym; $val; then
11782 echo 'gethostname() found.' >&4
11783 d_gethname="$define"
11786 if set uname val -f d_uname; eval $csym; $val; then
11789 uname() was found, but you're running xenix, and older versions of xenix
11790 have a broken uname(). If you don't really know whether your xenix is old
11791 enough to have a broken system call, use the default answer.
11796 "$define") dflt=n;;
11798 rp='Is your uname() broken?'
11801 n*) d_uname="$define"; call=uname;;
11804 echo 'uname() found.' >&4
11811 case "$d_gethname" in
11812 '') d_gethname="$undef";;
11815 '') d_uname="$undef";;
11817 case "$d_uname$d_gethname" in
11822 Every now and then someone has a $call() that lies about the hostname
11823 but can't be fixed for political or economic reasons. If you wish, I can
11824 pretend $call() isn't there and maybe compute hostname at run-time
11825 thanks to the '$phostname' command.
11828 rp="Shall I ignore $call() from now on?"
11831 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
11834 case "$phostname" in
11835 '') aphostname='';;
11836 *) case "$aphostname" in
11838 *) set X $phostname
11842 file=`./loc $file $file $pth`
11843 aphostname=`echo $file $*`
11848 case "$d_uname$d_gethname" in
11851 case "$phostname" in
11853 echo "There will be no way for $package to get your hostname." >&4;;
11855 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
11859 case "$d_phostname" in
11860 '') d_phostname="$undef";;
11863 : see if gethostbyaddr_r exists
11864 set gethostbyaddr_r d_gethostbyaddr_r
11866 case "$d_gethostbyaddr_r" in
11868 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11869 case "$d_gethostbyaddr_r_proto:$usethreads" in
11870 ":define") d_gethostbyaddr_r_proto=define
11871 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
11875 case "$d_gethostbyaddr_r_proto" in
11877 case "$gethostbyaddr_r_proto" in
11878 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
11879 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
11881 case "$gethostbyaddr_r_proto" in
11882 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
11883 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
11885 case "$gethostbyaddr_r_proto" in
11886 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
11887 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
11889 case "$gethostbyaddr_r_proto" in
11890 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
11891 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
11893 case "$gethostbyaddr_r_proto" in
11894 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
11895 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
11897 case "$gethostbyaddr_r_proto" in
11898 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
11899 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
11901 case "$gethostbyaddr_r_proto" in
11902 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
11903 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
11905 case "$gethostbyaddr_r_proto" in
11906 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
11907 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
11909 case "$gethostbyaddr_r_proto" in
11910 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
11911 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
11913 case "$gethostbyaddr_r_proto" in
11914 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
11915 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
11917 case "$gethostbyaddr_r_proto" in
11918 ''|0) d_gethostbyaddr_r=undef
11919 gethostbyaddr_r_proto=0
11920 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
11921 * ) case "$gethostbyaddr_r_proto" in
11922 REENTRANT_PROTO*) ;;
11923 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
11925 echo "Prototype: $try" ;;
11928 *) case "$usethreads" in
11929 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
11931 d_gethostbyaddr_r=undef
11932 gethostbyaddr_r_proto=0
11936 *) gethostbyaddr_r_proto=0
11940 : see if gethostbyname_r exists
11941 set gethostbyname_r d_gethostbyname_r
11943 case "$d_gethostbyname_r" in
11945 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11946 case "$d_gethostbyname_r_proto:$usethreads" in
11947 ":define") d_gethostbyname_r_proto=define
11948 set d_gethostbyname_r_proto gethostbyname_r $hdrs
11952 case "$d_gethostbyname_r_proto" in
11954 case "$gethostbyname_r_proto" in
11955 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
11956 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
11958 case "$gethostbyname_r_proto" in
11959 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
11960 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
11962 case "$gethostbyname_r_proto" in
11963 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
11964 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
11966 case "$gethostbyname_r_proto" in
11967 ''|0) d_gethostbyname_r=undef
11968 gethostbyname_r_proto=0
11969 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
11970 * ) case "$gethostbyname_r_proto" in
11971 REENTRANT_PROTO*) ;;
11972 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
11974 echo "Prototype: $try" ;;
11977 *) case "$usethreads" in
11978 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
11980 d_gethostbyname_r=undef
11981 gethostbyname_r_proto=0
11985 *) gethostbyname_r_proto=0
11989 : see if gethostent_r exists
11990 set gethostent_r d_gethostent_r
11992 case "$d_gethostent_r" in
11994 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11995 case "$d_gethostent_r_proto:$usethreads" in
11996 ":define") d_gethostent_r_proto=define
11997 set d_gethostent_r_proto gethostent_r $hdrs
12001 case "$d_gethostent_r_proto" in
12003 case "$gethostent_r_proto" in
12004 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
12005 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
12007 case "$gethostent_r_proto" in
12008 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
12009 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBIE ;;
12011 case "$gethostent_r_proto" in
12012 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
12013 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBIE ;;
12015 case "$gethostent_r_proto" in
12016 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
12017 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBI ;;
12019 case "$gethostent_r_proto" in
12020 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
12021 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBI ;;
12023 case "$gethostent_r_proto" in
12024 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
12025 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SD ;;
12027 case "$gethostent_r_proto" in
12028 ''|0) d_gethostent_r=undef
12029 gethostent_r_proto=0
12030 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
12031 * ) case "$gethostent_r_proto" in
12032 REENTRANT_PROTO*) ;;
12033 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
12035 echo "Prototype: $try" ;;
12038 *) case "$usethreads" in
12039 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
12041 d_gethostent_r=undef
12042 gethostent_r_proto=0
12046 *) gethostent_r_proto=0
12050 : see if prototypes for various gethostxxx netdb.h functions are available
12052 set d_gethostprotos gethostent $i_netdb netdb.h
12055 : see if getitimer exists
12056 set getitimer d_getitimer
12059 : see if getlogin exists
12060 set getlogin d_getlogin
12063 : see if getlogin_r exists
12064 set getlogin_r d_getlogin_r
12066 case "$d_getlogin_r" in
12068 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
12069 case "$d_getlogin_r_proto:$usethreads" in
12070 ":define") d_getlogin_r_proto=define
12071 set d_getlogin_r_proto getlogin_r $hdrs
12075 case "$d_getlogin_r_proto" in
12077 case "$getlogin_r_proto" in
12078 ''|0) try='int getlogin_r(char*, size_t);'
12079 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BW ;;
12081 case "$getlogin_r_proto" in
12082 ''|0) try='int getlogin_r(char*, int);'
12083 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BI ;;
12085 case "$getlogin_r_proto" in
12086 ''|0) try='char* getlogin_r(char*, size_t);'
12087 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BW ;;
12089 case "$getlogin_r_proto" in
12090 ''|0) try='char* getlogin_r(char*, int);'
12091 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BI ;;
12093 case "$getlogin_r_proto" in
12094 ''|0) d_getlogin_r=undef
12096 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
12097 * ) case "$getlogin_r_proto" in
12098 REENTRANT_PROTO*) ;;
12099 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
12101 echo "Prototype: $try" ;;
12104 *) case "$usethreads" in
12105 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
12112 *) getlogin_r_proto=0
12116 : see if getmnt exists
12117 set getmnt d_getmnt
12120 : see if getmntent exists
12121 set getmntent d_getmntent
12124 : see if getnetbyaddr exists
12125 set getnetbyaddr d_getnbyaddr
12128 : see if getnetbyname exists
12129 set getnetbyname d_getnbyname
12132 : see if getnetent exists
12133 set getnetent d_getnent
12136 : see if getnetbyaddr_r exists
12137 set getnetbyaddr_r d_getnetbyaddr_r
12139 case "$d_getnetbyaddr_r" in
12141 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12142 case "$d_getnetbyaddr_r_proto:$usethreads" in
12143 ":define") d_getnetbyaddr_r_proto=define
12144 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
12148 case "$d_getnetbyaddr_r_proto" in
12150 case "$getnetbyaddr_r_proto" in
12151 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
12152 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
12154 case "$getnetbyaddr_r_proto" in
12155 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
12156 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
12158 case "$getnetbyaddr_r_proto" in
12159 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
12160 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
12162 case "$getnetbyaddr_r_proto" in
12163 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
12164 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
12166 case "$getnetbyaddr_r_proto" in
12167 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
12168 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
12170 case "$getnetbyaddr_r_proto" in
12171 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
12172 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
12174 case "$getnetbyaddr_r_proto" in
12175 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
12176 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
12178 case "$getnetbyaddr_r_proto" in
12179 ''|0) d_getnetbyaddr_r=undef
12180 getnetbyaddr_r_proto=0
12181 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
12182 * ) case "$getnetbyaddr_r_proto" in
12183 REENTRANT_PROTO*) ;;
12184 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
12186 echo "Prototype: $try" ;;
12189 *) case "$usethreads" in
12190 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
12192 d_getnetbyaddr_r=undef
12193 getnetbyaddr_r_proto=0
12197 *) getnetbyaddr_r_proto=0
12201 : see if getnetbyname_r exists
12202 set getnetbyname_r d_getnetbyname_r
12204 case "$d_getnetbyname_r" in
12206 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12207 case "$d_getnetbyname_r_proto:$usethreads" in
12208 ":define") d_getnetbyname_r_proto=define
12209 set d_getnetbyname_r_proto getnetbyname_r $hdrs
12213 case "$d_getnetbyname_r_proto" in
12215 case "$getnetbyname_r_proto" in
12216 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
12217 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
12219 case "$getnetbyname_r_proto" in
12220 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
12221 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
12223 case "$getnetbyname_r_proto" in
12224 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
12225 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
12227 case "$getnetbyname_r_proto" in
12228 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
12229 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
12231 case "$getnetbyname_r_proto" in
12232 ''|0) d_getnetbyname_r=undef
12233 getnetbyname_r_proto=0
12234 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
12235 * ) case "$getnetbyname_r_proto" in
12236 REENTRANT_PROTO*) ;;
12237 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
12239 echo "Prototype: $try" ;;
12242 *) case "$usethreads" in
12243 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
12245 d_getnetbyname_r=undef
12246 getnetbyname_r_proto=0
12250 *) getnetbyname_r_proto=0
12254 : see if getnetent_r exists
12255 set getnetent_r d_getnetent_r
12257 case "$d_getnetent_r" in
12259 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12260 case "$d_getnetent_r_proto:$usethreads" in
12261 ":define") d_getnetent_r_proto=define
12262 set d_getnetent_r_proto getnetent_r $hdrs
12266 case "$d_getnetent_r_proto" in
12268 case "$getnetent_r_proto" in
12269 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
12270 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
12272 case "$getnetent_r_proto" in
12273 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
12274 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBIE ;;
12276 case "$getnetent_r_proto" in
12277 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
12278 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBIE ;;
12280 case "$getnetent_r_proto" in
12281 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
12282 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBI ;;
12284 case "$getnetent_r_proto" in
12285 ''|0) try='int getnetent_r(struct netent*, char*, int);'
12286 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBI ;;
12288 case "$getnetent_r_proto" in
12289 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
12290 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SD ;;
12292 case "$getnetent_r_proto" in
12293 ''|0) d_getnetent_r=undef
12294 getnetent_r_proto=0
12295 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
12296 * ) case "$getnetent_r_proto" in
12297 REENTRANT_PROTO*) ;;
12298 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
12300 echo "Prototype: $try" ;;
12303 *) case "$usethreads" in
12304 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
12306 d_getnetent_r=undef
12307 getnetent_r_proto=0
12311 *) getnetent_r_proto=0
12315 : see if prototypes for various getnetxxx netdb.h functions are available
12317 set d_getnetprotos getnetent $i_netdb netdb.h
12320 : see if getpagesize exists
12321 set getpagesize d_getpagsz
12325 : see if getprotobyname exists
12326 set getprotobyname d_getpbyname
12329 : see if getprotobynumber exists
12330 set getprotobynumber d_getpbynumber
12333 : see if getprotoent exists
12334 set getprotoent d_getpent
12337 : see if getpgid exists
12338 set getpgid d_getpgid
12341 : see if getpgrp2 exists
12342 set getpgrp2 d_getpgrp2
12345 : see if getppid exists
12346 set getppid d_getppid
12349 : see if getpriority exists
12350 set getpriority d_getprior
12353 : see if getprotobyname_r exists
12354 set getprotobyname_r d_getprotobyname_r
12356 case "$d_getprotobyname_r" in
12358 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12359 case "$d_getprotobyname_r_proto:$usethreads" in
12360 ":define") d_getprotobyname_r_proto=define
12361 set d_getprotobyname_r_proto getprotobyname_r $hdrs
12365 case "$d_getprotobyname_r_proto" in
12367 case "$getprotobyname_r_proto" in
12368 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
12369 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
12371 case "$getprotobyname_r_proto" in
12372 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
12373 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
12375 case "$getprotobyname_r_proto" in
12376 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
12377 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
12379 case "$getprotobyname_r_proto" in
12380 ''|0) d_getprotobyname_r=undef
12381 getprotobyname_r_proto=0
12382 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
12383 * ) case "$getprotobyname_r_proto" in
12384 REENTRANT_PROTO*) ;;
12385 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
12387 echo "Prototype: $try" ;;
12390 *) case "$usethreads" in
12391 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
12393 d_getprotobyname_r=undef
12394 getprotobyname_r_proto=0
12398 *) getprotobyname_r_proto=0
12402 : see if getprotobynumber_r exists
12403 set getprotobynumber_r d_getprotobynumber_r
12405 case "$d_getprotobynumber_r" in
12407 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12408 case "$d_getprotobynumber_r_proto:$usethreads" in
12409 ":define") d_getprotobynumber_r_proto=define
12410 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
12414 case "$d_getprotobynumber_r_proto" in
12416 case "$getprotobynumber_r_proto" in
12417 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
12418 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
12420 case "$getprotobynumber_r_proto" in
12421 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
12422 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
12424 case "$getprotobynumber_r_proto" in
12425 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
12426 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
12428 case "$getprotobynumber_r_proto" in
12429 ''|0) d_getprotobynumber_r=undef
12430 getprotobynumber_r_proto=0
12431 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
12432 * ) case "$getprotobynumber_r_proto" in
12433 REENTRANT_PROTO*) ;;
12434 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
12436 echo "Prototype: $try" ;;
12439 *) case "$usethreads" in
12440 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
12442 d_getprotobynumber_r=undef
12443 getprotobynumber_r_proto=0
12447 *) getprotobynumber_r_proto=0
12451 : see if getprotoent_r exists
12452 set getprotoent_r d_getprotoent_r
12454 case "$d_getprotoent_r" in
12456 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12457 case "$d_getprotoent_r_proto:$usethreads" in
12458 ":define") d_getprotoent_r_proto=define
12459 set d_getprotoent_r_proto getprotoent_r $hdrs
12463 case "$d_getprotoent_r_proto" in
12465 case "$getprotoent_r_proto" in
12466 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
12467 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
12469 case "$getprotoent_r_proto" in
12470 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
12471 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBI ;;
12473 case "$getprotoent_r_proto" in
12474 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
12475 ./protochk "extern $try" $hdrs && getprotoent_r_proto=S_SBI ;;
12477 case "$getprotoent_r_proto" in
12478 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
12479 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SD ;;
12481 case "$getprotoent_r_proto" in
12482 ''|0) d_getprotoent_r=undef
12483 getprotoent_r_proto=0
12484 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
12485 * ) case "$getprotoent_r_proto" in
12486 REENTRANT_PROTO*) ;;
12487 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
12489 echo "Prototype: $try" ;;
12492 *) case "$usethreads" in
12493 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
12495 d_getprotoent_r=undef
12496 getprotoent_r_proto=0
12500 *) getprotoent_r_proto=0
12504 : see if prototypes for various getprotoxxx netdb.h functions are available
12506 set d_getprotoprotos getprotoent $i_netdb netdb.h
12509 : see if getprpwnam exists
12510 set getprpwnam d_getprpwnam
12513 : see if getpwent exists
12514 set getpwent d_getpwent
12517 : see if getpwent_r exists
12518 set getpwent_r d_getpwent_r
12520 case "$d_getpwent_r" in
12522 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12523 case "$d_getpwent_r_proto:$usethreads" in
12524 ":define") d_getpwent_r_proto=define
12525 set d_getpwent_r_proto getpwent_r $hdrs
12529 case "$d_getpwent_r_proto" in
12531 case "$getpwent_r_proto" in
12532 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
12533 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBWR ;;
12535 case "$getpwent_r_proto" in
12536 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
12537 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIR ;;
12539 case "$getpwent_r_proto" in
12540 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
12541 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBW ;;
12543 case "$getpwent_r_proto" in
12544 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
12545 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBI ;;
12547 case "$getpwent_r_proto" in
12548 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
12549 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBI ;;
12551 case "$getpwent_r_proto" in
12552 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
12553 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIH ;;
12555 case "$getpwent_r_proto" in
12556 ''|0) d_getpwent_r=undef
12558 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
12559 * ) case "$getpwent_r_proto" in
12560 REENTRANT_PROTO*) ;;
12561 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
12563 echo "Prototype: $try" ;;
12566 *) case "$usethreads" in
12567 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
12574 *) getpwent_r_proto=0
12578 : see if getpwnam_r exists
12579 set getpwnam_r d_getpwnam_r
12581 case "$d_getpwnam_r" in
12583 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12584 case "$d_getpwnam_r_proto:$usethreads" in
12585 ":define") d_getpwnam_r_proto=define
12586 set d_getpwnam_r_proto getpwnam_r $hdrs
12590 case "$d_getpwnam_r_proto" in
12592 case "$getpwnam_r_proto" in
12593 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
12594 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
12596 case "$getpwnam_r_proto" in
12597 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
12598 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
12600 case "$getpwnam_r_proto" in
12601 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
12602 ./protochk "extern $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
12604 case "$getpwnam_r_proto" in
12605 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
12606 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
12608 case "$getpwnam_r_proto" in
12609 ''|0) d_getpwnam_r=undef
12611 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
12612 * ) case "$getpwnam_r_proto" in
12613 REENTRANT_PROTO*) ;;
12614 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
12616 echo "Prototype: $try" ;;
12619 *) case "$usethreads" in
12620 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
12627 *) getpwnam_r_proto=0
12631 : see if getpwuid_r exists
12632 set getpwuid_r d_getpwuid_r
12634 case "$d_getpwuid_r" in
12636 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12637 case "$d_getpwuid_r_proto:$usethreads" in
12638 ":define") d_getpwuid_r_proto=define
12639 set d_getpwuid_r_proto getpwuid_r $hdrs
12643 case "$d_getpwuid_r_proto" in
12645 case "$getpwuid_r_proto" in
12646 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
12647 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
12649 case "$getpwuid_r_proto" in
12650 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
12651 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
12653 case "$getpwuid_r_proto" in
12654 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
12655 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
12657 case "$getpwuid_r_proto" in
12658 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
12659 ./protochk "extern $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
12661 case "$getpwuid_r_proto" in
12662 ''|0) d_getpwuid_r=undef
12664 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
12665 * ) case "$getpwuid_r_proto" in
12666 REENTRANT_PROTO*) ;;
12667 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
12669 echo "Prototype: $try" ;;
12672 *) case "$usethreads" in
12673 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
12680 *) getpwuid_r_proto=0
12685 : see if getservbyname exists
12686 set getservbyname d_getsbyname
12689 : see if getservbyport exists
12690 set getservbyport d_getsbyport
12693 : see if getservent exists
12694 set getservent d_getsent
12697 : see if getservbyname_r exists
12698 set getservbyname_r d_getservbyname_r
12700 case "$d_getservbyname_r" in
12702 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12703 case "$d_getservbyname_r_proto:$usethreads" in
12704 ":define") d_getservbyname_r_proto=define
12705 set d_getservbyname_r_proto getservbyname_r $hdrs
12709 case "$d_getservbyname_r_proto" in
12711 case "$getservbyname_r_proto" in
12712 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
12713 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
12715 case "$getservbyname_r_proto" in
12716 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
12717 ./protochk "extern $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
12719 case "$getservbyname_r_proto" in
12720 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
12721 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
12723 case "$getservbyname_r_proto" in
12724 ''|0) d_getservbyname_r=undef
12725 getservbyname_r_proto=0
12726 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
12727 * ) case "$getservbyname_r_proto" in
12728 REENTRANT_PROTO*) ;;
12729 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
12731 echo "Prototype: $try" ;;
12734 *) case "$usethreads" in
12735 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
12737 d_getservbyname_r=undef
12738 getservbyname_r_proto=0
12742 *) getservbyname_r_proto=0
12746 : see if getservbyport_r exists
12747 set getservbyport_r d_getservbyport_r
12749 case "$d_getservbyport_r" in
12751 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12752 case "$d_getservbyport_r_proto:$usethreads" in
12753 ":define") d_getservbyport_r_proto=define
12754 set d_getservbyport_r_proto getservbyport_r $hdrs
12758 case "$d_getservbyport_r_proto" in
12760 case "$getservbyport_r_proto" in
12761 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
12762 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
12764 case "$getservbyport_r_proto" in
12765 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
12766 ./protochk "extern $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
12768 case "$getservbyport_r_proto" in
12769 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
12770 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
12772 case "$getservbyport_r_proto" in
12773 ''|0) d_getservbyport_r=undef
12774 getservbyport_r_proto=0
12775 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
12776 * ) case "$getservbyport_r_proto" in
12777 REENTRANT_PROTO*) ;;
12778 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
12780 echo "Prototype: $try" ;;
12783 *) case "$usethreads" in
12784 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
12786 d_getservbyport_r=undef
12787 getservbyport_r_proto=0
12791 *) getservbyport_r_proto=0
12795 : see if getservent_r exists
12796 set getservent_r d_getservent_r
12798 case "$d_getservent_r" in
12800 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12801 case "$d_getservent_r_proto:$usethreads" in
12802 ":define") d_getservent_r_proto=define
12803 set d_getservent_r_proto getservent_r $hdrs
12807 case "$d_getservent_r_proto" in
12809 case "$getservent_r_proto" in
12810 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
12811 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBWR ;;
12813 case "$getservent_r_proto" in
12814 ''|0) try='int getservent_r(struct servent*, char*, int);'
12815 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBI ;;
12817 case "$getservent_r_proto" in
12818 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
12819 ./protochk "extern $try" $hdrs && getservent_r_proto=S_SBI ;;
12821 case "$getservent_r_proto" in
12822 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
12823 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SD ;;
12825 case "$getservent_r_proto" in
12826 ''|0) d_getservent_r=undef
12827 getservent_r_proto=0
12828 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
12829 * ) case "$getservent_r_proto" in
12830 REENTRANT_PROTO*) ;;
12831 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
12833 echo "Prototype: $try" ;;
12836 *) case "$usethreads" in
12837 define) echo "getservent_r has no prototype, not using it." >&4 ;;
12839 d_getservent_r=undef
12840 getservent_r_proto=0
12844 *) getservent_r_proto=0
12848 : see if prototypes for various getservxxx netdb.h functions are available
12850 set d_getservprotos getservent $i_netdb netdb.h
12853 : see if getspnam exists
12854 set getspnam d_getspnam
12857 : see if this is a shadow.h system
12858 set shadow.h i_shadow
12861 : see if getspnam_r exists
12862 set getspnam_r d_getspnam_r
12864 case "$d_getspnam_r" in
12866 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
12867 case "$d_getspnam_r_proto:$usethreads" in
12868 ":define") d_getspnam_r_proto=define
12869 set d_getspnam_r_proto getspnam_r $hdrs
12873 case "$d_getspnam_r_proto" in
12875 case "$getspnam_r_proto" in
12876 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
12877 ./protochk "extern $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
12879 case "$getspnam_r_proto" in
12880 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
12881 ./protochk "extern $try" $hdrs && getspnam_r_proto=S_CSBI ;;
12883 case "$getspnam_r_proto" in
12884 ''|0) d_getspnam_r=undef
12886 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
12887 * ) case "$getspnam_r_proto" in
12888 REENTRANT_PROTO*) ;;
12889 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
12891 echo "Prototype: $try" ;;
12894 *) case "$usethreads" in
12895 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
12902 *) getspnam_r_proto=0
12906 : see if gettimeofday or ftime exists
12907 set gettimeofday d_gettimeod
12909 case "$d_gettimeod" in
12915 val="$undef"; set d_ftime; eval $setvar
12918 case "$d_gettimeod$d_ftime" in
12921 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
12925 : see if gmtime_r exists
12926 set gmtime_r d_gmtime_r
12928 case "$d_gmtime_r" in
12930 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
12931 case "$d_gmtime_r_proto:$usethreads" in
12932 ":define") d_gmtime_r_proto=define
12933 set d_gmtime_r_proto gmtime_r $hdrs
12937 case "$d_gmtime_r_proto" in
12939 case "$gmtime_r_proto" in
12940 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
12941 ./protochk "extern $try" $hdrs && gmtime_r_proto=S_TS ;;
12943 case "$gmtime_r_proto" in
12944 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
12945 ./protochk "extern $try" $hdrs && gmtime_r_proto=I_TS ;;
12947 case "$gmtime_r_proto" in
12948 ''|0) d_gmtime_r=undef
12950 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
12951 * ) case "$gmtime_r_proto" in
12952 REENTRANT_PROTO*) ;;
12953 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
12955 echo "Prototype: $try" ;;
12958 *) case "$usethreads" in
12959 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
12966 *) gmtime_r_proto=0
12970 : see if hasmntopt exists
12971 set hasmntopt d_hasmntopt
12974 : see if this is a netinet/in.h or sys/in.h system
12975 set netinet/in.h i_niin sys/in.h i_sysin
12978 : see if arpa/inet.h has to be included
12979 set arpa/inet.h i_arpainet
12982 : see if htonl --and friends-- exists
12987 : Maybe they are macros.
12990 $cat >htonl.c <<EOM
12992 #include <sys/types.h>
12993 #$i_niin I_NETINET_IN
12995 #$i_arpainet I_ARPA_INET
12996 #ifdef I_NETINET_IN
12997 #include <netinet/in.h>
13000 #include <sys/in.h>
13003 #include <arpa/inet.h>
13006 printf("Defined as a macro.");
13009 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
13010 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
13012 echo "But it seems to be defined as a macro." >&4
13022 if set index val -f; eval $csym; $val; then
13023 if set strchr val -f d_strchr; eval $csym; $val; then
13024 if $contains strchr "$strings" >/dev/null 2>&1 ; then
13027 echo "strchr() found." >&4
13031 echo "index() found." >&4
13036 echo "index() found." >&4
13039 if set strchr val -f d_strchr; eval $csym; $val; then
13042 echo "strchr() found." >&4
13044 echo "No index() or strchr() found!" >&4
13049 set d_strchr; eval $setvar
13051 set d_index; eval $setvar
13053 : check whether inet_aton exists
13054 set inet_aton d_inetaton
13059 $cat >isascii.c <<'EOCP'
13071 if eval $compile; then
13072 echo "isascii() found." >&4
13075 echo "isascii() NOT found." >&4
13082 : see if isfinite exists
13083 set isfinite d_isfinite
13086 : see if isinf exists
13090 : see if isnan exists
13094 : see if isnanl exists
13095 set isnanl d_isnanl
13098 : see if killpg exists
13099 set killpg d_killpg
13102 : see if lchown exists
13104 $cat > try.c <<'EOCP'
13105 /* System header to define __stub macros and hopefully few prototypes,
13106 which can conflict with char lchown(); below. */
13107 #include <assert.h>
13108 /* Override any gcc2 internal prototype to avoid an error. */
13109 /* We use char because int might match the return type of a gcc2
13110 builtin and then its argument prototype would still apply. */
13113 /* The GNU C library defines this for functions which it implements
13114 to always fail with ENOSYS. Some functions are actually named
13115 something starting with __ and the normal name is an alias. */
13116 #if defined (__stub_lchown) || defined (__stub___lchown)
13124 if eval $compile; then
13125 $echo "lchown() found." >&4
13128 $echo "lchown() NOT found." >&4
13134 : See if number of significant digits in a double precision number is known
13136 $cat >ldbl_dig.c <<EOM
13137 #$i_limits I_LIMITS
13140 #include <limits.h>
13146 printf("Contains LDBL_DIG");
13149 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
13150 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
13151 echo "LDBL_DIG found." >&4
13154 echo "LDBL_DIG NOT found." >&4
13161 : see if link exists
13165 : see if localtime_r exists
13166 set localtime_r d_localtime_r
13168 case "$d_localtime_r" in
13170 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
13171 case "$d_localtime_r_proto:$usethreads" in
13172 ":define") d_localtime_r_proto=define
13173 set d_localtime_r_proto localtime_r $hdrs
13177 case "$d_localtime_r_proto" in
13179 case "$localtime_r_proto" in
13180 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
13181 ./protochk "extern $try" $hdrs && localtime_r_proto=S_TS ;;
13183 case "$localtime_r_proto" in
13184 ''|0) try='int localtime_r(const time_t*, struct tm*);'
13185 ./protochk "extern $try" $hdrs && localtime_r_proto=I_TS ;;
13187 case "$localtime_r_proto" in
13188 ''|0) d_localtime_r=undef
13189 localtime_r_proto=0
13190 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
13191 * ) case "$localtime_r_proto" in
13192 REENTRANT_PROTO*) ;;
13193 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
13195 echo "Prototype: $try" ;;
13198 *) case "$usethreads" in
13199 define) echo "localtime_r has no prototype, not using it." >&4 ;;
13201 d_localtime_r=undef
13202 localtime_r_proto=0
13206 *) localtime_r_proto=0
13210 : see if localeconv exists
13211 set localeconv d_locconv
13214 : see if lockf exists
13218 : see if prototype for lseek is available
13220 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
13223 : see if lstat exists
13227 : see if madvise exists
13228 set madvise d_madvise
13231 : see if mblen exists
13235 : see if mbstowcs exists
13236 set mbstowcs d_mbstowcs
13239 : see if mbtowc exists
13240 set mbtowc d_mbtowc
13243 : see if memchr exists
13244 set memchr d_memchr
13247 : see if memcmp exists
13248 set memcmp d_memcmp
13251 : see if memcpy exists
13252 set memcpy d_memcpy
13255 : see if memmove exists
13256 set memmove d_memmove
13259 : see if memset exists
13260 set memset d_memset
13263 : see if mkdir exists
13267 : see if mkdtemp exists
13268 set mkdtemp d_mkdtemp
13271 : see if mkfifo exists
13272 set mkfifo d_mkfifo
13275 : see if mkstemp exists
13276 set mkstemp d_mkstemp
13279 : see if mkstemps exists
13280 set mkstemps d_mkstemps
13283 : see if mktime exists
13284 set mktime d_mktime
13287 : see if this is a sys/mman.h system
13288 set sys/mman.h i_sysmman
13291 : see if mmap exists
13294 : see what shmat returns
13295 : default to something harmless
13297 case "$i_sysmman$d_mmap" in
13299 $cat >mmap.c <<'END'
13300 #include <sys/mman.h>
13303 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
13308 echo "and it returns ($mmaptype)." >&4
13314 : see if mprotect exists
13315 set mprotect d_mprotect
13318 : see if msgctl exists
13319 set msgctl d_msgctl
13322 : see if msgget exists
13323 set msgget d_msgget
13326 : see if msgsnd exists
13327 set msgsnd d_msgsnd
13330 : see if msgrcv exists
13331 set msgrcv d_msgrcv
13334 : see how much of the 'msg*(2)' library is present.
13337 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
13338 *"$undef"*) h_msg=false;;
13342 case "`ipcs 2>&1`" in
13343 "SVID messages"*"not configured"*)
13344 echo "Your $osname does not have the msg*(2) configured." >&4
13347 set msgctl d_msgctl
13349 set msgget d_msgget
13351 set msgsnd d_msgsnd
13353 set msgrcv d_msgrcv
13359 : we could also check for sys/ipc.h ...
13360 if $h_msg && $test `./findhdr sys/msg.h`; then
13361 echo "You have the full msg*(2) library." >&4
13364 echo "You don't have the full msg*(2) library." >&4
13372 echo "Checking to see if your system supports struct msghdr..." >&4
13373 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
13375 case "$d_msghdr_s" in
13376 "$define") echo "Yes, it does." ;;
13377 *) echo "No, it doesn't." ;;
13381 : see if msync exists
13385 : see if munmap exists
13386 set munmap d_munmap
13389 : see if nanosleep exists
13390 set nanosleep d_nanosleep
13393 : see if nice exists
13397 : see if this is a langinfo.h system
13398 set langinfo.h i_langinfo
13401 : see if nl_langinfo exists
13402 set nl_langinfo d_nl_langinfo
13405 : check for length of character
13407 case "$charsize" in
13409 echo "Checking to see how big your characters are (hey, you never know)..." >&4
13410 $cat >try.c <<'EOCP'
13414 printf("%d\n", (int)sizeof(char));
13419 if eval $compile_ok; then
13423 echo "(I can't seem to compile the test program. Guessing...)"
13430 rp="What is the size of a character (in bytes)?"
13435 : check for volatile keyword
13437 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
13438 $cat >try.c <<'EOCP'
13441 typedef struct _goo_struct goo_struct;
13442 goo_struct * volatile goo = ((goo_struct *)0);
13443 struct _goo_struct {
13448 typedef unsigned short foo_t;
13449 char *volatile foo;
13451 volatile foo_t blech;
13455 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
13457 echo "Yup, it does."
13460 echo "Nope, it doesn't."
13468 $echo "Choosing the C types to be used for Perl's internal types..." >&4
13470 case "$use64bitint:$d_quad:$quadtype" in
13473 uvtype="$uquadtype"
13478 uvtype="unsigned long"
13484 case "$uselongdouble:$d_longdbl" in
13486 nvtype="long double"
13487 nvsize=$longdblsize
13494 $echo "(IV will be "$ivtype", $ivsize bytes)"
13495 $echo "(UV will be "$uvtype", $uvsize bytes)"
13496 $echo "(NV will be "$nvtype", $nvsize bytes)"
13499 #$i_inttypes I_INTTYPES
13501 #include <inttypes.h>
13506 int8_t i = INT8_MAX;
13507 uint8_t u = UINT8_MAX;
13508 printf("int8_t\n");
13511 int16_t i = INT16_MAX;
13512 uint16_t i = UINT16_MAX;
13513 printf("int16_t\n");
13516 int32_t i = INT32_MAX;
13517 uint32_t u = UINT32_MAX;
13518 printf("int32_t\n");
13524 '') case "$charsize" in
13526 u8type="unsigned char"
13535 if eval $compile; then
13536 case "`$run ./try`" in
13537 int8_t) i8type=int8_t
13547 '') if $test $charsize -ge 1; then
13549 u8type="unsigned char"
13557 '') case "$shortsize" in
13559 u16type="unsigned short"
13567 '') set try -DINT16
13568 if eval $compile; then
13569 case "`$run ./try`" in
13581 '') if $test $shortsize -ge 2; then
13583 u16type="unsigned short"
13591 '') case "$longsize" in
13593 u32type="unsigned long"
13597 *) case "$intsize" in
13599 u32type="unsigned int"
13609 '') set try -DINT32
13610 if eval $compile; then
13611 case "`$run ./try`" in
13623 '') if $test $intsize -ge 4; then
13625 u32type="unsigned int"
13633 '') case "$d_quad:$quadtype" in
13635 i64type="$quadtype"
13636 u64type="$uquadtype"
13644 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
13645 : volatile so that the compiler has to store it out to memory.
13646 if test X"$d_volatile" = X"$define"; then
13651 #include <sys/types.h>
13652 #include <signal.h>
13654 $volatile int bletched = 0;
13655 $signal_t blech(s) int s; { bletched = 1; }
13660 int n = 8 * $uvsize;
13663 signal(SIGFPE, blech);
13666 for (i = 0; i < n; i++) {
13667 u = u << 1 | ($uvtype)1;
13669 if (($uvtype)d != u)
13673 d = ($nvtype)(u - 1);
13674 if (($uvtype)d != (u - 1))
13682 printf("%d\n", ((i == n) ? -n : i));
13688 d_nv_preserves_uv="$undef"
13689 if eval $compile; then
13690 nv_preserves_uv_bits="`$run ./try`"
13692 case "$nv_preserves_uv_bits" in
13694 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
13695 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
13696 d_nv_preserves_uv="$define"
13698 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
13699 d_nv_preserves_uv="$undef" ;;
13700 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
13701 nv_preserves_uv_bits="$undef" ;;
13707 : check for off64_t
13709 echo "Checking to see if you have off64_t..." >&4
13711 #include <sys/types.h>
13712 #include <unistd.h>
13713 int main() { off64_t x = 7; }
13716 if eval $compile; then
13718 echo "You have off64_t."
13721 echo "You do not have off64_t."
13722 case "$lseeksize" in
13723 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
13730 : how to create joinable pthreads
13731 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
13733 echo "Checking what constant to use for creating joinable pthreads..." >&4
13734 $cat >try.c <<'EOCP'
13735 #include <pthread.h>
13737 int detachstate = JOINABLE;
13740 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
13741 if eval $compile; then
13742 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
13743 val="$undef" # Yes, undef.
13744 set d_old_pthread_create_joinable
13747 set old_pthread_create_joinable
13750 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
13751 if eval $compile; then
13752 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
13754 set d_old_pthread_create_joinable
13756 val=PTHREAD_CREATE_UNDETACHED
13757 set old_pthread_create_joinable
13760 set try -DJOINABLE=__UNDETACHED
13761 if eval $compile; then
13762 echo "You seem to use __UNDETACHED." >&4
13764 set d_old_pthread_create_joinable
13767 set old_pthread_create_joinable
13770 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
13772 set d_old_pthread_create_joinable
13775 set old_pthread_create_joinable
13782 d_old_pthread_create_joinable="$undef"
13783 old_pthread_create_joinable=""
13786 : see if pause exists
13790 : see if pipe exists
13794 : see if poll exists
13798 : see if readlink exists
13799 set readlink d_readlink
13805 case "$d_readlink" in
13807 if $issymlink /proc/self/exe ; then
13808 $ls -l /proc/self/exe > reflect
13809 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13810 echo "You have Linux-like /proc/self/exe."
13811 procselfexe='"/proc/self/exe"'
13815 if $issymlink /proc/curproc/file ; then
13816 $ls -l /proc/curproc/file > reflect
13817 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13818 echo "You have BSD-like /proc/curproc/file."
13819 procselfexe='"/proc/curproc/file"'
13829 : see whether the pthread_atfork exists
13831 #include <pthread.h>
13834 #ifdef PTHREAD_ATFORK
13835 pthread_atfork(NULL,NULL,NULL);
13840 : see if pthread_atfork exists
13841 set try -DPTHREAD_ATFORK
13842 if eval $compile; then
13847 case "$usethreads" in
13850 $define) echo 'pthread_atfork found.' >&4 ;;
13851 *) echo 'pthread_atfork NOT found.' >&4 ;;
13854 set d_pthread_atfork
13858 : see whether the various POSIXish _yields exist
13860 #include <pthread.h>
13866 #ifdef PTHREAD_YIELD
13869 #ifdef PTHREAD_YIELD_NULL
13870 pthread_yield(NULL);
13876 : see if sched_yield exists
13877 set try -DSCHED_YIELD
13878 if eval $compile; then
13880 sched_yield='sched_yield()'
13884 case "$usethreads" in
13887 $define) echo 'sched_yield() found.' >&4 ;;
13888 *) echo 'sched_yield() NOT found.' >&4 ;;
13894 : see if pthread_yield exists
13895 set try -DPTHREAD_YIELD
13896 if eval $compile; then
13898 case "$sched_yield" in
13899 '') sched_yield='pthread_yield()' ;;
13902 set try -DPTHREAD_YIELD_NULL
13903 if eval $compile; then
13905 case "$sched_yield" in
13906 '') sched_yield='pthread_yield(NULL)' ;;
13912 case "$usethreads" in
13915 $define) echo 'pthread_yield() found.' >&4 ;;
13916 *) echo 'pthread_yield() NOT found.' >&4 ;;
13920 set d_pthread_yield
13923 case "$sched_yield" in
13924 '') sched_yield=undef ;;
13929 : see if random_r exists
13930 set random_r d_random_r
13932 case "$d_random_r" in
13934 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
13935 case "$d_random_r_proto:$usethreads" in
13936 ":define") d_random_r_proto=define
13937 set d_random_r_proto random_r $hdrs
13941 case "$d_random_r_proto" in
13943 case "$random_r_proto" in
13944 ''|0) try='int random_r(int*, struct random_data*);'
13945 ./protochk "extern $try" $hdrs && random_r_proto=I_TS ;;
13947 case "$random_r_proto" in
13948 ''|0) d_random_r=undef
13950 echo "Disabling random_r, cannot determine prototype." >&4 ;;
13951 * ) case "$random_r_proto" in
13952 REENTRANT_PROTO*) ;;
13953 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
13955 echo "Prototype: $try" ;;
13958 *) case "$usethreads" in
13959 define) echo "random_r has no prototype, not using it." >&4 ;;
13966 *) random_r_proto=0
13970 : see if readdir and friends exist
13971 set readdir d_readdir
13973 set seekdir d_seekdir
13975 set telldir d_telldir
13977 set rewinddir d_rewinddir
13980 : see if readdir64_r exists
13981 set readdir64_r d_readdir64_r
13983 case "$d_readdir64_r" in
13985 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
13986 case "$d_readdir64_r_proto:$usethreads" in
13987 ":define") d_readdir64_r_proto=define
13988 set d_readdir64_r_proto readdir64_r $hdrs
13992 case "$d_readdir64_r_proto" in
13994 case "$readdir64_r_proto" in
13995 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
13996 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TSR ;;
13998 case "$readdir64_r_proto" in
13999 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
14000 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TS ;;
14002 case "$readdir64_r_proto" in
14003 ''|0) d_readdir64_r=undef
14004 readdir64_r_proto=0
14005 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
14006 * ) case "$readdir64_r_proto" in
14007 REENTRANT_PROTO*) ;;
14008 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
14010 echo "Prototype: $try" ;;
14013 *) case "$usethreads" in
14014 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
14016 d_readdir64_r=undef
14017 readdir64_r_proto=0
14021 *) readdir64_r_proto=0
14025 : see if readdir_r exists
14026 set readdir_r d_readdir_r
14028 case "$d_readdir_r" in
14030 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
14031 case "$d_readdir_r_proto:$usethreads" in
14032 ":define") d_readdir_r_proto=define
14033 set d_readdir_r_proto readdir_r $hdrs
14037 case "$d_readdir_r_proto" in
14039 case "$readdir_r_proto" in
14040 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
14041 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TSR ;;
14043 case "$readdir_r_proto" in
14044 ''|0) try='int readdir_r(DIR*, struct dirent*);'
14045 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TS ;;
14047 case "$readdir_r_proto" in
14048 ''|0) d_readdir_r=undef
14050 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
14051 * ) case "$readdir_r_proto" in
14052 REENTRANT_PROTO*) ;;
14053 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
14055 echo "Prototype: $try" ;;
14058 *) case "$usethreads" in
14059 define) echo "readdir_r has no prototype, not using it." >&4 ;;
14066 *) readdir_r_proto=0
14070 : see if readv exists
14074 : see if recvmsg exists
14075 set recvmsg d_recvmsg
14078 : see if rename exists
14079 set rename d_rename
14082 : see if rmdir exists
14086 : see if memory.h is available.
14091 : See if it conflicts with string.h
14097 $cppstdin $cppflags $cppminus < $strings > mem.h
14098 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
14100 echo "We won't be including <memory.h>."
14110 : can bcopy handle overlapping blocks?
14113 case "$d_memmove" in
14114 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
14115 *) case "$d_bcopy" in
14117 echo "Checking to see if bcopy() can do overlapping copies..." >&4
14119 #$i_memory I_MEMORY
14120 #$i_stdlib I_STDLIB
14121 #$i_string I_STRING
14122 #$i_unistd I_UNISTD
14124 $cat >>try.c <<'EOCP'
14127 # include <memory.h>
14130 # include <stdlib.h>
14133 # include <string.h>
14135 # include <strings.h>
14138 # include <unistd.h> /* Needed for NetBSD */
14142 char buf[128], abc[128];
14148 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14149 try to store the string in read-only memory. */
14150 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
14152 for (align = 7; align >= 0; align--) {
14153 for (len = 36; len; len--) {
14155 bcopy(abc, b, len);
14156 for (off = 1; off <= len; off++) {
14157 bcopy(b, b+off, len);
14158 bcopy(b+off, b, len);
14159 if (bcmp(b, abc, len))
14168 if eval $compile_ok; then
14169 if ./try 2>/dev/null; then
14170 echo "Yes, it can."
14173 echo "It can't, sorry."
14176 echo "(I can't compile the test program, so we'll assume not...)"
14180 $rm -f try.* try core
14186 : can memcpy handle overlapping blocks?
14189 case "$d_memmove" in
14190 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
14191 *) case "$d_memcpy" in
14193 echo "Checking to see if memcpy() can do overlapping copies..." >&4
14195 #$i_memory I_MEMORY
14196 #$i_stdlib I_STDLIB
14197 #$i_string I_STRING
14198 #$i_unistd I_UNISTD
14200 $cat >>try.c <<'EOCP'
14203 # include <memory.h>
14206 # include <stdlib.h>
14209 # include <string.h>
14211 # include <strings.h>
14214 # include <unistd.h> /* Needed for NetBSD */
14218 char buf[128], abc[128];
14224 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14225 try to store the string in read-only memory. */
14226 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
14228 for (align = 7; align >= 0; align--) {
14229 for (len = 36; len; len--) {
14231 memcpy(b, abc, len);
14232 for (off = 1; off <= len; off++) {
14233 memcpy(b+off, b, len);
14234 memcpy(b, b+off, len);
14235 if (memcmp(b, abc, len))
14244 if eval $compile_ok; then
14245 if ./try 2>/dev/null; then
14246 echo "Yes, it can."
14249 echo "It can't, sorry."
14252 echo "(I can't compile the test program, so we'll assume not...)"
14256 $rm -f try.* try core
14262 : can memcmp be trusted to compare relative magnitude?
14264 case "$d_memcmp" in
14267 echo "Checking if your memcmp() can compare relative magnitude..." >&4
14269 #$i_memory I_MEMORY
14270 #$i_stdlib I_STDLIB
14271 #$i_string I_STRING
14272 #$i_unistd I_UNISTD
14274 $cat >>try.c <<'EOCP'
14277 # include <memory.h>
14280 # include <stdlib.h>
14283 # include <string.h>
14285 # include <strings.h>
14288 # include <unistd.h> /* Needed for NetBSD */
14294 if ((a < b) && memcmp(&a, &b, 1) < 0)
14300 if eval $compile_ok; then
14301 if $run ./try 2>/dev/null; then
14302 echo "Yes, it can."
14305 echo "No, it can't (it uses signed chars)."
14308 echo "(I can't compile the test program, so we'll assume not...)"
14312 $rm -f try.* try core
14316 : see if prototype for sbrk is available
14318 set d_sbrkproto sbrk $i_unistd unistd.h
14321 : see if select exists
14322 set select d_select
14325 : see if semctl exists
14326 set semctl d_semctl
14329 : see if semget exists
14330 set semget d_semget
14333 : see if semop exists
14337 : see how much of the 'sem*(2)' library is present.
14340 case "$d_semctl$d_semget$d_semop" in
14341 *"$undef"*) h_sem=false;;
14345 case "`ipcs 2>&1`" in
14346 "SVID messages"*"not configured"*)
14347 echo "Your $osname does not have the sem*(2) configured." >&4
14350 set semctl d_semctl
14352 set semget d_semget
14360 : we could also check for sys/ipc.h ...
14361 if $h_sem && $test `./findhdr sys/sem.h`; then
14362 echo "You have the full sem*(2) library." >&4
14365 echo "You don't have the full sem*(2) library." >&4
14371 : see whether sys/sem.h defines union semun
14373 $cat > try.c <<'END'
14374 #include <sys/types.h>
14375 #include <sys/ipc.h>
14376 #include <sys/sem.h>
14377 int main () { union semun semun; semun.buf = 0; }
14380 if eval $compile; then
14381 echo "You have union semun in <sys/sem.h>." >&4
14384 echo "You do not have union semun in <sys/sem.h>." >&4
14387 $rm -f try try.c try.h
14391 : see how to do semctl IPC_STAT
14394 : see whether semctl IPC_STAT can use union semun
14399 # define S_IRUSR S_IREAD
14400 # define S_IWUSR S_IWRITE
14401 # define S_IXUSR S_IEXEC
14403 # define S_IRUSR 0400
14404 # define S_IWUSR 0200
14405 # define S_IXUSR 0100
14407 # define S_IRGRP (S_IRUSR>>3)
14408 # define S_IWGRP (S_IWUSR>>3)
14409 # define S_IXGRP (S_IXUSR>>3)
14410 # define S_IROTH (S_IRUSR>>6)
14411 # define S_IWOTH (S_IWUSR>>6)
14412 # define S_IXOTH (S_IXUSR>>6)
14415 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
14416 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
14417 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
14422 #include <sys/types.h>
14423 #include <sys/ipc.h>
14424 #include <sys/sem.h>
14425 #include <sys/stat.h>
14432 #$d_union_semun HAS_UNION_SEMUN
14435 #ifndef HAS_UNION_SEMUN
14438 struct semid_ds *buf;
14439 unsigned short *array;
14445 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14446 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14448 struct semid_ds argbuf;
14451 st = semctl(sem, 0, IPC_STAT, arg);
14455 # endif /* IPC_STAT */
14456 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14458 if (semctl(sem, 0, IPC_RMID, arg) != 0)
14459 # endif /* IPC_RMID */
14460 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14462 #endif /* IPC_PRIVATE && ... */
14463 printf("semget failed: errno = %d\n", errno);
14469 if eval $compile; then
14472 semun) val="$define" ;;
14478 case "$d_semctl_semun" in
14480 echo "You can use union semun for semctl IPC_STAT." >&4
14483 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
14488 : see whether semctl IPC_STAT can use struct semid_ds pointer
14489 $cat > try.c <<'END'
14490 #include <sys/types.h>
14491 #include <sys/ipc.h>
14492 #include <sys/sem.h>
14493 #include <sys/stat.h>
14501 struct semid_ds arg;
14504 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14505 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14508 st = semctl(sem, 0, IPC_STAT, &arg);
14510 printf("semid_ds\n");
14512 # endif /* IPC_STAT */
14513 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14515 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
14516 # endif /* IPC_RMID */
14517 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14519 #endif /* IPC_PRIVATE && ... */
14520 printf("semget failed: errno = %d\n", errno);
14527 if eval $compile; then
14530 semid_ds) val="$define" ;;
14534 set d_semctl_semid_ds
14536 case "$d_semctl_semid_ds" in
14538 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
14540 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
14547 # We do not have the full sem*(2) library, so assume we can not
14553 set d_semctl_semid_ds
14558 : see if sendmsg exists
14559 set sendmsg d_sendmsg
14562 : see if setegid exists
14563 set setegid d_setegid
14566 : see if seteuid exists
14567 set seteuid d_seteuid
14570 : see if setgrent exists
14571 set setgrent d_setgrent
14574 : see if setgrent_r exists
14575 set setgrent_r d_setgrent_r
14577 case "$d_setgrent_r" in
14579 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14580 case "$d_setgrent_r_proto:$usethreads" in
14581 ":define") d_setgrent_r_proto=define
14582 set d_setgrent_r_proto setgrent_r $hdrs
14586 case "$d_setgrent_r_proto" in
14588 case "$setgrent_r_proto" in
14589 ''|0) try='int setgrent_r(FILE**);'
14590 ./protochk "extern $try" $hdrs && setgrent_r_proto=I_H ;;
14592 case "$setgrent_r_proto" in
14593 ''|0) try='void setgrent_r(FILE**);'
14594 ./protochk "extern $try" $hdrs && setgrent_r_proto=V_H ;;
14596 case "$setgrent_r_proto" in
14597 ''|0) d_setgrent_r=undef
14599 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
14600 * ) case "$setgrent_r_proto" in
14601 REENTRANT_PROTO*) ;;
14602 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
14604 echo "Prototype: $try" ;;
14607 *) case "$usethreads" in
14608 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
14615 *) setgrent_r_proto=0
14619 : see if sethostent exists
14620 set sethostent d_sethent
14623 : see if sethostent_r exists
14624 set sethostent_r d_sethostent_r
14626 case "$d_sethostent_r" in
14628 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14629 case "$d_sethostent_r_proto:$usethreads" in
14630 ":define") d_sethostent_r_proto=define
14631 set d_sethostent_r_proto sethostent_r $hdrs
14635 case "$d_sethostent_r_proto" in
14637 case "$sethostent_r_proto" in
14638 ''|0) try='int sethostent_r(int, struct hostent_data*);'
14639 ./protochk "extern $try" $hdrs && sethostent_r_proto=I_ID ;;
14641 case "$sethostent_r_proto" in
14642 ''|0) try='void sethostent_r(int, struct hostent_data*);'
14643 ./protochk "extern $try" $hdrs && sethostent_r_proto=V_ID ;;
14645 case "$sethostent_r_proto" in
14646 ''|0) d_sethostent_r=undef
14647 sethostent_r_proto=0
14648 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
14649 * ) case "$sethostent_r_proto" in
14650 REENTRANT_PROTO*) ;;
14651 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
14653 echo "Prototype: $try" ;;
14656 *) case "$usethreads" in
14657 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
14659 d_sethostent_r=undef
14660 sethostent_r_proto=0
14664 *) sethostent_r_proto=0
14668 : see if setitimer exists
14669 set setitimer d_setitimer
14672 : see if setlinebuf exists
14673 set setlinebuf d_setlinebuf
14676 : see if setlocale exists
14677 set setlocale d_setlocale
14680 : see if locale.h is available
14681 set locale.h i_locale
14684 : see if setlocale_r exists
14685 set setlocale_r d_setlocale_r
14687 case "$d_setlocale_r" in
14689 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
14690 case "$d_setlocale_r_proto:$usethreads" in
14691 ":define") d_setlocale_r_proto=define
14692 set d_setlocale_r_proto setlocale_r $hdrs
14696 case "$d_setlocale_r_proto" in
14698 case "$setlocale_r_proto" in
14699 ''|0) try='int setlocale_r(int, const char*, char*, int);'
14700 ./protochk "extern $try" $hdrs && setlocale_r_proto=I_ICBI ;;
14702 case "$setlocale_r_proto" in
14703 ''|0) d_setlocale_r=undef
14704 setlocale_r_proto=0
14705 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
14706 * ) case "$setlocale_r_proto" in
14707 REENTRANT_PROTO*) ;;
14708 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
14710 echo "Prototype: $try" ;;
14713 *) case "$usethreads" in
14714 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
14716 d_setlocale_r=undef
14717 setlocale_r_proto=0
14721 *) setlocale_r_proto=0
14725 : see if setnetent exists
14726 set setnetent d_setnent
14729 : see if setnetent_r exists
14730 set setnetent_r d_setnetent_r
14732 case "$d_setnetent_r" in
14734 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14735 case "$d_setnetent_r_proto:$usethreads" in
14736 ":define") d_setnetent_r_proto=define
14737 set d_setnetent_r_proto setnetent_r $hdrs
14741 case "$d_setnetent_r_proto" in
14743 case "$setnetent_r_proto" in
14744 ''|0) try='int setnetent_r(int, struct netent_data*);'
14745 ./protochk "extern $try" $hdrs && setnetent_r_proto=I_ID ;;
14747 case "$setnetent_r_proto" in
14748 ''|0) try='void setnetent_r(int, struct netent_data*);'
14749 ./protochk "extern $try" $hdrs && setnetent_r_proto=V_ID ;;
14751 case "$setnetent_r_proto" in
14752 ''|0) d_setnetent_r=undef
14753 setnetent_r_proto=0
14754 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
14755 * ) case "$setnetent_r_proto" in
14756 REENTRANT_PROTO*) ;;
14757 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
14759 echo "Prototype: $try" ;;
14762 *) case "$usethreads" in
14763 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
14765 d_setnetent_r=undef
14766 setnetent_r_proto=0
14770 *) setnetent_r_proto=0
14774 : see if setprotoent exists
14775 set setprotoent d_setpent
14778 : see if setpgid exists
14779 set setpgid d_setpgid
14782 : see if setpgrp2 exists
14783 set setpgrp2 d_setpgrp2
14786 : see if setpriority exists
14787 set setpriority d_setprior
14790 : see if setproctitle exists
14791 set setproctitle d_setproctitle
14794 : see if setprotoent_r exists
14795 set setprotoent_r d_setprotoent_r
14797 case "$d_setprotoent_r" in
14799 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14800 case "$d_setprotoent_r_proto:$usethreads" in
14801 ":define") d_setprotoent_r_proto=define
14802 set d_setprotoent_r_proto setprotoent_r $hdrs
14806 case "$d_setprotoent_r_proto" in
14808 case "$setprotoent_r_proto" in
14809 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
14810 ./protochk "extern $try" $hdrs && setprotoent_r_proto=I_ID ;;
14812 case "$setprotoent_r_proto" in
14813 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
14814 ./protochk "extern $try" $hdrs && setprotoent_r_proto=V_ID ;;
14816 case "$setprotoent_r_proto" in
14817 ''|0) d_setprotoent_r=undef
14818 setprotoent_r_proto=0
14819 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
14820 * ) case "$setprotoent_r_proto" in
14821 REENTRANT_PROTO*) ;;
14822 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
14824 echo "Prototype: $try" ;;
14827 *) case "$usethreads" in
14828 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
14830 d_setprotoent_r=undef
14831 setprotoent_r_proto=0
14835 *) setprotoent_r_proto=0
14839 : see if setpwent exists
14840 set setpwent d_setpwent
14843 : see if setpwent_r exists
14844 set setpwent_r d_setpwent_r
14846 case "$d_setpwent_r" in
14848 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14849 case "$d_setpwent_r_proto:$usethreads" in
14850 ":define") d_setpwent_r_proto=define
14851 set d_setpwent_r_proto setpwent_r $hdrs
14855 case "$d_setpwent_r_proto" in
14857 case "$setpwent_r_proto" in
14858 ''|0) try='int setpwent_r(FILE**);'
14859 ./protochk "extern $try" $hdrs && setpwent_r_proto=I_H ;;
14861 case "$setpwent_r_proto" in
14862 ''|0) try='void setpwent_r(FILE**);'
14863 ./protochk "extern $try" $hdrs && setpwent_r_proto=V_H ;;
14865 case "$setpwent_r_proto" in
14866 ''|0) d_setpwent_r=undef
14868 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
14869 * ) case "$setpwent_r_proto" in
14870 REENTRANT_PROTO*) ;;
14871 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
14873 echo "Prototype: $try" ;;
14876 *) case "$usethreads" in
14877 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
14884 *) setpwent_r_proto=0
14888 : see if setregid exists
14889 set setregid d_setregid
14891 set setresgid d_setresgid
14894 : see if setreuid exists
14895 set setreuid d_setreuid
14897 set setresuid d_setresuid
14900 : see if setrgid exists
14901 set setrgid d_setrgid
14904 : see if setruid exists
14905 set setruid d_setruid
14908 : see if setservent exists
14909 set setservent d_setsent
14912 : see if setservent_r exists
14913 set setservent_r d_setservent_r
14915 case "$d_setservent_r" in
14917 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14918 case "$d_setservent_r_proto:$usethreads" in
14919 ":define") d_setservent_r_proto=define
14920 set d_setservent_r_proto setservent_r $hdrs
14924 case "$d_setservent_r_proto" in
14926 case "$setservent_r_proto" in
14927 ''|0) try='int setservent_r(int, struct servent_data*);'
14928 ./protochk "extern $try" $hdrs && setservent_r_proto=I_ID ;;
14930 case "$setservent_r_proto" in
14931 ''|0) try='void setservent_r(int, struct servent_data*);'
14932 ./protochk "extern $try" $hdrs && setservent_r_proto=V_ID ;;
14934 case "$setservent_r_proto" in
14935 ''|0) d_setservent_r=undef
14936 setservent_r_proto=0
14937 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
14938 * ) case "$setservent_r_proto" in
14939 REENTRANT_PROTO*) ;;
14940 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
14942 echo "Prototype: $try" ;;
14945 *) case "$usethreads" in
14946 define) echo "setservent_r has no prototype, not using it." >&4 ;;
14948 d_setservent_r=undef
14949 setservent_r_proto=0
14953 *) setservent_r_proto=0
14957 : see if setsid exists
14958 set setsid d_setsid
14961 : see if setvbuf exists
14962 set setvbuf d_setvbuf
14965 : see if sfio.h is available
14970 : see if sfio library is available
14981 : Ok, but do we want to use it.
14985 true|$define|[yY]*) dflt='y';;
14988 echo "$package can use the sfio library, but it is experimental."
14989 case "$useperlio" in
14991 echo "For sfio also the PerlIO abstraction layer is needed."
14992 echo "Earlier you said you wouldn't want that."
14995 rp="You seem to have sfio available, do you want to try using it?"
14998 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
14999 useperlio="$define"
15002 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
15007 *) case "$usesfio" in
15008 true|$define|[yY]*)
15009 echo "Sorry, cannot find sfio on this machine." >&4
15010 echo "Ignoring your setting of usesfio=$usesfio." >&4
15019 $define) usesfio='true';;
15020 *) usesfio='false';;
15024 *) : Remove sfio from list of libraries to use
15027 echo "Removing unneeded -lsfio from library list" >&4
15028 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
15031 echo "libs = $libs" >&4
15038 : see if shmctl exists
15039 set shmctl d_shmctl
15042 : see if shmget exists
15043 set shmget d_shmget
15046 : see if shmat exists
15049 : see what shmat returns
15052 $cat >shmat.c <<'END'
15053 #include <sys/shm.h>
15056 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
15061 echo "and it returns ($shmattype)." >&4
15062 : see if a prototype for shmat is available
15063 xxx=`./findhdr sys/shm.h`
15064 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
15065 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
15076 set d_shmatprototype
15079 : see if shmdt exists
15083 : see how much of the 'shm*(2)' library is present.
15086 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
15087 *"$undef"*) h_shm=false;;
15091 case "`ipcs 2>&1`" in
15092 "SVID shared memory"*"not configured"*)
15093 echo "Your $osname does not have the shm*(2) configured." >&4
15096 set shmctl d_shmctl
15098 set shmget d_shmget
15108 : we could also check for sys/ipc.h ...
15109 if $h_shm && $test `./findhdr sys/shm.h`; then
15110 echo "You have the full shm*(2) library." >&4
15113 echo "You don't have the full shm*(2) library." >&4
15120 : see if we have sigaction
15121 if set sigaction val -f d_sigaction; eval $csym; $val; then
15122 echo 'sigaction() found.' >&4
15123 $cat > try.c <<'EOP'
15125 #include <sys/types.h>
15126 #include <signal.h>
15129 struct sigaction act, oact;
15131 oact.sa_handler = 0;
15132 /* so that act and oact are used */
15133 exit(act.sa_flags == 0 && oact.sa_handler == 0);
15137 if eval $compile_ok; then
15140 echo "But you don't seem to have a useable struct sigaction." >&4
15144 echo 'sigaction NOT found.' >&4
15147 set d_sigaction; eval $setvar
15148 $rm -f try try$_o try.c
15150 : see if sigprocmask exists
15151 set sigprocmask d_sigprocmask
15154 : see if sigsetjmp exists
15156 case "$d_sigsetjmp" in
15158 $cat >try.c <<'EOP'
15159 #include <setjmp.h>
15164 if (sigsetjmp(env,1))
15167 siglongjmp(env, 1);
15172 if eval $compile; then
15173 if $run ./try >/dev/null 2>&1; then
15174 echo "POSIX sigsetjmp found." >&4
15178 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
15184 echo "sigsetjmp not found." >&4
15188 *) val="$d_sigsetjmp"
15189 case "$d_sigsetjmp" in
15190 $define) echo "POSIX sigsetjmp found." >&4;;
15191 $undef) echo "sigsetjmp not found." >&4;;
15199 : see if sockatmark exists
15200 set sockatmark d_sockatmark
15203 : see if prototype for sockatmark is available
15205 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
15208 : see if socks5_init exists
15209 set socks5_init d_socks5_init
15212 : see if srand48_r exists
15213 set srand48_r d_srand48_r
15215 case "$d_srand48_r" in
15217 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15218 case "$d_srand48_r_proto:$usethreads" in
15219 ":define") d_srand48_r_proto=define
15220 set d_srand48_r_proto srand48_r $hdrs
15224 case "$d_srand48_r_proto" in
15226 case "$srand48_r_proto" in
15227 ''|0) try='int srand48_r(long, struct drand48_data*);'
15228 ./protochk "extern $try" $hdrs && srand48_r_proto=I_LS ;;
15230 case "$srand48_r_proto" in
15231 ''|0) d_srand48_r=undef
15233 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
15234 * ) case "$srand48_r_proto" in
15235 REENTRANT_PROTO*) ;;
15236 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
15238 echo "Prototype: $try" ;;
15241 *) case "$usethreads" in
15242 define) echo "srand48_r has no prototype, not using it." >&4 ;;
15249 *) srand48_r_proto=0
15253 : see if srandom_r exists
15254 set srandom_r d_srandom_r
15256 case "$d_srandom_r" in
15258 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15259 case "$d_srandom_r_proto:$usethreads" in
15260 ":define") d_srandom_r_proto=define
15261 set d_srandom_r_proto srandom_r $hdrs
15265 case "$d_srandom_r_proto" in
15267 case "$srandom_r_proto" in
15268 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
15269 ./protochk "extern $try" $hdrs && srandom_r_proto=I_TS ;;
15271 case "$srandom_r_proto" in
15272 ''|0) d_srandom_r=undef
15274 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
15275 * ) case "$srandom_r_proto" in
15276 REENTRANT_PROTO*) ;;
15277 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
15279 echo "Prototype: $try" ;;
15282 *) case "$usethreads" in
15283 define) echo "srandom_r has no prototype, not using it." >&4 ;;
15290 *) srandom_r_proto=0
15294 : see if prototype for setresgid is available
15296 set d_sresgproto setresgid $i_unistd unistd.h
15299 : see if prototype for setresuid is available
15301 set d_sresuproto setresuid $i_unistd unistd.h
15304 : see if sys/stat.h is available
15305 set sys/stat.h i_sysstat
15309 : see if stat knows about block sizes
15311 echo "Checking to see if your struct stat has st_blocks field..." >&4
15312 set d_statblks stat st_blocks $i_sysstat sys/stat.h
15316 : see if this is a sys/vfs.h system
15317 set sys/vfs.h i_sysvfs
15321 : see if this is a sys/statfs.h system
15322 set sys/statfs.h i_sysstatfs
15327 echo "Checking to see if your system supports struct statfs..." >&4
15328 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
15330 case "$d_statfs_s" in
15331 "$define") echo "Yes, it does." ;;
15332 *) echo "No, it doesn't." ;;
15337 : see if struct statfs knows about f_flags
15338 case "$d_statfs_s" in
15341 echo "Checking to see if your struct statfs has f_flags field..." >&4
15342 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
15346 set d_statfs_f_flags
15350 case "$d_statfs_f_flags" in
15351 "$define") echo "Yes, it does." ;;
15352 *) echo "No, it doesn't." ;;
15355 : see if _ptr and _cnt from stdio act std
15358 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
15359 echo "(Looks like you have stdio.h from BSD.)"
15360 case "$stdio_ptr" in
15361 '') stdio_ptr='((fp)->_p)'
15364 *) ptr_lval=$d_stdio_ptr_lval;;
15366 case "$stdio_cnt" in
15367 '') stdio_cnt='((fp)->_r)'
15370 *) cnt_lval=$d_stdio_cnt_lval;;
15372 case "$stdio_base" in
15373 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
15375 case "$stdio_bufsiz" in
15376 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
15378 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
15379 echo "(Looks like you have stdio.h from Linux.)"
15380 case "$stdio_ptr" in
15381 '') stdio_ptr='((fp)->_IO_read_ptr)'
15384 *) ptr_lval=$d_stdio_ptr_lval;;
15386 case "$stdio_cnt" in
15387 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
15390 *) cnt_lval=$d_stdio_cnt_lval;;
15392 case "$stdio_base" in
15393 '') stdio_base='((fp)->_IO_read_base)';;
15395 case "$stdio_bufsiz" in
15396 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
15399 case "$stdio_ptr" in
15400 '') stdio_ptr='((fp)->_ptr)'
15403 *) ptr_lval=$d_stdio_ptr_lval;;
15405 case "$stdio_cnt" in
15406 '') stdio_cnt='((fp)->_cnt)'
15409 *) cnt_lval=$d_stdio_cnt_lval;;
15411 case "$stdio_base" in
15412 '') stdio_base='((fp)->_base)';;
15414 case "$stdio_bufsiz" in
15415 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
15419 : test whether _ptr and _cnt really work
15420 echo "Checking how std your stdio is..." >&4
15423 #define FILE_ptr(fp) $stdio_ptr
15424 #define FILE_cnt(fp) $stdio_cnt
15426 FILE *fp = fopen("try.c", "r");
15429 18 <= FILE_cnt(fp) &&
15430 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15438 if eval $compile && $to try.c; then
15439 if $run ./try; then
15440 echo "Your stdio acts pretty std."
15443 echo "Your stdio isn't very std."
15446 echo "Your stdio doesn't appear very std."
15450 # glibc 2.2.90 and above apparently change stdio streams so Perl's
15451 # direct buffer manipulation no longer works. The Configure tests
15452 # should be changed to correctly detect this, but until then,
15453 # the following check should at least let perl compile and run.
15454 # (This quick fix should be updated before 5.8.1.)
15455 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
15456 # A. Dougherty, June 3, 2002.
15457 case "$d_gnulibc" in
15459 case "$gnulibc_version" in
15463 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
15472 : Can _ptr be used as an lvalue?
15473 case "$d_stdstdio$ptr_lval" in
15474 $define$define) val=$define ;;
15477 set d_stdio_ptr_lval
15480 : Can _cnt be used as an lvalue?
15481 case "$d_stdstdio$cnt_lval" in
15482 $define$define) val=$define ;;
15485 set d_stdio_cnt_lval
15489 : test whether setting _ptr sets _cnt as a side effect
15490 d_stdio_ptr_lval_sets_cnt="$undef"
15491 d_stdio_ptr_lval_nochange_cnt="$undef"
15492 case "$d_stdio_ptr_lval$d_stdstdio" in
15494 echo "Checking to see what happens if we set the stdio ptr..." >&4
15497 /* Can we scream? */
15498 /* Eat dust sed :-) */
15499 /* In the buffer space, no one can hear you scream. */
15500 #define FILE_ptr(fp) $stdio_ptr
15501 #define FILE_cnt(fp) $stdio_cnt
15502 #include <sys/types.h>
15504 FILE *fp = fopen("try.c", "r");
15509 puts("Fail even to read");
15512 c = getc(fp); /* Read away the first # */
15514 puts("Fail even to read");
15518 18 <= FILE_cnt(fp) &&
15519 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15521 puts("Fail even to read");
15524 ptr = (char*) FILE_ptr(fp);
15525 cnt = (size_t)FILE_cnt(fp);
15527 FILE_ptr(fp) += 42;
15529 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
15530 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
15533 if (FILE_cnt(fp) <= 20) {
15534 printf ("Fail (<20 chars to test)");
15537 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
15538 puts("Fail compare");
15541 if (cnt == FILE_cnt(fp)) {
15542 puts("Pass_unchanged");
15545 if (FILE_cnt(fp) == (cnt - 42)) {
15546 puts("Pass_changed");
15549 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
15555 if eval $compile && $to try.c; then
15556 case `$run ./try` in
15558 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
15559 d_stdio_ptr_lval_sets_cnt="$define" ;;
15561 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
15562 d_stdio_ptr_lval_nochange_cnt="$define" ;;
15564 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
15566 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
15569 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
15575 : see if _base is also standard
15577 case "$d_stdstdio" in
15581 #define FILE_base(fp) $stdio_base
15582 #define FILE_bufsiz(fp) $stdio_bufsiz
15584 FILE *fp = fopen("try.c", "r");
15587 19 <= FILE_bufsiz(fp) &&
15588 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
15595 if eval $compile && $to try.c; then
15596 if $run ./try; then
15597 echo "And its _base field acts std."
15600 echo "But its _base field isn't std."
15603 echo "However, it seems to be lacking the _base field."
15612 Checking how to access stdio streams by file descriptor number...
15614 case "$stdio_stream_array" in
15615 '') $cat >try.c <<EOCP
15618 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
15622 for s in _iob __iob __sF
15624 set try -DSTDIO_STREAM_ARRAY=$s
15625 if eval $compile; then
15626 case "`$run ./try`" in
15627 yes) stdio_stream_array=$s; break ;;
15631 $rm -f try.* try$exe_ext
15633 case "$stdio_stream_array" in
15635 I can't figure out how to access stdio streams by file descriptor number.
15637 d_stdio_stream_array="$undef"
15640 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
15642 d_stdio_stream_array="$define"
15646 : see if strcoll exists
15647 set strcoll d_strcoll
15650 : check for structure copying
15652 echo "Checking to see if your C compiler can copy structs..." >&4
15653 $cat >try.c <<'EOCP'
15663 if $cc -c try.c >/dev/null 2>&1 ; then
15665 echo "Yup, it can."
15668 echo "Nope, it can't."
15674 : see if strerror and/or sys_errlist[] exist
15676 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
15677 if set strerror val -f d_strerror; eval $csym; $val; then
15678 echo 'strerror() found.' >&4
15679 d_strerror="$define"
15680 d_strerrm='strerror(e)'
15681 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15682 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
15683 d_syserrlst="$define"
15685 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
15686 d_syserrlst="$undef"
15688 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
15689 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
15690 echo 'strerror() found in string header.' >&4
15691 d_strerror="$define"
15692 d_strerrm='strerror(e)'
15693 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15694 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
15695 d_syserrlst="$define"
15697 echo "(You don't appear to have any sys_errlist[], how can this be?)"
15698 d_syserrlst="$undef"
15700 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15701 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
15702 d_strerror="$undef"
15703 d_syserrlst="$define"
15704 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
15706 echo 'strerror() and sys_errlist[] NOT found.' >&4
15707 d_strerror="$undef"
15708 d_syserrlst="$undef"
15709 d_strerrm='"unknown"'
15713 : see if strerror_r exists
15714 set strerror_r d_strerror_r
15716 case "$d_strerror_r" in
15718 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
15719 case "$d_strerror_r_proto:$usethreads" in
15720 ":define") d_strerror_r_proto=define
15721 set d_strerror_r_proto strerror_r $hdrs
15725 case "$d_strerror_r_proto" in
15727 case "$strerror_r_proto" in
15728 ''|0) try='int strerror_r(int, char*, size_t);'
15729 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;;
15731 case "$strerror_r_proto" in
15732 ''|0) try='int strerror_r(int, char*, int);'
15733 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;;
15735 case "$strerror_r_proto" in
15736 ''|0) try='char* strerror_r(int, char*, size_t);'
15737 ./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;;
15739 case "$strerror_r_proto" in
15740 ''|0) d_strerror_r=undef
15742 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
15743 * ) case "$strerror_r_proto" in
15744 REENTRANT_PROTO*) ;;
15745 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
15747 echo "Prototype: $try" ;;
15750 *) case "$usethreads" in
15751 define) echo "strerror_r has no prototype, not using it." >&4 ;;
15758 *) strerror_r_proto=0
15762 : see if strftime exists
15763 set strftime d_strftime
15766 : see if strtod exists
15767 set strtod d_strtod
15770 : see if strtol exists
15771 set strtol d_strtol
15774 : see if strtold exists
15775 set strtold d_strtold
15778 : see if strtoll exists
15779 set strtoll d_strtoll
15782 case "$d_longlong-$d_strtoll" in
15785 Checking whether your strtoll() works okay...
15787 $cat >try.c <<'EOCP'
15790 #define strtoll __strtoll
15793 #define strtoll _strtoll
15796 extern long long int strtoll(char *s, char **, int);
15797 static int bad = 0;
15798 int check(char *s, long long ell, int een) {
15801 gll = strtoll(s, 0, 10);
15802 if (!((gll == ell) && (errno == een)))
15806 check(" 1", 1LL, 0);
15807 check(" 0", 0LL, 0);
15808 check("-1", -1LL, 0);
15809 check("-9223372036854775808", -9223372036854775808LL, 0);
15810 check("-9223372036854775808", -9223372036854775808LL, 0);
15811 check(" 9223372036854775807", 9223372036854775807LL, 0);
15812 check("-9223372036854775808", -9223372036854775808LL, 0);
15813 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
15814 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
15820 if eval $compile; then
15823 ok) echo "Your strtoll() seems to be working okay." ;;
15825 Your strtoll() doesn't seem to be working okay.
15831 echo "(I can't seem to compile the test program--assuming it doesn't)"
15837 : see if strtoq exists
15838 set strtoq d_strtoq
15841 : see if strtoul exists
15842 set strtoul d_strtoul
15845 case "$d_strtoul" in
15848 Checking whether your strtoul() works okay...
15850 $cat >try.c <<'EOCP'
15853 extern unsigned long int strtoul(char *s, char **, int);
15854 static int bad = 0;
15855 void check(char *s, unsigned long eul, int een) {
15858 gul = strtoul(s, 0, 10);
15859 if (!((gul == eul) && (errno == een)))
15863 check(" 1", 1L, 0);
15864 check(" 0", 0L, 0);
15866 case "$longsize" in
15868 $cat >>try.c <<'EOCP'
15869 check("18446744073709551615", 18446744073709551615UL, 0);
15870 check("18446744073709551616", 18446744073709551615UL, ERANGE);
15871 #if 0 /* strtoul() for /^-/ strings is undefined. */
15872 check("-1", 18446744073709551615UL, 0);
15873 check("-18446744073709551614", 2, 0);
15874 check("-18446744073709551615", 1, 0);
15875 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
15876 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
15881 $cat >>try.c <<'EOCP'
15882 check("4294967295", 4294967295UL, 0);
15883 check("4294967296", 4294967295UL, ERANGE);
15884 #if 0 /* strtoul() for /^-/ strings is undefined. */
15885 check("-1", 4294967295UL, 0);
15886 check("-4294967294", 2, 0);
15887 check("-4294967295", 1, 0);
15888 check("-4294967296", 4294967295UL, ERANGE);
15889 check("-4294967297", 4294967295UL, ERANGE);
15894 : Should we write these tests to be more portable by sprintf-ing
15895 : ~0 and then manipulating that char string as input for strtol?
15898 $cat >>try.c <<'EOCP'
15905 if eval $compile; then
15906 case "`$run ./try`" in
15907 ok) echo "Your strtoul() seems to be working okay." ;;
15909 Your strtoul() doesn't seem to be working okay.
15918 : see if strtoull exists
15919 set strtoull d_strtoull
15922 case "$d_longlong-$d_strtoull" in
15925 Checking whether your strtoull() works okay...
15927 $cat >try.c <<'EOCP'
15930 #define strtoull __strtoull
15933 extern unsigned long long int strtoull(char *s, char **, int);
15934 static int bad = 0;
15935 int check(char *s, long long eull, int een) {
15938 gull = strtoull(s, 0, 10);
15939 if (!((gull == eull) && (errno == een)))
15943 check(" 1", 1LL, 0);
15944 check(" 0", 0LL, 0);
15945 check("18446744073709551615", 18446744073709551615ULL, 0);
15946 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
15947 #if 0 /* strtoull() for /^-/ strings is undefined. */
15948 check("-1", 18446744073709551615ULL, 0);
15949 check("-18446744073709551614", 2LL, 0);
15950 check("-18446744073709551615", 1LL, 0);
15951 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
15952 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
15959 if eval $compile; then
15960 case "`$run ./try`" in
15961 ok) echo "Your strtoull() seems to be working okay." ;;
15963 Your strtoull() doesn't seem to be working okay.
15965 d_strtoull="$undef"
15972 : see if strtouq exists
15973 set strtouq d_strtouq
15976 case "$d_strtouq" in
15979 Checking whether your strtouq() works okay...
15981 $cat >try.c <<'EOCP'
15984 extern unsigned long long int strtouq(char *s, char **, int);
15985 static int bad = 0;
15986 void check(char *s, unsigned long long eull, int een) {
15987 unsigned long long gull;
15989 gull = strtouq(s, 0, 10);
15990 if (!((gull == eull) && (errno == een)))
15994 check(" 1", 1LL, 0);
15995 check(" 0", 0LL, 0);
15996 check("18446744073709551615", 18446744073709551615ULL, 0);
15997 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
15998 #if 0 /* strtouq() for /^-/ strings is undefined. */
15999 check("-1", 18446744073709551615ULL, 0);
16000 check("-18446744073709551614", 2LL, 0);
16001 check("-18446744073709551615", 1LL, 0);
16002 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
16003 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
16011 if eval $compile; then
16012 case "`$run ./try`" in
16013 ok) echo "Your strtouq() seems to be working okay." ;;
16015 Your strtouq() doesn't seem to be working okay.
16024 : see if strxfrm exists
16025 set strxfrm d_strxfrm
16028 : see if symlink exists
16029 set symlink d_symlink
16032 : see if syscall exists
16033 set syscall d_syscall
16036 : see if prototype for syscall is available
16038 set d_syscallproto syscall $i_unistd unistd.h
16041 : see if sysconf exists
16042 set sysconf d_sysconf
16045 : see if system exists
16046 set system d_system
16049 : see if tcgetpgrp exists
16050 set tcgetpgrp d_tcgetpgrp
16053 : see if tcsetpgrp exists
16054 set tcsetpgrp d_tcsetpgrp
16057 : see if prototype for telldir is available
16059 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
16062 : see if time exists
16064 if test "X$d_time" = X -o X"$timetype" = X; then
16065 if set time val -f d_time; eval $csym; $val; then
16066 echo 'time() found.' >&4
16068 rp="What is the type returned by time() on this system?"
16069 set time_t timetype long stdio.h sys/types.h
16072 echo 'time() not found, hope that will do.' >&4
16080 : see if this is a sys/times.h system
16081 set sys/times.h i_systimes
16084 : see if times exists
16086 if set times val -f d_times; eval $csym; $val; then
16087 echo 'times() found.' >&4
16090 case "$i_systimes" in
16091 "$define") inc='sys/times.h';;
16093 rp="What is the type returned by times() on this system?"
16094 set clock_t clocktype long stdio.h sys/types.h $inc
16097 echo 'times() NOT found, hope that will do.' >&4
16102 : see if tmpnam_r exists
16103 set tmpnam_r d_tmpnam_r
16105 case "$d_tmpnam_r" in
16107 hdrs="$i_systypes sys/types.h define stdio.h "
16108 case "$d_tmpnam_r_proto:$usethreads" in
16109 ":define") d_tmpnam_r_proto=define
16110 set d_tmpnam_r_proto tmpnam_r $hdrs
16114 case "$d_tmpnam_r_proto" in
16116 case "$tmpnam_r_proto" in
16117 ''|0) try='char* tmpnam_r(char*);'
16118 ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;;
16120 case "$tmpnam_r_proto" in
16121 ''|0) d_tmpnam_r=undef
16123 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
16124 * ) case "$tmpnam_r_proto" in
16125 REENTRANT_PROTO*) ;;
16126 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
16128 echo "Prototype: $try" ;;
16131 *) case "$usethreads" in
16132 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
16139 *) tmpnam_r_proto=0
16143 : see if truncate exists
16144 set truncate d_truncate
16147 : see if ttyname_r exists
16148 set ttyname_r d_ttyname_r
16150 case "$d_ttyname_r" in
16152 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
16153 case "$d_ttyname_r_proto:$usethreads" in
16154 ":define") d_ttyname_r_proto=define
16155 set d_ttyname_r_proto ttyname_r $hdrs
16159 case "$d_ttyname_r_proto" in
16161 case "$ttyname_r_proto" in
16162 ''|0) try='int ttyname_r(int, char*, size_t);'
16163 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;;
16165 case "$ttyname_r_proto" in
16166 ''|0) try='int ttyname_r(int, char*, int);'
16167 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;;
16169 case "$ttyname_r_proto" in
16170 ''|0) try='char* ttyname_r(int, char*, int);'
16171 ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;;
16173 case "$ttyname_r_proto" in
16174 ''|0) d_ttyname_r=undef
16176 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
16177 * ) case "$ttyname_r_proto" in
16178 REENTRANT_PROTO*) ;;
16179 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
16181 echo "Prototype: $try" ;;
16184 *) case "$usethreads" in
16185 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
16192 *) ttyname_r_proto=0
16196 : see if tzname[] exists
16198 if set tzname val -a d_tzname; eval $csym; $val; then
16200 echo 'tzname[] found.' >&4
16203 echo 'tzname[] NOT found.' >&4
16209 next|rhapsody|darwin) multiarch="$define" ;;
16211 case "$multiarch" in
16212 ''|[nN]*) multiarch="$undef" ;;
16215 : check for ordering of bytes in a UV
16217 case "$usecrosscompile$multiarch" in
16220 You seem to be either cross-compiling or doing a multiarchitecture build,
16221 skipping the byteorder check.
16227 case "$byteorder" in
16230 In the following, larger digits indicate more significance. A big-endian
16231 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
16232 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
16233 machines may have weird orders like 3412. A Cray will report 87654321,
16234 an Alpha will report 12345678. If the test program works the default is
16236 I'm now running the test program...
16240 #include <sys/types.h>
16241 typedef $uvtype UV;
16251 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
16253 u.l = (UV)0x04030201;
16254 for (i = 0; i < $uvsize; i++)
16255 printf("%c", u.c[i]+'0');
16262 if eval $compile && ./try > /dev/null; then
16265 [1-4][1-4][1-4][1-4]|12345678|87654321)
16266 echo "(The test program ran ok.)"
16267 echo "byteorder=$dflt"
16270 ????|????????) echo "(The test program ran ok.)" ;;
16271 *) echo "(The test program didn't run right for some reason.)" ;;
16276 (I can't seem to compile the test program. Guessing big-endian...)
16279 case "$xxx_prompt" in
16281 rp="What is the order of bytes in $uvtype?"
16297 Checking to see whether you can access character data unalignedly...
16299 case "$d_u32align" in
16300 '') $cat >try.c <<EOCP
16302 #define U32 $u32type
16303 #define BYTEORDER 0x$byteorder
16305 #include <signal.h>
16307 $signal_t bletch(s) int s; { exit(4); }
16310 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
16315 if (sizeof(U32) != 4) {
16316 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
16323 signal(SIGBUS, bletch);
16335 for (i = 0; i < 4; i++) {
16336 up = (U32*)(buf + i);
16337 if (! ((*up == 1 << (8*i)) || /* big-endian */
16338 (*up == 1 << (8*(3-i))) /* little-endian */
16342 printf("read failed (%x)\n", *up);
16348 for (i = 0; i < 4; i++) {
16349 up = (U32*)(buf + i);
16351 if (*up != 0xBeef) {
16352 printf("write failed (%x)\n", *up);
16366 if eval $compile_ok; then
16367 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
16368 $run ./try 2>&1 >/dev/null
16371 You can access character data pretty unalignedly.
16373 d_u32align="$undef"
16376 It seems that you must access character data in an aligned manner.
16378 d_u32align="$define"
16382 rp='Can you access character data at unaligned addresses?'
16386 [yY]*) d_u32align="$undef" ;;
16387 *) d_u32align="$define" ;;
16390 $rm -f core core.try.* try.core
16394 : see if ualarm exists
16395 set ualarm d_ualarm
16398 : see if umask exists
16402 : see if unordered exists
16403 set unordered d_unordered
16406 : see if usleep exists
16407 set usleep d_usleep
16410 : see if prototype for usleep is available
16412 set d_usleepproto usleep $i_unistd unistd.h
16415 : see if ustat exists
16419 : backward compatibility for d_hvfork
16420 if test X$d_hvfork != X; then
16421 d_vfork="$d_hvfork"
16424 : see if there is a vfork
16429 : Ok, but do we want to use it. vfork is reportedly unreliable in
16430 : perl on Solaris 2.x, and probably elsewhere.
16434 case "$usevfork" in
16440 Perl can only use a vfork() that doesn't suffer from strict
16441 restrictions on calling functions or modifying global data in
16442 the child. For example, glibc-2.1 contains such a vfork()
16443 that is unsuitable. If your system provides a proper fork()
16444 call, chances are that you do NOT want perl to use vfork().
16447 rp="Do you still want to use vfork()?"
16452 echo "Ok, we won't use vfork()."
16461 $define) usevfork='true';;
16462 *) usevfork='false';;
16465 : see if closedir exists
16466 set closedir d_closedir
16469 case "$d_closedir" in
16472 echo "Checking whether closedir() returns a status..." >&4
16474 #$i_dirent I_DIRENT /**/
16475 #$i_sysdir I_SYS_DIR /**/
16476 #$i_sysndir I_SYS_NDIR /**/
16477 #$i_systypes I_SYS_TYPES /**/
16479 #if defined(I_SYS_TYPES)
16480 #include <sys/types.h>
16482 #if defined(I_DIRENT)
16483 #include <dirent.h>
16484 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
16485 #include <sys/dir.h>
16489 #include <sys/ndir.h>
16493 #include <ndir.h> /* may be wrong in the future */
16495 #include <sys/dir.h>
16500 int main() { return closedir(opendir(".")); }
16503 if eval $compile_ok; then
16504 if $run ./try > /dev/null 2>&1 ; then
16505 echo "Yes, it does."
16508 echo "No, it doesn't."
16512 echo "(I can't seem to compile the test program--assuming it doesn't)"
16520 set d_void_closedir
16523 : see if there is a wait4
16527 : see if waitpid exists
16528 set waitpid d_waitpid
16531 : see if wcstombs exists
16532 set wcstombs d_wcstombs
16535 : see if wctomb exists
16536 set wctomb d_wctomb
16539 : see if writev exists
16540 set writev d_writev
16543 : preserve RCS keywords in files with variable substitution, grrr
16548 Revision='$Revision'
16550 : check for alignment requirements
16552 case "$usecrosscompile$multiarch" in
16555 You seem to be either cross-compiling or doing a multiarchitecture build,
16556 skipping the memory alignment check.
16559 case "$alignbytes" in
16560 '') alignbytes=8 ;;
16564 case "$alignbytes" in
16565 '') echo "Checking alignment constraints..." >&4
16566 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
16567 $cat >try.c <<'EOCP'
16568 typedef long double NV;
16571 $cat >try.c <<'EOCP'
16575 $cat >>try.c <<'EOCP'
16583 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
16588 if eval $compile_ok; then
16592 echo "(I can't seem to compile the test program...)"
16595 *) dflt="$alignbytes"
16598 rp="Doubles must be aligned on a how-many-byte boundary?"
16606 : set the base revision
16609 : how do we catenate cpp tokens here?
16611 echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
16612 $cat >cpp_stuff.c <<'EOCP'
16613 #define RCAT(a,b)a/**/b
16614 #define ACAT(a,b)a ## b
16618 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
16619 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
16620 echo "Oh! Smells like ANSI's been here." >&4
16621 echo "We can catify or stringify, separately or together!"
16623 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
16624 echo "Ah, yes! The good old days!" >&4
16625 echo "However, in the good old days we don't know how to stringify and"
16626 echo "catify at the same time."
16630 Hmm, I don't seem to be able to catenate tokens with your cpp. You're going
16631 to have to edit the values of CAT[2-5] in config.h...
16633 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
16637 : see if this is a db.h system
16643 : Check db version.
16645 echo "Checking Berkeley DB version ..." >&4
16651 #include <sys/types.h>
16654 int main(int argc, char *argv[])
16656 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
16657 int Major, Minor, Patch ;
16658 unsigned long Version ;
16659 (void)db_version(&Major, &Minor, &Patch) ;
16661 printf("%d %d %d %d %d %d\n",
16662 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
16663 Major, Minor, Patch);
16666 printf("You have Berkeley DB Version 2 or greater.\n");
16668 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
16669 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
16670 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
16671 Major, Minor, Patch) ;
16673 /* check that db.h & libdb are compatible */
16674 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
16675 printf("db.h and libdb are incompatible.\n") ;
16679 printf("db.h and libdb are compatible.\n") ;
16681 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
16682 + DB_VERSION_PATCH ;
16684 /* needs to be >= 2.3.4 */
16685 if (Version < 2003004) {
16686 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
16687 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
16693 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
16698 printf("You have Berkeley DB Version 1.\n");
16699 exit(0); /* DB version < 2: the coast is clear. */
16701 exit(1); /* <db.h> not Berkeley DB? */
16707 if eval $compile_ok && $run ./try; then
16708 echo 'Looks OK.' >&4
16710 db_version_major=$1
16711 db_version_minor=$2
16712 db_version_patch=$3
16714 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
16718 : Remove db from list of libraries to use
16719 echo "Removing unusable -ldb from library list" >&4
16720 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
16723 echo "libs = $libs" >&4
16733 : Check the return type needed for hash
16735 echo "Checking return type needed for hash for Berkeley DB ..." >&4
16741 #include <sys/types.h>
16744 #ifndef DB_VERSION_MAJOR
16745 u_int32_t hash_cb (ptr, size)
16753 info.hash = hash_cb;
16757 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16758 if $contains warning try.out >>/dev/null 2>&1 ; then
16761 db_hashtype='u_int32_t'
16764 : XXX Maybe we should just give up here.
16765 db_hashtype=u_int32_t
16767 echo "Help: I can't seem to compile the db test program." >&4
16768 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
16771 echo "Your version of Berkeley DB uses $db_hashtype for hash."
16773 *) db_hashtype=u_int32_t
16778 : Check the return type needed for prefix
16780 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
16786 #include <sys/types.h>
16789 #ifndef DB_VERSION_MAJOR
16790 size_t prefix_cb (key1, key2)
16798 info.prefix = prefix_cb;
16802 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16803 if $contains warning try.out >>/dev/null 2>&1 ; then
16804 db_prefixtype='int'
16806 db_prefixtype='size_t'
16809 db_prefixtype='size_t'
16810 : XXX Maybe we should just give up here.
16812 echo "Help: I can't seem to compile the db test program." >&4
16813 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
16816 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
16818 *) db_prefixtype='size_t'
16823 : How can we generate normalized random numbers ?
16825 echo "Looking for a random number function..." >&4
16826 case "$randfunc" in
16828 if set drand48 val -f; eval $csym; $val; then
16830 echo "Good, found drand48()." >&4
16831 elif set random val -f; eval $csym; $val; then
16833 echo "OK, found random()." >&4
16836 echo "Yick, looks like I have to use rand()." >&4
16847 *-Dmy_rand=*|*-Dmy_srand=*)
16848 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
16849 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
16850 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
16851 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
16855 while $test "$cont"; do
16856 rp="Use which function to generate random numbers?"
16858 if $test "$ans" = "$dflt"; then
16864 if set $ans val -f; eval $csym; $val; then
16868 rp="I cannot find function $ans. Use that name anyway?"
16877 case "$randfunc" in
16879 drand01="drand48()"
16885 case "$randbits" in
16887 echo "Checking to see how many bits your $randfunc() function produces..." >&4
16889 #$i_unistd I_UNISTD
16890 #$i_stdlib I_STDLIB
16893 # include <unistd.h>
16896 # include <stdlib.h>
16901 register unsigned long tmp;
16902 register unsigned long max = 0L;
16904 for (i = 1000; i; i--) {
16905 tmp = (unsigned long) $randfunc();
16906 if (tmp > max) max = tmp;
16908 for (i = 0; max; i++)
16914 if eval $compile_ok; then
16918 echo "(I can't seem to compile the test program...)"
16925 rp="How many bits does your $randfunc() function produce?"
16929 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
16930 seedfunc="s$randfunc"
16931 randseedtype=unsigned
16935 rp="How many bits does your $randfunc() function produce?"
16938 seedfunc="s$randfunc"
16939 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
16940 if set $seedfunc val -f; eval $csym; $val; then
16941 echo "(Using $seedfunc() to seed random generator)"
16943 echo "(Warning: no $seedfunc() to seed random generator)"
16946 randseedtype=unsigned
16954 echo "Determining whether or not we are on an EBCDIC system..." >&4
16955 $cat >try.c <<'EOM'
16958 if ('M'==0xd4) return 0;
16965 if eval $compile_ok; then
16966 if $run ./try; then
16967 echo "You seem to speak EBCDIC." >&4
16970 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
16973 echo "I'm unable to compile the test program." >&4
16974 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
16982 Checking how to flush all pending stdio output...
16984 # I only know how to find the first 32 possibly open files on SunOS.
16985 # See also hints/sunos_4_1.sh and util.c --AD
16987 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
16989 $cat >>try.c <<EOCP
16991 #$i_unistd I_UNISTD
16993 # include <unistd.h>
16995 #$d_sysconf HAS_SYSCONF
16996 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
16997 #ifdef HAS_STDIO_STREAM_ARRAY
16998 # define STDIO_STREAM_ARRAY $stdio_stream_array
17003 p = fopen("try.out", "w");
17007 # ifdef TRY_FPRINTF
17011 #ifdef TRY_FFLUSH_NULL
17014 #ifdef TRY_FFLUSH_ALL
17016 long open_max = -1;
17017 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
17018 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
17020 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
17021 open_max = sysconf(_SC_OPEN_MAX);
17024 open_max = FOPEN_MAX;
17027 open_max = OPEN_MAX;
17036 # ifdef HAS_STDIO_STREAM_ARRAY
17037 if (open_max > 0) {
17039 for (i = 0; i < open_max; i++)
17040 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
17041 STDIO_STREAM_ARRAY[i]._file < open_max &&
17042 STDIO_STREAM_ARRAY[i]._flag)
17043 fflush(&STDIO_STREAM_ARRAY[i]);
17051 : first we have to find out how _not_ to flush
17053 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
17055 set try -DTRY_FPUTC
17056 if eval $compile; then
17057 $run ./try 2>/dev/null
17060 if $test ! -s try.out -a "X$code" = X42; then
17066 set try -DTRY_FPRINTF
17067 if eval $compile; then
17068 $run ./try 2>/dev/null
17071 if $test ! -s try.out -a "X$code" = X42; then
17072 output=-DTRY_FPRINTF
17078 : check for fflush NULL behaviour
17079 case "$fflushNULL" in
17080 '') set try -DTRY_FFLUSH_NULL $output
17081 if eval $compile; then
17082 $run ./try 2>/dev/null
17085 if $test -s try.out -a "X$code" = X42; then
17086 fflushNULL="`$cat try.out`"
17088 if $test "X$code" != X42; then
17090 (If this test failed, don't worry, we'll try another method shortly.)
17095 $rm -f core try.core core.try.*
17096 case "$fflushNULL" in
17098 Your fflush(NULL) works okay for output streams.
17099 Let's see if it clobbers input pipes...
17101 # As of mid-March 2000 all versions of Solaris appear to have a stdio
17102 # bug that improperly flushes the input end of pipes. So we avoid the
17103 # autoflush on fork/system/exec support for now. :-(
17104 $cat >tryp.c <<EOCP
17107 main(int argc, char **argv)
17113 while ((i = getc(stdin)) != -1
17114 && (*bp++ = i) != '\n'
17115 && bp < &buf[1024])
17118 fprintf(stdout, "%s", buf);
17126 fflushNULL="$define"
17128 if eval $compile; then
17130 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17131 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17133 fflush(NULL) seems to behave okay with input streams.
17135 fflushNULL="$define"
17138 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
17140 fflushNULL="$undef"
17143 $rm -f core tryp.c tryp.core core.tryp.*
17146 Your fflush(NULL) isn't working (contrary to ANSI C).
17148 fflushNULL="$undef"
17151 Cannot figure out whether your fflush(NULL) works or not.
17152 I'm assuming it doesn't (contrary to ANSI C).
17154 fflushNULL="$undef"
17158 $define|true|[yY]*)
17159 fflushNULL="$define"
17162 fflushNULL="$undef"
17165 : check explicit looping only if NULL did not work, and if the pipe
17166 : bug does not show up on an explicit flush too
17167 case "$fflushNULL" in
17169 $cat >tryp.c <<EOCP
17172 main(int argc, char **argv)
17178 while ((i = getc(stdin)) != -1
17179 && (*bp++ = i) != '\n'
17180 && bp < &buf[1024])
17183 fprintf(stdout, "%s", buf);
17192 if eval $compile; then
17194 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17195 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17197 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
17199 : now check for fflushall behaviour
17200 case "$fflushall" in
17201 '') set try -DTRY_FFLUSH_ALL $output
17202 if eval $compile; then
17204 (Now testing the other method--but note that this also may fail.)
17206 $run ./try 2>/dev/null
17209 if $test -s try.out -a "X$code" = X42; then
17210 fflushall="`$cat try.out`"
17213 $rm -f core try.core core.try.*
17214 case "$fflushall" in
17216 Whew. Flushing explicitly all the stdio streams works.
17218 fflushall="$define"
17221 Sigh. Flushing explicitly all the stdio streams doesn't work.
17226 Cannot figure out whether flushing stdio streams explicitly works or not.
17227 I'm assuming it doesn't.
17233 "$define"|true|[yY]*)
17234 fflushall="$define"
17242 All is futile. Even fflush(stdin) clobbers input pipes!
17249 $rm -f core tryp.c tryp.core core.tryp.*
17251 *) fflushall="$undef"
17255 case "$fflushNULL$fflushall" in
17258 OK, I give up. I cannot figure out how to flush pending stdio output.
17259 We won't be flushing handles at all before fork/exec/popen.
17263 $rm -f try.* try$exe_ext
17265 : Store the full pathname to the ar program for use in the C program
17266 : Respect a hint or command line value for full_ar.
17271 : Store the full pathname to the sed program for use in the C program
17274 : see what type gids are declared as in the kernel
17276 echo "Looking for the type for group ids returned by getgid()."
17277 set gid_t gidtype xxx stdio.h sys/types.h
17281 xxx=`./findhdr sys/user.h`
17282 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
17284 unsigned) dflt="$1 $2" ;;
17288 *) dflt="$gidtype";;
17291 gid_t) echo "gid_t found." ;;
17292 *) rp="What is the type for group ids returned by getgid()?"
17300 *_t) zzz="$gidtype" ;;
17303 echo "Checking the size of $zzz..." >&4
17305 #include <sys/types.h>
17308 printf("%d\n", (int)sizeof($gidtype));
17313 if eval $compile_ok; then
17317 echo "(I can't execute the test program--guessing $gidsize.)" >&4
17320 echo "Your $zzz is $gidsize bytes long."
17325 echo "(I can't compile the test program--guessing $gidsize.)" >&4
17331 *_t) zzz="$gidtype" ;;
17334 echo "Checking the sign of $zzz..." >&4
17336 #include <sys/types.h>
17347 if eval $compile; then
17351 echo "(I can't execute the test program--guessing unsigned.)" >&4
17355 1) echo "Your $zzz is unsigned." ;;
17356 -1) echo "Your $zzz is signed." ;;
17362 echo "(I can't compile the test program--guessing unsigned.)" >&4
17368 if $test X"$quadtype" != X; then
17370 echo "Checking how to print 64-bit integers..." >&4
17372 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
17373 $cat >try.c <<'EOCP'
17374 #include <sys/types.h>
17377 int q = 12345678901;
17378 printf("%ld\n", q);
17382 if eval $compile; then
17386 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
17387 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
17388 echo "We will use %d."
17394 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
17395 $cat >try.c <<'EOCP'
17396 #include <sys/types.h>
17399 long q = 12345678901;
17400 printf("%ld\n", q);
17404 if eval $compile; then
17408 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
17409 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
17410 echo "We will use %ld."
17416 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
17417 $cat >try.c <<'EOCP'
17418 #include <sys/types.h>
17419 #include <inttypes.h>
17422 int64_t q = 12345678901;
17423 printf("%" PRId64 "\n", q);
17427 if eval $compile; then
17431 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
17432 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
17433 echo "We will use the C9X style."
17439 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17441 #include <sys/types.h>
17444 $quadtype q = 12345678901;
17445 printf("%Ld\n", q);
17449 if eval $compile; then
17453 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
17454 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
17455 echo "We will use %Ld."
17461 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
17462 $cat >try.c <<'EOCP'
17463 #include <sys/types.h>
17466 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
17467 printf("%lld\n", q);
17471 if eval $compile; then
17475 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
17476 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
17477 echo "We will use the %lld style."
17483 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17485 #include <sys/types.h>
17488 $quadtype q = 12345678901;
17489 printf("%qd\n", q);
17493 if eval $compile; then
17497 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
17498 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
17499 echo "We will use %qd."
17505 if $test X"$sPRId64" = X; then
17506 echo "Cannot figure out how to print 64-bit integers." >&4
17514 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
17515 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
17517 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
17518 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
17524 $echo "Checking the format strings to be used for Perl's internal types..." >&4
17526 if $test X"$ivsize" = X8; then
17527 ivdformat="$sPRId64"
17528 uvuformat="$sPRIu64"
17529 uvoformat="$sPRIo64"
17530 uvxformat="$sPRIx64"
17531 uvXUformat="$sPRIXU64"
17533 if $test X"$ivsize" = X"$longsize"; then
17540 if $test X"$ivsize" = X"$intsize"; then
17548 if $test X"$ivsize" = X"$shortsize"; then
17559 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
17560 nveformat="$sPRIeldbl"
17561 nvfformat="$sPRIfldbl"
17562 nvgformat="$sPRIgldbl"
17563 nvEUformat="$sPRIEUldbl"
17564 nvFUformat="$sPRIFUldbl"
17565 nvGUformat="$sPRIGUldbl"
17575 case "$ivdformat" in
17576 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
17583 $echo "Checking the format string to be used for gids..." >&4
17586 -1) if $test X"$gidsize" = X"$ivsize"; then
17587 gidformat="$ivdformat"
17589 if $test X"$gidsize" = X"$longsize"; then
17592 if $test X"$gidsize" = X"$intsize"; then
17595 if $test X"$gidsize" = X"$shortsize"; then
17602 *) if $test X"$gidsize" = X"$uvsize"; then
17603 gidformat="$uvuformat"
17605 if $test X"$gidsize" = X"$longsize"; then
17608 if $test X"$gidsize" = X"$intsize"; then
17611 if $test X"$gidsize" = X"$shortsize"; then
17620 : see if getgroups exists
17621 set getgroups d_getgrps
17624 : see if setgroups exists
17625 set setgroups d_setgrps
17629 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
17631 case "$d_getgrps$d_setgrps" in
17633 case "$groupstype" in
17634 '') dflt="$gidtype" ;;
17635 *) dflt="$groupstype" ;;
17638 What type of pointer is the second argument to getgroups() and setgroups()?
17639 Usually this is the same as group ids, $gidtype, but not always.
17642 rp='What type pointer is the second argument to getgroups() and setgroups()?'
17646 *) groupstype="$gidtype";;
17650 echo "Checking if your $make program sets \$(MAKE)..." >&4
17651 case "$make_set_make" in
17653 $sed 's/^X //' > testmake.mak << 'EOF'
17655 X @echo 'maketemp="$(MAKE)"'
17657 case "`$make -f testmake.mak 2>/dev/null`" in
17658 *maketemp=*) make_set_make='#' ;;
17659 *) make_set_make="MAKE=$make" ;;
17661 $rm -f testmake.mak
17664 case "$make_set_make" in
17665 '#') echo "Yup, it does.";;
17666 *) echo "Nope, it doesn't.";;
17669 : see what type is used for mode_t
17670 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
17671 set mode_t modetype int stdio.h sys/types.h
17674 : see if stdarg is available
17676 if $test `./findhdr stdarg.h`; then
17677 echo "<stdarg.h> found." >&4
17680 echo "<stdarg.h> NOT found." >&4
17684 : see if varags is available
17686 if $test `./findhdr varargs.h`; then
17687 echo "<varargs.h> found." >&4
17689 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
17692 : set up the varargs testing programs
17693 $cat > varargs.c <<EOP
17695 #include <stdarg.h>
17698 #include <varargs.h>
17702 int f(char *p, ...)
17716 p = va_arg(ap, char *);
17721 $cat > varargs <<EOP
17723 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
17732 : now check which varargs header should be included
17737 if `./varargs I_STDARG`; then
17739 elif `./varargs I_VARARGS`; then
17744 if `./varargs I_VARARGS`; then
17751 echo "I could not find the definition for va_dcl... You have problems..." >&4
17752 val="$undef"; set i_stdarg; eval $setvar
17753 val="$undef"; set i_varargs; eval $setvar
17758 case "$i_varhdr" in
17760 val="$define"; set i_stdarg; eval $setvar
17761 val="$undef"; set i_varargs; eval $setvar
17764 val="$undef"; set i_stdarg; eval $setvar
17765 val="$define"; set i_varargs; eval $setvar
17768 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
17772 : see if we need va_copy
17774 case "$i_stdarg" in
17777 #include <stdarg.h>
17779 #$i_stdlib I_STDLIB
17781 #include <stdlib.h>
17783 #include <signal.h>
17786 ivfprintf(FILE *f, const char *fmt, va_list *valp)
17788 return vfprintf(f, fmt, *valp);
17792 myvfprintf(FILE *f, const char *fmt, va_list val)
17794 return ivfprintf(f, fmt, &val);
17798 myprintf(char *fmt, ...)
17801 va_start(val, fmt);
17802 return myvfprintf(stdout, fmt, val);
17806 main(int ac, char **av)
17808 signal(SIGSEGV, exit);
17810 myprintf("%s%cs all right, then\n", "that", '\'');
17815 if eval $compile && $run ./try 2>&1 >/dev/null; then
17816 case "`$run ./try`" in
17817 "that's all right, then")
17823 yes) echo "It seems that you don't need va_copy()." >&4
17824 need_va_copy="$undef"
17826 *) echo "It seems that va_copy() or similar will be needed." >&4
17827 need_va_copy="$define"
17830 $rm -f try.* core core.* *.core *.core.*
17832 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
17836 : see what type is used for size_t
17837 rp="What is the type used for the length parameter for string functions?"
17838 set size_t sizetype 'unsigned int' stdio.h sys/types.h
17841 : check for type of arguments to gethostbyaddr.
17842 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
17843 case "$d_gethbyaddr" in
17847 Checking to see what type of arguments are accepted by gethostbyaddr().
17849 hdrs="$define sys/types.h
17850 $d_socket sys/socket.h
17851 $i_niin netinet/in.h
17853 $i_unistd unistd.h"
17854 : The first arg can 'char *' or 'void *'
17855 : The second arg is some of integral type
17856 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
17857 for yyy in size_t long int; do
17858 case "$netdb_host_type" in
17859 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
17860 if ./protochk "$try" $hdrs; then
17861 echo "Your system accepts $xxx for the first arg."
17862 echo "...and $yyy for the second arg."
17863 netdb_host_type="$xxx"
17864 netdb_hlen_type="$yyy"
17870 : In case none of those worked, prompt the user.
17871 case "$netdb_host_type" in
17872 '') rp='What is the type for the 1st argument to gethostbyaddr?'
17875 netdb_host_type=$ans
17876 rp='What is the type for the 2nd argument to gethostbyaddr?'
17879 netdb_hlen_type=$ans
17883 *) : no gethostbyaddr, so pick harmless defaults
17884 netdb_host_type='char *'
17885 netdb_hlen_type="$sizetype"
17888 # Remove the "const" if needed. -- but then we'll have a
17890 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
17893 : check for type of argument to gethostbyname.
17894 if test "X$netdb_name_type" = X ; then
17895 case "$d_gethbyname" in
17899 Checking to see what type of argument is accepted by gethostbyname().
17901 hdrs="$define sys/types.h
17902 $d_socket sys/socket.h
17903 $i_niin netinet/in.h
17905 $i_unistd unistd.h"
17906 for xxx in "const char *" "char *"; do
17907 case "$netdb_name_type" in
17908 '') try="extern struct hostent *gethostbyname($xxx);"
17909 if ./protochk "$try" $hdrs; then
17910 echo "Your system accepts $xxx."
17911 netdb_name_type="$xxx"
17916 : In case none of those worked, prompt the user.
17917 case "$netdb_name_type" in
17918 '') rp='What is the type for the 1st argument to gethostbyname?'
17921 netdb_name_type=$ans
17925 *) : no gethostbyname, so pick harmless default
17926 netdb_name_type='char *'
17931 : check for type of 1st argument to getnetbyaddr.
17932 if test "X$netdb_net_type" = X ; then
17933 case "$d_getnbyaddr" in
17937 Checking to see what type of 1st argument is accepted by getnetbyaddr().
17939 hdrs="$define sys/types.h
17940 $d_socket sys/socket.h
17941 $i_niin netinet/in.h
17943 $i_unistd unistd.h"
17944 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
17945 case "$netdb_net_type" in
17946 '') try="extern struct netent *getnetbyaddr($xxx, int);"
17947 if ./protochk "$try" $hdrs; then
17948 echo "Your system accepts $xxx."
17949 netdb_net_type="$xxx"
17954 : In case none of those worked, prompt the user.
17955 case "$netdb_net_type" in
17956 '') rp='What is the type for the 1st argument to getnetbyaddr?'
17959 netdb_net_type=$ans
17963 *) : no getnetbyaddr, so pick harmless default
17964 netdb_net_type='long'
17968 : locate the preferred pager for this system
17975 [a-zA-Z]:/*) dflt=$pg;;
17979 [a-zA-Z]:/*) dflt=$more;;
17983 [a-zA-Z]:/*) dflt=$less;;
17986 '') dflt=/usr/ucb/more;;
17990 : Instruct ./getfile to trust the hinted or previous pager value,
17991 : even if it does not begin with a slash. For example, on os2,
17992 : pager might be cmd /c more. See comments in UU/getfile.
17997 rp='What pager is used on your system?'
18001 : see what type pids are declared as in the kernel
18002 rp="What is the type of process ids on this system?"
18003 set pid_t pidtype int stdio.h sys/types.h
18006 : Find earliest binary compatible site_perl subdirectory perl can use.
18007 xs_apiversion=$version # The current site_perl version.
18008 : Find earliest pure perl site_perl subdirectory perl can use.
18009 : The versioned directories started at 5.005.
18010 pm_apiversion='5.005'
18012 : see if ar generates random libraries by itself
18014 echo "Checking how to generate random libraries on your machine..." >&4
18015 echo 'int bar1() { return bar2(); }' > bar1.c
18016 echo 'int bar2() { return 2; }' > bar2.c
18017 $cat > foo.c <<'EOP'
18018 int main() { printf("%d\n", bar1()); exit(0); }
18020 $cc $ccflags -c bar1.c >/dev/null 2>&1
18021 $cc $ccflags -c bar2.c >/dev/null 2>&1
18022 $cc $ccflags -c foo.c >/dev/null 2>&1
18023 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
18024 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18025 $run ./foobar >/dev/null 2>&1; then
18026 echo "$ar appears to generate random libraries itself."
18029 elif $ar ts bar$_a >/dev/null 2>&1 &&
18030 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18031 $run ./foobar >/dev/null 2>&1; then
18032 echo "a table of contents needs to be added with '$ar ts'."
18039 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
18040 $test -f $ranlib || ranlib=''
18043 if $test -n "$ranlib"; then
18044 echo "your system has '$ranlib'; we'll use that."
18047 echo "your system doesn't seem to support random libraries"
18048 echo "so we'll use lorder and tsort to order the libraries."
18055 : check for type of arguments to select.
18056 case "$selecttype" in
18057 '') case "$d_select" in
18061 Checking to see what type of arguments are accepted by select().
18063 hdrs="$define sys/types.h
18064 $i_systime sys/time.h
18065 $i_sysselct sys/select.h
18066 $d_socket sys/socket.h"
18067 : The first arg can be int, unsigned, or size_t
18068 : The last arg may or may not be 'const'
18070 : void pointer has been seen but using that
18071 : breaks the selectminbits test
18072 for xxx in 'fd_set *' 'int *'; do
18073 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
18074 for tmo in 'struct timeval *' 'const struct timeval *'; do
18076 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
18077 if ./protochk "$try" $hdrs; then
18078 echo "Your system accepts $xxx."
18087 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
18088 case "$d_fd_set" in
18089 $define) dflt="fd_set *" ;;
18098 *) : no select, so pick a harmless default
18105 : check for the select 'width'
18106 case "$selectminbits" in
18107 '') case "$d_select" in
18111 Checking to see on how many bits at a time your select() operates...
18114 #include <sys/types.h>
18116 #$i_systime I_SYS_TIME
18117 #$i_systimek I_SYS_TIME_KERNEL
18122 # ifdef I_SYS_TIME_KERNEL
18125 # include <sys/time.h>
18126 # ifdef I_SYS_TIME_KERNEL
18130 #$i_sysselct I_SYS_SELECT
18131 #ifdef I_SYS_SELECT
18132 #include <sys/select.h>
18134 #$d_socket HAS_SOCKET
18136 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
18140 #define S sizeof(*(b))
18142 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
18143 #define NBITS (NBYTES * 8)
18152 fp = fopen("try.c", "r");
18158 b = ($selecttype)s;
18159 for (i = 0; i < NBITS; i++)
18163 select(fd + 1, b, 0, 0, &t);
18164 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
18165 printf("%d\n", i + 1);
18170 if eval $compile_ok; then
18171 selectminbits=`$run ./try`
18172 case "$selectminbits" in
18174 Cannot figure out on how many bits at a time your select() operates.
18175 I'll play safe and guess it is 32 bits.
18181 *) bits="$selectminbits bits" ;;
18183 echo "Your select() operates on $bits at a time." >&4
18185 rp='What is the minimum number of bits your select() operates on?'
18186 case "$byteorder" in
18187 1234|12345678) dflt=32 ;;
18192 selectminbits="$val"
18196 *) : no select, so pick a harmless default
18203 : Trace out the files included by signal.h, then look for SIGxxx names.
18204 : Remove SIGARRAYSIZE used by HPUX.
18205 : Remove SIGSTKSIZE used by Linux.
18206 : Remove SIGSTKSZ used by Posix.
18207 : Remove SIGTYP void lines used by OS2.
18208 : Some cpps, like os390, dont give the file name anywhere
18209 if [ "X$fieldn" = X ]; then
18210 : Just make some guesses. We check them later.
18211 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
18213 xxx=`echo '#include <signal.h>' |
18214 $cppstdin $cppminus $cppflags 2>/dev/null |
18215 $grep '^[ ]*#.*include' |
18216 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
18218 : Check this list of files to be sure we have parsed the cpp output ok.
18219 : This will also avoid potentially non-existent files, such
18222 for xx in $xxx /dev/null ; do
18223 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
18225 : If we have found no files, at least try signal.h
18226 case "$xxxfiles" in
18227 '') xxxfiles=`./findhdr signal.h` ;;
18230 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
18231 print substr($2, 4, 20)
18233 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
18234 print substr($3, 4, 20)
18236 : Append some common names just in case the awk scan failed.
18237 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
18238 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
18239 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
18240 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
18241 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
18243 : generate a few handy files for later
18244 $cat > signal.c <<'EOCP'
18245 #include <sys/types.h>
18246 #include <signal.h>
18250 /* Strange style to avoid deeply-nested #if/#else/#endif */
18253 # define NSIG (_NSIG)
18259 # define NSIG (SIGMAX+1)
18265 # define NSIG (SIG_MAX+1)
18271 # define NSIG (MAXSIG+1)
18277 # define NSIG (MAX_SIG+1)
18282 # ifdef SIGARRAYSIZE
18283 # define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
18289 # define NSIG (_sys_nsig) /* Solaris 2.5 */
18293 /* Default to some arbitrary number that's big enough to get most
18294 of the common signals.
18300 printf("NSIG %d\n", NSIG);
18306 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
18308 printf "#ifdef SIG"; printf $1; printf "\n"
18309 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
18310 printf $1; printf ");\n"
18314 printf "#endif /* JUST_NSIG */\n";
18315 printf "exit(0);\n}\n";
18318 $cat >signal.awk <<'EOP'
18319 BEGIN { ndups = 0 }
18320 $1 ~ /^NSIG$/ { nsig = $2 }
18321 ($1 !~ /^NSIG$/) && (NF == 2) {
18322 if ($2 > maxsig) { maxsig = $2 }
18323 if (sig_name[$2]) {
18324 dup_name[ndups] = $1
18325 dup_num[ndups] = $2
18337 printf("NSIG %d\n", nsig);
18338 for (n = 1; n < nsig; n++) {
18340 printf("%s %d\n", sig_name[n], sig_num[n])
18343 printf("NUM%d %d\n", n, n)
18346 for (n = 0; n < ndups; n++) {
18347 printf("%s %d\n", dup_name[n], dup_num[n])
18351 $cat >signal_cmd <<EOS
18353 if $test -s signal.lst; then
18354 echo "Using your existing signal.lst file"
18359 $cat >>signal_cmd <<'EOS'
18362 if eval $compile_ok; then
18363 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst
18365 echo "(I can't seem be able to compile the whole test program)" >&4
18366 echo "(I'll try it in little pieces.)" >&4
18367 set signal -DJUST_NSIG
18368 if eval $compile_ok; then
18369 $run ./signal$_exe > signal.nsg
18372 echo "I can't seem to figure out how many signals you have." >&4
18373 echo "Guessing 50." >&4
18374 echo 'NSIG 50' > signal.nsg
18376 : Now look at all the signal names, one at a time.
18377 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
18378 $cat > signal.c <<EOCP
18379 #include <sys/types.h>
18380 #include <signal.h>
18383 printf("$xx %d\n", SIG${xx});
18388 if eval $compile; then
18389 echo "SIG${xx} found."
18390 $run ./signal$_exe >> signal.ls1
18392 echo "SIG${xx} NOT found."
18395 if $test -s signal.ls1; then
18396 $cat signal.nsg signal.ls1 |
18397 $sort -n | $uniq | $awk -f signal.awk >signal.lst
18401 if $test -s signal.lst; then
18404 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
18405 echo 'kill -l' >signal
18406 set X `csh -f <signal`
18410 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
18412 echo $@ | $tr ' ' $trnl | \
18413 $awk '{ printf "%s %d\n", $1, ++s; }
18414 END { printf "NSIG %d\n", ++s }' >signal.lst
18416 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
18418 chmod a+x signal_cmd
18419 $eunicefix signal_cmd
18421 : generate list of signal names
18423 case "$sig_name_init" in
18425 *) case "$sig_num_init" in
18426 ''|*,*) doinit=yes ;;
18431 echo "Generating a list of signal names and numbers..." >&4
18433 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
18434 sig_name=`$awk 'BEGIN { printf "ZERO " }
18435 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
18436 sig_num=`$awk 'BEGIN { printf "0 " }
18437 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
18438 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
18439 !/^NSIG/ { printf "\"%s\", ", $1 }
18440 END { printf "0\n" }' signal.lst`
18441 sig_num_init=`$awk 'BEGIN { printf "0, " }
18442 !/^NSIG/ { printf "%d, ", $2}
18443 END { printf "0\n"}' signal.lst`
18446 echo "The following $sig_count signals are available:"
18448 echo $sig_name | $awk \
18449 'BEGIN { linelen = 0 }
18451 for (i = 1; i <= NF; i++) {
18452 name = "SIG" $i " "
18453 linelen = linelen + length(name)
18454 if (linelen > 70) {
18456 linelen = length(name)
18462 sig_size=`echo $sig_name | awk '{print NF}'`
18463 $rm -f signal signal.c signal.awk signal.lst signal_cmd
18466 case "$sizetype" in
18467 *_t) zzz="$sizetype" ;;
18468 *) zzz="filesize" ;;
18470 echo "Checking the size of $zzz..." >&4
18472 #include <sys/types.h>
18475 printf("%d\n", (int)sizeof($sizetype));
18480 if eval $compile_ok; then
18484 echo "(I can't execute the test program--guessing $sizesize.)" >&4
18487 echo "Your $zzz size is $sizesize bytes."
18492 echo "(I can't compile the test program--guessing $sizesize.)" >&4
18496 : check for socklen_t
18498 echo "Checking to see if you have socklen_t..." >&4
18500 #include <sys/types.h>
18501 #$d_socket HAS_SOCKET
18503 #include <sys/socket.h>
18505 int main() { socklen_t x = 16; }
18508 if eval $compile; then
18510 echo "You have socklen_t."
18513 echo "You do not have socklen_t."
18514 case "$sizetype" in
18515 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
18522 : see if this is a socks.h system
18523 set socks.h i_socks
18526 : check for type of the size argument to socket calls
18527 case "$d_socket" in
18531 Checking to see what type is the last argument of accept().
18534 case "$d_socklen_t" in
18535 "$define") yyy="$yyy socklen_t"
18537 yyy="$yyy $sizetype int long unsigned"
18538 for xxx in $yyy; do
18539 case "$socksizetype" in
18540 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
18541 case "$usesocks" in
18543 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
18544 echo "Your system accepts '$xxx *' for the last argument of accept()."
18545 socksizetype="$xxx"
18548 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
18549 echo "Your system accepts '$xxx *' for the last argument of accept()."
18550 socksizetype="$xxx"
18557 : In case none of those worked, prompt the user.
18558 case "$socksizetype" in
18559 '') rp='What is the type for socket address structure sizes?'
18566 *) : no sockets, so pick relatively harmless default
18571 : see what type is used for signed size_t
18572 set ssize_t ssizetype int stdio.h sys/types.h
18577 #include <sys/types.h>
18578 #define Size_t $sizetype
18579 #define SSize_t $dflt
18582 if (sizeof(Size_t) == sizeof(SSize_t))
18584 else if (sizeof(Size_t) == sizeof(int))
18593 if eval $compile_ok && $run ./try > /dev/null; then
18594 ssizetype=`$run ./try`
18595 echo "I'll be using $ssizetype for functions returning a byte count." >&4
18598 Help! I can't compile and run the ssize_t test program: please enlighten me!
18599 (This is probably a misconfiguration in your system or libraries, and
18600 you really ought to fix it. Still, I'll try anyway.)
18602 I need a type that is the same size as $sizetype, but is guaranteed to
18603 be signed. Common values are ssize_t, int and long.
18606 rp="What signed type is the same size as $sizetype?"
18612 : see what type of char stdio uses.
18614 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
18615 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
18616 echo "Your stdio uses unsigned chars." >&4
18617 stdchar="unsigned char"
18619 echo "Your stdio uses signed chars." >&4
18626 : see what type uids are declared as in the kernel
18628 echo "Looking for the type for user ids returned by getuid()."
18629 set uid_t uidtype xxx stdio.h sys/types.h
18633 xxx=`./findhdr sys/user.h`
18634 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
18636 unsigned) dflt="$1 $2" ;;
18640 *) dflt="$uidtype";;
18643 uid_t) echo "uid_t found." ;;
18644 *) rp="What is the type for user ids returned by getuid()?"
18652 *_t) zzz="$uidtype" ;;
18655 echo "Checking the size of $zzz..." >&4
18657 #include <sys/types.h>
18660 printf("%d\n", (int)sizeof($uidtype));
18665 if eval $compile_ok; then
18669 echo "(I can't execute the test program--guessing $uidsize.)" >&4
18672 echo "Your $zzz is $uidsize bytes long."
18677 echo "(I can't compile the test program--guessing $uidsize.)" >&4
18682 *_t) zzz="$uidtype" ;;
18685 echo "Checking the sign of $zzz..." >&4
18687 #include <sys/types.h>
18698 if eval $compile; then
18702 echo "(I can't execute the test program--guessing unsigned.)" >&4
18706 1) echo "Your $zzz is unsigned." ;;
18707 -1) echo "Your $zzz is signed." ;;
18713 echo "(I can't compile the test program--guessing unsigned.)" >&4
18719 $echo "Checking the format string to be used for uids..." >&4
18722 -1) if $test X"$uidsize" = X"$ivsize"; then
18723 uidformat="$ivdformat"
18725 if $test X"$uidsize" = X"$longsize"; then
18728 if $test X"$uidsize" = X"$intsize"; then
18731 if $test X"$uidsize" = X"$shortsize"; then
18738 *) if $test X"$uidsize" = X"$uvsize"; then
18739 uidformat="$uvuformat"
18741 if $test X"$uidsize" = X"$longsize"; then
18744 if $test X"$uidsize" = X"$intsize"; then
18747 if $test X"$uidsize" = X"$shortsize"; then
18756 : determine compiler compiler
18765 if $test -f "$byacc$_exe"; then
18767 comp="byacc or $comp"
18769 if $test -f "$bison$_exe"; then
18770 comp="$comp or bison -y"
18772 rp="Which compiler compiler ($comp) shall I use?"
18781 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
18787 : see if this is a fp.h system
18791 : see if this is a fp_class.h system
18792 set fp_class.h i_fp_class
18795 : see if this is a ieeefp.h system
18796 case "$i_ieeefp" in
18797 '' ) set ieeefp.h i_ieeefp
18802 : see if this is a libutil.h system
18803 set libutil.h i_libutil
18806 : see if mach cthreads are available
18807 if test "X$usethreads" = "X$define"; then
18808 set mach/cthreads.h i_machcthr
18811 i_machcthr="$undef"
18816 : see if this is a math.h system
18820 : see if this is a mntent.h system
18821 set mntent.h i_mntent
18824 : see if ndbm.h is available
18830 # Some Linux distributions such as RedHat 7.1 put the
18831 # ndbm.h header in /usr/include/gdbm/ndbm.h.
18832 if $test -f /usr/include/gdbm/ndbm.h; then
18833 echo '<gdbm/ndbm.h> found.'
18834 ccflags="$ccflags -I/usr/include/gdbm"
18835 cppflags="$cppflags -I/usr/include/gdbm"
18843 : see if dbm_open exists
18844 set dbm_open d_dbm_open
18846 case "$d_dbm_open" in
18849 echo "We won't be including <ndbm.h>"
18858 : see if net/errno.h is available
18860 set net/errno.h val
18863 : Unfortunately, it causes problems on some systems. Arrgh.
18866 cat > try.c <<'EOM'
18869 #include <net/errno.h>
18875 if $cc $ccflags -c try.c >/dev/null 2>&1; then
18876 echo "We'll be including <net/errno.h>." >&4
18878 echo "We won't be including <net/errno.h>." >&4
18887 : see if netinet/tcp.h is available
18888 set netinet/tcp.h i_netinettcp
18891 : see if this is a poll.h system
18895 : see if this is a prot.h system
18900 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
18901 $cat <<'EOSH' > Cppsym.know
18902 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
18903 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
18904 alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX
18905 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
18906 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
18907 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
18908 bull c cadmus clipper CMU COFF COMPILER_VERSION
18909 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
18910 CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
18911 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
18912 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
18914 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
18915 H3050R H3050RX hbullx20 hcx host_mips
18916 hp200 hp300 hp700 HP700 hp800 hp9000
18917 hp9000s200 hp9000s300 hp9000s400 hp9000s500
18918 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
18919 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
18920 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
18921 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
18922 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
18923 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
18924 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
18925 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
18926 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
18927 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
18928 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
18929 MATH_HAS_NO_SIDE_EFFECTS
18930 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
18931 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
18932 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
18933 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
18934 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
18935 NetBSD news1500 news1700 news1800 news1900 news3700
18936 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
18937 ns32016 ns32332 ns32k nsc32000
18938 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
18939 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
18940 pc532 pdp11 PGC PIC plexus PORTAR posix
18941 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
18942 POSIX_C_SOURCE POSIX_SOURCE POWER
18943 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
18944 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
18945 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
18946 sony sony_news sonyrisc sparc sparclite spectrum
18947 stardent stdc STDC_EXT stratos sun sun3 sun386
18948 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
18949 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
18950 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
18951 sysV68 sysV88 Tek4132 Tek4300 titan
18952 TM3200 TM5400 TM5600
18953 tower tower32 tower32_200 tower32_600 tower32_700
18954 tower32_800 tower32_850 tss
18955 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
18956 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
18957 unix UNIX95 UNIX99 unixpc unos
18958 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
18959 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
18960 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
18962 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
18963 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
18964 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
18967 # Maybe put other stuff here too.
18968 cat <<EOSH >>Cppsym.know
18971 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
18972 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
18973 $cat Cppsym.know > Cppsym.c
18974 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
18975 $rm -f Cppsym.a Cppsym.b Cppsym.c
18976 cat <<EOSH > Cppsym
18978 if $test \$# -gt 0; then
18979 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
18980 if $test -s Cppsym.got; then
18987 $tr " " "$trnl" | ./Cppsym.try
18993 cat <<EOSH > Cppsym.try
18995 cat <<'EOCP' > try.c
19001 cat <<'EOSH' >> Cppsym.try
19003 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
19004 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
19005 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
19006 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
19008 echo 'return 0;}' >> try.c
19010 cat <<EOSH >> Cppsym.try
19012 case "$osname-$gccversion" in
19013 irix-) ccflags="\$ccflags -woff 1178" ;;
19014 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
19016 $cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try
19018 chmod +x Cppsym.try
19019 $eunicefix Cppsym.try
19020 ./Cppsym < Cppsym.know > Cppsym.true
19021 : now check the C compiler for additional symbols
19022 postprocess_cc_v=''
19024 aix) postprocess_cc_v="|$tr , ' '" ;;
19031 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
19034 -D*) echo "\$i" | $sed 's/^-D//';;
19035 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
19040 postprocess_cc_v=''
19043 ./ccsym > ccsym1.raw
19044 if $test -s ccsym1.raw; then
19045 $sort ccsym1.raw | $uniq >ccsym.raw
19047 mv ccsym1.raw ccsym.raw
19050 $awk '/\=/ { print $0; next }
19051 { print $0"=1" }' ccsym.raw >ccsym.list
19052 $awk '/\=/ { print $0; next }
19053 { print $0"=1" }' Cppsym.true >ccsym.true
19054 $comm -13 ccsym.true ccsym.list >ccsym.own
19055 $comm -12 ccsym.true ccsym.list >ccsym.com
19056 $comm -23 ccsym.true ccsym.list >ccsym.cpp
19058 if $test -z ccsym.raw; then
19059 echo "Your C compiler doesn't seem to define any symbols!" >&4
19061 echo "However, your C preprocessor defines the following symbols:"
19064 cppsymbols=`$cat Cppsym.true`
19065 cppsymbols=`echo $cppsymbols`
19066 cppccsymbols="$cppsymbols"
19068 if $test -s ccsym.com; then
19069 echo "Your C compiler and pre-processor define these symbols:"
19070 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
19073 cppccsymbols=`$cat ccsym.com`
19074 cppccsymbols=`echo $cppccsymbols`
19075 $test "$silent" || sleep 1
19077 if $test -s ccsym.cpp; then
19078 $test "$also" && echo " "
19079 echo "Your C pre-processor ${also}defines the following symbols:"
19080 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
19082 cppsymbols=`$cat ccsym.cpp`
19083 cppsymbols=`echo $cppsymbols`
19084 $test "$silent" || sleep 1
19086 if $test -s ccsym.own; then
19087 $test "$also" && echo " "
19088 echo "Your C compiler ${also}defines the following cpp symbols:"
19089 $sed -e 's/\(..*\)=1/\1/' ccsym.own
19090 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
19091 ccsymbols=`$cat ccsym.own`
19092 ccsymbols=`echo $ccsymbols`
19093 $test "$silent" || sleep 1
19097 : see if this is a termio system
19101 if $test `./findhdr termios.h`; then
19102 set tcsetattr i_termios
19108 "$define") echo "You have POSIX termios.h... good!" >&4;;
19109 *) if ./Cppsym pyr; then
19110 case "`/bin/universe`" in
19111 ucb) if $test `./findhdr sgtty.h`; then
19113 echo "<sgtty.h> found." >&4
19115 echo "System is pyramid with BSD universe."
19116 echo "<sgtty.h> not found--you could have problems." >&4
19118 *) if $test `./findhdr termio.h`; then
19120 echo "<termio.h> found." >&4
19122 echo "System is pyramid with USG universe."
19123 echo "<termio.h> not found--you could have problems." >&4
19127 if $test `./findhdr termio.h`; then
19128 echo "<termio.h> found." >&4
19130 elif $test `./findhdr sgtty.h`; then
19131 echo "<sgtty.h> found." >&4
19134 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
19137 if $test `./findhdr sgtty.h`; then
19138 echo "<sgtty.h> found." >&4
19140 elif $test `./findhdr termio.h`; then
19141 echo "<termio.h> found." >&4
19144 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
19148 set i_termio; eval $setvar
19149 val=$val2; set i_sgtty; eval $setvar
19150 val=$val3; set i_termios; eval $setvar
19152 : see if stddef is available
19153 set stddef.h i_stddef
19156 : see if this is a sunmath.h system
19157 set sunmath.h i_sunmath
19160 : see if sys/access.h is available
19161 set sys/access.h i_sysaccess
19164 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
19165 set sys/filio.h i_sysfilio
19168 if $test `./findhdr sys/ioctl.h`; then
19170 echo '<sys/ioctl.h> found.' >&4
19173 if $test $i_sysfilio = "$define"; then
19174 echo '<sys/ioctl.h> NOT found.' >&4
19176 $test $i_sgtty = "$define" && xxx="sgtty.h"
19177 $test $i_termio = "$define" && xxx="termio.h"
19178 $test $i_termios = "$define" && xxx="termios.h"
19179 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
19185 : see if socket ioctl defs are in sys/sockio.h
19187 xxx=`./findhdr sys/sockio.h`
19188 if $test "$xxx"; then
19189 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
19191 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
19194 echo "No socket ioctls found in <sys/sockio.h>." >&4
19199 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
19206 : see if this is a syslog.h system
19207 set syslog.h i_syslog
19211 : see if this is a sys/mode.h system
19212 set sys/mode.h i_sysmode
19215 : see if sys/resource.h has to be included
19216 set sys/resource.h i_sysresrc
19219 : see if sys/security.h is available
19220 set sys/security.h i_syssecrt
19223 : see if this is a sys/statvfs.h system
19224 set sys/statvfs.h i_sysstatvfs
19227 : see if this is a sys/un.h system
19228 set sys/un.h i_sysun
19232 : see if this is a sys/utsname.h system
19233 set sys/utsname.h i_sysutsname
19236 : see if this is a syswait system
19237 set sys/wait.h i_syswait
19240 : see if this is a ustat.h system
19241 set ustat.h i_ustat
19244 : see if this is an utime system
19245 set utime.h i_utime
19248 : see if this is a values.h system
19249 set values.h i_values
19252 : see if this is a vfork system
19255 set vfork.h i_vfork
19263 : see if gdbm.h is available
19268 : see if gdbm_open exists
19269 set gdbm_open d_gdbm_open
19271 case "$d_gdbm_open" in
19274 echo "We won't be including <gdbm.h>"
19284 echo "Looking for extensions..." >&4
19285 : If we are using the old config.sh, known_extensions may contain
19286 : old or inaccurate or duplicate values.
19287 known_extensions=''
19288 nonxs_extensions=''
19289 : We do not use find because it might not be available.
19290 : We do not just use MANIFEST because the user may have dropped
19291 : some additional extensions into the source tree and expect them
19294 : Function to recursively find available extensions, ignoring DynaLoader
19295 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
19299 DynaLoader|dynaload) ;;
19301 if $test -f $xxx/$xxx.xs; then
19302 known_extensions="$known_extensions $1$xxx";
19303 elif $test -f $xxx/Makefile.PL; then
19304 nonxs_extensions="$nonxs_extensions $1$xxx";
19306 if $test -d $xxx -a $# -lt 10; then
19309 eval $find_extensions;
19321 eval $find_extensions
19322 # Special case: Add in threads/shared since it is not picked up by the
19323 # recursive find above (and adding in general recursive finding breaks
19324 # SDBM_File/sdbm). A.D. 10/25/2001.
19325 known_extensions="$known_extensions threads/shared"
19326 set X $nonxs_extensions
19328 nonxs_extensions="$*"
19329 set X $known_extensions
19331 known_extensions="$*"
19334 : Now see which are supported on this system.
19336 for xxx in $known_extensions ; do
19340 $define) avail_ext="$avail_ext $xxx" ;;
19343 GDBM_File|gdbm_fil)
19345 $define) avail_ext="$avail_ext $xxx" ;;
19348 I18N/Langinfo|i18n_lan)
19349 case "$i_langinfo$d_nl_langinfo" in
19350 $define$define) avail_ext="$avail_ext $xxx" ;;
19353 NDBM_File|ndbm_fil)
19356 case "$osname-$use64bitint" in
19359 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
19362 *) avail_ext="$avail_ext $xxx" ;;
19367 ODBM_File|odbm_fil)
19368 case "${i_dbm}${i_rpcsvcdbm}" in
19370 case "$osname-$use64bitint" in
19373 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
19376 *) avail_ext="$avail_ext $xxx" ;;
19382 case "$useposix" in
19383 true|define|y) avail_ext="$avail_ext $xxx" ;;
19387 case "$useopcode" in
19388 true|define|y) avail_ext="$avail_ext $xxx" ;;
19392 case "$d_socket" in
19395 beos) ;; # not unless BONE
19396 *) avail_ext="$avail_ext $xxx" ;;
19401 Sys/Syslog|sys/syslog)
19402 : XXX syslog requires socket
19403 case "$d_socket" in
19404 true|$define|y) avail_ext="$avail_ext $xxx" ;;
19408 case "$usethreads" in
19410 case "$useithreads" in
19411 $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
19415 XS/APItest|xs/apitest)
19416 # This is just for testing. Skip it unless we have dynamic loading.
19419 $define) avail_ext="$avail_ext $xxx" ;;
19422 XS/Typemap|xs/typemap)
19423 # This is just for testing. Skip it unless we have dynamic loading.
19425 $define) avail_ext="$avail_ext $xxx" ;;
19428 threads|threads/shared)
19429 # threads and threads::shared are special cases.
19430 # To stop people from asking "Perl 5.8.0 was supposed
19431 # to have this new fancy threads implementation but my
19432 # perl doesn't have it" and from people trying to
19433 # (re)install the threads module using CPAN.pm and
19434 # CPAN.pm then offering to reinstall Perl 5.8.0,
19435 # the threads.pm and threads/shared.pm will always be
19436 # there, croaking informatively ("you need to rebuild
19437 # all of Perl with threads, sorry") when threads haven't
19438 # been compiled in.
19440 avail_ext="$avail_ext $xxx"
19443 : XXX Do we need a useipcsysv variable here
19444 case "${d_msg}${d_sem}${d_shm}" in
19445 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
19448 *) avail_ext="$avail_ext $xxx"
19457 : Now see which nonxs extensions are supported on this system.
19458 : For now assume all are.
19460 for xxx in $nonxs_extensions ; do
19462 *) nonxs_ext="$nonxs_ext $xxx"
19474 A number of extensions are supplied with $package. You may choose to
19475 compile these extensions for dynamic loading (the default), compile
19476 them into the $package executable (static loading), or not include
19477 them at all. Answer "none" to include no extensions.
19478 Note that DynaLoader is always built and need not be mentioned here.
19481 case "$dynamic_ext" in
19483 : Exclude those listed in static_ext
19485 for xxx in $avail_ext; do
19486 case " $static_ext " in
19488 *) dflt="$dflt $xxx" ;;
19495 *) dflt="$dynamic_ext"
19496 # Perhaps we are reusing an old out-of-date config.sh.
19499 if test X"$dynamic_ext" != X"$avail_ext"; then
19501 NOTICE: Your previous config.sh list may be incorrect.
19502 The extensions now available to you are
19504 but the default list from your previous config.sh is
19516 rp="What extensions do you wish to load dynamically?"
19519 none) dynamic_ext=' ' ;;
19520 *) dynamic_ext="$ans" ;;
19523 case "$static_ext" in
19525 : Exclude those already listed in dynamic linking
19527 for xxx in $avail_ext; do
19528 case " $dynamic_ext " in
19530 *) dflt="$dflt $xxx" ;;
19537 *) dflt="$static_ext"
19544 rp="What extensions do you wish to load statically?"
19547 none) static_ext=' ' ;;
19548 *) static_ext="$ans" ;;
19553 A number of extensions are supplied with $package. Answer "none"
19554 to include no extensions.
19555 Note that DynaLoader is always built and need not be mentioned here.
19558 case "$static_ext" in
19559 '') dflt="$avail_ext" ;;
19560 *) dflt="$static_ext"
19561 # Perhaps we are reusing an old out-of-date config.sh.
19564 if test X"$static_ext" != X"$avail_ext"; then
19566 NOTICE: Your previous config.sh list may be incorrect.
19567 The extensions now available to you are
19569 but the default list from your previous config.sh is
19578 : Exclude those that are not xs extensions
19582 rp="What extensions do you wish to include?"
19585 none) static_ext=' ' ;;
19586 *) static_ext="$ans" ;;
19591 # Encode is a special case. If we are building Encode as a static
19592 # extension, we need to explicitly list its subextensions as well.
19593 # For other nested extensions, this is handled automatically by
19594 # the appropriate Makefile.PL.
19595 case " $static_ext " in
19596 *" Encode "*) # Add the subextensions of Encode
19598 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
19599 static_ext="$static_ext Encode/$xxx"
19605 set X $dynamic_ext $static_ext $nonxs_ext
19609 : Remove libraries needed only for extensions
19610 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
19611 : The exception is SunOS 4.x, which needs them.
19612 case "${osname}X${osvers}" in
19616 *) case "$usedl" in
19617 $define|true|[yY]*)
19618 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
19622 *) perllibs="$libs"
19628 : Remove build directory name from cppstdin so it can be used from
19629 : either the present location or the final installed location.
19631 : Get out of the UU directory to get correct path name.
19633 case "$cppstdin" in
19635 echo "Stripping down cppstdin path name"
19641 : end of configuration questions
19643 echo "End of configuration questions."
19646 : back to where it started
19647 if test -d ../UU; then
19651 : configuration may be patched via a 'config.arch' file
19652 if $test -f config.arch; then
19653 echo "I see a config.arch file, loading it."
19657 : configuration may be patched via a 'config.over' file
19658 if $test -f config.over; then
19661 rp='I see a config.over file. Do you wish to load it?'
19664 n*) echo "OK, I'll ignore it.";;
19666 echo "Configuration override changes have been loaded."
19671 : in case they want portability, strip down executable paths
19672 case "$d_portable" in
19675 echo "Stripping down executable paths..." >&4
19676 for file in $loclist $trylist; do
19678 eval $file=`basename $temp`
19683 : create config.sh file
19685 echo "Creating config.sh..." >&4
19686 $spitshell <<EOT >config.sh
19689 # This file was produced by running the Configure script. It holds all the
19690 # definitions figured out by Configure. Should you modify one of these values,
19691 # do not forget to propagate your changes by running "Configure -der". You may
19692 # instead choose to run each of the .SH files by yourself, or "Configure -S".
19695 # Package name : $package
19696 # Source directory : $src
19697 # Configuration time: $cf_time
19698 # Configured by : $cf_by
19699 # Target system : $myuname
19709 Revision='$Revision'
19717 alignbytes='$alignbytes'
19718 ansi2knr='$ansi2knr'
19719 aphostname='$aphostname'
19720 api_revision='$api_revision'
19721 api_subversion='$api_subversion'
19722 api_version='$api_version'
19723 api_versionstring='$api_versionstring'
19726 archlibexp='$archlibexp'
19727 archname64='$archname64'
19728 archname='$archname'
19729 archobjs='$archobjs'
19730 asctime_r_proto='$asctime_r_proto'
19738 byteorder='$byteorder'
19740 castflags='$castflags'
19743 cccdlflags='$cccdlflags'
19744 ccdlflags='$ccdlflags'
19746 ccflags_uselargefiles='$ccflags_uselargefiles'
19748 ccsymbols='$ccsymbols'
19749 ccversion='$ccversion'
19751 cf_email='$cf_email'
19753 charsize='$charsize'
19757 clocktype='$clocktype'
19759 compress='$compress'
19760 contains='$contains'
19764 cpp_stuff='$cpp_stuff'
19765 cppccsymbols='$cppccsymbols'
19766 cppflags='$cppflags'
19768 cppminus='$cppminus'
19770 cppstdin='$cppstdin'
19771 cppsymbols='$cppsymbols'
19772 crypt_r_proto='$crypt_r_proto'
19773 cryptlib='$cryptlib'
19775 ctermid_r_proto='$ctermid_r_proto'
19776 ctime_r_proto='$ctime_r_proto'
19777 d_Gconvert='$d_Gconvert'
19778 d_PRIEUldbl='$d_PRIEUldbl'
19779 d_PRIFUldbl='$d_PRIFUldbl'
19780 d_PRIGUldbl='$d_PRIGUldbl'
19781 d_PRIXU64='$d_PRIXU64'
19782 d_PRId64='$d_PRId64'
19783 d_PRIeldbl='$d_PRIeldbl'
19784 d_PRIfldbl='$d_PRIfldbl'
19785 d_PRIgldbl='$d_PRIgldbl'
19786 d_PRIi64='$d_PRIi64'
19787 d_PRIo64='$d_PRIo64'
19788 d_PRIu64='$d_PRIu64'
19789 d_PRIx64='$d_PRIx64'
19790 d_SCNfldbl='$d_SCNfldbl'
19791 d__fwalk='$d__fwalk'
19792 d_access='$d_access'
19793 d_accessx='$d_accessx'
19795 d_archlib='$d_archlib'
19796 d_asctime_r='$d_asctime_r'
19799 d_attribut='$d_attribut'
19803 d_bsdgetpgrp='$d_bsdgetpgrp'
19804 d_bsdsetpgrp='$d_bsdsetpgrp'
19806 d_casti32='$d_casti32'
19807 d_castneg='$d_castneg'
19808 d_charvspr='$d_charvspr'
19810 d_chroot='$d_chroot'
19811 d_chsize='$d_chsize'
19813 d_closedir='$d_closedir'
19814 d_cmsghdr_s='$d_cmsghdr_s'
19817 d_crypt_r='$d_crypt_r'
19819 d_ctermid_r='$d_ctermid_r'
19820 d_ctime_r='$d_ctime_r'
19821 d_cuserid='$d_cuserid'
19822 d_dbl_dig='$d_dbl_dig'
19823 d_dbminitproto='$d_dbminitproto'
19824 d_difftime='$d_difftime'
19826 d_dirnamlen='$d_dirnamlen'
19827 d_dlerror='$d_dlerror'
19828 d_dlopen='$d_dlopen'
19829 d_dlsymun='$d_dlsymun'
19830 d_dosuid='$d_dosuid'
19831 d_drand48_r='$d_drand48_r'
19832 d_drand48proto='$d_drand48proto'
19834 d_eaccess='$d_eaccess'
19835 d_endgrent='$d_endgrent'
19836 d_endgrent_r='$d_endgrent_r'
19837 d_endhent='$d_endhent'
19838 d_endhostent_r='$d_endhostent_r'
19839 d_endnent='$d_endnent'
19840 d_endnetent_r='$d_endnetent_r'
19841 d_endpent='$d_endpent'
19842 d_endprotoent_r='$d_endprotoent_r'
19843 d_endpwent='$d_endpwent'
19844 d_endpwent_r='$d_endpwent_r'
19845 d_endsent='$d_endsent'
19846 d_endservent_r='$d_endservent_r'
19847 d_eofnblk='$d_eofnblk'
19848 d_eunice='$d_eunice'
19849 d_fchdir='$d_fchdir'
19850 d_fchmod='$d_fchmod'
19851 d_fchown='$d_fchown'
19853 d_fcntl_can_lock='$d_fcntl_can_lock'
19854 d_fd_macros='$d_fd_macros'
19855 d_fd_set='$d_fd_set'
19856 d_fds_bits='$d_fds_bits'
19857 d_fgetpos='$d_fgetpos'
19858 d_finite='$d_finite'
19859 d_finitel='$d_finitel'
19860 d_flexfnam='$d_flexfnam'
19862 d_flockproto='$d_flockproto'
19864 d_fp_class='$d_fp_class'
19865 d_fpathconf='$d_fpathconf'
19866 d_fpclass='$d_fpclass'
19867 d_fpclassify='$d_fpclassify'
19868 d_fpclassl='$d_fpclassl'
19869 d_fpos64_t='$d_fpos64_t'
19870 d_frexpl='$d_frexpl'
19871 d_fs_data_s='$d_fs_data_s'
19872 d_fseeko='$d_fseeko'
19873 d_fsetpos='$d_fsetpos'
19874 d_fstatfs='$d_fstatfs'
19875 d_fstatvfs='$d_fstatvfs'
19877 d_ftello='$d_ftello'
19879 d_getcwd='$d_getcwd'
19880 d_getespwnam='$d_getespwnam'
19881 d_getfsstat='$d_getfsstat'
19882 d_getgrent='$d_getgrent'
19883 d_getgrent_r='$d_getgrent_r'
19884 d_getgrgid_r='$d_getgrgid_r'
19885 d_getgrnam_r='$d_getgrnam_r'
19886 d_getgrps='$d_getgrps'
19887 d_gethbyaddr='$d_gethbyaddr'
19888 d_gethbyname='$d_gethbyname'
19889 d_gethent='$d_gethent'
19890 d_gethname='$d_gethname'
19891 d_gethostbyaddr_r='$d_gethostbyaddr_r'
19892 d_gethostbyname_r='$d_gethostbyname_r'
19893 d_gethostent_r='$d_gethostent_r'
19894 d_gethostprotos='$d_gethostprotos'
19895 d_getitimer='$d_getitimer'
19896 d_getlogin='$d_getlogin'
19897 d_getlogin_r='$d_getlogin_r'
19898 d_getmnt='$d_getmnt'
19899 d_getmntent='$d_getmntent'
19900 d_getnbyaddr='$d_getnbyaddr'
19901 d_getnbyname='$d_getnbyname'
19902 d_getnent='$d_getnent'
19903 d_getnetbyaddr_r='$d_getnetbyaddr_r'
19904 d_getnetbyname_r='$d_getnetbyname_r'
19905 d_getnetent_r='$d_getnetent_r'
19906 d_getnetprotos='$d_getnetprotos'
19907 d_getpagsz='$d_getpagsz'
19908 d_getpbyname='$d_getpbyname'
19909 d_getpbynumber='$d_getpbynumber'
19910 d_getpent='$d_getpent'
19911 d_getpgid='$d_getpgid'
19912 d_getpgrp2='$d_getpgrp2'
19913 d_getpgrp='$d_getpgrp'
19914 d_getppid='$d_getppid'
19915 d_getprior='$d_getprior'
19916 d_getprotobyname_r='$d_getprotobyname_r'
19917 d_getprotobynumber_r='$d_getprotobynumber_r'
19918 d_getprotoent_r='$d_getprotoent_r'
19919 d_getprotoprotos='$d_getprotoprotos'
19920 d_getprpwnam='$d_getprpwnam'
19921 d_getpwent='$d_getpwent'
19922 d_getpwent_r='$d_getpwent_r'
19923 d_getpwnam_r='$d_getpwnam_r'
19924 d_getpwuid_r='$d_getpwuid_r'
19925 d_getsbyname='$d_getsbyname'
19926 d_getsbyport='$d_getsbyport'
19927 d_getsent='$d_getsent'
19928 d_getservbyname_r='$d_getservbyname_r'
19929 d_getservbyport_r='$d_getservbyport_r'
19930 d_getservent_r='$d_getservent_r'
19931 d_getservprotos='$d_getservprotos'
19932 d_getspnam='$d_getspnam'
19933 d_getspnam_r='$d_getspnam_r'
19934 d_gettimeod='$d_gettimeod'
19935 d_gmtime_r='$d_gmtime_r'
19936 d_gnulibc='$d_gnulibc'
19937 d_grpasswd='$d_grpasswd'
19938 d_hasmntopt='$d_hasmntopt'
19941 d_inetaton='$d_inetaton'
19942 d_int64_t='$d_int64_t'
19943 d_isascii='$d_isascii'
19944 d_isfinite='$d_isfinite'
19947 d_isnanl='$d_isnanl'
19948 d_killpg='$d_killpg'
19949 d_lchown='$d_lchown'
19950 d_ldbl_dig='$d_ldbl_dig'
19952 d_localtime_r='$d_localtime_r'
19953 d_locconv='$d_locconv'
19955 d_longdbl='$d_longdbl'
19956 d_longlong='$d_longlong'
19957 d_lseekproto='$d_lseekproto'
19959 d_madvise='$d_madvise'
19961 d_mbstowcs='$d_mbstowcs'
19962 d_mbtowc='$d_mbtowc'
19963 d_memchr='$d_memchr'
19964 d_memcmp='$d_memcmp'
19965 d_memcpy='$d_memcpy'
19966 d_memmove='$d_memmove'
19967 d_memset='$d_memset'
19969 d_mkdtemp='$d_mkdtemp'
19970 d_mkfifo='$d_mkfifo'
19971 d_mkstemp='$d_mkstemp'
19972 d_mkstemps='$d_mkstemps'
19973 d_mktime='$d_mktime'
19976 d_modfl_pow32_bug='$d_modfl_pow32_bug'
19977 d_modflproto='$d_modflproto'
19978 d_mprotect='$d_mprotect'
19980 d_msg_ctrunc='$d_msg_ctrunc'
19981 d_msg_dontroute='$d_msg_dontroute'
19982 d_msg_oob='$d_msg_oob'
19983 d_msg_peek='$d_msg_peek'
19984 d_msg_proxy='$d_msg_proxy'
19985 d_msgctl='$d_msgctl'
19986 d_msgget='$d_msgget'
19987 d_msghdr_s='$d_msghdr_s'
19988 d_msgrcv='$d_msgrcv'
19989 d_msgsnd='$d_msgsnd'
19991 d_munmap='$d_munmap'
19992 d_mymalloc='$d_mymalloc'
19993 d_nanosleep='$d_nanosleep'
19995 d_nl_langinfo='$d_nl_langinfo'
19996 d_nv_preserves_uv='$d_nv_preserves_uv'
19997 d_off64_t='$d_off64_t'
19998 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
19999 d_oldpthreads='$d_oldpthreads'
20000 d_oldsock='$d_oldsock'
20002 d_pathconf='$d_pathconf'
20004 d_perl_otherlibdirs='$d_perl_otherlibdirs'
20005 d_phostname='$d_phostname'
20008 d_portable='$d_portable'
20009 d_procselfexe='$d_procselfexe'
20010 d_pthread_atfork='$d_pthread_atfork'
20011 d_pthread_yield='$d_pthread_yield'
20013 d_pwchange='$d_pwchange'
20014 d_pwclass='$d_pwclass'
20015 d_pwcomment='$d_pwcomment'
20016 d_pwexpire='$d_pwexpire'
20017 d_pwgecos='$d_pwgecos'
20018 d_pwpasswd='$d_pwpasswd'
20019 d_pwquota='$d_pwquota'
20022 d_random_r='$d_random_r'
20023 d_readdir64_r='$d_readdir64_r'
20024 d_readdir='$d_readdir'
20025 d_readdir_r='$d_readdir_r'
20026 d_readlink='$d_readlink'
20028 d_recvmsg='$d_recvmsg'
20029 d_rename='$d_rename'
20030 d_rewinddir='$d_rewinddir'
20032 d_safebcpy='$d_safebcpy'
20033 d_safemcpy='$d_safemcpy'
20034 d_sanemcmp='$d_sanemcmp'
20035 d_sbrkproto='$d_sbrkproto'
20036 d_sched_yield='$d_sched_yield'
20037 d_scm_rights='$d_scm_rights'
20038 d_seekdir='$d_seekdir'
20039 d_select='$d_select'
20041 d_semctl='$d_semctl'
20042 d_semctl_semid_ds='$d_semctl_semid_ds'
20043 d_semctl_semun='$d_semctl_semun'
20044 d_semget='$d_semget'
20046 d_sendmsg='$d_sendmsg'
20047 d_setegid='$d_setegid'
20048 d_seteuid='$d_seteuid'
20049 d_setgrent='$d_setgrent'
20050 d_setgrent_r='$d_setgrent_r'
20051 d_setgrps='$d_setgrps'
20052 d_sethent='$d_sethent'
20053 d_sethostent_r='$d_sethostent_r'
20054 d_setitimer='$d_setitimer'
20055 d_setlinebuf='$d_setlinebuf'
20056 d_setlocale='$d_setlocale'
20057 d_setlocale_r='$d_setlocale_r'
20058 d_setnent='$d_setnent'
20059 d_setnetent_r='$d_setnetent_r'
20060 d_setpent='$d_setpent'
20061 d_setpgid='$d_setpgid'
20062 d_setpgrp2='$d_setpgrp2'
20063 d_setpgrp='$d_setpgrp'
20064 d_setprior='$d_setprior'
20065 d_setproctitle='$d_setproctitle'
20066 d_setprotoent_r='$d_setprotoent_r'
20067 d_setpwent='$d_setpwent'
20068 d_setpwent_r='$d_setpwent_r'
20069 d_setregid='$d_setregid'
20070 d_setresgid='$d_setresgid'
20071 d_setresuid='$d_setresuid'
20072 d_setreuid='$d_setreuid'
20073 d_setrgid='$d_setrgid'
20074 d_setruid='$d_setruid'
20075 d_setsent='$d_setsent'
20076 d_setservent_r='$d_setservent_r'
20077 d_setsid='$d_setsid'
20078 d_setvbuf='$d_setvbuf'
20082 d_shmatprototype='$d_shmatprototype'
20083 d_shmctl='$d_shmctl'
20085 d_shmget='$d_shmget'
20086 d_sigaction='$d_sigaction'
20087 d_sigprocmask='$d_sigprocmask'
20088 d_sigsetjmp='$d_sigsetjmp'
20089 d_sockatmark='$d_sockatmark'
20090 d_sockatmarkproto='$d_sockatmarkproto'
20091 d_socket='$d_socket'
20092 d_socklen_t='$d_socklen_t'
20093 d_sockpair='$d_sockpair'
20094 d_socks5_init='$d_socks5_init'
20096 d_srand48_r='$d_srand48_r'
20097 d_srandom_r='$d_srandom_r'
20098 d_sresgproto='$d_sresgproto'
20099 d_sresuproto='$d_sresuproto'
20100 d_statblks='$d_statblks'
20101 d_statfs_f_flags='$d_statfs_f_flags'
20102 d_statfs_s='$d_statfs_s'
20103 d_statvfs='$d_statvfs'
20104 d_stdio_cnt_lval='$d_stdio_cnt_lval'
20105 d_stdio_ptr_lval='$d_stdio_ptr_lval'
20106 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
20107 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
20108 d_stdio_stream_array='$d_stdio_stream_array'
20109 d_stdiobase='$d_stdiobase'
20110 d_stdstdio='$d_stdstdio'
20111 d_strchr='$d_strchr'
20112 d_strcoll='$d_strcoll'
20113 d_strctcpy='$d_strctcpy'
20114 d_strerrm='$d_strerrm'
20115 d_strerror='$d_strerror'
20116 d_strerror_r='$d_strerror_r'
20117 d_strftime='$d_strftime'
20118 d_strtod='$d_strtod'
20119 d_strtol='$d_strtol'
20120 d_strtold='$d_strtold'
20121 d_strtoll='$d_strtoll'
20122 d_strtoq='$d_strtoq'
20123 d_strtoul='$d_strtoul'
20124 d_strtoull='$d_strtoull'
20125 d_strtouq='$d_strtouq'
20126 d_strxfrm='$d_strxfrm'
20127 d_suidsafe='$d_suidsafe'
20128 d_symlink='$d_symlink'
20129 d_syscall='$d_syscall'
20130 d_syscallproto='$d_syscallproto'
20131 d_sysconf='$d_sysconf'
20132 d_sysernlst='$d_sysernlst'
20133 d_syserrlst='$d_syserrlst'
20134 d_system='$d_system'
20135 d_tcgetpgrp='$d_tcgetpgrp'
20136 d_tcsetpgrp='$d_tcsetpgrp'
20137 d_telldir='$d_telldir'
20138 d_telldirproto='$d_telldirproto'
20141 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
20142 d_tm_tm_zone='$d_tm_tm_zone'
20143 d_tmpnam_r='$d_tmpnam_r'
20144 d_truncate='$d_truncate'
20145 d_ttyname_r='$d_ttyname_r'
20146 d_tzname='$d_tzname'
20147 d_u32align='$d_u32align'
20148 d_ualarm='$d_ualarm'
20151 d_union_semun='$d_union_semun'
20152 d_unordered='$d_unordered'
20153 d_usleep='$d_usleep'
20154 d_usleepproto='$d_usleepproto'
20156 d_vendorarch='$d_vendorarch'
20157 d_vendorbin='$d_vendorbin'
20158 d_vendorlib='$d_vendorlib'
20160 d_void_closedir='$d_void_closedir'
20161 d_voidsig='$d_voidsig'
20162 d_voidtty='$d_voidtty'
20163 d_volatile='$d_volatile'
20164 d_vprintf='$d_vprintf'
20166 d_waitpid='$d_waitpid'
20167 d_wcstombs='$d_wcstombs'
20168 d_wctomb='$d_wctomb'
20169 d_writev='$d_writev'
20172 db_hashtype='$db_hashtype'
20173 db_prefixtype='$db_prefixtype'
20174 db_version_major='$db_version_major'
20175 db_version_minor='$db_version_minor'
20176 db_version_patch='$db_version_patch'
20177 defvoidused='$defvoidused'
20178 direntrytype='$direntrytype'
20181 doublesize='$doublesize'
20183 drand48_r_proto='$drand48_r_proto'
20184 dynamic_ext='$dynamic_ext'
20190 endgrent_r_proto='$endgrent_r_proto'
20191 endhostent_r_proto='$endhostent_r_proto'
20192 endnetent_r_proto='$endnetent_r_proto'
20193 endprotoent_r_proto='$endprotoent_r_proto'
20194 endpwent_r_proto='$endpwent_r_proto'
20195 endservent_r_proto='$endservent_r_proto'
20196 eunicefix='$eunicefix'
20199 extensions='$extensions'
20201 fflushNULL='$fflushNULL'
20202 fflushall='$fflushall'
20204 firstmakefile='$firstmakefile'
20206 fpossize='$fpossize'
20207 fpostype='$fpostype'
20208 freetype='$freetype'
20211 full_csh='$full_csh'
20212 full_sed='$full_sed'
20213 gccansipedantic='$gccansipedantic'
20214 gccosandvers='$gccosandvers'
20215 gccversion='$gccversion'
20216 getgrent_r_proto='$getgrent_r_proto'
20217 getgrgid_r_proto='$getgrgid_r_proto'
20218 getgrnam_r_proto='$getgrnam_r_proto'
20219 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
20220 gethostbyname_r_proto='$gethostbyname_r_proto'
20221 gethostent_r_proto='$gethostent_r_proto'
20222 getlogin_r_proto='$getlogin_r_proto'
20223 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
20224 getnetbyname_r_proto='$getnetbyname_r_proto'
20225 getnetent_r_proto='$getnetent_r_proto'
20226 getprotobyname_r_proto='$getprotobyname_r_proto'
20227 getprotobynumber_r_proto='$getprotobynumber_r_proto'
20228 getprotoent_r_proto='$getprotoent_r_proto'
20229 getpwent_r_proto='$getpwent_r_proto'
20230 getpwnam_r_proto='$getpwnam_r_proto'
20231 getpwuid_r_proto='$getpwuid_r_proto'
20232 getservbyname_r_proto='$getservbyname_r_proto'
20233 getservbyport_r_proto='$getservbyport_r_proto'
20234 getservent_r_proto='$getservent_r_proto'
20235 getspnam_r_proto='$getspnam_r_proto'
20236 gidformat='$gidformat'
20242 gmtime_r_proto='$gmtime_r_proto'
20243 gnulibc_version='$gnulibc_version'
20245 groupcat='$groupcat'
20246 groupstype='$groupstype'
20249 h_sysfile='$h_sysfile'
20260 i_arpainet='$i_arpainet'
20261 i_bsdioctl='$i_bsdioctl'
20265 i_dirent='$i_dirent'
20271 i_fp_class='$i_fp_class'
20274 i_ieeefp='$i_ieeefp'
20275 i_inttypes='$i_inttypes'
20276 i_langinfo='$i_langinfo'
20277 i_libutil='$i_libutil'
20278 i_limits='$i_limits'
20279 i_locale='$i_locale'
20280 i_machcthr='$i_machcthr'
20281 i_malloc='$i_malloc'
20283 i_memory='$i_memory'
20284 i_mntent='$i_mntent'
20287 i_neterrno='$i_neterrno'
20288 i_netinettcp='$i_netinettcp'
20292 i_pthread='$i_pthread'
20294 i_rpcsvcdbm='$i_rpcsvcdbm'
20297 i_shadow='$i_shadow'
20299 i_stdarg='$i_stdarg'
20300 i_stddef='$i_stddef'
20301 i_stdlib='$i_stdlib'
20302 i_string='$i_string'
20303 i_sunmath='$i_sunmath'
20304 i_sysaccess='$i_sysaccess'
20305 i_sysdir='$i_sysdir'
20306 i_sysfile='$i_sysfile'
20307 i_sysfilio='$i_sysfilio'
20309 i_sysioctl='$i_sysioctl'
20310 i_syslog='$i_syslog'
20311 i_sysmman='$i_sysmman'
20312 i_sysmode='$i_sysmode'
20313 i_sysmount='$i_sysmount'
20314 i_sysndir='$i_sysndir'
20315 i_sysparam='$i_sysparam'
20316 i_sysresrc='$i_sysresrc'
20317 i_syssecrt='$i_syssecrt'
20318 i_sysselct='$i_sysselct'
20319 i_syssockio='$i_syssockio'
20320 i_sysstat='$i_sysstat'
20321 i_sysstatfs='$i_sysstatfs'
20322 i_sysstatvfs='$i_sysstatvfs'
20323 i_systime='$i_systime'
20324 i_systimek='$i_systimek'
20325 i_systimes='$i_systimes'
20326 i_systypes='$i_systypes'
20327 i_sysuio='$i_sysuio'
20329 i_sysutsname='$i_sysutsname'
20330 i_sysvfs='$i_sysvfs'
20331 i_syswait='$i_syswait'
20332 i_termio='$i_termio'
20333 i_termios='$i_termios'
20335 i_unistd='$i_unistd'
20338 i_values='$i_values'
20339 i_varargs='$i_varargs'
20340 i_varhdr='$i_varhdr'
20342 ignore_versioned_solibs='$ignore_versioned_solibs'
20343 inc_version_list='$inc_version_list'
20344 inc_version_list_init='$inc_version_list_init'
20347 installarchlib='$installarchlib'
20348 installbin='$installbin'
20349 installman1dir='$installman1dir'
20350 installman3dir='$installman3dir'
20351 installprefix='$installprefix'
20352 installprefixexp='$installprefixexp'
20353 installprivlib='$installprivlib'
20354 installscript='$installscript'
20355 installsitearch='$installsitearch'
20356 installsitebin='$installsitebin'
20357 installsitelib='$installsitelib'
20358 installstyle='$installstyle'
20359 installusrbinperl='$installusrbinperl'
20360 installvendorarch='$installvendorarch'
20361 installvendorbin='$installvendorbin'
20362 installvendorlib='$installvendorlib'
20364 issymlink='$issymlink'
20365 ivdformat='$ivdformat'
20368 known_extensions='$known_extensions'
20371 lddlflags='$lddlflags'
20373 ldflags_uselargefiles='$ldflags_uselargefiles'
20374 ldlibpthname='$ldlibpthname'
20381 libsdirs='$libsdirs'
20382 libsfiles='$libsfiles'
20383 libsfound='$libsfound'
20384 libspath='$libspath'
20385 libswanted='$libswanted'
20386 libswanted_uselargefiles='$libswanted_uselargefiles'
20392 localtime_r_proto='$localtime_r_proto'
20393 locincpth='$locincpth'
20394 loclibpth='$loclibpth'
20395 longdblsize='$longdblsize'
20396 longlongsize='$longlongsize'
20397 longsize='$longsize'
20401 lseeksize='$lseeksize'
20402 lseektype='$lseektype'
20406 make_set_make='$make_set_make'
20407 mallocobj='$mallocobj'
20408 mallocsrc='$mallocsrc'
20409 malloctype='$malloctype'
20411 man1direxp='$man1direxp'
20414 man3direxp='$man3direxp'
20416 mips_type='$mips_type'
20418 mmaptype='$mmaptype'
20419 modetype='$modetype'
20421 multiarch='$multiarch'
20423 myarchname='$myarchname'
20424 mydomain='$mydomain'
20425 myhostname='$myhostname'
20428 need_va_copy='$need_va_copy'
20429 netdb_hlen_type='$netdb_hlen_type'
20430 netdb_host_type='$netdb_host_type'
20431 netdb_name_type='$netdb_name_type'
20432 netdb_net_type='$netdb_net_type'
20435 nm_so_opt='$nm_so_opt'
20436 nonxs_ext='$nonxs_ext'
20438 nvEUformat='$nvEUformat'
20439 nvFUformat='$nvFUformat'
20440 nvGUformat='$nvGUformat'
20441 nv_preserves_uv_bits='$nv_preserves_uv_bits'
20442 nveformat='$nveformat'
20443 nvfformat='$nvfformat'
20444 nvgformat='$nvgformat'
20447 o_nonblock='$o_nonblock'
20449 old_pthread_create_joinable='$old_pthread_create_joinable'
20450 optimize='$optimize'
20451 orderlib='$orderlib'
20454 otherlibdirs='$otherlibdirs'
20458 patchlevel='$patchlevel'
20459 path_sep='$path_sep'
20462 perl_patchlevel='$perl_patchlevel'
20463 perladmin='$perladmin'
20464 perllibs='$perllibs'
20465 perlpath='$perlpath'
20467 phostname='$phostname'
20470 pm_apiversion='$pm_apiversion'
20474 prefixexp='$prefixexp'
20476 privlibexp='$privlibexp'
20477 procselfexe='$procselfexe'
20478 prototype='$prototype'
20480 quadkind='$quadkind'
20481 quadtype='$quadtype'
20482 randbits='$randbits'
20483 randfunc='$randfunc'
20484 random_r_proto='$random_r_proto'
20485 randseedtype='$randseedtype'
20487 rd_nodata='$rd_nodata'
20488 readdir64_r_proto='$readdir64_r_proto'
20489 readdir_r_proto='$readdir_r_proto'
20490 revision='$revision'
20495 sPRIEUldbl='$sPRIEUldbl'
20496 sPRIFUldbl='$sPRIFUldbl'
20497 sPRIGUldbl='$sPRIGUldbl'
20498 sPRIXU64='$sPRIXU64'
20500 sPRIeldbl='$sPRIeldbl'
20501 sPRIfldbl='$sPRIfldbl'
20502 sPRIgldbl='$sPRIgldbl'
20507 sSCNfldbl='$sSCNfldbl'
20508 sched_yield='$sched_yield'
20509 scriptdir='$scriptdir'
20510 scriptdirexp='$scriptdirexp'
20512 seedfunc='$seedfunc'
20513 selectminbits='$selectminbits'
20514 selecttype='$selecttype'
20515 sendmail='$sendmail'
20516 setgrent_r_proto='$setgrent_r_proto'
20517 sethostent_r_proto='$sethostent_r_proto'
20518 setlocale_r_proto='$setlocale_r_proto'
20519 setnetent_r_proto='$setnetent_r_proto'
20520 setprotoent_r_proto='$setprotoent_r_proto'
20521 setpwent_r_proto='$setpwent_r_proto'
20522 setservent_r_proto='$setservent_r_proto'
20525 sharpbang='$sharpbang'
20526 shmattype='$shmattype'
20527 shortsize='$shortsize'
20530 sig_count='$sig_count'
20531 sig_name='$sig_name'
20532 sig_name_init='$sig_name_init'
20534 sig_num_init='$sig_num_init'
20535 sig_size='$sig_size'
20536 signal_t='$signal_t'
20537 sitearch='$sitearch'
20538 sitearchexp='$sitearchexp'
20540 sitebinexp='$sitebinexp'
20542 sitelib_stem='$sitelib_stem'
20543 sitelibexp='$sitelibexp'
20544 siteprefix='$siteprefix'
20545 siteprefixexp='$siteprefixexp'
20546 sizesize='$sizesize'
20547 sizetype='$sizetype'
20551 sockethdr='$sockethdr'
20552 socketlib='$socketlib'
20553 socksizetype='$socksizetype'
20555 spackage='$spackage'
20556 spitshell='$spitshell'
20557 srand48_r_proto='$srand48_r_proto'
20558 srandom_r_proto='$srandom_r_proto'
20560 ssizetype='$ssizetype'
20561 startperl='$startperl'
20563 static_ext='$static_ext'
20565 stdio_base='$stdio_base'
20566 stdio_bufsiz='$stdio_bufsiz'
20567 stdio_cnt='$stdio_cnt'
20568 stdio_filbuf='$stdio_filbuf'
20569 stdio_ptr='$stdio_ptr'
20570 stdio_stream_array='$stdio_stream_array'
20571 strerror_r_proto='$strerror_r_proto'
20574 subversion='$subversion'
20578 targetarch='$targetarch'
20582 timeincl='$timeincl'
20583 timetype='$timetype'
20584 tmpnam_r_proto='$tmpnam_r_proto'
20590 ttyname_r_proto='$ttyname_r_proto'
20599 uidformat='$uidformat'
20605 uquadtype='$uquadtype'
20606 use5005threads='$use5005threads'
20607 use64bitall='$use64bitall'
20608 use64bitint='$use64bitint'
20609 usecrosscompile='$usecrosscompile'
20611 useithreads='$useithreads'
20612 uselargefiles='$uselargefiles'
20613 uselongdouble='$uselongdouble'
20614 usemorebits='$usemorebits'
20615 usemultiplicity='$usemultiplicity'
20616 usemymalloc='$usemymalloc'
20618 useopcode='$useopcode'
20619 useperlio='$useperlio'
20620 useposix='$useposix'
20621 usereentrant='$usereentrant'
20623 useshrplib='$useshrplib'
20624 usesocks='$usesocks'
20625 usethreads='$usethreads'
20626 usevendorprefix='$usevendorprefix'
20627 usevfork='$usevfork'
20630 uvXUformat='$uvXUformat'
20631 uvoformat='$uvoformat'
20634 uvuformat='$uvuformat'
20635 uvxformat='$uvxformat'
20636 vendorarch='$vendorarch'
20637 vendorarchexp='$vendorarchexp'
20638 vendorbin='$vendorbin'
20639 vendorbinexp='$vendorbinexp'
20640 vendorlib='$vendorlib'
20641 vendorlib_stem='$vendorlib_stem'
20642 vendorlibexp='$vendorlibexp'
20643 vendorprefix='$vendorprefix'
20644 vendorprefixexp='$vendorprefixexp'
20646 version_patchlevel_string='$version_patchlevel_string'
20647 versiononly='$versiononly'
20649 voidflags='$voidflags'
20651 xs_apiversion='$xs_apiversion'
20653 yaccflags='$yaccflags'
20658 : Add in command line options if available
20659 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
20661 : add special variables
20662 $test -f $src/patchlevel.h && \
20663 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
20664 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
20665 echo "PERL_CONFIG_SH=true" >>config.sh
20667 : propagate old symbols
20668 if $test -f UU/config.sh; then
20669 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
20670 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
20671 $sort | $uniq -u >UU/oldsyms
20672 set X `cat UU/oldsyms`
20678 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
20680 echo "# Variables propagated from previous config.sh file." >>config.sh
20681 for sym in `cat UU/oldsyms`; do
20682 echo " Propagating $hint variable "'$'"$sym..."
20683 eval 'tmp="$'"${sym}"'"'
20685 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
20691 : Finish up by extracting the .SH files
20695 echo "Extraction done."
20705 If you'd like to make any changes to the config.sh file before I begin
20706 to configure things, do it as a shell escape now (e.g. !vi config.sh).
20709 rp="Press return or use a shell escape to edit config.sh:"
20714 *) : in case they cannot read
20715 sh 1>&4 -c "$ans";;
20720 : if this fails, just run all the .SH files by hand
20729 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
20736 Now you need to generate make dependencies by running "$make depend".
20737 You might prefer to run it in background: "$make depend > makedepend.out &"
20738 It can take a while, so you might not want to run it right now.
20743 rp="Run $make depend now?"
20747 $make depend && echo "Now you must run '$make'."
20750 echo "You must run '$make depend' then '$make'."
20753 elif test -f [Mm]akefile; then
20755 echo "Now you must run a $make."
20757 echo "Configure done."
20760 if $test -f Policy.sh; then
20763 If you compile $package on a different machine or from a different object
20764 directory, copy the Policy.sh file from this object directory to the
20765 new one before you run Configure -- this will help you with most of
20766 the policy defaults.
20770 if $test -f config.msg; then
20771 echo "Hmm. I also noted the following information while running:"
20773 $cat config.msg >&4
20776 $rm -f kit*isdone ark*isdone