3 # If these # comments don't work, trim them. Don't worry about any other
4 # shell scripts, Configure will trim # comments from them for you.
6 # (If you are trying to port this package to a machine without sh,
7 # I would suggest you have a look at the prototypical config_h.SH file
8 # and edit it to reflect your system. Some packages may include samples
9 # of config.h for certain machines, so you might look for one of those.)
11 # Yes, you may rip this off to use in other distribution packages. This
12 # script belongs to the public domain and cannot be copyrighted.
14 # (Note: this Configure script was generated automatically. Rather than
15 # working with this copy of Configure, you may wish to get metaconfig.
16 # The dist-3.0 package (which contains metaconfig) was posted in
17 # comp.sources.misc and is available on CPAN under authors/id/RAM so
18 # you may fetch it yourself from your nearest archive site.)
21 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
23 # Generated on Fri Sep 13 16:29:01 METDST 2002 [metaconfig 3.0 PL70]
24 # (with additional metaconfig patches by perlbug@perl.org)
29 SCO csh still thinks true is false. Write to SCO today and tell them that next
30 year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
32 (Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
33 we'd have to do is go in and swap the && and || tokens, wherever they are.)
35 [End of diatribe. We now return you to your regularly scheduled programming...]
39 OOPS! You naughty creature! You didn't run Configure with sh!
40 I will attempt to remedy the situation by running sh for you...
44 true || exec sh $0 $argv:q
46 (exit $?0) || cat c2$$
47 (exit $?0) || exec sh $0 $argv:q
50 : compute my invocation name
54 me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
59 : Proper separator for the PATH environment variable
61 : On OS/2 this directory should exist if this is not floppy only system :-]
62 if test -d c:/. ; then
63 if test -n "$OS2_SHELL"; then
65 PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
66 OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
67 elif test -n "$DJGPP"; then
68 case "X${MACHTYPE:-nonesuchmach}" in
76 paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
77 paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
78 paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
79 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
80 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
81 paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
82 paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
83 paths="$paths /sbin /usr/sbin /usr/libexec"
84 paths="$paths /system/gnu_library/bin"
90 *) test -d $p && PATH=$PATH$p_$p ;;
97 : shall we be using ksh?
103 if (PATH=.; alias -x) >/dev/null 2>&1; then
106 if test -f /hp-ux -a -f /bin/ksh; then
107 needksh='to avoid sh bug in "here document" expansion'
109 if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
110 if test X`/usr/bin/uname -v` = X4; then
111 avoidksh="to avoid AIX 4's /bin/sh"
115 if test -f /osf_boot -a -f /usr/sbin/setld; then
116 if test X`/usr/bin/uname -s` = XOSF1; then
117 avoidksh="to avoid Digital UNIX' ksh"
119 unset BIN_SH # if this is 'xpg4' sh will start up ksh
122 case "$inksh/$needksh" in
129 case "$inksh/$avoidksh" in
135 case "$inksh/$needksh-$avoidksh-" in
138 (I see you are using the Korn shell. Some ksh's blow up on $me,
139 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
146 echo "(Feeding myself to $newsh $reason.)"
148 Configure|*/Configure) exec $newsh $0 "$@";;
149 *) exec $newsh Configure "$@";;
154 : if needed set CDPATH to a harmless value that is not chatty
155 : avoid bash 2.02 problems with empty CDPATH.
159 *bash*) CDPATH='.' ;;
164 : Configure runs within the UU subdirectory
165 test -d UU || mkdir UU
373 endhostent_r_proto=''
379 endprotoent_r_proto=''
385 endservent_r_proto=''
435 gethostbyaddr_r_proto=''
437 gethostbyname_r_proto=''
439 gethostent_r_proto=''
451 getnetbyaddr_r_proto=''
453 getnetbyname_r_proto=''
467 d_getprotobyname_r=''
468 getprotobyname_r_proto=''
469 d_getprotobynumber_r=''
470 getprotobynumber_r_proto=''
472 getprotoent_r_proto=''
484 getservbyname_r_proto=''
486 getservbyport_r_proto=''
488 getservent_r_proto=''
563 d_old_pthread_create_joinable=''
564 old_pthread_create_joinable=''
603 sethostent_r_proto=''
620 setprotoent_r_proto=''
632 setservent_r_proto=''
676 d_stdio_ptr_lval_nochange_cnt=''
677 d_stdio_ptr_lval_sets_cnt=''
871 inc_version_list_init=''
890 ignore_versioned_solibs=''
949 d_perl_otherlibdirs=''
963 version_patchlevel_string=''
978 nv_preserves_uv_bits=''
1067 d_stdio_stream_array=''
1068 stdio_stream_array=''
1078 ccflags_uselargefiles=''
1079 ldflags_uselargefiles=''
1080 libswanted_uselargefiles=''
1100 installvendorarch=''
1127 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1130 : We must find out about Eunice early
1132 if test -f /etc/unixtovms; then
1133 eunicefix=/etc/unixtovms
1135 if test -f /etc/unixtovms.exe; then
1136 eunicefix=/etc/unixtovms.exe
1139 : Set executable suffix now -- needed before hints available
1140 if test -f "/libs/version.library"; then
1143 elif test -f "/system/gnu_library/bin/ar.pm"; then
1146 elif test -n "$DJGPP"; then
1149 elif test -d c:/. ; then
1158 : set useposix=false in your hint file to disable the POSIX extension.
1160 : set useopcode=false in your hint file to disable the Opcode extension.
1162 : Trailing extension. Override this in a hint file, if needed.
1163 : Extra object files, if any, needed on this platform.
1166 : Possible local include directories to search.
1167 : Set locincpth to "" in a hint file to defeat local include searches.
1168 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1169 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1171 : no include file wanted by default
1176 : change the next line if compiling for Xenix/286 on Xenix/386
1177 xlibpth='/usr/lib/386 /lib/386'
1178 : Possible local library directories to search.
1179 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1180 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1182 : general looking path for locating libraries
1183 glibpth="/lib /usr/lib $xlibpth"
1184 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1185 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1186 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1188 : Private path used by Configure to find libraries. Its value
1189 : is prepended to libpth. This variable takes care of special
1190 : machines, like the mips. Usually, it should be empty.
1193 : default library list
1195 : some systems want to use only the non-versioned libso:s
1196 ignore_versioned_solibs=''
1198 ccflags_uselargefiles=''
1199 ldflags_uselargefiles=''
1200 libswanted_uselargefiles=''
1201 : set usemultiplicity on the Configure command line to enable multiplicity.
1202 : set usesocks on the Configure command line to enable socks.
1203 : set usethreads on the Configure command line to enable threads.
1204 usereentrant='undef'
1205 : full support for void wanted by default
1208 : List of libraries we want.
1209 : If anyone needs -lnet, put it in a hint file.
1210 libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
1211 libswanted="$libswanted dld ld sun m c cposix posix"
1212 libswanted="$libswanted ndir dir crypt sec"
1213 libswanted="$libswanted ucb bsd BSD PW x util"
1214 : We probably want to search /usr/shlib before most other libraries.
1215 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1216 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1217 glibpth="/usr/shlib $glibpth"
1218 : Do not use vfork unless overridden by a hint file.
1221 : Find the basic shell for Bourne shell scripts
1225 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1228 if test -f "$xxx"; then
1231 : Build up a list and do a single loop so we can 'break' out.
1232 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1233 for xxx in sh bash ksh pdksh ash; do
1235 try="$try ${p}/${xxx}"
1239 if test -f "$xxx"; then
1242 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1245 elif test -f "$xxx.exe"; then
1256 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1258 Usually it's in /bin/sh. How did you even get this far?
1259 Please contact me (Perl Maintainers) at perlbug@perl.org and
1260 we'll try to straighten this all out.
1266 : see if sh knows # comments
1267 if `$sh -c '#' >/dev/null 2>&1`; then
1271 test -f $xcat$_exe || xcat=/usr/bin/cat
1272 if test ! -f $xcat$_exe; then
1273 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1274 if test -f $p/cat$_exe; then
1279 if test ! -f $xcat$_exe; then
1280 echo "Can't find cat anywhere!"
1284 echo "#!$xcat" >sharp
1288 if test -s today; then
1291 echo "#! $xcat" > sharp
1295 if test -s today; then
1303 echo "Your $sh doesn't grok # comments--I will strip them later on."
1306 echo "exec grep -v '^[ ]*#'" >spitshell
1308 $eunicefix spitshell
1309 spitshell=`pwd`/spitshell
1311 echo "I presume that if # doesn't work, #! won't work either!"
1316 : figure out how to guarantee sh startup
1318 '') startsh=${sharpbang}${sh} ;;
1330 : echo "Yup, it does."
1332 echo "Hmm... '$startsh' does not guarantee sh startup..."
1333 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1338 : Save command line options in file UU/cmdline.opt for later use in
1339 : generating config.sh.
1340 cat > cmdline.opt <<EOSH
1341 # Configure command line arguments.
1350 cat >>cmdline.opt <<EOSH
1351 config_arg$argn='$arg'
1353 # Extreme backslashitis: replace each ' by '"'"'
1354 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1357 arg_exp=`cat cmdl.opt`
1358 args_exp="$args_exp$args_sep'$arg_exp'"
1359 argn=`expr $argn + 1`
1362 # args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
1363 # used by ./hints/os2.sh
1366 : produce awk script to parse command line options
1367 cat >options.awk <<'EOF'
1369 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1371 len = length(optstr);
1372 for (i = 1; i <= len; i++) {
1373 c = substr(optstr, i, 1);
1374 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1385 if (substr(str, 1, 1) != "-") {
1386 printf("'%s'\n", str);
1390 for (i = 2; i <= len; i++) {
1391 c = substr(str, i, 1);
1393 printf("-%s\n", substr(str, i));
1399 printf("'%s'\n", substr(str, i + 1));
1412 : process the command line options
1413 set X `for arg in "$@"; do echo "X$arg"; done |
1414 sed -e s/X// | awk -f options.awk`
1419 : set up default values
1429 rm -f optdef.sh posthint.sh
1430 cat >optdef.sh <<EOS
1436 while test $# -gt 0; do
1438 -d) shift; fastread=yes;;
1439 -e) shift; alldone=cont;;
1443 if test -r "$1"; then
1446 echo "$me: cannot read config file $1." >&2
1451 -h) shift; error=true;;
1452 -r) shift; reuseval=true;;
1453 -s) shift; silent=true; realsilent=true;;
1454 -E) shift; alldone=exit;;
1455 -K) shift; knowitall=true;;
1456 -O) shift; override=true;;
1457 -S) shift; silent=true; extractsh=true;;
1462 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1463 echo "$me: ignoring -D $1" >&2
1466 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1467 *) echo "$1='define'" >> optdef.sh;;
1474 *=) echo "$1" >> optdef.sh;;
1476 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1477 echo "$me: ignoring -U $1" >&2
1479 *) echo "$1='undef'" >> optdef.sh;;
1490 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
1494 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
1495 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1501 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1502 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1503 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1504 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1505 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1506 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
1512 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1514 echo "$yyy=''" >> posthint.sh ;;
1519 echo "$yyy='$zzz'" >> posthint.sh ;;
1521 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1523 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1528 echo "$yyy=$zzz" >> posthint.sh ;;
1529 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1533 -V) echo "$me generated by metaconfig 3.0 PL70." >&2
1536 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1544 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1545 [-U symbol] [-U symbol=] [-A command:symbol...]
1546 -d : use defaults for all answers.
1547 -e : go on without questioning past the production of config.sh.
1548 -f : specify an alternate default configuration file.
1549 -h : print this help message and exit (with an error status).
1550 -r : reuse C symbols value if possible (skips costly nm extraction).
1551 -s : silent mode, only echoes questions and essential information.
1552 -D : define symbol to have some value:
1553 -D symbol symbol gets the value 'define'
1554 -D symbol=value symbol gets the value 'value'
1555 -E : stop at the end of questions, after having produced config.sh.
1556 -K : do not use unless you know what you are doing.
1557 -O : let -D and -U override definitions from loaded configuration file.
1558 -S : perform variable substitutions on all .SH files (can mix with -f)
1559 -U : undefine symbol:
1560 -U symbol symbol gets the value 'undef'
1561 -U symbol= symbol gets completely empty
1562 -A : manipulate symbol after the platform specific hints have been applied:
1563 -A symbol=value append " "value to symbol
1564 -A append:symbol=value append value to symbol
1565 -A define:symbol=value define symbol to have value
1566 -A clear:symbol define symbol to be ''
1567 -A define:symbol define symbol to be 'define'
1568 -A eval:symbol=value define symbol to be eval of value
1569 -A prepend:symbol=value prepend value to symbol
1570 -A undef:symbol define symbol to be 'undef'
1571 -A undef:symbol= define symbol to be ''
1572 -V : print version number and exit (with a zero status).
1579 case "$fastread$alldone" in
1582 case "$extractsh" in
1585 if test ! -t 0; then
1586 echo "Say 'sh Configure', not 'sh <Configure'"
1596 true) exec 1>/dev/null;;
1599 : run the defines and the undefines, if any, but leave the file out there...
1602 : create the posthint manipulation script and leave the file out there...
1607 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1608 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1609 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1610 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1611 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1614 : Some greps do not return status, grrr.
1615 echo "grimblepritz" >grimble
1616 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1618 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1624 : the following should work in any shell
1628 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1629 cat >contains <<'EOSS'
1630 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1635 : Find the path to the source tree
1638 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1642 *) src=`cd ../$src && pwd` ;;
1655 if test -f $rsrc/Configure && \
1656 $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
1658 : found it, so we are ok.
1661 for src in . .. ../.. ../../.. ../../../..; do
1662 if test -f ../$src/Configure && \
1663 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1674 Sorry, I can't seem to locate the source dir for $package. Please start
1675 Configure with an explicit path -- i.e. /some/path/Configure.
1683 echo "Sources for $package found in \"$src\"." >&4
1687 : script used to extract .SH files with variable substitutions
1688 cat >extract <<'EOS'
1690 echo "Doing variable substitutions on .SH files..."
1691 if test -f MANIFEST; then
1692 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1694 echo "(Looking for .SH files under the source directory.)"
1695 set x `(cd "$src"; find . -name "*.SH" -print)`
1699 0) set x `(cd "$src"; echo *.SH)`; shift;;
1701 if test ! -f "$src/$1"; then
1707 while test $name; do
1708 if test ! -d "$name"; then
1709 create="$name $create";
1710 name=`echo $name | sed -e "s|^[^/]*$||"`;
1711 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1716 for file in $create; do
1725 dir=`expr X$file : 'X\(.*\)/'`
1726 file=`expr X$file : 'X.*/\(.*\)'`
1727 (cd "$dir" && . ./$file)
1737 dir=`expr X$file : 'X\(.*\)/'`
1738 file=`expr X$file : 'X.*/\(.*\)'`
1739 (set x $dir; shift; eval $mkdir_p)
1740 sh <"$src/$dir/$file"
1749 if test -f "$src/config_h.SH"; then
1750 if test ! -f config.h; then
1751 : oops, they left it out of MANIFEST, probably, so do it anyway.
1752 . "$src/config_h.SH"
1757 : extract files and exit if asked to do so
1758 case "$extractsh" in
1760 case "$realsilent" in
1764 case "$config_sh" in
1765 '') config_sh='config.sh';;
1768 echo "Fetching answers from $config_sh..."
1771 test "$override" && . ./optdef.sh
1775 echo "Extraction done."
1780 : Eunice requires " " instead of "", can you believe it
1783 echo "Beginning of configuration questions for $package."
1785 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1787 : first determine how to suppress newline on echo command
1789 echo "Checking echo to see how to suppress newlines..."
1790 (echo "hi there\c" ; echo " ") >.echotmp
1791 if $contains c .echotmp >/dev/null 2>&1 ; then
1802 echo $n "The star should be here-->$c"
1806 : Now test for existence of everything in MANIFEST
1808 if test -f "$rsrc/MANIFEST"; then
1809 echo "First let's make sure your kit is complete. Checking..." >&4
1810 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50)
1813 for filelist in x??; do
1814 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing")
1816 if test -s missing; then
1820 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1822 You have the option of continuing the configuration process, despite the
1823 distinct possibility that your kit is damaged, by typing 'y'es. If you
1824 do, don't blame me if something goes wrong. I advise you to type 'n'o
1825 and contact the author (perlbug@perl.org).
1828 echo $n "Continue? [n] $c" >&4
1832 echo "Continuing..." >&4
1836 echo "ABORTING..." >&4
1841 echo "Looks good..."
1844 echo "There is no MANIFEST file. I hope your kit is complete !"
1849 : Find the appropriate value for a newline for tr
1850 if test -n "$DJGPP"; then
1853 if test X"$trnl" = X; then
1854 case "`echo foo|tr '\n' x 2>/dev/null`" in
1858 if test X"$trnl" = X; then
1859 case "`echo foo|tr '\012' x 2>/dev/null`" in
1860 foox) trnl='\012' ;;
1863 if test X"$trnl" = X; then
1864 case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
1865 fooxy) trnl='\n\r' ;;
1868 if test X"$trnl" = X; then
1871 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1877 : compute the number of columns on the terminal for proper question formatting
1882 : set up the echo used in my read
1883 myecho="case \"\$xxxm\" in
1884 '') echo $n \"\$rp $c\" >&4;;
1886 '') echo $n \"[\$xxxm] $c\";;
1888 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
1890 echo $n \"[\$xxxm] $c\" >&4
1892 echo $n \"\$rp [\$xxxm] $c\" >&4
1898 : now set up to do reads with possible shell escape and default assignment
1904 case "\$fastread" in
1905 yes) case "\$dflt" in
1908 case "\$silent-\$rp" in
1913 *) case "\$silent" in
1914 true) case "\$rp" in
1919 while expr "X\$ans" : "X!" >/dev/null; do
1923 aok=''; eval "ans=\\"\$answ\\"" && aok=y
1931 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
1940 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
1945 echo "(OK, I'll run with -d after this question.)" >&4
1948 echo "*** Sorry, \$1 not supported yet." >&4
1958 echo "*** Substitution done -- please confirm."
1960 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
1965 echo "*** Error -- try again."
1972 case "\$ans\$xxxm\$nostick" in
1984 : create .config dir to save info across Configure sessions
1985 test -d ../.config || mkdir ../.config
1986 cat >../.config/README <<EOF
1987 This directory created by Configure to save information that should
1988 persist across sessions for $package.
1990 You may safely delete it if you wish.
1993 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
1995 $define|true|[yY]*) ;;
1996 *) case "$xversion" in
1999 *** WHOA THERE!!! ***
2001 This is an UNSTABLE DEVELOPMENT release.
2002 The version of this $package distribution is $xversion, that is, odd,
2003 (as opposed to even) and that signifies a development release.
2004 If you want a maintenance release, you want an even-numbered version.
2006 Do ***NOT*** install this into production use.
2007 Data corruption and crashes are possible.
2009 It is most seriously suggested that you do not continue any further
2010 unless you want to help in developing and debugging Perl.
2012 If you *still* want to build perl, you can answer 'y' now,
2013 or pass -Dusedevel to Configure.
2016 rp='Do you really want to continue?'
2020 [yY]) echo >&4 "Okay, continuing."
2021 usedevel="$define" ;;
2022 *) echo >&4 "Okay, bye."
2032 case "$versiononly" in
2033 '') versiononly="$define" ;;
2035 case "$installusrbinperl" in
2036 '') installusrbinperl="$undef" ;;
2041 : general instructions
2044 user=`(logname) 2>/dev/null`
2046 '') user=`whoami 2>&1`;;
2048 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2051 rp='Would you like to see the instructions?'
2062 This installation shell script will examine your system and ask you questions
2063 to determine how the perl5 package should be installed. If you get
2064 stuck on a question, you may use a ! shell escape to start a subshell or
2065 execute a command. Many of the questions will have default answers in square
2066 brackets; typing carriage return will give you the default.
2068 On some of the questions which ask for file or directory names you are allowed
2069 to use the ~name construct to specify the login directory belonging to "name",
2070 even if you don't have a shell which knows about that. Questions where this is
2071 allowed will be marked "(~name ok)".
2075 dflt='Type carriage return to continue'
2079 The prompter used in this script allows you to use shell variables and
2080 backticks in your answers. You may use $1, $2, etc... to refer to the words
2081 in the default answer, as if the default line was a set of arguments given to a
2082 script shell. This means you may also use $* to repeat the whole default line,
2083 so you do not have to re-type everything to add something to the default.
2085 Everytime there is a substitution, you will have to confirm. If there is an
2086 error (e.g. an unmatched backtick), the default answer will remain unchanged
2087 and you will be prompted again.
2089 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2090 the questions and use the computed defaults (or the previous answers if there
2091 was already a config.sh file). Type 'Configure -h' for a list of options.
2092 You may also start interactively and then answer '& -d' at any prompt to turn
2093 on the non-interactive behaviour for the remainder of the execution.
2099 Much effort has been expended to ensure that this shell script will run on any
2100 Unix system. If despite that it blows up on yours, your best bet is to edit
2101 Configure and run it again. If you can't run Configure for some reason,
2102 you'll have to generate a config.sh file by hand. Whatever problems you
2103 have, let me (perlbug@perl.org) know how I blew it.
2105 This installation script affects things in two ways:
2107 1) it may do direct variable substitutions on some of the files included
2109 2) it builds a config.h file for inclusion in C programs. You may edit
2110 any of these files as the need arises after running this script.
2112 If you make a mistake on a question, there is no easy way to back up to it
2113 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2114 files. Configure will offer to let you do this before it runs the SH files.
2117 dflt='Type carriage return to continue'
2119 case "$firsttime" in
2120 true) echo $user >>../.config/instruct;;
2124 : find out where common programs are
2126 echo "Locating common programs..." >&4
2139 if test -d \$dir/\$thing; then
2145 for thisthing in \$dir/\$thing; do
2146 : just loop through to pick last item
2148 if test -f \$thisthing; then
2151 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2154 elif test -f \$dir/\$thing.exe; then
2155 if test -n "$DJGPP"; then
2156 echo \$dir/\$thing.exe
2158 : on Eunice apparently
2211 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2212 pth="$pth /lib /usr/lib"
2213 for file in $loclist; do
2217 if test -f "$xxx"; then
2220 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2221 xxx=`./loc $file $file $pth`
2224 '') xxx=`./loc $file $file $pth`;;
2225 *) xxx=`./loc $xxx $xxx $pth`;;
2227 eval $file=$xxx$_exe
2231 echo $file is in $xxx.
2234 echo $file is in $xxx.
2237 echo "I don't know where '$file' is, and my life depends on it." >&4
2238 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2244 echo "Don't worry if any of the following aren't found..."
2246 for file in $trylist; do
2250 if test -f "$xxx"; then
2253 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2254 xxx=`./loc $file $file $pth`
2257 '') xxx=`./loc $file $file $pth`;;
2258 *) xxx=`./loc $xxx $xxx $pth`;;
2260 eval $file=$xxx$_exe
2264 echo $file is in $xxx.
2267 echo $file is in $xxx.
2270 echo "I don't see $file out there, $say."
2277 echo "Substituting grep for egrep."
2284 echo "Substituting cp for ln."
2293 echo "I can't find make or gmake, and my life depends on it." >&4
2294 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2302 *) # We can't have osname yet.
2303 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2304 # Assume that gmake, if found, is definitely GNU make
2305 # and prefer it over the system make.
2306 echo "Substituting gmake for make."
2314 echo "Hopefully test is built into your sh."
2317 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2318 echo "Using the test built into your sh."
2326 echo "Hopefully echo is built into your sh."
2331 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2332 $echo $n "hi there$c" >foo1
2333 echo $n "hi there$c" >foo2
2334 if cmp foo1 foo2 >/dev/null 2>&1; then
2335 echo "They are compatible. In fact, they may be identical."
2342 They are not compatible! You are probably running ksh on a non-USG system.
2343 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2344 have echo built in and we may have to run some Bourne shell scripts. That
2345 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2348 $echo $n "The star should be here-->$c"
2358 cat <<'EOSC' >>trygcc
2363 int main(int argc, char *argv[]) {
2367 if $cc -o try $ccflags $ldflags try.c; then
2370 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2376 case "`$cc -v -c try.c 2>&1`" in
2379 if $test X"$trygcc" = Xyes; then
2380 if gcc -o try -c try.c; then
2382 echo "You seem to have a working gcc, though." >&4
2383 rp="Would you like to use it?"
2385 if $test -f myread; then
2388 if $test -f UU/myread; then
2391 echo "Cannot find myread, sorry. Aborting." >&2
2396 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2397 if $test -f usethreads.cbu; then
2400 *** However, any setting of the C compiler flags (e.g. for thread support)
2401 *** has been lost. It may be necessary to pass -Dcc=gcc to Configure
2402 *** (together with e.g. -Dusethreads).
2418 cat <<'EOSC' >>checkcc
2423 int main(int argc, char *argv[]) {
2427 if $cc -o try $ccflags $ldflags try.c; then
2430 if $test X"$despair" = Xyes; then
2431 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2434 You need to find a working C compiler.
2435 Either (purchase and) install the C compiler supplied by your OS vendor,
2436 or for a free C compiler try http://gcc.gnu.org/
2437 I cannot continue any further, aborting.
2446 : determine whether symbolic links are supported
2449 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2450 echo "Symbolic links are supported." >&4
2453 echo "Symbolic links are NOT supported." >&4
2458 : determine whether symbolic links are supported
2462 echo "Checking how to test for symbolic links..." >&4
2464 if $test "X$issymlink" = X; then
2466 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2467 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2469 if test $? = 0; then
2472 echo "Your builtin 'test -h' may be broken." >&4
2475 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2478 if test -f "$p/$test"; then
2487 echo "Trying external '$test -h'." >&4
2488 issymlink="$test -h"
2489 if $test ! -h sym >/dev/null 2>&1; then
2490 echo "External '$test -h' is broken, too." >&4
2498 if $test "X$issymlink" = X; then
2499 if $test -L sym 2>/dev/null; then
2500 issymlink="$test -L"
2501 echo "The builtin '$test -L' worked." >&4
2504 if $test "X$issymlink" != X; then
2505 echo "You can test for symbolic links with '$issymlink'." >&4
2507 echo "I do not know how you can test for symbolic links." >&4
2511 *) echo "No symbolic links, so not testing for their testing..." >&4
2517 case "$mksymlinks" in
2520 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2523 *) case "$lns:$issymlink" in
2524 *"ln"*" -s:"*"test -"?)
2525 echo "Creating the symbolic links..." >&4
2526 echo "(First creating the subdirectories...)" >&4
2528 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2530 test -z "$directory" && break
2534 if test ! -d t/base; then
2535 echo "Failed to create the subdirectories. Aborting." >&4
2538 echo "(Then creating the symlinks...)" >&4
2539 awk '{print $1}' $src/MANIFEST | while true; do
2541 test -z "$filename" && break
2542 if test -f $filename; then
2543 if $issymlink $filename; then
2547 if test -f $filename; then
2548 echo "$filename already exists, not symlinking."
2550 ln -s $src/$filename $filename
2554 if test ! -f t/base/lex.t; then
2555 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2560 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2569 case "$usecrosscompile" in
2571 $echo "Cross-compiling..."
2574 *-*-gcc) # A cross-compiling gcc, probably.
2575 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2577 # leave out ld, choosing it is more complex
2579 ranlib=$targetarch-ranlib
2580 $echo 'extern int foo;' > try.c
2581 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2583 if $test $# -gt 0; then
2585 incpth="`$echo $incpth|$sed 's/^ //'`"
2586 echo "Guessing incpth '$incpth'." >&4
2588 j="`$echo $i|$sed 's,/include$,/lib,'`"
2589 if $test -d $j; then
2593 libpth="`$echo $libpth|$sed 's/^ //'`"
2594 echo "Guessing libpth '$libpth'." >&4
2599 case "$targetarch" in
2600 '') echo "Targetarch not defined." >&4; croak=y ;;
2601 *) echo "Using targetarch $targetarch." >&4 ;;
2604 '') echo "Incpth not defined." >&4; croak=y ;;
2605 *) echo "Using incpth '$incpth'." >&4 ;;
2608 '') echo "Libpth not defined." >&4; croak=y ;;
2609 *) echo "Using libpth '$libpth'." >&4 ;;
2612 '') for i in $incpth; do
2613 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2615 echo "Guessing usrinc $usrinc." >&4
2620 '') echo "Usrinc not defined." >&4; croak=y ;;
2623 *) echo "Using usrinc $usrinc." >&4 ;;
2625 case "$targethost" in
2626 '') echo "Targethost not defined." >&4; croak=y ;;
2627 *) echo "Using targethost $targethost." >&4
2632 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2635 /*) run=$src/Cross/run
2636 targetmkdir=$src/Cross/mkdir
2638 from=$src/Cross/from
2640 *) pwd=`$test -f ../Configure & cd ..; pwd`
2642 targetmkdir=$pwd/Cross/mkdir
2644 from=$pwd/Cross/from
2647 case "$targetrun" in
2648 '') targetrun=ssh ;;
2653 case "$targetfrom" in
2654 '') targetfrom=scp ;;
2658 from=$from-$targetfrom
2659 case "$targetdir" in
2661 echo "Guessing targetdir $targetdir." >&4
2664 case "$targetuser" in
2666 echo "Guessing targetuser $targetuser." >&4
2669 case "$targetfrom" in
2673 case "$targetrun" in
2685 '') cwd=$targetdir ;;
2689 if $test ! -f \$exe.xok; then
2693 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2696 *) echo "Unknown targetrun '$targetrun'" >&4
2700 case "$targetmkdir" in
2702 cat >$targetmkdir <<EOF
2704 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2706 $chmod a+rx $targetmkdir
2708 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2720 $targetmkdir \`dirname \$f\`
2721 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2724 $targetmkdir $targetdir/\`dirname \$f\`
2725 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2738 $mkdir -p $targetdir/\`dirname \$f\`
2739 $cp \$f $targetdir/\$f || exit 1
2742 $targetmkdir $targetdir/\`dirname \$f\`
2743 $cp \$f $targetdir/\$f || exit 1
2750 *) echo "Unknown targetto '$targetto'" >&4
2754 case "$targetfrom" in
2761 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2766 cp) cat >$from <<EOF
2771 cp $targetdir/\$f . || exit 1
2776 *) echo "Unknown targetfrom '$targetfrom'" >&4
2780 if $test ! -f $run; then
2781 echo "Target 'run' script '$run' not found." >&4
2785 if $test ! -f $to; then
2786 echo "Target 'to' script '$to' not found." >&4
2790 if $test ! -f $from; then
2791 echo "Target 'from' script '$from' not found." >&4
2795 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2799 Using '$run' for remote execution,
2800 and '$from' and '$to'
2801 for remote file transfer.
2807 usecrosscompile='undef'
2812 : see whether [:lower:] and [:upper:] are supported character classes
2814 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2816 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2820 *) # There is a discontinuity in EBCDIC between 'I' and 'J'
2821 # (0xc9 and 0xd1), therefore that is a nice testing point.
2822 if test "X$up" = X -o "X$low" = X; then
2823 case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
2829 if test "X$up" = X -o "X$low" = X; then
2830 case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
2836 if test "X$up" = X -o "X$low" = X; then
2837 case "`echo IJ | od -x 2>/dev/null`" in
2839 echo "Hey, this might be EBCDIC." >&4
2840 if test "X$up" = X -o "X$low" = X; then
2841 case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2842 ij) up='[A-IJ-RS-Z]'
2847 if test "X$up" = X -o "X$low" = X; then
2848 case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2858 case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
2860 echo "Using $up and $low to convert case." >&4
2863 echo "I don't know how to translate letters from upper to lower case." >&4
2864 echo "Your tr is not acting any way I know of." >&4
2868 : set up the translation script tr, must be called with ./tr of course
2872 '[A-Z][a-z]') exec $tr '$up' '$low';;
2873 '[a-z][A-Z]') exec $tr '$low' '$up';;
2880 : Try to determine whether config.sh was made on this system
2881 case "$config_sh" in
2883 myuname=`$uname -a 2>/dev/null`
2884 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2885 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2886 # because the A-Z/a-z are not consecutive.
2887 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2888 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2889 newmyuname="$myuname"
2891 case "$knowitall" in
2893 if test -f ../config.sh; then
2894 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2895 eval "`grep myuname= ../config.sh`"
2897 if test "X$myuname" = "X$newmyuname"; then
2905 : Get old answers from old config file if Configure was run on the
2906 : same system, otherwise use the hints.
2909 if test -f config.sh; then
2911 rp="I see a config.sh file. Shall I use it to set the defaults?"
2914 n*|N*) echo "OK, I'll ignore it."
2915 mv config.sh config.sh.old
2916 myuname="$newmyuname"
2918 *) echo "Fetching default answers from your old config.sh file..." >&4
2926 : Older versions did not always set $sh. Catch re-use of such
2936 if test ! -f config.sh; then
2939 First time through, eh? I have some defaults handy for some systems
2940 that need some extra help getting the Configure answers right:
2943 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2945 : Half the following guesses are probably wrong... If you have better
2946 : tests or hints, please send them to perlbug@perl.org
2947 : The metaconfig authors would also appreciate a copy...
2948 $test -f /irix && osname=irix
2949 $test -f /xenix && osname=sco_xenix
2950 $test -f /dynix && osname=dynix
2951 $test -f /dnix && osname=dnix
2952 $test -f /lynx.os && osname=lynxos
2953 $test -f /unicos && osname=unicos && osvers=`$uname -r`
2954 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
2955 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
2956 $test -f /bin/mips && /bin/mips && osname=mips
2957 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
2958 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
2959 $test -d /usr/apollo/bin && osname=apollo
2960 $test -f /etc/saf/_sactab && osname=svr4
2961 $test -d /usr/include/minix && osname=minix
2962 $test -f /system/gnu_library/bin/ar.pm && osname=vos
2963 if $test -d /MachTen -o -d /MachTen_Folder; then
2965 if $test -x /sbin/version; then
2966 osvers=`/sbin/version | $awk '{print $2}' |
2967 $sed -e 's/[A-Za-z]$//'`
2968 elif $test -x /usr/etc/version; then
2969 osvers=`/usr/etc/version | $awk '{print $2}' |
2970 $sed -e 's/[A-Za-z]$//'`
2976 $test -f /sys/posix.dll &&
2977 $test -f /usr/bin/what &&
2978 set X `/usr/bin/what /sys/posix.dll` &&
2979 $test "$3" = UWIN &&
2983 if $test -f $uname; then
2991 umips) osname=umips ;;
2994 [23]100) osname=mips ;;
2995 next*) osname=next ;;
2997 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
2998 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
3001 elif $test -f /etc/kconfig; then
3003 if test "$lns" = "$ln -s"; then
3005 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3007 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3014 if test -n "$DJGPP"; then
3023 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3025 'not found') osvers="$4"."$3" ;;
3026 '<3240'|'<>3240') osvers=3.2.0 ;;
3027 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3028 '=3250'|'>3250') osvers=3.2.5 ;;
3032 bsd386) osname=bsd386
3035 cygwin*) osname=cygwin
3038 *dc.osx) osname=dcosx
3044 domainos) osname=apollo
3050 dynixptx*) osname=dynixptx
3051 osvers=`echo "$4"|sed 's/^v//'`
3053 freebsd) osname=freebsd
3055 genix) osname=genix ;;
3057 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3073 netbsd*) osname=netbsd
3076 news-os) osvers="$3"
3078 4*) osname=newsos4 ;;
3082 next*) osname=next ;;
3083 nonstop-ux) osname=nonstopux ;;
3084 openbsd) osname=openbsd
3087 POSIX-BC | posix-bc ) osname=posix-bc
3090 powerux | power_ux | powermax_os | powermaxos | \
3091 powerunix | power_unix) osname=powerux
3097 solaris) osname=solaris
3099 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3106 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3110 titanos) osname=titanos
3119 ultrix) osname=ultrix
3122 osf1|mls+) case "$5" in
3125 osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3128 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3131 hp*) osname=hp_osf1 ;;
3132 mips) osname=mips_osf1 ;;
3135 unixware) osname=svr5
3143 $2) case "$osname" in
3147 : svr4.x or possibly later
3157 if test -f /stand/boot ; then
3158 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3159 if test -n "$INITPROG" -a -f "$INITPROG"; then
3160 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3161 if test -n "$isesix"; then
3169 *) if test -f /etc/systemid; then
3171 set `echo $3 | $sed 's/\./ /g'` $4
3172 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3174 elif $test -f $src/hints/sco_$1_$2.sh; then
3176 elif $test -f $src/hints/sco_$1.sh; then
3181 '') : Still unknown. Probably a generic Sys V.
3190 *) case "$osname" in
3191 '') : Still unknown. Probably a generic BSD.
3199 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3200 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3201 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3204 $rm -f UU/kernel.what
3205 elif test -d c:/.; then
3212 case "$targetarch" in
3215 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3220 : Now look for a hint file osname_osvers, unless one has been
3221 : specified already.
3224 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3225 : Also try without trailing minor version numbers.
3226 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3227 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3228 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3229 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3232 *) case "$osvers" in
3235 *) if $test -f $src/hints/$file.sh ; then
3237 elif $test -f $src/hints/$xfile.sh ; then
3239 elif $test -f $src/hints/$xxfile.sh ; then
3241 elif $test -f $src/hints/$xxxfile.sh ; then
3243 elif $test -f $src/hints/$xxxxfile.sh ; then
3245 elif $test -f "$src/hints/${osname}.sh" ; then
3254 if $test -f Policy.sh ; then
3257 none) dflt="Policy" ;;
3258 *) dflt="Policy $dflt" ;;
3263 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3267 if $test -f Policy.sh ; then
3270 There's also a Policy hint file available, which should make the
3271 site-specific (policy) questions easier to answer.
3278 You may give one or more space-separated answers, or "none" if appropriate.
3279 A well-behaved OS will have no hints, so answering "none" or just "Policy"
3280 is a good thing. DO NOT give a wrong version or a wrong OS.
3284 rp="Which of these apply, if any?"
3287 for file in $tans; do
3288 if $test X$file = XPolicy -a -f Policy.sh; then
3290 $cat Policy.sh >> UU/config.sh
3291 elif $test -f $src/hints/$file.sh; then
3292 . $src/hints/$file.sh
3293 $cat $src/hints/$file.sh >> UU/config.sh
3294 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3297 : Give one chance to correct a possible typo.
3298 echo "$file.sh does not exist"
3300 rp="hint to use instead?"
3302 for file in $ans; do
3303 if $test -f "$src/hints/$file.sh"; then
3304 . $src/hints/$file.sh
3305 $cat $src/hints/$file.sh >> UU/config.sh
3306 elif $test X$ans = X -o X$ans = Xnone ; then
3309 echo "$file.sh does not exist -- ignored."
3316 : Remember our hint file for later.
3317 if $test -f "$src/hints/$file.sh" ; then
3327 echo "Fetching default answers from $config_sh..." >&4
3331 cp $config_sh config.sh 2>/dev/null
3341 test "$override" && . ./optdef.sh
3343 : Restore computed paths
3344 for file in $loclist $trylist; do
3345 eval $file="\$_$file"
3350 Configure uses the operating system name and version to set some defaults.
3351 The default value is probably right if the name rings a bell. Otherwise,
3352 since spelling matters for me, either accept the default or answer "none"
3359 ''|' '|none) dflt=none ;;
3360 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3363 *) dflt="$osname" ;;
3365 rp="Operating system name?"
3369 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3375 ''|' '|none) dflt=none ;;
3376 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3377 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3379 ''|' ') dflt=none ;;
3384 *) dflt="$osvers" ;;
3386 rp="Operating system version?"
3396 : who configured the system
3397 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3398 cf_by=`(logname) 2>/dev/null`
3401 cf_by=`(whoami) 2>/dev/null`
3403 "") cf_by=unknown ;;
3407 : set up the script used to warn in case of inconsistency
3414 echo "*** WHOA THERE!!! ***" >&4
3415 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
3416 rp=" Keep the $hint value?"
3419 y) td=$was; tu=$was;;
3423 : function used to set $1 to $val
3424 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
3426 $define$undef) . ./whoa; eval "$var=\$td";;
3427 $undef$define) . ./whoa; eval "$var=\$tu";;
3428 *) eval "$var=$val";;
3432 $define|true|[yY]*) dflt='y';;
3437 Perl can be built to use the SOCKS proxy protocol library. To do so,
3438 Configure must be run with -Dusesocks. If you use SOCKS you also need
3439 to use the PerlIO abstraction layer, this will be implicitly selected.
3441 If this doesn't make any sense to you, just accept the default '$dflt'.
3443 rp='Build Perl for SOCKS?'
3446 y|Y) val="$define" ;;
3453 $define|true|[yY]*) useperlio="$define";;
3456 case "$useperlio" in
3457 $define|true|[yY]*|'') dflt='y';;
3462 Previous version of $package used the standard IO mechanisms as
3463 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
3464 alternate IO mechanisms via the PerlIO abstraction layer, but the
3465 stdio mechanism is still available if needed. The abstraction layer
3466 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
3467 Using PerlIO with sfio may cause problems with some extension modules.
3469 If this doesn't make any sense to you, just accept the default '$dflt'.
3471 rp='Use the PerlIO abstraction layer?'
3478 echo "Ok, doing things the stdio way."
3487 case "$useperlio" in
3488 $define|true|[yY]*) ;;
3491 You are using the SOCKS proxy protocol library which means that you
3492 should also use the PerlIO layer. You may be headed for trouble.
3501 case "$usethreads" in
3502 $define|true|[yY]*) dflt='y';;
3503 *) # Catch case where user specified ithreads or 5005threads but
3504 # forgot -Dusethreads (A.D. 4/2002)
3505 case "$useithreads$use5005threads" in
3507 case "$useperlio" in
3508 "$define") dflt='y' ;;
3518 Perl can be built to take advantage of threads on some systems.
3519 To do so, Configure can be run with -Dusethreads.
3521 Note that Perl built with threading support runs slightly slower
3522 and uses more memory than plain Perl. The current implementation
3523 is believed to be stable, but it is fairly new, and so should be
3524 treated with caution.
3526 If this doesn't make any sense to you, just accept the default '$dflt'.
3528 rp='Build a threading Perl?'
3531 y|Y) val="$define" ;;
3537 case "$usethreads" in
3541 Since release 5.6, Perl has had two different threading implementations,
3542 the newer interpreter-based version (ithreads) with one interpreter per
3543 thread, and the older 5.005 version (5005threads).
3544 The 5005threads version is effectively unmaintained and will probably be
3545 removed in Perl 5.10, so there should be no need to build a Perl using it
3546 unless needed for backwards compatibility with some existing 5.005threads
3550 : Default to ithreads unless overridden on command line or with
3553 case "$use5005threads" in
3554 $define|true|[yY]*) dflt='n';;
3556 case "$useithreads" in
3557 $undef|false|[nN]*) dflt='n';;
3559 rp='Use the newer interpreter-based ithreads?'
3562 y|Y) val="$define" ;;
3567 : Now set use5005threads to the opposite value.
3568 case "$useithreads" in
3569 $define) val="$undef" ;;
3576 useithreads="$undef"
3577 use5005threads="$undef"
3581 case "$useithreads$use5005threads" in
3585 You cannot have both the ithreads and the 5.005 threads enabled
3586 at the same time. Disabling the 5.005 threads since they are
3587 much less stable than the ithreads.
3590 use5005threads="$undef"
3594 if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then
3597 *** To build with ithreads you must also use the PerlIO layer.
3598 *** Cannot continue, aborting.
3604 case "$d_oldpthreads" in
3605 '') : Configure tests would be welcome here. For now, assume undef.
3607 *) val="$d_oldpthreads" ;;
3613 case "$usethreads" in
3614 "$define"|true|[yY]*)
3615 : Look for a hint-file generated 'call-back-unit'. If the
3616 : user has specified that a threading perl is to be built,
3617 : we may need to set or change some other defaults.
3618 if $test -f usethreads.cbu; then
3619 echo "Your platform has some specific hints for threaded builds, using them..."
3623 (Your platform doesn't have any specific hints for threaded builds.
3624 Assuming POSIX threads, then.)
3632 Perl can be built so that multiple Perl interpreters can coexist
3633 within the same Perl executable.
3636 case "$useithreads" in
3639 This multiple interpreter support is required for interpreter-based threads.
3643 *) case "$usemultiplicity" in
3644 $define|true|[yY]*) dflt='y';;
3648 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
3649 rp='Build Perl for multiplicity?'
3652 y|Y) val="$define" ;;
3661 case "$usemorebits" in
3662 "$define"|true|[yY]*)
3663 use64bitint="$define"
3664 uselongdouble="$define"
3665 usemorebits="$define"
3667 *) usemorebits="$undef"
3671 : make some quick guesses about what we are up against
3673 $echo $n "Hmm... $c"
3683 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
3684 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
3686 echo "Looks kind of like an OSF/1 system, but we'll see..."
3688 elif test `echo abc | $tr a-z A-Z` = Abc ; then
3689 xxx=`./loc addbib blurfl $pth`
3690 if $test -f $xxx; then
3691 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3695 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3696 echo "Looks kind of like an extended USG system, but we'll see..."
3698 echo "Looks kind of like a USG system, but we'll see..."
3702 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3703 echo "Looks kind of like a BSD system, but we'll see..."
3707 echo "Looks kind of like a Version 7 system, but we'll see..."
3710 case "$eunicefix" in
3713 There is, however, a strange, musty smell in the air that reminds me of
3714 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3718 : it so happens the Eunice I know will not run shell scripts in Unix format
3722 echo "Congratulations. You aren't running Eunice."
3726 : Detect OS2. The p_ variable is set above in the Head.U unit.
3727 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
3728 : semicolon as a patch separator
3733 I have the feeling something is not exactly right, however...don't tell me...
3734 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3735 (Or you may be running DOS with DJGPP.)
3740 if test -f /xenix; then
3741 echo "Actually, this looks more like a XENIX system..."
3746 echo "It's not Xenix..."
3751 if test -f /venix; then
3752 echo "Actually, this looks more like a VENIX system..."
3759 echo "Nor is it Venix..."
3762 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3763 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3770 rp="Use which C compiler?"
3774 : See if they have not cc but they do have gcc
3776 : Look for a hint-file generated 'call-back-unit'. Now that the
3777 : user has specified the compiler, we may need to set or change some
3779 if $test -f cc.cbu; then
3785 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3791 printf("%s\n", __VERSION__);
3793 printf("%s\n", "1");
3799 if $cc -o try $ccflags $ldflags try.c; then
3800 gccversion=`$run ./try`
3801 case "$gccversion" in
3802 '') echo "You are not using GNU cc." ;;
3803 *) echo "You are using GNU cc $gccversion."
3809 echo "*** WHOA THERE!!! ***" >&4
3810 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3811 case "$knowitall" in
3813 echo " You'd better start hunting for one and let me know about it." >&4
3819 case "$gccversion" in
3820 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3822 case "$gccversion" in
3823 '') gccosandvers='' ;;
3824 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3825 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3827 case "$gccosandvers" in
3828 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3829 $osname$osvers) ;; # looking good
3830 $osname*) cat <<EOM >&4
3832 *** WHOA THERE!!! ***
3834 Your gcc has not been compiled for the exact release of
3835 your operating system ($gccosandvers versus $osname$osvers).
3837 In general it is a good idea to keep gcc synchronized with
3838 the operating system because otherwise serious problems
3839 may ensue when trying to compile software, like Perl.
3841 I'm trying to be optimistic here, though, and will continue.
3842 If later during the configuration and build icky compilation
3843 problems appear (headerfile conflicts being the most common
3844 manifestation), I suggest reinstalling the gcc to match
3845 your operating system release.
3849 *) gccosandvers='' ;; # failed to parse, better be silent
3857 # gcc 3.* complain about adding -Idirectories that they already know about,
3858 # so we will take those off from locincpth.
3859 case "$gccversion" in
3861 echo "main(){}">try.c
3862 for incdir in $locincpth; do
3863 warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
3864 grep '^cc1: warning: changing search order '`
3865 if test "X$warn" != X; then
3866 locincpth=`echo " $locincpth " | sed "s! $incdir ! !"`
3872 : decide how portable to be. Allow command line overrides.
3873 case "$d_portable" in
3875 *) d_portable="$define" ;;
3878 : set up shell script to do ~ expansion
3884 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3887 if $test -f /bin/csh; then
3888 /bin/csh -f -c "glob \$1"
3893 name=\`$expr x\$1 : '..\([^/]*\)'\`
3894 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3895 if $test ! -d "\$dir"; then
3897 echo "\$me: can't locate home directory for: \$name" >&2
3902 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3918 : now set up to get a file name
3922 cat <<'EOSC' >>getfile
3938 : getfile will accept an answer from the comma-separated list
3939 : enclosed in parentheses even if it does not meet other criteria.
3940 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3941 fn=`echo $fn | sed 's/(.*)//'`
3947 loc_file=`expr $fn : '.*:\(.*\)'`
3948 fn=`expr $fn : '\(.*\):.*'`
3956 */*) fullpath=true;;
3965 *e*) exp_file=true;;
3968 *p*) nopath_ok=true;;
3973 *d*) type='Directory';;
3974 *l*) type='Locate';;
3979 Locate) what='File';;
3984 case "$d_portable" in
3992 while test "$type"; do
3997 true) rp="$rp (~name ok)";;
4000 if test -f UU/getfile.ok && \
4001 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
4020 value=`UU/filexp $ans`
4023 if test "$ans" != "$value"; then
4024 echo "(That expands to $value on this system.)"
4038 /*) value="$ansexp" ;;
4039 [a-zA-Z]:/*) value="$ansexp" ;;
4044 echo "I shall only accept a full path name, as in /bin/ls." >&4
4045 echo "Use a ! shell escape if you wish to check pathnames." >&4
4048 echo "Please give a full path name, starting with slash." >&4
4051 echo "Note that using ~name is ok provided it expands well." >&4
4064 for fp in $gfpth; do
4065 if test "X$fp" = X.; then
4070 if test -f "$pf"; then
4072 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
4074 echo "($value is not a plain file, but that's ok.)"
4077 if test X"$type" = X; then
4084 for fp in $gfpth; do
4085 if test "X$fp" = X.; then
4090 direxp="$fp/$ansexp"
4092 if test -d "$direxp"; then
4100 if test -d "$ansexp"; then
4101 echo "(Looking for $loc_file in directory $value.)"
4102 value="$value/$loc_file"
4103 ansexp="$ansexp/$loc_file"
4105 if test -f "$ansexp"; then
4108 case "$nopath_ok" in
4109 true) case "$value" in
4111 *) echo "Assuming $value will be in people's path."
4127 if test "$fastread" = yes; then
4132 rp="$what $value doesn't exist. Use that name anyway?"
4151 test "X$gfpthkeep" != Xy && gfpth=""
4154 : What should the include directory be ?
4156 $echo $n "Hmm... $c"
4160 if $test -f /bin/mips && /bin/mips; then
4161 echo "Looks like a MIPS system..."
4162 $cat >usr.c <<'EOCP'
4163 #ifdef SYSTYPE_BSD43
4167 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4168 dflt='/bsd43/usr/include'
4172 mips_type='System V'
4174 $rm -f usr.c usr.out
4175 echo "and you're compiling with the $mips_type compiler and libraries."
4179 echo "Doesn't look like a MIPS system."
4189 case "$xxx_prompt" in
4192 rp='Where are the include files you want to use?'
4200 : see how we invoke the C preprocessor
4202 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4203 cat <<'EOT' >testcpp.c
4209 if test ! -f cppstdin; then
4210 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4211 # AIX cc -E doesn't show the absolute headerfile
4212 # locations but we'll cheat by using the -M flag.
4213 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
4215 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4218 echo "Keeping your $hint cppstdin wrapper."
4221 wrapper=`pwd`/cppstdin
4225 if $test "X$cppstdin" != "X" && \
4226 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4227 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4229 echo "You used to use $cppstdin $cppminus so we'll use that again."
4231 '') echo "But let's see if we can live without a wrapper..." ;;
4233 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4234 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4236 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4239 echo "(However, $cpprun $cpplast does not work, let's see...)"
4247 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4254 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4255 $cc -E <testcpp.c >testcpp.out 2>&1; \
4256 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4257 echo "Yup, it does."
4260 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4261 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4262 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4263 echo "Yup, it does."
4266 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4267 $cc -P <testcpp.c >testcpp.out 2>&1; \
4268 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4269 echo "Yipee, that works!"
4272 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4273 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4274 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4275 echo "At long last!"
4278 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4279 $cpp <testcpp.c >testcpp.out 2>&1; \
4280 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4284 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4285 $cpp - <testcpp.c >testcpp.out 2>&1; \
4286 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4287 echo "Hooray, it works! I was beginning to wonder."
4290 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4291 $wrapper <testcpp.c >testcpp.out 2>&1; \
4292 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4298 rp="No dice. I can't find a C preprocessor. Name one:"
4302 $x_cpp <testcpp.c >testcpp.out 2>&1
4303 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4304 echo "OK, that will do." >&4
4306 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4321 echo "Perhaps can we force $cc -E using a wrapper..."
4322 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4323 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4329 echo "Nope, we'll have to live without it..."
4343 "$wrapper"|'cppstdin') ;;
4344 *) $rm -f $wrapper;;
4346 $rm -f testcpp.c testcpp.out
4348 : Set private lib path
4351 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4356 '') dlist="$loclibpth $plibpth $glibpth";;
4357 *) dlist="$libpth";;
4360 : Now check and see which directories actually exist, avoiding duplicates
4364 if $test -d $xxx; then
4367 *) libpth="$libpth $xxx";;
4373 Some systems have incompatible or broken versions of libraries. Among
4374 the directories listed in the question below, please remove any you
4375 know not to be holding relevant libraries, and add any that are needed.
4376 Say "none" for none.
4387 rp="Directories to use for library searches?"
4394 : compute shared library extension
4397 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4407 On some systems, shared libraries may be available. Answer 'none' if
4408 you want to suppress searching of shared libraries for the remainder
4409 of this configuration.
4412 rp='What is the file extension used for shared libraries?'
4416 : Define several unixisms.
4417 : Hints files or command line option can be used to override them.
4418 : The convoluted testing is in case hints files set either the old
4421 '') case "$exe_ext" in
4423 *) _exe="$exe_ext" ;;
4428 '') case "$lib_ext" in
4435 '') case "$obj_ext" in
4442 '') case "$path_sep" in
4453 : Which makefile gets called first. This is used by make depend.
4454 case "$firstmakefile" in
4455 '') firstmakefile='makefile';;
4458 : Looking for optional libraries
4460 echo "Checking for optional libraries..." >&4
4465 case "$libswanted" in
4466 '') libswanted='c_s';;
4469 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4475 for thisdir in $libpth $xlibpth; do
4476 test -d $thisdir && libspath="$libspath $thisdir"
4478 for thislib in $libswanted; do
4479 for thisdir in $libspath; do
4481 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4482 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4483 $test -f "$xxx" && eval $libscheck
4484 $test -f "$xxx" && libstyle=shared
4486 if test ! -f "$xxx"; then
4487 xxx=$thisdir/lib$thislib.$so
4488 $test -f "$xxx" && eval $libscheck
4489 $test -f "$xxx" && libstyle=shared
4491 if test ! -f "$xxx"; then
4492 xxx=$thisdir/lib$thislib$_a
4493 $test -f "$xxx" && eval $libscheck
4494 $test -f "$xxx" && libstyle=static
4496 if test ! -f "$xxx"; then
4497 xxx=$thisdir/$thislib$_a
4498 $test -f "$xxx" && eval $libscheck
4499 $test -f "$xxx" && libstyle=static
4501 if test ! -f "$xxx"; then
4502 xxx=$thisdir/lib${thislib}_s$_a
4503 $test -f "$xxx" && eval $libscheck
4504 $test -f "$xxx" && libstyle=static
4505 $test -f "$xxx" && thislib=${thislib}_s
4507 if test ! -f "$xxx"; then
4508 xxx=$thisdir/Slib$thislib$_a
4509 $test -f "$xxx" && eval $libscheck
4510 $test -f "$xxx" && libstyle=static
4512 if $test -f "$xxx"; then
4514 shared) echo "Found -l$thislib (shared)." ;;
4515 static) echo "Found -l$thislib." ;;
4516 *) echo "Found -l$thislib ($libstyle)." ;;
4520 *) dflt="$dflt -l$thislib"
4521 libsfound="$libsfound $xxx"
4523 libsfiles="$libsfiles $yyy"
4524 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4525 case " $libsdirs " in
4527 *) libsdirs="$libsdirs $yyy" ;;
4534 if $test ! -f "$xxx"; then
4535 echo "No -l$thislib."
4546 ' '|'') dflt='none';;
4551 In order to compile $package on your machine, a number of libraries
4552 are usually needed. Include any other special libraries here as well.
4553 Say "none" for none. The default list is almost always right.
4557 rp="What libraries to use?"
4564 : determine optimization, if desired, or use for debug flag also
4566 ' '|$undef) dflt='none';;
4568 *) dflt="$optimize";;
4572 By default, $package compiles with the -O flag to use the optimizer.
4573 Alternately, you might want to use the symbolic debugger, which uses
4574 the -g flag (on traditional Unix systems). Either flag can be
4575 specified here. To use neither flag, specify the word "none".
4578 rp="What optimizer/debugger flag should be used?"
4582 'none') optimize=" ";;
4586 : We will not override a previous value, but we might want to
4587 : augment a hint file
4589 default|recommended)
4590 case "$gccversion" in
4591 1*) dflt='-fpcc-struct-return' ;;
4594 *-g*) dflt="$dflt -DDEBUGGING";;
4596 case "$gccversion" in
4597 2*) if test -d /etc/conf/kconfig.d &&
4598 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
4604 case "$gccversion" in
4608 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
4609 echo 'int main(void) { return 0; }' > gcctest.c
4610 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
4611 echo "Yes, it does." 2>&1
4614 echo "Leaving current flags $ccflags alone." 2>&1
4616 *) dflt="$dflt -fno-strict-aliasing" ;;
4619 echo "Nope, it doesn't, but that's ok." 2>&1
4626 case "$mips_type" in
4627 *BSD*|'') inclwanted="$locincpth $usrinc";;
4628 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
4630 for thisincl in $inclwanted; do
4631 if $test -d $thisincl; then
4632 if $test x$thisincl != x$usrinc; then
4634 *" -I$thisincl "*);;
4635 *) dflt="$dflt -I$thisincl ";;
4641 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
4643 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
4651 *) dflt="$dflt -D$2";;
4655 set signal.h LANGUAGE_C; eval $inctest
4659 ccflags="$ccflags -DSOCKS"
4664 default|recommended) dflt="$ccflags $dflt" ;;
4665 *) dflt="$ccflags";;
4674 Your C compiler may want other flags. For this question you should include
4675 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
4676 but you should NOT include libraries or ld flags like -lwhatever. If you
4677 want $package to honor its debug switch, you should include -DDEBUGGING here.
4678 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
4680 To use no flags, specify the word "none".
4686 rp="Any additional cc flags?"
4693 : the following weeds options from ccflags that are of no interest to cpp
4695 '') cppflags="$ccflags" ;;
4696 *) cppflags="$cppflags $ccflags" ;;
4698 case "$gccversion" in
4699 1*) cppflags="$cppflags -D__GNUC__"
4701 case "$mips_type" in
4703 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4709 echo "Let me guess what the preprocessor flags are..." >&4
4723 *) ftry="$previous $flag";;
4725 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4726 >cpp1.out 2>/dev/null && \
4727 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4728 >cpp2.out 2>/dev/null && \
4729 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4730 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4732 cppflags="$cppflags $ftry"
4742 *-*) echo "They appear to be: $cppflags";;
4744 $rm -f cpp.c cpp?.out
4748 : flags used in final linking phase
4750 '') if ./venix; then
4756 *-posix*) dflt="$dflt -posix" ;;
4759 *) dflt="$ldflags";;
4762 : Try to guess additional flags to pick up local libraries.
4763 for thislibdir in $libpth; do
4764 case " $loclibpth " in
4767 *"-L$thislibdir "*) ;;
4768 *) dflt="$dflt -L$thislibdir" ;;
4780 Your C linker may need flags. For this question you should
4781 include -L/whatever and any other flags used by the C linker, but you
4782 should NOT include libraries like -lwhatever.
4784 Make sure you include the appropriate -L/path flags if your C linker
4785 does not normally search all of the directories you specified above,
4788 To use no flags, specify the word "none".
4792 rp="Any additional ld flags (NOT including libraries)?"
4798 rmlist="$rmlist pdp11"
4802 echo "Checking your choice of C compiler and flags for coherency..." >&4
4803 $cat > try.c <<'EOF'
4805 int main() { printf("Ok\n"); exit(0); }
4807 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
4809 $cat >try.msg <<'EOM'
4810 I've tried to compile and run the following simple program:
4813 $cat try.c >> try.msg
4815 $cat >> try.msg <<EOM
4822 and I got the following output:
4826 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
4827 if $sh -c "$run ./try" >>try.msg 2>&1; then
4831 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4834 cat >> try.msg <<'EOQS'
4835 If $libs contains -lsfio, and sfio is mis-configured, then it
4836 sometimes (apparently) runs and exits with a 0 status, but with no
4837 output! It may have to do with sfio's use of _exit vs. exit.
4840 rp="You have a big problem. Shall I abort Configure"
4847 echo "The program compiled OK, but exited with status $?." >>try.msg
4848 rp="You have a problem. Shall I abort Configure"
4852 echo "I can't compile the test program." >>try.msg
4853 rp="You have a BIG problem. Shall I abort Configure"
4859 case "$knowitall" in
4861 echo "(The supplied flags or libraries might be incorrect.)"
4869 *) echo "Ok. Stopping Configure." >&4
4874 n) echo "OK, that should do.";;
4876 $rm -f try try.* core
4878 : define a shorthand compile call
4882 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
4883 : define a shorthand compile call for compilations that should be ok.
4887 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
4889 : check for lengths of integral types
4893 echo "Checking to see how big your integers are..." >&4
4894 $cat >try.c <<'EOCP'
4898 printf("intsize=%d;\n", (int)sizeof(int));
4899 printf("longsize=%d;\n", (int)sizeof(long));
4900 printf("shortsize=%d;\n", (int)sizeof(short));
4905 if eval $compile_ok && $run ./try > /dev/null; then
4907 echo "Your integers are $intsize bytes long."
4908 echo "Your long integers are $longsize bytes long."
4909 echo "Your short integers are $shortsize bytes long."
4913 Help! I can't compile and run the intsize test program: please enlighten me!
4914 (This is probably a misconfiguration in your system or libraries, and
4915 you really ought to fix it. Still, I'll try anyway.)
4919 rp="What is the size of an integer (in bytes)?"
4923 rp="What is the size of a long integer (in bytes)?"
4927 rp="What is the size of a short integer (in bytes)?"
4935 : check for long long
4937 echo "Checking to see if you have long long..." >&4
4938 echo 'int main() { long long x = 7; return 0; }' > try.c
4940 if eval $compile; then
4942 echo "You have long long."
4945 echo "You do not have long long."
4951 : check for length of long long
4952 case "${d_longlong}${longlongsize}" in
4955 echo "Checking to see how big your long longs are..." >&4
4956 $cat >try.c <<'EOCP'
4960 printf("%d\n", (int)sizeof(long long));
4965 if eval $compile_ok; then
4966 longlongsize=`$run ./try`
4967 echo "Your long longs are $longlongsize bytes long."
4971 echo "(I can't seem to compile the test program. Guessing...)"
4972 rp="What is the size of a long long (in bytes)?"
4976 if $test "X$longsize" = "X$longlongsize"; then
4977 echo "(That isn't any different from an ordinary long.)"
4983 : determine filename position in cpp output
4985 echo "Computing filename position in cpp output for #include directives..." >&4
4987 vos) testaccess=-e ;;
4990 echo '#include <stdio.h>' > foo.c
4993 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
4994 $grep '^[ ]*#.*stdio\.h' | \
4995 while read cline; do
4998 while $test \$# -gt 0; do
4999 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5004 pos=\`expr \$pos + 1\`
5016 *) pos="${fieldn}th";;
5018 echo "Your cpp writes the filename in the $pos field of the line."
5021 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
5024 : locate header file
5029 for usrincdir in $usrinc
5031 if test -f \$usrincdir/\$wanted; then
5032 echo "\$usrincdir/\$wanted"
5036 awkprg='{ print \$$fieldn }'
5037 echo "#include <\$wanted>" > foo\$\$.c
5038 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5039 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5040 while read cline; do
5041 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5043 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5044 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5049 # status = 0: grep returned 0 lines, case statement not executed
5050 # status = 1: headerfile found
5051 # status = 2: while loop executed, no headerfile found
5055 if test \$status -eq 1; then
5062 : define an alternate in-header-list? function
5063 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5064 cont=true; xxf="echo \"<\$1> found.\" >&4";
5065 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5066 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5068 case $# in 4) instead=instead;; *) instead="at last";; esac;
5069 while $test "$cont"; do
5071 var=$2; eval "was=\$$2";
5072 if $test "$xxx" && $test -r "$xxx";
5074 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5077 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5078 set $yyy; shift; shift; yyy=$@;
5079 case $# in 0) cont="";;
5080 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5081 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5082 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5083 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5087 do set $yyy; var=$2; eval "was=\$$2";
5088 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5089 set $yyy; shift; shift; yyy=$@;
5092 : see if inttypes.h is available
5093 : we want a real compile instead of Inhdr because some systems
5094 : have an inttypes.h which includes non-existent headers
5097 #include <inttypes.h>
5099 static int32_t foo32 = 0x12345678;
5103 if eval $compile; then
5104 echo "<inttypes.h> found." >&4
5107 echo "<inttypes.h> NOT found." >&4
5116 echo "Checking to see if you have int64_t..." >&4
5118 #include <sys/types.h>
5119 #$i_inttypes I_INTTYPES
5121 #include <inttypes.h>
5123 int main() { int64_t x = 7; }
5126 if eval $compile; then
5128 echo "You have int64_t."
5131 echo "You do not have int64_t."
5139 echo "Checking which 64-bit integer type we could use..." >&4
5145 val='"unsigned int"'
5150 *) case "$longsize" in
5154 val='"unsigned long"'
5159 *) case "$d_longlong:$longlongsize" in
5164 val='"unsigned long long"'
5169 *) case "$d_int64_t" in
5188 '') echo "Alas, no 64-bit integer types in sight." >&4
5191 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5197 case "$uselonglong" in
5198 "$define"|true|[yY]*)
5201 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5203 use64bitint="$define"
5206 case "$use64bits" in
5207 "$define"|true|[yY]*)
5210 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5212 use64bitint="$define"
5215 case "$use64bitints" in
5216 "$define"|true|[yY]*)
5219 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5221 use64bitint="$define"
5224 case "$use64bitsint" in
5225 "$define"|true|[yY]*)
5228 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5230 use64bitint="$define"
5233 case "$uselonglongs" in
5234 "$define"|true|[yY]*)
5237 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5239 use64bitint="$define"
5242 case "$use64bitsall" in
5243 "$define"|true|[yY]*)
5246 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5248 use64bitall="$define"
5253 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5255 case "$use64bitall" in
5256 "$define"|true|[yY]*) use64bitint="$define" ;;
5262 You have natively 64-bit long integers.
5266 *) case "$use64bitint" in
5267 "$define"|true|[yY]*) dflt='y';;
5276 Perl can be built to take advantage of 64-bit integer types
5277 on some systems. To do so, Configure can be run with -Duse64bitint.
5278 Choosing this option will most probably introduce binary incompatibilities.
5280 If this doesn't make any sense to you, just accept the default '$dflt'.
5281 (The default has been chosen based on your configuration.)
5283 rp='Try to use 64-bit integers, if available?'
5286 [yY]*) val="$define" ;;
5294 case "$use64bitall" in
5295 "$define"|true|[yY]*) dflt='y' ;;
5296 *) case "$longsize" in
5304 You may also choose to try maximal 64-bitness. It means using as much
5305 64-bitness as possible on the platform. This in turn means even more
5306 binary incompatibilities. On the other hand, your platform may not
5307 have any more 64-bitness available than what you already have chosen.
5309 If this doesn't make any sense to you, just accept the default '$dflt'.
5310 (The default has been chosen based on your configuration.)
5312 rp='Try to use maximal 64-bit support, if available?'
5315 [yY]*) val="$define" ;;
5320 case "$use64bitall" in
5322 case "$use64bitint" in
5326 Since you have chosen a maximally 64-bit build, I'm also turning on
5327 the use of 64-bit integers.
5329 use64bitint="$define" ;;
5334 case "$use64bitint" in
5335 "$define"|true|[yY]*)
5336 : Look for a hint-file generated 'call-back-unit'. If the
5337 : user has specified that a 64-bit perl is to be built,
5338 : we may need to set or change some other defaults.
5339 if $test -f use64bitint.cbu; then
5340 echo "Your platform has some specific hints for 64-bit integers, using them..."
5344 4) case "$archname64" in
5345 '') archname64=64int ;;
5352 case "$use64bitall" in
5353 "$define"|true|[yY]*)
5354 : Look for a hint-file generated 'call-back-unit'. If the
5355 : user has specified that a maximally 64-bit perl is to be built,
5356 : we may need to set or change some other defaults.
5357 if $test -f use64bitall.cbu; then
5358 echo "Your platform has some specific hints for 64-bit builds, using them..."
5362 4) case "$archname64" in
5363 ''|64int) archname64=64all ;;
5371 echo "Checking for GNU C Library..." >&4
5373 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
5374 alone are insufficient to distinguish different versions, such as
5375 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
5376 libc version 2.1.0. A. Dougherty, June 3, 2002.
5382 # ifdef __GLIBC_MINOR__
5383 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
5384 # include <gnu/libc-version.h>
5385 printf("%s\n", gnu_get_libc_version());
5387 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
5390 printf("%d\n", __GLIBC__);
5399 if eval $compile_ok && $run ./try > glibc.ver; then
5401 gnulibc_version=`$cat glibc.ver`
5402 echo "You are using the GNU C Library version $gnulibc_version"
5406 echo "You are not using the GNU C Library"
5408 $rm -f try try.* glibc.ver
5412 : see if nm is to be used to determine whether a symbol is defined or not
5416 case "$d_gnulibc" in
5419 echo "nm probably won't work on the GNU C Library." >&4
5425 if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
5427 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
5428 echo "'nm' won't be sufficient on this sytem." >&4
5434 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
5435 if $test $dflt -gt 20; then
5445 true|$define) dflt=y;;
5452 I can use $nm to extract the symbols from your C libraries. This
5453 is a time consuming task which may generate huge output on the disk (up
5454 to 3 megabytes) but that should make the symbols extraction faster. The
5455 alternative is to skip the 'nm' extraction part and to compile a small
5456 test program instead to determine whether each symbol is present. If
5457 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
5458 this may be the best solution.
5460 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
5463 rp="Shall I use $nm to extract C symbols from the libraries?"
5466 [Nn]*) usenm=false;;
5475 : nm options which may be necessary
5477 '') if $test -f /mach_boot; then
5479 elif $test -d /usr/ccs/lib; then
5480 nm_opt='-p' # Solaris (and SunOS?)
5481 elif $test -f /dgux; then
5483 elif $test -f /lib64/rld; then
5484 nm_opt='-p' # 64-bit Irix
5490 : nm options which may be necessary for shared libraries but illegal
5491 : for archive libraries. Thank you, Linux.
5492 case "$nm_so_opt" in
5493 '') case "$myuname" in
5495 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
5496 nm_so_opt='--dynamic'
5505 : get list of predefined functions in a handy place
5510 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
5516 *) for thislib in $libs; do
5519 : Handle C library specially below.
5522 thislib=`echo $thislib | $sed -e 's/^-l//'`
5523 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
5525 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
5527 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
5529 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
5531 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
5533 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
5535 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
5540 libnames="$libnames $try"
5542 *) libnames="$libnames $thislib" ;;
5551 for xxx in $libpth; do
5552 $test -r $1 || set $xxx/libc.$so
5553 : The messy sed command sorts on library version numbers.
5555 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
5556 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
5558 s/[0-9][0-9]*/0000&/g
5559 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
5562 $sort | $sed -e 's/^.* //'`
5565 $test -r $1 || set /usr/ccs/lib/libc.$so
5566 $test -r $1 || set /lib/libsys_s$_a
5572 if $test -r "$1"; then
5573 echo "Your (shared) C library seems to be in $1."
5575 elif $test -r /lib/libc && $test -r /lib/clib; then
5576 echo "Your C library seems to be in both /lib/clib and /lib/libc."
5578 libc='/lib/clib /lib/libc'
5579 if $test -r /lib/syslib; then
5580 echo "(Your math library is in /lib/syslib.)"
5581 libc="$libc /lib/syslib"
5583 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5584 echo "Your C library seems to be in $libc, as you said before."
5585 elif $test -r $incpath/usr/lib/libc$_a; then
5586 libc=$incpath/usr/lib/libc$_a;
5587 echo "Your C library seems to be in $libc. That's fine."
5588 elif $test -r /lib/libc$_a; then
5590 echo "Your C library seems to be in $libc. You're normal."
5592 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
5594 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
5595 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
5596 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
5598 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5600 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5603 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
5605 if $test -r "$tans"; then
5606 echo "Your C library seems to be in $tans, of all places."
5612 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5616 If the guess above is wrong (which it might be if you're using a strange
5617 compiler, or your machine supports multiple models), you can override it here.
5622 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
5624 I can't seem to find your C library. I've looked in the following places:
5627 $sed 's/^/ /' libpath
5630 None of these seems to contain your C library. I need to get its name...
5635 rp='Where is your C library?'
5640 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
5641 set X `cat libnames`
5644 case $# in 1) xxx=file; esac
5645 echo "Extracting names from the following $xxx for later perusal:" >&4
5647 $sed 's/^/ /' libnames >&4
5649 $echo $n "This may take a while...$c" >&4
5653 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
5654 *) $nm $nm_opt $file 2>/dev/null;;
5659 $grep fprintf libc.tmp > libc.ptf
5660 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
5661 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
5663 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
5665 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5667 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
5669 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5671 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
5673 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5675 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
5677 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5679 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
5681 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5683 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
5685 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5687 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
5688 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
5690 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5692 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
5694 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5696 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
5698 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5700 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
5702 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5704 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
5706 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5708 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
5710 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5712 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
5714 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5716 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
5718 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5721 $nm -p $* 2>/dev/null >libc.tmp
5722 $grep fprintf libc.tmp > libc.ptf
5723 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
5724 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
5730 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
5732 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
5733 for thisname in $libnames $libc; do
5734 $ar t $thisname >>libc.tmp
5736 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
5738 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
5739 # Repeat libc to extract forwarders to DLL entries too
5740 for thisname in $libnames $libc; do
5741 $ar tv $thisname >>libc.tmp
5742 # Revision 50 of EMX has bug in $ar.
5743 # it will not extract forwarders to DLL entries
5744 # Use emximp which will extract exactly them.
5745 emximp -o tmp.imp $thisname \
5747 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
5748 < tmp.imp >>libc.tmp
5751 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
5754 echo "$ar didn't seem to work right." >&4
5755 echo "Maybe this is a Cray...trying bld instead..." >&4
5756 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
5758 for thisname in $libnames; do
5760 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
5761 $ar t $thisname >>libc.tmp
5765 echo "That didn't work either. Giving up." >&4
5775 echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4
5776 dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list
5778 *) if $test -f /lib/syscalls.exp; then
5780 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
5781 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list
5787 $rm -f libnames libpath
5789 : is a C symbol defined?
5792 -v) tf=libc.tmp; tc=""; tdc="";;
5793 -a) tf=libc.tmp; tc="[0]"; tdc="[]";;
5794 *) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
5797 case "$reuseval-$4" in
5799 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
5805 if $contains $tlook $tf >/dev/null 2>&1;
5810 echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
5811 if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1;
5819 $define) tval=true;;
5825 : define an is-in-libc? function
5826 inlibc='echo " "; td=$define; tu=$undef;
5827 sym=$1; var=$2; eval "was=\$$2";
5829 case "$reuseval$was" in
5839 echo "$sym() found." >&4;
5840 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
5842 echo "$sym() NOT found." >&4;
5843 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
5847 $define) echo "$sym() found." >&4;;
5848 *) echo "$sym() NOT found." >&4;;
5852 : see if sqrtl exists
5856 hasproto='varname=$1; func=$2; shift; shift;
5857 while $test $# -ge 2; do
5859 $define) echo "#include <$2>";;
5863 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
5864 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
5865 echo "$func() prototype found.";
5868 echo "$func() prototype NOT found.";
5873 $rm -f try.c tryout.c'
5875 : check for length of double
5877 case "$doublesize" in
5879 echo "Checking to see how big your double precision numbers are..." >&4
5880 $cat >try.c <<'EOCP'
5884 printf("%d\n", (int)sizeof(double));
5889 if eval $compile_ok; then
5890 doublesize=`$run ./try`
5891 echo "Your double is $doublesize bytes long."
5894 echo "(I can't seem to compile the test program. Guessing...)"
5895 rp="What is the size of a double precision number (in bytes)?"
5903 : check for long doubles
5905 echo "Checking to see if you have long double..." >&4
5906 echo 'int main() { long double x = 7.0; }' > try.c
5908 if eval $compile; then
5910 echo "You have long double."
5913 echo "You do not have long double."
5919 : check for length of long double
5920 case "${d_longdbl}${longdblsize}" in
5923 echo "Checking to see how big your long doubles are..." >&4
5924 $cat >try.c <<'EOCP'
5928 printf("%d\n", sizeof(long double));
5933 if eval $compile; then
5934 longdblsize=`$run ./try`
5935 echo "Your long doubles are $longdblsize bytes long."
5939 echo "(I can't seem to compile the test program. Guessing...)" >&4
5940 rp="What is the size of a long double (in bytes)?"
5944 if $test "X$doublesize" = "X$longdblsize"; then
5945 echo "(That isn't any different from an ordinary double.)"
5953 if $test X"$d_longdbl" = X"$define"; then
5955 echo "Checking how to print long doubles..." >&4
5957 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
5958 $cat >try.c <<'EOCP'
5959 #include <sys/types.h>
5963 printf("%.3f\n", d);
5967 if eval $compile; then
5971 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
5972 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
5973 echo "We will use %f."
5979 if $test X"$sPRIfldbl" = X; then
5980 $cat >try.c <<'EOCP'
5981 #include <sys/types.h>
5984 long double d = 123.456;
5985 printf("%.3Lf\n", d);
5989 if eval $compile; then
5993 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
5994 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
5995 echo "We will use %Lf."
6001 if $test X"$sPRIfldbl" = X; then
6002 $cat >try.c <<'EOCP'
6003 #include <sys/types.h>
6006 long double d = 123.456;
6007 printf("%.3llf\n", d);
6011 if eval $compile; then
6015 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
6016 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
6017 echo "We will use %llf."
6023 if $test X"$sPRIfldbl" = X; then
6024 $cat >try.c <<'EOCP'
6025 #include <sys/types.h>
6028 long double d = 123.456;
6029 printf("%.3lf\n", d);
6033 if eval $compile; then
6037 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
6038 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
6039 echo "We will use %lf."
6045 if $test X"$sPRIfldbl" = X; then
6046 echo "Cannot figure out how to print long doubles." >&4
6048 sSCNfldbl=$sPRIfldbl # expect consistency
6055 case "$sPRIfldbl" in
6056 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
6057 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
6058 d_SCNfldbl="$undef";
6060 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
6061 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
6062 d_SCNfldbl="$define";
6066 : see if modfl exists
6070 : see if prototype for modfl is available
6072 set d_modflproto modfl math.h
6075 d_modfl_pow32_bug="$undef"
6077 case "$d_longdbl$d_modfl" in
6080 Checking to see whether your modfl() is okay for large values...
6086 if $test "X$d_modflproto" != "X$define"; then
6088 /* Sigh. many current glibcs provide the function, but do not prototype it. */
6089 long double modfl (long double, long double *);
6094 long double nv = 4294967303.15;
6100 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
6104 case "$osname:$gccversion" in
6105 aix:) saveccflags="$ccflags"
6106 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
6109 if eval $compile; then
6112 *" 4294967303.150000 1.150000 4294967302.000000")
6113 echo >&4 "Your modfl() is broken for large values."
6114 d_modfl_pow32_bug="$define"
6116 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
6120 *" 4294967303.150000 0.150000 4294967303.000000")
6121 echo >&4 "Your modfl() seems okay for large values."
6123 *) echo >&4 "I don't understand your modfl() at all."
6127 $rm -f try.* try core core.try.*
6129 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
6132 case "$osname:$gccversion" in
6133 aix:) ccflags="$saveccflags" ;; # restore
6139 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
6142 case "$uselongdouble" in
6143 $define|true|[yY]*) dflt='y';;
6148 Perl can be built to take advantage of long doubles which
6149 (if available) may give more accuracy and range for floating point numbers.
6151 If this doesn't make any sense to you, just accept the default '$dflt'.
6153 rp='Try to use long doubles if available?'
6156 y|Y) val="$define" ;;
6162 case "$uselongdouble" in
6163 true|[yY]*) uselongdouble="$define" ;;
6166 case "$uselongdouble" in
6168 : Look for a hint-file generated 'call-back-unit'. If the
6169 : user has specified that long doubles should be used,
6170 : we may need to set or change some other defaults.
6171 if $test -f uselongdouble.cbu; then
6172 echo "Your platform has some specific hints for long doubles, using them..."
6173 . ./uselongdouble.cbu
6176 (Your platform doesn't have any specific hints for long doubles.)
6183 case "$uselongdouble:$d_sqrtl:$d_modfl" in
6184 $define:$define:$define)
6187 $define:$define:$undef)
6188 message="I could not find modfl"
6190 $define:$undef:$define)
6191 message="I could not find sqrtl"
6193 $define:$undef:$undef)
6194 message="I found neither sqrtl nor modfl"
6198 if $test "$message" != X; then
6201 *** You requested the use of long doubles but you do not seem to have
6202 *** the mathematic functions for long doubles.
6204 *** I'm disabling the use of long doubles.
6208 uselongdouble=$undef
6211 : determine the architecture name
6213 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
6214 tarch=`arch`"-$osname"
6215 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
6216 if uname -m > tmparch 2>&1 ; then
6217 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
6218 -e 's/$/'"-$osname/" tmparch`
6226 case "$myarchname" in
6229 echo "(Your architecture name used to be $myarchname.)"
6233 case "$targetarch" in
6235 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
6240 *) dflt="$archname";;
6242 rp='What is your architecture name'
6245 case "$usethreads" in
6247 echo "Threads selected." >&4
6249 *-thread*) echo "...and architecture name already has -thread." >&4
6251 *) archname="$archname-thread"
6252 echo "...setting architecture name to $archname." >&4
6257 case "$usemultiplicity" in
6259 echo "Multiplicity selected." >&4
6261 *-multi*) echo "...and architecture name already has -multi." >&4
6263 *) archname="$archname-multi"
6264 echo "...setting architecture name to $archname." >&4
6269 case "$use64bitint$use64bitall" in
6271 case "$archname64" in
6273 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
6276 case "$use64bitint" in
6277 "$define") echo "64 bit integers selected." >&4 ;;
6279 case "$use64bitall" in
6280 "$define") echo "Maximal 64 bitness selected." >&4 ;;
6283 *-$archname64*) echo "...and architecture name already has $archname64." >&4
6285 *) archname="$archname-$archname64"
6286 echo "...setting architecture name to $archname." >&4
6292 case "$uselongdouble" in
6294 echo "Long doubles selected." >&4
6295 case "$longdblsize" in
6297 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
6301 *-ld*) echo "...and architecture name already has -ld." >&4
6303 *) archname="$archname-ld"
6304 echo "...setting architecture name to $archname." >&4
6311 case "$useperlio" in
6313 echo "Perlio selected." >&4
6316 echo "Perlio not selected, using stdio." >&4
6318 *-stdio*) echo "...and architecture name already has -stdio." >&4
6320 *) archname="$archname-stdio"
6321 echo "...setting architecture name to $archname." >&4
6327 : determine root of directory hierarchy where package will be installed.
6330 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
6333 dflt=`echo "$prefix" | sed 's/.$//'`
6341 By default, $package will be installed in $dflt/bin, manual pages
6342 under $dflt/man, etc..., i.e. with $dflt as prefix for all
6343 installation directories. Typically this is something like /usr/local.
6344 If you wish to have binaries under /usr/bin but other parts of the
6345 installation under /usr/local, that's ok: you will be prompted
6346 separately for each of the installation directories, the prefix being
6347 only used to set the defaults.
6351 rp='Installation prefix to use?'
6359 *) oldprefix="$prefix";;
6368 *) afsroot=$afsroot ;;
6374 $define|true) afs=true ;;
6375 $undef|false) afs=false ;;
6376 *) if test -d $afsroot; then
6384 echo "AFS may be running... I'll be extra cautious then..." >&4
6386 echo "AFS does not seem to be running..." >&4
6389 : determine installation prefix for where package is to be installed.
6393 Since you are running AFS, I need to distinguish the directory in which
6394 files will reside from the directory in which they are installed (and from
6395 which they are presumably copied to the former directory by occult means).
6398 case "$installprefix" in
6399 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
6400 *) dflt="$installprefix";;
6405 In some special cases, particularly when building $package for distribution,
6406 it is convenient to distinguish between the directory in which files should
6407 be installed from the directory ($prefix) in which they
6408 will eventually reside. For most users, these two directories are the same.
6411 case "$installprefix" in
6413 *) dflt=$installprefix;;
6417 rp='What installation prefix should I use for installing files?'
6419 installprefix="$ans"
6420 installprefixexp="$ansexp"
6422 : set the prefixit variable, to compute a suitable default value
6423 prefixit='case "$3" in
6425 case "$oldprefix" in
6426 "") eval "$1=\"\$$2\"";;
6433 ""|" ") eval "$1=\"\$$2\"";;
6439 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
6441 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
6442 /*-$oldprefix/*|\~*-$oldprefix/*)
6443 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
6444 *) eval "$1=\"\$$2\"";;
6448 : get the patchlevel
6450 echo "Getting the current patchlevel..." >&4
6451 if $test -r $rsrc/patchlevel.h;then
6452 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
6453 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
6454 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6455 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
6456 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
6457 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6458 perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
6467 $echo "(You do not have patchlevel.h. Eek.)"
6469 if $test -r $rsrc/.patch ; then
6470 if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
6471 perl_patchlevel=`cat $rsrc/.patch`
6474 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
6475 version_patchlevel_string="version $patchlevel subversion $subversion"
6476 case "$perl_patchlevel" in
6478 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
6481 $echo "(You have $package $version_patchlevel_string.)"
6485 : XXX Should be a Configure test for double-dots in filenames.
6486 version=`echo $revision $patchlevel $subversion | \
6487 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6488 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6489 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6492 version=`echo $revision $patchlevel $subversion | \
6493 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6494 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6495 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6498 : Special case the 5.005_xx maintenance series, which used 5.005
6499 : without any subversion label as a subdirectory in $sitelib
6500 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
6501 api_versionstring='5.005'
6504 : determine installation style
6505 : For now, try to deduce it from prefix unless it is already set.
6506 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
6507 case "$installstyle" in
6508 '') case "$prefix" in
6509 *perl*) dflt='lib';;
6510 *) dflt='lib/perl5' ;;
6513 *) dflt="$installstyle" ;;
6515 : Probably not worth prompting for this since we prompt for all
6516 : the directories individually, and the prompt would be too long and
6520 : determine where private library files go
6521 : Usual default is /usr/local/lib/perl5/$version.
6522 : Also allow things like /opt/perl/lib/$version, since
6523 : /opt/perl/lib/perl5... would be redundant.
6524 : The default "style" setting is made in installstyle.U
6525 case "$installstyle" in
6526 *lib/perl5*) set dflt privlib lib/$package/$version ;;
6527 *) set dflt privlib lib/$version ;;
6532 There are some auxiliary files for $package that need to be put into a
6533 private library directory that is accessible by everyone.
6537 rp='Pathname where the private library files will reside?'
6540 privlibexp="$ansexp"
6541 : Change installation prefix, if necessary.
6542 if $test X"$prefix" != X"$installprefix"; then
6543 installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
6545 installprivlib="$privlibexp"
6548 : set the prefixup variable, to restore leading tilda escape
6549 prefixup='case "$prefixexp" in
6551 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
6554 : determine where public architecture dependent libraries go
6557 : privlib default is /usr/local/lib/$package/$version
6558 : archlib default is /usr/local/lib/$package/$version/$archname
6559 : privlib may have an optional trailing /share.
6560 tdflt=`echo $privlib | $sed 's,/share$,,'`
6561 tdflt=$tdflt/$archname
6570 $spackage contains architecture-dependent library files. If you are
6571 sharing libraries in a heterogeneous environment, you might store
6572 these files in a separate location. Otherwise, you can just include
6573 them with the rest of the public library files.
6577 rp='Where do you want to put the public architecture-dependent libraries?'
6580 archlibexp="$ansexp"
6581 if $test X"$archlib" = X"$privlib"; then
6586 : Change installation prefix, if necessary.
6587 if $test X"$prefix" != X"$installprefix"; then
6588 installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
6590 installarchlib="$archlibexp"
6593 : see if setuid scripts can be secure
6596 Some kernels have a bug that prevents setuid #! scripts from being
6597 secure. Some sites have disabled setuid #! scripts because of this.
6599 First let's decide if your kernel supports secure setuid #! scripts.
6600 (If setuid #! scripts would be secure but have been disabled anyway,
6601 don't say that they are secure if asked.)
6606 if $test -d /dev/fd; then
6607 echo "#!$ls" >reflect
6608 chmod +x,u+s reflect
6609 ./reflect >flect 2>&1
6610 if $contains "/dev/fd" flect >/dev/null; then
6611 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6615 If you are not sure if they are secure, I can check but I'll need a
6616 username and password different from the one you are using right now.
6617 If you don't have such a username or don't want me to test, simply
6621 rp='Other username to test security of setuid scripts with?'
6626 case "$d_suidsafe" in
6627 '') echo "I'll assume setuid scripts are *not* secure." >&4
6630 echo "Well, the $hint value is *not* secure." >&4
6632 *) echo "Well, the $hint value *is* secure." >&4
6637 $rm -f reflect flect
6638 echo "#!$ls" >reflect
6639 chmod +x,u+s reflect
6642 echo '"su" will (probably) prompt you for '"$ans's password."
6643 su $ans -c './reflect >flect'
6644 if $contains "/dev/fd" flect >/dev/null; then
6645 echo "Okay, it looks like setuid scripts are secure." >&4
6648 echo "I don't think setuid scripts are secure." >&4
6653 rp='Does your kernel have *secure* setuid scripts?'
6656 [yY]*) val="$define";;
6661 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6662 echo "(That's for file descriptors, not floppy disks.)"
6668 $rm -f reflect flect
6670 : now see if they want to do setuid emulation
6673 case "$d_suidsafe" in
6676 echo "No need to emulate SUID scripts since they are secure here." >&4
6680 Some systems have disabled setuid scripts, especially systems where
6681 setuid scripts cannot be secure. On systems where setuid scripts have
6682 been disabled, the setuid/setgid bits on scripts are currently
6683 useless. It is possible for $package to detect those bits and emulate
6684 setuid/setgid in a secure fashion. This emulation will only work if
6685 setuid scripts have been disabled in your kernel.
6689 "$define") dflt=y ;;
6692 rp="Do you want to do setuid/setgid emulation?"
6695 [yY]*) val="$define";;
6703 : see if this is a malloc.h system
6704 set malloc.h i_malloc
6707 : see if stdlib is available
6708 set stdlib.h i_stdlib
6711 : check for void type
6713 echo "Checking to see how well your C compiler groks the void type..." >&4
6714 case "$voidflags" in
6716 $cat >try.c <<'EOCP'
6722 extern void moo(); /* function returning void */
6723 void (*goo)(); /* ptr to func returning void */
6725 void *hue; /* generic ptr */
6738 int main() { sub(); }
6740 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
6741 voidflags=$defvoidused
6742 echo "Good. It appears to support void to the level $package wants.">&4
6743 if $contains warning .out >/dev/null 2>&1; then
6744 echo "However, you might get some warnings that look like this:"
6748 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
6749 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
6750 echo "It supports 1..."
6751 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
6752 echo "It also supports 2..."
6753 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
6755 echo "And it supports 4 but not 8 definitely."
6757 echo "It doesn't support 4..."
6758 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
6760 echo "But it supports 8."
6763 echo "Neither does it support 8."
6767 echo "It does not support 2..."
6768 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
6770 echo "But it supports 4 and 8."
6772 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
6774 echo "And it supports 4 but has not heard about 8."
6776 echo "However it supports 8 but not 4."
6781 echo "There is no support at all for void."
6786 case "$voidflags" in
6789 Support flag bits are:
6790 1: basic void declarations.
6791 2: arrays of pointers to functions returning void.
6792 4: operations between pointers to and addresses of void functions.
6793 8: generic void pointers.
6796 rp="Your void support flags add up to what?"
6803 : check for length of pointer
6807 echo "Checking to see how big your pointers are..." >&4
6808 if test "$voidflags" -gt 7; then
6809 echo '#define VOID_PTR char *' > try.c
6811 echo '#define VOID_PTR void *' > try.c
6813 $cat >>try.c <<'EOCP'
6817 printf("%d\n", (int)sizeof(VOID_PTR));
6822 if eval $compile_ok; then
6823 ptrsize=`$run ./try`
6824 echo "Your pointers are $ptrsize bytes long."
6827 echo "(I can't seem to compile the test program. Guessing...)" >&4
6828 rp="What is the size of a pointer (in bytes)?"
6835 case "$use64bitall" in
6836 "$define"|true|[yY]*)
6840 *** You have chosen a maximally 64-bit build, but your pointers
6841 *** are only 4 bytes wide, disabling maximal 64-bitness.
6844 use64bitall="$undef"
6845 case "$use64bitint" in
6846 "$define"|true|[yY]*) ;;
6849 *** Downgrading from maximal 64-bitness to using 64-bit integers.
6852 use64bitint="$define"
6861 : determine which malloc to compile in
6863 case "$usemymalloc" in
6864 [yY]*|true|$define) dflt='y' ;;
6865 [nN]*|false|$undef) dflt='n' ;;
6866 *) case "$ptrsize" in
6872 rp="Do you wish to attempt to use the malloc that comes with $package?"
6878 mallocsrc='malloc.c'
6879 mallocobj="malloc$_o"
6880 d_mymalloc="$define"
6883 : Remove malloc from list of libraries to use
6884 echo "Removing unneeded -lmalloc from library list" >&4
6885 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6888 echo "libs = $libs" >&4
6900 : compute the return types of malloc and free
6902 $cat >malloc.c <<END
6906 #include <sys/types.h>
6920 case "$malloctype" in
6922 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6929 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6933 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6940 echo "Your system uses $freetype free(), it would seem." >&4
6944 After $package is installed, you may wish to install various
6945 add-on modules and utilities. Typically, these add-ons will
6946 be installed under $prefix with the rest
6947 of this package. However, you may wish to install such add-ons
6948 elsewhere under a different prefix.
6950 If you do not wish to put everything under a single prefix, that's
6951 ok. You will be prompted for the individual locations; this siteprefix
6952 is only used to suggest the defaults.
6954 The default should be fine for most people.
6958 rp='Installation prefix to use for add-on modules and utilities?'
6959 : XXX Here might be another good place for an installstyle setting.
6960 case "$siteprefix" in
6962 *) dflt=$siteprefix ;;
6965 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6967 case "$siteprefix" in
6971 *) oldsiteprefix="$prefix";;
6976 siteprefixexp="$ansexp"
6978 : determine where site specific libraries go.
6979 : Usual default is /usr/local/lib/perl5/site_perl/$version
6980 : The default "style" setting is made in installstyle.U
6981 : XXX No longer works with Prefixit stuff.
6982 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6984 '') case "$installstyle" in
6985 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6986 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6994 The installation process will create a directory for
6995 site-specific extensions and modules. Most users find it convenient
6996 to place all site-specific files in this directory rather than in the
6997 main distribution directory.
7001 rp='Pathname for the site-specific library files?'
7004 sitelibexp="$ansexp"
7005 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
7006 : Change installation prefix, if necessary.
7007 if $test X"$prefix" != X"$installprefix"; then
7008 installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
7010 installsitelib="$sitelibexp"
7013 : determine where site specific architecture-dependent libraries go.
7014 : sitelib default is /usr/local/lib/perl5/site_perl/$version
7015 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
7016 : sitelib may have an optional trailing /share.
7018 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
7019 dflt="$dflt/$archname"
7024 set sitearch sitearch none
7028 The installation process will also create a directory for
7029 architecture-dependent site-specific extensions and modules.
7033 rp='Pathname for the site-specific architecture-dependent library files?'
7036 sitearchexp="$ansexp"
7037 : Change installation prefix, if necessary.
7038 if $test X"$prefix" != X"$installprefix"; then
7039 installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
7041 installsitearch="$sitearchexp"
7046 The installation process will also create a directory for
7047 vendor-supplied add-ons. Vendors who supply perl with their system
7048 may find it convenient to place all vendor-supplied files in this
7049 directory rather than in the main distribution directory. This will
7050 ease upgrades between binary-compatible maintenance versions of perl.
7052 Of course you may also use these directories in whatever way you see
7053 fit. For example, you might use them to access modules shared over a
7054 company-wide network.
7056 The default answer should be fine for most people.
7057 This causes further questions about vendor add-ons to be skipped
7058 and no vendor-specific directories will be configured for perl.
7061 rp='Do you want to configure vendor-specific add-on directories?'
7062 case "$usevendorprefix" in
7063 define|true|[yY]*) dflt=y ;;
7064 *) : User may have set vendorprefix directly on Configure command line.
7065 case "$vendorprefix" in
7074 rp='Installation prefix to use for vendor-supplied add-ons?'
7075 case "$vendorprefix" in
7077 *) dflt=$vendorprefix ;;
7080 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7082 case "$vendorprefix" in
7086 *) oldvendorprefix="$prefix";;
7090 usevendorprefix="$define"
7092 vendorprefixexp="$ansexp"
7094 *) usevendorprefix="$undef"
7100 case "$vendorprefix" in
7101 '') d_vendorlib="$undef"
7105 *) d_vendorlib="$define"
7106 : determine where vendor-supplied modules go.
7107 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
7108 case "$vendorlib" in
7110 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7111 case "$installstyle" in
7112 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
7113 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
7116 *) dflt="$vendorlib"
7120 rp='Pathname for the vendor-supplied library files?'
7123 vendorlibexp="$ansexp"
7126 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
7127 : Change installation prefix, if necessary.
7128 if $test X"$prefix" != X"$installprefix"; then
7129 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
7131 installvendorlib="$vendorlibexp"
7134 case "$vendorprefix" in
7135 '') d_vendorarch="$undef"
7139 *) d_vendorarch="$define"
7140 : determine where vendor-supplied architecture-dependent libraries go.
7141 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
7142 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
7143 : vendorlib may have an optional trailing /share.
7144 case "$vendorarch" in
7145 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
7146 dflt="$dflt/$archname"
7148 *) dflt="$vendorarch" ;;
7151 rp='Pathname for vendor-supplied architecture-dependent files?'
7154 vendorarchexp="$ansexp"
7157 : Change installation prefix, if necessary.
7158 if $test X"$prefix" != X"$installprefix"; then
7159 installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
7161 installvendorarch="$vendorarchexp"
7164 : Final catch-all directories to search
7167 Lastly, you can have perl look in other directories for extensions and
7168 modules in addition to those already specified.
7169 These directories will be searched after
7173 test X"$vendorlib" != "X" && echo ' ' $vendorlib
7174 test X"$vendorarch" != "X" && echo ' ' $vendorarch
7176 case "$otherlibdirs" in
7177 ''|' ') dflt='none' ;;
7178 *) dflt="$otherlibdirs" ;;
7181 Enter a colon-separated set of extra paths to include in perl's @INC
7182 search path, or enter 'none' for no extra paths.
7186 rp='Colon-separated list of additional directories for perl to search?'
7189 ' '|''|none) otherlibdirs=' ' ;;
7190 *) otherlibdirs="$ans" ;;
7192 case "$otherlibdirs" in
7196 set d_perl_otherlibdirs
7199 : Cruising for prototypes
7201 echo "Checking out function prototypes..." >&4
7202 $cat >prototype.c <<'EOCP'
7203 int main(int argc, char *argv[]) {
7206 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
7207 echo "Your C compiler appears to support function prototypes."
7210 echo "Your C compiler doesn't seem to understand function prototypes."
7217 case "$prototype" in
7219 *) ansi2knr='ansi2knr'
7224 This version of $package can only be compiled by a compiler that
7225 understands function prototypes. Unfortunately, your C compiler
7227 doesn't seem to understand them. Sorry about that.
7229 If GNU cc is available for your system, perhaps you could try that instead.
7231 Eventually, we hope to support building Perl with pre-ANSI compilers.
7232 If you would like to help in that effort, please contact <perlbug@perl.org>.
7234 Aborting Configure now.
7240 : determine where public executables go
7245 rp='Pathname where the public executables will reside?'
7247 if $test "X$ansexp" != "X$binexp"; then
7252 : Change installation prefix, if necessary.
7253 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
7254 if $test X"$prefix" != X"$installprefix"; then
7255 installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
7257 installbin="$binexp"
7266 Perl can be built with extra modules or bundles of modules which
7267 will be fetched from the CPAN and installed alongside Perl.
7269 Notice that you will need access to the CPAN; either via the Internet,
7270 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
7271 be asked later to configure the CPAN.pm module which will in turn do
7272 the installation of the rest of the extra modules or bundles.)
7274 Notice also that if the modules require any external software such as
7275 libraries and headers (the libz library and the zlib.h header for the
7276 Compress::Zlib module, for example) you MUST have any such software
7277 already installed, this configuration process will NOT install such
7280 If this doesn't make any sense to you, just accept the default '$dflt'.
7282 rp='Install any extra modules (y or n)?'
7288 Please list any extra modules or bundles to be installed from CPAN,
7289 with spaces between the names. The names can be in any format the
7290 'install' command of CPAN.pm will understand. (Answer 'none',
7291 without the quotes, to install no extra modules or bundles.)
7301 $rm -f ../extras.lst
7303 *) echo "(Saving the list of extras for later...)"
7304 echo "$extras" > ../extras.lst
7312 : Find perl5.005 or later.
7313 echo "Looking for a previously installed perl5.005 or later... "
7315 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
7316 : Check if this perl is recent and can load a simple module
7317 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7320 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7330 '') echo "None found. That's ok.";;
7331 *) echo "Using $perl5." ;;
7334 : Determine list of previous versions to include in @INC
7335 $cat > getverlist <<EOPL
7338 \$api_versionstring = "$api_versionstring";
7339 \$version = "$version";
7340 \$stem = "$sitelib_stem";
7341 \$archname = "$archname";
7343 $cat >> getverlist <<'EOPL'
7344 # Can't have leading @ because metaconfig interprets it as a command!
7345 ;@inc_version_list=();
7346 # XXX Redo to do opendir/readdir?
7349 ;@candidates = glob("5.*");
7355 # XXX ToDo: These comparisons must be reworked when two-digit
7356 # subversions come along, so that 5.7.10 compares as greater than
7357 # 5.7.3! By that time, hope that 5.6.x is sufficiently
7358 # widespread that we can use the built-in version vectors rather
7359 # than reinventing them here. For 5.6.0, however, we must
7360 # assume this script will likely be run by 5.005_0x. --AD 1/2000.
7361 foreach $d (@candidates) {
7362 if ($d lt $version) {
7363 if ($d ge $api_versionstring) {
7364 unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
7366 elsif ($d ge "5.005") {
7367 unshift(@inc_version_list, grep { -d } $d);
7371 # Skip newer version. I.e. don't look in
7372 # 5.7.0 if we're installing 5.6.1.
7376 if (@inc_version_list) {
7377 print join(' ', @inc_version_list);
7380 # Blank space to preserve value for next Configure run.
7385 case "$inc_version_list" in
7386 '') if test -x "$perl5$exe_ext"; then
7387 dflt=`$perl5 getverlist`
7392 $undef) dflt='none' ;;
7393 *) eval dflt=\"$inc_version_list\" ;;
7396 ''|' ') dflt=none ;;
7403 In order to ease the process of upgrading, this version of perl
7404 can be configured to use modules built and installed with earlier
7405 versions of perl that were installed under $prefix. Specify here
7406 the list of earlier versions that this version of perl should check.
7407 If Configure detected no earlier versions of perl installed under
7408 $prefix, then the list will be empty. Answer 'none' to tell perl
7409 to not search earlier versions.
7411 The default should almost always be sensible, so if you're not sure,
7412 just accept the default.
7415 rp='List of earlier versions to include in @INC?'
7418 [Nn]one|''|' ') inc_version_list=' ' ;;
7419 *) inc_version_list="$ans" ;;
7421 case "$inc_version_list" in
7423 inc_version_list_init='0';;
7424 *) inc_version_list_init=`echo $inc_version_list |
7425 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
7430 : determine whether to install perl also as /usr/bin/perl
7433 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
7435 Many scripts expect perl to be installed as /usr/bin/perl.
7437 If you want to, I can install the perl you are about to compile
7438 as /usr/bin/perl (in addition to $bin/perl).
7440 if test -f /usr/bin/perl; then
7443 However, please note that because you already have a /usr/bin/perl,
7444 overwriting that with a new Perl would very probably cause problems.
7445 Therefore I'm assuming you don't want to do that (unless you insist).
7448 case "$installusrbinperl" in
7449 "$define"|[yY]*) dflt='y';;
7455 Since you don't have a /usr/bin/perl I'm assuming creating one is okay.
7458 case "$installusrbinperl" in
7459 "$undef"|[nN]*) dflt='n';;
7463 rp="Do you want to install perl as /usr/bin/perl?"
7466 [yY]*) val="$define";;
7472 set installusrbinperl
7475 : see if dld is available
7479 : see if dlopen exists
7486 : determine which dynamic loading, if any, to compile in
7488 dldir="ext/DynaLoader"
7501 $define) dflt='y' ;;
7504 $define) dflt='y' ;;
7506 : Does a dl_xxx.xs file exist for this operating system
7507 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7510 rp="Do you wish to use dynamic loading?"
7517 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7518 dflt="$dldir/dl_${osname}.xs"
7519 elif $test "$d_dlopen" = "$define" ; then
7520 dflt="$dldir/dl_dlopen.xs"
7521 elif $test "$i_dld" = "$define" ; then
7522 dflt="$dldir/dl_dld.xs"
7527 *) dflt="$dldir/$dlsrc"
7530 echo "The following dynamic loading files are available:"
7531 : Can not go over to $dldir because getfile has path hard-coded in.
7532 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7533 rp="Source file to use for dynamic loading"
7539 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7543 Some systems may require passing special flags to $cc -c to
7544 compile modules that will be used to create a shared library.
7545 To use no flags, say "none".
7548 case "$cccdlflags" in
7549 '') case "$gccversion" in
7550 '') case "$osname" in
7552 next) dflt='none' ;;
7553 irix*) dflt='-KPIC' ;;
7554 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7555 sunos) dflt='-pic' ;;
7559 *) case "$osname" in
7560 darwin) dflt='none' ;;
7561 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7566 *) dflt="$cccdlflags" ;;
7568 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7571 none) cccdlflags=' ' ;;
7572 *) cccdlflags="$ans" ;;
7577 Some systems use ld to create libraries that can be dynamically loaded,
7578 while other systems (such as those using ELF) use $cc.
7582 '') $cat >try.c <<'EOM'
7583 /* Test for whether ELF binaries are produced */
7588 int i = open("a.out",O_RDONLY);
7591 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7592 exit(0); /* succeed (yes, it's ELF) */
7597 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7599 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7603 echo "I'll use ld to build dynamic libraries."
7612 rp="What command should be used to create dynamic libraries?"
7618 Some systems may require passing special flags to $ld to create a
7619 library that can be dynamically loaded. If your ld flags include
7620 -L/other/path options to locate libraries outside your loader's normal
7621 search path, you may need to specify those -L options here as well. To
7622 use no flags, say "none".
7625 case "$lddlflags" in
7626 '') case "$osname" in
7627 beos) dflt='-nostart' ;;
7629 case "$gccversion" in
7630 '') dflt="$dflt +vnocompatwarnings" ;;
7633 linux|irix*) dflt='-shared' ;;
7634 next) dflt='none' ;;
7635 solaris) dflt='-G' ;;
7636 sunos) dflt='-assert nodefinitions' ;;
7637 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
7641 *) dflt="$lddlflags" ;;
7644 : Try to guess additional flags to pick up local libraries.
7645 : Be careful not to append to a plain 'none'
7649 for thisflag in $ldflags; do
7654 *) dflt="$dflt $thisflag" ;;
7661 ''|' ') dflt='none' ;;
7664 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
7667 none) lddlflags=' ' ;;
7668 *) lddlflags="$ans" ;;
7673 Some systems may require passing special flags to $cc to indicate that
7674 the resulting executable will use dynamic linking. To use no flags,
7678 case "$ccdlflags" in
7679 '') case "$osname" in
7680 hpux) dflt='-Wl,-E' ;;
7681 linux) dflt='-rdynamic' ;;
7682 next) dflt='none' ;;
7683 sunos) dflt='none' ;;
7687 *) dflt="$ccdlflags" ;;
7689 rp="Any special flags to pass to $cc to use dynamic linking?"
7692 none) ccdlflags=' ' ;;
7693 *) ccdlflags="$ans" ;;
7707 # No dynamic loading being used, so don't bother even to prompt.
7710 *) case "$useshrplib" in
7711 '') case "$osname" in
7712 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
7714 also='Building a shared libperl is required for dynamic loading to work on your system.'
7719 also='Building a shared libperl is needed for MAB support.'
7737 The perl executable is normally obtained by linking perlmain.c with
7738 libperl${_a}, any static extensions (usually just DynaLoader), and
7739 any other libraries needed on this system (such as -lm, etc.). Since
7740 your system supports dynamic loading, it is probably possible to build
7741 a shared libperl.$so. If you will have more than one executable linked
7742 to libperl.$so, this will significantly reduce the size of each
7743 executable, but it may have a noticeable affect on performance. The
7744 default is probably sensible for your system.
7748 rp="Build a shared libperl.$so (y/n)"
7752 useshrplib='true' ;;
7753 *) useshrplib='false' ;;
7758 case "$useshrplib" in
7762 # Figure out a good name for libperl.so. Since it gets stored in
7763 # a version-specific architecture-dependent library, the version
7764 # number isn't really that important, except for making cc/ld happy.
7766 # A name such as libperl.so.3.1
7767 majmin="libperl.$so.$patchlevel.$subversion"
7768 # A name such as libperl.so.301
7769 majonly=`echo $patchlevel $subversion |
7770 $awk '{printf "%d%02d", $1, $2}'`
7771 majonly=libperl.$so.$majonly
7772 # I'd prefer to keep the os-specific stuff here to a minimum, and
7773 # rely on figuring it out from the naming of libc.
7774 case "${osname}${osvers}" in
7777 # XXX How handle the --version stuff for MAB?
7779 linux*) # ld won't link with a bare -lperl otherwise.
7782 cygwin*) # ld links against an importlib
7783 dflt=libperl$lib_ext
7785 *) # Try to guess based on whether libc has major.minor.
7787 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
7788 *libc.$so.[0-9]*) dflt=$majonly ;;
7789 *) dflt=libperl.$so ;;
7799 I need to select a good name for the shared libperl. If your system uses
7800 library names with major and minor numbers, then you might want something
7801 like $majmin. Alternatively, if your system uses a single version
7802 number for shared libraries, then you might want to use $majonly.
7803 Or, your system might be quite happy with a simple libperl.$so.
7805 Since the shared libperl will get installed into a version-specific
7806 architecture-dependent directory, the version number of the shared perl
7807 library probably isn't important, so the default should be o.k.
7810 rp='What name do you want to give to the shared libperl?'
7813 echo "Ok, I'll use $libperl"
7816 libperl="libperl${_a}"
7820 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
7824 WARNING: Use of the shrpdir variable for the installation location of
7825 the shared $libperl is not supported. It was never documented and
7826 will not work in this version. Let me (perlbug@perl.org)
7827 know of any problems this may cause.
7833 But your current setting of $shrpdir is
7834 the default anyway, so it's harmless.
7839 Further, your current attempted setting of $shrpdir
7840 conflicts with the value of $archlibexp/CORE
7841 that installperl will use.
7848 # How will the perl executable find the installed shared $libperl?
7849 # Add $xxx to ccdlflags.
7850 # If we can't figure out a command-line option, use $shrpenv to
7851 # set env LD_RUN_PATH. The main perl makefile uses this.
7852 shrpdir=$archlibexp/CORE
7855 if "$useshrplib"; then
7858 # We'll set it in Makefile.SH...
7864 xxx="-Wl,-R$shrpdir"
7866 bsdos|linux|irix*|dec_osf)
7867 xxx="-Wl,-rpath,$shrpdir"
7870 # next doesn't like the default...
7873 # beos doesn't like the default, either.
7876 # hpux doesn't like the default, either.
7877 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
7880 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
7886 # Only add $xxx if it isn't already in ccdlflags.
7887 case " $ccdlflags " in
7889 *) ccdlflags="$ccdlflags $xxx"
7892 Adding $xxx to the flags
7893 passed to $ld so that the perl executable will find the
7894 installed shared $libperl.
7902 # Fix ccdlflags in AIX for building external extensions.
7903 # (For building Perl itself bare -bE:perl.exp is needed,
7904 # Makefile.SH takes care of this.)
7906 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
7908 # Respect a hint or command-line value.
7910 '') shrpenv="$tmp_shrpenv" ;;
7912 case "$ldlibpthname" in
7913 '') ldlibpthname=LD_LIBRARY_PATH ;;
7914 none) ldlibpthname='' ;;
7917 : determine where manual pages are on this system
7921 syspath='/usr/share/man/man1 /usr/man/man1'
7922 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
7923 syspath="$syspath /usr/man/u_man/man1"
7924 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
7925 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
7926 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
7927 sysman=`./loc . /usr/man/man1 $syspath`
7930 if $test -d "$sysman"; then
7931 echo "System manual is in $sysman." >&4
7933 echo "Could not find manual pages in source form." >&4
7936 : determine where manual pages go
7937 set man1dir man1dir none
7941 $spackage has manual pages available in source form.
7945 echo "However, you don't have nroff, so they're probably useless to you."
7947 '') man1dir="none";;
7950 echo "If you don't want the manual sources installed, answer 'none'."
7955 lookpath="$prefixexp/share/man/man1"
7956 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
7957 lookpath="$lookpath $prefixexp/man/p_man/man1"
7958 lookpath="$lookpath $prefixexp/man/u_man/man1"
7959 lookpath="$lookpath $prefixexp/man/man.1"
7961 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
7962 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
7972 rp="Where do the main $spackage manual pages (source) go?"
7974 if $test "X$man1direxp" != "X$ansexp"; then
7978 man1direxp="$ansexp"
7984 : Change installation prefix, if necessary.
7985 if $test X"$prefix" != X"$installprefix"; then
7986 installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
7988 installman1dir="$man1direxp"
7991 : What suffix to use on installed man pages
7998 rp="What suffix should be used for the main $spackage man pages?"
8000 '') case "$man1dir" in
8014 *) dflt="$man1ext";;
8021 : see if we can have long filenames
8023 first=123456789abcdef
8025 if (echo hi >$first) 2>/dev/null; then
8026 if $test -f 123456789abcde; then
8027 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
8030 echo 'You can have filenames longer than 14 characters.'>&4
8035 You can't have filenames longer than 14 chars.
8036 You can't even think about them!
8042 $rm -rf 123456789abcde*
8044 : determine where library module manual pages go
8045 set man3dir man3dir none
8049 $spackage has manual pages for many of the library modules.
8055 However, you don't have nroff, so they're probably useless to you.
8058 '') man3dir="none";;
8062 case "$d_flexfnam" in
8065 However, your system can't handle the long file names like File::Basename.3.
8068 '') man3dir="none";;
8072 echo "If you don't want the manual sources installed, answer 'none'."
8073 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
8075 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
8076 if $test -d "$privlib/man/man3"; then
8079 WARNING: Previous versions of perl installed man3 pages into
8080 $privlib/man/man3. This version will suggest a
8081 new default of $dflt.
8085 rp='Do you wish to preserve the old behavior?(y/n)'
8088 y*) dflt="$privlib/man/man3" ;;
8093 *) dflt="$man3dir" ;;
8100 rp="Where do the $package library man pages (source) go?"
8103 man3direxp="$ansexp"
8109 : Change installation prefix, if necessary.
8110 if $test X"$prefix" != X"$installprefix"; then
8111 installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
8113 installman3dir="$man3direxp"
8116 : What suffix to use on installed man pages
8122 rp="What suffix should be used for the $package library man pages?"
8124 '') case "$man3dir" in
8138 *) dflt="$man3ext";;
8145 : see if we have to deal with yellow pages, now NIS.
8146 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8147 if $test -f /usr/etc/nibindd; then
8149 echo "I'm fairly confident you're on a NeXT."
8151 rp='Do you get the hosts file via NetInfo?'
8160 y*) hostcat='nidump hosts .';;
8161 *) case "$hostcat" in
8162 nidump*) hostcat='';;
8172 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8180 rp='Are you getting the hosts file via yellow pages?'
8183 y*) hostcat='ypcat hosts';;
8184 *) hostcat='cat /etc/hosts';;
8190 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8193 '') test -f /etc/group && groupcat='cat /etc/group';;
8196 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8199 : now get the host name
8201 echo "Figuring out host name..." >&4
8202 case "$myhostname" in
8204 echo 'Maybe "hostname" will work...'
8205 if tans=`sh -c hostname 2>&1` ; then
8213 if $test "$cont"; then
8215 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8216 if tans=`cat /etc/systemid 2>&1` ; then
8218 phostname='cat /etc/systemid'
8219 echo "Whadyaknow. Xenix always was a bit strange..."
8222 elif $test -r /etc/systemid; then
8223 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8226 if $test "$cont"; then
8227 echo 'No, maybe "uuname -l" will work...'
8228 if tans=`sh -c 'uuname -l' 2>&1` ; then
8230 phostname='uuname -l'
8232 echo 'Strange. Maybe "uname -n" will work...'
8233 if tans=`sh -c 'uname -n' 2>&1` ; then
8235 phostname='uname -n'
8237 echo 'Oh well, maybe I can mine it out of whoami.h...'
8238 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8239 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8240 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8242 case "$myhostname" in
8243 '') echo "Does this machine have an identity crisis or something?"
8246 echo "Well, you said $myhostname before..."
8247 phostname='echo $myhostname';;
8253 case "$myhostname" in
8254 '') myhostname=noname ;;
8256 : you do not want to know about this
8261 if $test "$myhostname" ; then
8263 rp='Your host name appears to be "'$myhostname'".'" Right?"
8271 : bad guess or no guess
8272 while $test "X$myhostname" = X ; do
8274 rp="Please type the (one word) name of your host:"
8279 : translate upper to lower if necessary
8280 case "$myhostname" in
8282 echo "(Normalizing case in your host name)"
8283 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8287 case "$myhostname" in
8289 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8290 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8291 echo "(Trimming domain name from host name--host name is now $myhostname)"
8293 *) case "$mydomain" in
8296 test "X$hostcat" = "Xypcat hosts" &&
8297 ypmatch "$myhostname" hosts 2>/dev/null |\
8298 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8301 test "X$hostcat" != "X" &&
8302 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8303 /[ ]$myhostname[ . ]/p" > hosts
8306 if $test -f hosts; then
8307 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8308 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8309 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8310 hosts | $sort | $uniq | \
8311 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8312 case `$echo X$dflt` in
8313 X*\ *) echo "(Several hosts in the database matched hostname)"
8316 X.) echo "(You do not have fully-qualified names in the hosts database)"
8320 echo "(I cannot locate a hosts database anywhere)"
8325 tans=`./loc resolv.conf X /etc /usr/etc`
8326 if $test -f "$tans"; then
8327 echo "(Attempting domain name extraction from $tans)"
8328 dflt=.`$sed -n -e 's/ / /g' \
8329 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8330 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8332 .) dflt=.`$sed -n -e 's/ / /g' \
8333 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8334 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8341 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8342 dflt=.`sh -c domainname 2>/dev/null`
8345 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8349 case "$dflt$osname" in
8350 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8351 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8355 .) echo "(Lost all hope -- silly guess then)"
8361 *) dflt="$mydomain";;
8365 rp="What is your domain name?"
8375 : translate upper to lower if necessary
8378 echo "(Normalizing case in your domain name)"
8379 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8383 : a little sanity check here
8384 case "$phostname" in
8387 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8388 $myhostname$mydomain|$myhostname) ;;
8390 case "$phostname" in
8392 echo "(That doesn't agree with your whoami.h file, by the way.)"
8395 echo "(That doesn't agree with your $phostname command, by the way.)"
8405 I need to get your e-mail address in Internet format if possible, i.e.
8406 something like user@host.domain. Please answer accurately since I have
8407 no easy means to double check it. The default value provided below
8408 is most probably close to reality but may not be valid from outside
8409 your organization...
8413 while test "$cont"; do
8415 '') dflt="$cf_by@$myhostname$mydomain";;
8416 *) dflt="$cf_email";;
8418 rp='What is your e-mail address?'
8424 rp='Address does not look like an Internet one. Use it anyway?'
8440 If you or somebody else will be maintaining perl at your site, please
8441 fill in the correct e-mail address here so that they may be contacted
8442 if necessary. Currently, the "perlbug" program included with perl
8443 will send mail to this address in addition to perlbug@perl.org. You may
8444 enter "none" for no administrator.
8447 case "$perladmin" in
8448 '') dflt="$cf_email";;
8449 *) dflt="$perladmin";;
8451 rp='Perl administrator e-mail address'
8455 : determine whether to only install version-specific parts.
8458 Do you want to install only the version-specific parts of the perl
8459 distribution? Usually you do *not* want to do this.
8461 case "$versiononly" in
8462 "$define"|[Yy]*|true) dflt='y' ;;
8465 rp="Do you want to install only the version-specific parts of perl?"
8468 [yY]*) val="$define";;
8474 case "$versiononly" in
8475 "$define") inc_version_list=''
8476 inc_version_list_init=0
8480 : figure out how to guarantee perl startup
8481 case "$startperl" in
8483 case "$sharpbang" in
8487 I can use the #! construct to start perl on your system. This will
8488 make startup of perl scripts faster, but may cause problems if you
8489 want to share those scripts and perl is not in a standard place
8490 ($binexp/perl) on all your platforms. The alternative is to force
8491 a shell by starting the script with a single ':' character.
8494 case "$versiononly" in
8495 "$define") dflt="$binexp/perl$version";;
8496 *) dflt="$binexp/perl";;
8498 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8501 none) startperl=": # use perl";;
8502 *) startperl="#!$ans"
8503 if $test 30 -lt `echo "$ans" | wc -c`; then
8506 WARNING: Some systems limit the #! command to 32 characters.
8507 If you experience difficulty running Perl scripts with #!, try
8508 installing Perl in a directory with a shorter pathname.
8514 *) startperl=": # use perl"
8519 echo "I'll use $startperl to start perl scripts."
8521 : figure best path for perl in scripts
8524 case "$versiononly" in
8525 "$define") perlpath="$binexp/perl$version";;
8526 *) perlpath="$binexp/perl";;
8528 case "$startperl" in
8533 I will use the "eval 'exec'" idiom to start Perl on your system.
8534 I can use the full path of your Perl binary for this purpose, but
8535 doing so may cause problems if you want to share those scripts and
8536 Perl is not always in a standard place ($binexp/perl).
8540 rp="What path shall I use in \"eval 'exec'\"?"
8547 case "$startperl" in
8549 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8552 : determine where public executable scripts go
8553 set scriptdir scriptdir
8555 case "$scriptdir" in
8558 : guess some guesses
8559 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8560 $test -d /usr/share/bin && dflt=/usr/share/bin
8561 $test -d /usr/local/script && dflt=/usr/local/script
8562 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8563 $test -d $prefixexp/script && dflt=$prefixexp/script
8567 *) dflt="$scriptdir"
8572 Some installations have a separate directory just for executable scripts so
8573 that they can mount it across multiple architectures but keep the scripts in
8574 one spot. You might, for example, have a subdirectory of /usr/share for this.
8575 Or you might just lump your scripts in with all your other executables.
8579 rp='Where do you keep publicly executable scripts?'
8581 if $test "X$ansexp" != "X$scriptdirexp"; then
8585 scriptdirexp="$ansexp"
8586 : Change installation prefix, if necessary.
8587 if $test X"$prefix" != X"$installprefix"; then
8588 installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
8590 installscript="$scriptdirexp"
8593 : determine where add-on public executables go
8595 '') dflt=$siteprefix/bin ;;
8599 rp='Pathname where the add-on public executables should be installed?'
8602 sitebinexp="$ansexp"
8603 : Change installation prefix, if necessary.
8604 if $test X"$prefix" != X"$installprefix"; then
8605 installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
8607 installsitebin="$sitebinexp"
8610 : define an is-a-typedef? function
8611 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8613 "") inclist="sys/types.h";;
8615 eval "varval=\$$var";
8619 for inc in $inclist; do
8620 echo "#include <$inc>" >>temp.c;
8622 echo "#ifdef $type" >> temp.c;
8623 echo "printf(\"We have $type\");" >> temp.c;
8624 echo "#endif" >> temp.c;
8625 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8626 if $contains $type temp.E >/dev/null 2>&1; then
8632 *) eval "$var=\$varval";;
8635 : define an is-a-typedef? function that prompts if the type is not available.
8636 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8638 "") inclist="sys/types.h";;
8640 eval "varval=\$$var";
8644 for inc in $inclist; do
8645 echo "#include <$inc>" >>temp.c;
8647 echo "#ifdef $type" >> temp.c;
8648 echo "printf(\"We have $type\");" >> temp.c;
8649 echo "#endif" >> temp.c;
8650 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8652 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
8653 if $contains $type temp.E >/dev/null 2>&1; then
8654 echo "$type found." >&4;
8657 echo "$type NOT found." >&4;
8663 *) eval "$var=\$varval";;
8666 : see what type lseek is declared as in the kernel
8667 rp="What is the type used for lseek's offset on this system?"
8668 set off_t lseektype long stdio.h sys/types.h
8672 echo "Checking to see how big your file offsets are..." >&4
8674 #include <sys/types.h>
8678 printf("%d\n", (int)sizeof($lseektype));
8683 if eval $compile_ok; then
8684 lseeksize=`$run ./try`
8685 echo "Your file offsets are $lseeksize bytes long."
8689 echo "(I can't seem to compile the test program. Guessing...)"
8690 rp="What is the size of your file offsets (in bytes)?"
8696 : see what type file positions are declared as in the library
8697 rp="What is the type for file position used by fsetpos()?"
8698 set fpos_t fpostype long stdio.h sys/types.h
8703 *_t) zzz="$fpostype" ;;
8706 echo "Checking the size of $zzz..." >&4
8708 #include <sys/types.h>
8711 printf("%d\n", (int)sizeof($fpostype));
8716 if eval $compile_ok; then
8720 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8723 echo "Your $zzz is $fpossize bytes long."
8729 echo "(I can't compile the test program. Guessing...)" >&4
8730 rp="What is the size of your file positions (in bytes)?"
8737 # Backward compatibility (uselfs is deprecated).
8739 "$define"|true|[yY]*)
8742 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
8744 uselargefiles="$define"
8748 case "$lseeksize:$fpossize" in
8751 You can have files larger than 2 gigabytes.
8754 *) case "$uselargefiles" in
8755 "$undef"|false|[nN]*) dflt='n' ;;
8760 Perl can be built to understand large files (files larger than 2 gigabytes)
8761 on some systems. To do so, Configure can be run with -Duselargefiles.
8763 If this doesn't make any sense to you, just accept the default '$dflt'.
8765 rp='Try to understand large files, if available?'
8768 y|Y) val="$define" ;;
8775 case "$uselargefiles" in
8777 : Look for a hint-file generated 'call-back-unit'. If the
8778 : user has specified that a large files perl is to be built,
8779 : we may need to set or change some other defaults.
8780 if $test -f uselargefiles.cbu; then
8781 echo "Your platform has some specific hints for large file builds, using them..."
8782 . ./uselargefiles.cbu
8784 echo "Rechecking to see how big your file offsets are..." >&4
8786 #include <sys/types.h>
8790 printf("%d\n", (int)sizeof($lseektype));
8795 if eval $compile_ok; then
8796 lseeksize=`$run ./try`
8797 $echo "Your file offsets are now $lseeksize bytes long."
8801 echo "(I can't seem to compile the test program. Guessing...)"
8802 rp="What is the size of your file offsets (in bytes)?"
8807 *_t) zzz="$fpostype" ;;
8810 $echo $n "Rechecking the size of $zzz...$c" >&4
8812 #include <sys/types.h>
8815 printf("%d\n", (int)sizeof($fpostype));
8820 if eval $compile_ok; then
8825 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8828 echo " $fpossize bytes." >&4
8834 echo "(I can't compile the test program. Guessing...)" >&4
8835 rp="What is the size of your file positions (in bytes)?"
8844 case "$vendorprefix" in
8845 '') d_vendorbin="$undef"
8849 *) d_vendorbin="$define"
8850 : determine where vendor-supplied executables go.
8851 case "$vendorbin" in
8852 '') dflt=$vendorprefix/bin ;;
8853 *) dflt="$vendorbin" ;;
8856 rp='Pathname for the vendor-supplied executables directory?'
8859 vendorbinexp="$ansexp"
8862 : Change installation prefix, if necessary.
8863 if $test X"$prefix" != X"$installprefix"; then
8864 installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
8866 installvendorbin="$vendorbinexp"
8869 : see if qgcvt exists
8873 : Check how to convert floats to strings.
8875 if test "X$d_Gconvert" = X; then
8878 echo "Checking for an efficient way to convert floats to strings."
8880 case "$uselongdouble" in
8881 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
8883 case "$d_longdbl" in
8884 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
8886 case "$d_PRIgldbl" in
8887 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
8891 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
8892 char *myname = "gconvert";
8895 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
8896 char *myname = "gcvt";
8899 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
8900 char *myname = "qgcvt";
8901 #define DOUBLETYPE long double
8904 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8906 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
8908 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
8911 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
8913 char *myname = "sprintf";
8917 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8918 #define DOUBLETYPE long double
8920 #define DOUBLETYPE double
8926 #define I_STDLIB $i_stdlib
8932 checkit(expect, got)
8936 if (strcmp(expect, got)) {
8937 printf("%s oddity: Expected %s, got %s\n",
8938 myname, expect, got);
8948 /* This must be 1st test on (which?) platform */
8949 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
8950 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
8951 checkit("0.1", buf);
8953 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
8954 checkit("0.01", buf);
8956 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
8957 checkit("0.001", buf);
8959 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
8960 checkit("0.0001", buf);
8962 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
8963 if (strlen(buf) > 5)
8964 checkit("9e-005", buf); /* for Microsoft ?? */
8966 checkit("9e-05", buf);
8968 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
8971 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
8972 checkit("1.1", buf);
8974 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
8975 checkit("1.01", buf);
8977 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
8978 checkit("1.001", buf);
8980 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
8981 checkit("1.0001", buf);
8983 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
8984 checkit("1.00001", buf);
8986 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
8987 checkit("1.000001", buf);
8989 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
8992 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
8995 /* Some Linux gcvt's give 1.e+5 here. */
8996 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
8997 checkit("100000", buf);
8999 /* Some Linux gcvt's give -1.e+5 here. */
9000 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
9001 checkit("-100000", buf);
9003 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
9004 checkit("123.456", buf);
9006 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
9007 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
9008 /* 34 should be enough to scare even long double
9009 * places into using the e notation. */
9010 if (strlen(buf) > 5)
9011 checkit("1e+034", buf); /* for Microsoft */
9013 checkit("1e+34", buf);
9015 /* For Perl, if you add additional tests here, also add them to
9016 * t/base/num.t for benefit of platforms not using Configure or
9017 * overriding d_Gconvert */
9022 : first add preferred functions to our list
9024 for xxx_convert in $gconvert_preference; do
9025 case $xxx_convert in
9026 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
9027 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
9030 : then add any others
9031 for xxx_convert in gconvert gcvt sprintf; do
9034 *) xxx_list="$xxx_list $xxx_convert" ;;
9038 case "$d_longdbl$uselongdouble" in
9040 : again, add prefered functions to our list first
9042 for xxx_convert in $gconvert_ld_preference; do
9043 case $xxx_convert in
9044 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9045 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
9048 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
9049 for xxx_convert in qgcvt sprintf $xxx_list; do
9050 case "$xxx_ld_list" in
9051 $xxx_convert*|*" $xxx_convert"*) ;;
9052 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9055 : if sprintf cannot do long doubles, move it to the end
9056 if test "$d_PRIgldbl" != "$define"; then
9057 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
9059 : if no qgcvt, remove it
9060 if test "$d_qgcvt" != "$define"; then
9061 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
9064 xxx_list="$xxx_ld_list"
9068 for xxx_convert in $xxx_list; do
9069 echo "Trying $xxx_convert..."
9071 set try -DTRY_$xxx_convert
9072 if eval $compile; then
9073 echo "$xxx_convert() found." >&4
9075 echo "I'll use $xxx_convert to convert floats into a string." >&4
9078 echo "...But $xxx_convert didn't work as I expected."
9082 echo "$xxx_convert NOT found." >&4
9086 if test X$xxx_convert = X; then
9087 echo "*** WHOA THERE!!! ***" >&4
9088 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
9092 case "$xxx_convert" in
9093 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
9094 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
9095 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
9096 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
9097 "$define$define$define")
9098 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9099 "$define$define$undef")
9100 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9101 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9108 : see if _fwalk exists
9112 : Initialize h_fcntl
9115 : Initialize h_sysfile
9118 : access call always available on UNIX
9122 : locate the flags for 'access()'
9126 $cat >access.c <<'EOCP'
9127 #include <sys/types.h>
9132 #include <sys/file.h>
9141 : check sys/file.h first, no particular reason here
9142 if $test `./findhdr sys/file.h` && \
9143 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9145 echo "<sys/file.h> defines the *_OK access constants." >&4
9146 elif $test `./findhdr fcntl.h` && \
9147 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9149 echo "<fcntl.h> defines the *_OK access constants." >&4
9150 elif $test `./findhdr unistd.h` && \
9151 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9152 echo "<unistd.h> defines the *_OK access constants." >&4
9154 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9160 : see if accessx exists
9161 set accessx d_accessx
9164 : see if alarm exists
9168 : see if POSIX threads are available
9169 set pthread.h i_pthread
9172 : define a fucntion to check prototypes
9173 $cat > protochk <<EOSH
9176 optimize="$optimize"
9178 prototype="$prototype"
9181 usethreads=$usethreads
9182 i_pthread=$i_pthread
9183 pthread_h_first=$pthread_h_first
9186 $cat >> protochk <<'EOSH'
9191 while test $# -ge 2; do
9193 $define) echo "#include <$2>" >> try.c ;;
9194 literal) echo "$2" >> try.c ;;
9196 # Extra magic for the benefit of systems that need pthread.h
9197 # to be included early to correctly detect threadsafe functions.
9198 # Such functions must guarantee themselves, though, that the usethreads
9199 # and i_pthread have been defined, before calling protochk.
9200 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
9201 echo "#include <pthread.h>" >> try.c
9206 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
9207 cat >> try.c <<'EOCP'
9208 #ifdef CAN_PROTOTYPE
9209 #define _(args) args
9214 echo "$foo" >> try.c
9215 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
9216 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
9224 : see if sys/types.h has to be included
9225 set sys/types.h i_systypes
9228 : see if sys/select.h has to be included
9229 set sys/select.h i_sysselct
9232 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9233 while $test $# -ge 2; do
9235 $define) echo "#include <$2>";;
9239 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9241 if eval $compile; then
9250 : see if we should include time.h, sys/time.h, or both
9252 if test "X$timeincl" = X; then
9253 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9254 $echo $n "I'm now running the test program...$c"
9255 $cat >try.c <<'EOCP'
9256 #include <sys/types.h>
9261 #ifdef SYSTIMEKERNEL
9264 #include <sys/time.h>
9267 #include <sys/select.h>
9276 struct timezone tzp;
9278 if (foo.tm_sec == foo.tm_sec)
9281 if (bar.tv_sec == bar.tv_sec)
9288 for s_timezone in '-DS_TIMEZONE' ''; do
9290 for s_timeval in '-DS_TIMEVAL' ''; do
9291 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9292 for i_time in '' '-DI_TIME'; do
9293 for i_systime in '-DI_SYSTIME' ''; do
9296 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9297 if eval $compile; then
9298 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9302 $echo $n "Succeeded with $flags$c"
9314 *SYSTIMEKERNEL*) i_systimek="$define"
9315 timeincl=`./findhdr sys/time.h`
9316 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9317 *) i_systimek="$undef";;
9320 *I_TIME*) i_time="$define"
9321 timeincl=`./findhdr time.h`" $timeincl"
9322 echo "We'll include <time.h>." >&4;;
9323 *) i_time="$undef";;
9326 *I_SYSTIME*) i_systime="$define"
9327 timeincl=`./findhdr sys/time.h`" $timeincl"
9328 echo "We'll include <sys/time.h>." >&4;;
9329 *) i_systime="$undef";;
9333 : see if struct tm knows about tm_zone
9334 case "$i_systime$i_time" in
9337 echo "Checking to see if your struct tm has tm_zone field..." >&4
9338 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
9346 case "$d_tm_tm_zone" in
9347 "$define") echo "Yes, it does." ;;
9348 *) echo "No, it doesn't." ;;
9350 : see if struct tm knows about tm_gmtoff
9351 case "$i_systime$i_time" in
9354 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
9355 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
9363 case "$d_tm_tm_gmtoff" in
9364 "$define") echo "Yes, it does." ;;
9365 *) echo "No, it doesn't." ;;
9368 : see if asctime_r exists
9369 set asctime_r d_asctime_r
9371 case "$d_asctime_r" in
9373 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
9374 case "$d_asctime_r_proto:$usethreads" in
9375 ":define") d_asctime_r_proto=define
9376 set d_asctime_r_proto asctime_r $hdrs
9380 case "$d_asctime_r_proto" in
9382 case "$asctime_r_proto" in
9383 ''|0) try='char* asctime_r(const struct tm*, char*);'
9384 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;;
9386 case "$asctime_r_proto" in
9387 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
9388 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;;
9390 case "$asctime_r_proto" in
9391 ''|0) try='int asctime_r(const struct tm*, char*);'
9392 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;;
9394 case "$asctime_r_proto" in
9395 ''|0) try='int asctime_r(const struct tm*, char*, int);'
9396 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;;
9398 case "$asctime_r_proto" in
9399 ''|0) d_asctime_r=undef
9401 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
9402 * ) case "$asctime_r_proto" in
9403 REENTRANT_PROTO*) ;;
9404 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
9406 echo "Prototype: $try" ;;
9409 *) case "$usethreads" in
9410 define) echo "asctime_r has no prototype, not using it." >&4 ;;
9417 *) asctime_r_proto=0
9421 : see if atolf exists
9425 : see if atoll exists
9429 : Look for GNU-cc style attribute checking
9431 echo "Checking whether your compiler can handle __attribute__ ..." >&4
9432 $cat >attrib.c <<'EOCP'
9434 void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
9436 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9437 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9438 echo "Your C compiler doesn't fully support __attribute__."
9441 echo "Your C compiler supports __attribute__."
9445 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9452 : see if bcmp exists
9456 : see if bcopy exists
9460 : see if this is a unistd.h system
9461 set unistd.h i_unistd
9464 : see if getpgrp exists
9465 set getpgrp d_getpgrp
9468 case "$d_getpgrp" in
9471 echo "Checking to see which flavor of getpgrp is in use..."
9474 #include <sys/types.h>
9476 # include <unistd.h>
9480 if (getuid() == 0) {
9481 printf("(I see you are running Configure as super-user...)\n");
9485 if (getpgrp(1) == 0)
9494 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9495 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
9497 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9498 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
9501 echo "I can't seem to compile and run the test program."
9503 xxx="a USG one, i.e. you use getpgrp()."
9505 # SVR4 systems can appear rather BSD-ish.
9508 xxx="a BSD one, i.e. you use getpgrp(pid)."
9512 xxx="probably a USG one, i.e. you use getpgrp()."
9517 echo "Assuming your getpgrp is $xxx" >&4
9526 : see if setpgrp exists
9527 set setpgrp d_setpgrp
9530 case "$d_setpgrp" in
9533 echo "Checking to see which flavor of setpgrp is in use..."
9536 #include <sys/types.h>
9538 # include <unistd.h>
9542 if (getuid() == 0) {
9543 printf("(I see you are running Configure as super-user...)\n");
9547 if (-1 == setpgrp(1, 1))
9550 if (setpgrp() != -1)
9556 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9557 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
9559 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9560 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
9563 echo "(I can't seem to compile and run the test program.)"
9565 xxx="a USG one, i.e. you use setpgrp()."
9567 # SVR4 systems can appear rather BSD-ish.
9570 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
9574 xxx="probably a USG one, i.e. you use setpgrp()."
9579 echo "Assuming your setpgrp is $xxx" >&4
9587 : see if bzero exists
9591 : see if signal is declared as pointer to function returning int or void
9593 xxx=`./findhdr signal.h`
9594 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
9595 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9596 echo "You have int (*signal())() instead of void." >&4
9598 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9599 echo "You have void (*signal())()." >&4
9601 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
9602 echo "You have int (*signal())() instead of void." >&4
9604 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
9605 echo "You have void (*signal())()." >&4
9608 case "$d_voidsig" in
9610 echo "I can't determine whether signal handler returns void or int..." >&4
9612 rp="What type does your signal handler return?"
9619 echo "As you already told me, signal handler returns void." >&4
9622 *) echo "As you already told me, signal handler returns int." >&4
9629 case "$d_voidsig" in
9630 "$define") signal_t="void";;
9635 : check for ability to cast large floats to 32-bit ints.
9637 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
9638 if $test "$intsize" -ge 4; then
9645 #include <sys/types.h>
9647 $signal_t blech(s) int s; { exit(3); }
9654 signal(SIGFPE, blech);
9656 /* Don't let compiler optimize the test away. Store the number
9657 in a writable string for gcc to pass to sscanf under HP/UX.
9659 sprintf(str, "2147483647");
9660 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
9664 /* x86 processors will probably give 0x8000 0000, which is a
9665 sign change. We don't want that. We want to mimic SPARC
9666 behavior here, which is to preserve the sign and give
9669 if (i32 != ($xxx) f)
9675 if eval $compile_ok; then
9679 echo "(I can't seem to compile the test program--assuming it can't)"
9687 echo "Nope, it can't."
9694 : check for ability to cast negative floats to unsigned
9696 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
9699 #include <sys/types.h>
9701 $signal_t blech(s) int s; { exit(7); }
9702 $signal_t blech_in_list(s) int s; { exit(4); }
9703 unsigned long dummy_long(p) unsigned long p; { return p; }
9704 unsigned int dummy_int(p) unsigned int p; { return p; }
9705 unsigned short dummy_short(p) unsigned short p; { return p; }
9709 unsigned long along;
9711 unsigned short ashort;
9715 /* Frustrate gcc-2.7.2's optimizer which failed this test with
9716 a direct f = -123. assignment. gcc-2.8.0 reportedly
9717 optimized the whole file away
9719 /* Store the number in a writable string for gcc to pass to
9722 sprintf(str, "-123");
9723 sscanf(str, "%lf", &f); /* f = -123.; */
9725 signal(SIGFPE, blech);
9726 along = (unsigned long)f;
9727 aint = (unsigned int)f;
9728 ashort = (unsigned short)f;
9729 if (along != (unsigned long)-123)
9731 if (aint != (unsigned int)-123)
9733 if (ashort != (unsigned short)-123)
9735 sprintf(str, "1073741824.");
9736 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
9739 along = (unsigned long)f;
9740 if (along != 0x80000000)
9744 along = (unsigned long)f;
9745 if (along != 0x7fffffff)
9749 along = (unsigned long)f;
9750 if (along != 0x80000001)
9754 signal(SIGFPE, blech_in_list);
9755 sprintf(str, "123.");
9756 sscanf(str, "%lf", &f); /* f = 123.; */
9757 along = dummy_long((unsigned long)f);
9758 aint = dummy_int((unsigned int)f);
9759 ashort = dummy_short((unsigned short)f);
9760 if (along != (unsigned long)123)
9762 if (aint != (unsigned int)123)
9764 if (ashort != (unsigned short)123)
9771 if eval $compile_ok; then
9775 echo "(I can't seem to compile the test program--assuming it can't)"
9778 case "$castflags" in
9783 echo "Nope, it can't."
9790 : see if vprintf exists
9792 if set vprintf val -f d_vprintf; eval $csym; $val; then
9793 echo 'vprintf() found.' >&4
9796 #include <varargs.h>
9798 int main() { xxx("foo"); }
9807 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
9811 if eval $compile && $run ./try; then
9812 echo "Your vsprintf() returns (int)." >&4
9815 echo "Your vsprintf() returns (char*)." >&4
9819 echo 'vprintf() NOT found.' >&4
9830 : see if chown exists
9834 : see if chroot exists
9838 : see if chsize exists
9842 : see if class exists
9846 hasstruct='varname=$1; struct=$2; shift; shift;
9847 while $test $# -ge 2; do
9849 $define) echo "#include <$2>";;
9853 echo "int main () { struct $struct foo; }" >> try.c;
9855 if eval $compile; then
9866 : see whether socket exists
9868 $echo $n "Hmm... $c" >&4
9869 if set socket val -f d_socket; eval $csym; $val; then
9870 echo "Looks like you have Berkeley networking support." >&4
9872 if set setsockopt val -f; eval $csym; $val; then
9875 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
9879 if $contains socklib libc.list >/dev/null 2>&1; then
9880 echo "Looks like you have Berkeley networking support." >&4
9882 : we will have to assume that it supports the 4.2 BSD interface
9885 echo "You don't have Berkeley networking in libc$_a..." >&4
9886 if test "X$d_socket" = "X$define"; then
9887 echo "...but you seem to believe that you have sockets." >&4
9889 for net in net socket
9891 if test -f /usr/lib/lib$net$_a; then
9892 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
9893 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
9894 if $contains socket libc.list >/dev/null 2>&1; then
9899 echo "...but the Wollongong group seems to have hacked it in." >&4
9900 sockethdr="-I/usr/netinclude"
9903 echo "Found Berkeley sockets interface in lib$net." >&4
9904 if $contains setsockopt libc.list >/dev/null 2>&1; then
9907 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
9914 if test "X$d_socket" != "X$define"; then
9915 echo "or anywhere else I see." >&4
9923 : see if socketpair exists
9924 set socketpair d_sockpair
9929 echo "Checking the availability of certain socket constants..." >&4
9930 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
9931 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
9933 #include <sys/types.h>
9934 #include <sys/socket.h>
9940 set try; if eval $compile; then
9943 set d_${enum}; eval $setvar
9947 : see if this is a sys/uio.h system
9948 set sys/uio.h i_sysuio
9953 echo "Checking to see if your system supports struct cmsghdr..." >&4
9954 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
9956 case "$d_cmsghdr_s" in
9957 "$define") echo "Yes, it does." ;;
9958 *) echo "No, it doesn't." ;;
9962 : check for const keyword
9964 echo 'Checking to see if your C compiler knows about "const"...' >&4
9965 $cat >const.c <<'EOCP'
9966 typedef struct spug { int drokk; } spug;
9973 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
9975 echo "Yup, it does."
9978 echo "Nope, it doesn't."
9983 : see if crypt exists
9988 $define) cryptlib='' ;;
9989 *) if set crypt val -f d_crypt; eval $csym; $val; then
9990 echo 'crypt() found.' >&4
9994 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
9995 if $test -z "$cryptlib"; then
9996 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
10000 if $test -z "$cryptlib"; then
10001 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
10005 if $test -z "$cryptlib"; then
10006 cryptlib=`./loc libcrypt$_a "" $libpth`
10010 if $test -z "$cryptlib"; then
10011 echo 'crypt() NOT found.' >&4
10022 : see if this is a crypt.h system
10023 set crypt.h i_crypt
10026 : see if crypt_r exists
10027 set crypt_r d_crypt_r
10029 case "$d_crypt_r" in
10031 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
10032 case "$d_crypt_r_proto:$usethreads" in
10033 ":define") d_crypt_r_proto=define
10034 set d_crypt_r_proto crypt_r $hdrs
10038 case "$d_crypt_r_proto" in
10040 case "$crypt_r_proto" in
10041 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
10042 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCS ;;
10044 case "$crypt_r_proto" in
10045 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
10046 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCD ;;
10048 case "$crypt_r_proto" in
10049 ''|0) d_crypt_r=undef
10051 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
10052 * ) case "$crypt_r_proto" in
10053 REENTRANT_PROTO*) ;;
10054 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
10056 echo "Prototype: $try" ;;
10059 *) case "$usethreads" in
10060 define) echo "crypt_r has no prototype, not using it." >&4 ;;
10071 : get csh whereabouts
10073 'csh') val="$undef" ;;
10074 *) val="$define" ;;
10078 : Respect a hint or command line value for full_csh.
10079 case "$full_csh" in
10080 '') full_csh=$csh ;;
10083 : see if ctermid_r exists
10084 set ctermid_r d_ctermid_r
10086 case "$d_ctermid_r" in
10088 hdrs="$i_systypes sys/types.h define stdio.h "
10089 case "$d_ctermid_r_proto:$usethreads" in
10090 ":define") d_ctermid_r_proto=define
10091 set d_ctermid_r_proto ctermid_r $hdrs
10095 case "$d_ctermid_r_proto" in
10097 case "$ctermid_r_proto" in
10098 ''|0) try='char* ctermid_r(char*);'
10099 ./protochk "extern $try" $hdrs && ctermid_r_proto=B_B ;;
10101 case "$ctermid_r_proto" in
10102 ''|0) d_ctermid_r=undef
10104 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
10105 * ) case "$ctermid_r_proto" in
10106 REENTRANT_PROTO*) ;;
10107 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
10109 echo "Prototype: $try" ;;
10112 *) case "$usethreads" in
10113 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
10120 *) ctermid_r_proto=0
10124 : see if ctime_r exists
10125 set ctime_r d_ctime_r
10127 case "$d_ctime_r" in
10129 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
10130 case "$d_ctime_r_proto:$usethreads" in
10131 ":define") d_ctime_r_proto=define
10132 set d_ctime_r_proto ctime_r $hdrs
10136 case "$d_ctime_r_proto" in
10138 case "$ctime_r_proto" in
10139 ''|0) try='char* ctime_r(const time_t*, char*);'
10140 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;;
10142 case "$ctime_r_proto" in
10143 ''|0) try='char* ctime_r(const time_t*, char*, int);'
10144 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;;
10146 case "$ctime_r_proto" in
10147 ''|0) try='int ctime_r(const time_t*, char*);'
10148 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;;
10150 case "$ctime_r_proto" in
10151 ''|0) try='int ctime_r(const time_t*, char*, int);'
10152 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;;
10154 case "$ctime_r_proto" in
10155 ''|0) d_ctime_r=undef
10157 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
10158 * ) case "$ctime_r_proto" in
10159 REENTRANT_PROTO*) ;;
10160 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
10162 echo "Prototype: $try" ;;
10165 *) case "$usethreads" in
10166 define) echo "ctime_r has no prototype, not using it." >&4 ;;
10177 : see if cuserid exists
10178 set cuserid d_cuserid
10181 : see if this is a limits.h system
10182 set limits.h i_limits
10185 : see if this is a float.h system
10186 set float.h i_float
10189 : See if number of significant digits in a double precision number is known
10191 $cat >dbl_dig.c <<EOM
10192 #$i_limits I_LIMITS
10195 #include <limits.h>
10201 printf("Contains DBL_DIG");
10204 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
10205 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
10206 echo "DBL_DIG found." >&4
10209 echo "DBL_DIG NOT found." >&4
10216 : see if dbm.h is available
10217 : see if dbmclose exists
10218 set dbmclose d_dbmclose
10221 case "$d_dbmclose" in
10231 *) set rpcsvc/dbm.h i_rpcsvcdbm
10236 *) echo "We won't be including <dbm.h>"
10246 : see if prototype for dbminit is available
10248 set d_dbminitproto dbminit $i_dbm dbm.h
10251 : see if difftime exists
10252 set difftime d_difftime
10255 : see if this is a dirent system
10257 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
10259 echo "<dirent.h> found." >&4
10262 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
10263 echo "<sys/dir.h> found." >&4
10266 xinc=`./findhdr sys/ndir.h`
10268 echo "<dirent.h> NOT found." >&4
10273 : Look for type of directory structure.
10275 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10277 case "$direntrytype" in
10279 case "$i_dirent" in
10280 $define) guess1='struct dirent' ;;
10281 *) guess1='struct direct' ;;
10284 *) guess1="$direntrytype"
10289 'struct dirent') guess2='struct direct' ;;
10290 *) guess2='struct dirent' ;;
10293 if $contains "$guess1" try.c >/dev/null 2>&1; then
10294 direntrytype="$guess1"
10295 echo "Your directory entries are $direntrytype." >&4
10296 elif $contains "$guess2" try.c >/dev/null 2>&1; then
10297 direntrytype="$guess2"
10298 echo "Your directory entries seem to be $direntrytype." >&4
10300 echo "I don't recognize your system's directory entries." >&4
10301 rp="What type is used for directory entries on this system?"
10304 direntrytype="$ans"
10309 : see if the directory entry stores field length
10311 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10312 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
10313 echo "Good, your directory entry keeps length information in d_namlen." >&4
10316 echo "Your directory entry does not know about the d_namlen field." >&4
10323 : see if this is an sysdir system
10324 set sys/dir.h i_sysdir
10327 : see if this is an sysndir system
10328 set sys/ndir.h i_sysndir
10333 $cat >dirfd.c <<EOM
10335 #$i_dirent I_DIRENT /**/
10336 #$i_sysdir I_SYS_DIR /**/
10337 #$i_sysndir I_SYS_NDIR /**/
10338 #$i_systypes I_SYS_TYPES /**/
10339 #if defined(I_SYS_TYPES)
10340 #include <sys/types.h>
10342 #if defined(I_DIRENT)
10343 #include <dirent.h>
10344 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
10345 #include <sys/dir.h>
10349 #include <sys/ndir.h>
10353 #include <ndir.h> /* may be wrong in the future */
10355 #include <sys/dir.h>
10361 DIR *dirp = opendir(".");
10362 if (dirfd(dirp) >= 0)
10369 if eval $compile; then
10373 $define) echo "dirfd() found." >&4 ;;
10374 *) echo "dirfd() NOT found." >&4 ;;
10380 : see if dlerror exists
10383 set dlerror d_dlerror
10387 : see if dlfcn is available
10388 set dlfcn.h i_dlfcn
10395 On a few systems, the dynamically loaded modules that perl generates and uses
10396 will need a different extension than shared libs. The default will probably
10402 *) dflt="$dlext" ;;
10404 rp='What is the extension of dynamically loaded modules'
10413 : Check if dlsym need a leading underscore
10419 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
10420 $cat >dyna.c <<'EOM'
10429 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
10431 #include <sys/types.h>
10436 extern int fred() ;
10445 int mode = RTLD_LAZY ;
10447 handle = dlopen("./dyna.$dlext", mode) ;
10448 if (handle == NULL) {
10453 symbol = dlsym(handle, "fred") ;
10454 if (symbol == NULL) {
10455 /* try putting a leading underscore */
10456 symbol = dlsym(handle, "_fred") ;
10457 if (symbol == NULL) {
10470 : Call the object file tmp-dyna.o in case dlext=o.
10471 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
10472 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
10473 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
10474 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
10477 1) echo "Test program failed using dlopen." >&4
10478 echo "Perhaps you should not use dynamic loading." >&4;;
10479 2) echo "Test program failed using dlsym." >&4
10480 echo "Perhaps you should not use dynamic loading." >&4;;
10481 3) echo "dlsym needs a leading underscore" >&4
10483 4) echo "dlsym doesn't need a leading underscore." >&4;;
10486 echo "I can't compile and run the test program." >&4
10487 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
10492 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
10497 : see if drand48_r exists
10498 set drand48_r d_drand48_r
10500 case "$d_drand48_r" in
10502 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
10503 case "$d_drand48_r_proto:$usethreads" in
10504 ":define") d_drand48_r_proto=define
10505 set d_drand48_r_proto drand48_r $hdrs
10509 case "$d_drand48_r_proto" in
10511 case "$drand48_r_proto" in
10512 ''|0) try='int drand48_r(struct drand48_data*, double*);'
10513 ./protochk "extern $try" $hdrs && drand48_r_proto=I_ST ;;
10515 case "$drand48_r_proto" in
10516 ''|0) d_drand48_r=undef
10518 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
10519 * ) case "$drand48_r_proto" in
10520 REENTRANT_PROTO*) ;;
10521 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
10523 echo "Prototype: $try" ;;
10526 *) case "$usethreads" in
10527 define) echo "drand48_r has no prototype, not using it." >&4 ;;
10534 *) drand48_r_proto=0
10538 : see if prototype for drand48 is available
10540 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
10543 : see if dup2 exists
10547 : see if eaccess exists
10548 set eaccess d_eaccess
10551 : see if endgrent exists
10552 set endgrent d_endgrent
10555 : see if this is an grp system
10561 xxx=`./findhdr grp.h`
10562 $cppstdin $cppflags $cppminus < $xxx >$$.h
10564 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
10576 set d_grpasswd; eval $setvar
10580 : see if endgrent_r exists
10581 set endgrent_r d_endgrent_r
10583 case "$d_endgrent_r" in
10585 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
10586 case "$d_endgrent_r_proto:$usethreads" in
10587 ":define") d_endgrent_r_proto=define
10588 set d_endgrent_r_proto endgrent_r $hdrs
10592 case "$d_endgrent_r_proto" in
10594 case "$endgrent_r_proto" in
10595 ''|0) try='int endgrent_r(FILE**);'
10596 ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;;
10598 case "$endgrent_r_proto" in
10599 ''|0) try='void endgrent_r(FILE**);'
10600 ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;;
10602 case "$endgrent_r_proto" in
10603 ''|0) d_endgrent_r=undef
10605 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
10606 * ) case "$endgrent_r_proto" in
10607 REENTRANT_PROTO*) ;;
10608 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
10610 echo "Prototype: $try" ;;
10613 *) case "$usethreads" in
10614 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
10621 *) endgrent_r_proto=0
10625 : see if endhostent exists
10626 set endhostent d_endhent
10629 : see if this is a netdb.h system
10630 set netdb.h i_netdb
10633 : see if endhostent_r exists
10634 set endhostent_r d_endhostent_r
10636 case "$d_endhostent_r" in
10638 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10639 case "$d_endhostent_r_proto:$usethreads" in
10640 ":define") d_endhostent_r_proto=define
10641 set d_endhostent_r_proto endhostent_r $hdrs
10645 case "$d_endhostent_r_proto" in
10647 case "$endhostent_r_proto" in
10648 ''|0) try='int endhostent_r(struct hostent_data*);'
10649 ./protochk "extern $try" $hdrs && endhostent_r_proto=I_D ;;
10651 case "$endhostent_r_proto" in
10652 ''|0) try='void endhostent_r(struct hostent_data*);'
10653 ./protochk "extern $try" $hdrs && endhostent_r_proto=V_D ;;
10655 case "$endhostent_r_proto" in
10656 ''|0) d_endhostent_r=undef
10657 endhostent_r_proto=0
10658 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
10659 * ) case "$endhostent_r_proto" in
10660 REENTRANT_PROTO*) ;;
10661 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
10663 echo "Prototype: $try" ;;
10666 *) case "$usethreads" in
10667 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
10669 d_endhostent_r=undef
10670 endhostent_r_proto=0
10674 *) endhostent_r_proto=0
10678 : see if endnetent exists
10679 set endnetent d_endnent
10682 : see if endnetent_r exists
10683 set endnetent_r d_endnetent_r
10685 case "$d_endnetent_r" in
10687 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10688 case "$d_endnetent_r_proto:$usethreads" in
10689 ":define") d_endnetent_r_proto=define
10690 set d_endnetent_r_proto endnetent_r $hdrs
10694 case "$d_endnetent_r_proto" in
10696 case "$endnetent_r_proto" in
10697 ''|0) try='int endnetent_r(struct netent_data*);'
10698 ./protochk "extern $try" $hdrs && endnetent_r_proto=I_D ;;
10700 case "$endnetent_r_proto" in
10701 ''|0) try='void endnetent_r(struct netent_data*);'
10702 ./protochk "extern $try" $hdrs && endnetent_r_proto=V_D ;;
10704 case "$endnetent_r_proto" in
10705 ''|0) d_endnetent_r=undef
10706 endnetent_r_proto=0
10707 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
10708 * ) case "$endnetent_r_proto" in
10709 REENTRANT_PROTO*) ;;
10710 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
10712 echo "Prototype: $try" ;;
10715 *) case "$usethreads" in
10716 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
10718 d_endnetent_r=undef
10719 endnetent_r_proto=0
10723 *) endnetent_r_proto=0
10727 : see if endprotoent exists
10728 set endprotoent d_endpent
10731 : see if endprotoent_r exists
10732 set endprotoent_r d_endprotoent_r
10734 case "$d_endprotoent_r" in
10736 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10737 case "$d_endprotoent_r_proto:$usethreads" in
10738 ":define") d_endprotoent_r_proto=define
10739 set d_endprotoent_r_proto endprotoent_r $hdrs
10743 case "$d_endprotoent_r_proto" in
10745 case "$endprotoent_r_proto" in
10746 ''|0) try='int endprotoent_r(struct protoent_data*);'
10747 ./protochk "extern $try" $hdrs && endprotoent_r_proto=I_D ;;
10749 case "$endprotoent_r_proto" in
10750 ''|0) try='void endprotoent_r(struct protoent_data*);'
10751 ./protochk "extern $try" $hdrs && endprotoent_r_proto=V_D ;;
10753 case "$endprotoent_r_proto" in
10754 ''|0) d_endprotoent_r=undef
10755 endprotoent_r_proto=0
10756 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
10757 * ) case "$endprotoent_r_proto" in
10758 REENTRANT_PROTO*) ;;
10759 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
10761 echo "Prototype: $try" ;;
10764 *) case "$usethreads" in
10765 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
10767 d_endprotoent_r=undef
10768 endprotoent_r_proto=0
10772 *) endprotoent_r_proto=0
10776 : see if endpwent exists
10777 set endpwent d_endpwent
10780 : see if this is a pwd.h system
10786 xxx=`./findhdr pwd.h`
10787 $cppstdin $cppflags $cppminus < $xxx >$$.h
10789 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
10797 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
10805 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
10813 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
10821 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
10829 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
10837 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
10845 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
10857 set d_pwquota; eval $setvar
10858 set d_pwage; eval $setvar
10859 set d_pwchange; eval $setvar
10860 set d_pwclass; eval $setvar
10861 set d_pwexpire; eval $setvar
10862 set d_pwcomment; eval $setvar
10863 set d_pwgecos; eval $setvar
10864 set d_pwpasswd; eval $setvar
10868 : see if endpwent_r exists
10869 set endpwent_r d_endpwent_r
10871 case "$d_endpwent_r" in
10873 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
10874 case "$d_endpwent_r_proto:$usethreads" in
10875 ":define") d_endpwent_r_proto=define
10876 set d_endpwent_r_proto endpwent_r $hdrs
10880 case "$d_endpwent_r_proto" in
10882 case "$endpwent_r_proto" in
10883 ''|0) try='int endpwent_r(FILE**);'
10884 ./protochk "extern $try" $hdrs && endpwent_r_proto=I_H ;;
10886 case "$endpwent_r_proto" in
10887 ''|0) try='void endpwent_r(FILE**);'
10888 ./protochk "extern $try" $hdrs && endpwent_r_proto=V_H ;;
10890 case "$endpwent_r_proto" in
10891 ''|0) d_endpwent_r=undef
10893 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
10894 * ) case "$endpwent_r_proto" in
10895 REENTRANT_PROTO*) ;;
10896 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
10898 echo "Prototype: $try" ;;
10901 *) case "$usethreads" in
10902 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
10909 *) endpwent_r_proto=0
10913 : see if endservent exists
10914 set endservent d_endsent
10917 : see if endservent_r exists
10918 set endservent_r d_endservent_r
10920 case "$d_endservent_r" in
10922 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10923 case "$d_endservent_r_proto:$usethreads" in
10924 ":define") d_endservent_r_proto=define
10925 set d_endservent_r_proto endservent_r $hdrs
10929 case "$d_endservent_r_proto" in
10931 case "$endservent_r_proto" in
10932 ''|0) try='int endservent_r(struct servent_data*);'
10933 ./protochk "extern $try" $hdrs && endservent_r_proto=I_D ;;
10935 case "$endservent_r_proto" in
10936 ''|0) try='void endservent_r(struct servent_data*);'
10937 ./protochk "extern $try" $hdrs && endservent_r_proto=V_D ;;
10939 case "$endservent_r_proto" in
10940 ''|0) d_endservent_r=undef
10941 endservent_r_proto=0
10942 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
10943 * ) case "$endservent_r_proto" in
10944 REENTRANT_PROTO*) ;;
10945 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
10947 echo "Prototype: $try" ;;
10950 *) case "$usethreads" in
10951 define) echo "endservent_r has no prototype, not using it." >&4 ;;
10953 d_endservent_r=undef
10954 endservent_r_proto=0
10958 *) endservent_r_proto=0
10962 : Locate the flags for 'open()'
10964 $cat >try.c <<'EOCP'
10965 #include <sys/types.h>
10970 #include <sys/file.h>
10981 : check sys/file.h first to get FREAD on Sun
10982 if $test `./findhdr sys/file.h` && \
10983 set try -DI_SYS_FILE && eval $compile; then
10985 echo "<sys/file.h> defines the O_* constants..." >&4
10986 if $run ./try; then
10987 echo "and you have the 3 argument form of open()." >&4
10990 echo "but not the 3 argument form of open(). Oh, well." >&4
10993 elif $test `./findhdr fcntl.h` && \
10994 set try -DI_FCNTL && eval $compile; then
10996 echo "<fcntl.h> defines the O_* constants..." >&4
10997 if $run ./try; then
10998 echo "and you have the 3 argument form of open()." >&4
11001 echo "but not the 3 argument form of open(). Oh, well." >&4
11006 echo "I can't find the O_* constant definitions! You got problems." >&4
11012 : see which of string.h or strings.h is needed
11014 strings=`./findhdr string.h`
11015 if $test "$strings" && $test -r "$strings"; then
11016 echo "Using <string.h> instead of <strings.h>." >&4
11020 strings=`./findhdr strings.h`
11021 if $test "$strings" && $test -r "$strings"; then
11022 echo "Using <strings.h> instead of <string.h>." >&4
11024 echo "No string header found -- You'll surely have problems." >&4
11029 case "$i_string" in
11030 "$undef") strings=`./findhdr strings.h`;;
11031 *) strings=`./findhdr string.h`;;
11034 : see if this is a sys/file.h system
11039 : do we need to include sys/file.h ?
11043 if $h_sysfile; then
11045 echo "We'll be including <sys/file.h>." >&4
11048 echo "We won't be including <sys/file.h>." >&4
11058 : see if fcntl.h is there
11063 : see if we can include fcntl.h
11069 echo "We'll be including <fcntl.h>." >&4
11072 if $h_sysfile; then
11073 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
11075 echo "We won't be including <fcntl.h>." >&4
11087 : check for non-blocking I/O stuff
11088 case "$h_sysfile" in
11089 true) echo "#include <sys/file.h>" > head.c;;
11092 true) echo "#include <fcntl.h>" > head.c;;
11093 *) echo "#include <sys/fcntl.h>" > head.c;;
11098 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
11099 case "$o_nonblock" in
11101 $cat head.c > try.c
11102 $cat >>try.c <<EOCP
11104 #include <stdlib.h>
11111 printf("O_NONBLOCK\n");
11115 printf("O_NDELAY\n");
11119 printf("FNDELAY\n");
11126 if eval $compile_ok; then
11127 o_nonblock=`$run ./try`
11128 case "$o_nonblock" in
11129 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
11130 *) echo "Seems like we can use $o_nonblock.";;
11133 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
11136 *) echo "Using $hint value $o_nonblock.";;
11138 $rm -f try try.* .out core
11141 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
11144 $cat head.c > try.c
11145 $cat >>try.c <<EOCP
11147 #include <sys/types.h>
11148 #include <signal.h>
11150 #include <stdlib.h>
11155 #define MY_O_NONBLOCK $o_nonblock
11156 #ifndef errno /* XXX need better Configure test */
11159 #$i_unistd I_UNISTD
11161 #include <unistd.h>
11163 #$i_string I_STRING
11165 #include <string.h>
11167 #include <strings.h>
11169 $signal_t blech(x) int x; { exit(3); }
11171 $cat >> try.c <<'EOCP'
11179 pipe(pd); /* Down: child -> parent */
11180 pipe(pu); /* Up: parent -> child */
11183 close(pd[1]); /* Parent reads from pd[0] */
11184 close(pu[0]); /* Parent writes (blocking) to pu[1] */
11186 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
11191 signal(SIGALRM, blech);
11193 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
11195 sprintf(string, "%d\n", ret);
11196 write(2, string, strlen(string));
11199 if (errno == EAGAIN) {
11200 printf("EAGAIN\n");
11205 if (errno == EWOULDBLOCK)
11206 printf("EWOULDBLOCK\n");
11209 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
11210 sleep(2); /* Give it time to close our pipe */
11212 ret = read(pd[0], buf, 1); /* Should read EOF */
11214 sprintf(string, "%d\n", ret);
11215 write(4, string, strlen(string));
11219 close(pd[0]); /* We write to pd[1] */
11220 close(pu[1]); /* We read from pu[0] */
11221 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
11222 close(pd[1]); /* Pipe pd is now fully closed! */
11223 exit(0); /* Bye bye, thank you for playing! */
11227 if eval $compile_ok; then
11228 echo "$startsh" >mtry
11229 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
11231 ./mtry >/dev/null 2>&1
11233 0) eagain=`$cat try.out`;;
11234 1) echo "Could not perform non-blocking setting!";;
11235 2) echo "I did a successful read() for something that was not there!";;
11236 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
11237 4) echo "Could not find F_SETFL!";;
11238 *) echo "Something terribly wrong happened during testing.";;
11240 rd_nodata=`$cat try.ret`
11241 echo "A read() system call with no data present returns $rd_nodata."
11242 case "$rd_nodata" in
11245 echo "(That's peculiar, fixing that to be -1.)"
11251 echo "Forcing errno EAGAIN on read() with no data available."
11255 echo "Your read() sets errno to $eagain when no data is available."
11258 status=`$cat try.err`
11260 0) echo "And it correctly returns 0 to signal EOF.";;
11261 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
11262 *) echo "However, your read() returns '$status' on EOF??";;
11265 if test "$status" = "$rd_nodata"; then
11266 echo "WARNING: you can't distinguish between EOF and no data!"
11270 echo "I can't compile the test program--assuming errno EAGAIN will do."
11277 echo "Using $hint value $eagain."
11278 echo "Your read() returns $rd_nodata when no data is present."
11279 case "$d_eofnblk" in
11280 "$define") echo "And you can see EOF because read() returns 0.";;
11281 "$undef") echo "But you can't see EOF status from read() returned value.";;
11283 echo "(Assuming you can't see EOF status from read anyway.)"
11289 $rm -f try try.* .out core head.c mtry
11291 : see if fchdir exists
11292 set fchdir d_fchdir
11295 : see if fchmod exists
11296 set fchmod d_fchmod
11299 : see if fchown exists
11300 set fchown d_fchown
11303 : see if this is an fcntl system
11308 : See if fcntl-based locking works.
11310 #include <stdlib.h>
11311 #include <unistd.h>
11313 #include <signal.h>
11314 $signal_t blech(x) int x; { exit(3); }
11316 #if defined(F_SETLK) && defined(F_SETLKW)
11317 struct flock flock;
11319 fd = open("try.c", O_RDONLY);
11320 flock.l_type = F_RDLCK;
11321 flock.l_whence = SEEK_SET;
11322 flock.l_start = flock.l_len = 0;
11323 signal(SIGALRM, blech);
11325 retval = fcntl(fd, F_SETLK, &flock);
11327 (retval < 0 ? exit(2) : exit(0));
11333 echo "Checking if fcntl-based file locking works... "
11337 if eval $compile_ok; then
11338 if $run ./try; then
11339 echo "Yes, it seems to work."
11342 echo "Nope, it didn't work."
11347 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
11348 *** This is (almost) impossible.
11349 *** If your NFS lock daemons are not feeling well, something like
11350 *** this may happen, please investigate. Cannot continue, aborting.
11358 echo "I'm unable to compile the test program, so I'll assume not."
11363 echo "Nope, since you don't even have fcntl()."
11366 set d_fcntl_can_lock
11371 : check for fd_set items
11374 Checking to see how well your C compiler handles fd_set and friends ...
11377 #$i_systime I_SYS_TIME
11378 #$i_sysselct I_SYS_SELECT
11379 #$d_socket HAS_SOCKET
11380 #include <sys/types.h>
11382 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
11385 #include <sys/time.h>
11387 #ifdef I_SYS_SELECT
11388 #include <sys/select.h>
11397 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
11405 if eval $compile; then
11406 d_fds_bits="$define"
11408 echo "Well, your system knows about the normal fd_set typedef..." >&4
11409 if $run ./try; then
11410 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
11411 d_fd_macros="$define"
11414 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
11416 d_fd_macros="$undef"
11420 Hmm, your compiler has some difficulty with fd_set. Checking further...
11423 if eval $compile; then
11424 d_fds_bits="$undef"
11426 echo "Well, your system has some sort of fd_set available..." >&4
11427 if $run ./try; then
11428 echo "and you have the normal fd_set macros." >&4
11429 d_fd_macros="$define"
11432 but not the normal fd_set macros! Gross! More work for me...
11434 d_fd_macros="$undef"
11437 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
11439 d_fds_bits="$undef"
11440 d_fd_macros="$undef"
11445 : see if fgetpos exists
11446 set fgetpos d_fgetpos
11449 : see if finite exists
11450 set finite d_finite
11453 : see if finitel exists
11454 set finitel d_finitel
11457 : see if flock exists
11461 : see if prototype for flock is available
11463 set d_flockproto flock $i_sysfile sys/file.h
11466 : see if fork exists
11470 : see if fp_class exists
11471 set fp_class d_fp_class
11474 : see if pathconf exists
11475 set pathconf d_pathconf
11478 : see if fpathconf exists
11479 set fpathconf d_fpathconf
11482 : see if fpclass exists
11483 set fpclass d_fpclass
11486 : see if fpclassify exists
11487 set fpclassify d_fpclassify
11490 : see if fpclassl exists
11491 set fpclassl d_fpclassl
11495 : check for fpos64_t
11497 echo "Checking to see if you have fpos64_t..." >&4
11500 int main() { fpos64_t x = 7; }
11503 if eval $compile; then
11505 echo "You have fpos64_t."
11508 echo "You do not have fpos64_t."
11509 case "$fpossize" in
11510 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
11517 : see if frexpl exists
11518 set frexpl d_frexpl
11521 : see if this is a sys/param system
11522 set sys/param.h i_sysparam
11525 : see if this is a sys/mount.h system
11526 set sys/mount.h i_sysmount
11531 echo "Checking to see if your system supports struct fs_data..." >&4
11532 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
11534 case "$d_fs_data_s" in
11535 "$define") echo "Yes, it does." ;;
11536 *) echo "No, it doesn't." ;;
11539 : see if fseeko exists
11540 set fseeko d_fseeko
11542 case "$longsize" in
11543 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
11546 : see if fsetpos exists
11547 set fsetpos d_fsetpos
11551 : see if fstatfs exists
11552 set fstatfs d_fstatfs
11556 : see if statvfs exists
11557 set statvfs d_statvfs
11560 : see if fstatvfs exists
11561 set fstatvfs d_fstatvfs
11565 : see if fsync exists
11569 : see if ftello exists
11570 set ftello d_ftello
11572 case "$longsize" in
11573 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
11576 : see if getcwd exists
11577 set getcwd d_getcwd
11580 : see if getespwnam exists
11581 set getespwnam d_getespwnam
11585 : see if getfsstat exists
11586 set getfsstat d_getfsstat
11589 : see if getgrent exists
11590 set getgrent d_getgrent
11593 : see if getgrent_r exists
11594 set getgrent_r d_getgrent_r
11596 case "$d_getgrent_r" in
11598 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11599 case "$d_getgrent_r_proto:$usethreads" in
11600 ":define") d_getgrent_r_proto=define
11601 set d_getgrent_r_proto getgrent_r $hdrs
11605 case "$d_getgrent_r_proto" in
11607 case "$getgrent_r_proto" in
11608 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
11609 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBWR ;;
11611 case "$getgrent_r_proto" in
11612 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
11613 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIR ;;
11615 case "$getgrent_r_proto" in
11616 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
11617 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBW ;;
11619 case "$getgrent_r_proto" in
11620 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
11621 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBI ;;
11623 case "$getgrent_r_proto" in
11624 ''|0) try='int getgrent_r(struct group*, char*, int);'
11625 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBI ;;
11627 case "$getgrent_r_proto" in
11628 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
11629 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIH ;;
11631 case "$getgrent_r_proto" in
11632 ''|0) d_getgrent_r=undef
11634 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
11635 * ) case "$getgrent_r_proto" in
11636 REENTRANT_PROTO*) ;;
11637 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
11639 echo "Prototype: $try" ;;
11642 *) case "$usethreads" in
11643 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
11650 *) getgrent_r_proto=0
11654 : see if getgrgid_r exists
11655 set getgrgid_r d_getgrgid_r
11657 case "$d_getgrgid_r" in
11659 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11660 case "$d_getgrgid_r_proto:$usethreads" in
11661 ":define") d_getgrgid_r_proto=define
11662 set d_getgrgid_r_proto getgrgid_r $hdrs
11666 case "$d_getgrgid_r_proto" in
11668 case "$getgrgid_r_proto" in
11669 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
11670 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
11672 case "$getgrgid_r_proto" in
11673 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
11674 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
11676 case "$getgrgid_r_proto" in
11677 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
11678 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
11680 case "$getgrgid_r_proto" in
11681 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
11682 ./protochk "extern $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
11684 case "$getgrgid_r_proto" in
11685 ''|0) d_getgrgid_r=undef
11687 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
11688 * ) case "$getgrgid_r_proto" in
11689 REENTRANT_PROTO*) ;;
11690 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
11692 echo "Prototype: $try" ;;
11695 *) case "$usethreads" in
11696 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
11703 *) getgrgid_r_proto=0
11707 : see if getgrnam_r exists
11708 set getgrnam_r d_getgrnam_r
11710 case "$d_getgrnam_r" in
11712 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11713 case "$d_getgrnam_r_proto:$usethreads" in
11714 ":define") d_getgrnam_r_proto=define
11715 set d_getgrnam_r_proto getgrnam_r $hdrs
11719 case "$d_getgrnam_r_proto" in
11721 case "$getgrnam_r_proto" in
11722 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
11723 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
11725 case "$getgrnam_r_proto" in
11726 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
11727 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
11729 case "$getgrnam_r_proto" in
11730 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
11731 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CBI ;;
11733 case "$getgrnam_r_proto" in
11734 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
11735 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
11737 case "$getgrnam_r_proto" in
11738 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
11739 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
11741 case "$getgrnam_r_proto" in
11742 ''|0) d_getgrnam_r=undef
11744 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
11745 * ) case "$getgrnam_r_proto" in
11746 REENTRANT_PROTO*) ;;
11747 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
11749 echo "Prototype: $try" ;;
11752 *) case "$usethreads" in
11753 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
11760 *) getgrnam_r_proto=0
11764 : see if gethostbyaddr exists
11765 set gethostbyaddr d_gethbyaddr
11768 : see if gethostbyname exists
11769 set gethostbyname d_gethbyname
11772 : see if gethostent exists
11773 set gethostent d_gethent
11776 : see how we will look up host name
11779 if set gethostname val -f d_gethname; eval $csym; $val; then
11780 echo 'gethostname() found.' >&4
11781 d_gethname="$define"
11784 if set uname val -f d_uname; eval $csym; $val; then
11787 uname() was found, but you're running xenix, and older versions of xenix
11788 have a broken uname(). If you don't really know whether your xenix is old
11789 enough to have a broken system call, use the default answer.
11794 "$define") dflt=n;;
11796 rp='Is your uname() broken?'
11799 n*) d_uname="$define"; call=uname;;
11802 echo 'uname() found.' >&4
11809 case "$d_gethname" in
11810 '') d_gethname="$undef";;
11813 '') d_uname="$undef";;
11815 case "$d_uname$d_gethname" in
11820 Every now and then someone has a $call() that lies about the hostname
11821 but can't be fixed for political or economic reasons. If you wish, I can
11822 pretend $call() isn't there and maybe compute hostname at run-time
11823 thanks to the '$phostname' command.
11826 rp="Shall I ignore $call() from now on?"
11829 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
11832 case "$phostname" in
11833 '') aphostname='';;
11834 *) case "$aphostname" in
11836 *) set X $phostname
11840 file=`./loc $file $file $pth`
11841 aphostname=`echo $file $*`
11846 case "$d_uname$d_gethname" in
11849 case "$phostname" in
11851 echo "There will be no way for $package to get your hostname." >&4;;
11853 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
11857 case "$d_phostname" in
11858 '') d_phostname="$undef";;
11861 : see if gethostbyaddr_r exists
11862 set gethostbyaddr_r d_gethostbyaddr_r
11864 case "$d_gethostbyaddr_r" in
11866 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11867 case "$d_gethostbyaddr_r_proto:$usethreads" in
11868 ":define") d_gethostbyaddr_r_proto=define
11869 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
11873 case "$d_gethostbyaddr_r_proto" in
11875 case "$gethostbyaddr_r_proto" in
11876 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
11877 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
11879 case "$gethostbyaddr_r_proto" in
11880 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
11881 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
11883 case "$gethostbyaddr_r_proto" in
11884 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
11885 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
11887 case "$gethostbyaddr_r_proto" in
11888 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
11889 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
11891 case "$gethostbyaddr_r_proto" in
11892 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
11893 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
11895 case "$gethostbyaddr_r_proto" in
11896 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
11897 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
11899 case "$gethostbyaddr_r_proto" in
11900 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
11901 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
11903 case "$gethostbyaddr_r_proto" in
11904 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
11905 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
11907 case "$gethostbyaddr_r_proto" in
11908 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
11909 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
11911 case "$gethostbyaddr_r_proto" in
11912 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
11913 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
11915 case "$gethostbyaddr_r_proto" in
11916 ''|0) d_gethostbyaddr_r=undef
11917 gethostbyaddr_r_proto=0
11918 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
11919 * ) case "$gethostbyaddr_r_proto" in
11920 REENTRANT_PROTO*) ;;
11921 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
11923 echo "Prototype: $try" ;;
11926 *) case "$usethreads" in
11927 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
11929 d_gethostbyaddr_r=undef
11930 gethostbyaddr_r_proto=0
11934 *) gethostbyaddr_r_proto=0
11938 : see if gethostbyname_r exists
11939 set gethostbyname_r d_gethostbyname_r
11941 case "$d_gethostbyname_r" in
11943 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11944 case "$d_gethostbyname_r_proto:$usethreads" in
11945 ":define") d_gethostbyname_r_proto=define
11946 set d_gethostbyname_r_proto gethostbyname_r $hdrs
11950 case "$d_gethostbyname_r_proto" in
11952 case "$gethostbyname_r_proto" in
11953 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
11954 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
11956 case "$gethostbyname_r_proto" in
11957 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
11958 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
11960 case "$gethostbyname_r_proto" in
11961 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
11962 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
11964 case "$gethostbyname_r_proto" in
11965 ''|0) d_gethostbyname_r=undef
11966 gethostbyname_r_proto=0
11967 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
11968 * ) case "$gethostbyname_r_proto" in
11969 REENTRANT_PROTO*) ;;
11970 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
11972 echo "Prototype: $try" ;;
11975 *) case "$usethreads" in
11976 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
11978 d_gethostbyname_r=undef
11979 gethostbyname_r_proto=0
11983 *) gethostbyname_r_proto=0
11987 : see if gethostent_r exists
11988 set gethostent_r d_gethostent_r
11990 case "$d_gethostent_r" in
11992 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11993 case "$d_gethostent_r_proto:$usethreads" in
11994 ":define") d_gethostent_r_proto=define
11995 set d_gethostent_r_proto gethostent_r $hdrs
11999 case "$d_gethostent_r_proto" in
12001 case "$gethostent_r_proto" in
12002 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
12003 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
12005 case "$gethostent_r_proto" in
12006 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
12007 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBIE ;;
12009 case "$gethostent_r_proto" in
12010 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
12011 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBIE ;;
12013 case "$gethostent_r_proto" in
12014 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
12015 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBI ;;
12017 case "$gethostent_r_proto" in
12018 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
12019 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBI ;;
12021 case "$gethostent_r_proto" in
12022 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
12023 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SD ;;
12025 case "$gethostent_r_proto" in
12026 ''|0) d_gethostent_r=undef
12027 gethostent_r_proto=0
12028 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
12029 * ) case "$gethostent_r_proto" in
12030 REENTRANT_PROTO*) ;;
12031 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
12033 echo "Prototype: $try" ;;
12036 *) case "$usethreads" in
12037 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
12039 d_gethostent_r=undef
12040 gethostent_r_proto=0
12044 *) gethostent_r_proto=0
12048 : see if prototypes for various gethostxxx netdb.h functions are available
12050 set d_gethostprotos gethostent $i_netdb netdb.h
12053 : see if getitimer exists
12054 set getitimer d_getitimer
12057 : see if getlogin exists
12058 set getlogin d_getlogin
12061 : see if getlogin_r exists
12062 set getlogin_r d_getlogin_r
12064 case "$d_getlogin_r" in
12066 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
12067 case "$d_getlogin_r_proto:$usethreads" in
12068 ":define") d_getlogin_r_proto=define
12069 set d_getlogin_r_proto getlogin_r $hdrs
12073 case "$d_getlogin_r_proto" in
12075 case "$getlogin_r_proto" in
12076 ''|0) try='int getlogin_r(char*, size_t);'
12077 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BW ;;
12079 case "$getlogin_r_proto" in
12080 ''|0) try='int getlogin_r(char*, int);'
12081 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BI ;;
12083 case "$getlogin_r_proto" in
12084 ''|0) try='char* getlogin_r(char*, size_t);'
12085 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BW ;;
12087 case "$getlogin_r_proto" in
12088 ''|0) try='char* getlogin_r(char*, int);'
12089 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BI ;;
12091 case "$getlogin_r_proto" in
12092 ''|0) d_getlogin_r=undef
12094 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
12095 * ) case "$getlogin_r_proto" in
12096 REENTRANT_PROTO*) ;;
12097 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
12099 echo "Prototype: $try" ;;
12102 *) case "$usethreads" in
12103 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
12110 *) getlogin_r_proto=0
12114 : see if getmnt exists
12115 set getmnt d_getmnt
12118 : see if getmntent exists
12119 set getmntent d_getmntent
12122 : see if getnetbyaddr exists
12123 set getnetbyaddr d_getnbyaddr
12126 : see if getnetbyname exists
12127 set getnetbyname d_getnbyname
12130 : see if getnetent exists
12131 set getnetent d_getnent
12134 : see if getnetbyaddr_r exists
12135 set getnetbyaddr_r d_getnetbyaddr_r
12137 case "$d_getnetbyaddr_r" in
12139 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12140 case "$d_getnetbyaddr_r_proto:$usethreads" in
12141 ":define") d_getnetbyaddr_r_proto=define
12142 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
12146 case "$d_getnetbyaddr_r_proto" in
12148 case "$getnetbyaddr_r_proto" in
12149 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
12150 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
12152 case "$getnetbyaddr_r_proto" in
12153 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
12154 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
12156 case "$getnetbyaddr_r_proto" in
12157 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
12158 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
12160 case "$getnetbyaddr_r_proto" in
12161 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
12162 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
12164 case "$getnetbyaddr_r_proto" in
12165 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
12166 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
12168 case "$getnetbyaddr_r_proto" in
12169 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
12170 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
12172 case "$getnetbyaddr_r_proto" in
12173 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
12174 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
12176 case "$getnetbyaddr_r_proto" in
12177 ''|0) d_getnetbyaddr_r=undef
12178 getnetbyaddr_r_proto=0
12179 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
12180 * ) case "$getnetbyaddr_r_proto" in
12181 REENTRANT_PROTO*) ;;
12182 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
12184 echo "Prototype: $try" ;;
12187 *) case "$usethreads" in
12188 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
12190 d_getnetbyaddr_r=undef
12191 getnetbyaddr_r_proto=0
12195 *) getnetbyaddr_r_proto=0
12199 : see if getnetbyname_r exists
12200 set getnetbyname_r d_getnetbyname_r
12202 case "$d_getnetbyname_r" in
12204 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12205 case "$d_getnetbyname_r_proto:$usethreads" in
12206 ":define") d_getnetbyname_r_proto=define
12207 set d_getnetbyname_r_proto getnetbyname_r $hdrs
12211 case "$d_getnetbyname_r_proto" in
12213 case "$getnetbyname_r_proto" in
12214 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
12215 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
12217 case "$getnetbyname_r_proto" in
12218 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
12219 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
12221 case "$getnetbyname_r_proto" in
12222 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
12223 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
12225 case "$getnetbyname_r_proto" in
12226 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
12227 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
12229 case "$getnetbyname_r_proto" in
12230 ''|0) d_getnetbyname_r=undef
12231 getnetbyname_r_proto=0
12232 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
12233 * ) case "$getnetbyname_r_proto" in
12234 REENTRANT_PROTO*) ;;
12235 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
12237 echo "Prototype: $try" ;;
12240 *) case "$usethreads" in
12241 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
12243 d_getnetbyname_r=undef
12244 getnetbyname_r_proto=0
12248 *) getnetbyname_r_proto=0
12252 : see if getnetent_r exists
12253 set getnetent_r d_getnetent_r
12255 case "$d_getnetent_r" in
12257 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12258 case "$d_getnetent_r_proto:$usethreads" in
12259 ":define") d_getnetent_r_proto=define
12260 set d_getnetent_r_proto getnetent_r $hdrs
12264 case "$d_getnetent_r_proto" in
12266 case "$getnetent_r_proto" in
12267 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
12268 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
12270 case "$getnetent_r_proto" in
12271 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
12272 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBIE ;;
12274 case "$getnetent_r_proto" in
12275 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
12276 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBIE ;;
12278 case "$getnetent_r_proto" in
12279 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
12280 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBI ;;
12282 case "$getnetent_r_proto" in
12283 ''|0) try='int getnetent_r(struct netent*, char*, int);'
12284 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBI ;;
12286 case "$getnetent_r_proto" in
12287 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
12288 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SD ;;
12290 case "$getnetent_r_proto" in
12291 ''|0) d_getnetent_r=undef
12292 getnetent_r_proto=0
12293 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
12294 * ) case "$getnetent_r_proto" in
12295 REENTRANT_PROTO*) ;;
12296 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
12298 echo "Prototype: $try" ;;
12301 *) case "$usethreads" in
12302 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
12304 d_getnetent_r=undef
12305 getnetent_r_proto=0
12309 *) getnetent_r_proto=0
12313 : see if prototypes for various getnetxxx netdb.h functions are available
12315 set d_getnetprotos getnetent $i_netdb netdb.h
12318 : see if getpagesize exists
12319 set getpagesize d_getpagsz
12323 : see if getprotobyname exists
12324 set getprotobyname d_getpbyname
12327 : see if getprotobynumber exists
12328 set getprotobynumber d_getpbynumber
12331 : see if getprotoent exists
12332 set getprotoent d_getpent
12335 : see if getpgid exists
12336 set getpgid d_getpgid
12339 : see if getpgrp2 exists
12340 set getpgrp2 d_getpgrp2
12343 : see if getppid exists
12344 set getppid d_getppid
12347 : see if getpriority exists
12348 set getpriority d_getprior
12351 : see if getprotobyname_r exists
12352 set getprotobyname_r d_getprotobyname_r
12354 case "$d_getprotobyname_r" in
12356 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12357 case "$d_getprotobyname_r_proto:$usethreads" in
12358 ":define") d_getprotobyname_r_proto=define
12359 set d_getprotobyname_r_proto getprotobyname_r $hdrs
12363 case "$d_getprotobyname_r_proto" in
12365 case "$getprotobyname_r_proto" in
12366 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
12367 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
12369 case "$getprotobyname_r_proto" in
12370 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
12371 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
12373 case "$getprotobyname_r_proto" in
12374 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
12375 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
12377 case "$getprotobyname_r_proto" in
12378 ''|0) d_getprotobyname_r=undef
12379 getprotobyname_r_proto=0
12380 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
12381 * ) case "$getprotobyname_r_proto" in
12382 REENTRANT_PROTO*) ;;
12383 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
12385 echo "Prototype: $try" ;;
12388 *) case "$usethreads" in
12389 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
12391 d_getprotobyname_r=undef
12392 getprotobyname_r_proto=0
12396 *) getprotobyname_r_proto=0
12400 : see if getprotobynumber_r exists
12401 set getprotobynumber_r d_getprotobynumber_r
12403 case "$d_getprotobynumber_r" in
12405 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12406 case "$d_getprotobynumber_r_proto:$usethreads" in
12407 ":define") d_getprotobynumber_r_proto=define
12408 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
12412 case "$d_getprotobynumber_r_proto" in
12414 case "$getprotobynumber_r_proto" in
12415 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
12416 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
12418 case "$getprotobynumber_r_proto" in
12419 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
12420 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
12422 case "$getprotobynumber_r_proto" in
12423 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
12424 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
12426 case "$getprotobynumber_r_proto" in
12427 ''|0) d_getprotobynumber_r=undef
12428 getprotobynumber_r_proto=0
12429 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
12430 * ) case "$getprotobynumber_r_proto" in
12431 REENTRANT_PROTO*) ;;
12432 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
12434 echo "Prototype: $try" ;;
12437 *) case "$usethreads" in
12438 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
12440 d_getprotobynumber_r=undef
12441 getprotobynumber_r_proto=0
12445 *) getprotobynumber_r_proto=0
12449 : see if getprotoent_r exists
12450 set getprotoent_r d_getprotoent_r
12452 case "$d_getprotoent_r" in
12454 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12455 case "$d_getprotoent_r_proto:$usethreads" in
12456 ":define") d_getprotoent_r_proto=define
12457 set d_getprotoent_r_proto getprotoent_r $hdrs
12461 case "$d_getprotoent_r_proto" in
12463 case "$getprotoent_r_proto" in
12464 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
12465 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
12467 case "$getprotoent_r_proto" in
12468 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
12469 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBI ;;
12471 case "$getprotoent_r_proto" in
12472 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
12473 ./protochk "extern $try" $hdrs && getprotoent_r_proto=S_SBI ;;
12475 case "$getprotoent_r_proto" in
12476 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
12477 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SD ;;
12479 case "$getprotoent_r_proto" in
12480 ''|0) d_getprotoent_r=undef
12481 getprotoent_r_proto=0
12482 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
12483 * ) case "$getprotoent_r_proto" in
12484 REENTRANT_PROTO*) ;;
12485 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
12487 echo "Prototype: $try" ;;
12490 *) case "$usethreads" in
12491 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
12493 d_getprotoent_r=undef
12494 getprotoent_r_proto=0
12498 *) getprotoent_r_proto=0
12502 : see if prototypes for various getprotoxxx netdb.h functions are available
12504 set d_getprotoprotos getprotoent $i_netdb netdb.h
12507 : see if getprpwnam exists
12508 set getprpwnam d_getprpwnam
12511 : see if getpwent exists
12512 set getpwent d_getpwent
12515 : see if getpwent_r exists
12516 set getpwent_r d_getpwent_r
12518 case "$d_getpwent_r" in
12520 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12521 case "$d_getpwent_r_proto:$usethreads" in
12522 ":define") d_getpwent_r_proto=define
12523 set d_getpwent_r_proto getpwent_r $hdrs
12527 case "$d_getpwent_r_proto" in
12529 case "$getpwent_r_proto" in
12530 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
12531 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBWR ;;
12533 case "$getpwent_r_proto" in
12534 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
12535 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIR ;;
12537 case "$getpwent_r_proto" in
12538 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
12539 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBW ;;
12541 case "$getpwent_r_proto" in
12542 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
12543 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBI ;;
12545 case "$getpwent_r_proto" in
12546 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
12547 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBI ;;
12549 case "$getpwent_r_proto" in
12550 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
12551 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIH ;;
12553 case "$getpwent_r_proto" in
12554 ''|0) d_getpwent_r=undef
12556 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
12557 * ) case "$getpwent_r_proto" in
12558 REENTRANT_PROTO*) ;;
12559 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
12561 echo "Prototype: $try" ;;
12564 *) case "$usethreads" in
12565 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
12572 *) getpwent_r_proto=0
12576 : see if getpwnam_r exists
12577 set getpwnam_r d_getpwnam_r
12579 case "$d_getpwnam_r" in
12581 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12582 case "$d_getpwnam_r_proto:$usethreads" in
12583 ":define") d_getpwnam_r_proto=define
12584 set d_getpwnam_r_proto getpwnam_r $hdrs
12588 case "$d_getpwnam_r_proto" in
12590 case "$getpwnam_r_proto" in
12591 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
12592 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
12594 case "$getpwnam_r_proto" in
12595 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
12596 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
12598 case "$getpwnam_r_proto" in
12599 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
12600 ./protochk "extern $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
12602 case "$getpwnam_r_proto" in
12603 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
12604 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
12606 case "$getpwnam_r_proto" in
12607 ''|0) d_getpwnam_r=undef
12609 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
12610 * ) case "$getpwnam_r_proto" in
12611 REENTRANT_PROTO*) ;;
12612 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
12614 echo "Prototype: $try" ;;
12617 *) case "$usethreads" in
12618 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
12625 *) getpwnam_r_proto=0
12629 : see if getpwuid_r exists
12630 set getpwuid_r d_getpwuid_r
12632 case "$d_getpwuid_r" in
12634 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12635 case "$d_getpwuid_r_proto:$usethreads" in
12636 ":define") d_getpwuid_r_proto=define
12637 set d_getpwuid_r_proto getpwuid_r $hdrs
12641 case "$d_getpwuid_r_proto" in
12643 case "$getpwuid_r_proto" in
12644 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
12645 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
12647 case "$getpwuid_r_proto" in
12648 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
12649 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
12651 case "$getpwuid_r_proto" in
12652 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
12653 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
12655 case "$getpwuid_r_proto" in
12656 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
12657 ./protochk "extern $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
12659 case "$getpwuid_r_proto" in
12660 ''|0) d_getpwuid_r=undef
12662 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
12663 * ) case "$getpwuid_r_proto" in
12664 REENTRANT_PROTO*) ;;
12665 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
12667 echo "Prototype: $try" ;;
12670 *) case "$usethreads" in
12671 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
12678 *) getpwuid_r_proto=0
12683 : see if getservbyname exists
12684 set getservbyname d_getsbyname
12687 : see if getservbyport exists
12688 set getservbyport d_getsbyport
12691 : see if getservent exists
12692 set getservent d_getsent
12695 : see if getservbyname_r exists
12696 set getservbyname_r d_getservbyname_r
12698 case "$d_getservbyname_r" in
12700 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12701 case "$d_getservbyname_r_proto:$usethreads" in
12702 ":define") d_getservbyname_r_proto=define
12703 set d_getservbyname_r_proto getservbyname_r $hdrs
12707 case "$d_getservbyname_r_proto" in
12709 case "$getservbyname_r_proto" in
12710 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
12711 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
12713 case "$getservbyname_r_proto" in
12714 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
12715 ./protochk "extern $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
12717 case "$getservbyname_r_proto" in
12718 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
12719 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
12721 case "$getservbyname_r_proto" in
12722 ''|0) d_getservbyname_r=undef
12723 getservbyname_r_proto=0
12724 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
12725 * ) case "$getservbyname_r_proto" in
12726 REENTRANT_PROTO*) ;;
12727 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
12729 echo "Prototype: $try" ;;
12732 *) case "$usethreads" in
12733 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
12735 d_getservbyname_r=undef
12736 getservbyname_r_proto=0
12740 *) getservbyname_r_proto=0
12744 : see if getservbyport_r exists
12745 set getservbyport_r d_getservbyport_r
12747 case "$d_getservbyport_r" in
12749 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12750 case "$d_getservbyport_r_proto:$usethreads" in
12751 ":define") d_getservbyport_r_proto=define
12752 set d_getservbyport_r_proto getservbyport_r $hdrs
12756 case "$d_getservbyport_r_proto" in
12758 case "$getservbyport_r_proto" in
12759 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
12760 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
12762 case "$getservbyport_r_proto" in
12763 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
12764 ./protochk "extern $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
12766 case "$getservbyport_r_proto" in
12767 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
12768 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
12770 case "$getservbyport_r_proto" in
12771 ''|0) d_getservbyport_r=undef
12772 getservbyport_r_proto=0
12773 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
12774 * ) case "$getservbyport_r_proto" in
12775 REENTRANT_PROTO*) ;;
12776 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
12778 echo "Prototype: $try" ;;
12781 *) case "$usethreads" in
12782 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
12784 d_getservbyport_r=undef
12785 getservbyport_r_proto=0
12789 *) getservbyport_r_proto=0
12793 : see if getservent_r exists
12794 set getservent_r d_getservent_r
12796 case "$d_getservent_r" in
12798 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12799 case "$d_getservent_r_proto:$usethreads" in
12800 ":define") d_getservent_r_proto=define
12801 set d_getservent_r_proto getservent_r $hdrs
12805 case "$d_getservent_r_proto" in
12807 case "$getservent_r_proto" in
12808 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
12809 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBWR ;;
12811 case "$getservent_r_proto" in
12812 ''|0) try='int getservent_r(struct servent*, char*, int);'
12813 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBI ;;
12815 case "$getservent_r_proto" in
12816 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
12817 ./protochk "extern $try" $hdrs && getservent_r_proto=S_SBI ;;
12819 case "$getservent_r_proto" in
12820 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
12821 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SD ;;
12823 case "$getservent_r_proto" in
12824 ''|0) d_getservent_r=undef
12825 getservent_r_proto=0
12826 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
12827 * ) case "$getservent_r_proto" in
12828 REENTRANT_PROTO*) ;;
12829 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
12831 echo "Prototype: $try" ;;
12834 *) case "$usethreads" in
12835 define) echo "getservent_r has no prototype, not using it." >&4 ;;
12837 d_getservent_r=undef
12838 getservent_r_proto=0
12842 *) getservent_r_proto=0
12846 : see if prototypes for various getservxxx netdb.h functions are available
12848 set d_getservprotos getservent $i_netdb netdb.h
12851 : see if getspnam exists
12852 set getspnam d_getspnam
12855 : see if this is a shadow.h system
12856 set shadow.h i_shadow
12859 : see if getspnam_r exists
12860 set getspnam_r d_getspnam_r
12862 case "$d_getspnam_r" in
12864 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
12865 case "$d_getspnam_r_proto:$usethreads" in
12866 ":define") d_getspnam_r_proto=define
12867 set d_getspnam_r_proto getspnam_r $hdrs
12871 case "$d_getspnam_r_proto" in
12873 case "$getspnam_r_proto" in
12874 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
12875 ./protochk "extern $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
12877 case "$getspnam_r_proto" in
12878 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
12879 ./protochk "extern $try" $hdrs && getspnam_r_proto=S_CSBI ;;
12881 case "$getspnam_r_proto" in
12882 ''|0) d_getspnam_r=undef
12884 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
12885 * ) case "$getspnam_r_proto" in
12886 REENTRANT_PROTO*) ;;
12887 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
12889 echo "Prototype: $try" ;;
12892 *) case "$usethreads" in
12893 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
12900 *) getspnam_r_proto=0
12904 : see if gettimeofday or ftime exists
12905 set gettimeofday d_gettimeod
12907 case "$d_gettimeod" in
12913 val="$undef"; set d_ftime; eval $setvar
12916 case "$d_gettimeod$d_ftime" in
12919 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
12923 : see if gmtime_r exists
12924 set gmtime_r d_gmtime_r
12926 case "$d_gmtime_r" in
12928 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
12929 case "$d_gmtime_r_proto:$usethreads" in
12930 ":define") d_gmtime_r_proto=define
12931 set d_gmtime_r_proto gmtime_r $hdrs
12935 case "$d_gmtime_r_proto" in
12937 case "$gmtime_r_proto" in
12938 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
12939 ./protochk "extern $try" $hdrs && gmtime_r_proto=S_TS ;;
12941 case "$gmtime_r_proto" in
12942 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
12943 ./protochk "extern $try" $hdrs && gmtime_r_proto=I_TS ;;
12945 case "$gmtime_r_proto" in
12946 ''|0) d_gmtime_r=undef
12948 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
12949 * ) case "$gmtime_r_proto" in
12950 REENTRANT_PROTO*) ;;
12951 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
12953 echo "Prototype: $try" ;;
12956 *) case "$usethreads" in
12957 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
12964 *) gmtime_r_proto=0
12968 : see if hasmntopt exists
12969 set hasmntopt d_hasmntopt
12972 : see if this is a netinet/in.h or sys/in.h system
12973 set netinet/in.h i_niin sys/in.h i_sysin
12976 : see if arpa/inet.h has to be included
12977 set arpa/inet.h i_arpainet
12980 : see if htonl --and friends-- exists
12985 : Maybe they are macros.
12988 $cat >htonl.c <<EOM
12990 #include <sys/types.h>
12991 #$i_niin I_NETINET_IN
12993 #$i_arpainet I_ARPA_INET
12994 #ifdef I_NETINET_IN
12995 #include <netinet/in.h>
12998 #include <sys/in.h>
13001 #include <arpa/inet.h>
13004 printf("Defined as a macro.");
13007 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
13008 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
13010 echo "But it seems to be defined as a macro." >&4
13020 if set index val -f; eval $csym; $val; then
13021 if set strchr val -f d_strchr; eval $csym; $val; then
13022 if $contains strchr "$strings" >/dev/null 2>&1 ; then
13025 echo "strchr() found." >&4
13029 echo "index() found." >&4
13034 echo "index() found." >&4
13037 if set strchr val -f d_strchr; eval $csym; $val; then
13040 echo "strchr() found." >&4
13042 echo "No index() or strchr() found!" >&4
13047 set d_strchr; eval $setvar
13049 set d_index; eval $setvar
13051 : check whether inet_aton exists
13052 set inet_aton d_inetaton
13057 $cat >isascii.c <<'EOCP'
13069 if eval $compile; then
13070 echo "isascii() found." >&4
13073 echo "isascii() NOT found." >&4
13080 : see if isfinite exists
13081 set isfinite d_isfinite
13084 : see if isinf exists
13088 : see if isnan exists
13092 : see if isnanl exists
13093 set isnanl d_isnanl
13096 : see if killpg exists
13097 set killpg d_killpg
13100 : see if lchown exists
13102 $cat > try.c <<'EOCP'
13103 /* System header to define __stub macros and hopefully few prototypes,
13104 which can conflict with char lchown(); below. */
13105 #include <assert.h>
13106 /* Override any gcc2 internal prototype to avoid an error. */
13107 /* We use char because int might match the return type of a gcc2
13108 builtin and then its argument prototype would still apply. */
13111 /* The GNU C library defines this for functions which it implements
13112 to always fail with ENOSYS. Some functions are actually named
13113 something starting with __ and the normal name is an alias. */
13114 #if defined (__stub_lchown) || defined (__stub___lchown)
13122 if eval $compile; then
13123 $echo "lchown() found." >&4
13126 $echo "lchown() NOT found." >&4
13132 : See if number of significant digits in a double precision number is known
13134 $cat >ldbl_dig.c <<EOM
13135 #$i_limits I_LIMITS
13138 #include <limits.h>
13144 printf("Contains LDBL_DIG");
13147 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
13148 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
13149 echo "LDBL_DIG found." >&4
13152 echo "LDBL_DIG NOT found." >&4
13159 : see if link exists
13163 : see if localtime_r exists
13164 set localtime_r d_localtime_r
13166 case "$d_localtime_r" in
13168 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
13169 case "$d_localtime_r_proto:$usethreads" in
13170 ":define") d_localtime_r_proto=define
13171 set d_localtime_r_proto localtime_r $hdrs
13175 case "$d_localtime_r_proto" in
13177 case "$localtime_r_proto" in
13178 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
13179 ./protochk "extern $try" $hdrs && localtime_r_proto=S_TS ;;
13181 case "$localtime_r_proto" in
13182 ''|0) try='int localtime_r(const time_t*, struct tm*);'
13183 ./protochk "extern $try" $hdrs && localtime_r_proto=I_TS ;;
13185 case "$localtime_r_proto" in
13186 ''|0) d_localtime_r=undef
13187 localtime_r_proto=0
13188 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
13189 * ) case "$localtime_r_proto" in
13190 REENTRANT_PROTO*) ;;
13191 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
13193 echo "Prototype: $try" ;;
13196 *) case "$usethreads" in
13197 define) echo "localtime_r has no prototype, not using it." >&4 ;;
13199 d_localtime_r=undef
13200 localtime_r_proto=0
13204 *) localtime_r_proto=0
13208 : see if localeconv exists
13209 set localeconv d_locconv
13212 : see if lockf exists
13216 : see if prototype for lseek is available
13218 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
13221 : see if lstat exists
13225 : see if madvise exists
13226 set madvise d_madvise
13229 : see if mblen exists
13233 : see if mbstowcs exists
13234 set mbstowcs d_mbstowcs
13237 : see if mbtowc exists
13238 set mbtowc d_mbtowc
13241 : see if memchr exists
13242 set memchr d_memchr
13245 : see if memcmp exists
13246 set memcmp d_memcmp
13249 : see if memcpy exists
13250 set memcpy d_memcpy
13253 : see if memmove exists
13254 set memmove d_memmove
13257 : see if memset exists
13258 set memset d_memset
13261 : see if mkdir exists
13265 : see if mkdtemp exists
13266 set mkdtemp d_mkdtemp
13269 : see if mkfifo exists
13270 set mkfifo d_mkfifo
13273 : see if mkstemp exists
13274 set mkstemp d_mkstemp
13277 : see if mkstemps exists
13278 set mkstemps d_mkstemps
13281 : see if mktime exists
13282 set mktime d_mktime
13285 : see if this is a sys/mman.h system
13286 set sys/mman.h i_sysmman
13289 : see if mmap exists
13292 : see what shmat returns
13293 : default to something harmless
13295 case "$i_sysmman$d_mmap" in
13297 $cat >mmap.c <<'END'
13298 #include <sys/mman.h>
13301 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
13306 echo "and it returns ($mmaptype)." >&4
13312 : see if mprotect exists
13313 set mprotect d_mprotect
13316 : see if msgctl exists
13317 set msgctl d_msgctl
13320 : see if msgget exists
13321 set msgget d_msgget
13324 : see if msgsnd exists
13325 set msgsnd d_msgsnd
13328 : see if msgrcv exists
13329 set msgrcv d_msgrcv
13332 : see how much of the 'msg*(2)' library is present.
13335 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
13336 *"$undef"*) h_msg=false;;
13340 case "`ipcs 2>&1`" in
13341 "SVID messages"*"not configured"*)
13342 echo "Your $osname does not have the msg*(2) configured." >&4
13345 set msgctl d_msgctl
13347 set msgget d_msgget
13349 set msgsnd d_msgsnd
13351 set msgrcv d_msgrcv
13357 : we could also check for sys/ipc.h ...
13358 if $h_msg && $test `./findhdr sys/msg.h`; then
13359 echo "You have the full msg*(2) library." >&4
13362 echo "You don't have the full msg*(2) library." >&4
13370 echo "Checking to see if your system supports struct msghdr..." >&4
13371 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
13373 case "$d_msghdr_s" in
13374 "$define") echo "Yes, it does." ;;
13375 *) echo "No, it doesn't." ;;
13379 : see if msync exists
13383 : see if munmap exists
13384 set munmap d_munmap
13387 : see if nice exists
13391 : see if this is a langinfo.h system
13392 set langinfo.h i_langinfo
13395 : see if nl_langinfo exists
13396 set nl_langinfo d_nl_langinfo
13399 : check for length of character
13401 case "$charsize" in
13403 echo "Checking to see how big your characters are (hey, you never know)..." >&4
13404 $cat >try.c <<'EOCP'
13408 printf("%d\n", (int)sizeof(char));
13413 if eval $compile_ok; then
13417 echo "(I can't seem to compile the test program. Guessing...)"
13424 rp="What is the size of a character (in bytes)?"
13429 : check for volatile keyword
13431 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
13432 $cat >try.c <<'EOCP'
13435 typedef struct _goo_struct goo_struct;
13436 goo_struct * volatile goo = ((goo_struct *)0);
13437 struct _goo_struct {
13442 typedef unsigned short foo_t;
13443 char *volatile foo;
13445 volatile foo_t blech;
13449 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
13451 echo "Yup, it does."
13454 echo "Nope, it doesn't."
13462 $echo "Choosing the C types to be used for Perl's internal types..." >&4
13464 case "$use64bitint:$d_quad:$quadtype" in
13467 uvtype="$uquadtype"
13472 uvtype="unsigned long"
13478 case "$uselongdouble:$d_longdbl" in
13480 nvtype="long double"
13481 nvsize=$longdblsize
13488 $echo "(IV will be "$ivtype", $ivsize bytes)"
13489 $echo "(UV will be "$uvtype", $uvsize bytes)"
13490 $echo "(NV will be "$nvtype", $nvsize bytes)"
13493 #$i_inttypes I_INTTYPES
13495 #include <inttypes.h>
13500 int8_t i = INT8_MAX;
13501 uint8_t u = UINT8_MAX;
13502 printf("int8_t\n");
13505 int16_t i = INT16_MAX;
13506 uint16_t i = UINT16_MAX;
13507 printf("int16_t\n");
13510 int32_t i = INT32_MAX;
13511 uint32_t u = UINT32_MAX;
13512 printf("int32_t\n");
13518 '') case "$charsize" in
13520 u8type="unsigned char"
13529 if eval $compile; then
13530 case "`$run ./try`" in
13531 int8_t) i8type=int8_t
13541 '') if $test $charsize -ge 1; then
13543 u8type="unsigned char"
13551 '') case "$shortsize" in
13553 u16type="unsigned short"
13561 '') set try -DINT16
13562 if eval $compile; then
13563 case "`$run ./try`" in
13575 '') if $test $shortsize -ge 2; then
13577 u16type="unsigned short"
13585 '') case "$longsize" in
13587 u32type="unsigned long"
13591 *) case "$intsize" in
13593 u32type="unsigned int"
13603 '') set try -DINT32
13604 if eval $compile; then
13605 case "`$run ./try`" in
13617 '') if $test $intsize -ge 4; then
13619 u32type="unsigned int"
13627 '') case "$d_quad:$quadtype" in
13629 i64type="$quadtype"
13630 u64type="$uquadtype"
13638 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
13639 : volatile so that the compiler has to store it out to memory.
13640 if test X"$d_volatile" = X"$define"; then
13645 #include <sys/types.h>
13646 #include <signal.h>
13648 $volatile int bletched = 0;
13649 $signal_t blech(s) int s; { bletched = 1; }
13654 int n = 8 * $uvsize;
13657 signal(SIGFPE, blech);
13660 for (i = 0; i < n; i++) {
13661 u = u << 1 | ($uvtype)1;
13663 if (($uvtype)d != u)
13667 d = ($nvtype)(u - 1);
13668 if (($uvtype)d != (u - 1))
13676 printf("%d\n", ((i == n) ? -n : i));
13682 d_nv_preserves_uv="$undef"
13683 if eval $compile; then
13684 nv_preserves_uv_bits="`$run ./try`"
13686 case "$nv_preserves_uv_bits" in
13688 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
13689 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
13690 d_nv_preserves_uv="$define"
13692 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
13693 d_nv_preserves_uv="$undef" ;;
13694 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
13695 nv_preserves_uv_bits="$undef" ;;
13701 : check for off64_t
13703 echo "Checking to see if you have off64_t..." >&4
13705 #include <sys/types.h>
13706 #include <unistd.h>
13707 int main() { off64_t x = 7; }
13710 if eval $compile; then
13712 echo "You have off64_t."
13715 echo "You do not have off64_t."
13716 case "$lseeksize" in
13717 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
13724 : how to create joinable pthreads
13725 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
13727 echo "Checking what constant to use for creating joinable pthreads..." >&4
13728 $cat >try.c <<'EOCP'
13729 #include <pthread.h>
13731 int detachstate = JOINABLE;
13734 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
13735 if eval $compile; then
13736 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
13737 val="$undef" # Yes, undef.
13738 set d_old_pthread_create_joinable
13741 set old_pthread_create_joinable
13744 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
13745 if eval $compile; then
13746 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
13748 set d_old_pthread_create_joinable
13750 val=PTHREAD_CREATE_UNDETACHED
13751 set old_pthread_create_joinable
13754 set try -DJOINABLE=__UNDETACHED
13755 if eval $compile; then
13756 echo "You seem to use __UNDETACHED." >&4
13758 set d_old_pthread_create_joinable
13761 set old_pthread_create_joinable
13764 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
13766 set d_old_pthread_create_joinable
13769 set old_pthread_create_joinable
13776 d_old_pthread_create_joinable="$undef"
13777 old_pthread_create_joinable=""
13780 : see if pause exists
13784 : see if pipe exists
13788 : see if poll exists
13792 : see if readlink exists
13793 set readlink d_readlink
13799 case "$d_readlink" in
13801 if $issymlink /proc/self/exe ; then
13802 $ls -l /proc/self/exe > reflect
13803 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13804 echo "You have Linux-like /proc/self/exe."
13805 procselfexe='"/proc/self/exe"'
13809 if $issymlink /proc/curproc/file ; then
13810 $ls -l /proc/curproc/file > reflect
13811 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13812 echo "You have BSD-like /proc/curproc/file."
13813 procselfexe='"/proc/curproc/file"'
13823 : see whether the pthread_atfork exists
13825 #include <pthread.h>
13828 #ifdef PTHREAD_ATFORK
13829 pthread_atfork(NULL,NULL,NULL);
13834 : see if pthread_atfork exists
13835 set try -DPTHREAD_ATFORK
13836 if eval $compile; then
13841 case "$usethreads" in
13844 $define) echo 'pthread_atfork found.' >&4 ;;
13845 *) echo 'pthread_atfork NOT found.' >&4 ;;
13848 set d_pthread_atfork
13852 : see whether the various POSIXish _yields exist
13854 #include <pthread.h>
13860 #ifdef PTHREAD_YIELD
13863 #ifdef PTHREAD_YIELD_NULL
13864 pthread_yield(NULL);
13870 : see if sched_yield exists
13871 set try -DSCHED_YIELD
13872 if eval $compile; then
13874 sched_yield='sched_yield()'
13878 case "$usethreads" in
13881 $define) echo 'sched_yield() found.' >&4 ;;
13882 *) echo 'sched_yield() NOT found.' >&4 ;;
13888 : see if pthread_yield exists
13889 set try -DPTHREAD_YIELD
13890 if eval $compile; then
13892 case "$sched_yield" in
13893 '') sched_yield='pthread_yield()' ;;
13896 set try -DPTHREAD_YIELD_NULL
13897 if eval $compile; then
13899 case "$sched_yield" in
13900 '') sched_yield='pthread_yield(NULL)' ;;
13906 case "$usethreads" in
13909 $define) echo 'pthread_yield() found.' >&4 ;;
13910 *) echo 'pthread_yield() NOT found.' >&4 ;;
13914 set d_pthread_yield
13917 case "$sched_yield" in
13918 '') sched_yield=undef ;;
13923 : see if random_r exists
13924 set random_r d_random_r
13926 case "$d_random_r" in
13928 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
13929 case "$d_random_r_proto:$usethreads" in
13930 ":define") d_random_r_proto=define
13931 set d_random_r_proto random_r $hdrs
13935 case "$d_random_r_proto" in
13937 case "$random_r_proto" in
13938 ''|0) try='int random_r(int*, struct random_data*);'
13939 ./protochk "extern $try" $hdrs && random_r_proto=I_TS ;;
13941 case "$random_r_proto" in
13942 ''|0) d_random_r=undef
13944 echo "Disabling random_r, cannot determine prototype." >&4 ;;
13945 * ) case "$random_r_proto" in
13946 REENTRANT_PROTO*) ;;
13947 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
13949 echo "Prototype: $try" ;;
13952 *) case "$usethreads" in
13953 define) echo "random_r has no prototype, not using it." >&4 ;;
13960 *) random_r_proto=0
13964 : see if readdir and friends exist
13965 set readdir d_readdir
13967 set seekdir d_seekdir
13969 set telldir d_telldir
13971 set rewinddir d_rewinddir
13974 : see if readdir64_r exists
13975 set readdir64_r d_readdir64_r
13977 case "$d_readdir64_r" in
13979 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
13980 case "$d_readdir64_r_proto:$usethreads" in
13981 ":define") d_readdir64_r_proto=define
13982 set d_readdir64_r_proto readdir64_r $hdrs
13986 case "$d_readdir64_r_proto" in
13988 case "$readdir64_r_proto" in
13989 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
13990 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TSR ;;
13992 case "$readdir64_r_proto" in
13993 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
13994 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TS ;;
13996 case "$readdir64_r_proto" in
13997 ''|0) d_readdir64_r=undef
13998 readdir64_r_proto=0
13999 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
14000 * ) case "$readdir64_r_proto" in
14001 REENTRANT_PROTO*) ;;
14002 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
14004 echo "Prototype: $try" ;;
14007 *) case "$usethreads" in
14008 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
14010 d_readdir64_r=undef
14011 readdir64_r_proto=0
14015 *) readdir64_r_proto=0
14019 : see if readdir_r exists
14020 set readdir_r d_readdir_r
14022 case "$d_readdir_r" in
14024 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
14025 case "$d_readdir_r_proto:$usethreads" in
14026 ":define") d_readdir_r_proto=define
14027 set d_readdir_r_proto readdir_r $hdrs
14031 case "$d_readdir_r_proto" in
14033 case "$readdir_r_proto" in
14034 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
14035 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TSR ;;
14037 case "$readdir_r_proto" in
14038 ''|0) try='int readdir_r(DIR*, struct dirent*);'
14039 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TS ;;
14041 case "$readdir_r_proto" in
14042 ''|0) d_readdir_r=undef
14044 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
14045 * ) case "$readdir_r_proto" in
14046 REENTRANT_PROTO*) ;;
14047 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
14049 echo "Prototype: $try" ;;
14052 *) case "$usethreads" in
14053 define) echo "readdir_r has no prototype, not using it." >&4 ;;
14060 *) readdir_r_proto=0
14064 : see if readv exists
14068 : see if recvmsg exists
14069 set recvmsg d_recvmsg
14072 : see if rename exists
14073 set rename d_rename
14076 : see if rmdir exists
14080 : see if memory.h is available.
14085 : See if it conflicts with string.h
14091 $cppstdin $cppflags $cppminus < $strings > mem.h
14092 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
14094 echo "We won't be including <memory.h>."
14104 : can bcopy handle overlapping blocks?
14107 case "$d_memmove" in
14108 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
14109 *) case "$d_bcopy" in
14111 echo "Checking to see if bcopy() can do overlapping copies..." >&4
14113 #$i_memory I_MEMORY
14114 #$i_stdlib I_STDLIB
14115 #$i_string I_STRING
14116 #$i_unistd I_UNISTD
14118 $cat >>try.c <<'EOCP'
14121 # include <memory.h>
14124 # include <stdlib.h>
14127 # include <string.h>
14129 # include <strings.h>
14132 # include <unistd.h> /* Needed for NetBSD */
14136 char buf[128], abc[128];
14142 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14143 try to store the string in read-only memory. */
14144 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
14146 for (align = 7; align >= 0; align--) {
14147 for (len = 36; len; len--) {
14149 bcopy(abc, b, len);
14150 for (off = 1; off <= len; off++) {
14151 bcopy(b, b+off, len);
14152 bcopy(b+off, b, len);
14153 if (bcmp(b, abc, len))
14162 if eval $compile_ok; then
14163 if ./try 2>/dev/null; then
14164 echo "Yes, it can."
14167 echo "It can't, sorry."
14170 echo "(I can't compile the test program, so we'll assume not...)"
14174 $rm -f try.* try core
14180 : can memcpy handle overlapping blocks?
14183 case "$d_memmove" in
14184 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
14185 *) case "$d_memcpy" in
14187 echo "Checking to see if memcpy() can do overlapping copies..." >&4
14189 #$i_memory I_MEMORY
14190 #$i_stdlib I_STDLIB
14191 #$i_string I_STRING
14192 #$i_unistd I_UNISTD
14194 $cat >>try.c <<'EOCP'
14197 # include <memory.h>
14200 # include <stdlib.h>
14203 # include <string.h>
14205 # include <strings.h>
14208 # include <unistd.h> /* Needed for NetBSD */
14212 char buf[128], abc[128];
14218 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14219 try to store the string in read-only memory. */
14220 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
14222 for (align = 7; align >= 0; align--) {
14223 for (len = 36; len; len--) {
14225 memcpy(b, abc, len);
14226 for (off = 1; off <= len; off++) {
14227 memcpy(b+off, b, len);
14228 memcpy(b, b+off, len);
14229 if (memcmp(b, abc, len))
14238 if eval $compile_ok; then
14239 if ./try 2>/dev/null; then
14240 echo "Yes, it can."
14243 echo "It can't, sorry."
14246 echo "(I can't compile the test program, so we'll assume not...)"
14250 $rm -f try.* try core
14256 : can memcmp be trusted to compare relative magnitude?
14258 case "$d_memcmp" in
14261 echo "Checking if your memcmp() can compare relative magnitude..." >&4
14263 #$i_memory I_MEMORY
14264 #$i_stdlib I_STDLIB
14265 #$i_string I_STRING
14266 #$i_unistd I_UNISTD
14268 $cat >>try.c <<'EOCP'
14271 # include <memory.h>
14274 # include <stdlib.h>
14277 # include <string.h>
14279 # include <strings.h>
14282 # include <unistd.h> /* Needed for NetBSD */
14288 if ((a < b) && memcmp(&a, &b, 1) < 0)
14294 if eval $compile_ok; then
14295 if $run ./try 2>/dev/null; then
14296 echo "Yes, it can."
14299 echo "No, it can't (it uses signed chars)."
14302 echo "(I can't compile the test program, so we'll assume not...)"
14306 $rm -f try.* try core
14310 : see if prototype for sbrk is available
14312 set d_sbrkproto sbrk $i_unistd unistd.h
14315 : see if select exists
14316 set select d_select
14319 : see if semctl exists
14320 set semctl d_semctl
14323 : see if semget exists
14324 set semget d_semget
14327 : see if semop exists
14331 : see how much of the 'sem*(2)' library is present.
14334 case "$d_semctl$d_semget$d_semop" in
14335 *"$undef"*) h_sem=false;;
14339 case "`ipcs 2>&1`" in
14340 "SVID messages"*"not configured"*)
14341 echo "Your $osname does not have the sem*(2) configured." >&4
14344 set semctl d_semctl
14346 set semget d_semget
14354 : we could also check for sys/ipc.h ...
14355 if $h_sem && $test `./findhdr sys/sem.h`; then
14356 echo "You have the full sem*(2) library." >&4
14359 echo "You don't have the full sem*(2) library." >&4
14365 : see whether sys/sem.h defines union semun
14367 $cat > try.c <<'END'
14368 #include <sys/types.h>
14369 #include <sys/ipc.h>
14370 #include <sys/sem.h>
14371 int main () { union semun semun; semun.buf = 0; }
14374 if eval $compile; then
14375 echo "You have union semun in <sys/sem.h>." >&4
14378 echo "You do not have union semun in <sys/sem.h>." >&4
14381 $rm -f try try.c try.h
14385 : see how to do semctl IPC_STAT
14388 : see whether semctl IPC_STAT can use union semun
14393 # define S_IRUSR S_IREAD
14394 # define S_IWUSR S_IWRITE
14395 # define S_IXUSR S_IEXEC
14397 # define S_IRUSR 0400
14398 # define S_IWUSR 0200
14399 # define S_IXUSR 0100
14401 # define S_IRGRP (S_IRUSR>>3)
14402 # define S_IWGRP (S_IWUSR>>3)
14403 # define S_IXGRP (S_IXUSR>>3)
14404 # define S_IROTH (S_IRUSR>>6)
14405 # define S_IWOTH (S_IWUSR>>6)
14406 # define S_IXOTH (S_IXUSR>>6)
14409 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
14410 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
14411 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
14416 #include <sys/types.h>
14417 #include <sys/ipc.h>
14418 #include <sys/sem.h>
14419 #include <sys/stat.h>
14426 #$d_union_semun HAS_UNION_SEMUN
14429 #ifndef HAS_UNION_SEMUN
14432 struct semid_ds *buf;
14433 unsigned short *array;
14439 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14440 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14442 struct semid_ds argbuf;
14445 st = semctl(sem, 0, IPC_STAT, arg);
14449 # endif /* IPC_STAT */
14450 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14452 if (semctl(sem, 0, IPC_RMID, arg) != 0)
14453 # endif /* IPC_RMID */
14454 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14456 #endif /* IPC_PRIVATE && ... */
14457 printf("semget failed: errno = %d\n", errno);
14463 if eval $compile; then
14466 semun) val="$define" ;;
14472 case "$d_semctl_semun" in
14474 echo "You can use union semun for semctl IPC_STAT." >&4
14477 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
14482 : see whether semctl IPC_STAT can use struct semid_ds pointer
14483 $cat > try.c <<'END'
14484 #include <sys/types.h>
14485 #include <sys/ipc.h>
14486 #include <sys/sem.h>
14487 #include <sys/stat.h>
14495 struct semid_ds arg;
14498 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14499 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14502 st = semctl(sem, 0, IPC_STAT, &arg);
14504 printf("semid_ds\n");
14506 # endif /* IPC_STAT */
14507 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14509 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
14510 # endif /* IPC_RMID */
14511 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14513 #endif /* IPC_PRIVATE && ... */
14514 printf("semget failed: errno = %d\n", errno);
14521 if eval $compile; then
14524 semid_ds) val="$define" ;;
14528 set d_semctl_semid_ds
14530 case "$d_semctl_semid_ds" in
14532 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
14534 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
14541 # We do not have the full sem*(2) library, so assume we can not
14547 set d_semctl_semid_ds
14552 : see if sendmsg exists
14553 set sendmsg d_sendmsg
14556 : see if setegid exists
14557 set setegid d_setegid
14560 : see if seteuid exists
14561 set seteuid d_seteuid
14564 : see if setgrent exists
14565 set setgrent d_setgrent
14568 : see if setgrent_r exists
14569 set setgrent_r d_setgrent_r
14571 case "$d_setgrent_r" in
14573 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14574 case "$d_setgrent_r_proto:$usethreads" in
14575 ":define") d_setgrent_r_proto=define
14576 set d_setgrent_r_proto setgrent_r $hdrs
14580 case "$d_setgrent_r_proto" in
14582 case "$setgrent_r_proto" in
14583 ''|0) try='int setgrent_r(FILE**);'
14584 ./protochk "extern $try" $hdrs && setgrent_r_proto=I_H ;;
14586 case "$setgrent_r_proto" in
14587 ''|0) try='void setgrent_r(FILE**);'
14588 ./protochk "extern $try" $hdrs && setgrent_r_proto=V_H ;;
14590 case "$setgrent_r_proto" in
14591 ''|0) d_setgrent_r=undef
14593 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
14594 * ) case "$setgrent_r_proto" in
14595 REENTRANT_PROTO*) ;;
14596 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
14598 echo "Prototype: $try" ;;
14601 *) case "$usethreads" in
14602 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
14609 *) setgrent_r_proto=0
14613 : see if sethostent exists
14614 set sethostent d_sethent
14617 : see if sethostent_r exists
14618 set sethostent_r d_sethostent_r
14620 case "$d_sethostent_r" in
14622 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14623 case "$d_sethostent_r_proto:$usethreads" in
14624 ":define") d_sethostent_r_proto=define
14625 set d_sethostent_r_proto sethostent_r $hdrs
14629 case "$d_sethostent_r_proto" in
14631 case "$sethostent_r_proto" in
14632 ''|0) try='int sethostent_r(int, struct hostent_data*);'
14633 ./protochk "extern $try" $hdrs && sethostent_r_proto=I_ID ;;
14635 case "$sethostent_r_proto" in
14636 ''|0) try='void sethostent_r(int, struct hostent_data*);'
14637 ./protochk "extern $try" $hdrs && sethostent_r_proto=V_ID ;;
14639 case "$sethostent_r_proto" in
14640 ''|0) d_sethostent_r=undef
14641 sethostent_r_proto=0
14642 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
14643 * ) case "$sethostent_r_proto" in
14644 REENTRANT_PROTO*) ;;
14645 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
14647 echo "Prototype: $try" ;;
14650 *) case "$usethreads" in
14651 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
14653 d_sethostent_r=undef
14654 sethostent_r_proto=0
14658 *) sethostent_r_proto=0
14662 : see if setitimer exists
14663 set setitimer d_setitimer
14666 : see if setlinebuf exists
14667 set setlinebuf d_setlinebuf
14670 : see if setlocale exists
14671 set setlocale d_setlocale
14674 : see if locale.h is available
14675 set locale.h i_locale
14678 : see if setlocale_r exists
14679 set setlocale_r d_setlocale_r
14681 case "$d_setlocale_r" in
14683 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
14684 case "$d_setlocale_r_proto:$usethreads" in
14685 ":define") d_setlocale_r_proto=define
14686 set d_setlocale_r_proto setlocale_r $hdrs
14690 case "$d_setlocale_r_proto" in
14692 case "$setlocale_r_proto" in
14693 ''|0) try='int setlocale_r(int, const char*, char*, int);'
14694 ./protochk "extern $try" $hdrs && setlocale_r_proto=I_ICBI ;;
14696 case "$setlocale_r_proto" in
14697 ''|0) d_setlocale_r=undef
14698 setlocale_r_proto=0
14699 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
14700 * ) case "$setlocale_r_proto" in
14701 REENTRANT_PROTO*) ;;
14702 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
14704 echo "Prototype: $try" ;;
14707 *) case "$usethreads" in
14708 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
14710 d_setlocale_r=undef
14711 setlocale_r_proto=0
14715 *) setlocale_r_proto=0
14719 : see if setnetent exists
14720 set setnetent d_setnent
14723 : see if setnetent_r exists
14724 set setnetent_r d_setnetent_r
14726 case "$d_setnetent_r" in
14728 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14729 case "$d_setnetent_r_proto:$usethreads" in
14730 ":define") d_setnetent_r_proto=define
14731 set d_setnetent_r_proto setnetent_r $hdrs
14735 case "$d_setnetent_r_proto" in
14737 case "$setnetent_r_proto" in
14738 ''|0) try='int setnetent_r(int, struct netent_data*);'
14739 ./protochk "extern $try" $hdrs && setnetent_r_proto=I_ID ;;
14741 case "$setnetent_r_proto" in
14742 ''|0) try='void setnetent_r(int, struct netent_data*);'
14743 ./protochk "extern $try" $hdrs && setnetent_r_proto=V_ID ;;
14745 case "$setnetent_r_proto" in
14746 ''|0) d_setnetent_r=undef
14747 setnetent_r_proto=0
14748 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
14749 * ) case "$setnetent_r_proto" in
14750 REENTRANT_PROTO*) ;;
14751 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
14753 echo "Prototype: $try" ;;
14756 *) case "$usethreads" in
14757 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
14759 d_setnetent_r=undef
14760 setnetent_r_proto=0
14764 *) setnetent_r_proto=0
14768 : see if setprotoent exists
14769 set setprotoent d_setpent
14772 : see if setpgid exists
14773 set setpgid d_setpgid
14776 : see if setpgrp2 exists
14777 set setpgrp2 d_setpgrp2
14780 : see if setpriority exists
14781 set setpriority d_setprior
14784 : see if setproctitle exists
14785 set setproctitle d_setproctitle
14788 : see if setprotoent_r exists
14789 set setprotoent_r d_setprotoent_r
14791 case "$d_setprotoent_r" in
14793 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14794 case "$d_setprotoent_r_proto:$usethreads" in
14795 ":define") d_setprotoent_r_proto=define
14796 set d_setprotoent_r_proto setprotoent_r $hdrs
14800 case "$d_setprotoent_r_proto" in
14802 case "$setprotoent_r_proto" in
14803 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
14804 ./protochk "extern $try" $hdrs && setprotoent_r_proto=I_ID ;;
14806 case "$setprotoent_r_proto" in
14807 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
14808 ./protochk "extern $try" $hdrs && setprotoent_r_proto=V_ID ;;
14810 case "$setprotoent_r_proto" in
14811 ''|0) d_setprotoent_r=undef
14812 setprotoent_r_proto=0
14813 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
14814 * ) case "$setprotoent_r_proto" in
14815 REENTRANT_PROTO*) ;;
14816 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
14818 echo "Prototype: $try" ;;
14821 *) case "$usethreads" in
14822 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
14824 d_setprotoent_r=undef
14825 setprotoent_r_proto=0
14829 *) setprotoent_r_proto=0
14833 : see if setpwent exists
14834 set setpwent d_setpwent
14837 : see if setpwent_r exists
14838 set setpwent_r d_setpwent_r
14840 case "$d_setpwent_r" in
14842 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14843 case "$d_setpwent_r_proto:$usethreads" in
14844 ":define") d_setpwent_r_proto=define
14845 set d_setpwent_r_proto setpwent_r $hdrs
14849 case "$d_setpwent_r_proto" in
14851 case "$setpwent_r_proto" in
14852 ''|0) try='int setpwent_r(FILE**);'
14853 ./protochk "extern $try" $hdrs && setpwent_r_proto=I_H ;;
14855 case "$setpwent_r_proto" in
14856 ''|0) try='void setpwent_r(FILE**);'
14857 ./protochk "extern $try" $hdrs && setpwent_r_proto=V_H ;;
14859 case "$setpwent_r_proto" in
14860 ''|0) d_setpwent_r=undef
14862 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
14863 * ) case "$setpwent_r_proto" in
14864 REENTRANT_PROTO*) ;;
14865 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
14867 echo "Prototype: $try" ;;
14870 *) case "$usethreads" in
14871 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
14878 *) setpwent_r_proto=0
14882 : see if setregid exists
14883 set setregid d_setregid
14885 set setresgid d_setresgid
14888 : see if setreuid exists
14889 set setreuid d_setreuid
14891 set setresuid d_setresuid
14894 : see if setrgid exists
14895 set setrgid d_setrgid
14898 : see if setruid exists
14899 set setruid d_setruid
14902 : see if setservent exists
14903 set setservent d_setsent
14906 : see if setservent_r exists
14907 set setservent_r d_setservent_r
14909 case "$d_setservent_r" in
14911 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14912 case "$d_setservent_r_proto:$usethreads" in
14913 ":define") d_setservent_r_proto=define
14914 set d_setservent_r_proto setservent_r $hdrs
14918 case "$d_setservent_r_proto" in
14920 case "$setservent_r_proto" in
14921 ''|0) try='int setservent_r(int, struct servent_data*);'
14922 ./protochk "extern $try" $hdrs && setservent_r_proto=I_ID ;;
14924 case "$setservent_r_proto" in
14925 ''|0) try='void setservent_r(int, struct servent_data*);'
14926 ./protochk "extern $try" $hdrs && setservent_r_proto=V_ID ;;
14928 case "$setservent_r_proto" in
14929 ''|0) d_setservent_r=undef
14930 setservent_r_proto=0
14931 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
14932 * ) case "$setservent_r_proto" in
14933 REENTRANT_PROTO*) ;;
14934 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
14936 echo "Prototype: $try" ;;
14939 *) case "$usethreads" in
14940 define) echo "setservent_r has no prototype, not using it." >&4 ;;
14942 d_setservent_r=undef
14943 setservent_r_proto=0
14947 *) setservent_r_proto=0
14951 : see if setsid exists
14952 set setsid d_setsid
14955 : see if setvbuf exists
14956 set setvbuf d_setvbuf
14959 : see if sfio.h is available
14964 : see if sfio library is available
14975 : Ok, but do we want to use it.
14979 true|$define|[yY]*) dflt='y';;
14982 echo "$package can use the sfio library, but it is experimental."
14983 case "$useperlio" in
14985 echo "For sfio also the PerlIO abstraction layer is needed."
14986 echo "Earlier you said you wouldn't want that."
14989 rp="You seem to have sfio available, do you want to try using it?"
14992 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
14993 useperlio="$define"
14996 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
15001 *) case "$usesfio" in
15002 true|$define|[yY]*)
15003 echo "Sorry, cannot find sfio on this machine." >&4
15004 echo "Ignoring your setting of usesfio=$usesfio." >&4
15013 $define) usesfio='true';;
15014 *) usesfio='false';;
15018 *) : Remove sfio from list of libraries to use
15021 echo "Removing unneeded -lsfio from library list" >&4
15022 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
15025 echo "libs = $libs" >&4
15032 : see if shmctl exists
15033 set shmctl d_shmctl
15036 : see if shmget exists
15037 set shmget d_shmget
15040 : see if shmat exists
15043 : see what shmat returns
15046 $cat >shmat.c <<'END'
15047 #include <sys/shm.h>
15050 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
15055 echo "and it returns ($shmattype)." >&4
15056 : see if a prototype for shmat is available
15057 xxx=`./findhdr sys/shm.h`
15058 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
15059 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
15070 set d_shmatprototype
15073 : see if shmdt exists
15077 : see how much of the 'shm*(2)' library is present.
15080 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
15081 *"$undef"*) h_shm=false;;
15085 case "`ipcs 2>&1`" in
15086 "SVID shared memory"*"not configured"*)
15087 echo "Your $osname does not have the shm*(2) configured." >&4
15090 set shmctl d_shmctl
15092 set shmget d_shmget
15102 : we could also check for sys/ipc.h ...
15103 if $h_shm && $test `./findhdr sys/shm.h`; then
15104 echo "You have the full shm*(2) library." >&4
15107 echo "You don't have the full shm*(2) library." >&4
15114 : see if we have sigaction
15115 if set sigaction val -f d_sigaction; eval $csym; $val; then
15116 echo 'sigaction() found.' >&4
15117 $cat > try.c <<'EOP'
15119 #include <sys/types.h>
15120 #include <signal.h>
15123 struct sigaction act, oact;
15125 oact.sa_handler = 0;
15126 /* so that act and oact are used */
15127 exit(act.sa_flags == 0 && oact.sa_handler == 0);
15131 if eval $compile_ok; then
15134 echo "But you don't seem to have a useable struct sigaction." >&4
15138 echo 'sigaction NOT found.' >&4
15141 set d_sigaction; eval $setvar
15142 $rm -f try try$_o try.c
15144 : see if sigprocmask exists
15145 set sigprocmask d_sigprocmask
15148 : see if sigsetjmp exists
15150 case "$d_sigsetjmp" in
15152 $cat >try.c <<'EOP'
15153 #include <setjmp.h>
15158 if (sigsetjmp(env,1))
15161 siglongjmp(env, 1);
15166 if eval $compile; then
15167 if $run ./try >/dev/null 2>&1; then
15168 echo "POSIX sigsetjmp found." >&4
15172 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
15178 echo "sigsetjmp not found." >&4
15182 *) val="$d_sigsetjmp"
15183 case "$d_sigsetjmp" in
15184 $define) echo "POSIX sigsetjmp found." >&4;;
15185 $undef) echo "sigsetjmp not found." >&4;;
15193 : see if sockatmark exists
15194 set sockatmark d_sockatmark
15197 : see if prototype for sockatmark is available
15199 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
15202 : see if socks5_init exists
15203 set socks5_init d_socks5_init
15206 : see if srand48_r exists
15207 set srand48_r d_srand48_r
15209 case "$d_srand48_r" in
15211 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15212 case "$d_srand48_r_proto:$usethreads" in
15213 ":define") d_srand48_r_proto=define
15214 set d_srand48_r_proto srand48_r $hdrs
15218 case "$d_srand48_r_proto" in
15220 case "$srand48_r_proto" in
15221 ''|0) try='int srand48_r(long, struct drand48_data*);'
15222 ./protochk "extern $try" $hdrs && srand48_r_proto=I_LS ;;
15224 case "$srand48_r_proto" in
15225 ''|0) d_srand48_r=undef
15227 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
15228 * ) case "$srand48_r_proto" in
15229 REENTRANT_PROTO*) ;;
15230 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
15232 echo "Prototype: $try" ;;
15235 *) case "$usethreads" in
15236 define) echo "srand48_r has no prototype, not using it." >&4 ;;
15243 *) srand48_r_proto=0
15247 : see if srandom_r exists
15248 set srandom_r d_srandom_r
15250 case "$d_srandom_r" in
15252 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15253 case "$d_srandom_r_proto:$usethreads" in
15254 ":define") d_srandom_r_proto=define
15255 set d_srandom_r_proto srandom_r $hdrs
15259 case "$d_srandom_r_proto" in
15261 case "$srandom_r_proto" in
15262 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
15263 ./protochk "extern $try" $hdrs && srandom_r_proto=I_TS ;;
15265 case "$srandom_r_proto" in
15266 ''|0) d_srandom_r=undef
15268 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
15269 * ) case "$srandom_r_proto" in
15270 REENTRANT_PROTO*) ;;
15271 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
15273 echo "Prototype: $try" ;;
15276 *) case "$usethreads" in
15277 define) echo "srandom_r has no prototype, not using it." >&4 ;;
15284 *) srandom_r_proto=0
15288 : see if prototype for setresgid is available
15290 set d_sresgproto setresgid $i_unistd unistd.h
15293 : see if prototype for setresuid is available
15295 set d_sresuproto setresuid $i_unistd unistd.h
15298 : see if sys/stat.h is available
15299 set sys/stat.h i_sysstat
15303 : see if stat knows about block sizes
15305 echo "Checking to see if your struct stat has st_blocks field..." >&4
15306 set d_statblks stat st_blocks $i_sysstat sys/stat.h
15310 : see if this is a sys/vfs.h system
15311 set sys/vfs.h i_sysvfs
15315 : see if this is a sys/statfs.h system
15316 set sys/statfs.h i_sysstatfs
15321 echo "Checking to see if your system supports struct statfs..." >&4
15322 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
15324 case "$d_statfs_s" in
15325 "$define") echo "Yes, it does." ;;
15326 *) echo "No, it doesn't." ;;
15331 : see if struct statfs knows about f_flags
15332 case "$d_statfs_s" in
15335 echo "Checking to see if your struct statfs has f_flags field..." >&4
15336 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
15340 set d_statfs_f_flags
15344 case "$d_statfs_f_flags" in
15345 "$define") echo "Yes, it does." ;;
15346 *) echo "No, it doesn't." ;;
15349 : see if _ptr and _cnt from stdio act std
15352 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
15353 echo "(Looks like you have stdio.h from BSD.)"
15354 case "$stdio_ptr" in
15355 '') stdio_ptr='((fp)->_p)'
15358 *) ptr_lval=$d_stdio_ptr_lval;;
15360 case "$stdio_cnt" in
15361 '') stdio_cnt='((fp)->_r)'
15364 *) cnt_lval=$d_stdio_cnt_lval;;
15366 case "$stdio_base" in
15367 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
15369 case "$stdio_bufsiz" in
15370 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
15372 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
15373 echo "(Looks like you have stdio.h from Linux.)"
15374 case "$stdio_ptr" in
15375 '') stdio_ptr='((fp)->_IO_read_ptr)'
15378 *) ptr_lval=$d_stdio_ptr_lval;;
15380 case "$stdio_cnt" in
15381 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
15384 *) cnt_lval=$d_stdio_cnt_lval;;
15386 case "$stdio_base" in
15387 '') stdio_base='((fp)->_IO_read_base)';;
15389 case "$stdio_bufsiz" in
15390 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
15393 case "$stdio_ptr" in
15394 '') stdio_ptr='((fp)->_ptr)'
15397 *) ptr_lval=$d_stdio_ptr_lval;;
15399 case "$stdio_cnt" in
15400 '') stdio_cnt='((fp)->_cnt)'
15403 *) cnt_lval=$d_stdio_cnt_lval;;
15405 case "$stdio_base" in
15406 '') stdio_base='((fp)->_base)';;
15408 case "$stdio_bufsiz" in
15409 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
15413 : test whether _ptr and _cnt really work
15414 echo "Checking how std your stdio is..." >&4
15417 #define FILE_ptr(fp) $stdio_ptr
15418 #define FILE_cnt(fp) $stdio_cnt
15420 FILE *fp = fopen("try.c", "r");
15423 18 <= FILE_cnt(fp) &&
15424 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15432 if eval $compile && $to try.c; then
15433 if $run ./try; then
15434 echo "Your stdio acts pretty std."
15437 echo "Your stdio isn't very std."
15440 echo "Your stdio doesn't appear very std."
15444 # glibc 2.2.90 and above apparently change stdio streams so Perl's
15445 # direct buffer manipulation no longer works. The Configure tests
15446 # should be changed to correctly detect this, but until then,
15447 # the following check should at least let perl compile and run.
15448 # (This quick fix should be updated before 5.8.1.)
15449 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
15450 # A. Dougherty, June 3, 2002.
15451 case "$d_gnulibc" in
15453 case "$gnulibc_version" in
15457 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
15466 : Can _ptr be used as an lvalue?
15467 case "$d_stdstdio$ptr_lval" in
15468 $define$define) val=$define ;;
15471 set d_stdio_ptr_lval
15474 : Can _cnt be used as an lvalue?
15475 case "$d_stdstdio$cnt_lval" in
15476 $define$define) val=$define ;;
15479 set d_stdio_cnt_lval
15483 : test whether setting _ptr sets _cnt as a side effect
15484 d_stdio_ptr_lval_sets_cnt="$undef"
15485 d_stdio_ptr_lval_nochange_cnt="$undef"
15486 case "$d_stdio_ptr_lval$d_stdstdio" in
15488 echo "Checking to see what happens if we set the stdio ptr..." >&4
15491 /* Can we scream? */
15492 /* Eat dust sed :-) */
15493 /* In the buffer space, no one can hear you scream. */
15494 #define FILE_ptr(fp) $stdio_ptr
15495 #define FILE_cnt(fp) $stdio_cnt
15496 #include <sys/types.h>
15498 FILE *fp = fopen("try.c", "r");
15503 puts("Fail even to read");
15506 c = getc(fp); /* Read away the first # */
15508 puts("Fail even to read");
15512 18 <= FILE_cnt(fp) &&
15513 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15515 puts("Fail even to read");
15518 ptr = (char*) FILE_ptr(fp);
15519 cnt = (size_t)FILE_cnt(fp);
15521 FILE_ptr(fp) += 42;
15523 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
15524 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
15527 if (FILE_cnt(fp) <= 20) {
15528 printf ("Fail (<20 chars to test)");
15531 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
15532 puts("Fail compare");
15535 if (cnt == FILE_cnt(fp)) {
15536 puts("Pass_unchanged");
15539 if (FILE_cnt(fp) == (cnt - 42)) {
15540 puts("Pass_changed");
15543 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
15549 if eval $compile && $to try.c; then
15550 case `$run ./try` in
15552 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
15553 d_stdio_ptr_lval_sets_cnt="$define" ;;
15555 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
15556 d_stdio_ptr_lval_nochange_cnt="$define" ;;
15558 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
15560 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
15563 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
15569 : see if _base is also standard
15571 case "$d_stdstdio" in
15575 #define FILE_base(fp) $stdio_base
15576 #define FILE_bufsiz(fp) $stdio_bufsiz
15578 FILE *fp = fopen("try.c", "r");
15581 19 <= FILE_bufsiz(fp) &&
15582 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
15589 if eval $compile && $to try.c; then
15590 if $run ./try; then
15591 echo "And its _base field acts std."
15594 echo "But its _base field isn't std."
15597 echo "However, it seems to be lacking the _base field."
15606 Checking how to access stdio streams by file descriptor number...
15608 case "$stdio_stream_array" in
15609 '') $cat >try.c <<EOCP
15612 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
15616 for s in _iob __iob __sF
15618 set try -DSTDIO_STREAM_ARRAY=$s
15619 if eval $compile; then
15620 case "`$run ./try`" in
15621 yes) stdio_stream_array=$s; break ;;
15625 $rm -f try.* try$exe_ext
15627 case "$stdio_stream_array" in
15629 I can't figure out how to access stdio streams by file descriptor number.
15631 d_stdio_stream_array="$undef"
15634 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
15636 d_stdio_stream_array="$define"
15640 : see if strcoll exists
15641 set strcoll d_strcoll
15644 : check for structure copying
15646 echo "Checking to see if your C compiler can copy structs..." >&4
15647 $cat >try.c <<'EOCP'
15657 if $cc -c try.c >/dev/null 2>&1 ; then
15659 echo "Yup, it can."
15662 echo "Nope, it can't."
15668 : see if strerror and/or sys_errlist[] exist
15670 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
15671 if set strerror val -f d_strerror; eval $csym; $val; then
15672 echo 'strerror() found.' >&4
15673 d_strerror="$define"
15674 d_strerrm='strerror(e)'
15675 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15676 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
15677 d_syserrlst="$define"
15679 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
15680 d_syserrlst="$undef"
15682 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
15683 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
15684 echo 'strerror() found in string header.' >&4
15685 d_strerror="$define"
15686 d_strerrm='strerror(e)'
15687 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15688 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
15689 d_syserrlst="$define"
15691 echo "(You don't appear to have any sys_errlist[], how can this be?)"
15692 d_syserrlst="$undef"
15694 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15695 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
15696 d_strerror="$undef"
15697 d_syserrlst="$define"
15698 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
15700 echo 'strerror() and sys_errlist[] NOT found.' >&4
15701 d_strerror="$undef"
15702 d_syserrlst="$undef"
15703 d_strerrm='"unknown"'
15707 : see if strerror_r exists
15708 set strerror_r d_strerror_r
15710 case "$d_strerror_r" in
15712 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
15713 case "$d_strerror_r_proto:$usethreads" in
15714 ":define") d_strerror_r_proto=define
15715 set d_strerror_r_proto strerror_r $hdrs
15719 case "$d_strerror_r_proto" in
15721 case "$strerror_r_proto" in
15722 ''|0) try='int strerror_r(int, char*, size_t);'
15723 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;;
15725 case "$strerror_r_proto" in
15726 ''|0) try='int strerror_r(int, char*, int);'
15727 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;;
15729 case "$strerror_r_proto" in
15730 ''|0) try='char* strerror_r(int, char*, size_t);'
15731 ./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;;
15733 case "$strerror_r_proto" in
15734 ''|0) d_strerror_r=undef
15736 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
15737 * ) case "$strerror_r_proto" in
15738 REENTRANT_PROTO*) ;;
15739 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
15741 echo "Prototype: $try" ;;
15744 *) case "$usethreads" in
15745 define) echo "strerror_r has no prototype, not using it." >&4 ;;
15752 *) strerror_r_proto=0
15756 : see if strftime exists
15757 set strftime d_strftime
15760 : see if strtod exists
15761 set strtod d_strtod
15764 : see if strtol exists
15765 set strtol d_strtol
15768 : see if strtold exists
15769 set strtold d_strtold
15772 : see if strtoll exists
15773 set strtoll d_strtoll
15776 case "$d_longlong-$d_strtoll" in
15779 Checking whether your strtoll() works okay...
15781 $cat >try.c <<'EOCP'
15784 #define strtoll __strtoll
15787 #define strtoll _strtoll
15790 extern long long int strtoll(char *s, char **, int);
15791 static int bad = 0;
15792 int check(char *s, long long ell, int een) {
15795 gll = strtoll(s, 0, 10);
15796 if (!((gll == ell) && (errno == een)))
15800 check(" 1", 1LL, 0);
15801 check(" 0", 0LL, 0);
15802 check("-1", -1LL, 0);
15803 check("-9223372036854775808", -9223372036854775808LL, 0);
15804 check("-9223372036854775808", -9223372036854775808LL, 0);
15805 check(" 9223372036854775807", 9223372036854775807LL, 0);
15806 check("-9223372036854775808", -9223372036854775808LL, 0);
15807 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
15808 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
15814 if eval $compile; then
15817 ok) echo "Your strtoll() seems to be working okay." ;;
15819 Your strtoll() doesn't seem to be working okay.
15825 echo "(I can't seem to compile the test program--assuming it doesn't)"
15831 : see if strtoq exists
15832 set strtoq d_strtoq
15835 : see if strtoul exists
15836 set strtoul d_strtoul
15839 case "$d_strtoul" in
15842 Checking whether your strtoul() works okay...
15844 $cat >try.c <<'EOCP'
15847 extern unsigned long int strtoul(char *s, char **, int);
15848 static int bad = 0;
15849 void check(char *s, unsigned long eul, int een) {
15852 gul = strtoul(s, 0, 10);
15853 if (!((gul == eul) && (errno == een)))
15857 check(" 1", 1L, 0);
15858 check(" 0", 0L, 0);
15860 case "$longsize" in
15862 $cat >>try.c <<'EOCP'
15863 check("18446744073709551615", 18446744073709551615UL, 0);
15864 check("18446744073709551616", 18446744073709551615UL, ERANGE);
15865 #if 0 /* strtoul() for /^-/ strings is undefined. */
15866 check("-1", 18446744073709551615UL, 0);
15867 check("-18446744073709551614", 2, 0);
15868 check("-18446744073709551615", 1, 0);
15869 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
15870 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
15875 $cat >>try.c <<'EOCP'
15876 check("4294967295", 4294967295UL, 0);
15877 check("4294967296", 4294967295UL, ERANGE);
15878 #if 0 /* strtoul() for /^-/ strings is undefined. */
15879 check("-1", 4294967295UL, 0);
15880 check("-4294967294", 2, 0);
15881 check("-4294967295", 1, 0);
15882 check("-4294967296", 4294967295UL, ERANGE);
15883 check("-4294967297", 4294967295UL, ERANGE);
15888 : Should we write these tests to be more portable by sprintf-ing
15889 : ~0 and then manipulating that char string as input for strtol?
15892 $cat >>try.c <<'EOCP'
15899 if eval $compile; then
15900 case "`$run ./try`" in
15901 ok) echo "Your strtoul() seems to be working okay." ;;
15903 Your strtoul() doesn't seem to be working okay.
15912 : see if strtoull exists
15913 set strtoull d_strtoull
15916 case "$d_longlong-$d_strtoull" in
15919 Checking whether your strtoull() works okay...
15921 $cat >try.c <<'EOCP'
15924 #define strtoull __strtoull
15927 extern unsigned long long int strtoull(char *s, char **, int);
15928 static int bad = 0;
15929 int check(char *s, long long eull, int een) {
15932 gull = strtoull(s, 0, 10);
15933 if (!((gull == eull) && (errno == een)))
15937 check(" 1", 1LL, 0);
15938 check(" 0", 0LL, 0);
15939 check("18446744073709551615", 18446744073709551615ULL, 0);
15940 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
15941 #if 0 /* strtoull() for /^-/ strings is undefined. */
15942 check("-1", 18446744073709551615ULL, 0);
15943 check("-18446744073709551614", 2LL, 0);
15944 check("-18446744073709551615", 1LL, 0);
15945 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
15946 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
15953 if eval $compile; then
15954 case "`$run ./try`" in
15955 ok) echo "Your strtoull() seems to be working okay." ;;
15957 Your strtoull() doesn't seem to be working okay.
15959 d_strtoull="$undef"
15966 : see if strtouq exists
15967 set strtouq d_strtouq
15970 case "$d_strtouq" in
15973 Checking whether your strtouq() works okay...
15975 $cat >try.c <<'EOCP'
15978 extern unsigned long long int strtouq(char *s, char **, int);
15979 static int bad = 0;
15980 void check(char *s, unsigned long long eull, int een) {
15981 unsigned long long gull;
15983 gull = strtouq(s, 0, 10);
15984 if (!((gull == eull) && (errno == een)))
15988 check(" 1", 1LL, 0);
15989 check(" 0", 0LL, 0);
15990 check("18446744073709551615", 18446744073709551615ULL, 0);
15991 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
15992 #if 0 /* strtouq() for /^-/ strings is undefined. */
15993 check("-1", 18446744073709551615ULL, 0);
15994 check("-18446744073709551614", 2LL, 0);
15995 check("-18446744073709551615", 1LL, 0);
15996 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
15997 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
16005 if eval $compile; then
16006 case "`$run ./try`" in
16007 ok) echo "Your strtouq() seems to be working okay." ;;
16009 Your strtouq() doesn't seem to be working okay.
16018 : see if strxfrm exists
16019 set strxfrm d_strxfrm
16022 : see if symlink exists
16023 set symlink d_symlink
16026 : see if syscall exists
16027 set syscall d_syscall
16030 : see if prototype for syscall is available
16032 set d_syscallproto syscall $i_unistd unistd.h
16035 : see if sysconf exists
16036 set sysconf d_sysconf
16039 : see if system exists
16040 set system d_system
16043 : see if tcgetpgrp exists
16044 set tcgetpgrp d_tcgetpgrp
16047 : see if tcsetpgrp exists
16048 set tcsetpgrp d_tcsetpgrp
16051 : see if prototype for telldir is available
16053 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
16056 : see if time exists
16058 if test "X$d_time" = X -o X"$timetype" = X; then
16059 if set time val -f d_time; eval $csym; $val; then
16060 echo 'time() found.' >&4
16062 rp="What is the type returned by time() on this system?"
16063 set time_t timetype long stdio.h sys/types.h
16066 echo 'time() not found, hope that will do.' >&4
16074 : see if this is a sys/times.h system
16075 set sys/times.h i_systimes
16078 : see if times exists
16080 if set times val -f d_times; eval $csym; $val; then
16081 echo 'times() found.' >&4
16084 case "$i_systimes" in
16085 "$define") inc='sys/times.h';;
16087 rp="What is the type returned by times() on this system?"
16088 set clock_t clocktype long stdio.h sys/types.h $inc
16091 echo 'times() NOT found, hope that will do.' >&4
16096 : see if tmpnam_r exists
16097 set tmpnam_r d_tmpnam_r
16099 case "$d_tmpnam_r" in
16101 hdrs="$i_systypes sys/types.h define stdio.h "
16102 case "$d_tmpnam_r_proto:$usethreads" in
16103 ":define") d_tmpnam_r_proto=define
16104 set d_tmpnam_r_proto tmpnam_r $hdrs
16108 case "$d_tmpnam_r_proto" in
16110 case "$tmpnam_r_proto" in
16111 ''|0) try='char* tmpnam_r(char*);'
16112 ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;;
16114 case "$tmpnam_r_proto" in
16115 ''|0) d_tmpnam_r=undef
16117 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
16118 * ) case "$tmpnam_r_proto" in
16119 REENTRANT_PROTO*) ;;
16120 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
16122 echo "Prototype: $try" ;;
16125 *) case "$usethreads" in
16126 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
16133 *) tmpnam_r_proto=0
16137 : see if truncate exists
16138 set truncate d_truncate
16141 : see if ttyname_r exists
16142 set ttyname_r d_ttyname_r
16144 case "$d_ttyname_r" in
16146 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
16147 case "$d_ttyname_r_proto:$usethreads" in
16148 ":define") d_ttyname_r_proto=define
16149 set d_ttyname_r_proto ttyname_r $hdrs
16153 case "$d_ttyname_r_proto" in
16155 case "$ttyname_r_proto" in
16156 ''|0) try='int ttyname_r(int, char*, size_t);'
16157 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;;
16159 case "$ttyname_r_proto" in
16160 ''|0) try='int ttyname_r(int, char*, int);'
16161 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;;
16163 case "$ttyname_r_proto" in
16164 ''|0) try='char* ttyname_r(int, char*, int);'
16165 ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;;
16167 case "$ttyname_r_proto" in
16168 ''|0) d_ttyname_r=undef
16170 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
16171 * ) case "$ttyname_r_proto" in
16172 REENTRANT_PROTO*) ;;
16173 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
16175 echo "Prototype: $try" ;;
16178 *) case "$usethreads" in
16179 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
16186 *) ttyname_r_proto=0
16190 : see if tzname[] exists
16192 if set tzname val -a d_tzname; eval $csym; $val; then
16194 echo 'tzname[] found.' >&4
16197 echo 'tzname[] NOT found.' >&4
16203 next|rhapsody|darwin) multiarch="$define" ;;
16205 case "$multiarch" in
16206 ''|[nN]*) multiarch="$undef" ;;
16209 : check for ordering of bytes in a UV
16211 case "$usecrosscompile$multiarch" in
16214 You seem to be either cross-compiling or doing a multiarchitecture build,
16215 skipping the byteorder check.
16221 case "$byteorder" in
16224 In the following, larger digits indicate more significance. A big-endian
16225 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
16226 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
16227 machines may have weird orders like 3412. A Cray will report 87654321,
16228 an Alpha will report 12345678. If the test program works the default is
16230 I'm now running the test program...
16234 #include <sys/types.h>
16235 typedef $uvtype UV;
16245 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
16247 u.l = (UV)0x04030201;
16248 for (i = 0; i < $uvsize; i++)
16249 printf("%c", u.c[i]+'0');
16256 if eval $compile && ./try > /dev/null; then
16259 [1-4][1-4][1-4][1-4]|12345678|87654321)
16260 echo "(The test program ran ok.)"
16261 echo "byteorder=$dflt"
16264 ????|????????) echo "(The test program ran ok.)" ;;
16265 *) echo "(The test program didn't run right for some reason.)" ;;
16270 (I can't seem to compile the test program. Guessing big-endian...)
16273 case "$xxx_prompt" in
16275 rp="What is the order of bytes in $uvtype?"
16291 Checking to see whether you can access character data unalignedly...
16293 case "$d_u32align" in
16294 '') $cat >try.c <<EOCP
16296 #define U32 $u32type
16297 #define BYTEORDER 0x$byteorder
16299 #include <signal.h>
16301 $signal_t bletch(s) int s; { exit(4); }
16304 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
16309 if (sizeof(U32) != 4) {
16310 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
16317 signal(SIGBUS, bletch);
16329 for (i = 0; i < 4; i++) {
16330 up = (U32*)(buf + i);
16331 if (! ((*up == 1 << (8*i)) || /* big-endian */
16332 (*up == 1 << (8*(3-i))) /* little-endian */
16336 printf("read failed (%x)\n", *up);
16342 for (i = 0; i < 4; i++) {
16343 up = (U32*)(buf + i);
16345 if (*up != 0xBeef) {
16346 printf("write failed (%x)\n", *up);
16360 if eval $compile_ok; then
16361 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
16362 $run ./try 2>&1 >/dev/null
16365 You can access character data pretty unalignedly.
16367 d_u32align="$undef"
16370 It seems that you must access character data in an aligned manner.
16372 d_u32align="$define"
16376 rp='Can you access character data at unaligned addresses?'
16380 [yY]*) d_u32align="$undef" ;;
16381 *) d_u32align="$define" ;;
16384 $rm -f core core.try.* try.core
16388 : see if ualarm exists
16389 set ualarm d_ualarm
16392 : see if umask exists
16396 : see if unordered exists
16397 set unordered d_unordered
16400 : see if usleep exists
16401 set usleep d_usleep
16404 : see if prototype for usleep is available
16406 set d_usleepproto usleep $i_unistd unistd.h
16409 : see if ustat exists
16413 : backward compatibility for d_hvfork
16414 if test X$d_hvfork != X; then
16415 d_vfork="$d_hvfork"
16418 : see if there is a vfork
16423 : Ok, but do we want to use it. vfork is reportedly unreliable in
16424 : perl on Solaris 2.x, and probably elsewhere.
16428 case "$usevfork" in
16434 Perl can only use a vfork() that doesn't suffer from strict
16435 restrictions on calling functions or modifying global data in
16436 the child. For example, glibc-2.1 contains such a vfork()
16437 that is unsuitable. If your system provides a proper fork()
16438 call, chances are that you do NOT want perl to use vfork().
16441 rp="Do you still want to use vfork()?"
16446 echo "Ok, we won't use vfork()."
16455 $define) usevfork='true';;
16456 *) usevfork='false';;
16459 : see if closedir exists
16460 set closedir d_closedir
16463 case "$d_closedir" in
16466 echo "Checking whether closedir() returns a status..." >&4
16468 #$i_dirent I_DIRENT /**/
16469 #$i_sysdir I_SYS_DIR /**/
16470 #$i_sysndir I_SYS_NDIR /**/
16471 #$i_systypes I_SYS_TYPES /**/
16473 #if defined(I_SYS_TYPES)
16474 #include <sys/types.h>
16476 #if defined(I_DIRENT)
16477 #include <dirent.h>
16478 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
16479 #include <sys/dir.h>
16483 #include <sys/ndir.h>
16487 #include <ndir.h> /* may be wrong in the future */
16489 #include <sys/dir.h>
16494 int main() { return closedir(opendir(".")); }
16497 if eval $compile_ok; then
16498 if $run ./try > /dev/null 2>&1 ; then
16499 echo "Yes, it does."
16502 echo "No, it doesn't."
16506 echo "(I can't seem to compile the test program--assuming it doesn't)"
16514 set d_void_closedir
16517 : see if there is a wait4
16521 : see if waitpid exists
16522 set waitpid d_waitpid
16525 : see if wcstombs exists
16526 set wcstombs d_wcstombs
16529 : see if wctomb exists
16530 set wctomb d_wctomb
16533 : see if writev exists
16534 set writev d_writev
16537 : preserve RCS keywords in files with variable substitution, grrr
16542 Revision='$Revision'
16544 : check for alignment requirements
16546 case "$usecrosscompile$multiarch" in
16549 You seem to be either cross-compiling or doing a multiarchitecture build,
16550 skipping the memory alignment check.
16553 case "$alignbytes" in
16554 '') alignbytes=8 ;;
16558 case "$alignbytes" in
16559 '') echo "Checking alignment constraints..." >&4
16560 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
16561 $cat >try.c <<'EOCP'
16562 typedef long double NV;
16565 $cat >try.c <<'EOCP'
16569 $cat >>try.c <<'EOCP'
16577 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
16582 if eval $compile_ok; then
16586 echo "(I can't seem to compile the test program...)"
16589 *) dflt="$alignbytes"
16592 rp="Doubles must be aligned on a how-many-byte boundary?"
16600 : set the base revision
16603 : how do we catenate cpp tokens here?
16605 echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
16606 $cat >cpp_stuff.c <<'EOCP'
16607 #define RCAT(a,b)a/**/b
16608 #define ACAT(a,b)a ## b
16612 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
16613 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
16614 echo "Oh! Smells like ANSI's been here." >&4
16615 echo "We can catify or stringify, separately or together!"
16617 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
16618 echo "Ah, yes! The good old days!" >&4
16619 echo "However, in the good old days we don't know how to stringify and"
16620 echo "catify at the same time."
16624 Hmm, I don't seem to be able to catenate tokens with your cpp. You're going
16625 to have to edit the values of CAT[2-5] in config.h...
16627 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
16631 : see if this is a db.h system
16637 : Check db version.
16639 echo "Checking Berkeley DB version ..." >&4
16645 #include <sys/types.h>
16648 int main(int argc, char *argv[])
16650 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
16651 int Major, Minor, Patch ;
16652 unsigned long Version ;
16653 (void)db_version(&Major, &Minor, &Patch) ;
16655 printf("%d %d %d %d %d %d\n",
16656 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
16657 Major, Minor, Patch);
16660 printf("You have Berkeley DB Version 2 or greater.\n");
16662 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
16663 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
16664 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
16665 Major, Minor, Patch) ;
16667 /* check that db.h & libdb are compatible */
16668 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
16669 printf("db.h and libdb are incompatible.\n") ;
16673 printf("db.h and libdb are compatible.\n") ;
16675 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
16676 + DB_VERSION_PATCH ;
16678 /* needs to be >= 2.3.4 */
16679 if (Version < 2003004) {
16680 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
16681 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
16687 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
16692 printf("You have Berkeley DB Version 1.\n");
16693 exit(0); /* DB version < 2: the coast is clear. */
16695 exit(1); /* <db.h> not Berkeley DB? */
16701 if eval $compile_ok && $run ./try; then
16702 echo 'Looks OK.' >&4
16704 db_version_major=$1
16705 db_version_minor=$2
16706 db_version_patch=$3
16708 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
16712 : Remove db from list of libraries to use
16713 echo "Removing unusable -ldb from library list" >&4
16714 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
16717 echo "libs = $libs" >&4
16727 : Check the return type needed for hash
16729 echo "Checking return type needed for hash for Berkeley DB ..." >&4
16735 #include <sys/types.h>
16738 #ifndef DB_VERSION_MAJOR
16739 u_int32_t hash_cb (ptr, size)
16747 info.hash = hash_cb;
16751 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16752 if $contains warning try.out >>/dev/null 2>&1 ; then
16755 db_hashtype='u_int32_t'
16758 : XXX Maybe we should just give up here.
16759 db_hashtype=u_int32_t
16761 echo "Help: I can't seem to compile the db test program." >&4
16762 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
16765 echo "Your version of Berkeley DB uses $db_hashtype for hash."
16767 *) db_hashtype=u_int32_t
16772 : Check the return type needed for prefix
16774 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
16780 #include <sys/types.h>
16783 #ifndef DB_VERSION_MAJOR
16784 size_t prefix_cb (key1, key2)
16792 info.prefix = prefix_cb;
16796 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16797 if $contains warning try.out >>/dev/null 2>&1 ; then
16798 db_prefixtype='int'
16800 db_prefixtype='size_t'
16803 db_prefixtype='size_t'
16804 : XXX Maybe we should just give up here.
16806 echo "Help: I can't seem to compile the db test program." >&4
16807 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
16810 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
16812 *) db_prefixtype='size_t'
16817 : How can we generate normalized random numbers ?
16819 echo "Looking for a random number function..." >&4
16820 case "$randfunc" in
16822 if set drand48 val -f; eval $csym; $val; then
16824 echo "Good, found drand48()." >&4
16825 elif set random val -f; eval $csym; $val; then
16827 echo "OK, found random()." >&4
16830 echo "Yick, looks like I have to use rand()." >&4
16841 *-Dmy_rand=*|*-Dmy_srand=*)
16842 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
16843 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
16844 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
16845 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
16849 while $test "$cont"; do
16850 rp="Use which function to generate random numbers?"
16852 if $test "$ans" = "$dflt"; then
16858 if set $ans val -f; eval $csym; $val; then
16862 rp="I cannot find function $ans. Use that name anyway?"
16871 case "$randfunc" in
16873 drand01="drand48()"
16879 case "$randbits" in
16881 echo "Checking to see how many bits your $randfunc() function produces..." >&4
16883 #$i_unistd I_UNISTD
16884 #$i_stdlib I_STDLIB
16887 # include <unistd.h>
16890 # include <stdlib.h>
16895 register unsigned long tmp;
16896 register unsigned long max = 0L;
16898 for (i = 1000; i; i--) {
16899 tmp = (unsigned long) $randfunc();
16900 if (tmp > max) max = tmp;
16902 for (i = 0; max; i++)
16908 if eval $compile_ok; then
16912 echo "(I can't seem to compile the test program...)"
16919 rp="How many bits does your $randfunc() function produce?"
16923 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
16924 seedfunc="s$randfunc"
16925 randseedtype=unsigned
16929 rp="How many bits does your $randfunc() function produce?"
16932 seedfunc="s$randfunc"
16933 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
16934 if set $seedfunc val -f; eval $csym; $val; then
16935 echo "(Using $seedfunc() to seed random generator)"
16937 echo "(Warning: no $seedfunc() to seed random generator)"
16940 randseedtype=unsigned
16948 echo "Determining whether or not we are on an EBCDIC system..." >&4
16949 $cat >try.c <<'EOM'
16952 if ('M'==0xd4) return 0;
16959 if eval $compile_ok; then
16960 if $run ./try; then
16961 echo "You seem to speak EBCDIC." >&4
16964 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
16967 echo "I'm unable to compile the test program." >&4
16968 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
16976 Checking how to flush all pending stdio output...
16978 # I only know how to find the first 32 possibly open files on SunOS.
16979 # See also hints/sunos_4_1.sh and util.c --AD
16981 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
16983 $cat >>try.c <<EOCP
16985 #$i_unistd I_UNISTD
16987 # include <unistd.h>
16989 #$d_sysconf HAS_SYSCONF
16990 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
16991 #ifdef HAS_STDIO_STREAM_ARRAY
16992 # define STDIO_STREAM_ARRAY $stdio_stream_array
16997 p = fopen("try.out", "w");
17001 # ifdef TRY_FPRINTF
17005 #ifdef TRY_FFLUSH_NULL
17008 #ifdef TRY_FFLUSH_ALL
17010 long open_max = -1;
17011 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
17012 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
17014 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
17015 open_max = sysconf(_SC_OPEN_MAX);
17018 open_max = FOPEN_MAX;
17021 open_max = OPEN_MAX;
17030 # ifdef HAS_STDIO_STREAM_ARRAY
17031 if (open_max > 0) {
17033 for (i = 0; i < open_max; i++)
17034 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
17035 STDIO_STREAM_ARRAY[i]._file < open_max &&
17036 STDIO_STREAM_ARRAY[i]._flag)
17037 fflush(&STDIO_STREAM_ARRAY[i]);
17045 : first we have to find out how _not_ to flush
17047 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
17049 set try -DTRY_FPUTC
17050 if eval $compile; then
17051 $run ./try 2>/dev/null
17054 if $test ! -s try.out -a "X$code" = X42; then
17060 set try -DTRY_FPRINTF
17061 if eval $compile; then
17062 $run ./try 2>/dev/null
17065 if $test ! -s try.out -a "X$code" = X42; then
17066 output=-DTRY_FPRINTF
17072 : check for fflush NULL behaviour
17073 case "$fflushNULL" in
17074 '') set try -DTRY_FFLUSH_NULL $output
17075 if eval $compile; then
17076 $run ./try 2>/dev/null
17079 if $test -s try.out -a "X$code" = X42; then
17080 fflushNULL="`$cat try.out`"
17082 if $test "X$code" != X42; then
17084 (If this test failed, don't worry, we'll try another method shortly.)
17089 $rm -f core try.core core.try.*
17090 case "$fflushNULL" in
17092 Your fflush(NULL) works okay for output streams.
17093 Let's see if it clobbers input pipes...
17095 # As of mid-March 2000 all versions of Solaris appear to have a stdio
17096 # bug that improperly flushes the input end of pipes. So we avoid the
17097 # autoflush on fork/system/exec support for now. :-(
17098 $cat >tryp.c <<EOCP
17101 main(int argc, char **argv)
17107 while ((i = getc(stdin)) != -1
17108 && (*bp++ = i) != '\n'
17109 && bp < &buf[1024])
17112 fprintf(stdout, "%s", buf);
17120 fflushNULL="$define"
17122 if eval $compile; then
17124 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17125 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17127 fflush(NULL) seems to behave okay with input streams.
17129 fflushNULL="$define"
17132 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
17134 fflushNULL="$undef"
17137 $rm -f core tryp.c tryp.core core.tryp.*
17140 Your fflush(NULL) isn't working (contrary to ANSI C).
17142 fflushNULL="$undef"
17145 Cannot figure out whether your fflush(NULL) works or not.
17146 I'm assuming it doesn't (contrary to ANSI C).
17148 fflushNULL="$undef"
17152 $define|true|[yY]*)
17153 fflushNULL="$define"
17156 fflushNULL="$undef"
17159 : check explicit looping only if NULL did not work, and if the pipe
17160 : bug does not show up on an explicit flush too
17161 case "$fflushNULL" in
17163 $cat >tryp.c <<EOCP
17166 main(int argc, char **argv)
17172 while ((i = getc(stdin)) != -1
17173 && (*bp++ = i) != '\n'
17174 && bp < &buf[1024])
17177 fprintf(stdout, "%s", buf);
17186 if eval $compile; then
17188 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17189 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17191 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
17193 : now check for fflushall behaviour
17194 case "$fflushall" in
17195 '') set try -DTRY_FFLUSH_ALL $output
17196 if eval $compile; then
17198 (Now testing the other method--but note that this also may fail.)
17200 $run ./try 2>/dev/null
17203 if $test -s try.out -a "X$code" = X42; then
17204 fflushall="`$cat try.out`"
17207 $rm -f core try.core core.try.*
17208 case "$fflushall" in
17210 Whew. Flushing explicitly all the stdio streams works.
17212 fflushall="$define"
17215 Sigh. Flushing explicitly all the stdio streams doesn't work.
17220 Cannot figure out whether flushing stdio streams explicitly works or not.
17221 I'm assuming it doesn't.
17227 "$define"|true|[yY]*)
17228 fflushall="$define"
17236 All is futile. Even fflush(stdin) clobbers input pipes!
17243 $rm -f core tryp.c tryp.core core.tryp.*
17245 *) fflushall="$undef"
17249 case "$fflushNULL$fflushall" in
17252 OK, I give up. I cannot figure out how to flush pending stdio output.
17253 We won't be flushing handles at all before fork/exec/popen.
17257 $rm -f try.* try$exe_ext
17259 : Store the full pathname to the ar program for use in the C program
17260 : Respect a hint or command line value for full_ar.
17265 : Store the full pathname to the sed program for use in the C program
17268 : see what type gids are declared as in the kernel
17270 echo "Looking for the type for group ids returned by getgid()."
17271 set gid_t gidtype xxx stdio.h sys/types.h
17275 xxx=`./findhdr sys/user.h`
17276 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
17278 unsigned) dflt="$1 $2" ;;
17282 *) dflt="$gidtype";;
17285 gid_t) echo "gid_t found." ;;
17286 *) rp="What is the type for group ids returned by getgid()?"
17294 *_t) zzz="$gidtype" ;;
17297 echo "Checking the size of $zzz..." >&4
17299 #include <sys/types.h>
17302 printf("%d\n", (int)sizeof($gidtype));
17307 if eval $compile_ok; then
17311 echo "(I can't execute the test program--guessing $gidsize.)" >&4
17314 echo "Your $zzz is $gidsize bytes long."
17319 echo "(I can't compile the test program--guessing $gidsize.)" >&4
17325 *_t) zzz="$gidtype" ;;
17328 echo "Checking the sign of $zzz..." >&4
17330 #include <sys/types.h>
17341 if eval $compile; then
17345 echo "(I can't execute the test program--guessing unsigned.)" >&4
17349 1) echo "Your $zzz is unsigned." ;;
17350 -1) echo "Your $zzz is signed." ;;
17356 echo "(I can't compile the test program--guessing unsigned.)" >&4
17362 if $test X"$quadtype" != X; then
17364 echo "Checking how to print 64-bit integers..." >&4
17366 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
17367 $cat >try.c <<'EOCP'
17368 #include <sys/types.h>
17371 int q = 12345678901;
17372 printf("%ld\n", q);
17376 if eval $compile; then
17380 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
17381 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
17382 echo "We will use %d."
17388 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
17389 $cat >try.c <<'EOCP'
17390 #include <sys/types.h>
17393 long q = 12345678901;
17394 printf("%ld\n", q);
17398 if eval $compile; then
17402 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
17403 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
17404 echo "We will use %ld."
17410 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
17411 $cat >try.c <<'EOCP'
17412 #include <sys/types.h>
17413 #include <inttypes.h>
17416 int64_t q = 12345678901;
17417 printf("%" PRId64 "\n", q);
17421 if eval $compile; then
17425 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
17426 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
17427 echo "We will use the C9X style."
17433 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17435 #include <sys/types.h>
17438 $quadtype q = 12345678901;
17439 printf("%Ld\n", q);
17443 if eval $compile; then
17447 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
17448 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
17449 echo "We will use %Ld."
17455 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
17456 $cat >try.c <<'EOCP'
17457 #include <sys/types.h>
17460 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
17461 printf("%lld\n", q);
17465 if eval $compile; then
17469 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
17470 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
17471 echo "We will use the %lld style."
17477 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17479 #include <sys/types.h>
17482 $quadtype q = 12345678901;
17483 printf("%qd\n", q);
17487 if eval $compile; then
17491 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
17492 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
17493 echo "We will use %qd."
17499 if $test X"$sPRId64" = X; then
17500 echo "Cannot figure out how to print 64-bit integers." >&4
17508 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
17509 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
17511 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
17512 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
17518 $echo "Checking the format strings to be used for Perl's internal types..." >&4
17520 if $test X"$ivsize" = X8; then
17521 ivdformat="$sPRId64"
17522 uvuformat="$sPRIu64"
17523 uvoformat="$sPRIo64"
17524 uvxformat="$sPRIx64"
17525 uvXUformat="$sPRIXU64"
17527 if $test X"$ivsize" = X"$longsize"; then
17534 if $test X"$ivsize" = X"$intsize"; then
17542 if $test X"$ivsize" = X"$shortsize"; then
17553 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
17554 nveformat="$sPRIeldbl"
17555 nvfformat="$sPRIfldbl"
17556 nvgformat="$sPRIgldbl"
17557 nvEUformat="$sPRIEUldbl"
17558 nvFUformat="$sPRIFUldbl"
17559 nvGUformat="$sPRIGUldbl"
17569 case "$ivdformat" in
17570 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
17577 $echo "Checking the format string to be used for gids..." >&4
17580 -1) if $test X"$gidsize" = X"$ivsize"; then
17581 gidformat="$ivdformat"
17583 if $test X"$gidsize" = X"$longsize"; then
17586 if $test X"$gidsize" = X"$intsize"; then
17589 if $test X"$gidsize" = X"$shortsize"; then
17596 *) if $test X"$gidsize" = X"$uvsize"; then
17597 gidformat="$uvuformat"
17599 if $test X"$gidsize" = X"$longsize"; then
17602 if $test X"$gidsize" = X"$intsize"; then
17605 if $test X"$gidsize" = X"$shortsize"; then
17614 : see if getgroups exists
17615 set getgroups d_getgrps
17618 : see if setgroups exists
17619 set setgroups d_setgrps
17623 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
17625 case "$d_getgrps$d_setgrps" in
17627 case "$groupstype" in
17628 '') dflt="$gidtype" ;;
17629 *) dflt="$groupstype" ;;
17632 What type of pointer is the second argument to getgroups() and setgroups()?
17633 Usually this is the same as group ids, $gidtype, but not always.
17636 rp='What type pointer is the second argument to getgroups() and setgroups()?'
17640 *) groupstype="$gidtype";;
17644 echo "Checking if your $make program sets \$(MAKE)..." >&4
17645 case "$make_set_make" in
17647 $sed 's/^X //' > testmake.mak << 'EOF'
17649 X @echo 'maketemp="$(MAKE)"'
17651 case "`$make -f testmake.mak 2>/dev/null`" in
17652 *maketemp=*) make_set_make='#' ;;
17653 *) make_set_make="MAKE=$make" ;;
17655 $rm -f testmake.mak
17658 case "$make_set_make" in
17659 '#') echo "Yup, it does.";;
17660 *) echo "Nope, it doesn't.";;
17663 : see what type is used for mode_t
17664 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
17665 set mode_t modetype int stdio.h sys/types.h
17668 : see if stdarg is available
17670 if $test `./findhdr stdarg.h`; then
17671 echo "<stdarg.h> found." >&4
17674 echo "<stdarg.h> NOT found." >&4
17678 : see if varags is available
17680 if $test `./findhdr varargs.h`; then
17681 echo "<varargs.h> found." >&4
17683 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
17686 : set up the varargs testing programs
17687 $cat > varargs.c <<EOP
17689 #include <stdarg.h>
17692 #include <varargs.h>
17696 int f(char *p, ...)
17710 p = va_arg(ap, char *);
17715 $cat > varargs <<EOP
17717 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
17726 : now check which varargs header should be included
17731 if `./varargs I_STDARG`; then
17733 elif `./varargs I_VARARGS`; then
17738 if `./varargs I_VARARGS`; then
17745 echo "I could not find the definition for va_dcl... You have problems..." >&4
17746 val="$undef"; set i_stdarg; eval $setvar
17747 val="$undef"; set i_varargs; eval $setvar
17752 case "$i_varhdr" in
17754 val="$define"; set i_stdarg; eval $setvar
17755 val="$undef"; set i_varargs; eval $setvar
17758 val="$undef"; set i_stdarg; eval $setvar
17759 val="$define"; set i_varargs; eval $setvar
17762 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
17766 : see if we need va_copy
17768 case "$i_stdarg" in
17771 #include <stdarg.h>
17773 #$i_stdlib I_STDLIB
17775 #include <stdlib.h>
17777 #include <signal.h>
17780 ivfprintf(FILE *f, const char *fmt, va_list *valp)
17782 return vfprintf(f, fmt, *valp);
17786 myvfprintf(FILE *f, const char *fmt, va_list val)
17788 return ivfprintf(f, fmt, &val);
17792 myprintf(char *fmt, ...)
17795 va_start(val, fmt);
17796 return myvfprintf(stdout, fmt, val);
17800 main(int ac, char **av)
17802 signal(SIGSEGV, exit);
17804 myprintf("%s%cs all right, then\n", "that", '\'');
17809 if eval $compile && $run ./try 2>&1 >/dev/null; then
17810 case "`$run ./try`" in
17811 "that's all right, then")
17817 yes) echo "It seems that you don't need va_copy()." >&4
17818 need_va_copy="$undef"
17820 *) echo "It seems that va_copy() or similar will be needed." >&4
17821 need_va_copy="$define"
17824 $rm -f try.* core core.* *.core *.core.*
17826 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
17830 : see what type is used for size_t
17831 rp="What is the type used for the length parameter for string functions?"
17832 set size_t sizetype 'unsigned int' stdio.h sys/types.h
17835 : check for type of arguments to gethostbyaddr.
17836 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
17837 case "$d_gethbyaddr" in
17841 Checking to see what type of arguments are accepted by gethostbyaddr().
17843 hdrs="$define sys/types.h
17844 $d_socket sys/socket.h
17845 $i_niin netinet/in.h
17847 $i_unistd unistd.h"
17848 : The first arg can 'char *' or 'void *'
17849 : The second arg is some of integral type
17850 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
17851 for yyy in size_t long int; do
17852 case "$netdb_host_type" in
17853 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
17854 if ./protochk "$try" $hdrs; then
17855 echo "Your system accepts $xxx for the first arg."
17856 echo "...and $yyy for the second arg."
17857 netdb_host_type="$xxx"
17858 netdb_hlen_type="$yyy"
17864 : In case none of those worked, prompt the user.
17865 case "$netdb_host_type" in
17866 '') rp='What is the type for the 1st argument to gethostbyaddr?'
17869 netdb_host_type=$ans
17870 rp='What is the type for the 2nd argument to gethostbyaddr?'
17873 netdb_hlen_type=$ans
17877 *) : no gethostbyaddr, so pick harmless defaults
17878 netdb_host_type='char *'
17879 netdb_hlen_type="$sizetype"
17882 # Remove the "const" if needed. -- but then we'll have a
17884 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
17887 : check for type of argument to gethostbyname.
17888 if test "X$netdb_name_type" = X ; then
17889 case "$d_gethbyname" in
17893 Checking to see what type of argument is accepted by gethostbyname().
17895 hdrs="$define sys/types.h
17896 $d_socket sys/socket.h
17897 $i_niin netinet/in.h
17899 $i_unistd unistd.h"
17900 for xxx in "const char *" "char *"; do
17901 case "$netdb_name_type" in
17902 '') try="extern struct hostent *gethostbyname($xxx);"
17903 if ./protochk "$try" $hdrs; then
17904 echo "Your system accepts $xxx."
17905 netdb_name_type="$xxx"
17910 : In case none of those worked, prompt the user.
17911 case "$netdb_name_type" in
17912 '') rp='What is the type for the 1st argument to gethostbyname?'
17915 netdb_name_type=$ans
17919 *) : no gethostbyname, so pick harmless default
17920 netdb_name_type='char *'
17925 : check for type of 1st argument to getnetbyaddr.
17926 if test "X$netdb_net_type" = X ; then
17927 case "$d_getnbyaddr" in
17931 Checking to see what type of 1st argument is accepted by getnetbyaddr().
17933 hdrs="$define sys/types.h
17934 $d_socket sys/socket.h
17935 $i_niin netinet/in.h
17937 $i_unistd unistd.h"
17938 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
17939 case "$netdb_net_type" in
17940 '') try="extern struct netent *getnetbyaddr($xxx, int);"
17941 if ./protochk "$try" $hdrs; then
17942 echo "Your system accepts $xxx."
17943 netdb_net_type="$xxx"
17948 : In case none of those worked, prompt the user.
17949 case "$netdb_net_type" in
17950 '') rp='What is the type for the 1st argument to getnetbyaddr?'
17953 netdb_net_type=$ans
17957 *) : no getnetbyaddr, so pick harmless default
17958 netdb_net_type='long'
17962 : locate the preferred pager for this system
17969 [a-zA-Z]:/*) dflt=$pg;;
17973 [a-zA-Z]:/*) dflt=$more;;
17977 [a-zA-Z]:/*) dflt=$less;;
17980 '') dflt=/usr/ucb/more;;
17984 : Instruct ./getfile to trust the hinted or previous pager value,
17985 : even if it does not begin with a slash. For example, on os2,
17986 : pager might be cmd /c more. See comments in UU/getfile.
17991 rp='What pager is used on your system?'
17995 : see what type pids are declared as in the kernel
17996 rp="What is the type of process ids on this system?"
17997 set pid_t pidtype int stdio.h sys/types.h
18000 : Find earliest binary compatible site_perl subdirectory perl can use.
18001 xs_apiversion=$version # The current site_perl version.
18002 : Find earliest pure perl site_perl subdirectory perl can use.
18003 : The versioned directories started at 5.005.
18004 pm_apiversion='5.005'
18006 : see if ar generates random libraries by itself
18008 echo "Checking how to generate random libraries on your machine..." >&4
18009 echo 'int bar1() { return bar2(); }' > bar1.c
18010 echo 'int bar2() { return 2; }' > bar2.c
18011 $cat > foo.c <<'EOP'
18012 int main() { printf("%d\n", bar1()); exit(0); }
18014 $cc $ccflags -c bar1.c >/dev/null 2>&1
18015 $cc $ccflags -c bar2.c >/dev/null 2>&1
18016 $cc $ccflags -c foo.c >/dev/null 2>&1
18017 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
18018 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18019 $run ./foobar >/dev/null 2>&1; then
18020 echo "$ar appears to generate random libraries itself."
18023 elif $ar ts bar$_a >/dev/null 2>&1 &&
18024 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18025 $run ./foobar >/dev/null 2>&1; then
18026 echo "a table of contents needs to be added with '$ar ts'."
18033 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
18034 $test -f $ranlib || ranlib=''
18037 if $test -n "$ranlib"; then
18038 echo "your system has '$ranlib'; we'll use that."
18041 echo "your system doesn't seem to support random libraries"
18042 echo "so we'll use lorder and tsort to order the libraries."
18049 : check for type of arguments to select.
18050 case "$selecttype" in
18051 '') case "$d_select" in
18055 Checking to see what type of arguments are accepted by select().
18057 hdrs="$define sys/types.h
18058 $i_systime sys/time.h
18059 $i_sysselct sys/select.h
18060 $d_socket sys/socket.h"
18061 : The first arg can be int, unsigned, or size_t
18062 : The last arg may or may not be 'const'
18064 : void pointer has been seen but using that
18065 : breaks the selectminbits test
18066 for xxx in 'fd_set *' 'int *'; do
18067 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
18068 for tmo in 'struct timeval *' 'const struct timeval *'; do
18070 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
18071 if ./protochk "$try" $hdrs; then
18072 echo "Your system accepts $xxx."
18081 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
18082 case "$d_fd_set" in
18083 $define) dflt="fd_set *" ;;
18092 *) : no select, so pick a harmless default
18099 : check for the select 'width'
18100 case "$selectminbits" in
18101 '') case "$d_select" in
18105 Checking to see on how many bits at a time your select() operates...
18108 #include <sys/types.h>
18110 #$i_systime I_SYS_TIME
18111 #$i_systimek I_SYS_TIME_KERNEL
18116 # ifdef I_SYS_TIME_KERNEL
18119 # include <sys/time.h>
18120 # ifdef I_SYS_TIME_KERNEL
18124 #$i_sysselct I_SYS_SELECT
18125 #ifdef I_SYS_SELECT
18126 #include <sys/select.h>
18128 #$d_socket HAS_SOCKET
18130 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
18134 #define S sizeof(*(b))
18136 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
18137 #define NBITS (NBYTES * 8)
18146 fp = fopen("try.c", "r");
18152 b = ($selecttype)s;
18153 for (i = 0; i < NBITS; i++)
18157 select(fd + 1, b, 0, 0, &t);
18158 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
18159 printf("%d\n", i + 1);
18164 if eval $compile_ok; then
18165 selectminbits=`$run ./try`
18166 case "$selectminbits" in
18168 Cannot figure out on how many bits at a time your select() operates.
18169 I'll play safe and guess it is 32 bits.
18175 *) bits="$selectminbits bits" ;;
18177 echo "Your select() operates on $bits at a time." >&4
18179 rp='What is the minimum number of bits your select() operates on?'
18180 case "$byteorder" in
18181 1234|12345678) dflt=32 ;;
18186 selectminbits="$val"
18190 *) : no select, so pick a harmless default
18197 : Trace out the files included by signal.h, then look for SIGxxx names.
18198 : Remove SIGARRAYSIZE used by HPUX.
18199 : Remove SIGSTKSIZE used by Linux.
18200 : Remove SIGSTKSZ used by Posix.
18201 : Remove SIGTYP void lines used by OS2.
18202 : Some cpps, like os390, dont give the file name anywhere
18203 if [ "X$fieldn" = X ]; then
18204 : Just make some guesses. We check them later.
18205 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
18207 xxx=`echo '#include <signal.h>' |
18208 $cppstdin $cppminus $cppflags 2>/dev/null |
18209 $grep '^[ ]*#.*include' |
18210 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
18212 : Check this list of files to be sure we have parsed the cpp output ok.
18213 : This will also avoid potentially non-existent files, such
18216 for xx in $xxx /dev/null ; do
18217 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
18219 : If we have found no files, at least try signal.h
18220 case "$xxxfiles" in
18221 '') xxxfiles=`./findhdr signal.h` ;;
18224 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
18225 print substr($2, 4, 20)
18227 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
18228 print substr($3, 4, 20)
18230 : Append some common names just in case the awk scan failed.
18231 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
18232 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
18233 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
18234 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
18235 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
18237 : generate a few handy files for later
18238 $cat > signal.c <<'EOCP'
18239 #include <sys/types.h>
18240 #include <signal.h>
18244 /* Strange style to avoid deeply-nested #if/#else/#endif */
18247 # define NSIG (_NSIG)
18253 # define NSIG (SIGMAX+1)
18259 # define NSIG (SIG_MAX+1)
18265 # define NSIG (MAXSIG+1)
18271 # define NSIG (MAX_SIG+1)
18276 # ifdef SIGARRAYSIZE
18277 # define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
18283 # define NSIG (_sys_nsig) /* Solaris 2.5 */
18287 /* Default to some arbitrary number that's big enough to get most
18288 of the common signals.
18294 printf("NSIG %d\n", NSIG);
18300 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
18302 printf "#ifdef SIG"; printf $1; printf "\n"
18303 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
18304 printf $1; printf ");\n"
18308 printf "#endif /* JUST_NSIG */\n";
18309 printf "exit(0);\n}\n";
18312 $cat >signal.awk <<'EOP'
18313 BEGIN { ndups = 0 }
18314 $1 ~ /^NSIG$/ { nsig = $2 }
18315 ($1 !~ /^NSIG$/) && (NF == 2) {
18316 if ($2 > maxsig) { maxsig = $2 }
18317 if (sig_name[$2]) {
18318 dup_name[ndups] = $1
18319 dup_num[ndups] = $2
18331 printf("NSIG %d\n", nsig);
18332 for (n = 1; n < nsig; n++) {
18334 printf("%s %d\n", sig_name[n], sig_num[n])
18337 printf("NUM%d %d\n", n, n)
18340 for (n = 0; n < ndups; n++) {
18341 printf("%s %d\n", dup_name[n], dup_num[n])
18345 $cat >signal_cmd <<EOS
18347 if $test -s signal.lst; then
18348 echo "Using your existing signal.lst file"
18353 $cat >>signal_cmd <<'EOS'
18356 if eval $compile_ok; then
18357 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst
18359 echo "(I can't seem be able to compile the whole test program)" >&4
18360 echo "(I'll try it in little pieces.)" >&4
18361 set signal -DJUST_NSIG
18362 if eval $compile_ok; then
18363 $run ./signal$_exe > signal.nsg
18366 echo "I can't seem to figure out how many signals you have." >&4
18367 echo "Guessing 50." >&4
18368 echo 'NSIG 50' > signal.nsg
18370 : Now look at all the signal names, one at a time.
18371 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
18372 $cat > signal.c <<EOCP
18373 #include <sys/types.h>
18374 #include <signal.h>
18377 printf("$xx %d\n", SIG${xx});
18382 if eval $compile; then
18383 echo "SIG${xx} found."
18384 $run ./signal$_exe >> signal.ls1
18386 echo "SIG${xx} NOT found."
18389 if $test -s signal.ls1; then
18390 $cat signal.nsg signal.ls1 |
18391 $sort -n | $uniq | $awk -f signal.awk >signal.lst
18395 if $test -s signal.lst; then
18398 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
18399 echo 'kill -l' >signal
18400 set X `csh -f <signal`
18404 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
18406 echo $@ | $tr ' ' $trnl | \
18407 $awk '{ printf "%s %d\n", $1, ++s; }
18408 END { printf "NSIG %d\n", ++s }' >signal.lst
18410 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
18412 chmod a+x signal_cmd
18413 $eunicefix signal_cmd
18415 : generate list of signal names
18417 case "$sig_name_init" in
18419 *) case "$sig_num_init" in
18420 ''|*,*) doinit=yes ;;
18425 echo "Generating a list of signal names and numbers..." >&4
18427 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
18428 sig_name=`$awk 'BEGIN { printf "ZERO " }
18429 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
18430 sig_num=`$awk 'BEGIN { printf "0 " }
18431 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
18432 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
18433 !/^NSIG/ { printf "\"%s\", ", $1 }
18434 END { printf "0\n" }' signal.lst`
18435 sig_num_init=`$awk 'BEGIN { printf "0, " }
18436 !/^NSIG/ { printf "%d, ", $2}
18437 END { printf "0\n"}' signal.lst`
18440 echo "The following $sig_count signals are available:"
18442 echo $sig_name | $awk \
18443 'BEGIN { linelen = 0 }
18445 for (i = 1; i <= NF; i++) {
18446 name = "SIG" $i " "
18447 linelen = linelen + length(name)
18448 if (linelen > 70) {
18450 linelen = length(name)
18456 sig_size=`echo $sig_name | awk '{print NF}'`
18457 $rm -f signal signal.c signal.awk signal.lst signal_cmd
18460 case "$sizetype" in
18461 *_t) zzz="$sizetype" ;;
18462 *) zzz="filesize" ;;
18464 echo "Checking the size of $zzz..." >&4
18466 #include <sys/types.h>
18469 printf("%d\n", (int)sizeof($sizetype));
18474 if eval $compile_ok; then
18478 echo "(I can't execute the test program--guessing $sizesize.)" >&4
18481 echo "Your $zzz size is $sizesize bytes."
18486 echo "(I can't compile the test program--guessing $sizesize.)" >&4
18490 : check for socklen_t
18492 echo "Checking to see if you have socklen_t..." >&4
18494 #include <sys/types.h>
18495 #$d_socket HAS_SOCKET
18497 #include <sys/socket.h>
18499 int main() { socklen_t x = 16; }
18502 if eval $compile; then
18504 echo "You have socklen_t."
18507 echo "You do not have socklen_t."
18508 case "$sizetype" in
18509 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
18516 : see if this is a socks.h system
18517 set socks.h i_socks
18520 : check for type of the size argument to socket calls
18521 case "$d_socket" in
18525 Checking to see what type is the last argument of accept().
18528 case "$d_socklen_t" in
18529 "$define") yyy="$yyy socklen_t"
18531 yyy="$yyy $sizetype int long unsigned"
18532 for xxx in $yyy; do
18533 case "$socksizetype" in
18534 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
18535 case "$usesocks" in
18537 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
18538 echo "Your system accepts '$xxx *' for the last argument of accept()."
18539 socksizetype="$xxx"
18542 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
18543 echo "Your system accepts '$xxx *' for the last argument of accept()."
18544 socksizetype="$xxx"
18551 : In case none of those worked, prompt the user.
18552 case "$socksizetype" in
18553 '') rp='What is the type for socket address structure sizes?'
18560 *) : no sockets, so pick relatively harmless default
18565 : see what type is used for signed size_t
18566 set ssize_t ssizetype int stdio.h sys/types.h
18571 #include <sys/types.h>
18572 #define Size_t $sizetype
18573 #define SSize_t $dflt
18576 if (sizeof(Size_t) == sizeof(SSize_t))
18578 else if (sizeof(Size_t) == sizeof(int))
18587 if eval $compile_ok && $run ./try > /dev/null; then
18588 ssizetype=`$run ./try`
18589 echo "I'll be using $ssizetype for functions returning a byte count." >&4
18592 Help! I can't compile and run the ssize_t test program: please enlighten me!
18593 (This is probably a misconfiguration in your system or libraries, and
18594 you really ought to fix it. Still, I'll try anyway.)
18596 I need a type that is the same size as $sizetype, but is guaranteed to
18597 be signed. Common values are ssize_t, int and long.
18600 rp="What signed type is the same size as $sizetype?"
18606 : see what type of char stdio uses.
18608 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
18609 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
18610 echo "Your stdio uses unsigned chars." >&4
18611 stdchar="unsigned char"
18613 echo "Your stdio uses signed chars." >&4
18620 : see what type uids are declared as in the kernel
18622 echo "Looking for the type for user ids returned by getuid()."
18623 set uid_t uidtype xxx stdio.h sys/types.h
18627 xxx=`./findhdr sys/user.h`
18628 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
18630 unsigned) dflt="$1 $2" ;;
18634 *) dflt="$uidtype";;
18637 uid_t) echo "uid_t found." ;;
18638 *) rp="What is the type for user ids returned by getuid()?"
18646 *_t) zzz="$uidtype" ;;
18649 echo "Checking the size of $zzz..." >&4
18651 #include <sys/types.h>
18654 printf("%d\n", (int)sizeof($uidtype));
18659 if eval $compile_ok; then
18663 echo "(I can't execute the test program--guessing $uidsize.)" >&4
18666 echo "Your $zzz is $uidsize bytes long."
18671 echo "(I can't compile the test program--guessing $uidsize.)" >&4
18676 *_t) zzz="$uidtype" ;;
18679 echo "Checking the sign of $zzz..." >&4
18681 #include <sys/types.h>
18692 if eval $compile; then
18696 echo "(I can't execute the test program--guessing unsigned.)" >&4
18700 1) echo "Your $zzz is unsigned." ;;
18701 -1) echo "Your $zzz is signed." ;;
18707 echo "(I can't compile the test program--guessing unsigned.)" >&4
18713 $echo "Checking the format string to be used for uids..." >&4
18716 -1) if $test X"$uidsize" = X"$ivsize"; then
18717 uidformat="$ivdformat"
18719 if $test X"$uidsize" = X"$longsize"; then
18722 if $test X"$uidsize" = X"$intsize"; then
18725 if $test X"$uidsize" = X"$shortsize"; then
18732 *) if $test X"$uidsize" = X"$uvsize"; then
18733 uidformat="$uvuformat"
18735 if $test X"$uidsize" = X"$longsize"; then
18738 if $test X"$uidsize" = X"$intsize"; then
18741 if $test X"$uidsize" = X"$shortsize"; then
18750 : determine compiler compiler
18759 if $test -f "$byacc$_exe"; then
18761 comp="byacc or $comp"
18763 if $test -f "$bison$_exe"; then
18764 comp="$comp or bison -y"
18766 rp="Which compiler compiler ($comp) shall I use?"
18775 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
18781 : see if this is a fp.h system
18785 : see if this is a fp_class.h system
18786 set fp_class.h i_fp_class
18789 : see if this is a ieeefp.h system
18790 case "$i_ieeefp" in
18791 '' ) set ieeefp.h i_ieeefp
18796 : see if this is a libutil.h system
18797 set libutil.h i_libutil
18800 : see if mach cthreads are available
18801 if test "X$usethreads" = "X$define"; then
18802 set mach/cthreads.h i_machcthr
18805 i_machcthr="$undef"
18810 : see if this is a math.h system
18814 : see if this is a mntent.h system
18815 set mntent.h i_mntent
18818 : see if ndbm.h is available
18824 # Some Linux distributions such as RedHat 7.1 put the
18825 # ndbm.h header in /usr/include/gdbm/ndbm.h.
18826 if $test -f /usr/include/gdbm/ndbm.h; then
18827 echo '<gdbm/ndbm.h> found.'
18828 ccflags="$ccflags -I/usr/include/gdbm"
18829 cppflags="$cppflags -I/usr/include/gdbm"
18837 : see if dbm_open exists
18838 set dbm_open d_dbm_open
18840 case "$d_dbm_open" in
18843 echo "We won't be including <ndbm.h>"
18852 : see if net/errno.h is available
18854 set net/errno.h val
18857 : Unfortunately, it causes problems on some systems. Arrgh.
18860 cat > try.c <<'EOM'
18863 #include <net/errno.h>
18869 if $cc $ccflags -c try.c >/dev/null 2>&1; then
18870 echo "We'll be including <net/errno.h>." >&4
18872 echo "We won't be including <net/errno.h>." >&4
18881 : see if netinet/tcp.h is available
18882 set netinet/tcp.h i_netinettcp
18885 : see if this is a poll.h system
18889 : see if this is a prot.h system
18894 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
18895 $cat <<'EOSH' > Cppsym.know
18896 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
18897 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
18898 alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX
18899 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
18900 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
18901 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
18902 bull c cadmus clipper CMU COFF COMPILER_VERSION
18903 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
18904 CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
18905 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
18906 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
18908 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
18909 H3050R H3050RX hbullx20 hcx host_mips
18910 hp200 hp300 hp700 HP700 hp800 hp9000
18911 hp9000s200 hp9000s300 hp9000s400 hp9000s500
18912 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
18913 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
18914 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
18915 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
18916 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
18917 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
18918 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
18919 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
18920 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
18921 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
18922 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
18923 MATH_HAS_NO_SIDE_EFFECTS
18924 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
18925 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
18926 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
18927 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
18928 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
18929 NetBSD news1500 news1700 news1800 news1900 news3700
18930 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
18931 ns32016 ns32332 ns32k nsc32000
18932 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
18933 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
18934 pc532 pdp11 PGC PIC plexus PORTAR posix
18935 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
18936 POSIX_C_SOURCE POSIX_SOURCE POWER
18937 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
18938 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
18939 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
18940 sony sony_news sonyrisc sparc sparclite spectrum
18941 stardent stdc STDC_EXT stratos sun sun3 sun386
18942 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
18943 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
18944 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
18945 sysV68 sysV88 Tek4132 Tek4300 titan
18946 TM3200 TM5400 TM5600
18947 tower tower32 tower32_200 tower32_600 tower32_700
18948 tower32_800 tower32_850 tss
18949 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
18950 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
18951 unix UNIX95 UNIX99 unixpc unos
18952 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
18953 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
18954 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
18956 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
18957 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
18958 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
18961 # Maybe put other stuff here too.
18962 cat <<EOSH >>Cppsym.know
18965 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
18966 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
18967 $cat Cppsym.know > Cppsym.c
18968 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
18969 $rm -f Cppsym.a Cppsym.b Cppsym.c
18970 cat <<EOSH > Cppsym
18972 if $test \$# -gt 0; then
18973 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
18974 if $test -s Cppsym.got; then
18981 $tr " " "$trnl" | ./Cppsym.try
18987 cat <<EOSH > Cppsym.try
18989 cat <<'EOCP' > try.c
18995 cat <<'EOSH' >> Cppsym.try
18997 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
18998 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
18999 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
19000 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
19002 echo 'return 0;}' >> try.c
19004 cat <<EOSH >> Cppsym.try
19006 case "$osname-$gccversion" in
19007 irix-) ccflags="\$ccflags -woff 1178" ;;
19008 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
19010 $cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try
19012 chmod +x Cppsym.try
19013 $eunicefix Cppsym.try
19014 ./Cppsym < Cppsym.know > Cppsym.true
19015 : now check the C compiler for additional symbols
19016 postprocess_cc_v=''
19018 aix) postprocess_cc_v="|$tr , ' '" ;;
19025 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
19028 -D*) echo "\$i" | $sed 's/^-D//';;
19029 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
19034 postprocess_cc_v=''
19037 ./ccsym > ccsym1.raw
19038 if $test -s ccsym1.raw; then
19039 $sort ccsym1.raw | $uniq >ccsym.raw
19041 mv ccsym1.raw ccsym.raw
19044 $awk '/\=/ { print $0; next }
19045 { print $0"=1" }' ccsym.raw >ccsym.list
19046 $awk '/\=/ { print $0; next }
19047 { print $0"=1" }' Cppsym.true >ccsym.true
19048 $comm -13 ccsym.true ccsym.list >ccsym.own
19049 $comm -12 ccsym.true ccsym.list >ccsym.com
19050 $comm -23 ccsym.true ccsym.list >ccsym.cpp
19052 if $test -z ccsym.raw; then
19053 echo "Your C compiler doesn't seem to define any symbols!" >&4
19055 echo "However, your C preprocessor defines the following symbols:"
19058 cppsymbols=`$cat Cppsym.true`
19059 cppsymbols=`echo $cppsymbols`
19060 cppccsymbols="$cppsymbols"
19062 if $test -s ccsym.com; then
19063 echo "Your C compiler and pre-processor define these symbols:"
19064 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
19067 cppccsymbols=`$cat ccsym.com`
19068 cppccsymbols=`echo $cppccsymbols`
19069 $test "$silent" || sleep 1
19071 if $test -s ccsym.cpp; then
19072 $test "$also" && echo " "
19073 echo "Your C pre-processor ${also}defines the following symbols:"
19074 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
19076 cppsymbols=`$cat ccsym.cpp`
19077 cppsymbols=`echo $cppsymbols`
19078 $test "$silent" || sleep 1
19080 if $test -s ccsym.own; then
19081 $test "$also" && echo " "
19082 echo "Your C compiler ${also}defines the following cpp symbols:"
19083 $sed -e 's/\(..*\)=1/\1/' ccsym.own
19084 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
19085 ccsymbols=`$cat ccsym.own`
19086 ccsymbols=`echo $ccsymbols`
19087 $test "$silent" || sleep 1
19091 : see if this is a termio system
19095 if $test `./findhdr termios.h`; then
19096 set tcsetattr i_termios
19102 "$define") echo "You have POSIX termios.h... good!" >&4;;
19103 *) if ./Cppsym pyr; then
19104 case "`/bin/universe`" in
19105 ucb) if $test `./findhdr sgtty.h`; then
19107 echo "<sgtty.h> found." >&4
19109 echo "System is pyramid with BSD universe."
19110 echo "<sgtty.h> not found--you could have problems." >&4
19112 *) if $test `./findhdr termio.h`; then
19114 echo "<termio.h> found." >&4
19116 echo "System is pyramid with USG universe."
19117 echo "<termio.h> not found--you could have problems." >&4
19121 if $test `./findhdr termio.h`; then
19122 echo "<termio.h> found." >&4
19124 elif $test `./findhdr sgtty.h`; then
19125 echo "<sgtty.h> found." >&4
19128 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
19131 if $test `./findhdr sgtty.h`; then
19132 echo "<sgtty.h> found." >&4
19134 elif $test `./findhdr termio.h`; then
19135 echo "<termio.h> found." >&4
19138 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
19142 set i_termio; eval $setvar
19143 val=$val2; set i_sgtty; eval $setvar
19144 val=$val3; set i_termios; eval $setvar
19146 : see if stddef is available
19147 set stddef.h i_stddef
19150 : see if this is a sunmath.h system
19151 set sunmath.h i_sunmath
19154 : see if sys/access.h is available
19155 set sys/access.h i_sysaccess
19158 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
19159 set sys/filio.h i_sysfilio
19162 if $test `./findhdr sys/ioctl.h`; then
19164 echo '<sys/ioctl.h> found.' >&4
19167 if $test $i_sysfilio = "$define"; then
19168 echo '<sys/ioctl.h> NOT found.' >&4
19170 $test $i_sgtty = "$define" && xxx="sgtty.h"
19171 $test $i_termio = "$define" && xxx="termio.h"
19172 $test $i_termios = "$define" && xxx="termios.h"
19173 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
19179 : see if socket ioctl defs are in sys/sockio.h
19181 xxx=`./findhdr sys/sockio.h`
19182 if $test "$xxx"; then
19183 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
19185 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
19188 echo "No socket ioctls found in <sys/sockio.h>." >&4
19193 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
19200 : see if this is a syslog.h system
19201 set syslog.h i_syslog
19205 : see if this is a sys/mode.h system
19206 set sys/mode.h i_sysmode
19209 : see if sys/resource.h has to be included
19210 set sys/resource.h i_sysresrc
19213 : see if sys/security.h is available
19214 set sys/security.h i_syssecrt
19217 : see if this is a sys/statvfs.h system
19218 set sys/statvfs.h i_sysstatvfs
19221 : see if this is a sys/un.h system
19222 set sys/un.h i_sysun
19226 : see if this is a sys/utsname.h system
19227 set sys/utsname.h i_sysutsname
19230 : see if this is a syswait system
19231 set sys/wait.h i_syswait
19234 : see if this is a ustat.h system
19235 set ustat.h i_ustat
19238 : see if this is an utime system
19239 set utime.h i_utime
19242 : see if this is a values.h system
19243 set values.h i_values
19246 : see if this is a vfork system
19249 set vfork.h i_vfork
19257 : see if gdbm.h is available
19262 : see if gdbm_open exists
19263 set gdbm_open d_gdbm_open
19265 case "$d_gdbm_open" in
19268 echo "We won't be including <gdbm.h>"
19278 echo "Looking for extensions..." >&4
19279 : If we are using the old config.sh, known_extensions may contain
19280 : old or inaccurate or duplicate values.
19281 known_extensions=''
19282 nonxs_extensions=''
19283 : We do not use find because it might not be available.
19284 : We do not just use MANIFEST because the user may have dropped
19285 : some additional extensions into the source tree and expect them
19288 : Function to recursively find available extensions, ignoring DynaLoader
19289 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
19293 DynaLoader|dynaload) ;;
19295 if $test -f $xxx/$xxx.xs; then
19296 known_extensions="$known_extensions $1$xxx";
19297 elif $test -f $xxx/Makefile.PL; then
19298 nonxs_extensions="$nonxs_extensions $1$xxx";
19300 if $test -d $xxx -a $# -lt 10; then
19303 eval $find_extensions;
19315 eval $find_extensions
19316 # Special case: Add in threads/shared since it is not picked up by the
19317 # recursive find above (and adding in general recursive finding breaks
19318 # SDBM_File/sdbm). A.D. 10/25/2001.
19319 known_extensions="$known_extensions threads/shared"
19320 set X $nonxs_extensions
19322 nonxs_extensions="$*"
19323 set X $known_extensions
19325 known_extensions="$*"
19328 : Now see which are supported on this system.
19330 for xxx in $known_extensions ; do
19334 $define) avail_ext="$avail_ext $xxx" ;;
19337 GDBM_File|gdbm_fil)
19339 $define) avail_ext="$avail_ext $xxx" ;;
19342 I18N/Langinfo|i18n_lan)
19343 case "$i_langinfo$d_nl_langinfo" in
19344 $define$define) avail_ext="$avail_ext $xxx" ;;
19347 NDBM_File|ndbm_fil)
19350 case "$osname-$use64bitint" in
19353 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
19356 *) avail_ext="$avail_ext $xxx" ;;
19361 ODBM_File|odbm_fil)
19362 case "${i_dbm}${i_rpcsvcdbm}" in
19364 case "$osname-$use64bitint" in
19367 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
19370 *) avail_ext="$avail_ext $xxx" ;;
19376 case "$useposix" in
19377 true|define|y) avail_ext="$avail_ext $xxx" ;;
19381 case "$useopcode" in
19382 true|define|y) avail_ext="$avail_ext $xxx" ;;
19386 case "$d_socket" in
19389 beos) ;; # not unless BONE
19390 *) avail_ext="$avail_ext $xxx" ;;
19395 Sys/Syslog|sys/syslog)
19396 : XXX syslog requires socket
19397 case "$d_socket" in
19398 true|$define|y) avail_ext="$avail_ext $xxx" ;;
19402 case "$usethreads" in
19404 case "$useithreads" in
19405 $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
19409 XS/APItest|xs/apitest)
19410 # This is just for testing. Skip it unless we have dynamic loading.
19413 $define) avail_ext="$avail_ext $xxx" ;;
19416 XS/Typemap|xs/typemap)
19417 # This is just for testing. Skip it unless we have dynamic loading.
19419 $define) avail_ext="$avail_ext $xxx" ;;
19422 threads|threads/shared)
19423 # threads and threads::shared are special cases.
19424 # To stop people from asking "Perl 5.8.0 was supposed
19425 # to have this new fancy threads implementation but my
19426 # perl doesn't have it" and from people trying to
19427 # (re)install the threads module using CPAN.pm and
19428 # CPAN.pm then offering to reinstall Perl 5.8.0,
19429 # the threads.pm and threads/shared.pm will always be
19430 # there, croaking informatively ("you need to rebuild
19431 # all of Perl with threads, sorry") when threads haven't
19432 # been compiled in.
19434 avail_ext="$avail_ext $xxx"
19437 : XXX Do we need a useipcsysv variable here
19438 case "${d_msg}${d_sem}${d_shm}" in
19439 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
19442 *) avail_ext="$avail_ext $xxx"
19451 : Now see which nonxs extensions are supported on this system.
19452 : For now assume all are.
19454 for xxx in $nonxs_extensions ; do
19456 *) nonxs_ext="$nonxs_ext $xxx"
19468 A number of extensions are supplied with $package. You may choose to
19469 compile these extensions for dynamic loading (the default), compile
19470 them into the $package executable (static loading), or not include
19471 them at all. Answer "none" to include no extensions.
19472 Note that DynaLoader is always built and need not be mentioned here.
19475 case "$dynamic_ext" in
19477 : Exclude those listed in static_ext
19479 for xxx in $avail_ext; do
19480 case " $static_ext " in
19482 *) dflt="$dflt $xxx" ;;
19489 *) dflt="$dynamic_ext"
19490 # Perhaps we are reusing an old out-of-date config.sh.
19493 if test X"$dynamic_ext" != X"$avail_ext"; then
19495 NOTICE: Your previous config.sh list may be incorrect.
19496 The extensions now available to you are
19498 but the default list from your previous config.sh is
19510 rp="What extensions do you wish to load dynamically?"
19513 none) dynamic_ext=' ' ;;
19514 *) dynamic_ext="$ans" ;;
19517 case "$static_ext" in
19519 : Exclude those already listed in dynamic linking
19521 for xxx in $avail_ext; do
19522 case " $dynamic_ext " in
19524 *) dflt="$dflt $xxx" ;;
19531 *) dflt="$static_ext"
19538 rp="What extensions do you wish to load statically?"
19541 none) static_ext=' ' ;;
19542 *) static_ext="$ans" ;;
19547 A number of extensions are supplied with $package. Answer "none"
19548 to include no extensions.
19549 Note that DynaLoader is always built and need not be mentioned here.
19552 case "$static_ext" in
19553 '') dflt="$avail_ext" ;;
19554 *) dflt="$static_ext"
19555 # Perhaps we are reusing an old out-of-date config.sh.
19558 if test X"$static_ext" != X"$avail_ext"; then
19560 NOTICE: Your previous config.sh list may be incorrect.
19561 The extensions now available to you are
19563 but the default list from your previous config.sh is
19572 : Exclude those that are not xs extensions
19576 rp="What extensions do you wish to include?"
19579 none) static_ext=' ' ;;
19580 *) static_ext="$ans" ;;
19585 # Encode is a special case. If we are building Encode as a static
19586 # extension, we need to explicitly list its subextensions as well.
19587 # For other nested extensions, this is handled automatically by
19588 # the appropriate Makefile.PL.
19589 case " $static_ext " in
19590 *" Encode "*) # Add the subextensions of Encode
19592 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
19593 static_ext="$static_ext Encode/$xxx"
19599 set X $dynamic_ext $static_ext $nonxs_ext
19603 : Remove libraries needed only for extensions
19604 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
19605 : The exception is SunOS 4.x, which needs them.
19606 case "${osname}X${osvers}" in
19610 *) case "$usedl" in
19611 $define|true|[yY]*)
19612 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
19616 *) perllibs="$libs"
19622 : Remove build directory name from cppstdin so it can be used from
19623 : either the present location or the final installed location.
19625 : Get out of the UU directory to get correct path name.
19627 case "$cppstdin" in
19629 echo "Stripping down cppstdin path name"
19635 : end of configuration questions
19637 echo "End of configuration questions."
19640 : back to where it started
19641 if test -d ../UU; then
19645 : configuration may be patched via a 'config.arch' file
19646 if $test -f config.arch; then
19647 echo "I see a config.arch file, loading it."
19651 : configuration may be patched via a 'config.over' file
19652 if $test -f config.over; then
19655 rp='I see a config.over file. Do you wish to load it?'
19658 n*) echo "OK, I'll ignore it.";;
19660 echo "Configuration override changes have been loaded."
19665 : in case they want portability, strip down executable paths
19666 case "$d_portable" in
19669 echo "Stripping down executable paths..." >&4
19670 for file in $loclist $trylist; do
19672 eval $file=`basename $temp`
19677 : create config.sh file
19679 echo "Creating config.sh..." >&4
19680 $spitshell <<EOT >config.sh
19683 # This file was produced by running the Configure script. It holds all the
19684 # definitions figured out by Configure. Should you modify one of these values,
19685 # do not forget to propagate your changes by running "Configure -der". You may
19686 # instead choose to run each of the .SH files by yourself, or "Configure -S".
19689 # Package name : $package
19690 # Source directory : $src
19691 # Configuration time: $cf_time
19692 # Configured by : $cf_by
19693 # Target system : $myuname
19703 Revision='$Revision'
19711 alignbytes='$alignbytes'
19712 ansi2knr='$ansi2knr'
19713 aphostname='$aphostname'
19714 api_revision='$api_revision'
19715 api_subversion='$api_subversion'
19716 api_version='$api_version'
19717 api_versionstring='$api_versionstring'
19720 archlibexp='$archlibexp'
19721 archname64='$archname64'
19722 archname='$archname'
19723 archobjs='$archobjs'
19724 asctime_r_proto='$asctime_r_proto'
19732 byteorder='$byteorder'
19734 castflags='$castflags'
19737 cccdlflags='$cccdlflags'
19738 ccdlflags='$ccdlflags'
19740 ccflags_uselargefiles='$ccflags_uselargefiles'
19742 ccsymbols='$ccsymbols'
19743 ccversion='$ccversion'
19745 cf_email='$cf_email'
19747 charsize='$charsize'
19751 clocktype='$clocktype'
19753 compress='$compress'
19754 contains='$contains'
19758 cpp_stuff='$cpp_stuff'
19759 cppccsymbols='$cppccsymbols'
19760 cppflags='$cppflags'
19762 cppminus='$cppminus'
19764 cppstdin='$cppstdin'
19765 cppsymbols='$cppsymbols'
19766 crypt_r_proto='$crypt_r_proto'
19767 cryptlib='$cryptlib'
19769 ctermid_r_proto='$ctermid_r_proto'
19770 ctime_r_proto='$ctime_r_proto'
19771 d_Gconvert='$d_Gconvert'
19772 d_PRIEUldbl='$d_PRIEUldbl'
19773 d_PRIFUldbl='$d_PRIFUldbl'
19774 d_PRIGUldbl='$d_PRIGUldbl'
19775 d_PRIXU64='$d_PRIXU64'
19776 d_PRId64='$d_PRId64'
19777 d_PRIeldbl='$d_PRIeldbl'
19778 d_PRIfldbl='$d_PRIfldbl'
19779 d_PRIgldbl='$d_PRIgldbl'
19780 d_PRIi64='$d_PRIi64'
19781 d_PRIo64='$d_PRIo64'
19782 d_PRIu64='$d_PRIu64'
19783 d_PRIx64='$d_PRIx64'
19784 d_SCNfldbl='$d_SCNfldbl'
19785 d__fwalk='$d__fwalk'
19786 d_access='$d_access'
19787 d_accessx='$d_accessx'
19789 d_archlib='$d_archlib'
19790 d_asctime_r='$d_asctime_r'
19793 d_attribut='$d_attribut'
19797 d_bsdgetpgrp='$d_bsdgetpgrp'
19798 d_bsdsetpgrp='$d_bsdsetpgrp'
19800 d_casti32='$d_casti32'
19801 d_castneg='$d_castneg'
19802 d_charvspr='$d_charvspr'
19804 d_chroot='$d_chroot'
19805 d_chsize='$d_chsize'
19807 d_closedir='$d_closedir'
19808 d_cmsghdr_s='$d_cmsghdr_s'
19811 d_crypt_r='$d_crypt_r'
19813 d_ctermid_r='$d_ctermid_r'
19814 d_ctime_r='$d_ctime_r'
19815 d_cuserid='$d_cuserid'
19816 d_dbl_dig='$d_dbl_dig'
19817 d_dbminitproto='$d_dbminitproto'
19818 d_difftime='$d_difftime'
19820 d_dirnamlen='$d_dirnamlen'
19821 d_dlerror='$d_dlerror'
19822 d_dlopen='$d_dlopen'
19823 d_dlsymun='$d_dlsymun'
19824 d_dosuid='$d_dosuid'
19825 d_drand48_r='$d_drand48_r'
19826 d_drand48proto='$d_drand48proto'
19828 d_eaccess='$d_eaccess'
19829 d_endgrent='$d_endgrent'
19830 d_endgrent_r='$d_endgrent_r'
19831 d_endhent='$d_endhent'
19832 d_endhostent_r='$d_endhostent_r'
19833 d_endnent='$d_endnent'
19834 d_endnetent_r='$d_endnetent_r'
19835 d_endpent='$d_endpent'
19836 d_endprotoent_r='$d_endprotoent_r'
19837 d_endpwent='$d_endpwent'
19838 d_endpwent_r='$d_endpwent_r'
19839 d_endsent='$d_endsent'
19840 d_endservent_r='$d_endservent_r'
19841 d_eofnblk='$d_eofnblk'
19842 d_eunice='$d_eunice'
19843 d_fchdir='$d_fchdir'
19844 d_fchmod='$d_fchmod'
19845 d_fchown='$d_fchown'
19847 d_fcntl_can_lock='$d_fcntl_can_lock'
19848 d_fd_macros='$d_fd_macros'
19849 d_fd_set='$d_fd_set'
19850 d_fds_bits='$d_fds_bits'
19851 d_fgetpos='$d_fgetpos'
19852 d_finite='$d_finite'
19853 d_finitel='$d_finitel'
19854 d_flexfnam='$d_flexfnam'
19856 d_flockproto='$d_flockproto'
19858 d_fp_class='$d_fp_class'
19859 d_fpathconf='$d_fpathconf'
19860 d_fpclass='$d_fpclass'
19861 d_fpclassify='$d_fpclassify'
19862 d_fpclassl='$d_fpclassl'
19863 d_fpos64_t='$d_fpos64_t'
19864 d_frexpl='$d_frexpl'
19865 d_fs_data_s='$d_fs_data_s'
19866 d_fseeko='$d_fseeko'
19867 d_fsetpos='$d_fsetpos'
19868 d_fstatfs='$d_fstatfs'
19869 d_fstatvfs='$d_fstatvfs'
19871 d_ftello='$d_ftello'
19873 d_getcwd='$d_getcwd'
19874 d_getespwnam='$d_getespwnam'
19875 d_getfsstat='$d_getfsstat'
19876 d_getgrent='$d_getgrent'
19877 d_getgrent_r='$d_getgrent_r'
19878 d_getgrgid_r='$d_getgrgid_r'
19879 d_getgrnam_r='$d_getgrnam_r'
19880 d_getgrps='$d_getgrps'
19881 d_gethbyaddr='$d_gethbyaddr'
19882 d_gethbyname='$d_gethbyname'
19883 d_gethent='$d_gethent'
19884 d_gethname='$d_gethname'
19885 d_gethostbyaddr_r='$d_gethostbyaddr_r'
19886 d_gethostbyname_r='$d_gethostbyname_r'
19887 d_gethostent_r='$d_gethostent_r'
19888 d_gethostprotos='$d_gethostprotos'
19889 d_getitimer='$d_getitimer'
19890 d_getlogin='$d_getlogin'
19891 d_getlogin_r='$d_getlogin_r'
19892 d_getmnt='$d_getmnt'
19893 d_getmntent='$d_getmntent'
19894 d_getnbyaddr='$d_getnbyaddr'
19895 d_getnbyname='$d_getnbyname'
19896 d_getnent='$d_getnent'
19897 d_getnetbyaddr_r='$d_getnetbyaddr_r'
19898 d_getnetbyname_r='$d_getnetbyname_r'
19899 d_getnetent_r='$d_getnetent_r'
19900 d_getnetprotos='$d_getnetprotos'
19901 d_getpagsz='$d_getpagsz'
19902 d_getpbyname='$d_getpbyname'
19903 d_getpbynumber='$d_getpbynumber'
19904 d_getpent='$d_getpent'
19905 d_getpgid='$d_getpgid'
19906 d_getpgrp2='$d_getpgrp2'
19907 d_getpgrp='$d_getpgrp'
19908 d_getppid='$d_getppid'
19909 d_getprior='$d_getprior'
19910 d_getprotobyname_r='$d_getprotobyname_r'
19911 d_getprotobynumber_r='$d_getprotobynumber_r'
19912 d_getprotoent_r='$d_getprotoent_r'
19913 d_getprotoprotos='$d_getprotoprotos'
19914 d_getprpwnam='$d_getprpwnam'
19915 d_getpwent='$d_getpwent'
19916 d_getpwent_r='$d_getpwent_r'
19917 d_getpwnam_r='$d_getpwnam_r'
19918 d_getpwuid_r='$d_getpwuid_r'
19919 d_getsbyname='$d_getsbyname'
19920 d_getsbyport='$d_getsbyport'
19921 d_getsent='$d_getsent'
19922 d_getservbyname_r='$d_getservbyname_r'
19923 d_getservbyport_r='$d_getservbyport_r'
19924 d_getservent_r='$d_getservent_r'
19925 d_getservprotos='$d_getservprotos'
19926 d_getspnam='$d_getspnam'
19927 d_getspnam_r='$d_getspnam_r'
19928 d_gettimeod='$d_gettimeod'
19929 d_gmtime_r='$d_gmtime_r'
19930 d_gnulibc='$d_gnulibc'
19931 d_grpasswd='$d_grpasswd'
19932 d_hasmntopt='$d_hasmntopt'
19935 d_inetaton='$d_inetaton'
19936 d_int64_t='$d_int64_t'
19937 d_isascii='$d_isascii'
19938 d_isfinite='$d_isfinite'
19941 d_isnanl='$d_isnanl'
19942 d_killpg='$d_killpg'
19943 d_lchown='$d_lchown'
19944 d_ldbl_dig='$d_ldbl_dig'
19946 d_localtime_r='$d_localtime_r'
19947 d_locconv='$d_locconv'
19949 d_longdbl='$d_longdbl'
19950 d_longlong='$d_longlong'
19951 d_lseekproto='$d_lseekproto'
19953 d_madvise='$d_madvise'
19955 d_mbstowcs='$d_mbstowcs'
19956 d_mbtowc='$d_mbtowc'
19957 d_memchr='$d_memchr'
19958 d_memcmp='$d_memcmp'
19959 d_memcpy='$d_memcpy'
19960 d_memmove='$d_memmove'
19961 d_memset='$d_memset'
19963 d_mkdtemp='$d_mkdtemp'
19964 d_mkfifo='$d_mkfifo'
19965 d_mkstemp='$d_mkstemp'
19966 d_mkstemps='$d_mkstemps'
19967 d_mktime='$d_mktime'
19970 d_modfl_pow32_bug='$d_modfl_pow32_bug'
19971 d_modflproto='$d_modflproto'
19972 d_mprotect='$d_mprotect'
19974 d_msg_ctrunc='$d_msg_ctrunc'
19975 d_msg_dontroute='$d_msg_dontroute'
19976 d_msg_oob='$d_msg_oob'
19977 d_msg_peek='$d_msg_peek'
19978 d_msg_proxy='$d_msg_proxy'
19979 d_msgctl='$d_msgctl'
19980 d_msgget='$d_msgget'
19981 d_msghdr_s='$d_msghdr_s'
19982 d_msgrcv='$d_msgrcv'
19983 d_msgsnd='$d_msgsnd'
19985 d_munmap='$d_munmap'
19986 d_mymalloc='$d_mymalloc'
19988 d_nl_langinfo='$d_nl_langinfo'
19989 d_nv_preserves_uv='$d_nv_preserves_uv'
19990 d_off64_t='$d_off64_t'
19991 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
19992 d_oldpthreads='$d_oldpthreads'
19993 d_oldsock='$d_oldsock'
19995 d_pathconf='$d_pathconf'
19997 d_perl_otherlibdirs='$d_perl_otherlibdirs'
19998 d_phostname='$d_phostname'
20001 d_portable='$d_portable'
20002 d_procselfexe='$d_procselfexe'
20003 d_pthread_atfork='$d_pthread_atfork'
20004 d_pthread_yield='$d_pthread_yield'
20006 d_pwchange='$d_pwchange'
20007 d_pwclass='$d_pwclass'
20008 d_pwcomment='$d_pwcomment'
20009 d_pwexpire='$d_pwexpire'
20010 d_pwgecos='$d_pwgecos'
20011 d_pwpasswd='$d_pwpasswd'
20012 d_pwquota='$d_pwquota'
20015 d_random_r='$d_random_r'
20016 d_readdir64_r='$d_readdir64_r'
20017 d_readdir='$d_readdir'
20018 d_readdir_r='$d_readdir_r'
20019 d_readlink='$d_readlink'
20021 d_recvmsg='$d_recvmsg'
20022 d_rename='$d_rename'
20023 d_rewinddir='$d_rewinddir'
20025 d_safebcpy='$d_safebcpy'
20026 d_safemcpy='$d_safemcpy'
20027 d_sanemcmp='$d_sanemcmp'
20028 d_sbrkproto='$d_sbrkproto'
20029 d_sched_yield='$d_sched_yield'
20030 d_scm_rights='$d_scm_rights'
20031 d_seekdir='$d_seekdir'
20032 d_select='$d_select'
20034 d_semctl='$d_semctl'
20035 d_semctl_semid_ds='$d_semctl_semid_ds'
20036 d_semctl_semun='$d_semctl_semun'
20037 d_semget='$d_semget'
20039 d_sendmsg='$d_sendmsg'
20040 d_setegid='$d_setegid'
20041 d_seteuid='$d_seteuid'
20042 d_setgrent='$d_setgrent'
20043 d_setgrent_r='$d_setgrent_r'
20044 d_setgrps='$d_setgrps'
20045 d_sethent='$d_sethent'
20046 d_sethostent_r='$d_sethostent_r'
20047 d_setitimer='$d_setitimer'
20048 d_setlinebuf='$d_setlinebuf'
20049 d_setlocale='$d_setlocale'
20050 d_setlocale_r='$d_setlocale_r'
20051 d_setnent='$d_setnent'
20052 d_setnetent_r='$d_setnetent_r'
20053 d_setpent='$d_setpent'
20054 d_setpgid='$d_setpgid'
20055 d_setpgrp2='$d_setpgrp2'
20056 d_setpgrp='$d_setpgrp'
20057 d_setprior='$d_setprior'
20058 d_setproctitle='$d_setproctitle'
20059 d_setprotoent_r='$d_setprotoent_r'
20060 d_setpwent='$d_setpwent'
20061 d_setpwent_r='$d_setpwent_r'
20062 d_setregid='$d_setregid'
20063 d_setresgid='$d_setresgid'
20064 d_setresuid='$d_setresuid'
20065 d_setreuid='$d_setreuid'
20066 d_setrgid='$d_setrgid'
20067 d_setruid='$d_setruid'
20068 d_setsent='$d_setsent'
20069 d_setservent_r='$d_setservent_r'
20070 d_setsid='$d_setsid'
20071 d_setvbuf='$d_setvbuf'
20075 d_shmatprototype='$d_shmatprototype'
20076 d_shmctl='$d_shmctl'
20078 d_shmget='$d_shmget'
20079 d_sigaction='$d_sigaction'
20080 d_sigprocmask='$d_sigprocmask'
20081 d_sigsetjmp='$d_sigsetjmp'
20082 d_sockatmark='$d_sockatmark'
20083 d_sockatmarkproto='$d_sockatmarkproto'
20084 d_socket='$d_socket'
20085 d_socklen_t='$d_socklen_t'
20086 d_sockpair='$d_sockpair'
20087 d_socks5_init='$d_socks5_init'
20089 d_srand48_r='$d_srand48_r'
20090 d_srandom_r='$d_srandom_r'
20091 d_sresgproto='$d_sresgproto'
20092 d_sresuproto='$d_sresuproto'
20093 d_statblks='$d_statblks'
20094 d_statfs_f_flags='$d_statfs_f_flags'
20095 d_statfs_s='$d_statfs_s'
20096 d_statvfs='$d_statvfs'
20097 d_stdio_cnt_lval='$d_stdio_cnt_lval'
20098 d_stdio_ptr_lval='$d_stdio_ptr_lval'
20099 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
20100 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
20101 d_stdio_stream_array='$d_stdio_stream_array'
20102 d_stdiobase='$d_stdiobase'
20103 d_stdstdio='$d_stdstdio'
20104 d_strchr='$d_strchr'
20105 d_strcoll='$d_strcoll'
20106 d_strctcpy='$d_strctcpy'
20107 d_strerrm='$d_strerrm'
20108 d_strerror='$d_strerror'
20109 d_strerror_r='$d_strerror_r'
20110 d_strftime='$d_strftime'
20111 d_strtod='$d_strtod'
20112 d_strtol='$d_strtol'
20113 d_strtold='$d_strtold'
20114 d_strtoll='$d_strtoll'
20115 d_strtoq='$d_strtoq'
20116 d_strtoul='$d_strtoul'
20117 d_strtoull='$d_strtoull'
20118 d_strtouq='$d_strtouq'
20119 d_strxfrm='$d_strxfrm'
20120 d_suidsafe='$d_suidsafe'
20121 d_symlink='$d_symlink'
20122 d_syscall='$d_syscall'
20123 d_syscallproto='$d_syscallproto'
20124 d_sysconf='$d_sysconf'
20125 d_sysernlst='$d_sysernlst'
20126 d_syserrlst='$d_syserrlst'
20127 d_system='$d_system'
20128 d_tcgetpgrp='$d_tcgetpgrp'
20129 d_tcsetpgrp='$d_tcsetpgrp'
20130 d_telldir='$d_telldir'
20131 d_telldirproto='$d_telldirproto'
20134 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
20135 d_tm_tm_zone='$d_tm_tm_zone'
20136 d_tmpnam_r='$d_tmpnam_r'
20137 d_truncate='$d_truncate'
20138 d_ttyname_r='$d_ttyname_r'
20139 d_tzname='$d_tzname'
20140 d_u32align='$d_u32align'
20141 d_ualarm='$d_ualarm'
20144 d_union_semun='$d_union_semun'
20145 d_unordered='$d_unordered'
20146 d_usleep='$d_usleep'
20147 d_usleepproto='$d_usleepproto'
20149 d_vendorarch='$d_vendorarch'
20150 d_vendorbin='$d_vendorbin'
20151 d_vendorlib='$d_vendorlib'
20153 d_void_closedir='$d_void_closedir'
20154 d_voidsig='$d_voidsig'
20155 d_voidtty='$d_voidtty'
20156 d_volatile='$d_volatile'
20157 d_vprintf='$d_vprintf'
20159 d_waitpid='$d_waitpid'
20160 d_wcstombs='$d_wcstombs'
20161 d_wctomb='$d_wctomb'
20162 d_writev='$d_writev'
20165 db_hashtype='$db_hashtype'
20166 db_prefixtype='$db_prefixtype'
20167 db_version_major='$db_version_major'
20168 db_version_minor='$db_version_minor'
20169 db_version_patch='$db_version_patch'
20170 defvoidused='$defvoidused'
20171 direntrytype='$direntrytype'
20174 doublesize='$doublesize'
20176 drand48_r_proto='$drand48_r_proto'
20177 dynamic_ext='$dynamic_ext'
20183 endgrent_r_proto='$endgrent_r_proto'
20184 endhostent_r_proto='$endhostent_r_proto'
20185 endnetent_r_proto='$endnetent_r_proto'
20186 endprotoent_r_proto='$endprotoent_r_proto'
20187 endpwent_r_proto='$endpwent_r_proto'
20188 endservent_r_proto='$endservent_r_proto'
20189 eunicefix='$eunicefix'
20192 extensions='$extensions'
20194 fflushNULL='$fflushNULL'
20195 fflushall='$fflushall'
20197 firstmakefile='$firstmakefile'
20199 fpossize='$fpossize'
20200 fpostype='$fpostype'
20201 freetype='$freetype'
20204 full_csh='$full_csh'
20205 full_sed='$full_sed'
20206 gccosandvers='$gccosandvers'
20207 gccversion='$gccversion'
20208 getgrent_r_proto='$getgrent_r_proto'
20209 getgrgid_r_proto='$getgrgid_r_proto'
20210 getgrnam_r_proto='$getgrnam_r_proto'
20211 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
20212 gethostbyname_r_proto='$gethostbyname_r_proto'
20213 gethostent_r_proto='$gethostent_r_proto'
20214 getlogin_r_proto='$getlogin_r_proto'
20215 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
20216 getnetbyname_r_proto='$getnetbyname_r_proto'
20217 getnetent_r_proto='$getnetent_r_proto'
20218 getprotobyname_r_proto='$getprotobyname_r_proto'
20219 getprotobynumber_r_proto='$getprotobynumber_r_proto'
20220 getprotoent_r_proto='$getprotoent_r_proto'
20221 getpwent_r_proto='$getpwent_r_proto'
20222 getpwnam_r_proto='$getpwnam_r_proto'
20223 getpwuid_r_proto='$getpwuid_r_proto'
20224 getservbyname_r_proto='$getservbyname_r_proto'
20225 getservbyport_r_proto='$getservbyport_r_proto'
20226 getservent_r_proto='$getservent_r_proto'
20227 getspnam_r_proto='$getspnam_r_proto'
20228 gidformat='$gidformat'
20234 gmtime_r_proto='$gmtime_r_proto'
20235 gnulibc_version='$gnulibc_version'
20237 groupcat='$groupcat'
20238 groupstype='$groupstype'
20241 h_sysfile='$h_sysfile'
20252 i_arpainet='$i_arpainet'
20253 i_bsdioctl='$i_bsdioctl'
20257 i_dirent='$i_dirent'
20263 i_fp_class='$i_fp_class'
20266 i_ieeefp='$i_ieeefp'
20267 i_inttypes='$i_inttypes'
20268 i_langinfo='$i_langinfo'
20269 i_libutil='$i_libutil'
20270 i_limits='$i_limits'
20271 i_locale='$i_locale'
20272 i_machcthr='$i_machcthr'
20273 i_malloc='$i_malloc'
20275 i_memory='$i_memory'
20276 i_mntent='$i_mntent'
20279 i_neterrno='$i_neterrno'
20280 i_netinettcp='$i_netinettcp'
20284 i_pthread='$i_pthread'
20286 i_rpcsvcdbm='$i_rpcsvcdbm'
20289 i_shadow='$i_shadow'
20291 i_stdarg='$i_stdarg'
20292 i_stddef='$i_stddef'
20293 i_stdlib='$i_stdlib'
20294 i_string='$i_string'
20295 i_sunmath='$i_sunmath'
20296 i_sysaccess='$i_sysaccess'
20297 i_sysdir='$i_sysdir'
20298 i_sysfile='$i_sysfile'
20299 i_sysfilio='$i_sysfilio'
20301 i_sysioctl='$i_sysioctl'
20302 i_syslog='$i_syslog'
20303 i_sysmman='$i_sysmman'
20304 i_sysmode='$i_sysmode'
20305 i_sysmount='$i_sysmount'
20306 i_sysndir='$i_sysndir'
20307 i_sysparam='$i_sysparam'
20308 i_sysresrc='$i_sysresrc'
20309 i_syssecrt='$i_syssecrt'
20310 i_sysselct='$i_sysselct'
20311 i_syssockio='$i_syssockio'
20312 i_sysstat='$i_sysstat'
20313 i_sysstatfs='$i_sysstatfs'
20314 i_sysstatvfs='$i_sysstatvfs'
20315 i_systime='$i_systime'
20316 i_systimek='$i_systimek'
20317 i_systimes='$i_systimes'
20318 i_systypes='$i_systypes'
20319 i_sysuio='$i_sysuio'
20321 i_sysutsname='$i_sysutsname'
20322 i_sysvfs='$i_sysvfs'
20323 i_syswait='$i_syswait'
20324 i_termio='$i_termio'
20325 i_termios='$i_termios'
20327 i_unistd='$i_unistd'
20330 i_values='$i_values'
20331 i_varargs='$i_varargs'
20332 i_varhdr='$i_varhdr'
20334 ignore_versioned_solibs='$ignore_versioned_solibs'
20335 inc_version_list='$inc_version_list'
20336 inc_version_list_init='$inc_version_list_init'
20339 installarchlib='$installarchlib'
20340 installbin='$installbin'
20341 installman1dir='$installman1dir'
20342 installman3dir='$installman3dir'
20343 installprefix='$installprefix'
20344 installprefixexp='$installprefixexp'
20345 installprivlib='$installprivlib'
20346 installscript='$installscript'
20347 installsitearch='$installsitearch'
20348 installsitebin='$installsitebin'
20349 installsitelib='$installsitelib'
20350 installstyle='$installstyle'
20351 installusrbinperl='$installusrbinperl'
20352 installvendorarch='$installvendorarch'
20353 installvendorbin='$installvendorbin'
20354 installvendorlib='$installvendorlib'
20356 issymlink='$issymlink'
20357 ivdformat='$ivdformat'
20360 known_extensions='$known_extensions'
20363 lddlflags='$lddlflags'
20365 ldflags_uselargefiles='$ldflags_uselargefiles'
20366 ldlibpthname='$ldlibpthname'
20373 libsdirs='$libsdirs'
20374 libsfiles='$libsfiles'
20375 libsfound='$libsfound'
20376 libspath='$libspath'
20377 libswanted='$libswanted'
20378 libswanted_uselargefiles='$libswanted_uselargefiles'
20384 localtime_r_proto='$localtime_r_proto'
20385 locincpth='$locincpth'
20386 loclibpth='$loclibpth'
20387 longdblsize='$longdblsize'
20388 longlongsize='$longlongsize'
20389 longsize='$longsize'
20393 lseeksize='$lseeksize'
20394 lseektype='$lseektype'
20398 make_set_make='$make_set_make'
20399 mallocobj='$mallocobj'
20400 mallocsrc='$mallocsrc'
20401 malloctype='$malloctype'
20403 man1direxp='$man1direxp'
20406 man3direxp='$man3direxp'
20408 mips_type='$mips_type'
20410 mmaptype='$mmaptype'
20411 modetype='$modetype'
20413 multiarch='$multiarch'
20415 myarchname='$myarchname'
20416 mydomain='$mydomain'
20417 myhostname='$myhostname'
20420 need_va_copy='$need_va_copy'
20421 netdb_hlen_type='$netdb_hlen_type'
20422 netdb_host_type='$netdb_host_type'
20423 netdb_name_type='$netdb_name_type'
20424 netdb_net_type='$netdb_net_type'
20427 nm_so_opt='$nm_so_opt'
20428 nonxs_ext='$nonxs_ext'
20430 nvEUformat='$nvEUformat'
20431 nvFUformat='$nvFUformat'
20432 nvGUformat='$nvGUformat'
20433 nv_preserves_uv_bits='$nv_preserves_uv_bits'
20434 nveformat='$nveformat'
20435 nvfformat='$nvfformat'
20436 nvgformat='$nvgformat'
20439 o_nonblock='$o_nonblock'
20441 old_pthread_create_joinable='$old_pthread_create_joinable'
20442 optimize='$optimize'
20443 orderlib='$orderlib'
20446 otherlibdirs='$otherlibdirs'
20450 patchlevel='$patchlevel'
20451 path_sep='$path_sep'
20454 perl_patchlevel='$perl_patchlevel'
20455 perladmin='$perladmin'
20456 perllibs='$perllibs'
20457 perlpath='$perlpath'
20459 phostname='$phostname'
20462 pm_apiversion='$pm_apiversion'
20466 prefixexp='$prefixexp'
20468 privlibexp='$privlibexp'
20469 procselfexe='$procselfexe'
20470 prototype='$prototype'
20472 quadkind='$quadkind'
20473 quadtype='$quadtype'
20474 randbits='$randbits'
20475 randfunc='$randfunc'
20476 random_r_proto='$random_r_proto'
20477 randseedtype='$randseedtype'
20479 rd_nodata='$rd_nodata'
20480 readdir64_r_proto='$readdir64_r_proto'
20481 readdir_r_proto='$readdir_r_proto'
20482 revision='$revision'
20487 sPRIEUldbl='$sPRIEUldbl'
20488 sPRIFUldbl='$sPRIFUldbl'
20489 sPRIGUldbl='$sPRIGUldbl'
20490 sPRIXU64='$sPRIXU64'
20492 sPRIeldbl='$sPRIeldbl'
20493 sPRIfldbl='$sPRIfldbl'
20494 sPRIgldbl='$sPRIgldbl'
20499 sSCNfldbl='$sSCNfldbl'
20500 sched_yield='$sched_yield'
20501 scriptdir='$scriptdir'
20502 scriptdirexp='$scriptdirexp'
20504 seedfunc='$seedfunc'
20505 selectminbits='$selectminbits'
20506 selecttype='$selecttype'
20507 sendmail='$sendmail'
20508 setgrent_r_proto='$setgrent_r_proto'
20509 sethostent_r_proto='$sethostent_r_proto'
20510 setlocale_r_proto='$setlocale_r_proto'
20511 setnetent_r_proto='$setnetent_r_proto'
20512 setprotoent_r_proto='$setprotoent_r_proto'
20513 setpwent_r_proto='$setpwent_r_proto'
20514 setservent_r_proto='$setservent_r_proto'
20517 sharpbang='$sharpbang'
20518 shmattype='$shmattype'
20519 shortsize='$shortsize'
20522 sig_count='$sig_count'
20523 sig_name='$sig_name'
20524 sig_name_init='$sig_name_init'
20526 sig_num_init='$sig_num_init'
20527 sig_size='$sig_size'
20528 signal_t='$signal_t'
20529 sitearch='$sitearch'
20530 sitearchexp='$sitearchexp'
20532 sitebinexp='$sitebinexp'
20534 sitelib_stem='$sitelib_stem'
20535 sitelibexp='$sitelibexp'
20536 siteprefix='$siteprefix'
20537 siteprefixexp='$siteprefixexp'
20538 sizesize='$sizesize'
20539 sizetype='$sizetype'
20543 sockethdr='$sockethdr'
20544 socketlib='$socketlib'
20545 socksizetype='$socksizetype'
20547 spackage='$spackage'
20548 spitshell='$spitshell'
20549 srand48_r_proto='$srand48_r_proto'
20550 srandom_r_proto='$srandom_r_proto'
20552 ssizetype='$ssizetype'
20553 startperl='$startperl'
20555 static_ext='$static_ext'
20557 stdio_base='$stdio_base'
20558 stdio_bufsiz='$stdio_bufsiz'
20559 stdio_cnt='$stdio_cnt'
20560 stdio_filbuf='$stdio_filbuf'
20561 stdio_ptr='$stdio_ptr'
20562 stdio_stream_array='$stdio_stream_array'
20563 strerror_r_proto='$strerror_r_proto'
20566 subversion='$subversion'
20570 targetarch='$targetarch'
20574 timeincl='$timeincl'
20575 timetype='$timetype'
20576 tmpnam_r_proto='$tmpnam_r_proto'
20582 ttyname_r_proto='$ttyname_r_proto'
20591 uidformat='$uidformat'
20597 uquadtype='$uquadtype'
20598 use5005threads='$use5005threads'
20599 use64bitall='$use64bitall'
20600 use64bitint='$use64bitint'
20601 usecrosscompile='$usecrosscompile'
20603 useithreads='$useithreads'
20604 uselargefiles='$uselargefiles'
20605 uselongdouble='$uselongdouble'
20606 usemorebits='$usemorebits'
20607 usemultiplicity='$usemultiplicity'
20608 usemymalloc='$usemymalloc'
20610 useopcode='$useopcode'
20611 useperlio='$useperlio'
20612 useposix='$useposix'
20613 usereentrant='$usereentrant'
20615 useshrplib='$useshrplib'
20616 usesocks='$usesocks'
20617 usethreads='$usethreads'
20618 usevendorprefix='$usevendorprefix'
20619 usevfork='$usevfork'
20622 uvXUformat='$uvXUformat'
20623 uvoformat='$uvoformat'
20626 uvuformat='$uvuformat'
20627 uvxformat='$uvxformat'
20628 vendorarch='$vendorarch'
20629 vendorarchexp='$vendorarchexp'
20630 vendorbin='$vendorbin'
20631 vendorbinexp='$vendorbinexp'
20632 vendorlib='$vendorlib'
20633 vendorlib_stem='$vendorlib_stem'
20634 vendorlibexp='$vendorlibexp'
20635 vendorprefix='$vendorprefix'
20636 vendorprefixexp='$vendorprefixexp'
20638 version_patchlevel_string='$version_patchlevel_string'
20639 versiononly='$versiononly'
20641 voidflags='$voidflags'
20643 xs_apiversion='$xs_apiversion'
20644 gccansipedantic='$gccansipedantic'
20646 yaccflags='$yaccflags'
20651 : Add in command line options if available
20652 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
20654 : add special variables
20655 $test -f $src/patchlevel.h && \
20656 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
20657 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
20658 echo "PERL_CONFIG_SH=true" >>config.sh
20660 : propagate old symbols
20661 if $test -f UU/config.sh; then
20662 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
20663 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
20664 $sort | $uniq -u >UU/oldsyms
20665 set X `cat UU/oldsyms`
20671 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
20673 echo "# Variables propagated from previous config.sh file." >>config.sh
20674 for sym in `cat UU/oldsyms`; do
20675 echo " Propagating $hint variable "'$'"$sym..."
20676 eval 'tmp="$'"${sym}"'"'
20678 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
20684 : Finish up by extracting the .SH files
20688 echo "Extraction done."
20698 If you'd like to make any changes to the config.sh file before I begin
20699 to configure things, do it as a shell escape now (e.g. !vi config.sh).
20702 rp="Press return or use a shell escape to edit config.sh:"
20707 *) : in case they cannot read
20708 sh 1>&4 -c "$ans";;
20713 : if this fails, just run all the .SH files by hand
20722 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
20729 Now you need to generate make dependencies by running "$make depend".
20730 You might prefer to run it in background: "$make depend > makedepend.out &"
20731 It can take a while, so you might not want to run it right now.
20736 rp="Run $make depend now?"
20740 $make depend && echo "Now you must run '$make'."
20743 echo "You must run '$make depend' then '$make'."
20746 elif test -f [Mm]akefile; then
20748 echo "Now you must run a $make."
20750 echo "Configure done."
20753 if $test -f Policy.sh; then
20756 If you compile $package on a different machine or from a different object
20757 directory, copy the Policy.sh file from this object directory to the
20758 new one before you run Configure -- this will help you with most of
20759 the policy defaults.
20763 if $test -f config.msg; then
20764 echo "Hmm. I also noted the following information while running:"
20766 $cat config.msg >&4
20769 $rm -f kit*isdone ark*isdone