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 Wed Jun 5 04:17:01 EET DST 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=''
562 d_old_pthread_create_joinable=''
563 old_pthread_create_joinable=''
602 sethostent_r_proto=''
619 setprotoent_r_proto=''
631 setservent_r_proto=''
675 d_stdio_ptr_lval_nochange_cnt=''
676 d_stdio_ptr_lval_sets_cnt=''
870 inc_version_list_init=''
889 ignore_versioned_solibs=''
948 d_perl_otherlibdirs=''
962 version_patchlevel_string=''
977 nv_preserves_uv_bits=''
1066 d_stdio_stream_array=''
1067 stdio_stream_array=''
1077 ccflags_uselargefiles=''
1078 ldflags_uselargefiles=''
1079 libswanted_uselargefiles=''
1099 installvendorarch=''
1125 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1128 : We must find out about Eunice early
1130 if test -f /etc/unixtovms; then
1131 eunicefix=/etc/unixtovms
1133 if test -f /etc/unixtovms.exe; then
1134 eunicefix=/etc/unixtovms.exe
1137 : Set executable suffix now -- needed before hints available
1138 if test -f "/libs/version.library"; then
1141 elif test -f "/system/gnu_library/bin/ar.pm"; then
1144 elif test -n "$DJGPP"; then
1147 elif test -d c:/. ; then
1156 : set useposix=false in your hint file to disable the POSIX extension.
1158 : set useopcode=false in your hint file to disable the Opcode extension.
1160 : Trailing extension. Override this in a hint file, if needed.
1161 : Extra object files, if any, needed on this platform.
1164 : Possible local include directories to search.
1165 : Set locincpth to "" in a hint file to defeat local include searches.
1166 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1167 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1169 : no include file wanted by default
1174 : change the next line if compiling for Xenix/286 on Xenix/386
1175 xlibpth='/usr/lib/386 /lib/386'
1176 : Possible local library directories to search.
1177 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1178 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1180 : general looking path for locating libraries
1181 glibpth="/lib /usr/lib $xlibpth"
1182 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1183 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1184 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1186 : Private path used by Configure to find libraries. Its value
1187 : is prepended to libpth. This variable takes care of special
1188 : machines, like the mips. Usually, it should be empty.
1191 : default library list
1193 : some systems want to use only the non-versioned libso:s
1194 ignore_versioned_solibs=''
1196 ccflags_uselargefiles=''
1197 ldflags_uselargefiles=''
1198 libswanted_uselargefiles=''
1199 : set usemultiplicity on the Configure command line to enable multiplicity.
1200 : set usesocks on the Configure command line to enable socks.
1201 : set usethreads on the Configure command line to enable threads.
1202 usereentrant='undef'
1203 : full support for void wanted by default
1206 : List of libraries we want.
1207 : If anyone needs -lnet, put it in a hint file.
1208 libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
1209 libswanted="$libswanted dld ld sun m c cposix posix"
1210 libswanted="$libswanted ndir dir crypt sec"
1211 libswanted="$libswanted ucb bsd BSD PW x util"
1212 : We probably want to search /usr/shlib before most other libraries.
1213 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1214 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1215 glibpth="/usr/shlib $glibpth"
1216 : Do not use vfork unless overridden by a hint file.
1219 : Find the basic shell for Bourne shell scripts
1223 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1226 if test -f "$xxx"; then
1229 : Build up a list and do a single loop so we can 'break' out.
1230 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1231 for xxx in sh bash ksh pdksh ash; do
1233 try="$try ${p}/${xxx}"
1237 if test -f "$xxx"; then
1240 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1243 elif test -f "$xxx.exe"; then
1254 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1256 Usually it's in /bin/sh. How did you even get this far?
1257 Please contact me (Perl Maintainers) at perlbug@perl.org and
1258 we'll try to straighten this all out.
1264 : see if sh knows # comments
1265 if `$sh -c '#' >/dev/null 2>&1`; then
1269 test -f $xcat$_exe || xcat=/usr/bin/cat
1270 if test ! -f $xcat$_exe; then
1271 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1272 if test -f $p/cat$_exe; then
1277 if test ! -f $xcat$_exe; then
1278 echo "Can't find cat anywhere!"
1282 echo "#!$xcat" >sharp
1286 if test -s today; then
1289 echo "#! $xcat" > sharp
1293 if test -s today; then
1301 echo "Your $sh doesn't grok # comments--I will strip them later on."
1304 echo "exec grep -v '^[ ]*#'" >spitshell
1306 $eunicefix spitshell
1307 spitshell=`pwd`/spitshell
1309 echo "I presume that if # doesn't work, #! won't work either!"
1314 : figure out how to guarantee sh startup
1316 '') startsh=${sharpbang}${sh} ;;
1328 : echo "Yup, it does."
1330 echo "Hmm... '$startsh' does not guarantee sh startup..."
1331 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1336 : Save command line options in file UU/cmdline.opt for later use in
1337 : generating config.sh.
1338 cat > cmdline.opt <<EOSH
1339 # Configure command line arguments.
1348 cat >>cmdline.opt <<EOSH
1349 config_arg$argn='$arg'
1351 # Extreme backslashitis: replace each ' by '"'"'
1352 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1355 arg_exp=`cat cmdl.opt`
1356 args_exp="$args_exp$args_sep'$arg_exp'"
1357 argn=`expr $argn + 1`
1360 # args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
1361 # used by ./hints/os2.sh
1364 : produce awk script to parse command line options
1365 cat >options.awk <<'EOF'
1367 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1369 len = length(optstr);
1370 for (i = 1; i <= len; i++) {
1371 c = substr(optstr, i, 1);
1372 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1383 if (substr(str, 1, 1) != "-") {
1384 printf("'%s'\n", str);
1388 for (i = 2; i <= len; i++) {
1389 c = substr(str, i, 1);
1391 printf("-%s\n", substr(str, i));
1397 printf("'%s'\n", substr(str, i + 1));
1410 : process the command line options
1411 set X `for arg in "$@"; do echo "X$arg"; done |
1412 sed -e s/X// | awk -f options.awk`
1417 : set up default values
1427 rm -f optdef.sh posthint.sh
1428 cat >optdef.sh <<EOS
1434 while test $# -gt 0; do
1436 -d) shift; fastread=yes;;
1437 -e) shift; alldone=cont;;
1441 if test -r "$1"; then
1444 echo "$me: cannot read config file $1." >&2
1449 -h) shift; error=true;;
1450 -r) shift; reuseval=true;;
1451 -s) shift; silent=true; realsilent=true;;
1452 -E) shift; alldone=exit;;
1453 -K) shift; knowitall=true;;
1454 -O) shift; override=true;;
1455 -S) shift; silent=true; extractsh=true;;
1460 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1461 echo "$me: ignoring -D $1" >&2
1464 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1465 *) echo "$1='define'" >> optdef.sh;;
1472 *=) echo "$1" >> optdef.sh;;
1474 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1475 echo "$me: ignoring -U $1" >&2
1477 *) echo "$1='undef'" >> optdef.sh;;
1488 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
1492 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
1493 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1499 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1500 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1501 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1502 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1503 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1504 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
1510 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1512 echo "$yyy=''" >> posthint.sh ;;
1517 echo "$yyy='$zzz'" >> posthint.sh ;;
1519 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1521 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1526 echo "$yyy=$zzz" >> posthint.sh ;;
1527 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1531 -V) echo "$me generated by metaconfig 3.0 PL70." >&2
1534 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1542 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1543 [-U symbol] [-U symbol=] [-A command:symbol...]
1544 -d : use defaults for all answers.
1545 -e : go on without questioning past the production of config.sh.
1546 -f : specify an alternate default configuration file.
1547 -h : print this help message and exit (with an error status).
1548 -r : reuse C symbols value if possible (skips costly nm extraction).
1549 -s : silent mode, only echoes questions and essential information.
1550 -D : define symbol to have some value:
1551 -D symbol symbol gets the value 'define'
1552 -D symbol=value symbol gets the value 'value'
1553 -E : stop at the end of questions, after having produced config.sh.
1554 -K : do not use unless you know what you are doing.
1555 -O : let -D and -U override definitions from loaded configuration file.
1556 -S : perform variable substitutions on all .SH files (can mix with -f)
1557 -U : undefine symbol:
1558 -U symbol symbol gets the value 'undef'
1559 -U symbol= symbol gets completely empty
1560 -A : manipulate symbol after the platform specific hints have been applied:
1561 -A symbol=value append " "value to symbol
1562 -A append:symbol=value append value to symbol
1563 -A define:symbol=value define symbol to have value
1564 -A clear:symbol define symbol to be ''
1565 -A define:symbol define symbol to be 'define'
1566 -A eval:symbol=value define symbol to be eval of value
1567 -A prepend:symbol=value prepend value to symbol
1568 -A undef:symbol define symbol to be 'undef'
1569 -A undef:symbol= define symbol to be ''
1570 -V : print version number and exit (with a zero status).
1577 case "$fastread$alldone" in
1580 case "$extractsh" in
1583 if test ! -t 0; then
1584 echo "Say 'sh Configure', not 'sh <Configure'"
1594 true) exec 1>/dev/null;;
1597 : run the defines and the undefines, if any, but leave the file out there...
1600 : create the posthint manipulation script and leave the file out there...
1605 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1606 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1607 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1608 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1609 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1612 : Some greps do not return status, grrr.
1613 echo "grimblepritz" >grimble
1614 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1616 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1622 : the following should work in any shell
1626 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1627 cat >contains <<'EOSS'
1628 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1633 : Find the path to the source tree
1636 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1640 *) src=`cd ../$src && pwd` ;;
1653 if test -f $rsrc/Configure && \
1654 $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
1656 : found it, so we are ok.
1659 for src in . .. ../.. ../../.. ../../../..; do
1660 if test -f ../$src/Configure && \
1661 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1672 Sorry, I can't seem to locate the source dir for $package. Please start
1673 Configure with an explicit path -- i.e. /some/path/Configure.
1681 echo "Sources for $package found in \"$src\"." >&4
1685 : script used to extract .SH files with variable substitutions
1686 cat >extract <<'EOS'
1688 echo "Doing variable substitutions on .SH files..."
1689 if test -f MANIFEST; then
1690 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1692 echo "(Looking for .SH files under the source directory.)"
1693 set x `(cd "$src"; find . -name "*.SH" -print)`
1697 0) set x `(cd "$src"; echo *.SH)`; shift;;
1699 if test ! -f "$src/$1"; then
1705 while test $name; do
1706 if test ! -d "$name"; then
1707 create="$name $create";
1708 name=`echo $name | sed -e "s|^[^/]*$||"`;
1709 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1714 for file in $create; do
1723 dir=`expr X$file : 'X\(.*\)/'`
1724 file=`expr X$file : 'X.*/\(.*\)'`
1725 (cd "$dir" && . ./$file)
1735 dir=`expr X$file : 'X\(.*\)/'`
1736 file=`expr X$file : 'X.*/\(.*\)'`
1737 (set x $dir; shift; eval $mkdir_p)
1738 sh <"$src/$dir/$file"
1747 if test -f "$src/config_h.SH"; then
1748 if test ! -f config.h; then
1749 : oops, they left it out of MANIFEST, probably, so do it anyway.
1750 . "$src/config_h.SH"
1755 : extract files and exit if asked to do so
1756 case "$extractsh" in
1758 case "$realsilent" in
1762 case "$config_sh" in
1763 '') config_sh='config.sh';;
1766 echo "Fetching answers from $config_sh..."
1769 test "$override" && . ./optdef.sh
1773 echo "Extraction done."
1778 : Eunice requires " " instead of "", can you believe it
1781 echo "Beginning of configuration questions for $package."
1783 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1785 : first determine how to suppress newline on echo command
1787 echo "Checking echo to see how to suppress newlines..."
1788 (echo "hi there\c" ; echo " ") >.echotmp
1789 if $contains c .echotmp >/dev/null 2>&1 ; then
1800 echo $n "The star should be here-->$c"
1804 : Now test for existence of everything in MANIFEST
1806 if test -f "$rsrc/MANIFEST"; then
1807 echo "First let's make sure your kit is complete. Checking..." >&4
1808 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50)
1811 for filelist in x??; do
1812 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing")
1814 if test -s missing; then
1818 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1820 You have the option of continuing the configuration process, despite the
1821 distinct possibility that your kit is damaged, by typing 'y'es. If you
1822 do, don't blame me if something goes wrong. I advise you to type 'n'o
1823 and contact the author (perlbug@perl.org).
1826 echo $n "Continue? [n] $c" >&4
1830 echo "Continuing..." >&4
1834 echo "ABORTING..." >&4
1839 echo "Looks good..."
1842 echo "There is no MANIFEST file. I hope your kit is complete !"
1847 : Find the appropriate value for a newline for tr
1848 if test -n "$DJGPP"; then
1851 if test X"$trnl" = X; then
1852 case "`echo foo|tr '\n' x 2>/dev/null`" in
1856 if test X"$trnl" = X; then
1857 case "`echo foo|tr '\012' x 2>/dev/null`" in
1858 foox) trnl='\012' ;;
1861 if test X"$trnl" = X; then
1862 case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
1863 fooxy) trnl='\n\r' ;;
1866 if test X"$trnl" = X; then
1869 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1875 : compute the number of columns on the terminal for proper question formatting
1880 : set up the echo used in my read
1881 myecho="case \"\$xxxm\" in
1882 '') echo $n \"\$rp $c\" >&4;;
1884 '') echo $n \"[\$xxxm] $c\";;
1886 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
1888 echo $n \"[\$xxxm] $c\" >&4
1890 echo $n \"\$rp [\$xxxm] $c\" >&4
1896 : now set up to do reads with possible shell escape and default assignment
1902 case "\$fastread" in
1903 yes) case "\$dflt" in
1906 case "\$silent-\$rp" in
1911 *) case "\$silent" in
1912 true) case "\$rp" in
1917 while expr "X\$ans" : "X!" >/dev/null; do
1921 aok=''; eval "ans=\\"\$answ\\"" && aok=y
1929 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
1938 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
1943 echo "(OK, I'll run with -d after this question.)" >&4
1946 echo "*** Sorry, \$1 not supported yet." >&4
1956 echo "*** Substitution done -- please confirm."
1958 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
1963 echo "*** Error -- try again."
1970 case "\$ans\$xxxm\$nostick" in
1982 : create .config dir to save info across Configure sessions
1983 test -d ../.config || mkdir ../.config
1984 cat >../.config/README <<EOF
1985 This directory created by Configure to save information that should
1986 persist across sessions for $package.
1988 You may safely delete it if you wish.
1991 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
1993 $define|true|[yY]*) ;;
1994 *) case "$xversion" in
1997 *** WHOA THERE!!! ***
1999 This is an UNSTABLE DEVELOPMENT release.
2000 The version of this $package distribution is $xversion, that is, odd,
2001 (as opposed to even) and that signifies a development release.
2002 If you want a maintenance release, you want an even-numbered version.
2004 Do ***NOT*** install this into production use.
2005 Data corruption and crashes are possible.
2007 It is most seriously suggested that you do not continue any further
2008 unless you want to help in developing and debugging Perl.
2010 If you *still* want to build perl, you can answer 'y' now,
2011 or pass -Dusedevel to Configure.
2014 rp='Do you really want to continue?'
2018 [yY]) echo >&4 "Okay, continuing."
2019 usedevel="$define" ;;
2020 *) echo >&4 "Okay, bye."
2030 case "$versiononly" in
2031 '') versiononly="$define" ;;
2033 case "$installusrbinperl" in
2034 '') installusrbinperl="$undef" ;;
2039 : general instructions
2042 user=`(logname) 2>/dev/null`
2044 '') user=`whoami 2>&1`;;
2046 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2049 rp='Would you like to see the instructions?'
2060 This installation shell script will examine your system and ask you questions
2061 to determine how the perl5 package should be installed. If you get
2062 stuck on a question, you may use a ! shell escape to start a subshell or
2063 execute a command. Many of the questions will have default answers in square
2064 brackets; typing carriage return will give you the default.
2066 On some of the questions which ask for file or directory names you are allowed
2067 to use the ~name construct to specify the login directory belonging to "name",
2068 even if you don't have a shell which knows about that. Questions where this is
2069 allowed will be marked "(~name ok)".
2073 dflt='Type carriage return to continue'
2077 The prompter used in this script allows you to use shell variables and
2078 backticks in your answers. You may use $1, $2, etc... to refer to the words
2079 in the default answer, as if the default line was a set of arguments given to a
2080 script shell. This means you may also use $* to repeat the whole default line,
2081 so you do not have to re-type everything to add something to the default.
2083 Everytime there is a substitution, you will have to confirm. If there is an
2084 error (e.g. an unmatched backtick), the default answer will remain unchanged
2085 and you will be prompted again.
2087 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2088 the questions and use the computed defaults (or the previous answers if there
2089 was already a config.sh file). Type 'Configure -h' for a list of options.
2090 You may also start interactively and then answer '& -d' at any prompt to turn
2091 on the non-interactive behaviour for the remainder of the execution.
2097 Much effort has been expended to ensure that this shell script will run on any
2098 Unix system. If despite that it blows up on yours, your best bet is to edit
2099 Configure and run it again. If you can't run Configure for some reason,
2100 you'll have to generate a config.sh file by hand. Whatever problems you
2101 have, let me (perlbug@perl.org) know how I blew it.
2103 This installation script affects things in two ways:
2105 1) it may do direct variable substitutions on some of the files included
2107 2) it builds a config.h file for inclusion in C programs. You may edit
2108 any of these files as the need arises after running this script.
2110 If you make a mistake on a question, there is no easy way to back up to it
2111 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2112 files. Configure will offer to let you do this before it runs the SH files.
2115 dflt='Type carriage return to continue'
2117 case "$firsttime" in
2118 true) echo $user >>../.config/instruct;;
2122 : find out where common programs are
2124 echo "Locating common programs..." >&4
2137 if test -d \$dir/\$thing; then
2143 for thisthing in \$dir/\$thing; do
2144 : just loop through to pick last item
2146 if test -f \$thisthing; then
2149 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2152 elif test -f \$dir/\$thing.exe; then
2153 if test -n "$DJGPP"; then
2154 echo \$dir/\$thing.exe
2156 : on Eunice apparently
2209 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2210 pth="$pth /lib /usr/lib"
2211 for file in $loclist; do
2215 if test -f "$xxx"; then
2218 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2219 xxx=`./loc $file $file $pth`
2222 '') xxx=`./loc $file $file $pth`;;
2223 *) xxx=`./loc $xxx $xxx $pth`;;
2225 eval $file=$xxx$_exe
2229 echo $file is in $xxx.
2232 echo $file is in $xxx.
2235 echo "I don't know where '$file' is, and my life depends on it." >&4
2236 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2242 echo "Don't worry if any of the following aren't found..."
2244 for file in $trylist; do
2248 if test -f "$xxx"; then
2251 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2252 xxx=`./loc $file $file $pth`
2255 '') xxx=`./loc $file $file $pth`;;
2256 *) xxx=`./loc $xxx $xxx $pth`;;
2258 eval $file=$xxx$_exe
2262 echo $file is in $xxx.
2265 echo $file is in $xxx.
2268 echo "I don't see $file out there, $say."
2275 echo "Substituting grep for egrep."
2282 echo "Substituting cp for ln."
2291 echo "I can't find make or gmake, and my life depends on it." >&4
2292 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2300 *) # We can't have osname yet.
2301 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2302 # Assume that gmake, if found, is definitely GNU make
2303 # and prefer it over the system make.
2304 echo "Substituting gmake for make."
2312 echo "Hopefully test is built into your sh."
2315 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2316 echo "Using the test built into your sh."
2324 echo "Hopefully echo is built into your sh."
2329 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2330 $echo $n "hi there$c" >foo1
2331 echo $n "hi there$c" >foo2
2332 if cmp foo1 foo2 >/dev/null 2>&1; then
2333 echo "They are compatible. In fact, they may be identical."
2340 They are not compatible! You are probably running ksh on a non-USG system.
2341 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2342 have echo built in and we may have to run some Bourne shell scripts. That
2343 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2346 $echo $n "The star should be here-->$c"
2356 cat <<'EOSC' >>trygcc
2361 int main(int argc, char *argv[]) {
2365 if $cc -o try $ccflags $ldflags try.c; then
2368 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2374 case "`$cc -v -c try.c 2>&1`" in
2377 if $test X"$trygcc" = Xyes; then
2378 if gcc -o try -c try.c; then
2380 echo "You seem to have a working gcc, though." >&4
2381 rp="Would you like to use it?"
2383 if $test -f myread; then
2386 if $test -f UU/myread; then
2389 echo "Cannot find myread, sorry. Aborting." >&2
2394 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2395 if $test -f usethreads.cbu; then
2398 *** However, any setting of the C compiler flags (e.g. for thread support)
2399 *** has been lost. It may be necessary to pass -Dcc=gcc to Configure
2400 *** (together with e.g. -Dusethreads).
2416 cat <<'EOSC' >>checkcc
2421 int main(int argc, char *argv[]) {
2425 if $cc -o try $ccflags $ldflags try.c; then
2428 if $test X"$despair" = Xyes; then
2429 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2432 You need to find a working C compiler.
2433 Either (purchase and) install the C compiler supplied by your OS vendor,
2434 or for a free C compiler try http://gcc.gnu.org/
2435 I cannot continue any further, aborting.
2444 : determine whether symbolic links are supported
2447 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2448 echo "Symbolic links are supported." >&4
2451 echo "Symbolic links are NOT supported." >&4
2456 : determine whether symbolic links are supported
2460 echo "Checking how to test for symbolic links..." >&4
2462 if $test "X$issymlink" = X; then
2464 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2465 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2467 if test $? = 0; then
2470 echo "Your builtin 'test -h' may be broken." >&4
2473 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2476 if test -f "$p/$test"; then
2485 echo "Trying external '$test -h'." >&4
2486 issymlink="$test -h"
2487 if $test ! -h sym >/dev/null 2>&1; then
2488 echo "External '$test -h' is broken, too." >&4
2496 if $test "X$issymlink" = X; then
2497 if $test -L sym 2>/dev/null; then
2498 issymlink="$test -L"
2499 echo "The builtin '$test -L' worked." >&4
2502 if $test "X$issymlink" != X; then
2503 echo "You can test for symbolic links with '$issymlink'." >&4
2505 echo "I do not know how you can test for symbolic links." >&4
2509 *) echo "No symbolic links, so not testing for their testing..." >&4
2515 case "$mksymlinks" in
2518 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2521 *) case "$lns:$issymlink" in
2522 *"ln"*" -s:"*"test -"?)
2523 echo "Creating the symbolic links..." >&4
2524 echo "(First creating the subdirectories...)" >&4
2526 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2528 test -z "$directory" && break
2532 if test ! -d t/base; then
2533 echo "Failed to create the subdirectories. Aborting." >&4
2536 echo "(Then creating the symlinks...)" >&4
2537 awk '{print $1}' $src/MANIFEST | while true; do
2539 test -z "$filename" && break
2540 if test -f $filename; then
2541 if $issymlink $filename; then
2545 if test -f $filename; then
2546 echo "$filename already exists, not symlinking."
2548 ln -s $src/$filename $filename
2552 if test ! -f t/base/lex.t; then
2553 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2558 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2567 case "$usecrosscompile" in
2569 $echo "Cross-compiling..."
2572 *-*-gcc) # A cross-compiling gcc, probably.
2573 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2575 # leave out ld, choosing it is more complex
2577 ranlib=$targetarch-ranlib
2578 $echo 'extern int foo;' > try.c
2579 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2581 if $test $# -gt 0; then
2583 incpth="`$echo $incpth|$sed 's/^ //'`"
2584 echo "Guessing incpth '$incpth'." >&4
2586 j="`$echo $i|$sed 's,/include$,/lib,'`"
2587 if $test -d $j; then
2591 libpth="`$echo $libpth|$sed 's/^ //'`"
2592 echo "Guessing libpth '$libpth'." >&4
2597 case "$targetarch" in
2598 '') echo "Targetarch not defined." >&4; croak=y ;;
2599 *) echo "Using targetarch $targetarch." >&4 ;;
2602 '') echo "Incpth not defined." >&4; croak=y ;;
2603 *) echo "Using incpth '$incpth'." >&4 ;;
2606 '') echo "Libpth not defined." >&4; croak=y ;;
2607 *) echo "Using libpth '$libpth'." >&4 ;;
2610 '') for i in $incpth; do
2611 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2613 echo "Guessing usrinc $usrinc." >&4
2618 '') echo "Usrinc not defined." >&4; croak=y ;;
2621 *) echo "Using usrinc $usrinc." >&4 ;;
2623 case "$targethost" in
2624 '') echo "Targethost not defined." >&4; croak=y ;;
2625 *) echo "Using targethost $targethost." >&4
2630 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2633 /*) run=$src/Cross/run
2634 targetmkdir=$src/Cross/mkdir
2636 from=$src/Cross/from
2638 *) pwd=`$test -f ../Configure & cd ..; pwd`
2640 targetmkdir=$pwd/Cross/mkdir
2642 from=$pwd/Cross/from
2645 case "$targetrun" in
2646 '') targetrun=ssh ;;
2651 case "$targetfrom" in
2652 '') targetfrom=scp ;;
2656 from=$from-$targetfrom
2657 case "$targetdir" in
2659 echo "Guessing targetdir $targetdir." >&4
2662 case "$targetuser" in
2664 echo "Guessing targetuser $targetuser." >&4
2667 case "$targetfrom" in
2671 case "$targetrun" in
2683 '') cwd=$targetdir ;;
2687 if $test ! -f \$exe.xok; then
2691 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2694 *) echo "Unknown targetrun '$targetrun'" >&4
2698 case "$targetmkdir" in
2700 cat >$targetmkdir <<EOF
2702 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2704 $chmod a+rx $targetmkdir
2706 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2718 $targetmkdir \`dirname \$f\`
2719 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2722 $targetmkdir $targetdir/\`dirname \$f\`
2723 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2736 $mkdir -p $targetdir/\`dirname \$f\`
2737 $cp \$f $targetdir/\$f || exit 1
2740 $targetmkdir $targetdir/\`dirname \$f\`
2741 $cp \$f $targetdir/\$f || exit 1
2748 *) echo "Unknown targetto '$targetto'" >&4
2752 case "$targetfrom" in
2759 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2764 cp) cat >$from <<EOF
2769 cp $targetdir/\$f . || exit 1
2774 *) echo "Unknown targetfrom '$targetfrom'" >&4
2778 if $test ! -f $run; then
2779 echo "Target 'run' script '$run' not found." >&4
2783 if $test ! -f $to; then
2784 echo "Target 'to' script '$to' not found." >&4
2788 if $test ! -f $from; then
2789 echo "Target 'from' script '$from' not found." >&4
2793 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2797 Using '$run' for remote execution,
2798 and '$from' and '$to'
2799 for remote file transfer.
2805 usecrosscompile='undef'
2810 : see whether [:lower:] and [:upper:] are supported character classes
2812 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2814 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2818 *) # There is a discontinuity in EBCDIC between 'I' and 'J'
2819 # (0xc9 and 0xd1), therefore that is a nice testing point.
2820 if test "X$up" = X -o "X$low" = X; then
2821 case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
2827 if test "X$up" = X -o "X$low" = X; then
2828 case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
2834 if test "X$up" = X -o "X$low" = X; then
2835 case "`echo IJ | od -x 2>/dev/null`" in
2837 echo "Hey, this might be EBCDIC." >&4
2838 if test "X$up" = X -o "X$low" = X; then
2839 case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2840 ij) up='[A-IJ-RS-Z]'
2845 if test "X$up" = X -o "X$low" = X; then
2846 case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2856 case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
2858 echo "Using $up and $low to convert case." >&4
2861 echo "I don't know how to translate letters from upper to lower case." >&4
2862 echo "Your tr is not acting any way I know of." >&4
2866 : set up the translation script tr, must be called with ./tr of course
2870 '[A-Z][a-z]') exec $tr '$up' '$low';;
2871 '[a-z][A-Z]') exec $tr '$low' '$up';;
2878 : Try to determine whether config.sh was made on this system
2879 case "$config_sh" in
2881 myuname=`$uname -a 2>/dev/null`
2882 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2883 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2884 # because the A-Z/a-z are not consecutive.
2885 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2886 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2887 newmyuname="$myuname"
2889 case "$knowitall" in
2891 if test -f ../config.sh; then
2892 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2893 eval "`grep myuname= ../config.sh`"
2895 if test "X$myuname" = "X$newmyuname"; then
2903 : Get old answers from old config file if Configure was run on the
2904 : same system, otherwise use the hints.
2907 if test -f config.sh; then
2909 rp="I see a config.sh file. Shall I use it to set the defaults?"
2912 n*|N*) echo "OK, I'll ignore it."
2913 mv config.sh config.sh.old
2914 myuname="$newmyuname"
2916 *) echo "Fetching default answers from your old config.sh file..." >&4
2924 : Older versions did not always set $sh. Catch re-use of such
2934 if test ! -f config.sh; then
2937 First time through, eh? I have some defaults handy for some systems
2938 that need some extra help getting the Configure answers right:
2941 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2943 : Half the following guesses are probably wrong... If you have better
2944 : tests or hints, please send them to perlbug@perl.org
2945 : The metaconfig authors would also appreciate a copy...
2946 $test -f /irix && osname=irix
2947 $test -f /xenix && osname=sco_xenix
2948 $test -f /dynix && osname=dynix
2949 $test -f /dnix && osname=dnix
2950 $test -f /lynx.os && osname=lynxos
2951 $test -f /unicos && osname=unicos && osvers=`$uname -r`
2952 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
2953 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
2954 $test -f /bin/mips && /bin/mips && osname=mips
2955 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
2956 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
2957 $test -d /usr/apollo/bin && osname=apollo
2958 $test -f /etc/saf/_sactab && osname=svr4
2959 $test -d /usr/include/minix && osname=minix
2960 $test -f /system/gnu_library/bin/ar.pm && osname=vos
2961 if $test -d /MachTen -o -d /MachTen_Folder; then
2963 if $test -x /sbin/version; then
2964 osvers=`/sbin/version | $awk '{print $2}' |
2965 $sed -e 's/[A-Za-z]$//'`
2966 elif $test -x /usr/etc/version; then
2967 osvers=`/usr/etc/version | $awk '{print $2}' |
2968 $sed -e 's/[A-Za-z]$//'`
2974 $test -f /sys/posix.dll &&
2975 $test -f /usr/bin/what &&
2976 set X `/usr/bin/what /sys/posix.dll` &&
2977 $test "$3" = UWIN &&
2981 if $test -f $uname; then
2989 umips) osname=umips ;;
2992 [23]100) osname=mips ;;
2993 next*) osname=next ;;
2995 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
2996 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
2999 elif $test -f /etc/kconfig; then
3001 if test "$lns" = "$ln -s"; then
3003 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3005 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3012 if test -n "$DJGPP"; then
3021 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3023 'not found') osvers="$4"."$3" ;;
3024 '<3240'|'<>3240') osvers=3.2.0 ;;
3025 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3026 '=3250'|'>3250') osvers=3.2.5 ;;
3030 bsd386) osname=bsd386
3033 cygwin*) osname=cygwin
3036 *dc.osx) osname=dcosx
3042 domainos) osname=apollo
3048 dynixptx*) osname=dynixptx
3049 osvers=`echo "$4"|sed 's/^v//'`
3051 freebsd) osname=freebsd
3053 genix) osname=genix ;;
3055 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3071 netbsd*) osname=netbsd
3074 news-os) osvers="$3"
3076 4*) osname=newsos4 ;;
3080 next*) osname=next ;;
3081 nonstop-ux) osname=nonstopux ;;
3082 openbsd) osname=openbsd
3085 POSIX-BC | posix-bc ) osname=posix-bc
3088 powerux | power_ux | powermax_os | powermaxos | \
3089 powerunix | power_unix) osname=powerux
3095 solaris) osname=solaris
3097 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3104 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3108 titanos) osname=titanos
3117 ultrix) osname=ultrix
3120 osf1|mls+) case "$5" in
3123 osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3126 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3129 hp*) osname=hp_osf1 ;;
3130 mips) osname=mips_osf1 ;;
3133 unixware) osname=svr5
3141 $2) case "$osname" in
3145 : svr4.x or possibly later
3155 if test -f /stand/boot ; then
3156 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3157 if test -n "$INITPROG" -a -f "$INITPROG"; then
3158 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3159 if test -n "$isesix"; then
3167 *) if test -f /etc/systemid; then
3169 set `echo $3 | $sed 's/\./ /g'` $4
3170 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3172 elif $test -f $src/hints/sco_$1_$2.sh; then
3174 elif $test -f $src/hints/sco_$1.sh; then
3179 '') : Still unknown. Probably a generic Sys V.
3188 *) case "$osname" in
3189 '') : Still unknown. Probably a generic BSD.
3197 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3198 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3199 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3202 $rm -f UU/kernel.what
3203 elif test -d c:/.; then
3210 case "$targetarch" in
3213 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3218 : Now look for a hint file osname_osvers, unless one has been
3219 : specified already.
3222 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3223 : Also try without trailing minor version numbers.
3224 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3225 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3226 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3227 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3230 *) case "$osvers" in
3233 *) if $test -f $src/hints/$file.sh ; then
3235 elif $test -f $src/hints/$xfile.sh ; then
3237 elif $test -f $src/hints/$xxfile.sh ; then
3239 elif $test -f $src/hints/$xxxfile.sh ; then
3241 elif $test -f $src/hints/$xxxxfile.sh ; then
3243 elif $test -f "$src/hints/${osname}.sh" ; then
3252 if $test -f Policy.sh ; then
3255 none) dflt="Policy" ;;
3256 *) dflt="Policy $dflt" ;;
3261 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3265 if $test -f Policy.sh ; then
3268 There's also a Policy hint file available, which should make the
3269 site-specific (policy) questions easier to answer.
3276 You may give one or more space-separated answers, or "none" if appropriate.
3277 A well-behaved OS will have no hints, so answering "none" or just "Policy"
3278 is a good thing. DO NOT give a wrong version or a wrong OS.
3282 rp="Which of these apply, if any?"
3285 for file in $tans; do
3286 if $test X$file = XPolicy -a -f Policy.sh; then
3288 $cat Policy.sh >> UU/config.sh
3289 elif $test -f $src/hints/$file.sh; then
3290 . $src/hints/$file.sh
3291 $cat $src/hints/$file.sh >> UU/config.sh
3292 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3295 : Give one chance to correct a possible typo.
3296 echo "$file.sh does not exist"
3298 rp="hint to use instead?"
3300 for file in $ans; do
3301 if $test -f "$src/hints/$file.sh"; then
3302 . $src/hints/$file.sh
3303 $cat $src/hints/$file.sh >> UU/config.sh
3304 elif $test X$ans = X -o X$ans = Xnone ; then
3307 echo "$file.sh does not exist -- ignored."
3314 : Remember our hint file for later.
3315 if $test -f "$src/hints/$file.sh" ; then
3325 echo "Fetching default answers from $config_sh..." >&4
3329 cp $config_sh config.sh 2>/dev/null
3339 test "$override" && . ./optdef.sh
3341 : Restore computed paths
3342 for file in $loclist $trylist; do
3343 eval $file="\$_$file"
3348 Configure uses the operating system name and version to set some defaults.
3349 The default value is probably right if the name rings a bell. Otherwise,
3350 since spelling matters for me, either accept the default or answer "none"
3357 ''|' '|none) dflt=none ;;
3358 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3361 *) dflt="$osname" ;;
3363 rp="Operating system name?"
3367 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3373 ''|' '|none) dflt=none ;;
3374 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3375 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3377 ''|' ') dflt=none ;;
3382 *) dflt="$osvers" ;;
3384 rp="Operating system version?"
3394 : who configured the system
3395 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3396 cf_by=`(logname) 2>/dev/null`
3399 cf_by=`(whoami) 2>/dev/null`
3401 "") cf_by=unknown ;;
3405 : set up the script used to warn in case of inconsistency
3412 echo "*** WHOA THERE!!! ***" >&4
3413 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
3414 rp=" Keep the $hint value?"
3417 y) td=$was; tu=$was;;
3421 : function used to set $1 to $val
3422 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
3424 $define$undef) . ./whoa; eval "$var=\$td";;
3425 $undef$define) . ./whoa; eval "$var=\$tu";;
3426 *) eval "$var=$val";;
3429 case "$usethreads" in
3430 $define|true|[yY]*) dflt='y';;
3431 *) # Catch case where user specified ithreads or 5005threads but
3432 # forgot -Dusethreads (A.D. 4/2002)
3433 case "$useithreads$use5005threads" in
3434 *$define*) dflt='y' ;;
3441 Perl can be built to take advantage of threads on some systems.
3442 To do so, Configure can be run with -Dusethreads.
3444 Note that Perl built with threading support runs slightly slower
3445 and uses more memory than plain Perl. The current implementation
3446 is believed to be stable, but it is fairly new, and so should be
3447 treated with caution.
3449 If this doesn't make any sense to you, just accept the default '$dflt'.
3451 rp='Build a threading Perl?'
3454 y|Y) val="$define" ;;
3460 case "$usethreads" in
3464 Since release 5.6, Perl has had two different threading implementations,
3465 the newer interpreter-based version (ithreads) with one interpreter per
3466 thread, and the older 5.005 version (5005threads).
3467 The 5005threads version is effectively unmaintained and will probably be
3468 removed in Perl 5.10, so there should be no need to build a Perl using it
3469 unless needed for backwards compatibility with some existing 5.005threads
3473 : Default to ithreads unless overridden on command line or with
3476 case "$use5005threads" in
3477 $define|true|[yY]*) dflt='n';;
3479 case "$useithreads" in
3480 $undef|false|[nN]*) dflt='n';;
3482 rp='Use the newer interpreter-based ithreads?'
3485 y|Y) val="$define" ;;
3490 : Now set use5005threads to the opposite value.
3491 case "$useithreads" in
3492 $define) val="$undef" ;;
3499 useithreads="$undef"
3500 use5005threads="$undef"
3504 case "$useithreads$use5005threads" in
3508 You cannot have both the ithreads and the 5.005 threads enabled
3509 at the same time. Disabling the 5.005 threads since they are
3510 much less stable than the ithreads.
3513 use5005threads="$undef"
3517 case "$d_oldpthreads" in
3518 '') : Configure tests would be welcome here. For now, assume undef.
3520 *) val="$d_oldpthreads" ;;
3526 case "$usethreads" in
3527 "$define"|true|[yY]*)
3528 : Look for a hint-file generated 'call-back-unit'. If the
3529 : user has specified that a threading perl is to be built,
3530 : we may need to set or change some other defaults.
3531 if $test -f usethreads.cbu; then
3532 echo "Your platform has some specific hints for threaded builds, using them..."
3536 (Your platform doesn't have any specific hints for threaded builds.
3537 Assuming POSIX threads, then.)
3545 Perl can be built so that multiple Perl interpreters can coexist
3546 within the same Perl executable.
3549 case "$useithreads" in
3552 This multiple interpreter support is required for interpreter-based threads.
3556 *) case "$usemultiplicity" in
3557 $define|true|[yY]*) dflt='y';;
3561 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
3562 rp='Build Perl for multiplicity?'
3565 y|Y) val="$define" ;;
3574 case "$usemorebits" in
3575 "$define"|true|[yY]*)
3576 use64bitint="$define"
3577 uselongdouble="$define"
3578 usemorebits="$define"
3580 *) usemorebits="$undef"
3584 : make some quick guesses about what we are up against
3586 $echo $n "Hmm... $c"
3596 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
3597 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
3599 echo "Looks kind of like an OSF/1 system, but we'll see..."
3601 elif test `echo abc | $tr a-z A-Z` = Abc ; then
3602 xxx=`./loc addbib blurfl $pth`
3603 if $test -f $xxx; then
3604 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3608 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3609 echo "Looks kind of like an extended USG system, but we'll see..."
3611 echo "Looks kind of like a USG system, but we'll see..."
3615 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3616 echo "Looks kind of like a BSD system, but we'll see..."
3620 echo "Looks kind of like a Version 7 system, but we'll see..."
3623 case "$eunicefix" in
3626 There is, however, a strange, musty smell in the air that reminds me of
3627 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3631 : it so happens the Eunice I know will not run shell scripts in Unix format
3635 echo "Congratulations. You aren't running Eunice."
3639 : Detect OS2. The p_ variable is set above in the Head.U unit.
3640 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
3641 : semicolon as a patch separator
3646 I have the feeling something is not exactly right, however...don't tell me...
3647 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3648 (Or you may be running DOS with DJGPP.)
3653 if test -f /xenix; then
3654 echo "Actually, this looks more like a XENIX system..."
3659 echo "It's not Xenix..."
3664 if test -f /venix; then
3665 echo "Actually, this looks more like a VENIX system..."
3672 echo "Nor is it Venix..."
3675 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3676 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3683 rp="Use which C compiler?"
3687 : See if they have not cc but they do have gcc
3689 : Look for a hint-file generated 'call-back-unit'. Now that the
3690 : user has specified the compiler, we may need to set or change some
3692 if $test -f cc.cbu; then
3698 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3704 printf("%s\n", __VERSION__);
3706 printf("%s\n", "1");
3712 if $cc -o try $ccflags $ldflags try.c; then
3713 gccversion=`$run ./try`
3714 case "$gccversion" in
3715 '') echo "You are not using GNU cc." ;;
3716 *) echo "You are using GNU cc $gccversion."
3722 echo "*** WHOA THERE!!! ***" >&4
3723 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3724 case "$knowitall" in
3726 echo " You'd better start hunting for one and let me know about it." >&4
3732 case "$gccversion" in
3733 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3735 case "$gccversion" in
3736 '') gccosandvers='' ;;
3737 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3738 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3740 case "$gccosandvers" in
3741 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3742 $osname$osvers) ;; # looking good
3743 $osname*) cat <<EOM >&4
3745 *** WHOA THERE!!! ***
3747 Your gcc has not been compiled for the exact release of
3748 your operating system ($gccosandvers versus $osname$osvers).
3750 In general it is a good idea to keep gcc synchronized with
3751 the operating system because otherwise serious problems
3752 may ensue when trying to compile software, like Perl.
3754 I'm trying to be optimistic here, though, and will continue.
3755 If later during the configuration and build icky compilation
3756 problems appear (headerfile conflicts being the most common
3757 manifestation), I suggest reinstalling the gcc to match
3758 your operating system release.
3762 *) gccosandvers='' ;; # failed to parse, better be silent
3770 # gcc 3.1 complains about adding -Idirectories that it already knows about,
3771 # so we will take those off from locincpth.
3772 case "$gccversion" in
3774 echo "main(){}">try.c
3775 for incdir in `$cc -v -c try.c 2>&1 | \
3776 sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do
3777 locincpth=`echo $locincpth | sed s!$incdir!!`
3782 : decide how portable to be. Allow command line overrides.
3783 case "$d_portable" in
3785 *) d_portable="$define" ;;
3788 : set up shell script to do ~ expansion
3794 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3797 if $test -f /bin/csh; then
3798 /bin/csh -f -c "glob \$1"
3803 name=\`$expr x\$1 : '..\([^/]*\)'\`
3804 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3805 if $test ! -d "\$dir"; then
3807 echo "\$me: can't locate home directory for: \$name" >&2
3812 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3828 : now set up to get a file name
3832 cat <<'EOSC' >>getfile
3848 : getfile will accept an answer from the comma-separated list
3849 : enclosed in parentheses even if it does not meet other criteria.
3850 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3851 fn=`echo $fn | sed 's/(.*)//'`
3857 loc_file=`expr $fn : '.*:\(.*\)'`
3858 fn=`expr $fn : '\(.*\):.*'`
3866 */*) fullpath=true;;
3875 *e*) exp_file=true;;
3878 *p*) nopath_ok=true;;
3883 *d*) type='Directory';;
3884 *l*) type='Locate';;
3889 Locate) what='File';;
3894 case "$d_portable" in
3902 while test "$type"; do
3907 true) rp="$rp (~name ok)";;
3910 if test -f UU/getfile.ok && \
3911 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3930 value=`UU/filexp $ans`
3933 if test "$ans" != "$value"; then
3934 echo "(That expands to $value on this system.)"
3948 /*) value="$ansexp" ;;
3949 [a-zA-Z]:/*) value="$ansexp" ;;
3954 echo "I shall only accept a full path name, as in /bin/ls." >&4
3955 echo "Use a ! shell escape if you wish to check pathnames." >&4
3958 echo "Please give a full path name, starting with slash." >&4
3961 echo "Note that using ~name is ok provided it expands well." >&4
3974 for fp in $gfpth; do
3975 if test "X$fp" = X.; then
3980 if test -f "$pf"; then
3982 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
3984 echo "($value is not a plain file, but that's ok.)"
3987 if test X"$type" = X; then
3994 for fp in $gfpth; do
3995 if test "X$fp" = X.; then
4000 direxp="$fp/$ansexp"
4002 if test -d "$direxp"; then
4010 if test -d "$ansexp"; then
4011 echo "(Looking for $loc_file in directory $value.)"
4012 value="$value/$loc_file"
4013 ansexp="$ansexp/$loc_file"
4015 if test -f "$ansexp"; then
4018 case "$nopath_ok" in
4019 true) case "$value" in
4021 *) echo "Assuming $value will be in people's path."
4037 if test "$fastread" = yes; then
4042 rp="$what $value doesn't exist. Use that name anyway?"
4061 test "X$gfpthkeep" != Xy && gfpth=""
4064 : What should the include directory be ?
4066 $echo $n "Hmm... $c"
4070 if $test -f /bin/mips && /bin/mips; then
4071 echo "Looks like a MIPS system..."
4072 $cat >usr.c <<'EOCP'
4073 #ifdef SYSTYPE_BSD43
4077 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4078 dflt='/bsd43/usr/include'
4082 mips_type='System V'
4084 $rm -f usr.c usr.out
4085 echo "and you're compiling with the $mips_type compiler and libraries."
4089 echo "Doesn't look like a MIPS system."
4099 case "$xxx_prompt" in
4102 rp='Where are the include files you want to use?'
4110 : see how we invoke the C preprocessor
4112 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4113 cat <<'EOT' >testcpp.c
4119 if test ! -f cppstdin; then
4120 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4121 # AIX cc -E doesn't show the absolute headerfile
4122 # locations but we'll cheat by using the -M flag.
4123 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
4125 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4128 echo "Keeping your $hint cppstdin wrapper."
4131 wrapper=`pwd`/cppstdin
4135 if $test "X$cppstdin" != "X" && \
4136 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4137 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4139 echo "You used to use $cppstdin $cppminus so we'll use that again."
4141 '') echo "But let's see if we can live without a wrapper..." ;;
4143 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4144 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4146 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4149 echo "(However, $cpprun $cpplast does not work, let's see...)"
4157 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4164 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4165 $cc -E <testcpp.c >testcpp.out 2>&1; \
4166 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4167 echo "Yup, it does."
4170 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4171 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4172 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4173 echo "Yup, it does."
4176 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4177 $cc -P <testcpp.c >testcpp.out 2>&1; \
4178 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4179 echo "Yipee, that works!"
4182 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4183 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4184 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4185 echo "At long last!"
4188 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4189 $cpp <testcpp.c >testcpp.out 2>&1; \
4190 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4194 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4195 $cpp - <testcpp.c >testcpp.out 2>&1; \
4196 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4197 echo "Hooray, it works! I was beginning to wonder."
4200 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4201 $wrapper <testcpp.c >testcpp.out 2>&1; \
4202 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4208 rp="No dice. I can't find a C preprocessor. Name one:"
4212 $x_cpp <testcpp.c >testcpp.out 2>&1
4213 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4214 echo "OK, that will do." >&4
4216 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4231 echo "Perhaps can we force $cc -E using a wrapper..."
4232 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4233 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4239 echo "Nope, we'll have to live without it..."
4253 "$wrapper"|'cppstdin') ;;
4254 *) $rm -f $wrapper;;
4256 $rm -f testcpp.c testcpp.out
4258 : Set private lib path
4261 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4266 '') dlist="$loclibpth $plibpth $glibpth";;
4267 *) dlist="$libpth";;
4270 : Now check and see which directories actually exist, avoiding duplicates
4274 if $test -d $xxx; then
4277 *) libpth="$libpth $xxx";;
4283 Some systems have incompatible or broken versions of libraries. Among
4284 the directories listed in the question below, please remove any you
4285 know not to be holding relevant libraries, and add any that are needed.
4286 Say "none" for none.
4297 rp="Directories to use for library searches?"
4304 : compute shared library extension
4307 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4317 On some systems, shared libraries may be available. Answer 'none' if
4318 you want to suppress searching of shared libraries for the remainder
4319 of this configuration.
4322 rp='What is the file extension used for shared libraries?'
4326 : Define several unixisms.
4327 : Hints files or command line option can be used to override them.
4328 : The convoluted testing is in case hints files set either the old
4331 '') case "$exe_ext" in
4333 *) _exe="$exe_ext" ;;
4338 '') case "$lib_ext" in
4345 '') case "$obj_ext" in
4352 '') case "$path_sep" in
4363 : Which makefile gets called first. This is used by make depend.
4364 case "$firstmakefile" in
4365 '') firstmakefile='makefile';;
4369 $define|true|[yY]*) dflt='y';;
4374 Perl can be built to use the SOCKS proxy protocol library. To do so,
4375 Configure must be run with -Dusesocks. If you use SOCKS you also need
4376 to use the PerlIO abstraction layer, this will be implicitly selected.
4378 If this doesn't make any sense to you, just accept the default '$dflt'.
4380 rp='Build Perl for SOCKS?'
4383 y|Y) val="$define" ;;
4390 $define|true|[yY]*) useperlio="$define";;
4393 : Looking for optional libraries
4395 echo "Checking for optional libraries..." >&4
4400 case "$libswanted" in
4401 '') libswanted='c_s';;
4404 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4410 for thisdir in $libpth $xlibpth; do
4411 test -d $thisdir && libspath="$libspath $thisdir"
4413 for thislib in $libswanted; do
4414 for thisdir in $libspath; do
4416 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4417 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4418 $test -f "$xxx" && eval $libscheck
4419 $test -f "$xxx" && libstyle=shared
4421 if test ! -f "$xxx"; then
4422 xxx=$thisdir/lib$thislib.$so
4423 $test -f "$xxx" && eval $libscheck
4424 $test -f "$xxx" && libstyle=shared
4426 if test ! -f "$xxx"; then
4427 xxx=$thisdir/lib$thislib$_a
4428 $test -f "$xxx" && eval $libscheck
4429 $test -f "$xxx" && libstyle=static
4431 if test ! -f "$xxx"; then
4432 xxx=$thisdir/$thislib$_a
4433 $test -f "$xxx" && eval $libscheck
4434 $test -f "$xxx" && libstyle=static
4436 if test ! -f "$xxx"; then
4437 xxx=$thisdir/lib${thislib}_s$_a
4438 $test -f "$xxx" && eval $libscheck
4439 $test -f "$xxx" && libstyle=static
4440 $test -f "$xxx" && thislib=${thislib}_s
4442 if test ! -f "$xxx"; then
4443 xxx=$thisdir/Slib$thislib$_a
4444 $test -f "$xxx" && eval $libscheck
4445 $test -f "$xxx" && libstyle=static
4447 if $test -f "$xxx"; then
4449 shared) echo "Found -l$thislib (shared)." ;;
4450 static) echo "Found -l$thislib." ;;
4451 *) echo "Found -l$thislib ($libstyle)." ;;
4455 *) dflt="$dflt -l$thislib"
4456 libsfound="$libsfound $xxx"
4458 libsfiles="$libsfiles $yyy"
4459 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4460 case " $libsdirs " in
4462 *) libsdirs="$libsdirs $yyy" ;;
4469 if $test ! -f "$xxx"; then
4470 echo "No -l$thislib."
4481 ' '|'') dflt='none';;
4486 In order to compile $package on your machine, a number of libraries
4487 are usually needed. Include any other special libraries here as well.
4488 Say "none" for none. The default list is almost always right.
4492 rp="What libraries to use?"
4499 : determine optimization, if desired, or use for debug flag also
4501 ' '|$undef) dflt='none';;
4503 *) dflt="$optimize";;
4507 By default, $package compiles with the -O flag to use the optimizer.
4508 Alternately, you might want to use the symbolic debugger, which uses
4509 the -g flag (on traditional Unix systems). Either flag can be
4510 specified here. To use neither flag, specify the word "none".
4513 rp="What optimizer/debugger flag should be used?"
4517 'none') optimize=" ";;
4521 : We will not override a previous value, but we might want to
4522 : augment a hint file
4524 default|recommended)
4525 case "$gccversion" in
4526 1*) dflt='-fpcc-struct-return' ;;
4529 *-g*) dflt="$dflt -DDEBUGGING";;
4531 case "$gccversion" in
4532 2*) if test -d /etc/conf/kconfig.d &&
4533 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
4539 case "$gccversion" in
4543 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
4544 echo 'int main(void) { return 0; }' > gcctest.c
4545 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
4546 echo "Yes, it does." 2>&1
4549 echo "Leaving current flags $ccflags alone." 2>&1
4551 *) dflt="$dflt -fno-strict-aliasing" ;;
4554 echo "Nope, it doesn't, but that's ok." 2>&1
4561 case "$mips_type" in
4562 *BSD*|'') inclwanted="$locincpth $usrinc";;
4563 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
4565 for thisincl in $inclwanted; do
4566 if $test -d $thisincl; then
4567 if $test x$thisincl != x$usrinc; then
4569 *" -I$thisincl "*);;
4570 *) dflt="$dflt -I$thisincl ";;
4576 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
4578 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
4586 *) dflt="$dflt -D$2";;
4590 set signal.h LANGUAGE_C; eval $inctest
4594 ccflags="$ccflags -DSOCKS"
4599 default|recommended) dflt="$ccflags $dflt" ;;
4600 *) dflt="$ccflags";;
4609 Your C compiler may want other flags. For this question you should include
4610 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
4611 but you should NOT include libraries or ld flags like -lwhatever. If you
4612 want $package to honor its debug switch, you should include -DDEBUGGING here.
4613 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
4615 To use no flags, specify the word "none".
4621 rp="Any additional cc flags?"
4628 : the following weeds options from ccflags that are of no interest to cpp
4630 '') cppflags="$ccflags" ;;
4631 *) cppflags="$cppflags $ccflags" ;;
4633 case "$gccversion" in
4634 1*) cppflags="$cppflags -D__GNUC__"
4636 case "$mips_type" in
4638 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4644 echo "Let me guess what the preprocessor flags are..." >&4
4658 *) ftry="$previous $flag";;
4660 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4661 >cpp1.out 2>/dev/null && \
4662 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4663 >cpp2.out 2>/dev/null && \
4664 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4665 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4667 cppflags="$cppflags $ftry"
4677 *-*) echo "They appear to be: $cppflags";;
4679 $rm -f cpp.c cpp?.out
4683 : flags used in final linking phase
4685 '') if ./venix; then
4691 *-posix*) dflt="$dflt -posix" ;;
4694 *) dflt="$ldflags";;
4697 : Try to guess additional flags to pick up local libraries.
4698 for thislibdir in $libpth; do
4699 case " $loclibpth " in
4702 *"-L$thislibdir "*) ;;
4703 *) dflt="$dflt -L$thislibdir" ;;
4715 Your C linker may need flags. For this question you should
4716 include -L/whatever and any other flags used by the C linker, but you
4717 should NOT include libraries like -lwhatever.
4719 Make sure you include the appropriate -L/path flags if your C linker
4720 does not normally search all of the directories you specified above,
4723 To use no flags, specify the word "none".
4727 rp="Any additional ld flags (NOT including libraries)?"
4733 rmlist="$rmlist pdp11"
4737 echo "Checking your choice of C compiler and flags for coherency..." >&4
4738 $cat > try.c <<'EOF'
4740 int main() { printf("Ok\n"); exit(0); }
4742 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
4744 $cat >try.msg <<'EOM'
4745 I've tried to compile and run the following simple program:
4748 $cat try.c >> try.msg
4750 $cat >> try.msg <<EOM
4757 and I got the following output:
4761 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
4762 if $sh -c "$run ./try" >>try.msg 2>&1; then
4766 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4769 cat >> try.msg <<'EOQS'
4770 If $libs contains -lsfio, and sfio is mis-configured, then it
4771 sometimes (apparently) runs and exits with a 0 status, but with no
4772 output! It may have to do with sfio's use of _exit vs. exit.
4775 rp="You have a big problem. Shall I abort Configure"
4782 echo "The program compiled OK, but exited with status $?." >>try.msg
4783 rp="You have a problem. Shall I abort Configure"
4787 echo "I can't compile the test program." >>try.msg
4788 rp="You have a BIG problem. Shall I abort Configure"
4794 case "$knowitall" in
4796 echo "(The supplied flags or libraries might be incorrect.)"
4804 *) echo "Ok. Stopping Configure." >&4
4809 n) echo "OK, that should do.";;
4811 $rm -f try try.* core
4813 : define a shorthand compile call
4817 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
4818 : define a shorthand compile call for compilations that should be ok.
4822 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
4824 : check for lengths of integral types
4828 echo "Checking to see how big your integers are..." >&4
4829 $cat >try.c <<'EOCP'
4833 printf("intsize=%d;\n", (int)sizeof(int));
4834 printf("longsize=%d;\n", (int)sizeof(long));
4835 printf("shortsize=%d;\n", (int)sizeof(short));
4840 if eval $compile_ok && $run ./try > /dev/null; then
4842 echo "Your integers are $intsize bytes long."
4843 echo "Your long integers are $longsize bytes long."
4844 echo "Your short integers are $shortsize bytes long."
4848 Help! I can't compile and run the intsize test program: please enlighten me!
4849 (This is probably a misconfiguration in your system or libraries, and
4850 you really ought to fix it. Still, I'll try anyway.)
4854 rp="What is the size of an integer (in bytes)?"
4858 rp="What is the size of a long integer (in bytes)?"
4862 rp="What is the size of a short integer (in bytes)?"
4870 : check for long long
4872 echo "Checking to see if you have long long..." >&4
4873 echo 'int main() { long long x = 7; return 0; }' > try.c
4875 if eval $compile; then
4877 echo "You have long long."
4880 echo "You do not have long long."
4886 : check for length of long long
4887 case "${d_longlong}${longlongsize}" in
4890 echo "Checking to see how big your long longs are..." >&4
4891 $cat >try.c <<'EOCP'
4895 printf("%d\n", (int)sizeof(long long));
4900 if eval $compile_ok; then
4901 longlongsize=`$run ./try`
4902 echo "Your long longs are $longlongsize bytes long."
4906 echo "(I can't seem to compile the test program. Guessing...)"
4907 rp="What is the size of a long long (in bytes)?"
4911 if $test "X$longsize" = "X$longlongsize"; then
4912 echo "(That isn't any different from an ordinary long.)"
4918 : determine filename position in cpp output
4920 echo "Computing filename position in cpp output for #include directives..." >&4
4922 vos) testaccess=-e ;;
4925 echo '#include <stdio.h>' > foo.c
4928 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
4929 $grep '^[ ]*#.*stdio\.h' | \
4930 while read cline; do
4933 while $test \$# -gt 0; do
4934 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
4939 pos=\`expr \$pos + 1\`
4951 *) pos="${fieldn}th";;
4953 echo "Your cpp writes the filename in the $pos field of the line."
4956 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
4959 : locate header file
4964 for usrincdir in $usrinc
4966 if test -f \$usrincdir/\$wanted; then
4967 echo "\$usrincdir/\$wanted"
4971 awkprg='{ print \$$fieldn }'
4972 echo "#include <\$wanted>" > foo\$\$.c
4973 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
4974 $cppfilter $grep "^[ ]*#.*\$wanted" | \
4975 while read cline; do
4976 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
4978 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
4979 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
4984 # status = 0: grep returned 0 lines, case statement not executed
4985 # status = 1: headerfile found
4986 # status = 2: while loop executed, no headerfile found
4990 if test \$status -eq 1; then
4997 : define an alternate in-header-list? function
4998 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
4999 cont=true; xxf="echo \"<\$1> found.\" >&4";
5000 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5001 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5003 case $# in 4) instead=instead;; *) instead="at last";; esac;
5004 while $test "$cont"; do
5006 var=$2; eval "was=\$$2";
5007 if $test "$xxx" && $test -r "$xxx";
5009 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5012 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5013 set $yyy; shift; shift; yyy=$@;
5014 case $# in 0) cont="";;
5015 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5016 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5017 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5018 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5022 do set $yyy; var=$2; eval "was=\$$2";
5023 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5024 set $yyy; shift; shift; yyy=$@;
5027 : see if inttypes.h is available
5028 : we want a real compile instead of Inhdr because some systems
5029 : have an inttypes.h which includes non-existent headers
5032 #include <inttypes.h>
5034 static int32_t foo32 = 0x12345678;
5038 if eval $compile; then
5039 echo "<inttypes.h> found." >&4
5042 echo "<inttypes.h> NOT found." >&4
5051 echo "Checking to see if you have int64_t..." >&4
5053 #include <sys/types.h>
5054 #$i_inttypes I_INTTYPES
5056 #include <inttypes.h>
5058 int main() { int64_t x = 7; }
5061 if eval $compile; then
5063 echo "You have int64_t."
5066 echo "You do not have int64_t."
5074 echo "Checking which 64-bit integer type we could use..." >&4
5080 val='"unsigned int"'
5085 *) case "$longsize" in
5089 val='"unsigned long"'
5094 *) case "$d_longlong:$longlongsize" in
5099 val='"unsigned long long"'
5104 *) case "$d_int64_t" in
5123 '') echo "Alas, no 64-bit integer types in sight." >&4
5126 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5132 case "$uselonglong" in
5133 "$define"|true|[yY]*)
5136 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5138 use64bitint="$define"
5141 case "$use64bits" in
5142 "$define"|true|[yY]*)
5145 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5147 use64bitint="$define"
5150 case "$use64bitints" in
5151 "$define"|true|[yY]*)
5154 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5156 use64bitint="$define"
5159 case "$use64bitsint" in
5160 "$define"|true|[yY]*)
5163 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5165 use64bitint="$define"
5168 case "$uselonglongs" in
5169 "$define"|true|[yY]*)
5172 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5174 use64bitint="$define"
5177 case "$use64bitsall" in
5178 "$define"|true|[yY]*)
5181 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5183 use64bitall="$define"
5188 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5190 case "$use64bitall" in
5191 "$define"|true|[yY]*) use64bitint="$define" ;;
5197 You have natively 64-bit long integers.
5201 *) case "$use64bitint" in
5202 "$define"|true|[yY]*) dflt='y';;
5211 Perl can be built to take advantage of 64-bit integer types
5212 on some systems. To do so, Configure can be run with -Duse64bitint.
5213 Choosing this option will most probably introduce binary incompatibilities.
5215 If this doesn't make any sense to you, just accept the default '$dflt'.
5216 (The default has been chosen based on your configuration.)
5218 rp='Try to use 64-bit integers, if available?'
5221 [yY]*) val="$define" ;;
5229 case "$use64bitall" in
5230 "$define"|true|[yY]*) dflt='y' ;;
5231 *) case "$longsize" in
5239 You may also choose to try maximal 64-bitness. It means using as much
5240 64-bitness as possible on the platform. This in turn means even more
5241 binary incompatibilities. On the other hand, your platform may not
5242 have any more 64-bitness available than what you already have chosen.
5244 If this doesn't make any sense to you, just accept the default '$dflt'.
5245 (The default has been chosen based on your configuration.)
5247 rp='Try to use maximal 64-bit support, if available?'
5250 [yY]*) val="$define" ;;
5255 case "$use64bitall" in
5257 case "$use64bitint" in
5261 Since you have chosen a maximally 64-bit build, I'm also turning on
5262 the use of 64-bit integers.
5264 use64bitint="$define" ;;
5269 case "$use64bitint" in
5270 "$define"|true|[yY]*)
5271 : Look for a hint-file generated 'call-back-unit'. If the
5272 : user has specified that a 64-bit perl is to be built,
5273 : we may need to set or change some other defaults.
5274 if $test -f use64bitint.cbu; then
5275 echo "Your platform has some specific hints for 64-bit integers, using them..."
5279 4) case "$archname64" in
5280 '') archname64=64int ;;
5287 case "$use64bitall" in
5288 "$define"|true|[yY]*)
5289 : Look for a hint-file generated 'call-back-unit'. If the
5290 : user has specified that a maximally 64-bit perl is to be built,
5291 : we may need to set or change some other defaults.
5292 if $test -f use64bitall.cbu; then
5293 echo "Your platform has some specific hints for 64-bit builds, using them..."
5297 4) case "$archname64" in
5298 ''|64int) archname64=64all ;;
5306 echo "Checking for GNU C Library..." >&4
5308 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
5309 alone are insufficient to distinguish different versions, such as
5310 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
5311 libc version 2.1.0. A. Dougherty, June 3, 2002.
5317 # ifdef __GLIBC_MINOR__
5318 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
5319 # include <gnu/libc-version.h>
5320 printf("%s\n", gnu_get_libc_version());
5322 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
5325 printf("%d\n", __GLIBC__);
5334 if eval $compile_ok && $run ./try > glibc.ver; then
5336 gnulibc_version=`$cat glibc.ver`
5337 echo "You are using the GNU C Library version $gnulibc_version"
5341 echo "You are not using the GNU C Library"
5343 $rm -f try try.* glibc.ver
5347 : see if nm is to be used to determine whether a symbol is defined or not
5351 case "$d_gnulibc" in
5354 echo "nm probably won't work on the GNU C Library." >&4
5360 if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
5362 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
5363 echo "'nm' won't be sufficient on this sytem." >&4
5369 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
5370 if $test $dflt -gt 20; then
5380 true|$define) dflt=y;;
5387 I can use $nm to extract the symbols from your C libraries. This
5388 is a time consuming task which may generate huge output on the disk (up
5389 to 3 megabytes) but that should make the symbols extraction faster. The
5390 alternative is to skip the 'nm' extraction part and to compile a small
5391 test program instead to determine whether each symbol is present. If
5392 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
5393 this may be the best solution.
5395 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
5398 rp="Shall I use $nm to extract C symbols from the libraries?"
5401 [Nn]*) usenm=false;;
5410 : nm options which may be necessary
5412 '') if $test -f /mach_boot; then
5414 elif $test -d /usr/ccs/lib; then
5415 nm_opt='-p' # Solaris (and SunOS?)
5416 elif $test -f /dgux; then
5418 elif $test -f /lib64/rld; then
5419 nm_opt='-p' # 64-bit Irix
5425 : nm options which may be necessary for shared libraries but illegal
5426 : for archive libraries. Thank you, Linux.
5427 case "$nm_so_opt" in
5428 '') case "$myuname" in
5430 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
5431 nm_so_opt='--dynamic'
5440 : get list of predefined functions in a handy place
5445 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
5451 *) for thislib in $libs; do
5454 : Handle C library specially below.
5457 thislib=`echo $thislib | $sed -e 's/^-l//'`
5458 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
5460 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
5462 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
5464 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
5466 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
5468 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
5470 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
5475 libnames="$libnames $try"
5477 *) libnames="$libnames $thislib" ;;
5486 for xxx in $libpth; do
5487 $test -r $1 || set $xxx/libc.$so
5488 : The messy sed command sorts on library version numbers.
5490 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
5491 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
5493 s/[0-9][0-9]*/0000&/g
5494 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
5497 $sort | $sed -e 's/^.* //'`
5500 $test -r $1 || set /usr/ccs/lib/libc.$so
5501 $test -r $1 || set /lib/libsys_s$_a
5507 if $test -r "$1"; then
5508 echo "Your (shared) C library seems to be in $1."
5510 elif $test -r /lib/libc && $test -r /lib/clib; then
5511 echo "Your C library seems to be in both /lib/clib and /lib/libc."
5513 libc='/lib/clib /lib/libc'
5514 if $test -r /lib/syslib; then
5515 echo "(Your math library is in /lib/syslib.)"
5516 libc="$libc /lib/syslib"
5518 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5519 echo "Your C library seems to be in $libc, as you said before."
5520 elif $test -r $incpath/usr/lib/libc$_a; then
5521 libc=$incpath/usr/lib/libc$_a;
5522 echo "Your C library seems to be in $libc. That's fine."
5523 elif $test -r /lib/libc$_a; then
5525 echo "Your C library seems to be in $libc. You're normal."
5527 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
5529 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
5530 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
5531 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
5533 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5535 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
5538 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
5540 if $test -r "$tans"; then
5541 echo "Your C library seems to be in $tans, of all places."
5547 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
5551 If the guess above is wrong (which it might be if you're using a strange
5552 compiler, or your machine supports multiple models), you can override it here.
5557 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
5559 I can't seem to find your C library. I've looked in the following places:
5562 $sed 's/^/ /' libpath
5565 None of these seems to contain your C library. I need to get its name...
5570 rp='Where is your C library?'
5575 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
5576 set X `cat libnames`
5579 case $# in 1) xxx=file; esac
5580 echo "Extracting names from the following $xxx for later perusal:" >&4
5582 $sed 's/^/ /' libnames >&4
5584 $echo $n "This may take a while...$c" >&4
5588 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
5589 *) $nm $nm_opt $file 2>/dev/null;;
5594 $grep fprintf libc.tmp > libc.ptf
5595 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
5596 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
5598 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
5600 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5602 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
5604 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5606 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
5608 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5610 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
5612 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5614 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
5616 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5618 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
5620 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5622 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
5623 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
5625 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5627 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
5629 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5631 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
5633 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5635 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
5637 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5639 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
5641 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5643 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
5645 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5647 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
5649 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5651 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
5653 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5656 $nm -p $* 2>/dev/null >libc.tmp
5657 $grep fprintf libc.tmp > libc.ptf
5658 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
5659 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
5665 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
5667 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
5668 for thisname in $libnames $libc; do
5669 $ar t $thisname >>libc.tmp
5671 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
5673 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
5674 # Repeat libc to extract forwarders to DLL entries too
5675 for thisname in $libnames $libc; do
5676 $ar tv $thisname >>libc.tmp
5677 # Revision 50 of EMX has bug in $ar.
5678 # it will not extract forwarders to DLL entries
5679 # Use emximp which will extract exactly them.
5680 emximp -o tmp.imp $thisname \
5682 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
5683 < tmp.imp >>libc.tmp
5686 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
5689 echo "$ar didn't seem to work right." >&4
5690 echo "Maybe this is a Cray...trying bld instead..." >&4
5691 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
5693 for thisname in $libnames; do
5695 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
5696 $ar t $thisname >>libc.tmp
5700 echo "That didn't work either. Giving up." >&4
5707 if $test -f /lib/syscalls.exp; then
5709 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
5710 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list
5714 $rm -f libnames libpath
5716 : is a C symbol defined?
5719 -v) tf=libc.tmp; tc=""; tdc="";;
5720 -a) tf=libc.tmp; tc="[0]"; tdc="[]";;
5721 *) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
5724 case "$reuseval-$4" in
5726 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
5732 if $contains $tlook $tf >/dev/null 2>&1;
5737 echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
5738 if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1;
5746 $define) tval=true;;
5752 : define an is-in-libc? function
5753 inlibc='echo " "; td=$define; tu=$undef;
5754 sym=$1; var=$2; eval "was=\$$2";
5756 case "$reuseval$was" in
5766 echo "$sym() found." >&4;
5767 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
5769 echo "$sym() NOT found." >&4;
5770 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
5774 $define) echo "$sym() found." >&4;;
5775 *) echo "$sym() NOT found." >&4;;
5779 : see if sqrtl exists
5783 : check for length of double
5785 case "$doublesize" in
5787 echo "Checking to see how big your double precision numbers are..." >&4
5788 $cat >try.c <<'EOCP'
5792 printf("%d\n", (int)sizeof(double));
5797 if eval $compile_ok; then
5798 doublesize=`$run ./try`
5799 echo "Your double is $doublesize bytes long."
5802 echo "(I can't seem to compile the test program. Guessing...)"
5803 rp="What is the size of a double precision number (in bytes)?"
5811 : check for long doubles
5813 echo "Checking to see if you have long double..." >&4
5814 echo 'int main() { long double x = 7.0; }' > try.c
5816 if eval $compile; then
5818 echo "You have long double."
5821 echo "You do not have long double."
5827 : check for length of long double
5828 case "${d_longdbl}${longdblsize}" in
5831 echo "Checking to see how big your long doubles are..." >&4
5832 $cat >try.c <<'EOCP'
5836 printf("%d\n", sizeof(long double));
5841 if eval $compile; then
5842 longdblsize=`$run ./try`
5843 echo "Your long doubles are $longdblsize bytes long."
5847 echo "(I can't seem to compile the test program. Guessing...)" >&4
5848 rp="What is the size of a long double (in bytes)?"
5852 if $test "X$doublesize" = "X$longdblsize"; then
5853 echo "(That isn't any different from an ordinary double.)"
5861 if $test X"$d_longdbl" = X"$define"; then
5863 echo "Checking how to print long doubles..." >&4
5865 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
5866 $cat >try.c <<'EOCP'
5867 #include <sys/types.h>
5871 printf("%.3f\n", d);
5875 if eval $compile; then
5879 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
5880 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
5881 echo "We will use %f."
5887 if $test X"$sPRIfldbl" = X; then
5888 $cat >try.c <<'EOCP'
5889 #include <sys/types.h>
5892 long double d = 123.456;
5893 printf("%.3Lf\n", d);
5897 if eval $compile; then
5901 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
5902 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
5903 echo "We will use %Lf."
5909 if $test X"$sPRIfldbl" = X; then
5910 $cat >try.c <<'EOCP'
5911 #include <sys/types.h>
5914 long double d = 123.456;
5915 printf("%.3llf\n", d);
5919 if eval $compile; then
5923 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
5924 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
5925 echo "We will use %llf."
5931 if $test X"$sPRIfldbl" = X; then
5932 $cat >try.c <<'EOCP'
5933 #include <sys/types.h>
5936 long double d = 123.456;
5937 printf("%.3lf\n", d);
5941 if eval $compile; then
5945 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
5946 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
5947 echo "We will use %lf."
5953 if $test X"$sPRIfldbl" = X; then
5954 echo "Cannot figure out how to print long doubles." >&4
5956 sSCNfldbl=$sPRIfldbl # expect consistency
5963 case "$sPRIfldbl" in
5964 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
5965 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
5966 d_SCNfldbl="$undef";
5968 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
5969 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
5970 d_SCNfldbl="$define";
5974 : see if modfl exists
5978 d_modfl_pow32_bug="$undef"
5980 case "$d_longdbl$d_modfl" in
5983 Checking to see whether your modfl() is okay for large values...
5989 long double nv = 4294967303.15;
5995 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
5999 case "$osname:$gccversion" in
6000 aix:) saveccflags="$ccflags"
6001 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
6004 if eval $compile; then
6007 *" 4294967303.150000 1.150000 4294967302.000000")
6008 echo >&4 "Your modfl() is broken for large values."
6009 d_modfl_pow32_bug="$define"
6011 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
6015 *" 4294967303.150000 0.150000 4294967303.000000")
6016 echo >&4 "Your modfl() seems okay for large values."
6018 *) echo >&4 "I don't understand your modfl() at all."
6022 $rm -f try.* try core core.try.*
6024 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
6027 case "$osname:$gccversion" in
6028 aix:) ccflags="$saveccflags" ;; # restore
6034 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
6037 case "$uselongdouble" in
6038 $define|true|[yY]*) dflt='y';;
6043 Perl can be built to take advantage of long doubles which
6044 (if available) may give more accuracy and range for floating point numbers.
6046 If this doesn't make any sense to you, just accept the default '$dflt'.
6048 rp='Try to use long doubles if available?'
6051 y|Y) val="$define" ;;
6057 case "$uselongdouble" in
6058 true|[yY]*) uselongdouble="$define" ;;
6061 case "$uselongdouble" in
6063 : Look for a hint-file generated 'call-back-unit'. If the
6064 : user has specified that long doubles should be used,
6065 : we may need to set or change some other defaults.
6066 if $test -f uselongdouble.cbu; then
6067 echo "Your platform has some specific hints for long doubles, using them..."
6068 . ./uselongdouble.cbu
6071 (Your platform doesn't have any specific hints for long doubles.)
6078 case "$uselongdouble:$d_sqrtl:$d_modfl" in
6079 $define:$define:$define)
6082 $define:$define:$undef)
6083 message="I could not find modfl"
6085 $define:$undef:$define)
6086 message="I could not find sqrtl"
6088 $define:$undef:$undef)
6089 message="I found neither sqrtl nor modfl"
6093 if $test "$message" != X; then
6096 *** You requested the use of long doubles but you do not seem to have
6097 *** the mathematic functions for long doubles.
6099 *** I'm disabling the use of long doubles.
6103 uselongdouble=$undef
6106 case "$useperlio" in
6107 $define|true|[yY]*|'') dflt='y';;
6112 Previous version of $package used the standard IO mechanisms as
6113 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
6114 alternate IO mechanisms via the PerlIO abstraction layer, but the
6115 stdio mechanism is still available if needed. The abstraction layer
6116 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
6117 Using PerlIO with sfio may cause problems with some extension modules.
6119 If this doesn't make any sense to you, just accept the default '$dflt'.
6121 rp='Use the PerlIO abstraction layer?'
6128 echo "Ok, doing things the stdio way."
6137 case "$useperlio" in
6138 $define|true|[yY]*) ;;
6141 You are using the SOCKS proxy protocol library which means that you
6142 should also use the PerlIO layer. You may be headed for trouble.
6151 : determine the architecture name
6153 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
6154 tarch=`arch`"-$osname"
6155 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
6156 if uname -m > tmparch 2>&1 ; then
6157 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
6158 -e 's/$/'"-$osname/" tmparch`
6166 case "$myarchname" in
6169 echo "(Your architecture name used to be $myarchname.)"
6173 case "$targetarch" in
6175 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
6180 *) dflt="$archname";;
6182 rp='What is your architecture name'
6185 case "$usethreads" in
6187 echo "Threads selected." >&4
6189 *-thread*) echo "...and architecture name already has -thread." >&4
6191 *) archname="$archname-thread"
6192 echo "...setting architecture name to $archname." >&4
6197 case "$usemultiplicity" in
6199 echo "Multiplicity selected." >&4
6201 *-multi*) echo "...and architecture name already has -multi." >&4
6203 *) archname="$archname-multi"
6204 echo "...setting architecture name to $archname." >&4
6209 case "$use64bitint$use64bitall" in
6211 case "$archname64" in
6213 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
6216 case "$use64bitint" in
6217 "$define") echo "64 bit integers selected." >&4 ;;
6219 case "$use64bitall" in
6220 "$define") echo "Maximal 64 bitness selected." >&4 ;;
6223 *-$archname64*) echo "...and architecture name already has $archname64." >&4
6225 *) archname="$archname-$archname64"
6226 echo "...setting architecture name to $archname." >&4
6232 case "$uselongdouble" in
6234 echo "Long doubles selected." >&4
6235 case "$longdblsize" in
6237 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
6241 *-ld*) echo "...and architecture name already has -ld." >&4
6243 *) archname="$archname-ld"
6244 echo "...setting architecture name to $archname." >&4
6251 case "$useperlio" in
6253 echo "Perlio selected." >&4
6256 echo "Perlio not selected, using stdio." >&4
6258 *-stdio*) echo "...and architecture name already has -stdio." >&4
6260 *) archname="$archname-stdio"
6261 echo "...setting architecture name to $archname." >&4
6267 : determine root of directory hierarchy where package will be installed.
6270 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
6278 By default, $package will be installed in $dflt/bin, manual pages
6279 under $dflt/man, etc..., i.e. with $dflt as prefix for all
6280 installation directories. Typically this is something like /usr/local.
6281 If you wish to have binaries under /usr/bin but other parts of the
6282 installation under /usr/local, that's ok: you will be prompted
6283 separately for each of the installation directories, the prefix being
6284 only used to set the defaults.
6288 rp='Installation prefix to use?'
6296 *) oldprefix="$prefix";;
6305 *) afsroot=$afsroot ;;
6311 $define|true) afs=true ;;
6312 $undef|false) afs=false ;;
6313 *) if test -d $afsroot; then
6321 echo "AFS may be running... I'll be extra cautious then..." >&4
6323 echo "AFS does not seem to be running..." >&4
6326 : determine installation prefix for where package is to be installed.
6330 Since you are running AFS, I need to distinguish the directory in which
6331 files will reside from the directory in which they are installed (and from
6332 which they are presumably copied to the former directory by occult means).
6335 case "$installprefix" in
6336 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
6337 *) dflt="$installprefix";;
6342 In some special cases, particularly when building $package for distribution,
6343 it is convenient to distinguish between the directory in which files should
6344 be installed from the directory ($prefix) in which they
6345 will eventually reside. For most users, these two directories are the same.
6348 case "$installprefix" in
6350 *) dflt=$installprefix;;
6354 rp='What installation prefix should I use for installing files?'
6356 installprefix="$ans"
6357 installprefixexp="$ansexp"
6359 : set the prefixit variable, to compute a suitable default value
6360 prefixit='case "$3" in
6362 case "$oldprefix" in
6363 "") eval "$1=\"\$$2\"";;
6370 ""|" ") eval "$1=\"\$$2\"";;
6376 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
6378 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
6379 /*-$oldprefix/*|\~*-$oldprefix/*)
6380 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
6381 *) eval "$1=\"\$$2\"";;
6385 : get the patchlevel
6387 echo "Getting the current patchlevel..." >&4
6388 if $test -r $rsrc/patchlevel.h;then
6389 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
6390 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
6391 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6392 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
6393 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
6394 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
6395 perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
6404 $echo "(You do not have patchlevel.h. Eek.)"
6406 if $test -r $rsrc/.patch ; then
6407 if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
6408 perl_patchlevel=`cat $rsrc/.patch`
6411 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
6412 version_patchlevel_string="version $patchlevel subversion $subversion"
6413 case "$perl_patchlevel" in
6415 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
6418 $echo "(You have $package $version_patchlevel_string.)"
6422 : XXX Should be a Configure test for double-dots in filenames.
6423 version=`echo $revision $patchlevel $subversion | \
6424 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6425 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6426 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
6429 version=`echo $revision $patchlevel $subversion | \
6430 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6431 api_versionstring=`echo $api_revision $api_version $api_subversion | \
6432 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
6435 : Special case the 5.005_xx maintenance series, which used 5.005
6436 : without any subversion label as a subdirectory in $sitelib
6437 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
6438 api_versionstring='5.005'
6441 : determine installation style
6442 : For now, try to deduce it from prefix unless it is already set.
6443 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
6444 case "$installstyle" in
6445 '') case "$prefix" in
6446 *perl*) dflt='lib';;
6447 *) dflt='lib/perl5' ;;
6450 *) dflt="$installstyle" ;;
6452 : Probably not worth prompting for this since we prompt for all
6453 : the directories individually, and the prompt would be too long and
6457 : determine where private library files go
6458 : Usual default is /usr/local/lib/perl5/$version.
6459 : Also allow things like /opt/perl/lib/$version, since
6460 : /opt/perl/lib/perl5... would be redundant.
6461 : The default "style" setting is made in installstyle.U
6462 case "$installstyle" in
6463 *lib/perl5*) set dflt privlib lib/$package/$version ;;
6464 *) set dflt privlib lib/$version ;;
6469 There are some auxiliary files for $package that need to be put into a
6470 private library directory that is accessible by everyone.
6474 rp='Pathname where the private library files will reside?'
6477 privlibexp="$ansexp"
6478 : Change installation prefix, if necessary.
6479 if $test X"$prefix" != X"$installprefix"; then
6480 installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
6482 installprivlib="$privlibexp"
6485 : set the prefixup variable, to restore leading tilda escape
6486 prefixup='case "$prefixexp" in
6488 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
6491 : determine where public architecture dependent libraries go
6494 : privlib default is /usr/local/lib/$package/$version
6495 : archlib default is /usr/local/lib/$package/$version/$archname
6496 : privlib may have an optional trailing /share.
6497 tdflt=`echo $privlib | $sed 's,/share$,,'`
6498 tdflt=$tdflt/$archname
6507 $spackage contains architecture-dependent library files. If you are
6508 sharing libraries in a heterogeneous environment, you might store
6509 these files in a separate location. Otherwise, you can just include
6510 them with the rest of the public library files.
6514 rp='Where do you want to put the public architecture-dependent libraries?'
6517 archlibexp="$ansexp"
6518 if $test X"$archlib" = X"$privlib"; then
6523 : Change installation prefix, if necessary.
6524 if $test X"$prefix" != X"$installprefix"; then
6525 installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
6527 installarchlib="$archlibexp"
6530 : see if setuid scripts can be secure
6533 Some kernels have a bug that prevents setuid #! scripts from being
6534 secure. Some sites have disabled setuid #! scripts because of this.
6536 First let's decide if your kernel supports secure setuid #! scripts.
6537 (If setuid #! scripts would be secure but have been disabled anyway,
6538 don't say that they are secure if asked.)
6543 if $test -d /dev/fd; then
6544 echo "#!$ls" >reflect
6545 chmod +x,u+s reflect
6546 ./reflect >flect 2>&1
6547 if $contains "/dev/fd" flect >/dev/null; then
6548 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6552 If you are not sure if they are secure, I can check but I'll need a
6553 username and password different from the one you are using right now.
6554 If you don't have such a username or don't want me to test, simply
6558 rp='Other username to test security of setuid scripts with?'
6563 case "$d_suidsafe" in
6564 '') echo "I'll assume setuid scripts are *not* secure." >&4
6567 echo "Well, the $hint value is *not* secure." >&4
6569 *) echo "Well, the $hint value *is* secure." >&4
6574 $rm -f reflect flect
6575 echo "#!$ls" >reflect
6576 chmod +x,u+s reflect
6579 echo '"su" will (probably) prompt you for '"$ans's password."
6580 su $ans -c './reflect >flect'
6581 if $contains "/dev/fd" flect >/dev/null; then
6582 echo "Okay, it looks like setuid scripts are secure." >&4
6585 echo "I don't think setuid scripts are secure." >&4
6590 rp='Does your kernel have *secure* setuid scripts?'
6593 [yY]*) val="$define";;
6598 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6599 echo "(That's for file descriptors, not floppy disks.)"
6605 $rm -f reflect flect
6607 : now see if they want to do setuid emulation
6610 case "$d_suidsafe" in
6613 echo "No need to emulate SUID scripts since they are secure here." >&4
6617 Some systems have disabled setuid scripts, especially systems where
6618 setuid scripts cannot be secure. On systems where setuid scripts have
6619 been disabled, the setuid/setgid bits on scripts are currently
6620 useless. It is possible for $package to detect those bits and emulate
6621 setuid/setgid in a secure fashion. This emulation will only work if
6622 setuid scripts have been disabled in your kernel.
6626 "$define") dflt=y ;;
6629 rp="Do you want to do setuid/setgid emulation?"
6632 [yY]*) val="$define";;
6640 : see if this is a malloc.h system
6641 set malloc.h i_malloc
6644 : see if stdlib is available
6645 set stdlib.h i_stdlib
6648 : check for void type
6650 echo "Checking to see how well your C compiler groks the void type..." >&4
6651 case "$voidflags" in
6653 $cat >try.c <<'EOCP'
6659 extern void moo(); /* function returning void */
6660 void (*goo)(); /* ptr to func returning void */
6662 void *hue; /* generic ptr */
6675 int main() { sub(); }
6677 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
6678 voidflags=$defvoidused
6679 echo "Good. It appears to support void to the level $package wants.">&4
6680 if $contains warning .out >/dev/null 2>&1; then
6681 echo "However, you might get some warnings that look like this:"
6685 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
6686 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
6687 echo "It supports 1..."
6688 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
6689 echo "It also supports 2..."
6690 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
6692 echo "And it supports 4 but not 8 definitely."
6694 echo "It doesn't support 4..."
6695 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
6697 echo "But it supports 8."
6700 echo "Neither does it support 8."
6704 echo "It does not support 2..."
6705 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
6707 echo "But it supports 4 and 8."
6709 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
6711 echo "And it supports 4 but has not heard about 8."
6713 echo "However it supports 8 but not 4."
6718 echo "There is no support at all for void."
6723 case "$voidflags" in
6726 Support flag bits are:
6727 1: basic void declarations.
6728 2: arrays of pointers to functions returning void.
6729 4: operations between pointers to and addresses of void functions.
6730 8: generic void pointers.
6733 rp="Your void support flags add up to what?"
6740 : check for length of pointer
6744 echo "Checking to see how big your pointers are..." >&4
6745 if test "$voidflags" -gt 7; then
6746 echo '#define VOID_PTR char *' > try.c
6748 echo '#define VOID_PTR void *' > try.c
6750 $cat >>try.c <<'EOCP'
6754 printf("%d\n", (int)sizeof(VOID_PTR));
6759 if eval $compile_ok; then
6760 ptrsize=`$run ./try`
6761 echo "Your pointers are $ptrsize bytes long."
6764 echo "(I can't seem to compile the test program. Guessing...)" >&4
6765 rp="What is the size of a pointer (in bytes)?"
6772 case "$use64bitall" in
6773 "$define"|true|[yY]*)
6777 *** You have chosen a maximally 64-bit build, but your pointers
6778 *** are only 4 bytes wide, disabling maximal 64-bitness.
6781 use64bitall="$undef"
6782 case "$use64bitint" in
6783 "$define"|true|[yY]*) ;;
6786 *** Downgrading from maximal 64-bitness to using 64-bit integers.
6789 use64bitint="$define"
6798 : determine which malloc to compile in
6800 case "$usemymalloc" in
6801 [yY]*|true|$define) dflt='y' ;;
6802 [nN]*|false|$undef) dflt='n' ;;
6803 *) case "$ptrsize" in
6809 rp="Do you wish to attempt to use the malloc that comes with $package?"
6815 mallocsrc='malloc.c'
6816 mallocobj="malloc$_o"
6817 d_mymalloc="$define"
6820 : Remove malloc from list of libraries to use
6821 echo "Removing unneeded -lmalloc from library list" >&4
6822 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6825 echo "libs = $libs" >&4
6837 : compute the return types of malloc and free
6839 $cat >malloc.c <<END
6843 #include <sys/types.h>
6857 case "$malloctype" in
6859 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6866 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6870 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6877 echo "Your system uses $freetype free(), it would seem." >&4
6881 After $package is installed, you may wish to install various
6882 add-on modules and utilities. Typically, these add-ons will
6883 be installed under $prefix with the rest
6884 of this package. However, you may wish to install such add-ons
6885 elsewhere under a different prefix.
6887 If you do not wish to put everything under a single prefix, that's
6888 ok. You will be prompted for the individual locations; this siteprefix
6889 is only used to suggest the defaults.
6891 The default should be fine for most people.
6895 rp='Installation prefix to use for add-on modules and utilities?'
6896 : XXX Here might be another good place for an installstyle setting.
6897 case "$siteprefix" in
6899 *) dflt=$siteprefix ;;
6902 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6904 case "$siteprefix" in
6908 *) oldsiteprefix="$prefix";;
6913 siteprefixexp="$ansexp"
6915 : determine where site specific libraries go.
6916 : Usual default is /usr/local/lib/perl5/site_perl/$version
6917 : The default "style" setting is made in installstyle.U
6918 : XXX No longer works with Prefixit stuff.
6919 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6921 '') case "$installstyle" in
6922 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6923 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6931 The installation process will create a directory for
6932 site-specific extensions and modules. Most users find it convenient
6933 to place all site-specific files in this directory rather than in the
6934 main distribution directory.
6938 rp='Pathname for the site-specific library files?'
6941 sitelibexp="$ansexp"
6942 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
6943 : Change installation prefix, if necessary.
6944 if $test X"$prefix" != X"$installprefix"; then
6945 installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
6947 installsitelib="$sitelibexp"
6950 : determine where site specific architecture-dependent libraries go.
6951 : sitelib default is /usr/local/lib/perl5/site_perl/$version
6952 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
6953 : sitelib may have an optional trailing /share.
6955 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
6956 dflt="$dflt/$archname"
6961 set sitearch sitearch none
6965 The installation process will also create a directory for
6966 architecture-dependent site-specific extensions and modules.
6970 rp='Pathname for the site-specific architecture-dependent library files?'
6973 sitearchexp="$ansexp"
6974 : Change installation prefix, if necessary.
6975 if $test X"$prefix" != X"$installprefix"; then
6976 installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
6978 installsitearch="$sitearchexp"
6983 The installation process will also create a directory for
6984 vendor-supplied add-ons. Vendors who supply perl with their system
6985 may find it convenient to place all vendor-supplied files in this
6986 directory rather than in the main distribution directory. This will
6987 ease upgrades between binary-compatible maintenance versions of perl.
6989 Of course you may also use these directories in whatever way you see
6990 fit. For example, you might use them to access modules shared over a
6991 company-wide network.
6993 The default answer should be fine for most people.
6994 This causes further questions about vendor add-ons to be skipped
6995 and no vendor-specific directories will be configured for perl.
6998 rp='Do you want to configure vendor-specific add-on directories?'
6999 case "$usevendorprefix" in
7000 define|true|[yY]*) dflt=y ;;
7001 *) : User may have set vendorprefix directly on Configure command line.
7002 case "$vendorprefix" in
7011 rp='Installation prefix to use for vendor-supplied add-ons?'
7012 case "$vendorprefix" in
7014 *) dflt=$vendorprefix ;;
7017 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7019 case "$vendorprefix" in
7023 *) oldvendorprefix="$prefix";;
7027 usevendorprefix="$define"
7029 vendorprefixexp="$ansexp"
7031 *) usevendorprefix="$undef"
7037 case "$vendorprefix" in
7038 '') d_vendorlib="$undef"
7042 *) d_vendorlib="$define"
7043 : determine where vendor-supplied modules go.
7044 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
7045 case "$vendorlib" in
7047 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7048 case "$installstyle" in
7049 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
7050 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
7053 *) dflt="$vendorlib"
7057 rp='Pathname for the vendor-supplied library files?'
7060 vendorlibexp="$ansexp"
7063 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
7064 : Change installation prefix, if necessary.
7065 if $test X"$prefix" != X"$installprefix"; then
7066 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
7068 installvendorlib="$vendorlibexp"
7071 case "$vendorprefix" in
7072 '') d_vendorarch="$undef"
7076 *) d_vendorarch="$define"
7077 : determine where vendor-supplied architecture-dependent libraries go.
7078 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
7079 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
7080 : vendorlib may have an optional trailing /share.
7081 case "$vendorarch" in
7082 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
7083 dflt="$dflt/$archname"
7085 *) dflt="$vendorarch" ;;
7088 rp='Pathname for vendor-supplied architecture-dependent files?'
7091 vendorarchexp="$ansexp"
7094 : Change installation prefix, if necessary.
7095 if $test X"$prefix" != X"$installprefix"; then
7096 installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
7098 installvendorarch="$vendorarchexp"
7101 : Final catch-all directories to search
7104 Lastly, you can have perl look in other directories for extensions and
7105 modules in addition to those already specified.
7106 These directories will be searched after
7110 test X"$vendorlib" != "X" && echo ' ' $vendorlib
7111 test X"$vendorarch" != "X" && echo ' ' $vendorarch
7113 case "$otherlibdirs" in
7114 ''|' ') dflt='none' ;;
7115 *) dflt="$otherlibdirs" ;;
7118 Enter a colon-separated set of extra paths to include in perl's @INC
7119 search path, or enter 'none' for no extra paths.
7123 rp='Colon-separated list of additional directories for perl to search?'
7126 ' '|''|none) otherlibdirs=' ' ;;
7127 *) otherlibdirs="$ans" ;;
7129 case "$otherlibdirs" in
7133 set d_perl_otherlibdirs
7136 : Cruising for prototypes
7138 echo "Checking out function prototypes..." >&4
7139 $cat >prototype.c <<'EOCP'
7140 int main(int argc, char *argv[]) {
7143 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
7144 echo "Your C compiler appears to support function prototypes."
7147 echo "Your C compiler doesn't seem to understand function prototypes."
7154 case "$prototype" in
7156 *) ansi2knr='ansi2knr'
7161 This version of $package can only be compiled by a compiler that
7162 understands function prototypes. Unfortunately, your C compiler
7164 doesn't seem to understand them. Sorry about that.
7166 If GNU cc is available for your system, perhaps you could try that instead.
7168 Eventually, we hope to support building Perl with pre-ANSI compilers.
7169 If you would like to help in that effort, please contact <perlbug@perl.org>.
7171 Aborting Configure now.
7177 : determine where public executables go
7182 rp='Pathname where the public executables will reside?'
7184 if $test "X$ansexp" != "X$binexp"; then
7189 : Change installation prefix, if necessary.
7190 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
7191 if $test X"$prefix" != X"$installprefix"; then
7192 installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
7194 installbin="$binexp"
7203 Perl can be built with extra modules or bundles of modules which
7204 will be fetched from the CPAN and installed alongside Perl.
7206 Notice that you will need access to the CPAN; either via the Internet,
7207 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
7208 be asked later to configure the CPAN.pm module which will in turn do
7209 the installation of the rest of the extra modules or bundles.)
7211 Notice also that if the modules require any external software such as
7212 libraries and headers (the libz library and the zlib.h header for the
7213 Compress::Zlib module, for example) you MUST have any such software
7214 already installed, this configuration process will NOT install such
7217 If this doesn't make any sense to you, just accept the default '$dflt'.
7219 rp='Install any extra modules (y or n)?'
7225 Please list any extra modules or bundles to be installed from CPAN,
7226 with spaces between the names. The names can be in any format the
7227 'install' command of CPAN.pm will understand. (Answer 'none',
7228 without the quotes, to install no extra modules or bundles.)
7238 $rm -f ../extras.lst
7240 *) echo "(Saving the list of extras for later...)"
7241 echo "$extras" > ../extras.lst
7249 : Find perl5.005 or later.
7250 echo "Looking for a previously installed perl5.005 or later... "
7252 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
7253 : Check if this perl is recent and can load a simple module
7254 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7257 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7267 '') echo "None found. That's ok.";;
7268 *) echo "Using $perl5." ;;
7271 : Determine list of previous versions to include in @INC
7272 $cat > getverlist <<EOPL
7275 \$api_versionstring = "$api_versionstring";
7276 \$version = "$version";
7277 \$stem = "$sitelib_stem";
7278 \$archname = "$archname";
7280 $cat >> getverlist <<'EOPL'
7281 # Can't have leading @ because metaconfig interprets it as a command!
7282 ;@inc_version_list=();
7283 # XXX Redo to do opendir/readdir?
7286 ;@candidates = glob("5.*");
7292 # XXX ToDo: These comparisons must be reworked when two-digit
7293 # subversions come along, so that 5.7.10 compares as greater than
7294 # 5.7.3! By that time, hope that 5.6.x is sufficiently
7295 # widespread that we can use the built-in version vectors rather
7296 # than reinventing them here. For 5.6.0, however, we must
7297 # assume this script will likely be run by 5.005_0x. --AD 1/2000.
7298 foreach $d (@candidates) {
7299 if ($d lt $version) {
7300 if ($d ge $api_versionstring) {
7301 unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
7303 elsif ($d ge "5.005") {
7304 unshift(@inc_version_list, grep { -d } $d);
7308 # Skip newer version. I.e. don't look in
7309 # 5.7.0 if we're installing 5.6.1.
7313 if (@inc_version_list) {
7314 print join(' ', @inc_version_list);
7317 # Blank space to preserve value for next Configure run.
7322 case "$inc_version_list" in
7323 '') if test -x "$perl5$exe_ext"; then
7324 dflt=`$perl5 getverlist`
7329 $undef) dflt='none' ;;
7330 *) eval dflt=\"$inc_version_list\" ;;
7333 ''|' ') dflt=none ;;
7340 In order to ease the process of upgrading, this version of perl
7341 can be configured to use modules built and installed with earlier
7342 versions of perl that were installed under $prefix. Specify here
7343 the list of earlier versions that this version of perl should check.
7344 If Configure detected no earlier versions of perl installed under
7345 $prefix, then the list will be empty. Answer 'none' to tell perl
7346 to not search earlier versions.
7348 The default should almost always be sensible, so if you're not sure,
7349 just accept the default.
7352 rp='List of earlier versions to include in @INC?'
7355 [Nn]one|''|' ') inc_version_list=' ' ;;
7356 *) inc_version_list="$ans" ;;
7358 case "$inc_version_list" in
7360 inc_version_list_init='0';;
7361 *) inc_version_list_init=`echo $inc_version_list |
7362 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
7367 : determine whether to install perl also as /usr/bin/perl
7370 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
7372 Many scripts expect perl to be installed as /usr/bin/perl.
7373 I can install the perl you are about to compile also as /usr/bin/perl
7374 (in addition to $installbin/perl).
7376 case "$installusrbinperl" in
7377 "$undef"|[nN]*) dflt='n';;
7380 rp="Do you want to install perl as /usr/bin/perl?"
7383 [yY]*) val="$define";;
7389 set installusrbinperl
7392 : see if dld is available
7396 : see if dlopen exists
7403 : determine which dynamic loading, if any, to compile in
7405 dldir="ext/DynaLoader"
7418 $define) dflt='y' ;;
7421 $define) dflt='y' ;;
7423 : Does a dl_xxx.xs file exist for this operating system
7424 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7427 rp="Do you wish to use dynamic loading?"
7434 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7435 dflt="$dldir/dl_${osname}.xs"
7436 elif $test "$d_dlopen" = "$define" ; then
7437 dflt="$dldir/dl_dlopen.xs"
7438 elif $test "$i_dld" = "$define" ; then
7439 dflt="$dldir/dl_dld.xs"
7444 *) dflt="$dldir/$dlsrc"
7447 echo "The following dynamic loading files are available:"
7448 : Can not go over to $dldir because getfile has path hard-coded in.
7449 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7450 rp="Source file to use for dynamic loading"
7456 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7460 Some systems may require passing special flags to $cc -c to
7461 compile modules that will be used to create a shared library.
7462 To use no flags, say "none".
7465 case "$cccdlflags" in
7466 '') case "$gccversion" in
7467 '') case "$osname" in
7469 next) dflt='none' ;;
7470 irix*) dflt='-KPIC' ;;
7471 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7472 sunos) dflt='-pic' ;;
7476 *) case "$osname" in
7477 darwin) dflt='none' ;;
7478 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7483 *) dflt="$cccdlflags" ;;
7485 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7488 none) cccdlflags=' ' ;;
7489 *) cccdlflags="$ans" ;;
7494 Some systems use ld to create libraries that can be dynamically loaded,
7495 while other systems (such as those using ELF) use $cc.
7499 '') $cat >try.c <<'EOM'
7500 /* Test for whether ELF binaries are produced */
7505 int i = open("a.out",O_RDONLY);
7508 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7509 exit(0); /* succeed (yes, it's ELF) */
7514 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7516 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7520 echo "I'll use ld to build dynamic libraries."
7529 rp="What command should be used to create dynamic libraries?"
7535 Some systems may require passing special flags to $ld to create a
7536 library that can be dynamically loaded. If your ld flags include
7537 -L/other/path options to locate libraries outside your loader's normal
7538 search path, you may need to specify those -L options here as well. To
7539 use no flags, say "none".
7542 case "$lddlflags" in
7543 '') case "$osname" in
7544 beos) dflt='-nostart' ;;
7546 case "$gccversion" in
7547 '') dflt="$dflt +vnocompatwarnings" ;;
7550 linux|irix*) dflt='-shared' ;;
7551 next) dflt='none' ;;
7552 solaris) dflt='-G' ;;
7553 sunos) dflt='-assert nodefinitions' ;;
7554 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
7558 *) dflt="$lddlflags" ;;
7561 : Try to guess additional flags to pick up local libraries.
7562 : Be careful not to append to a plain 'none'
7566 for thisflag in $ldflags; do
7571 *) dflt="$dflt $thisflag" ;;
7578 ''|' ') dflt='none' ;;
7581 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
7584 none) lddlflags=' ' ;;
7585 *) lddlflags="$ans" ;;
7590 Some systems may require passing special flags to $cc to indicate that
7591 the resulting executable will use dynamic linking. To use no flags,
7595 case "$ccdlflags" in
7596 '') case "$osname" in
7597 hpux) dflt='-Wl,-E' ;;
7598 linux) dflt='-rdynamic' ;;
7599 next) dflt='none' ;;
7600 sunos) dflt='none' ;;
7604 *) dflt="$ccdlflags" ;;
7606 rp="Any special flags to pass to $cc to use dynamic linking?"
7609 none) ccdlflags=' ' ;;
7610 *) ccdlflags="$ans" ;;
7624 # No dynamic loading being used, so don't bother even to prompt.
7627 *) case "$useshrplib" in
7628 '') case "$osname" in
7629 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
7631 also='Building a shared libperl is required for dynamic loading to work on your system.'
7636 also='Building a shared libperl is needed for MAB support.'
7654 The perl executable is normally obtained by linking perlmain.c with
7655 libperl${_a}, any static extensions (usually just DynaLoader), and
7656 any other libraries needed on this system (such as -lm, etc.). Since
7657 your system supports dynamic loading, it is probably possible to build
7658 a shared libperl.$so. If you will have more than one executable linked
7659 to libperl.$so, this will significantly reduce the size of each
7660 executable, but it may have a noticeable affect on performance. The
7661 default is probably sensible for your system.
7665 rp="Build a shared libperl.$so (y/n)"
7669 useshrplib='true' ;;
7670 *) useshrplib='false' ;;
7675 case "$useshrplib" in
7679 # Figure out a good name for libperl.so. Since it gets stored in
7680 # a version-specific architecture-dependent library, the version
7681 # number isn't really that important, except for making cc/ld happy.
7683 # A name such as libperl.so.3.1
7684 majmin="libperl.$so.$patchlevel.$subversion"
7685 # A name such as libperl.so.301
7686 majonly=`echo $patchlevel $subversion |
7687 $awk '{printf "%d%02d", $1, $2}'`
7688 majonly=libperl.$so.$majonly
7689 # I'd prefer to keep the os-specific stuff here to a minimum, and
7690 # rely on figuring it out from the naming of libc.
7691 case "${osname}${osvers}" in
7694 # XXX How handle the --version stuff for MAB?
7696 linux*) # ld won't link with a bare -lperl otherwise.
7699 cygwin*) # ld links against an importlib
7700 dflt=libperl$lib_ext
7702 *) # Try to guess based on whether libc has major.minor.
7704 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
7705 *libc.$so.[0-9]*) dflt=$majonly ;;
7706 *) dflt=libperl.$so ;;
7716 I need to select a good name for the shared libperl. If your system uses
7717 library names with major and minor numbers, then you might want something
7718 like $majmin. Alternatively, if your system uses a single version
7719 number for shared libraries, then you might want to use $majonly.
7720 Or, your system might be quite happy with a simple libperl.$so.
7722 Since the shared libperl will get installed into a version-specific
7723 architecture-dependent directory, the version number of the shared perl
7724 library probably isn't important, so the default should be o.k.
7727 rp='What name do you want to give to the shared libperl?'
7730 echo "Ok, I'll use $libperl"
7733 libperl="libperl${_a}"
7737 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
7741 WARNING: Use of the shrpdir variable for the installation location of
7742 the shared $libperl is not supported. It was never documented and
7743 will not work in this version. Let me (perlbug@perl.org)
7744 know of any problems this may cause.
7750 But your current setting of $shrpdir is
7751 the default anyway, so it's harmless.
7756 Further, your current attempted setting of $shrpdir
7757 conflicts with the value of $archlibexp/CORE
7758 that installperl will use.
7765 # How will the perl executable find the installed shared $libperl?
7766 # Add $xxx to ccdlflags.
7767 # If we can't figure out a command-line option, use $shrpenv to
7768 # set env LD_RUN_PATH. The main perl makefile uses this.
7769 shrpdir=$archlibexp/CORE
7772 if "$useshrplib"; then
7775 # We'll set it in Makefile.SH...
7781 xxx="-Wl,-R$shrpdir"
7783 bsdos|linux|irix*|dec_osf)
7784 xxx="-Wl,-rpath,$shrpdir"
7787 # next doesn't like the default...
7790 # beos doesn't like the default, either.
7793 # hpux doesn't like the default, either.
7794 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
7797 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
7803 # Only add $xxx if it isn't already in ccdlflags.
7804 case " $ccdlflags " in
7806 *) ccdlflags="$ccdlflags $xxx"
7809 Adding $xxx to the flags
7810 passed to $ld so that the perl executable will find the
7811 installed shared $libperl.
7819 # Fix ccdlflags in AIX for building external extensions.
7820 # (For building Perl itself bare -bE:perl.exp is needed,
7821 # Makefile.SH takes care of this.)
7823 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
7825 # Respect a hint or command-line value.
7827 '') shrpenv="$tmp_shrpenv" ;;
7829 case "$ldlibpthname" in
7830 '') ldlibpthname=LD_LIBRARY_PATH ;;
7831 none) ldlibpthname='' ;;
7834 : determine where manual pages are on this system
7838 syspath='/usr/share/man/man1 /usr/man/man1'
7839 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
7840 syspath="$syspath /usr/man/u_man/man1"
7841 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
7842 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
7843 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
7844 sysman=`./loc . /usr/man/man1 $syspath`
7847 if $test -d "$sysman"; then
7848 echo "System manual is in $sysman." >&4
7850 echo "Could not find manual pages in source form." >&4
7853 : determine where manual pages go
7854 set man1dir man1dir none
7858 $spackage has manual pages available in source form.
7862 echo "However, you don't have nroff, so they're probably useless to you."
7864 '') man1dir="none";;
7867 echo "If you don't want the manual sources installed, answer 'none'."
7872 lookpath="$prefixexp/share/man/man1"
7873 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
7874 lookpath="$lookpath $prefixexp/man/p_man/man1"
7875 lookpath="$lookpath $prefixexp/man/u_man/man1"
7876 lookpath="$lookpath $prefixexp/man/man.1"
7878 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
7879 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
7889 rp="Where do the main $spackage manual pages (source) go?"
7891 if $test "X$man1direxp" != "X$ansexp"; then
7895 man1direxp="$ansexp"
7901 : Change installation prefix, if necessary.
7902 if $test X"$prefix" != X"$installprefix"; then
7903 installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
7905 installman1dir="$man1direxp"
7908 : What suffix to use on installed man pages
7915 rp="What suffix should be used for the main $spackage man pages?"
7917 '') case "$man1dir" in
7931 *) dflt="$man1ext";;
7938 : see if we can have long filenames
7940 first=123456789abcdef
7942 if (echo hi >$first) 2>/dev/null; then
7943 if $test -f 123456789abcde; then
7944 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
7947 echo 'You can have filenames longer than 14 characters.'>&4
7952 You can't have filenames longer than 14 chars.
7953 You can't even think about them!
7959 $rm -rf 123456789abcde*
7961 : determine where library module manual pages go
7962 set man3dir man3dir none
7966 $spackage has manual pages for many of the library modules.
7972 However, you don't have nroff, so they're probably useless to you.
7975 '') man3dir="none";;
7979 case "$d_flexfnam" in
7982 However, your system can't handle the long file names like File::Basename.3.
7985 '') man3dir="none";;
7989 echo "If you don't want the manual sources installed, answer 'none'."
7990 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7992 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
7993 if $test -d "$privlib/man/man3"; then
7996 WARNING: Previous versions of perl installed man3 pages into
7997 $privlib/man/man3. This version will suggest a
7998 new default of $dflt.
8002 rp='Do you wish to preserve the old behavior?(y/n)'
8005 y*) dflt="$privlib/man/man3" ;;
8010 *) dflt="$man3dir" ;;
8017 rp="Where do the $package library man pages (source) go?"
8020 man3direxp="$ansexp"
8026 : Change installation prefix, if necessary.
8027 if $test X"$prefix" != X"$installprefix"; then
8028 installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
8030 installman3dir="$man3direxp"
8033 : What suffix to use on installed man pages
8039 rp="What suffix should be used for the $package library man pages?"
8041 '') case "$man3dir" in
8055 *) dflt="$man3ext";;
8062 : see if we have to deal with yellow pages, now NIS.
8063 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8064 if $test -f /usr/etc/nibindd; then
8066 echo "I'm fairly confident you're on a NeXT."
8068 rp='Do you get the hosts file via NetInfo?'
8077 y*) hostcat='nidump hosts .';;
8078 *) case "$hostcat" in
8079 nidump*) hostcat='';;
8089 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8097 rp='Are you getting the hosts file via yellow pages?'
8100 y*) hostcat='ypcat hosts';;
8101 *) hostcat='cat /etc/hosts';;
8107 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8110 '') test -f /etc/group && groupcat='cat /etc/group';;
8113 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8116 : now get the host name
8118 echo "Figuring out host name..." >&4
8119 case "$myhostname" in
8121 echo 'Maybe "hostname" will work...'
8122 if tans=`sh -c hostname 2>&1` ; then
8130 if $test "$cont"; then
8132 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8133 if tans=`cat /etc/systemid 2>&1` ; then
8135 phostname='cat /etc/systemid'
8136 echo "Whadyaknow. Xenix always was a bit strange..."
8139 elif $test -r /etc/systemid; then
8140 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8143 if $test "$cont"; then
8144 echo 'No, maybe "uuname -l" will work...'
8145 if tans=`sh -c 'uuname -l' 2>&1` ; then
8147 phostname='uuname -l'
8149 echo 'Strange. Maybe "uname -n" will work...'
8150 if tans=`sh -c 'uname -n' 2>&1` ; then
8152 phostname='uname -n'
8154 echo 'Oh well, maybe I can mine it out of whoami.h...'
8155 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8156 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8157 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8159 case "$myhostname" in
8160 '') echo "Does this machine have an identity crisis or something?"
8163 echo "Well, you said $myhostname before..."
8164 phostname='echo $myhostname';;
8170 case "$myhostname" in
8171 '') myhostname=noname ;;
8173 : you do not want to know about this
8178 if $test "$myhostname" ; then
8180 rp='Your host name appears to be "'$myhostname'".'" Right?"
8188 : bad guess or no guess
8189 while $test "X$myhostname" = X ; do
8191 rp="Please type the (one word) name of your host:"
8196 : translate upper to lower if necessary
8197 case "$myhostname" in
8199 echo "(Normalizing case in your host name)"
8200 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8204 case "$myhostname" in
8206 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8207 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8208 echo "(Trimming domain name from host name--host name is now $myhostname)"
8210 *) case "$mydomain" in
8213 test "X$hostcat" = "Xypcat hosts" &&
8214 ypmatch "$myhostname" hosts 2>/dev/null |\
8215 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8218 test "X$hostcat" != "X" &&
8219 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8220 /[ ]$myhostname[ . ]/p" > hosts
8223 if $test -f hosts; then
8224 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8225 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8226 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8227 hosts | $sort | $uniq | \
8228 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8229 case `$echo X$dflt` in
8230 X*\ *) echo "(Several hosts in the database matched hostname)"
8233 X.) echo "(You do not have fully-qualified names in the hosts database)"
8237 echo "(I cannot locate a hosts database anywhere)"
8242 tans=`./loc resolv.conf X /etc /usr/etc`
8243 if $test -f "$tans"; then
8244 echo "(Attempting domain name extraction from $tans)"
8245 dflt=.`$sed -n -e 's/ / /g' \
8246 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8247 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8249 .) dflt=.`$sed -n -e 's/ / /g' \
8250 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8251 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8258 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8259 dflt=.`sh -c domainname 2>/dev/null`
8262 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8266 case "$dflt$osname" in
8267 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8268 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8272 .) echo "(Lost all hope -- silly guess then)"
8278 *) dflt="$mydomain";;
8282 rp="What is your domain name?"
8292 : translate upper to lower if necessary
8295 echo "(Normalizing case in your domain name)"
8296 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8300 : a little sanity check here
8301 case "$phostname" in
8304 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8305 $myhostname$mydomain|$myhostname) ;;
8307 case "$phostname" in
8309 echo "(That doesn't agree with your whoami.h file, by the way.)"
8312 echo "(That doesn't agree with your $phostname command, by the way.)"
8322 I need to get your e-mail address in Internet format if possible, i.e.
8323 something like user@host.domain. Please answer accurately since I have
8324 no easy means to double check it. The default value provided below
8325 is most probably close to reality but may not be valid from outside
8326 your organization...
8330 while test "$cont"; do
8332 '') dflt="$cf_by@$myhostname$mydomain";;
8333 *) dflt="$cf_email";;
8335 rp='What is your e-mail address?'
8341 rp='Address does not look like an Internet one. Use it anyway?'
8357 If you or somebody else will be maintaining perl at your site, please
8358 fill in the correct e-mail address here so that they may be contacted
8359 if necessary. Currently, the "perlbug" program included with perl
8360 will send mail to this address in addition to perlbug@perl.org. You may
8361 enter "none" for no administrator.
8364 case "$perladmin" in
8365 '') dflt="$cf_email";;
8366 *) dflt="$perladmin";;
8368 rp='Perl administrator e-mail address'
8372 : determine whether to only install version-specific parts.
8375 Do you want to install only the version-specific parts of the perl
8376 distribution? Usually you do *not* want to do this.
8378 case "$versiononly" in
8379 "$define"|[Yy]*|true) dflt='y' ;;
8382 rp="Do you want to install only the version-specific parts of perl?"
8385 [yY]*) val="$define";;
8391 case "$versiononly" in
8392 "$define") inc_version_list=''
8393 inc_version_list_init=0
8397 : figure out how to guarantee perl startup
8398 case "$startperl" in
8400 case "$sharpbang" in
8404 I can use the #! construct to start perl on your system. This will
8405 make startup of perl scripts faster, but may cause problems if you
8406 want to share those scripts and perl is not in a standard place
8407 ($binexp/perl) on all your platforms. The alternative is to force
8408 a shell by starting the script with a single ':' character.
8411 case "$versiononly" in
8412 "$define") dflt="$binexp/perl$version";;
8413 *) dflt="$binexp/perl";;
8415 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8418 none) startperl=": # use perl";;
8419 *) startperl="#!$ans"
8420 if $test 30 -lt `echo "$ans" | wc -c`; then
8423 WARNING: Some systems limit the #! command to 32 characters.
8424 If you experience difficulty running Perl scripts with #!, try
8425 installing Perl in a directory with a shorter pathname.
8431 *) startperl=": # use perl"
8436 echo "I'll use $startperl to start perl scripts."
8438 : figure best path for perl in scripts
8441 case "$versiononly" in
8442 "$define") perlpath="$binexp/perl$version";;
8443 *) perlpath="$binexp/perl";;
8445 case "$startperl" in
8450 I will use the "eval 'exec'" idiom to start Perl on your system.
8451 I can use the full path of your Perl binary for this purpose, but
8452 doing so may cause problems if you want to share those scripts and
8453 Perl is not always in a standard place ($binexp/perl).
8457 rp="What path shall I use in \"eval 'exec'\"?"
8464 case "$startperl" in
8466 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8469 : determine where public executable scripts go
8470 set scriptdir scriptdir
8472 case "$scriptdir" in
8475 : guess some guesses
8476 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8477 $test -d /usr/share/bin && dflt=/usr/share/bin
8478 $test -d /usr/local/script && dflt=/usr/local/script
8479 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8480 $test -d $prefixexp/script && dflt=$prefixexp/script
8484 *) dflt="$scriptdir"
8489 Some installations have a separate directory just for executable scripts so
8490 that they can mount it across multiple architectures but keep the scripts in
8491 one spot. You might, for example, have a subdirectory of /usr/share for this.
8492 Or you might just lump your scripts in with all your other executables.
8496 rp='Where do you keep publicly executable scripts?'
8498 if $test "X$ansexp" != "X$scriptdirexp"; then
8502 scriptdirexp="$ansexp"
8503 : Change installation prefix, if necessary.
8504 if $test X"$prefix" != X"$installprefix"; then
8505 installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
8507 installscript="$scriptdirexp"
8510 : determine where add-on public executables go
8512 '') dflt=$siteprefix/bin ;;
8516 rp='Pathname where the add-on public executables should be installed?'
8519 sitebinexp="$ansexp"
8520 : Change installation prefix, if necessary.
8521 if $test X"$prefix" != X"$installprefix"; then
8522 installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
8524 installsitebin="$sitebinexp"
8527 : define an is-a-typedef? function
8528 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8530 "") inclist="sys/types.h";;
8532 eval "varval=\$$var";
8536 for inc in $inclist; do
8537 echo "#include <$inc>" >>temp.c;
8539 echo "#ifdef $type" >> temp.c;
8540 echo "printf(\"We have $type\");" >> temp.c;
8541 echo "#endif" >> temp.c;
8542 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8543 if $contains $type temp.E >/dev/null 2>&1; then
8549 *) eval "$var=\$varval";;
8552 : define an is-a-typedef? function that prompts if the type is not available.
8553 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8555 "") inclist="sys/types.h";;
8557 eval "varval=\$$var";
8561 for inc in $inclist; do
8562 echo "#include <$inc>" >>temp.c;
8564 echo "#ifdef $type" >> temp.c;
8565 echo "printf(\"We have $type\");" >> temp.c;
8566 echo "#endif" >> temp.c;
8567 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8569 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
8570 if $contains $type temp.E >/dev/null 2>&1; then
8571 echo "$type found." >&4;
8574 echo "$type NOT found." >&4;
8580 *) eval "$var=\$varval";;
8583 : see what type lseek is declared as in the kernel
8584 rp="What is the type used for lseek's offset on this system?"
8585 set off_t lseektype long stdio.h sys/types.h
8589 echo "Checking to see how big your file offsets are..." >&4
8591 #include <sys/types.h>
8595 printf("%d\n", (int)sizeof($lseektype));
8600 if eval $compile_ok; then
8601 lseeksize=`$run ./try`
8602 echo "Your file offsets are $lseeksize bytes long."
8606 echo "(I can't seem to compile the test program. Guessing...)"
8607 rp="What is the size of your file offsets (in bytes)?"
8613 : see what type file positions are declared as in the library
8614 rp="What is the type for file position used by fsetpos()?"
8615 set fpos_t fpostype long stdio.h sys/types.h
8620 *_t) zzz="$fpostype" ;;
8623 echo "Checking the size of $zzz..." >&4
8625 #include <sys/types.h>
8628 printf("%d\n", (int)sizeof($fpostype));
8633 if eval $compile_ok; then
8637 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8640 echo "Your $zzz is $fpossize bytes long."
8646 echo "(I can't compile the test program. Guessing...)" >&4
8647 rp="What is the size of your file positions (in bytes)?"
8654 # Backward compatibility (uselfs is deprecated).
8656 "$define"|true|[yY]*)
8659 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
8661 uselargefiles="$define"
8665 case "$lseeksize:$fpossize" in
8668 You can have files larger than 2 gigabytes.
8671 *) case "$uselargefiles" in
8672 "$undef"|false|[nN]*) dflt='n' ;;
8677 Perl can be built to understand large files (files larger than 2 gigabytes)
8678 on some systems. To do so, Configure can be run with -Duselargefiles.
8680 If this doesn't make any sense to you, just accept the default '$dflt'.
8682 rp='Try to understand large files, if available?'
8685 y|Y) val="$define" ;;
8692 case "$uselargefiles" in
8694 : Look for a hint-file generated 'call-back-unit'. If the
8695 : user has specified that a large files perl is to be built,
8696 : we may need to set or change some other defaults.
8697 if $test -f uselargefiles.cbu; then
8698 echo "Your platform has some specific hints for large file builds, using them..."
8699 . ./uselargefiles.cbu
8701 echo "Rechecking to see how big your file offsets are..." >&4
8703 #include <sys/types.h>
8707 printf("%d\n", (int)sizeof($lseektype));
8712 if eval $compile_ok; then
8713 lseeksize=`$run ./try`
8714 $echo "Your file offsets are now $lseeksize bytes long."
8718 echo "(I can't seem to compile the test program. Guessing...)"
8719 rp="What is the size of your file offsets (in bytes)?"
8724 *_t) zzz="$fpostype" ;;
8727 $echo $n "Rechecking the size of $zzz...$c" >&4
8729 #include <sys/types.h>
8732 printf("%d\n", (int)sizeof($fpostype));
8737 if eval $compile_ok; then
8742 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8745 echo " $fpossize bytes." >&4
8751 echo "(I can't compile the test program. Guessing...)" >&4
8752 rp="What is the size of your file positions (in bytes)?"
8761 case "$vendorprefix" in
8762 '') d_vendorbin="$undef"
8766 *) d_vendorbin="$define"
8767 : determine where vendor-supplied executables go.
8768 case "$vendorbin" in
8769 '') dflt=$vendorprefix/bin ;;
8770 *) dflt="$vendorbin" ;;
8773 rp='Pathname for the vendor-supplied executables directory?'
8776 vendorbinexp="$ansexp"
8779 : Change installation prefix, if necessary.
8780 if $test X"$prefix" != X"$installprefix"; then
8781 installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
8783 installvendorbin="$vendorbinexp"
8786 : see if qgcvt exists
8790 : Check how to convert floats to strings.
8792 if test "X$d_Gconvert" = X; then
8795 echo "Checking for an efficient way to convert floats to strings."
8797 case "$uselongdouble" in
8798 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
8800 case "$d_longdbl" in
8801 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
8803 case "$d_PRIgldbl" in
8804 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
8808 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
8809 char *myname = "gconvert";
8812 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
8813 char *myname = "gcvt";
8816 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
8817 char *myname = "qgcvt";
8818 #define DOUBLETYPE long double
8821 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8823 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
8825 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
8828 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
8830 char *myname = "sprintf";
8834 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
8835 #define DOUBLETYPE long double
8837 #define DOUBLETYPE double
8843 #define I_STDLIB $i_stdlib
8849 checkit(expect, got)
8853 if (strcmp(expect, got)) {
8854 printf("%s oddity: Expected %s, got %s\n",
8855 myname, expect, got);
8865 /* This must be 1st test on (which?) platform */
8866 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
8867 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
8868 checkit("0.1", buf);
8870 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
8871 checkit("0.01", buf);
8873 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
8874 checkit("0.001", buf);
8876 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
8877 checkit("0.0001", buf);
8879 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
8880 if (strlen(buf) > 5)
8881 checkit("9e-005", buf); /* for Microsoft ?? */
8883 checkit("9e-05", buf);
8885 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
8888 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
8889 checkit("1.1", buf);
8891 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
8892 checkit("1.01", buf);
8894 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
8895 checkit("1.001", buf);
8897 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
8898 checkit("1.0001", buf);
8900 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
8901 checkit("1.00001", buf);
8903 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
8904 checkit("1.000001", buf);
8906 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
8909 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
8912 /* Some Linux gcvt's give 1.e+5 here. */
8913 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
8914 checkit("100000", buf);
8916 /* Some Linux gcvt's give -1.e+5 here. */
8917 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
8918 checkit("-100000", buf);
8920 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
8921 checkit("123.456", buf);
8923 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
8924 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
8925 /* 34 should be enough to scare even long double
8926 * places into using the e notation. */
8927 if (strlen(buf) > 5)
8928 checkit("1e+034", buf); /* for Microsoft */
8930 checkit("1e+34", buf);
8932 /* For Perl, if you add additional tests here, also add them to
8933 * t/base/num.t for benefit of platforms not using Configure or
8934 * overriding d_Gconvert */
8939 : first add preferred functions to our list
8941 for xxx_convert in $gconvert_preference; do
8942 case $xxx_convert in
8943 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
8944 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
8947 : then add any others
8948 for xxx_convert in gconvert gcvt sprintf; do
8951 *) xxx_list="$xxx_list $xxx_convert" ;;
8955 case "$d_longdbl$uselongdouble" in
8957 : again, add prefered functions to our list first
8959 for xxx_convert in $gconvert_ld_preference; do
8960 case $xxx_convert in
8961 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
8962 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
8965 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
8966 for xxx_convert in qgcvt sprintf $xxx_list; do
8967 case "$xxx_ld_list" in
8968 $xxx_convert*|*" $xxx_convert"*) ;;
8969 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
8972 : if sprintf cannot do long doubles, move it to the end
8973 if test "$d_PRIgldbl" != "$define"; then
8974 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
8976 : if no qgcvt, remove it
8977 if test "$d_qgcvt" != "$define"; then
8978 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
8981 xxx_list="$xxx_ld_list"
8985 for xxx_convert in $xxx_list; do
8986 echo "Trying $xxx_convert..."
8988 set try -DTRY_$xxx_convert
8989 if eval $compile; then
8990 echo "$xxx_convert() found." >&4
8992 echo "I'll use $xxx_convert to convert floats into a string." >&4
8995 echo "...But $xxx_convert didn't work as I expected."
8999 echo "$xxx_convert NOT found." >&4
9003 if test X$xxx_convert = X; then
9004 echo "*** WHOA THERE!!! ***" >&4
9005 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
9009 case "$xxx_convert" in
9010 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
9011 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
9012 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
9013 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
9014 "$define$define$define")
9015 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9016 "$define$define$undef")
9017 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9018 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9025 : see if _fwalk exists
9029 : Initialize h_fcntl
9032 : Initialize h_sysfile
9035 : access call always available on UNIX
9039 : locate the flags for 'access()'
9043 $cat >access.c <<'EOCP'
9044 #include <sys/types.h>
9049 #include <sys/file.h>
9058 : check sys/file.h first, no particular reason here
9059 if $test `./findhdr sys/file.h` && \
9060 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9062 echo "<sys/file.h> defines the *_OK access constants." >&4
9063 elif $test `./findhdr fcntl.h` && \
9064 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9066 echo "<fcntl.h> defines the *_OK access constants." >&4
9067 elif $test `./findhdr unistd.h` && \
9068 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9069 echo "<unistd.h> defines the *_OK access constants." >&4
9071 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9077 : see if accessx exists
9078 set accessx d_accessx
9081 : see if alarm exists
9085 : see if POSIX threads are available
9086 set pthread.h i_pthread
9089 : define a fucntion to check prototypes
9090 $cat > protochk <<EOSH
9093 optimize="$optimize"
9095 prototype="$prototype"
9098 usethreads=$usethreads
9099 i_pthread=$i_pthread
9100 pthread_h_first=$pthread_h_first
9103 $cat >> protochk <<'EOSH'
9108 while test $# -ge 2; do
9110 $define) echo "#include <$2>" >> try.c ;;
9111 literal) echo "$2" >> try.c ;;
9113 # Extra magic for the benefit of systems that need pthread.h
9114 # to be included early to correctly detect threadsafe functions.
9115 # Such functions must guarantee themselves, though, that the usethreads
9116 # and i_pthread have been defined, before calling protochk.
9117 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
9118 echo "#include <pthread.h>" >> try.c
9123 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
9124 cat >> try.c <<'EOCP'
9125 #ifdef CAN_PROTOTYPE
9126 #define _(args) args
9131 echo "$foo" >> try.c
9132 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
9133 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
9141 hasproto='varname=$1; func=$2; shift; shift;
9142 while $test $# -ge 2; do
9144 $define) echo "#include <$2>";;
9148 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
9149 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
9150 echo "$func() prototype found.";
9153 echo "$func() prototype NOT found.";
9158 $rm -f try.c tryout.c'
9160 : see if sys/types.h has to be included
9161 set sys/types.h i_systypes
9164 : see if sys/select.h has to be included
9165 set sys/select.h i_sysselct
9168 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9169 while $test $# -ge 2; do
9171 $define) echo "#include <$2>";;
9175 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9177 if eval $compile; then
9186 : see if we should include time.h, sys/time.h, or both
9188 if test "X$timeincl" = X; then
9189 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9190 $echo $n "I'm now running the test program...$c"
9191 $cat >try.c <<'EOCP'
9192 #include <sys/types.h>
9197 #ifdef SYSTIMEKERNEL
9200 #include <sys/time.h>
9203 #include <sys/select.h>
9212 struct timezone tzp;
9214 if (foo.tm_sec == foo.tm_sec)
9217 if (bar.tv_sec == bar.tv_sec)
9224 for s_timezone in '-DS_TIMEZONE' ''; do
9226 for s_timeval in '-DS_TIMEVAL' ''; do
9227 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9228 for i_time in '' '-DI_TIME'; do
9229 for i_systime in '-DI_SYSTIME' ''; do
9232 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9233 if eval $compile; then
9234 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9238 $echo $n "Succeeded with $flags$c"
9250 *SYSTIMEKERNEL*) i_systimek="$define"
9251 timeincl=`./findhdr sys/time.h`
9252 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9253 *) i_systimek="$undef";;
9256 *I_TIME*) i_time="$define"
9257 timeincl=`./findhdr time.h`" $timeincl"
9258 echo "We'll include <time.h>." >&4;;
9259 *) i_time="$undef";;
9262 *I_SYSTIME*) i_systime="$define"
9263 timeincl=`./findhdr sys/time.h`" $timeincl"
9264 echo "We'll include <sys/time.h>." >&4;;
9265 *) i_systime="$undef";;
9269 : see if struct tm knows about tm_zone
9270 case "$i_systime$i_time" in
9273 echo "Checking to see if your struct tm has tm_zone field..." >&4
9274 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
9282 case "$d_tm_tm_zone" in
9283 "$define") echo "Yes, it does." ;;
9284 *) echo "No, it doesn't." ;;
9286 : see if struct tm knows about tm_gmtoff
9287 case "$i_systime$i_time" in
9290 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
9291 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
9299 case "$d_tm_tm_gmtoff" in
9300 "$define") echo "Yes, it does." ;;
9301 *) echo "No, it doesn't." ;;
9304 : see if asctime_r exists
9305 set asctime_r d_asctime_r
9307 case "$d_asctime_r" in
9309 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
9310 case "$d_asctime_r_proto:$usethreads" in
9311 ":define") d_asctime_r_proto=define
9312 set d_asctime_r_proto asctime_r $hdrs
9316 case "$d_asctime_r_proto" in
9318 case "$asctime_r_proto" in
9319 ''|0) try='char* asctime_r(const struct tm*, char*);'
9320 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;;
9322 case "$asctime_r_proto" in
9323 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
9324 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;;
9326 case "$asctime_r_proto" in
9327 ''|0) try='int asctime_r(const struct tm*, char*);'
9328 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;;
9330 case "$asctime_r_proto" in
9331 ''|0) try='int asctime_r(const struct tm*, char*, int);'
9332 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;;
9334 case "$asctime_r_proto" in
9335 ''|0) d_asctime_r=undef
9337 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
9338 * ) case "$asctime_r_proto" in
9339 REENTRANT_PROTO*) ;;
9340 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
9342 echo "Prototype: $try" ;;
9345 *) case "$usethreads" in
9346 define) echo "asctime_r has no prototype, not using it." >&4 ;;
9353 *) asctime_r_proto=0
9357 : see if atolf exists
9361 : see if atoll exists
9365 : Look for GNU-cc style attribute checking
9367 echo "Checking whether your compiler can handle __attribute__ ..." >&4
9368 $cat >attrib.c <<'EOCP'
9370 void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
9372 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9373 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9374 echo "Your C compiler doesn't fully support __attribute__."
9377 echo "Your C compiler supports __attribute__."
9381 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9388 : see if bcmp exists
9392 : see if bcopy exists
9396 : see if this is a unistd.h system
9397 set unistd.h i_unistd
9400 : see if getpgrp exists
9401 set getpgrp d_getpgrp
9404 case "$d_getpgrp" in
9407 echo "Checking to see which flavor of getpgrp is in use..."
9410 #include <sys/types.h>
9412 # include <unistd.h>
9416 if (getuid() == 0) {
9417 printf("(I see you are running Configure as super-user...)\n");
9421 if (getpgrp(1) == 0)
9430 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9431 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
9433 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9434 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
9437 echo "I can't seem to compile and run the test program."
9439 xxx="a USG one, i.e. you use getpgrp()."
9441 # SVR4 systems can appear rather BSD-ish.
9444 xxx="a BSD one, i.e. you use getpgrp(pid)."
9448 xxx="probably a USG one, i.e. you use getpgrp()."
9453 echo "Assuming your getpgrp is $xxx" >&4
9462 : see if setpgrp exists
9463 set setpgrp d_setpgrp
9466 case "$d_setpgrp" in
9469 echo "Checking to see which flavor of setpgrp is in use..."
9472 #include <sys/types.h>
9474 # include <unistd.h>
9478 if (getuid() == 0) {
9479 printf("(I see you are running Configure as super-user...)\n");
9483 if (-1 == setpgrp(1, 1))
9486 if (setpgrp() != -1)
9492 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9493 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
9495 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
9496 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
9499 echo "(I can't seem to compile and run the test program.)"
9501 xxx="a USG one, i.e. you use setpgrp()."
9503 # SVR4 systems can appear rather BSD-ish.
9506 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
9510 xxx="probably a USG one, i.e. you use setpgrp()."
9515 echo "Assuming your setpgrp is $xxx" >&4
9523 : see if bzero exists
9527 : see if signal is declared as pointer to function returning int or void
9529 xxx=`./findhdr signal.h`
9530 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
9531 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9532 echo "You have int (*signal())() instead of void." >&4
9534 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
9535 echo "You have void (*signal())()." >&4
9537 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
9538 echo "You have int (*signal())() instead of void." >&4
9540 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
9541 echo "You have void (*signal())()." >&4
9544 case "$d_voidsig" in
9546 echo "I can't determine whether signal handler returns void or int..." >&4
9548 rp="What type does your signal handler return?"
9555 echo "As you already told me, signal handler returns void." >&4
9558 *) echo "As you already told me, signal handler returns int." >&4
9565 case "$d_voidsig" in
9566 "$define") signal_t="void";;
9571 : check for ability to cast large floats to 32-bit ints.
9573 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
9574 if $test "$intsize" -ge 4; then
9581 #include <sys/types.h>
9583 $signal_t blech(s) int s; { exit(3); }
9590 signal(SIGFPE, blech);
9592 /* Don't let compiler optimize the test away. Store the number
9593 in a writable string for gcc to pass to sscanf under HP/UX.
9595 sprintf(str, "2147483647");
9596 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
9600 /* x86 processors will probably give 0x8000 0000, which is a
9601 sign change. We don't want that. We want to mimic SPARC
9602 behavior here, which is to preserve the sign and give
9605 if (i32 != ($xxx) f)
9611 if eval $compile_ok; then
9615 echo "(I can't seem to compile the test program--assuming it can't)"
9623 echo "Nope, it can't."
9630 : check for ability to cast negative floats to unsigned
9632 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
9635 #include <sys/types.h>
9637 $signal_t blech(s) int s; { exit(7); }
9638 $signal_t blech_in_list(s) int s; { exit(4); }
9639 unsigned long dummy_long(p) unsigned long p; { return p; }
9640 unsigned int dummy_int(p) unsigned int p; { return p; }
9641 unsigned short dummy_short(p) unsigned short p; { return p; }
9645 unsigned long along;
9647 unsigned short ashort;
9651 /* Frustrate gcc-2.7.2's optimizer which failed this test with
9652 a direct f = -123. assignment. gcc-2.8.0 reportedly
9653 optimized the whole file away
9655 /* Store the number in a writable string for gcc to pass to
9658 sprintf(str, "-123");
9659 sscanf(str, "%lf", &f); /* f = -123.; */
9661 signal(SIGFPE, blech);
9662 along = (unsigned long)f;
9663 aint = (unsigned int)f;
9664 ashort = (unsigned short)f;
9665 if (along != (unsigned long)-123)
9667 if (aint != (unsigned int)-123)
9669 if (ashort != (unsigned short)-123)
9671 sprintf(str, "1073741824.");
9672 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
9675 along = (unsigned long)f;
9676 if (along != 0x80000000)
9680 along = (unsigned long)f;
9681 if (along != 0x7fffffff)
9685 along = (unsigned long)f;
9686 if (along != 0x80000001)
9690 signal(SIGFPE, blech_in_list);
9691 sprintf(str, "123.");
9692 sscanf(str, "%lf", &f); /* f = 123.; */
9693 along = dummy_long((unsigned long)f);
9694 aint = dummy_int((unsigned int)f);
9695 ashort = dummy_short((unsigned short)f);
9696 if (along != (unsigned long)123)
9698 if (aint != (unsigned int)123)
9700 if (ashort != (unsigned short)123)
9707 if eval $compile_ok; then
9711 echo "(I can't seem to compile the test program--assuming it can't)"
9714 case "$castflags" in
9719 echo "Nope, it can't."
9726 : see if vprintf exists
9728 if set vprintf val -f d_vprintf; eval $csym; $val; then
9729 echo 'vprintf() found.' >&4
9732 #include <varargs.h>
9734 int main() { xxx("foo"); }
9743 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
9747 if eval $compile && $run ./try; then
9748 echo "Your vsprintf() returns (int)." >&4
9751 echo "Your vsprintf() returns (char*)." >&4
9755 echo 'vprintf() NOT found.' >&4
9766 : see if chown exists
9770 : see if chroot exists
9774 : see if chsize exists
9778 : see if class exists
9782 hasstruct='varname=$1; struct=$2; shift; shift;
9783 while $test $# -ge 2; do
9785 $define) echo "#include <$2>";;
9789 echo "int main () { struct $struct foo; }" >> try.c;
9791 if eval $compile; then
9802 : see whether socket exists
9804 $echo $n "Hmm... $c" >&4
9805 if set socket val -f d_socket; eval $csym; $val; then
9806 echo "Looks like you have Berkeley networking support." >&4
9808 if set setsockopt val -f; eval $csym; $val; then
9811 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
9815 if $contains socklib libc.list >/dev/null 2>&1; then
9816 echo "Looks like you have Berkeley networking support." >&4
9818 : we will have to assume that it supports the 4.2 BSD interface
9821 echo "You don't have Berkeley networking in libc$_a..." >&4
9822 if test "X$d_socket" = "X$define"; then
9823 echo "...but you seem to believe that you have sockets." >&4
9825 for net in net socket
9827 if test -f /usr/lib/lib$net$_a; then
9828 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
9829 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
9830 if $contains socket libc.list >/dev/null 2>&1; then
9835 echo "...but the Wollongong group seems to have hacked it in." >&4
9836 sockethdr="-I/usr/netinclude"
9839 echo "Found Berkeley sockets interface in lib$net." >&4
9840 if $contains setsockopt libc.list >/dev/null 2>&1; then
9843 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
9850 if test "X$d_socket" != "X$define"; then
9851 echo "or anywhere else I see." >&4
9859 : see if socketpair exists
9860 set socketpair d_sockpair
9865 echo "Checking the availability of certain socket constants..." >&4
9866 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
9867 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
9869 #include <sys/types.h>
9870 #include <sys/socket.h>
9876 set try; if eval $compile; then
9879 set d_${enum}; eval $setvar
9883 : see if this is a sys/uio.h system
9884 set sys/uio.h i_sysuio
9889 echo "Checking to see if your system supports struct cmsghdr..." >&4
9890 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
9892 case "$d_cmsghdr_s" in
9893 "$define") echo "Yes, it does." ;;
9894 *) echo "No, it doesn't." ;;
9898 : check for const keyword
9900 echo 'Checking to see if your C compiler knows about "const"...' >&4
9901 $cat >const.c <<'EOCP'
9902 typedef struct spug { int drokk; } spug;
9909 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
9911 echo "Yup, it does."
9914 echo "Nope, it doesn't."
9919 : see if crypt exists
9924 $define) cryptlib='' ;;
9925 *) if set crypt val -f d_crypt; eval $csym; $val; then
9926 echo 'crypt() found.' >&4
9930 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
9931 if $test -z "$cryptlib"; then
9932 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
9936 if $test -z "$cryptlib"; then
9937 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
9941 if $test -z "$cryptlib"; then
9942 cryptlib=`./loc libcrypt$_a "" $libpth`
9946 if $test -z "$cryptlib"; then
9947 echo 'crypt() NOT found.' >&4
9958 : see if this is a crypt.h system
9962 : see if crypt_r exists
9963 set crypt_r d_crypt_r
9965 case "$d_crypt_r" in
9967 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
9968 case "$d_crypt_r_proto:$usethreads" in
9969 ":define") d_crypt_r_proto=define
9970 set d_crypt_r_proto crypt_r $hdrs
9974 case "$d_crypt_r_proto" in
9976 case "$crypt_r_proto" in
9977 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
9978 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCS ;;
9980 case "$crypt_r_proto" in
9981 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
9982 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCD ;;
9984 case "$crypt_r_proto" in
9985 ''|0) d_crypt_r=undef
9987 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
9988 * ) case "$crypt_r_proto" in
9989 REENTRANT_PROTO*) ;;
9990 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
9992 echo "Prototype: $try" ;;
9995 *) case "$usethreads" in
9996 define) echo "crypt_r has no prototype, not using it." >&4 ;;
10007 : get csh whereabouts
10009 'csh') val="$undef" ;;
10010 *) val="$define" ;;
10014 : Respect a hint or command line value for full_csh.
10015 case "$full_csh" in
10016 '') full_csh=$csh ;;
10019 : see if ctermid_r exists
10020 set ctermid_r d_ctermid_r
10022 case "$d_ctermid_r" in
10024 hdrs="$i_systypes sys/types.h define stdio.h "
10025 case "$d_ctermid_r_proto:$usethreads" in
10026 ":define") d_ctermid_r_proto=define
10027 set d_ctermid_r_proto ctermid_r $hdrs
10031 case "$d_ctermid_r_proto" in
10033 case "$ctermid_r_proto" in
10034 ''|0) try='char* ctermid_r(char*);'
10035 ./protochk "extern $try" $hdrs && ctermid_r_proto=B_B ;;
10037 case "$ctermid_r_proto" in
10038 ''|0) d_ctermid_r=undef
10040 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
10041 * ) case "$ctermid_r_proto" in
10042 REENTRANT_PROTO*) ;;
10043 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
10045 echo "Prototype: $try" ;;
10048 *) case "$usethreads" in
10049 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
10056 *) ctermid_r_proto=0
10060 : see if ctime_r exists
10061 set ctime_r d_ctime_r
10063 case "$d_ctime_r" in
10065 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
10066 case "$d_ctime_r_proto:$usethreads" in
10067 ":define") d_ctime_r_proto=define
10068 set d_ctime_r_proto ctime_r $hdrs
10072 case "$d_ctime_r_proto" in
10074 case "$ctime_r_proto" in
10075 ''|0) try='char* ctime_r(const time_t*, char*);'
10076 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;;
10078 case "$ctime_r_proto" in
10079 ''|0) try='char* ctime_r(const time_t*, char*, int);'
10080 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;;
10082 case "$ctime_r_proto" in
10083 ''|0) try='int ctime_r(const time_t*, char*);'
10084 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;;
10086 case "$ctime_r_proto" in
10087 ''|0) try='int ctime_r(const time_t*, char*, int);'
10088 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;;
10090 case "$ctime_r_proto" in
10091 ''|0) d_ctime_r=undef
10093 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
10094 * ) case "$ctime_r_proto" in
10095 REENTRANT_PROTO*) ;;
10096 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
10098 echo "Prototype: $try" ;;
10101 *) case "$usethreads" in
10102 define) echo "ctime_r has no prototype, not using it." >&4 ;;
10113 : see if cuserid exists
10114 set cuserid d_cuserid
10117 : see if this is a limits.h system
10118 set limits.h i_limits
10121 : see if this is a float.h system
10122 set float.h i_float
10125 : See if number of significant digits in a double precision number is known
10127 $cat >dbl_dig.c <<EOM
10128 #$i_limits I_LIMITS
10131 #include <limits.h>
10137 printf("Contains DBL_DIG");
10140 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
10141 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
10142 echo "DBL_DIG found." >&4
10145 echo "DBL_DIG NOT found." >&4
10152 : see if dbm.h is available
10153 : see if dbmclose exists
10154 set dbmclose d_dbmclose
10157 case "$d_dbmclose" in
10167 *) set rpcsvc/dbm.h i_rpcsvcdbm
10172 *) echo "We won't be including <dbm.h>"
10182 : see if prototype for dbminit is available
10184 set d_dbminitproto dbminit $i_dbm dbm.h
10187 : see if difftime exists
10188 set difftime d_difftime
10191 : see if this is a dirent system
10193 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
10195 echo "<dirent.h> found." >&4
10198 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
10199 echo "<sys/dir.h> found." >&4
10202 xinc=`./findhdr sys/ndir.h`
10204 echo "<dirent.h> NOT found." >&4
10209 : Look for type of directory structure.
10211 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10213 case "$direntrytype" in
10215 case "$i_dirent" in
10216 $define) guess1='struct dirent' ;;
10217 *) guess1='struct direct' ;;
10220 *) guess1="$direntrytype"
10225 'struct dirent') guess2='struct direct' ;;
10226 *) guess2='struct dirent' ;;
10229 if $contains "$guess1" try.c >/dev/null 2>&1; then
10230 direntrytype="$guess1"
10231 echo "Your directory entries are $direntrytype." >&4
10232 elif $contains "$guess2" try.c >/dev/null 2>&1; then
10233 direntrytype="$guess2"
10234 echo "Your directory entries seem to be $direntrytype." >&4
10236 echo "I don't recognize your system's directory entries." >&4
10237 rp="What type is used for directory entries on this system?"
10240 direntrytype="$ans"
10245 : see if the directory entry stores field length
10247 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10248 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
10249 echo "Good, your directory entry keeps length information in d_namlen." >&4
10252 echo "Your directory entry does not know about the d_namlen field." >&4
10259 : see if this is an sysdir system
10260 set sys/dir.h i_sysdir
10263 : see if this is an sysndir system
10264 set sys/ndir.h i_sysndir
10269 $cat >dirfd.c <<EOM
10271 #$i_dirent I_DIRENT /**/
10272 #$i_sysdir I_SYS_DIR /**/
10273 #$i_sysndir I_SYS_NDIR /**/
10274 #$i_systypes I_SYS_TYPES /**/
10275 #if defined(I_SYS_TYPES)
10276 #include <sys/types.h>
10278 #if defined(I_DIRENT)
10279 #include <dirent.h>
10280 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
10281 #include <sys/dir.h>
10285 #include <sys/ndir.h>
10289 #include <ndir.h> /* may be wrong in the future */
10291 #include <sys/dir.h>
10297 DIR *dirp = opendir(".");
10298 if (dirfd(dirp) >= 0)
10305 if eval $compile; then
10309 $define) echo "dirfd() found." >&4 ;;
10310 *) echo "dirfd() NOT found." >&4 ;;
10316 : see if dlerror exists
10319 set dlerror d_dlerror
10323 : see if dlfcn is available
10324 set dlfcn.h i_dlfcn
10331 On a few systems, the dynamically loaded modules that perl generates and uses
10332 will need a different extension than shared libs. The default will probably
10338 *) dflt="$dlext" ;;
10340 rp='What is the extension of dynamically loaded modules'
10349 : Check if dlsym need a leading underscore
10355 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
10356 $cat >dyna.c <<'EOM'
10365 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
10367 #include <sys/types.h>
10372 extern int fred() ;
10381 int mode = RTLD_LAZY ;
10383 handle = dlopen("./dyna.$dlext", mode) ;
10384 if (handle == NULL) {
10389 symbol = dlsym(handle, "fred") ;
10390 if (symbol == NULL) {
10391 /* try putting a leading underscore */
10392 symbol = dlsym(handle, "_fred") ;
10393 if (symbol == NULL) {
10406 : Call the object file tmp-dyna.o in case dlext=o.
10407 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
10408 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
10409 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
10410 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
10413 1) echo "Test program failed using dlopen." >&4
10414 echo "Perhaps you should not use dynamic loading." >&4;;
10415 2) echo "Test program failed using dlsym." >&4
10416 echo "Perhaps you should not use dynamic loading." >&4;;
10417 3) echo "dlsym needs a leading underscore" >&4
10419 4) echo "dlsym doesn't need a leading underscore." >&4;;
10422 echo "I can't compile and run the test program." >&4
10423 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
10428 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
10433 : see if drand48_r exists
10434 set drand48_r d_drand48_r
10436 case "$d_drand48_r" in
10438 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
10439 case "$d_drand48_r_proto:$usethreads" in
10440 ":define") d_drand48_r_proto=define
10441 set d_drand48_r_proto drand48_r $hdrs
10445 case "$d_drand48_r_proto" in
10447 case "$drand48_r_proto" in
10448 ''|0) try='int drand48_r(struct drand48_data*, double*);'
10449 ./protochk "extern $try" $hdrs && drand48_r_proto=I_ST ;;
10451 case "$drand48_r_proto" in
10452 ''|0) d_drand48_r=undef
10454 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
10455 * ) case "$drand48_r_proto" in
10456 REENTRANT_PROTO*) ;;
10457 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
10459 echo "Prototype: $try" ;;
10462 *) case "$usethreads" in
10463 define) echo "drand48_r has no prototype, not using it." >&4 ;;
10470 *) drand48_r_proto=0
10474 : see if prototype for drand48 is available
10476 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
10479 : see if dup2 exists
10483 : see if eaccess exists
10484 set eaccess d_eaccess
10487 : see if endgrent exists
10488 set endgrent d_endgrent
10491 : see if this is an grp system
10497 xxx=`./findhdr grp.h`
10498 $cppstdin $cppflags $cppminus < $xxx >$$.h
10500 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
10512 set d_grpasswd; eval $setvar
10516 : see if endgrent_r exists
10517 set endgrent_r d_endgrent_r
10519 case "$d_endgrent_r" in
10521 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
10522 case "$d_endgrent_r_proto:$usethreads" in
10523 ":define") d_endgrent_r_proto=define
10524 set d_endgrent_r_proto endgrent_r $hdrs
10528 case "$d_endgrent_r_proto" in
10530 case "$endgrent_r_proto" in
10531 ''|0) try='int endgrent_r(FILE**);'
10532 ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;;
10534 case "$endgrent_r_proto" in
10535 ''|0) try='void endgrent_r(FILE**);'
10536 ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;;
10538 case "$endgrent_r_proto" in
10539 ''|0) d_endgrent_r=undef
10541 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
10542 * ) case "$endgrent_r_proto" in
10543 REENTRANT_PROTO*) ;;
10544 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
10546 echo "Prototype: $try" ;;
10549 *) case "$usethreads" in
10550 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
10557 *) endgrent_r_proto=0
10561 : see if endhostent exists
10562 set endhostent d_endhent
10565 : see if this is a netdb.h system
10566 set netdb.h i_netdb
10569 : see if endhostent_r exists
10570 set endhostent_r d_endhostent_r
10572 case "$d_endhostent_r" in
10574 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10575 case "$d_endhostent_r_proto:$usethreads" in
10576 ":define") d_endhostent_r_proto=define
10577 set d_endhostent_r_proto endhostent_r $hdrs
10581 case "$d_endhostent_r_proto" in
10583 case "$endhostent_r_proto" in
10584 ''|0) try='int endhostent_r(struct hostent_data*);'
10585 ./protochk "extern $try" $hdrs && endhostent_r_proto=I_D ;;
10587 case "$endhostent_r_proto" in
10588 ''|0) try='void endhostent_r(struct hostent_data*);'
10589 ./protochk "extern $try" $hdrs && endhostent_r_proto=V_D ;;
10591 case "$endhostent_r_proto" in
10592 ''|0) d_endhostent_r=undef
10593 endhostent_r_proto=0
10594 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
10595 * ) case "$endhostent_r_proto" in
10596 REENTRANT_PROTO*) ;;
10597 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
10599 echo "Prototype: $try" ;;
10602 *) case "$usethreads" in
10603 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
10605 d_endhostent_r=undef
10606 endhostent_r_proto=0
10610 *) endhostent_r_proto=0
10614 : see if endnetent exists
10615 set endnetent d_endnent
10618 : see if endnetent_r exists
10619 set endnetent_r d_endnetent_r
10621 case "$d_endnetent_r" in
10623 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10624 case "$d_endnetent_r_proto:$usethreads" in
10625 ":define") d_endnetent_r_proto=define
10626 set d_endnetent_r_proto endnetent_r $hdrs
10630 case "$d_endnetent_r_proto" in
10632 case "$endnetent_r_proto" in
10633 ''|0) try='int endnetent_r(struct netent_data*);'
10634 ./protochk "extern $try" $hdrs && endnetent_r_proto=I_D ;;
10636 case "$endnetent_r_proto" in
10637 ''|0) try='void endnetent_r(struct netent_data*);'
10638 ./protochk "extern $try" $hdrs && endnetent_r_proto=V_D ;;
10640 case "$endnetent_r_proto" in
10641 ''|0) d_endnetent_r=undef
10642 endnetent_r_proto=0
10643 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
10644 * ) case "$endnetent_r_proto" in
10645 REENTRANT_PROTO*) ;;
10646 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
10648 echo "Prototype: $try" ;;
10651 *) case "$usethreads" in
10652 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
10654 d_endnetent_r=undef
10655 endnetent_r_proto=0
10659 *) endnetent_r_proto=0
10663 : see if endprotoent exists
10664 set endprotoent d_endpent
10667 : see if endprotoent_r exists
10668 set endprotoent_r d_endprotoent_r
10670 case "$d_endprotoent_r" in
10672 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10673 case "$d_endprotoent_r_proto:$usethreads" in
10674 ":define") d_endprotoent_r_proto=define
10675 set d_endprotoent_r_proto endprotoent_r $hdrs
10679 case "$d_endprotoent_r_proto" in
10681 case "$endprotoent_r_proto" in
10682 ''|0) try='int endprotoent_r(struct protoent_data*);'
10683 ./protochk "extern $try" $hdrs && endprotoent_r_proto=I_D ;;
10685 case "$endprotoent_r_proto" in
10686 ''|0) try='void endprotoent_r(struct protoent_data*);'
10687 ./protochk "extern $try" $hdrs && endprotoent_r_proto=V_D ;;
10689 case "$endprotoent_r_proto" in
10690 ''|0) d_endprotoent_r=undef
10691 endprotoent_r_proto=0
10692 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
10693 * ) case "$endprotoent_r_proto" in
10694 REENTRANT_PROTO*) ;;
10695 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
10697 echo "Prototype: $try" ;;
10700 *) case "$usethreads" in
10701 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
10703 d_endprotoent_r=undef
10704 endprotoent_r_proto=0
10708 *) endprotoent_r_proto=0
10712 : see if endpwent exists
10713 set endpwent d_endpwent
10716 : see if this is a pwd.h system
10722 xxx=`./findhdr pwd.h`
10723 $cppstdin $cppflags $cppminus < $xxx >$$.h
10725 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
10733 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
10741 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
10749 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
10757 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
10765 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
10773 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
10781 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
10793 set d_pwquota; eval $setvar
10794 set d_pwage; eval $setvar
10795 set d_pwchange; eval $setvar
10796 set d_pwclass; eval $setvar
10797 set d_pwexpire; eval $setvar
10798 set d_pwcomment; eval $setvar
10799 set d_pwgecos; eval $setvar
10800 set d_pwpasswd; eval $setvar
10804 : see if endpwent_r exists
10805 set endpwent_r d_endpwent_r
10807 case "$d_endpwent_r" in
10809 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
10810 case "$d_endpwent_r_proto:$usethreads" in
10811 ":define") d_endpwent_r_proto=define
10812 set d_endpwent_r_proto endpwent_r $hdrs
10816 case "$d_endpwent_r_proto" in
10818 case "$endpwent_r_proto" in
10819 ''|0) try='int endpwent_r(FILE**);'
10820 ./protochk "extern $try" $hdrs && endpwent_r_proto=I_H ;;
10822 case "$endpwent_r_proto" in
10823 ''|0) try='void endpwent_r(FILE**);'
10824 ./protochk "extern $try" $hdrs && endpwent_r_proto=V_H ;;
10826 case "$endpwent_r_proto" in
10827 ''|0) d_endpwent_r=undef
10829 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
10830 * ) case "$endpwent_r_proto" in
10831 REENTRANT_PROTO*) ;;
10832 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
10834 echo "Prototype: $try" ;;
10837 *) case "$usethreads" in
10838 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
10845 *) endpwent_r_proto=0
10849 : see if endservent exists
10850 set endservent d_endsent
10853 : see if endservent_r exists
10854 set endservent_r d_endservent_r
10856 case "$d_endservent_r" in
10858 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
10859 case "$d_endservent_r_proto:$usethreads" in
10860 ":define") d_endservent_r_proto=define
10861 set d_endservent_r_proto endservent_r $hdrs
10865 case "$d_endservent_r_proto" in
10867 case "$endservent_r_proto" in
10868 ''|0) try='int endservent_r(struct servent_data*);'
10869 ./protochk "extern $try" $hdrs && endservent_r_proto=I_D ;;
10871 case "$endservent_r_proto" in
10872 ''|0) try='void endservent_r(struct servent_data*);'
10873 ./protochk "extern $try" $hdrs && endservent_r_proto=V_D ;;
10875 case "$endservent_r_proto" in
10876 ''|0) d_endservent_r=undef
10877 endservent_r_proto=0
10878 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
10879 * ) case "$endservent_r_proto" in
10880 REENTRANT_PROTO*) ;;
10881 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
10883 echo "Prototype: $try" ;;
10886 *) case "$usethreads" in
10887 define) echo "endservent_r has no prototype, not using it." >&4 ;;
10889 d_endservent_r=undef
10890 endservent_r_proto=0
10894 *) endservent_r_proto=0
10898 : Locate the flags for 'open()'
10900 $cat >try.c <<'EOCP'
10901 #include <sys/types.h>
10906 #include <sys/file.h>
10917 : check sys/file.h first to get FREAD on Sun
10918 if $test `./findhdr sys/file.h` && \
10919 set try -DI_SYS_FILE && eval $compile; then
10921 echo "<sys/file.h> defines the O_* constants..." >&4
10922 if $run ./try; then
10923 echo "and you have the 3 argument form of open()." >&4
10926 echo "but not the 3 argument form of open(). Oh, well." >&4
10929 elif $test `./findhdr fcntl.h` && \
10930 set try -DI_FCNTL && eval $compile; then
10932 echo "<fcntl.h> defines the O_* constants..." >&4
10933 if $run ./try; then
10934 echo "and you have the 3 argument form of open()." >&4
10937 echo "but not the 3 argument form of open(). Oh, well." >&4
10942 echo "I can't find the O_* constant definitions! You got problems." >&4
10948 : see which of string.h or strings.h is needed
10950 strings=`./findhdr string.h`
10951 if $test "$strings" && $test -r "$strings"; then
10952 echo "Using <string.h> instead of <strings.h>." >&4
10956 strings=`./findhdr strings.h`
10957 if $test "$strings" && $test -r "$strings"; then
10958 echo "Using <strings.h> instead of <string.h>." >&4
10960 echo "No string header found -- You'll surely have problems." >&4
10965 case "$i_string" in
10966 "$undef") strings=`./findhdr strings.h`;;
10967 *) strings=`./findhdr string.h`;;
10970 : see if this is a sys/file.h system
10975 : do we need to include sys/file.h ?
10979 if $h_sysfile; then
10981 echo "We'll be including <sys/file.h>." >&4
10984 echo "We won't be including <sys/file.h>." >&4
10994 : see if fcntl.h is there
10999 : see if we can include fcntl.h
11005 echo "We'll be including <fcntl.h>." >&4
11008 if $h_sysfile; then
11009 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
11011 echo "We won't be including <fcntl.h>." >&4
11023 : check for non-blocking I/O stuff
11024 case "$h_sysfile" in
11025 true) echo "#include <sys/file.h>" > head.c;;
11028 true) echo "#include <fcntl.h>" > head.c;;
11029 *) echo "#include <sys/fcntl.h>" > head.c;;
11034 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
11035 case "$o_nonblock" in
11037 $cat head.c > try.c
11038 $cat >>try.c <<EOCP
11040 #include <stdlib.h>
11047 printf("O_NONBLOCK\n");
11051 printf("O_NDELAY\n");
11055 printf("FNDELAY\n");
11062 if eval $compile_ok; then
11063 o_nonblock=`$run ./try`
11064 case "$o_nonblock" in
11065 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
11066 *) echo "Seems like we can use $o_nonblock.";;
11069 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
11072 *) echo "Using $hint value $o_nonblock.";;
11074 $rm -f try try.* .out core
11077 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
11080 $cat head.c > try.c
11081 $cat >>try.c <<EOCP
11083 #include <sys/types.h>
11084 #include <signal.h>
11086 #include <stdlib.h>
11091 #define MY_O_NONBLOCK $o_nonblock
11092 #ifndef errno /* XXX need better Configure test */
11095 #$i_unistd I_UNISTD
11097 #include <unistd.h>
11099 #$i_string I_STRING
11101 #include <string.h>
11103 #include <strings.h>
11105 $signal_t blech(x) int x; { exit(3); }
11107 $cat >> try.c <<'EOCP'
11115 pipe(pd); /* Down: child -> parent */
11116 pipe(pu); /* Up: parent -> child */
11119 close(pd[1]); /* Parent reads from pd[0] */
11120 close(pu[0]); /* Parent writes (blocking) to pu[1] */
11122 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
11127 signal(SIGALRM, blech);
11129 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
11131 sprintf(string, "%d\n", ret);
11132 write(2, string, strlen(string));
11135 if (errno == EAGAIN) {
11136 printf("EAGAIN\n");
11141 if (errno == EWOULDBLOCK)
11142 printf("EWOULDBLOCK\n");
11145 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
11146 sleep(2); /* Give it time to close our pipe */
11148 ret = read(pd[0], buf, 1); /* Should read EOF */
11150 sprintf(string, "%d\n", ret);
11151 write(4, string, strlen(string));
11155 close(pd[0]); /* We write to pd[1] */
11156 close(pu[1]); /* We read from pu[0] */
11157 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
11158 close(pd[1]); /* Pipe pd is now fully closed! */
11159 exit(0); /* Bye bye, thank you for playing! */
11163 if eval $compile_ok; then
11164 echo "$startsh" >mtry
11165 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
11167 ./mtry >/dev/null 2>&1
11169 0) eagain=`$cat try.out`;;
11170 1) echo "Could not perform non-blocking setting!";;
11171 2) echo "I did a successful read() for something that was not there!";;
11172 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
11173 4) echo "Could not find F_SETFL!";;
11174 *) echo "Something terribly wrong happened during testing.";;
11176 rd_nodata=`$cat try.ret`
11177 echo "A read() system call with no data present returns $rd_nodata."
11178 case "$rd_nodata" in
11181 echo "(That's peculiar, fixing that to be -1.)"
11187 echo "Forcing errno EAGAIN on read() with no data available."
11191 echo "Your read() sets errno to $eagain when no data is available."
11194 status=`$cat try.err`
11196 0) echo "And it correctly returns 0 to signal EOF.";;
11197 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
11198 *) echo "However, your read() returns '$status' on EOF??";;
11201 if test "$status" = "$rd_nodata"; then
11202 echo "WARNING: you can't distinguish between EOF and no data!"
11206 echo "I can't compile the test program--assuming errno EAGAIN will do."
11213 echo "Using $hint value $eagain."
11214 echo "Your read() returns $rd_nodata when no data is present."
11215 case "$d_eofnblk" in
11216 "$define") echo "And you can see EOF because read() returns 0.";;
11217 "$undef") echo "But you can't see EOF status from read() returned value.";;
11219 echo "(Assuming you can't see EOF status from read anyway.)"
11225 $rm -f try try.* .out core head.c mtry
11227 : see if fchdir exists
11228 set fchdir d_fchdir
11231 : see if fchmod exists
11232 set fchmod d_fchmod
11235 : see if fchown exists
11236 set fchown d_fchown
11239 : see if this is an fcntl system
11244 : See if fcntl-based locking works.
11246 #include <stdlib.h>
11247 #include <unistd.h>
11249 #include <signal.h>
11250 $signal_t blech(x) int x; { exit(3); }
11252 #if defined(F_SETLK) && defined(F_SETLKW)
11253 struct flock flock;
11255 fd = open("try.c", O_RDONLY);
11256 flock.l_type = F_RDLCK;
11257 flock.l_whence = SEEK_SET;
11258 flock.l_start = flock.l_len = 0;
11259 signal(SIGALRM, blech);
11261 retval = fcntl(fd, F_SETLK, &flock);
11263 (retval < 0 ? exit(2) : exit(0));
11269 echo "Checking if fcntl-based file locking works... "
11273 if eval $compile_ok; then
11274 if $run ./try; then
11275 echo "Yes, it seems to work."
11278 echo "Nope, it didn't work."
11283 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
11284 *** This is (almost) impossible.
11285 *** If your NFS lock daemons are not feeling well, something like
11286 *** this may happen, please investigate. Cannot continue, aborting.
11294 echo "I'm unable to compile the test program, so I'll assume not."
11299 echo "Nope, since you don't even have fcntl()."
11302 set d_fcntl_can_lock
11307 : check for fd_set items
11310 Checking to see how well your C compiler handles fd_set and friends ...
11313 #$i_systime I_SYS_TIME
11314 #$i_sysselct I_SYS_SELECT
11315 #$d_socket HAS_SOCKET
11316 #include <sys/types.h>
11318 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
11321 #include <sys/time.h>
11323 #ifdef I_SYS_SELECT
11324 #include <sys/select.h>
11333 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
11341 if eval $compile; then
11342 d_fds_bits="$define"
11344 echo "Well, your system knows about the normal fd_set typedef..." >&4
11345 if $run ./try; then
11346 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
11347 d_fd_macros="$define"
11350 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
11352 d_fd_macros="$undef"
11356 Hmm, your compiler has some difficulty with fd_set. Checking further...
11359 if eval $compile; then
11360 d_fds_bits="$undef"
11362 echo "Well, your system has some sort of fd_set available..." >&4
11363 if $run ./try; then
11364 echo "and you have the normal fd_set macros." >&4
11365 d_fd_macros="$define"
11368 but not the normal fd_set macros! Gross! More work for me...
11370 d_fd_macros="$undef"
11373 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
11375 d_fds_bits="$undef"
11376 d_fd_macros="$undef"
11381 : see if fgetpos exists
11382 set fgetpos d_fgetpos
11385 : see if finite exists
11386 set finite d_finite
11389 : see if finitel exists
11390 set finitel d_finitel
11393 : see if flock exists
11397 : see if prototype for flock is available
11399 set d_flockproto flock $i_sysfile sys/file.h
11402 : see if fork exists
11406 : see if fp_class exists
11407 set fp_class d_fp_class
11410 : see if pathconf exists
11411 set pathconf d_pathconf
11414 : see if fpathconf exists
11415 set fpathconf d_fpathconf
11418 : see if fpclass exists
11419 set fpclass d_fpclass
11422 : see if fpclassify exists
11423 set fpclassify d_fpclassify
11426 : see if fpclassl exists
11427 set fpclassl d_fpclassl
11431 : check for fpos64_t
11433 echo "Checking to see if you have fpos64_t..." >&4
11436 int main() { fpos64_t x = 7; }
11439 if eval $compile; then
11441 echo "You have fpos64_t."
11444 echo "You do not have fpos64_t."
11445 case "$fpossize" in
11446 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
11453 : see if frexpl exists
11454 set frexpl d_frexpl
11457 : see if this is a sys/param system
11458 set sys/param.h i_sysparam
11461 : see if this is a sys/mount.h system
11462 set sys/mount.h i_sysmount
11467 echo "Checking to see if your system supports struct fs_data..." >&4
11468 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
11470 case "$d_fs_data_s" in
11471 "$define") echo "Yes, it does." ;;
11472 *) echo "No, it doesn't." ;;
11475 : see if fseeko exists
11476 set fseeko d_fseeko
11478 case "$longsize" in
11479 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
11482 : see if fsetpos exists
11483 set fsetpos d_fsetpos
11487 : see if fstatfs exists
11488 set fstatfs d_fstatfs
11492 : see if statvfs exists
11493 set statvfs d_statvfs
11496 : see if fstatvfs exists
11497 set fstatvfs d_fstatvfs
11501 : see if fsync exists
11505 : see if ftello exists
11506 set ftello d_ftello
11508 case "$longsize" in
11509 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
11512 : see if getcwd exists
11513 set getcwd d_getcwd
11516 : see if getespwnam exists
11517 set getespwnam d_getespwnam
11521 : see if getfsstat exists
11522 set getfsstat d_getfsstat
11525 : see if getgrent exists
11526 set getgrent d_getgrent
11529 : see if getgrent_r exists
11530 set getgrent_r d_getgrent_r
11532 case "$d_getgrent_r" in
11534 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11535 case "$d_getgrent_r_proto:$usethreads" in
11536 ":define") d_getgrent_r_proto=define
11537 set d_getgrent_r_proto getgrent_r $hdrs
11541 case "$d_getgrent_r_proto" in
11543 case "$getgrent_r_proto" in
11544 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
11545 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBWR ;;
11547 case "$getgrent_r_proto" in
11548 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
11549 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIR ;;
11551 case "$getgrent_r_proto" in
11552 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
11553 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBW ;;
11555 case "$getgrent_r_proto" in
11556 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
11557 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBI ;;
11559 case "$getgrent_r_proto" in
11560 ''|0) try='int getgrent_r(struct group*, char*, int);'
11561 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBI ;;
11563 case "$getgrent_r_proto" in
11564 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
11565 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIH ;;
11567 case "$getgrent_r_proto" in
11568 ''|0) d_getgrent_r=undef
11570 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
11571 * ) case "$getgrent_r_proto" in
11572 REENTRANT_PROTO*) ;;
11573 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
11575 echo "Prototype: $try" ;;
11578 *) case "$usethreads" in
11579 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
11586 *) getgrent_r_proto=0
11590 : see if getgrgid_r exists
11591 set getgrgid_r d_getgrgid_r
11593 case "$d_getgrgid_r" in
11595 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11596 case "$d_getgrgid_r_proto:$usethreads" in
11597 ":define") d_getgrgid_r_proto=define
11598 set d_getgrgid_r_proto getgrgid_r $hdrs
11602 case "$d_getgrgid_r_proto" in
11604 case "$getgrgid_r_proto" in
11605 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
11606 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
11608 case "$getgrgid_r_proto" in
11609 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
11610 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
11612 case "$getgrgid_r_proto" in
11613 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
11614 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
11616 case "$getgrgid_r_proto" in
11617 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
11618 ./protochk "extern $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
11620 case "$getgrgid_r_proto" in
11621 ''|0) d_getgrgid_r=undef
11623 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
11624 * ) case "$getgrgid_r_proto" in
11625 REENTRANT_PROTO*) ;;
11626 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
11628 echo "Prototype: $try" ;;
11631 *) case "$usethreads" in
11632 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
11639 *) getgrgid_r_proto=0
11643 : see if getgrnam_r exists
11644 set getgrnam_r d_getgrnam_r
11646 case "$d_getgrnam_r" in
11648 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11649 case "$d_getgrnam_r_proto:$usethreads" in
11650 ":define") d_getgrnam_r_proto=define
11651 set d_getgrnam_r_proto getgrnam_r $hdrs
11655 case "$d_getgrnam_r_proto" in
11657 case "$getgrnam_r_proto" in
11658 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
11659 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
11661 case "$getgrnam_r_proto" in
11662 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
11663 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
11665 case "$getgrnam_r_proto" in
11666 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
11667 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CBI ;;
11669 case "$getgrnam_r_proto" in
11670 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
11671 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
11673 case "$getgrnam_r_proto" in
11674 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
11675 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
11677 case "$getgrnam_r_proto" in
11678 ''|0) d_getgrnam_r=undef
11680 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
11681 * ) case "$getgrnam_r_proto" in
11682 REENTRANT_PROTO*) ;;
11683 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
11685 echo "Prototype: $try" ;;
11688 *) case "$usethreads" in
11689 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
11696 *) getgrnam_r_proto=0
11700 : see if gethostbyaddr exists
11701 set gethostbyaddr d_gethbyaddr
11704 : see if gethostbyname exists
11705 set gethostbyname d_gethbyname
11708 : see if gethostent exists
11709 set gethostent d_gethent
11712 : see how we will look up host name
11715 if set gethostname val -f d_gethname; eval $csym; $val; then
11716 echo 'gethostname() found.' >&4
11717 d_gethname="$define"
11720 if set uname val -f d_uname; eval $csym; $val; then
11723 uname() was found, but you're running xenix, and older versions of xenix
11724 have a broken uname(). If you don't really know whether your xenix is old
11725 enough to have a broken system call, use the default answer.
11730 "$define") dflt=n;;
11732 rp='Is your uname() broken?'
11735 n*) d_uname="$define"; call=uname;;
11738 echo 'uname() found.' >&4
11745 case "$d_gethname" in
11746 '') d_gethname="$undef";;
11749 '') d_uname="$undef";;
11751 case "$d_uname$d_gethname" in
11756 Every now and then someone has a $call() that lies about the hostname
11757 but can't be fixed for political or economic reasons. If you wish, I can
11758 pretend $call() isn't there and maybe compute hostname at run-time
11759 thanks to the '$phostname' command.
11762 rp="Shall I ignore $call() from now on?"
11765 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
11768 case "$phostname" in
11769 '') aphostname='';;
11770 *) case "$aphostname" in
11772 *) set X $phostname
11776 file=`./loc $file $file $pth`
11777 aphostname=`echo $file $*`
11782 case "$d_uname$d_gethname" in
11785 case "$phostname" in
11787 echo "There will be no way for $package to get your hostname." >&4;;
11789 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
11793 case "$d_phostname" in
11794 '') d_phostname="$undef";;
11797 : see if gethostbyaddr_r exists
11798 set gethostbyaddr_r d_gethostbyaddr_r
11800 case "$d_gethostbyaddr_r" in
11802 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11803 case "$d_gethostbyaddr_r_proto:$usethreads" in
11804 ":define") d_gethostbyaddr_r_proto=define
11805 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
11809 case "$d_gethostbyaddr_r_proto" in
11811 case "$gethostbyaddr_r_proto" in
11812 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
11813 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
11815 case "$gethostbyaddr_r_proto" in
11816 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
11817 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
11819 case "$gethostbyaddr_r_proto" in
11820 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
11821 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
11823 case "$gethostbyaddr_r_proto" in
11824 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
11825 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
11827 case "$gethostbyaddr_r_proto" in
11828 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
11829 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
11831 case "$gethostbyaddr_r_proto" in
11832 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
11833 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
11835 case "$gethostbyaddr_r_proto" in
11836 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
11837 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
11839 case "$gethostbyaddr_r_proto" in
11840 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
11841 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
11843 case "$gethostbyaddr_r_proto" in
11844 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
11845 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
11847 case "$gethostbyaddr_r_proto" in
11848 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
11849 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
11851 case "$gethostbyaddr_r_proto" in
11852 ''|0) d_gethostbyaddr_r=undef
11853 gethostbyaddr_r_proto=0
11854 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
11855 * ) case "$gethostbyaddr_r_proto" in
11856 REENTRANT_PROTO*) ;;
11857 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
11859 echo "Prototype: $try" ;;
11862 *) case "$usethreads" in
11863 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
11865 d_gethostbyaddr_r=undef
11866 gethostbyaddr_r_proto=0
11870 *) gethostbyaddr_r_proto=0
11874 : see if gethostbyname_r exists
11875 set gethostbyname_r d_gethostbyname_r
11877 case "$d_gethostbyname_r" in
11879 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11880 case "$d_gethostbyname_r_proto:$usethreads" in
11881 ":define") d_gethostbyname_r_proto=define
11882 set d_gethostbyname_r_proto gethostbyname_r $hdrs
11886 case "$d_gethostbyname_r_proto" in
11888 case "$gethostbyname_r_proto" in
11889 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
11890 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
11892 case "$gethostbyname_r_proto" in
11893 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
11894 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
11896 case "$gethostbyname_r_proto" in
11897 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
11898 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
11900 case "$gethostbyname_r_proto" in
11901 ''|0) d_gethostbyname_r=undef
11902 gethostbyname_r_proto=0
11903 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
11904 * ) case "$gethostbyname_r_proto" in
11905 REENTRANT_PROTO*) ;;
11906 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
11908 echo "Prototype: $try" ;;
11911 *) case "$usethreads" in
11912 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
11914 d_gethostbyname_r=undef
11915 gethostbyname_r_proto=0
11919 *) gethostbyname_r_proto=0
11923 : see if gethostent_r exists
11924 set gethostent_r d_gethostent_r
11926 case "$d_gethostent_r" in
11928 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11929 case "$d_gethostent_r_proto:$usethreads" in
11930 ":define") d_gethostent_r_proto=define
11931 set d_gethostent_r_proto gethostent_r $hdrs
11935 case "$d_gethostent_r_proto" in
11937 case "$gethostent_r_proto" in
11938 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
11939 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
11941 case "$gethostent_r_proto" in
11942 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
11943 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBIE ;;
11945 case "$gethostent_r_proto" in
11946 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
11947 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBIE ;;
11949 case "$gethostent_r_proto" in
11950 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
11951 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBI ;;
11953 case "$gethostent_r_proto" in
11954 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
11955 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBI ;;
11957 case "$gethostent_r_proto" in
11958 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
11959 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SD ;;
11961 case "$gethostent_r_proto" in
11962 ''|0) d_gethostent_r=undef
11963 gethostent_r_proto=0
11964 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
11965 * ) case "$gethostent_r_proto" in
11966 REENTRANT_PROTO*) ;;
11967 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
11969 echo "Prototype: $try" ;;
11972 *) case "$usethreads" in
11973 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
11975 d_gethostent_r=undef
11976 gethostent_r_proto=0
11980 *) gethostent_r_proto=0
11984 : see if prototypes for various gethostxxx netdb.h functions are available
11986 set d_gethostprotos gethostent $i_netdb netdb.h
11989 : see if getitimer exists
11990 set getitimer d_getitimer
11993 : see if getlogin exists
11994 set getlogin d_getlogin
11997 : see if getlogin_r exists
11998 set getlogin_r d_getlogin_r
12000 case "$d_getlogin_r" in
12002 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
12003 case "$d_getlogin_r_proto:$usethreads" in
12004 ":define") d_getlogin_r_proto=define
12005 set d_getlogin_r_proto getlogin_r $hdrs
12009 case "$d_getlogin_r_proto" in
12011 case "$getlogin_r_proto" in
12012 ''|0) try='int getlogin_r(char*, size_t);'
12013 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BW ;;
12015 case "$getlogin_r_proto" in
12016 ''|0) try='int getlogin_r(char*, int);'
12017 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BI ;;
12019 case "$getlogin_r_proto" in
12020 ''|0) try='char* getlogin_r(char*, size_t);'
12021 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BW ;;
12023 case "$getlogin_r_proto" in
12024 ''|0) try='char* getlogin_r(char*, int);'
12025 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BI ;;
12027 case "$getlogin_r_proto" in
12028 ''|0) d_getlogin_r=undef
12030 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
12031 * ) case "$getlogin_r_proto" in
12032 REENTRANT_PROTO*) ;;
12033 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
12035 echo "Prototype: $try" ;;
12038 *) case "$usethreads" in
12039 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
12046 *) getlogin_r_proto=0
12050 : see if getmnt exists
12051 set getmnt d_getmnt
12054 : see if getmntent exists
12055 set getmntent d_getmntent
12058 : see if getnetbyaddr exists
12059 set getnetbyaddr d_getnbyaddr
12062 : see if getnetbyname exists
12063 set getnetbyname d_getnbyname
12066 : see if getnetent exists
12067 set getnetent d_getnent
12070 : see if getnetbyaddr_r exists
12071 set getnetbyaddr_r d_getnetbyaddr_r
12073 case "$d_getnetbyaddr_r" in
12075 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12076 case "$d_getnetbyaddr_r_proto:$usethreads" in
12077 ":define") d_getnetbyaddr_r_proto=define
12078 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
12082 case "$d_getnetbyaddr_r_proto" in
12084 case "$getnetbyaddr_r_proto" in
12085 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
12086 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
12088 case "$getnetbyaddr_r_proto" in
12089 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
12090 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
12092 case "$getnetbyaddr_r_proto" in
12093 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
12094 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
12096 case "$getnetbyaddr_r_proto" in
12097 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
12098 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
12100 case "$getnetbyaddr_r_proto" in
12101 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
12102 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
12104 case "$getnetbyaddr_r_proto" in
12105 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
12106 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
12108 case "$getnetbyaddr_r_proto" in
12109 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
12110 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
12112 case "$getnetbyaddr_r_proto" in
12113 ''|0) d_getnetbyaddr_r=undef
12114 getnetbyaddr_r_proto=0
12115 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
12116 * ) case "$getnetbyaddr_r_proto" in
12117 REENTRANT_PROTO*) ;;
12118 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
12120 echo "Prototype: $try" ;;
12123 *) case "$usethreads" in
12124 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
12126 d_getnetbyaddr_r=undef
12127 getnetbyaddr_r_proto=0
12131 *) getnetbyaddr_r_proto=0
12135 : see if getnetbyname_r exists
12136 set getnetbyname_r d_getnetbyname_r
12138 case "$d_getnetbyname_r" in
12140 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12141 case "$d_getnetbyname_r_proto:$usethreads" in
12142 ":define") d_getnetbyname_r_proto=define
12143 set d_getnetbyname_r_proto getnetbyname_r $hdrs
12147 case "$d_getnetbyname_r_proto" in
12149 case "$getnetbyname_r_proto" in
12150 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
12151 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
12153 case "$getnetbyname_r_proto" in
12154 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
12155 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
12157 case "$getnetbyname_r_proto" in
12158 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
12159 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
12161 case "$getnetbyname_r_proto" in
12162 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
12163 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
12165 case "$getnetbyname_r_proto" in
12166 ''|0) d_getnetbyname_r=undef
12167 getnetbyname_r_proto=0
12168 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
12169 * ) case "$getnetbyname_r_proto" in
12170 REENTRANT_PROTO*) ;;
12171 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
12173 echo "Prototype: $try" ;;
12176 *) case "$usethreads" in
12177 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
12179 d_getnetbyname_r=undef
12180 getnetbyname_r_proto=0
12184 *) getnetbyname_r_proto=0
12188 : see if getnetent_r exists
12189 set getnetent_r d_getnetent_r
12191 case "$d_getnetent_r" in
12193 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12194 case "$d_getnetent_r_proto:$usethreads" in
12195 ":define") d_getnetent_r_proto=define
12196 set d_getnetent_r_proto getnetent_r $hdrs
12200 case "$d_getnetent_r_proto" in
12202 case "$getnetent_r_proto" in
12203 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
12204 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
12206 case "$getnetent_r_proto" in
12207 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
12208 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBIE ;;
12210 case "$getnetent_r_proto" in
12211 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
12212 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBIE ;;
12214 case "$getnetent_r_proto" in
12215 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
12216 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBI ;;
12218 case "$getnetent_r_proto" in
12219 ''|0) try='int getnetent_r(struct netent*, char*, int);'
12220 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBI ;;
12222 case "$getnetent_r_proto" in
12223 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
12224 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SD ;;
12226 case "$getnetent_r_proto" in
12227 ''|0) d_getnetent_r=undef
12228 getnetent_r_proto=0
12229 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
12230 * ) case "$getnetent_r_proto" in
12231 REENTRANT_PROTO*) ;;
12232 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
12234 echo "Prototype: $try" ;;
12237 *) case "$usethreads" in
12238 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
12240 d_getnetent_r=undef
12241 getnetent_r_proto=0
12245 *) getnetent_r_proto=0
12249 : see if prototypes for various getnetxxx netdb.h functions are available
12251 set d_getnetprotos getnetent $i_netdb netdb.h
12254 : see if getpagesize exists
12255 set getpagesize d_getpagsz
12259 : see if getprotobyname exists
12260 set getprotobyname d_getpbyname
12263 : see if getprotobynumber exists
12264 set getprotobynumber d_getpbynumber
12267 : see if getprotoent exists
12268 set getprotoent d_getpent
12271 : see if getpgid exists
12272 set getpgid d_getpgid
12275 : see if getpgrp2 exists
12276 set getpgrp2 d_getpgrp2
12279 : see if getppid exists
12280 set getppid d_getppid
12283 : see if getpriority exists
12284 set getpriority d_getprior
12287 : see if getprotobyname_r exists
12288 set getprotobyname_r d_getprotobyname_r
12290 case "$d_getprotobyname_r" in
12292 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12293 case "$d_getprotobyname_r_proto:$usethreads" in
12294 ":define") d_getprotobyname_r_proto=define
12295 set d_getprotobyname_r_proto getprotobyname_r $hdrs
12299 case "$d_getprotobyname_r_proto" in
12301 case "$getprotobyname_r_proto" in
12302 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
12303 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
12305 case "$getprotobyname_r_proto" in
12306 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
12307 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
12309 case "$getprotobyname_r_proto" in
12310 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
12311 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
12313 case "$getprotobyname_r_proto" in
12314 ''|0) d_getprotobyname_r=undef
12315 getprotobyname_r_proto=0
12316 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
12317 * ) case "$getprotobyname_r_proto" in
12318 REENTRANT_PROTO*) ;;
12319 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
12321 echo "Prototype: $try" ;;
12324 *) case "$usethreads" in
12325 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
12327 d_getprotobyname_r=undef
12328 getprotobyname_r_proto=0
12332 *) getprotobyname_r_proto=0
12336 : see if getprotobynumber_r exists
12337 set getprotobynumber_r d_getprotobynumber_r
12339 case "$d_getprotobynumber_r" in
12341 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12342 case "$d_getprotobynumber_r_proto:$usethreads" in
12343 ":define") d_getprotobynumber_r_proto=define
12344 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
12348 case "$d_getprotobynumber_r_proto" in
12350 case "$getprotobynumber_r_proto" in
12351 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
12352 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
12354 case "$getprotobynumber_r_proto" in
12355 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
12356 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
12358 case "$getprotobynumber_r_proto" in
12359 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
12360 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
12362 case "$getprotobynumber_r_proto" in
12363 ''|0) d_getprotobynumber_r=undef
12364 getprotobynumber_r_proto=0
12365 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
12366 * ) case "$getprotobynumber_r_proto" in
12367 REENTRANT_PROTO*) ;;
12368 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
12370 echo "Prototype: $try" ;;
12373 *) case "$usethreads" in
12374 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
12376 d_getprotobynumber_r=undef
12377 getprotobynumber_r_proto=0
12381 *) getprotobynumber_r_proto=0
12385 : see if getprotoent_r exists
12386 set getprotoent_r d_getprotoent_r
12388 case "$d_getprotoent_r" in
12390 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12391 case "$d_getprotoent_r_proto:$usethreads" in
12392 ":define") d_getprotoent_r_proto=define
12393 set d_getprotoent_r_proto getprotoent_r $hdrs
12397 case "$d_getprotoent_r_proto" in
12399 case "$getprotoent_r_proto" in
12400 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
12401 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
12403 case "$getprotoent_r_proto" in
12404 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
12405 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBI ;;
12407 case "$getprotoent_r_proto" in
12408 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
12409 ./protochk "extern $try" $hdrs && getprotoent_r_proto=S_SBI ;;
12411 case "$getprotoent_r_proto" in
12412 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
12413 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SD ;;
12415 case "$getprotoent_r_proto" in
12416 ''|0) d_getprotoent_r=undef
12417 getprotoent_r_proto=0
12418 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
12419 * ) case "$getprotoent_r_proto" in
12420 REENTRANT_PROTO*) ;;
12421 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
12423 echo "Prototype: $try" ;;
12426 *) case "$usethreads" in
12427 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
12429 d_getprotoent_r=undef
12430 getprotoent_r_proto=0
12434 *) getprotoent_r_proto=0
12438 : see if prototypes for various getprotoxxx netdb.h functions are available
12440 set d_getprotoprotos getprotoent $i_netdb netdb.h
12443 : see if getprpwnam exists
12444 set getprpwnam d_getprpwnam
12447 : see if getpwent exists
12448 set getpwent d_getpwent
12451 : see if getpwent_r exists
12452 set getpwent_r d_getpwent_r
12454 case "$d_getpwent_r" in
12456 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12457 case "$d_getpwent_r_proto:$usethreads" in
12458 ":define") d_getpwent_r_proto=define
12459 set d_getpwent_r_proto getpwent_r $hdrs
12463 case "$d_getpwent_r_proto" in
12465 case "$getpwent_r_proto" in
12466 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
12467 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBWR ;;
12469 case "$getpwent_r_proto" in
12470 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
12471 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIR ;;
12473 case "$getpwent_r_proto" in
12474 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
12475 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBW ;;
12477 case "$getpwent_r_proto" in
12478 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
12479 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBI ;;
12481 case "$getpwent_r_proto" in
12482 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
12483 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBI ;;
12485 case "$getpwent_r_proto" in
12486 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
12487 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIH ;;
12489 case "$getpwent_r_proto" in
12490 ''|0) d_getpwent_r=undef
12492 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
12493 * ) case "$getpwent_r_proto" in
12494 REENTRANT_PROTO*) ;;
12495 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
12497 echo "Prototype: $try" ;;
12500 *) case "$usethreads" in
12501 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
12508 *) getpwent_r_proto=0
12512 : see if getpwnam_r exists
12513 set getpwnam_r d_getpwnam_r
12515 case "$d_getpwnam_r" in
12517 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12518 case "$d_getpwnam_r_proto:$usethreads" in
12519 ":define") d_getpwnam_r_proto=define
12520 set d_getpwnam_r_proto getpwnam_r $hdrs
12524 case "$d_getpwnam_r_proto" in
12526 case "$getpwnam_r_proto" in
12527 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
12528 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
12530 case "$getpwnam_r_proto" in
12531 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
12532 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
12534 case "$getpwnam_r_proto" in
12535 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
12536 ./protochk "extern $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
12538 case "$getpwnam_r_proto" in
12539 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
12540 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
12542 case "$getpwnam_r_proto" in
12543 ''|0) d_getpwnam_r=undef
12545 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
12546 * ) case "$getpwnam_r_proto" in
12547 REENTRANT_PROTO*) ;;
12548 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
12550 echo "Prototype: $try" ;;
12553 *) case "$usethreads" in
12554 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
12561 *) getpwnam_r_proto=0
12565 : see if getpwuid_r exists
12566 set getpwuid_r d_getpwuid_r
12568 case "$d_getpwuid_r" in
12570 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12571 case "$d_getpwuid_r_proto:$usethreads" in
12572 ":define") d_getpwuid_r_proto=define
12573 set d_getpwuid_r_proto getpwuid_r $hdrs
12577 case "$d_getpwuid_r_proto" in
12579 case "$getpwuid_r_proto" in
12580 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
12581 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
12583 case "$getpwuid_r_proto" in
12584 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
12585 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
12587 case "$getpwuid_r_proto" in
12588 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
12589 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
12591 case "$getpwuid_r_proto" in
12592 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
12593 ./protochk "extern $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
12595 case "$getpwuid_r_proto" in
12596 ''|0) d_getpwuid_r=undef
12598 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
12599 * ) case "$getpwuid_r_proto" in
12600 REENTRANT_PROTO*) ;;
12601 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
12603 echo "Prototype: $try" ;;
12606 *) case "$usethreads" in
12607 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
12614 *) getpwuid_r_proto=0
12619 : see if getservbyname exists
12620 set getservbyname d_getsbyname
12623 : see if getservbyport exists
12624 set getservbyport d_getsbyport
12627 : see if getservent exists
12628 set getservent d_getsent
12631 : see if getservbyname_r exists
12632 set getservbyname_r d_getservbyname_r
12634 case "$d_getservbyname_r" in
12636 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12637 case "$d_getservbyname_r_proto:$usethreads" in
12638 ":define") d_getservbyname_r_proto=define
12639 set d_getservbyname_r_proto getservbyname_r $hdrs
12643 case "$d_getservbyname_r_proto" in
12645 case "$getservbyname_r_proto" in
12646 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
12647 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
12649 case "$getservbyname_r_proto" in
12650 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
12651 ./protochk "extern $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
12653 case "$getservbyname_r_proto" in
12654 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
12655 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
12657 case "$getservbyname_r_proto" in
12658 ''|0) d_getservbyname_r=undef
12659 getservbyname_r_proto=0
12660 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
12661 * ) case "$getservbyname_r_proto" in
12662 REENTRANT_PROTO*) ;;
12663 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
12665 echo "Prototype: $try" ;;
12668 *) case "$usethreads" in
12669 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
12671 d_getservbyname_r=undef
12672 getservbyname_r_proto=0
12676 *) getservbyname_r_proto=0
12680 : see if getservbyport_r exists
12681 set getservbyport_r d_getservbyport_r
12683 case "$d_getservbyport_r" in
12685 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12686 case "$d_getservbyport_r_proto:$usethreads" in
12687 ":define") d_getservbyport_r_proto=define
12688 set d_getservbyport_r_proto getservbyport_r $hdrs
12692 case "$d_getservbyport_r_proto" in
12694 case "$getservbyport_r_proto" in
12695 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
12696 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
12698 case "$getservbyport_r_proto" in
12699 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
12700 ./protochk "extern $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
12702 case "$getservbyport_r_proto" in
12703 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
12704 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
12706 case "$getservbyport_r_proto" in
12707 ''|0) d_getservbyport_r=undef
12708 getservbyport_r_proto=0
12709 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
12710 * ) case "$getservbyport_r_proto" in
12711 REENTRANT_PROTO*) ;;
12712 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
12714 echo "Prototype: $try" ;;
12717 *) case "$usethreads" in
12718 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
12720 d_getservbyport_r=undef
12721 getservbyport_r_proto=0
12725 *) getservbyport_r_proto=0
12729 : see if getservent_r exists
12730 set getservent_r d_getservent_r
12732 case "$d_getservent_r" in
12734 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12735 case "$d_getservent_r_proto:$usethreads" in
12736 ":define") d_getservent_r_proto=define
12737 set d_getservent_r_proto getservent_r $hdrs
12741 case "$d_getservent_r_proto" in
12743 case "$getservent_r_proto" in
12744 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
12745 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBWR ;;
12747 case "$getservent_r_proto" in
12748 ''|0) try='int getservent_r(struct servent*, char*, int);'
12749 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBI ;;
12751 case "$getservent_r_proto" in
12752 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
12753 ./protochk "extern $try" $hdrs && getservent_r_proto=S_SBI ;;
12755 case "$getservent_r_proto" in
12756 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
12757 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SD ;;
12759 case "$getservent_r_proto" in
12760 ''|0) d_getservent_r=undef
12761 getservent_r_proto=0
12762 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
12763 * ) case "$getservent_r_proto" in
12764 REENTRANT_PROTO*) ;;
12765 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
12767 echo "Prototype: $try" ;;
12770 *) case "$usethreads" in
12771 define) echo "getservent_r has no prototype, not using it." >&4 ;;
12773 d_getservent_r=undef
12774 getservent_r_proto=0
12778 *) getservent_r_proto=0
12782 : see if prototypes for various getservxxx netdb.h functions are available
12784 set d_getservprotos getservent $i_netdb netdb.h
12787 : see if getspnam exists
12788 set getspnam d_getspnam
12791 : see if this is a shadow.h system
12792 set shadow.h i_shadow
12795 : see if getspnam_r exists
12796 set getspnam_r d_getspnam_r
12798 case "$d_getspnam_r" in
12800 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
12801 case "$d_getspnam_r_proto:$usethreads" in
12802 ":define") d_getspnam_r_proto=define
12803 set d_getspnam_r_proto getspnam_r $hdrs
12807 case "$d_getspnam_r_proto" in
12809 case "$getspnam_r_proto" in
12810 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
12811 ./protochk "extern $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
12813 case "$getspnam_r_proto" in
12814 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
12815 ./protochk "extern $try" $hdrs && getspnam_r_proto=S_CSBI ;;
12817 case "$getspnam_r_proto" in
12818 ''|0) d_getspnam_r=undef
12820 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
12821 * ) case "$getspnam_r_proto" in
12822 REENTRANT_PROTO*) ;;
12823 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
12825 echo "Prototype: $try" ;;
12828 *) case "$usethreads" in
12829 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
12836 *) getspnam_r_proto=0
12840 : see if gettimeofday or ftime exists
12841 set gettimeofday d_gettimeod
12843 case "$d_gettimeod" in
12849 val="$undef"; set d_ftime; eval $setvar
12852 case "$d_gettimeod$d_ftime" in
12855 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
12859 : see if gmtime_r exists
12860 set gmtime_r d_gmtime_r
12862 case "$d_gmtime_r" in
12864 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
12865 case "$d_gmtime_r_proto:$usethreads" in
12866 ":define") d_gmtime_r_proto=define
12867 set d_gmtime_r_proto gmtime_r $hdrs
12871 case "$d_gmtime_r_proto" in
12873 case "$gmtime_r_proto" in
12874 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
12875 ./protochk "extern $try" $hdrs && gmtime_r_proto=S_TS ;;
12877 case "$gmtime_r_proto" in
12878 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
12879 ./protochk "extern $try" $hdrs && gmtime_r_proto=I_TS ;;
12881 case "$gmtime_r_proto" in
12882 ''|0) d_gmtime_r=undef
12884 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
12885 * ) case "$gmtime_r_proto" in
12886 REENTRANT_PROTO*) ;;
12887 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
12889 echo "Prototype: $try" ;;
12892 *) case "$usethreads" in
12893 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
12900 *) gmtime_r_proto=0
12904 : see if hasmntopt exists
12905 set hasmntopt d_hasmntopt
12908 : see if this is a netinet/in.h or sys/in.h system
12909 set netinet/in.h i_niin sys/in.h i_sysin
12912 : see if arpa/inet.h has to be included
12913 set arpa/inet.h i_arpainet
12916 : see if htonl --and friends-- exists
12921 : Maybe they are macros.
12924 $cat >htonl.c <<EOM
12926 #include <sys/types.h>
12927 #$i_niin I_NETINET_IN
12929 #$i_arpainet I_ARPA_INET
12930 #ifdef I_NETINET_IN
12931 #include <netinet/in.h>
12934 #include <sys/in.h>
12937 #include <arpa/inet.h>
12940 printf("Defined as a macro.");
12943 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
12944 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
12946 echo "But it seems to be defined as a macro." >&4
12956 if set index val -f; eval $csym; $val; then
12957 if set strchr val -f d_strchr; eval $csym; $val; then
12958 if $contains strchr "$strings" >/dev/null 2>&1 ; then
12961 echo "strchr() found." >&4
12965 echo "index() found." >&4
12970 echo "index() found." >&4
12973 if set strchr val -f d_strchr; eval $csym; $val; then
12976 echo "strchr() found." >&4
12978 echo "No index() or strchr() found!" >&4
12983 set d_strchr; eval $setvar
12985 set d_index; eval $setvar
12987 : check whether inet_aton exists
12988 set inet_aton d_inetaton
12993 $cat >isascii.c <<'EOCP'
13005 if eval $compile; then
13006 echo "isascii() found." >&4
13009 echo "isascii() NOT found." >&4
13016 : see if isfinite exists
13017 set isfinite d_isfinite
13020 : see if isinf exists
13024 : see if isnan exists
13028 : see if isnanl exists
13029 set isnanl d_isnanl
13032 : see if killpg exists
13033 set killpg d_killpg
13036 : see if lchown exists
13038 $cat > try.c <<'EOCP'
13039 /* System header to define __stub macros and hopefully few prototypes,
13040 which can conflict with char lchown(); below. */
13041 #include <assert.h>
13042 /* Override any gcc2 internal prototype to avoid an error. */
13043 /* We use char because int might match the return type of a gcc2
13044 builtin and then its argument prototype would still apply. */
13047 /* The GNU C library defines this for functions which it implements
13048 to always fail with ENOSYS. Some functions are actually named
13049 something starting with __ and the normal name is an alias. */
13050 #if defined (__stub_lchown) || defined (__stub___lchown)
13058 if eval $compile; then
13059 $echo "lchown() found." >&4
13062 $echo "lchown() NOT found." >&4
13068 : See if number of significant digits in a double precision number is known
13070 $cat >ldbl_dig.c <<EOM
13071 #$i_limits I_LIMITS
13074 #include <limits.h>
13080 printf("Contains LDBL_DIG");
13083 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
13084 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
13085 echo "LDBL_DIG found." >&4
13088 echo "LDBL_DIG NOT found." >&4
13095 : see if link exists
13099 : see if localtime_r exists
13100 set localtime_r d_localtime_r
13102 case "$d_localtime_r" in
13104 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
13105 case "$d_localtime_r_proto:$usethreads" in
13106 ":define") d_localtime_r_proto=define
13107 set d_localtime_r_proto localtime_r $hdrs
13111 case "$d_localtime_r_proto" in
13113 case "$localtime_r_proto" in
13114 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
13115 ./protochk "extern $try" $hdrs && localtime_r_proto=S_TS ;;
13117 case "$localtime_r_proto" in
13118 ''|0) try='int localtime_r(const time_t*, struct tm*);'
13119 ./protochk "extern $try" $hdrs && localtime_r_proto=I_TS ;;
13121 case "$localtime_r_proto" in
13122 ''|0) d_localtime_r=undef
13123 localtime_r_proto=0
13124 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
13125 * ) case "$localtime_r_proto" in
13126 REENTRANT_PROTO*) ;;
13127 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
13129 echo "Prototype: $try" ;;
13132 *) case "$usethreads" in
13133 define) echo "localtime_r has no prototype, not using it." >&4 ;;
13135 d_localtime_r=undef
13136 localtime_r_proto=0
13140 *) localtime_r_proto=0
13144 : see if localeconv exists
13145 set localeconv d_locconv
13148 : see if lockf exists
13152 : see if prototype for lseek is available
13154 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
13157 : see if lstat exists
13161 : see if madvise exists
13162 set madvise d_madvise
13165 : see if mblen exists
13169 : see if mbstowcs exists
13170 set mbstowcs d_mbstowcs
13173 : see if mbtowc exists
13174 set mbtowc d_mbtowc
13177 : see if memchr exists
13178 set memchr d_memchr
13181 : see if memcmp exists
13182 set memcmp d_memcmp
13185 : see if memcpy exists
13186 set memcpy d_memcpy
13189 : see if memmove exists
13190 set memmove d_memmove
13193 : see if memset exists
13194 set memset d_memset
13197 : see if mkdir exists
13201 : see if mkdtemp exists
13202 set mkdtemp d_mkdtemp
13205 : see if mkfifo exists
13206 set mkfifo d_mkfifo
13209 : see if mkstemp exists
13210 set mkstemp d_mkstemp
13213 : see if mkstemps exists
13214 set mkstemps d_mkstemps
13217 : see if mktime exists
13218 set mktime d_mktime
13221 : see if this is a sys/mman.h system
13222 set sys/mman.h i_sysmman
13225 : see if mmap exists
13228 : see what shmat returns
13229 : default to something harmless
13231 case "$i_sysmman$d_mmap" in
13233 $cat >mmap.c <<'END'
13234 #include <sys/mman.h>
13237 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
13242 echo "and it returns ($mmaptype)." >&4
13248 : see if mprotect exists
13249 set mprotect d_mprotect
13252 : see if msgctl exists
13253 set msgctl d_msgctl
13256 : see if msgget exists
13257 set msgget d_msgget
13260 : see if msgsnd exists
13261 set msgsnd d_msgsnd
13264 : see if msgrcv exists
13265 set msgrcv d_msgrcv
13268 : see how much of the 'msg*(2)' library is present.
13271 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
13272 *"$undef"*) h_msg=false;;
13276 case "`ipcs 2>&1`" in
13277 "SVID messages"*"not configured"*)
13278 echo "Your $osname does not have the msg*(2) configured." >&4
13281 set msgctl d_msgctl
13283 set msgget d_msgget
13285 set msgsnd d_msgsnd
13287 set msgrcv d_msgrcv
13293 : we could also check for sys/ipc.h ...
13294 if $h_msg && $test `./findhdr sys/msg.h`; then
13295 echo "You have the full msg*(2) library." >&4
13298 echo "You don't have the full msg*(2) library." >&4
13306 echo "Checking to see if your system supports struct msghdr..." >&4
13307 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
13309 case "$d_msghdr_s" in
13310 "$define") echo "Yes, it does." ;;
13311 *) echo "No, it doesn't." ;;
13315 : see if msync exists
13319 : see if munmap exists
13320 set munmap d_munmap
13323 : see if nice exists
13327 : see if this is a langinfo.h system
13328 set langinfo.h i_langinfo
13331 : see if nl_langinfo exists
13332 set nl_langinfo d_nl_langinfo
13335 : check for length of character
13337 case "$charsize" in
13339 echo "Checking to see how big your characters are (hey, you never know)..." >&4
13340 $cat >try.c <<'EOCP'
13344 printf("%d\n", (int)sizeof(char));
13349 if eval $compile_ok; then
13353 echo "(I can't seem to compile the test program. Guessing...)"
13360 rp="What is the size of a character (in bytes)?"
13365 : check for volatile keyword
13367 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
13368 $cat >try.c <<'EOCP'
13371 typedef struct _goo_struct goo_struct;
13372 goo_struct * volatile goo = ((goo_struct *)0);
13373 struct _goo_struct {
13378 typedef unsigned short foo_t;
13379 char *volatile foo;
13381 volatile foo_t blech;
13385 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
13387 echo "Yup, it does."
13390 echo "Nope, it doesn't."
13398 $echo "Choosing the C types to be used for Perl's internal types..." >&4
13400 case "$use64bitint:$d_quad:$quadtype" in
13403 uvtype="$uquadtype"
13408 uvtype="unsigned long"
13414 case "$uselongdouble:$d_longdbl" in
13416 nvtype="long double"
13417 nvsize=$longdblsize
13424 $echo "(IV will be "$ivtype", $ivsize bytes)"
13425 $echo "(UV will be "$uvtype", $uvsize bytes)"
13426 $echo "(NV will be "$nvtype", $nvsize bytes)"
13429 #$i_inttypes I_INTTYPES
13431 #include <inttypes.h>
13436 int8_t i = INT8_MAX;
13437 uint8_t u = UINT8_MAX;
13438 printf("int8_t\n");
13441 int16_t i = INT16_MAX;
13442 uint16_t i = UINT16_MAX;
13443 printf("int16_t\n");
13446 int32_t i = INT32_MAX;
13447 uint32_t u = UINT32_MAX;
13448 printf("int32_t\n");
13454 '') case "$charsize" in
13456 u8type="unsigned char"
13465 if eval $compile; then
13466 case "`$run ./try`" in
13467 int8_t) i8type=int8_t
13477 '') if $test $charsize -ge 1; then
13479 u8type="unsigned char"
13487 '') case "$shortsize" in
13489 u16type="unsigned short"
13497 '') set try -DINT16
13498 if eval $compile; then
13499 case "`$run ./try`" in
13511 '') if $test $shortsize -ge 2; then
13513 u16type="unsigned short"
13521 '') case "$longsize" in
13523 u32type="unsigned long"
13527 *) case "$intsize" in
13529 u32type="unsigned int"
13539 '') set try -DINT32
13540 if eval $compile; then
13541 case "`$run ./try`" in
13553 '') if $test $intsize -ge 4; then
13555 u32type="unsigned int"
13563 '') case "$d_quad:$quadtype" in
13565 i64type="$quadtype"
13566 u64type="$uquadtype"
13574 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
13575 : volatile so that the compiler has to store it out to memory.
13576 if test X"$d_volatile" = X"$define"; then
13581 #include <sys/types.h>
13582 #include <signal.h>
13584 $volatile int bletched = 0;
13585 $signal_t blech(s) int s; { bletched = 1; }
13590 int n = 8 * $uvsize;
13593 signal(SIGFPE, blech);
13596 for (i = 0; i < n; i++) {
13597 u = u << 1 | ($uvtype)1;
13599 if (($uvtype)d != u)
13603 d = ($nvtype)(u - 1);
13604 if (($uvtype)d != (u - 1))
13612 printf("%d\n", ((i == n) ? -n : i));
13618 d_nv_preserves_uv="$undef"
13619 if eval $compile; then
13620 nv_preserves_uv_bits="`$run ./try`"
13622 case "$nv_preserves_uv_bits" in
13624 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
13625 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
13626 d_nv_preserves_uv="$define"
13628 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
13629 d_nv_preserves_uv="$undef" ;;
13630 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
13631 nv_preserves_uv_bits="$undef" ;;
13637 : check for off64_t
13639 echo "Checking to see if you have off64_t..." >&4
13641 #include <sys/types.h>
13642 #include <unistd.h>
13643 int main() { off64_t x = 7; }
13646 if eval $compile; then
13648 echo "You have off64_t."
13651 echo "You do not have off64_t."
13652 case "$lseeksize" in
13653 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
13660 : how to create joinable pthreads
13661 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
13663 echo "Checking what constant to use for creating joinable pthreads..." >&4
13664 $cat >try.c <<'EOCP'
13665 #include <pthread.h>
13667 int detachstate = JOINABLE;
13670 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
13671 if eval $compile; then
13672 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
13673 val="$undef" # Yes, undef.
13674 set d_old_pthread_create_joinable
13677 set old_pthread_create_joinable
13680 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
13681 if eval $compile; then
13682 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
13684 set d_old_pthread_create_joinable
13686 val=PTHREAD_CREATE_UNDETACHED
13687 set old_pthread_create_joinable
13690 set try -DJOINABLE=__UNDETACHED
13691 if eval $compile; then
13692 echo "You seem to use __UNDETACHED." >&4
13694 set d_old_pthread_create_joinable
13697 set old_pthread_create_joinable
13700 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
13702 set d_old_pthread_create_joinable
13705 set old_pthread_create_joinable
13712 d_old_pthread_create_joinable="$undef"
13713 old_pthread_create_joinable=""
13716 : see if pause exists
13720 : see if pipe exists
13724 : see if poll exists
13728 : see if readlink exists
13729 set readlink d_readlink
13735 case "$d_readlink" in
13737 if $issymlink /proc/self/exe ; then
13738 $ls -l /proc/self/exe > reflect
13739 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13740 echo "You have Linux-like /proc/self/exe."
13741 procselfexe='"/proc/self/exe"'
13745 if $issymlink /proc/curproc/file ; then
13746 $ls -l /proc/curproc/file > reflect
13747 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
13748 echo "You have BSD-like /proc/curproc/file."
13749 procselfexe='"/proc/curproc/file"'
13759 : see whether the pthread_atfork exists
13761 #include <pthread.h>
13764 #ifdef PTHREAD_ATFORK
13765 pthread_atfork(NULL,NULL,NULL);
13770 : see if pthread_atfork exists
13771 set try -DPTHREAD_ATFORK
13772 if eval $compile; then
13777 case "$usethreads" in
13780 $define) echo 'pthread_atfork found.' >&4 ;;
13781 *) echo 'pthread_atfork NOT found.' >&4 ;;
13784 set d_pthread_atfork
13788 : see whether the various POSIXish _yields exist
13790 #include <pthread.h>
13796 #ifdef PTHREAD_YIELD
13799 #ifdef PTHREAD_YIELD_NULL
13800 pthread_yield(NULL);
13806 : see if sched_yield exists
13807 set try -DSCHED_YIELD
13808 if eval $compile; then
13810 sched_yield='sched_yield()'
13814 case "$usethreads" in
13817 $define) echo 'sched_yield() found.' >&4 ;;
13818 *) echo 'sched_yield() NOT found.' >&4 ;;
13824 : see if pthread_yield exists
13825 set try -DPTHREAD_YIELD
13826 if eval $compile; then
13828 case "$sched_yield" in
13829 '') sched_yield='pthread_yield()' ;;
13832 set try -DPTHREAD_YIELD_NULL
13833 if eval $compile; then
13835 case "$sched_yield" in
13836 '') sched_yield='pthread_yield(NULL)' ;;
13842 case "$usethreads" in
13845 $define) echo 'pthread_yield() found.' >&4 ;;
13846 *) echo 'pthread_yield() NOT found.' >&4 ;;
13850 set d_pthread_yield
13853 case "$sched_yield" in
13854 '') sched_yield=undef ;;
13859 : see if random_r exists
13860 set random_r d_random_r
13862 case "$d_random_r" in
13864 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
13865 case "$d_random_r_proto:$usethreads" in
13866 ":define") d_random_r_proto=define
13867 set d_random_r_proto random_r $hdrs
13871 case "$d_random_r_proto" in
13873 case "$random_r_proto" in
13874 ''|0) try='int random_r(int*, struct random_data*);'
13875 ./protochk "extern $try" $hdrs && random_r_proto=I_TS ;;
13877 case "$random_r_proto" in
13878 ''|0) d_random_r=undef
13880 echo "Disabling random_r, cannot determine prototype." >&4 ;;
13881 * ) case "$random_r_proto" in
13882 REENTRANT_PROTO*) ;;
13883 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
13885 echo "Prototype: $try" ;;
13888 *) case "$usethreads" in
13889 define) echo "random_r has no prototype, not using it." >&4 ;;
13896 *) random_r_proto=0
13900 : see if readdir and friends exist
13901 set readdir d_readdir
13903 set seekdir d_seekdir
13905 set telldir d_telldir
13907 set rewinddir d_rewinddir
13910 : see if readdir64_r exists
13911 set readdir64_r d_readdir64_r
13913 case "$d_readdir64_r" in
13915 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
13916 case "$d_readdir64_r_proto:$usethreads" in
13917 ":define") d_readdir64_r_proto=define
13918 set d_readdir64_r_proto readdir64_r $hdrs
13922 case "$d_readdir64_r_proto" in
13924 case "$readdir64_r_proto" in
13925 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
13926 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TSR ;;
13928 case "$readdir64_r_proto" in
13929 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
13930 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TS ;;
13932 case "$readdir64_r_proto" in
13933 ''|0) d_readdir64_r=undef
13934 readdir64_r_proto=0
13935 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
13936 * ) case "$readdir64_r_proto" in
13937 REENTRANT_PROTO*) ;;
13938 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
13940 echo "Prototype: $try" ;;
13943 *) case "$usethreads" in
13944 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
13946 d_readdir64_r=undef
13947 readdir64_r_proto=0
13951 *) readdir64_r_proto=0
13955 : see if readdir_r exists
13956 set readdir_r d_readdir_r
13958 case "$d_readdir_r" in
13960 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
13961 case "$d_readdir_r_proto:$usethreads" in
13962 ":define") d_readdir_r_proto=define
13963 set d_readdir_r_proto readdir_r $hdrs
13967 case "$d_readdir_r_proto" in
13969 case "$readdir_r_proto" in
13970 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
13971 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TSR ;;
13973 case "$readdir_r_proto" in
13974 ''|0) try='int readdir_r(DIR*, struct dirent*);'
13975 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TS ;;
13977 case "$readdir_r_proto" in
13978 ''|0) d_readdir_r=undef
13980 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
13981 * ) case "$readdir_r_proto" in
13982 REENTRANT_PROTO*) ;;
13983 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
13985 echo "Prototype: $try" ;;
13988 *) case "$usethreads" in
13989 define) echo "readdir_r has no prototype, not using it." >&4 ;;
13996 *) readdir_r_proto=0
14000 : see if readv exists
14004 : see if recvmsg exists
14005 set recvmsg d_recvmsg
14008 : see if rename exists
14009 set rename d_rename
14012 : see if rmdir exists
14016 : see if memory.h is available.
14021 : See if it conflicts with string.h
14027 $cppstdin $cppflags $cppminus < $strings > mem.h
14028 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
14030 echo "We won't be including <memory.h>."
14040 : can bcopy handle overlapping blocks?
14043 case "$d_memmove" in
14044 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
14045 *) case "$d_bcopy" in
14047 echo "Checking to see if bcopy() can do overlapping copies..." >&4
14049 #$i_memory I_MEMORY
14050 #$i_stdlib I_STDLIB
14051 #$i_string I_STRING
14052 #$i_unistd I_UNISTD
14054 $cat >>try.c <<'EOCP'
14057 # include <memory.h>
14060 # include <stdlib.h>
14063 # include <string.h>
14065 # include <strings.h>
14068 # include <unistd.h> /* Needed for NetBSD */
14072 char buf[128], abc[128];
14078 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14079 try to store the string in read-only memory. */
14080 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
14082 for (align = 7; align >= 0; align--) {
14083 for (len = 36; len; len--) {
14085 bcopy(abc, b, len);
14086 for (off = 1; off <= len; off++) {
14087 bcopy(b, b+off, len);
14088 bcopy(b+off, b, len);
14089 if (bcmp(b, abc, len))
14098 if eval $compile_ok; then
14099 if ./try 2>/dev/null; then
14100 echo "Yes, it can."
14103 echo "It can't, sorry."
14106 echo "(I can't compile the test program, so we'll assume not...)"
14110 $rm -f try.* try core
14116 : can memcpy handle overlapping blocks?
14119 case "$d_memmove" in
14120 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
14121 *) case "$d_memcpy" in
14123 echo "Checking to see if memcpy() can do overlapping copies..." >&4
14125 #$i_memory I_MEMORY
14126 #$i_stdlib I_STDLIB
14127 #$i_string I_STRING
14128 #$i_unistd I_UNISTD
14130 $cat >>try.c <<'EOCP'
14133 # include <memory.h>
14136 # include <stdlib.h>
14139 # include <string.h>
14141 # include <strings.h>
14144 # include <unistd.h> /* Needed for NetBSD */
14148 char buf[128], abc[128];
14154 /* Copy "abcde..." string to char abc[] so that gcc doesn't
14155 try to store the string in read-only memory. */
14156 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
14158 for (align = 7; align >= 0; align--) {
14159 for (len = 36; len; len--) {
14161 memcpy(b, abc, len);
14162 for (off = 1; off <= len; off++) {
14163 memcpy(b+off, b, len);
14164 memcpy(b, b+off, len);
14165 if (memcmp(b, abc, len))
14174 if eval $compile_ok; then
14175 if ./try 2>/dev/null; then
14176 echo "Yes, it can."
14179 echo "It can't, sorry."
14182 echo "(I can't compile the test program, so we'll assume not...)"
14186 $rm -f try.* try core
14192 : can memcmp be trusted to compare relative magnitude?
14194 case "$d_memcmp" in
14197 echo "Checking if your memcmp() can compare relative magnitude..." >&4
14199 #$i_memory I_MEMORY
14200 #$i_stdlib I_STDLIB
14201 #$i_string I_STRING
14202 #$i_unistd I_UNISTD
14204 $cat >>try.c <<'EOCP'
14207 # include <memory.h>
14210 # include <stdlib.h>
14213 # include <string.h>
14215 # include <strings.h>
14218 # include <unistd.h> /* Needed for NetBSD */
14224 if ((a < b) && memcmp(&a, &b, 1) < 0)
14230 if eval $compile_ok; then
14231 if $run ./try 2>/dev/null; then
14232 echo "Yes, it can."
14235 echo "No, it can't (it uses signed chars)."
14238 echo "(I can't compile the test program, so we'll assume not...)"
14242 $rm -f try.* try core
14246 : see if prototype for sbrk is available
14248 set d_sbrkproto sbrk $i_unistd unistd.h
14251 : see if select exists
14252 set select d_select
14255 : see if semctl exists
14256 set semctl d_semctl
14259 : see if semget exists
14260 set semget d_semget
14263 : see if semop exists
14267 : see how much of the 'sem*(2)' library is present.
14270 case "$d_semctl$d_semget$d_semop" in
14271 *"$undef"*) h_sem=false;;
14275 case "`ipcs 2>&1`" in
14276 "SVID messages"*"not configured"*)
14277 echo "Your $osname does not have the sem*(2) configured." >&4
14280 set semctl d_semctl
14282 set semget d_semget
14290 : we could also check for sys/ipc.h ...
14291 if $h_sem && $test `./findhdr sys/sem.h`; then
14292 echo "You have the full sem*(2) library." >&4
14295 echo "You don't have the full sem*(2) library." >&4
14301 : see whether sys/sem.h defines union semun
14303 $cat > try.c <<'END'
14304 #include <sys/types.h>
14305 #include <sys/ipc.h>
14306 #include <sys/sem.h>
14307 int main () { union semun semun; semun.buf = 0; }
14310 if eval $compile; then
14311 echo "You have union semun in <sys/sem.h>." >&4
14314 echo "You do not have union semun in <sys/sem.h>." >&4
14317 $rm -f try try.c try.h
14321 : see how to do semctl IPC_STAT
14324 : see whether semctl IPC_STAT can use union semun
14329 # define S_IRUSR S_IREAD
14330 # define S_IWUSR S_IWRITE
14331 # define S_IXUSR S_IEXEC
14333 # define S_IRUSR 0400
14334 # define S_IWUSR 0200
14335 # define S_IXUSR 0100
14337 # define S_IRGRP (S_IRUSR>>3)
14338 # define S_IWGRP (S_IWUSR>>3)
14339 # define S_IXGRP (S_IXUSR>>3)
14340 # define S_IROTH (S_IRUSR>>6)
14341 # define S_IWOTH (S_IWUSR>>6)
14342 # define S_IXOTH (S_IXUSR>>6)
14345 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
14346 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
14347 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
14352 #include <sys/types.h>
14353 #include <sys/ipc.h>
14354 #include <sys/sem.h>
14355 #include <sys/stat.h>
14362 #$d_union_semun HAS_UNION_SEMUN
14365 #ifndef HAS_UNION_SEMUN
14368 struct semid_ds *buf;
14369 unsigned short *array;
14375 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14376 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14378 struct semid_ds argbuf;
14381 st = semctl(sem, 0, IPC_STAT, arg);
14385 # endif /* IPC_STAT */
14386 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14388 if (semctl(sem, 0, IPC_RMID, arg) != 0)
14389 # endif /* IPC_RMID */
14390 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14392 #endif /* IPC_PRIVATE && ... */
14393 printf("semget failed: errno = %d\n", errno);
14399 if eval $compile; then
14402 semun) val="$define" ;;
14408 case "$d_semctl_semun" in
14410 echo "You can use union semun for semctl IPC_STAT." >&4
14413 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
14418 : see whether semctl IPC_STAT can use struct semid_ds pointer
14419 $cat > try.c <<'END'
14420 #include <sys/types.h>
14421 #include <sys/ipc.h>
14422 #include <sys/sem.h>
14423 #include <sys/stat.h>
14431 struct semid_ds arg;
14434 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
14435 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
14438 st = semctl(sem, 0, IPC_STAT, &arg);
14440 printf("semid_ds\n");
14442 # endif /* IPC_STAT */
14443 printf("semctl IPC_STAT failed: errno = %d\n", errno);
14445 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
14446 # endif /* IPC_RMID */
14447 printf("semctl IPC_RMID failed: errno = %d\n", errno);
14449 #endif /* IPC_PRIVATE && ... */
14450 printf("semget failed: errno = %d\n", errno);
14457 if eval $compile; then
14460 semid_ds) val="$define" ;;
14464 set d_semctl_semid_ds
14466 case "$d_semctl_semid_ds" in
14468 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
14470 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
14477 # We do not have the full sem*(2) library, so assume we can not
14483 set d_semctl_semid_ds
14488 : see if sendmsg exists
14489 set sendmsg d_sendmsg
14492 : see if setegid exists
14493 set setegid d_setegid
14496 : see if seteuid exists
14497 set seteuid d_seteuid
14500 : see if setgrent exists
14501 set setgrent d_setgrent
14504 : see if setgrent_r exists
14505 set setgrent_r d_setgrent_r
14507 case "$d_setgrent_r" in
14509 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14510 case "$d_setgrent_r_proto:$usethreads" in
14511 ":define") d_setgrent_r_proto=define
14512 set d_setgrent_r_proto setgrent_r $hdrs
14516 case "$d_setgrent_r_proto" in
14518 case "$setgrent_r_proto" in
14519 ''|0) try='int setgrent_r(FILE**);'
14520 ./protochk "extern $try" $hdrs && setgrent_r_proto=I_H ;;
14522 case "$setgrent_r_proto" in
14523 ''|0) try='void setgrent_r(FILE**);'
14524 ./protochk "extern $try" $hdrs && setgrent_r_proto=V_H ;;
14526 case "$setgrent_r_proto" in
14527 ''|0) d_setgrent_r=undef
14529 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
14530 * ) case "$setgrent_r_proto" in
14531 REENTRANT_PROTO*) ;;
14532 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
14534 echo "Prototype: $try" ;;
14537 *) case "$usethreads" in
14538 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
14545 *) setgrent_r_proto=0
14549 : see if sethostent exists
14550 set sethostent d_sethent
14553 : see if sethostent_r exists
14554 set sethostent_r d_sethostent_r
14556 case "$d_sethostent_r" in
14558 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14559 case "$d_sethostent_r_proto:$usethreads" in
14560 ":define") d_sethostent_r_proto=define
14561 set d_sethostent_r_proto sethostent_r $hdrs
14565 case "$d_sethostent_r_proto" in
14567 case "$sethostent_r_proto" in
14568 ''|0) try='int sethostent_r(int, struct hostent_data*);'
14569 ./protochk "extern $try" $hdrs && sethostent_r_proto=I_ID ;;
14571 case "$sethostent_r_proto" in
14572 ''|0) try='void sethostent_r(int, struct hostent_data*);'
14573 ./protochk "extern $try" $hdrs && sethostent_r_proto=V_ID ;;
14575 case "$sethostent_r_proto" in
14576 ''|0) d_sethostent_r=undef
14577 sethostent_r_proto=0
14578 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
14579 * ) case "$sethostent_r_proto" in
14580 REENTRANT_PROTO*) ;;
14581 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
14583 echo "Prototype: $try" ;;
14586 *) case "$usethreads" in
14587 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
14589 d_sethostent_r=undef
14590 sethostent_r_proto=0
14594 *) sethostent_r_proto=0
14598 : see if setitimer exists
14599 set setitimer d_setitimer
14602 : see if setlinebuf exists
14603 set setlinebuf d_setlinebuf
14606 : see if setlocale exists
14607 set setlocale d_setlocale
14610 : see if locale.h is available
14611 set locale.h i_locale
14614 : see if setlocale_r exists
14615 set setlocale_r d_setlocale_r
14617 case "$d_setlocale_r" in
14619 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
14620 case "$d_setlocale_r_proto:$usethreads" in
14621 ":define") d_setlocale_r_proto=define
14622 set d_setlocale_r_proto setlocale_r $hdrs
14626 case "$d_setlocale_r_proto" in
14628 case "$setlocale_r_proto" in
14629 ''|0) try='int setlocale_r(int, const char*, char*, int);'
14630 ./protochk "extern $try" $hdrs && setlocale_r_proto=I_ICBI ;;
14632 case "$setlocale_r_proto" in
14633 ''|0) d_setlocale_r=undef
14634 setlocale_r_proto=0
14635 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
14636 * ) case "$setlocale_r_proto" in
14637 REENTRANT_PROTO*) ;;
14638 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
14640 echo "Prototype: $try" ;;
14643 *) case "$usethreads" in
14644 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
14646 d_setlocale_r=undef
14647 setlocale_r_proto=0
14651 *) setlocale_r_proto=0
14655 : see if setnetent exists
14656 set setnetent d_setnent
14659 : see if setnetent_r exists
14660 set setnetent_r d_setnetent_r
14662 case "$d_setnetent_r" in
14664 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14665 case "$d_setnetent_r_proto:$usethreads" in
14666 ":define") d_setnetent_r_proto=define
14667 set d_setnetent_r_proto setnetent_r $hdrs
14671 case "$d_setnetent_r_proto" in
14673 case "$setnetent_r_proto" in
14674 ''|0) try='int setnetent_r(int, struct netent_data*);'
14675 ./protochk "extern $try" $hdrs && setnetent_r_proto=I_ID ;;
14677 case "$setnetent_r_proto" in
14678 ''|0) try='void setnetent_r(int, struct netent_data*);'
14679 ./protochk "extern $try" $hdrs && setnetent_r_proto=V_ID ;;
14681 case "$setnetent_r_proto" in
14682 ''|0) d_setnetent_r=undef
14683 setnetent_r_proto=0
14684 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
14685 * ) case "$setnetent_r_proto" in
14686 REENTRANT_PROTO*) ;;
14687 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
14689 echo "Prototype: $try" ;;
14692 *) case "$usethreads" in
14693 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
14695 d_setnetent_r=undef
14696 setnetent_r_proto=0
14700 *) setnetent_r_proto=0
14704 : see if setprotoent exists
14705 set setprotoent d_setpent
14708 : see if setpgid exists
14709 set setpgid d_setpgid
14712 : see if setpgrp2 exists
14713 set setpgrp2 d_setpgrp2
14716 : see if setpriority exists
14717 set setpriority d_setprior
14720 : see if setproctitle exists
14721 set setproctitle d_setproctitle
14724 : see if setprotoent_r exists
14725 set setprotoent_r d_setprotoent_r
14727 case "$d_setprotoent_r" in
14729 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14730 case "$d_setprotoent_r_proto:$usethreads" in
14731 ":define") d_setprotoent_r_proto=define
14732 set d_setprotoent_r_proto setprotoent_r $hdrs
14736 case "$d_setprotoent_r_proto" in
14738 case "$setprotoent_r_proto" in
14739 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
14740 ./protochk "extern $try" $hdrs && setprotoent_r_proto=I_ID ;;
14742 case "$setprotoent_r_proto" in
14743 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
14744 ./protochk "extern $try" $hdrs && setprotoent_r_proto=V_ID ;;
14746 case "$setprotoent_r_proto" in
14747 ''|0) d_setprotoent_r=undef
14748 setprotoent_r_proto=0
14749 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
14750 * ) case "$setprotoent_r_proto" in
14751 REENTRANT_PROTO*) ;;
14752 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
14754 echo "Prototype: $try" ;;
14757 *) case "$usethreads" in
14758 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
14760 d_setprotoent_r=undef
14761 setprotoent_r_proto=0
14765 *) setprotoent_r_proto=0
14769 : see if setpwent exists
14770 set setpwent d_setpwent
14773 : see if setpwent_r exists
14774 set setpwent_r d_setpwent_r
14776 case "$d_setpwent_r" in
14778 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14779 case "$d_setpwent_r_proto:$usethreads" in
14780 ":define") d_setpwent_r_proto=define
14781 set d_setpwent_r_proto setpwent_r $hdrs
14785 case "$d_setpwent_r_proto" in
14787 case "$setpwent_r_proto" in
14788 ''|0) try='int setpwent_r(FILE**);'
14789 ./protochk "extern $try" $hdrs && setpwent_r_proto=I_H ;;
14791 case "$setpwent_r_proto" in
14792 ''|0) try='void setpwent_r(FILE**);'
14793 ./protochk "extern $try" $hdrs && setpwent_r_proto=V_H ;;
14795 case "$setpwent_r_proto" in
14796 ''|0) d_setpwent_r=undef
14798 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
14799 * ) case "$setpwent_r_proto" in
14800 REENTRANT_PROTO*) ;;
14801 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
14803 echo "Prototype: $try" ;;
14806 *) case "$usethreads" in
14807 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
14814 *) setpwent_r_proto=0
14818 : see if setregid exists
14819 set setregid d_setregid
14821 set setresgid d_setresgid
14824 : see if setreuid exists
14825 set setreuid d_setreuid
14827 set setresuid d_setresuid
14830 : see if setrgid exists
14831 set setrgid d_setrgid
14834 : see if setruid exists
14835 set setruid d_setruid
14838 : see if setservent exists
14839 set setservent d_setsent
14842 : see if setservent_r exists
14843 set setservent_r d_setservent_r
14845 case "$d_setservent_r" in
14847 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14848 case "$d_setservent_r_proto:$usethreads" in
14849 ":define") d_setservent_r_proto=define
14850 set d_setservent_r_proto setservent_r $hdrs
14854 case "$d_setservent_r_proto" in
14856 case "$setservent_r_proto" in
14857 ''|0) try='int setservent_r(int, struct servent_data*);'
14858 ./protochk "extern $try" $hdrs && setservent_r_proto=I_ID ;;
14860 case "$setservent_r_proto" in
14861 ''|0) try='void setservent_r(int, struct servent_data*);'
14862 ./protochk "extern $try" $hdrs && setservent_r_proto=V_ID ;;
14864 case "$setservent_r_proto" in
14865 ''|0) d_setservent_r=undef
14866 setservent_r_proto=0
14867 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
14868 * ) case "$setservent_r_proto" in
14869 REENTRANT_PROTO*) ;;
14870 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
14872 echo "Prototype: $try" ;;
14875 *) case "$usethreads" in
14876 define) echo "setservent_r has no prototype, not using it." >&4 ;;
14878 d_setservent_r=undef
14879 setservent_r_proto=0
14883 *) setservent_r_proto=0
14887 : see if setsid exists
14888 set setsid d_setsid
14891 : see if setvbuf exists
14892 set setvbuf d_setvbuf
14895 : see if sfio.h is available
14900 : see if sfio library is available
14911 : Ok, but do we want to use it.
14915 true|$define|[yY]*) dflt='y';;
14918 echo "$package can use the sfio library, but it is experimental."
14919 case "$useperlio" in
14921 echo "For sfio also the PerlIO abstraction layer is needed."
14922 echo "Earlier you said you wouldn't want that."
14925 rp="You seem to have sfio available, do you want to try using it?"
14928 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
14929 useperlio="$define"
14932 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
14937 *) case "$usesfio" in
14938 true|$define|[yY]*)
14939 echo "Sorry, cannot find sfio on this machine." >&4
14940 echo "Ignoring your setting of usesfio=$usesfio." >&4
14949 $define) usesfio='true';;
14950 *) usesfio='false';;
14954 *) : Remove sfio from list of libraries to use
14957 echo "Removing unneeded -lsfio from library list" >&4
14958 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
14961 echo "libs = $libs" >&4
14968 : see if shmctl exists
14969 set shmctl d_shmctl
14972 : see if shmget exists
14973 set shmget d_shmget
14976 : see if shmat exists
14979 : see what shmat returns
14982 $cat >shmat.c <<'END'
14983 #include <sys/shm.h>
14986 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
14991 echo "and it returns ($shmattype)." >&4
14992 : see if a prototype for shmat is available
14993 xxx=`./findhdr sys/shm.h`
14994 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
14995 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
15006 set d_shmatprototype
15009 : see if shmdt exists
15013 : see how much of the 'shm*(2)' library is present.
15016 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
15017 *"$undef"*) h_shm=false;;
15021 case "`ipcs 2>&1`" in
15022 "SVID shared memory"*"not configured"*)
15023 echo "Your $osname does not have the shm*(2) configured." >&4
15026 set shmctl d_shmctl
15028 set shmget d_shmget
15038 : we could also check for sys/ipc.h ...
15039 if $h_shm && $test `./findhdr sys/shm.h`; then
15040 echo "You have the full shm*(2) library." >&4
15043 echo "You don't have the full shm*(2) library." >&4
15050 : see if we have sigaction
15051 if set sigaction val -f d_sigaction; eval $csym; $val; then
15052 echo 'sigaction() found.' >&4
15053 $cat > try.c <<'EOP'
15055 #include <sys/types.h>
15056 #include <signal.h>
15059 struct sigaction act, oact;
15061 oact.sa_handler = 0;
15062 /* so that act and oact are used */
15063 exit(act.sa_flags == 0 && oact.sa_handler == 0);
15067 if eval $compile_ok; then
15070 echo "But you don't seem to have a useable struct sigaction." >&4
15074 echo 'sigaction NOT found.' >&4
15077 set d_sigaction; eval $setvar
15078 $rm -f try try$_o try.c
15080 : see if sigprocmask exists
15081 set sigprocmask d_sigprocmask
15084 : see if sigsetjmp exists
15086 case "$d_sigsetjmp" in
15088 $cat >try.c <<'EOP'
15089 #include <setjmp.h>
15094 if (sigsetjmp(env,1))
15097 siglongjmp(env, 1);
15102 if eval $compile; then
15103 if $run ./try >/dev/null 2>&1; then
15104 echo "POSIX sigsetjmp found." >&4
15108 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
15114 echo "sigsetjmp not found." >&4
15118 *) val="$d_sigsetjmp"
15119 case "$d_sigsetjmp" in
15120 $define) echo "POSIX sigsetjmp found." >&4;;
15121 $undef) echo "sigsetjmp not found." >&4;;
15129 : see if sockatmark exists
15130 set sockatmark d_sockatmark
15133 : see if prototype for sockatmark is available
15135 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
15138 : see if socks5_init exists
15139 set socks5_init d_socks5_init
15142 : see if srand48_r exists
15143 set srand48_r d_srand48_r
15145 case "$d_srand48_r" in
15147 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15148 case "$d_srand48_r_proto:$usethreads" in
15149 ":define") d_srand48_r_proto=define
15150 set d_srand48_r_proto srand48_r $hdrs
15154 case "$d_srand48_r_proto" in
15156 case "$srand48_r_proto" in
15157 ''|0) try='int srand48_r(long, struct drand48_data*);'
15158 ./protochk "extern $try" $hdrs && srand48_r_proto=I_LS ;;
15160 case "$srand48_r_proto" in
15161 ''|0) d_srand48_r=undef
15163 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
15164 * ) case "$srand48_r_proto" in
15165 REENTRANT_PROTO*) ;;
15166 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
15168 echo "Prototype: $try" ;;
15171 *) case "$usethreads" in
15172 define) echo "srand48_r has no prototype, not using it." >&4 ;;
15179 *) srand48_r_proto=0
15183 : see if srandom_r exists
15184 set srandom_r d_srandom_r
15186 case "$d_srandom_r" in
15188 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15189 case "$d_srandom_r_proto:$usethreads" in
15190 ":define") d_srandom_r_proto=define
15191 set d_srandom_r_proto srandom_r $hdrs
15195 case "$d_srandom_r_proto" in
15197 case "$srandom_r_proto" in
15198 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
15199 ./protochk "extern $try" $hdrs && srandom_r_proto=I_TS ;;
15201 case "$srandom_r_proto" in
15202 ''|0) d_srandom_r=undef
15204 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
15205 * ) case "$srandom_r_proto" in
15206 REENTRANT_PROTO*) ;;
15207 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
15209 echo "Prototype: $try" ;;
15212 *) case "$usethreads" in
15213 define) echo "srandom_r has no prototype, not using it." >&4 ;;
15220 *) srandom_r_proto=0
15224 : see if prototype for setresgid is available
15226 set d_sresgproto setresgid $i_unistd unistd.h
15229 : see if prototype for setresuid is available
15231 set d_sresuproto setresuid $i_unistd unistd.h
15234 : see if sys/stat.h is available
15235 set sys/stat.h i_sysstat
15239 : see if stat knows about block sizes
15241 echo "Checking to see if your struct stat has st_blocks field..." >&4
15242 set d_statblks stat st_blocks $i_sysstat sys/stat.h
15246 : see if this is a sys/vfs.h system
15247 set sys/vfs.h i_sysvfs
15251 : see if this is a sys/statfs.h system
15252 set sys/statfs.h i_sysstatfs
15257 echo "Checking to see if your system supports struct statfs..." >&4
15258 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
15260 case "$d_statfs_s" in
15261 "$define") echo "Yes, it does." ;;
15262 *) echo "No, it doesn't." ;;
15267 : see if struct statfs knows about f_flags
15268 case "$d_statfs_s" in
15271 echo "Checking to see if your struct statfs has f_flags field..." >&4
15272 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
15276 set d_statfs_f_flags
15280 case "$d_statfs_f_flags" in
15281 "$define") echo "Yes, it does." ;;
15282 *) echo "No, it doesn't." ;;
15285 : see if _ptr and _cnt from stdio act std
15288 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
15289 echo "(Looks like you have stdio.h from BSD.)"
15290 case "$stdio_ptr" in
15291 '') stdio_ptr='((fp)->_p)'
15294 *) ptr_lval=$d_stdio_ptr_lval;;
15296 case "$stdio_cnt" in
15297 '') stdio_cnt='((fp)->_r)'
15300 *) cnt_lval=$d_stdio_cnt_lval;;
15302 case "$stdio_base" in
15303 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
15305 case "$stdio_bufsiz" in
15306 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
15308 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
15309 echo "(Looks like you have stdio.h from Linux.)"
15310 case "$stdio_ptr" in
15311 '') stdio_ptr='((fp)->_IO_read_ptr)'
15314 *) ptr_lval=$d_stdio_ptr_lval;;
15316 case "$stdio_cnt" in
15317 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
15320 *) cnt_lval=$d_stdio_cnt_lval;;
15322 case "$stdio_base" in
15323 '') stdio_base='((fp)->_IO_read_base)';;
15325 case "$stdio_bufsiz" in
15326 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
15329 case "$stdio_ptr" in
15330 '') stdio_ptr='((fp)->_ptr)'
15333 *) ptr_lval=$d_stdio_ptr_lval;;
15335 case "$stdio_cnt" in
15336 '') stdio_cnt='((fp)->_cnt)'
15339 *) cnt_lval=$d_stdio_cnt_lval;;
15341 case "$stdio_base" in
15342 '') stdio_base='((fp)->_base)';;
15344 case "$stdio_bufsiz" in
15345 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
15349 : test whether _ptr and _cnt really work
15350 echo "Checking how std your stdio is..." >&4
15353 #define FILE_ptr(fp) $stdio_ptr
15354 #define FILE_cnt(fp) $stdio_cnt
15356 FILE *fp = fopen("try.c", "r");
15359 18 <= FILE_cnt(fp) &&
15360 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15368 if eval $compile && $to try.c; then
15369 if $run ./try; then
15370 echo "Your stdio acts pretty std."
15373 echo "Your stdio isn't very std."
15376 echo "Your stdio doesn't appear very std."
15380 # glibc 2.2.90 and above apparently change stdio streams so Perl's
15381 # direct buffer manipulation no longer works. The Configure tests
15382 # should be changed to correctly detect this, but until then,
15383 # the following check should at least let perl compile and run.
15384 # (This quick fix should be updated before 5.8.1.)
15385 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
15386 # A. Dougherty, June 3, 2002.
15387 case "$d_gnulibc" in
15389 case "$gnulibc_version" in
15393 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
15402 : Can _ptr be used as an lvalue?
15403 case "$d_stdstdio$ptr_lval" in
15404 $define$define) val=$define ;;
15407 set d_stdio_ptr_lval
15410 : Can _cnt be used as an lvalue?
15411 case "$d_stdstdio$cnt_lval" in
15412 $define$define) val=$define ;;
15415 set d_stdio_cnt_lval
15419 : test whether setting _ptr sets _cnt as a side effect
15420 d_stdio_ptr_lval_sets_cnt="$undef"
15421 d_stdio_ptr_lval_nochange_cnt="$undef"
15422 case "$d_stdio_ptr_lval$d_stdstdio" in
15424 echo "Checking to see what happens if we set the stdio ptr..." >&4
15427 /* Can we scream? */
15428 /* Eat dust sed :-) */
15429 /* In the buffer space, no one can hear you scream. */
15430 #define FILE_ptr(fp) $stdio_ptr
15431 #define FILE_cnt(fp) $stdio_cnt
15432 #include <sys/types.h>
15434 FILE *fp = fopen("try.c", "r");
15439 puts("Fail even to read");
15442 c = getc(fp); /* Read away the first # */
15444 puts("Fail even to read");
15448 18 <= FILE_cnt(fp) &&
15449 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
15451 puts("Fail even to read");
15454 ptr = (char*) FILE_ptr(fp);
15455 cnt = (size_t)FILE_cnt(fp);
15457 FILE_ptr(fp) += 42;
15459 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
15460 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
15463 if (FILE_cnt(fp) <= 20) {
15464 printf ("Fail (<20 chars to test)");
15467 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
15468 puts("Fail compare");
15471 if (cnt == FILE_cnt(fp)) {
15472 puts("Pass_unchanged");
15475 if (FILE_cnt(fp) == (cnt - 42)) {
15476 puts("Pass_changed");
15479 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
15485 if eval $compile && $to try.c; then
15486 case `$run ./try` in
15488 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
15489 d_stdio_ptr_lval_sets_cnt="$define" ;;
15491 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
15492 d_stdio_ptr_lval_nochange_cnt="$define" ;;
15494 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
15496 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
15499 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
15505 : see if _base is also standard
15507 case "$d_stdstdio" in
15511 #define FILE_base(fp) $stdio_base
15512 #define FILE_bufsiz(fp) $stdio_bufsiz
15514 FILE *fp = fopen("try.c", "r");
15517 19 <= FILE_bufsiz(fp) &&
15518 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
15525 if eval $compile && $to try.c; then
15526 if $run ./try; then
15527 echo "And its _base field acts std."
15530 echo "But its _base field isn't std."
15533 echo "However, it seems to be lacking the _base field."
15542 Checking how to access stdio streams by file descriptor number...
15544 case "$stdio_stream_array" in
15545 '') $cat >try.c <<EOCP
15548 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
15552 for s in _iob __iob __sF
15554 set try -DSTDIO_STREAM_ARRAY=$s
15555 if eval $compile; then
15556 case "`$run ./try`" in
15557 yes) stdio_stream_array=$s; break ;;
15561 $rm -f try.* try$exe_ext
15563 case "$stdio_stream_array" in
15565 I can't figure out how to access stdio streams by file descriptor number.
15567 d_stdio_stream_array="$undef"
15570 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
15572 d_stdio_stream_array="$define"
15576 : see if strcoll exists
15577 set strcoll d_strcoll
15580 : check for structure copying
15582 echo "Checking to see if your C compiler can copy structs..." >&4
15583 $cat >try.c <<'EOCP'
15593 if $cc -c try.c >/dev/null 2>&1 ; then
15595 echo "Yup, it can."
15598 echo "Nope, it can't."
15604 : see if strerror and/or sys_errlist[] exist
15606 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
15607 if set strerror val -f d_strerror; eval $csym; $val; then
15608 echo 'strerror() found.' >&4
15609 d_strerror="$define"
15610 d_strerrm='strerror(e)'
15611 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15612 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
15613 d_syserrlst="$define"
15615 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
15616 d_syserrlst="$undef"
15618 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
15619 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
15620 echo 'strerror() found in string header.' >&4
15621 d_strerror="$define"
15622 d_strerrm='strerror(e)'
15623 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15624 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
15625 d_syserrlst="$define"
15627 echo "(You don't appear to have any sys_errlist[], how can this be?)"
15628 d_syserrlst="$undef"
15630 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
15631 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
15632 d_strerror="$undef"
15633 d_syserrlst="$define"
15634 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
15636 echo 'strerror() and sys_errlist[] NOT found.' >&4
15637 d_strerror="$undef"
15638 d_syserrlst="$undef"
15639 d_strerrm='"unknown"'
15643 : see if strerror_r exists
15644 set strerror_r d_strerror_r
15646 case "$d_strerror_r" in
15648 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
15649 case "$d_strerror_r_proto:$usethreads" in
15650 ":define") d_strerror_r_proto=define
15651 set d_strerror_r_proto strerror_r $hdrs
15655 case "$d_strerror_r_proto" in
15657 case "$strerror_r_proto" in
15658 ''|0) try='int strerror_r(int, char*, size_t);'
15659 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;;
15661 case "$strerror_r_proto" in
15662 ''|0) try='int strerror_r(int, char*, int);'
15663 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;;
15665 case "$strerror_r_proto" in
15666 ''|0) try='char* strerror_r(int, char*, size_t);'
15667 ./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;;
15669 case "$strerror_r_proto" in
15670 ''|0) d_strerror_r=undef
15672 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
15673 * ) case "$strerror_r_proto" in
15674 REENTRANT_PROTO*) ;;
15675 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
15677 echo "Prototype: $try" ;;
15680 *) case "$usethreads" in
15681 define) echo "strerror_r has no prototype, not using it." >&4 ;;
15688 *) strerror_r_proto=0
15692 : see if strftime exists
15693 set strftime d_strftime
15696 : see if strtod exists
15697 set strtod d_strtod
15700 : see if strtol exists
15701 set strtol d_strtol
15704 : see if strtold exists
15705 set strtold d_strtold
15708 : see if strtoll exists
15709 set strtoll d_strtoll
15712 case "$d_longlong-$d_strtoll" in
15715 Checking whether your strtoll() works okay...
15717 $cat >try.c <<'EOCP'
15720 #define strtoll __strtoll
15723 #define strtoll _strtoll
15726 extern long long int strtoll(char *s, char **, int);
15727 static int bad = 0;
15728 int check(char *s, long long ell, int een) {
15731 gll = strtoll(s, 0, 10);
15732 if (!((gll == ell) && (errno == een)))
15736 check(" 1", 1LL, 0);
15737 check(" 0", 0LL, 0);
15738 check("-1", -1LL, 0);
15739 check("-9223372036854775808", -9223372036854775808LL, 0);
15740 check("-9223372036854775808", -9223372036854775808LL, 0);
15741 check(" 9223372036854775807", 9223372036854775807LL, 0);
15742 check("-9223372036854775808", -9223372036854775808LL, 0);
15743 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
15744 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
15750 if eval $compile; then
15753 ok) echo "Your strtoll() seems to be working okay." ;;
15755 Your strtoll() doesn't seem to be working okay.
15761 echo "(I can't seem to compile the test program--assuming it doesn't)"
15767 : see if strtoq exists
15768 set strtoq d_strtoq
15771 : see if strtoul exists
15772 set strtoul d_strtoul
15775 case "$d_strtoul" in
15778 Checking whether your strtoul() works okay...
15780 $cat >try.c <<'EOCP'
15783 extern unsigned long int strtoul(char *s, char **, int);
15784 static int bad = 0;
15785 void check(char *s, unsigned long eul, int een) {
15788 gul = strtoul(s, 0, 10);
15789 if (!((gul == eul) && (errno == een)))
15793 check(" 1", 1L, 0);
15794 check(" 0", 0L, 0);
15796 case "$longsize" in
15798 $cat >>try.c <<'EOCP'
15799 check("18446744073709551615", 18446744073709551615UL, 0);
15800 check("18446744073709551616", 18446744073709551615UL, ERANGE);
15801 #if 0 /* strtoul() for /^-/ strings is undefined. */
15802 check("-1", 18446744073709551615UL, 0);
15803 check("-18446744073709551614", 2, 0);
15804 check("-18446744073709551615", 1, 0);
15805 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
15806 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
15811 $cat >>try.c <<'EOCP'
15812 check("4294967295", 4294967295UL, 0);
15813 check("4294967296", 4294967295UL, ERANGE);
15814 #if 0 /* strtoul() for /^-/ strings is undefined. */
15815 check("-1", 4294967295UL, 0);
15816 check("-4294967294", 2, 0);
15817 check("-4294967295", 1, 0);
15818 check("-4294967296", 4294967295UL, ERANGE);
15819 check("-4294967297", 4294967295UL, ERANGE);
15824 : Should we write these tests to be more portable by sprintf-ing
15825 : ~0 and then manipulating that char string as input for strtol?
15828 $cat >>try.c <<'EOCP'
15835 if eval $compile; then
15836 case "`$run ./try`" in
15837 ok) echo "Your strtoul() seems to be working okay." ;;
15839 Your strtoul() doesn't seem to be working okay.
15848 : see if strtoull exists
15849 set strtoull d_strtoull
15852 case "$d_longlong-$d_strtoull" in
15855 Checking whether your strtoull() works okay...
15857 $cat >try.c <<'EOCP'
15860 #define strtoull __strtoull
15863 extern unsigned long long int strtoull(char *s, char **, int);
15864 static int bad = 0;
15865 int check(char *s, long long eull, int een) {
15868 gull = strtoull(s, 0, 10);
15869 if (!((gull == eull) && (errno == een)))
15873 check(" 1", 1LL, 0);
15874 check(" 0", 0LL, 0);
15875 check("18446744073709551615", 18446744073709551615ULL, 0);
15876 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
15877 #if 0 /* strtoull() for /^-/ strings is undefined. */
15878 check("-1", 18446744073709551615ULL, 0);
15879 check("-18446744073709551614", 2LL, 0);
15880 check("-18446744073709551615", 1LL, 0);
15881 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
15882 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
15889 if eval $compile; then
15890 case "`$run ./try`" in
15891 ok) echo "Your strtoull() seems to be working okay." ;;
15893 Your strtoull() doesn't seem to be working okay.
15895 d_strtoull="$undef"
15902 : see if strtouq exists
15903 set strtouq d_strtouq
15906 case "$d_strtouq" in
15909 Checking whether your strtouq() works okay...
15911 $cat >try.c <<'EOCP'
15914 extern unsigned long long int strtouq(char *s, char **, int);
15915 static int bad = 0;
15916 void check(char *s, unsigned long long eull, int een) {
15917 unsigned long long gull;
15919 gull = strtouq(s, 0, 10);
15920 if (!((gull == eull) && (errno == een)))
15924 check(" 1", 1LL, 0);
15925 check(" 0", 0LL, 0);
15926 check("18446744073709551615", 18446744073709551615ULL, 0);
15927 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
15928 #if 0 /* strtouq() for /^-/ strings is undefined. */
15929 check("-1", 18446744073709551615ULL, 0);
15930 check("-18446744073709551614", 2LL, 0);
15931 check("-18446744073709551615", 1LL, 0);
15932 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
15933 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
15941 if eval $compile; then
15942 case "`$run ./try`" in
15943 ok) echo "Your strtouq() seems to be working okay." ;;
15945 Your strtouq() doesn't seem to be working okay.
15954 : see if strxfrm exists
15955 set strxfrm d_strxfrm
15958 : see if symlink exists
15959 set symlink d_symlink
15962 : see if syscall exists
15963 set syscall d_syscall
15966 : see if prototype for syscall is available
15968 set d_syscallproto syscall $i_unistd unistd.h
15971 : see if sysconf exists
15972 set sysconf d_sysconf
15975 : see if system exists
15976 set system d_system
15979 : see if tcgetpgrp exists
15980 set tcgetpgrp d_tcgetpgrp
15983 : see if tcsetpgrp exists
15984 set tcsetpgrp d_tcsetpgrp
15987 : see if prototype for telldir is available
15989 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
15992 : see if time exists
15994 if test "X$d_time" = X -o X"$timetype" = X; then
15995 if set time val -f d_time; eval $csym; $val; then
15996 echo 'time() found.' >&4
15998 rp="What is the type returned by time() on this system?"
15999 set time_t timetype long stdio.h sys/types.h
16002 echo 'time() not found, hope that will do.' >&4
16010 : see if this is a sys/times.h system
16011 set sys/times.h i_systimes
16014 : see if times exists
16016 if set times val -f d_times; eval $csym; $val; then
16017 echo 'times() found.' >&4
16020 case "$i_systimes" in
16021 "$define") inc='sys/times.h';;
16023 rp="What is the type returned by times() on this system?"
16024 set clock_t clocktype long stdio.h sys/types.h $inc
16027 echo 'times() NOT found, hope that will do.' >&4
16032 : see if tmpnam_r exists
16033 set tmpnam_r d_tmpnam_r
16035 case "$d_tmpnam_r" in
16037 hdrs="$i_systypes sys/types.h define stdio.h "
16038 case "$d_tmpnam_r_proto:$usethreads" in
16039 ":define") d_tmpnam_r_proto=define
16040 set d_tmpnam_r_proto tmpnam_r $hdrs
16044 case "$d_tmpnam_r_proto" in
16046 case "$tmpnam_r_proto" in
16047 ''|0) try='char* tmpnam_r(char*);'
16048 ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;;
16050 case "$tmpnam_r_proto" in
16051 ''|0) d_tmpnam_r=undef
16053 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
16054 * ) case "$tmpnam_r_proto" in
16055 REENTRANT_PROTO*) ;;
16056 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
16058 echo "Prototype: $try" ;;
16061 *) case "$usethreads" in
16062 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
16069 *) tmpnam_r_proto=0
16073 : see if truncate exists
16074 set truncate d_truncate
16077 : see if ttyname_r exists
16078 set ttyname_r d_ttyname_r
16080 case "$d_ttyname_r" in
16082 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
16083 case "$d_ttyname_r_proto:$usethreads" in
16084 ":define") d_ttyname_r_proto=define
16085 set d_ttyname_r_proto ttyname_r $hdrs
16089 case "$d_ttyname_r_proto" in
16091 case "$ttyname_r_proto" in
16092 ''|0) try='int ttyname_r(int, char*, size_t);'
16093 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;;
16095 case "$ttyname_r_proto" in
16096 ''|0) try='int ttyname_r(int, char*, int);'
16097 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;;
16099 case "$ttyname_r_proto" in
16100 ''|0) try='char* ttyname_r(int, char*, int);'
16101 ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;;
16103 case "$ttyname_r_proto" in
16104 ''|0) d_ttyname_r=undef
16106 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
16107 * ) case "$ttyname_r_proto" in
16108 REENTRANT_PROTO*) ;;
16109 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
16111 echo "Prototype: $try" ;;
16114 *) case "$usethreads" in
16115 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
16122 *) ttyname_r_proto=0
16126 : see if tzname[] exists
16128 if set tzname val -a d_tzname; eval $csym; $val; then
16130 echo 'tzname[] found.' >&4
16133 echo 'tzname[] NOT found.' >&4
16139 next|rhapsody|darwin) multiarch="$define" ;;
16141 case "$multiarch" in
16142 ''|[nN]*) multiarch="$undef" ;;
16145 : check for ordering of bytes in a UV
16147 case "$usecrosscompile$multiarch" in
16150 You seem to be either cross-compiling or doing a multiarchitecture build,
16151 skipping the byteorder check.
16157 case "$byteorder" in
16160 In the following, larger digits indicate more significance. A big-endian
16161 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
16162 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
16163 machines may have weird orders like 3412. A Cray will report 87654321,
16164 an Alpha will report 12345678. If the test program works the default is
16166 I'm now running the test program...
16170 #include <sys/types.h>
16171 typedef $uvtype UV;
16181 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
16183 u.l = (UV)0x04030201;
16184 for (i = 0; i < $uvsize; i++)
16185 printf("%c", u.c[i]+'0');
16192 if eval $compile && ./try > /dev/null; then
16195 [1-4][1-4][1-4][1-4]|12345678|87654321)
16196 echo "(The test program ran ok.)"
16197 echo "byteorder=$dflt"
16200 ????|????????) echo "(The test program ran ok.)" ;;
16201 *) echo "(The test program didn't run right for some reason.)" ;;
16206 (I can't seem to compile the test program. Guessing big-endian...)
16209 case "$xxx_prompt" in
16211 rp="What is the order of bytes in $uvtype?"
16227 Checking to see whether you can access character data unalignedly...
16229 case "$d_u32align" in
16230 '') $cat >try.c <<EOCP
16232 #define U32 $u32type
16233 #define BYTEORDER 0x$byteorder
16235 #include <signal.h>
16237 $signal_t bletch(s) int s; { exit(4); }
16240 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
16245 if (sizeof(U32) != 4) {
16246 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
16253 signal(SIGBUS, bletch);
16265 for (i = 0; i < 4; i++) {
16266 up = (U32*)(buf + i);
16267 if (! ((*up == 1 << (8*i)) || /* big-endian */
16268 (*up == 1 << (8*(3-i))) /* little-endian */
16272 printf("read failed (%x)\n", *up);
16278 for (i = 0; i < 4; i++) {
16279 up = (U32*)(buf + i);
16281 if (*up != 0xBeef) {
16282 printf("write failed (%x)\n", *up);
16296 if eval $compile_ok; then
16297 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
16298 $run ./try 2>&1 >/dev/null
16301 You can access character data pretty unalignedly.
16303 d_u32align="$undef"
16306 It seems that you must access character data in an aligned manner.
16308 d_u32align="$define"
16312 rp='Can you access character data at unaligned addresses?'
16316 [yY]*) d_u32align="$undef" ;;
16317 *) d_u32align="$define" ;;
16320 $rm -f core core.try.* try.core
16324 : see if ualarm exists
16325 set ualarm d_ualarm
16328 : see if umask exists
16332 : see if unordered exists
16333 set unordered d_unordered
16336 : see if usleep exists
16337 set usleep d_usleep
16340 : see if prototype for usleep is available
16342 set d_usleepproto usleep $i_unistd unistd.h
16345 : see if ustat exists
16349 : backward compatibility for d_hvfork
16350 if test X$d_hvfork != X; then
16351 d_vfork="$d_hvfork"
16354 : see if there is a vfork
16359 : Ok, but do we want to use it. vfork is reportedly unreliable in
16360 : perl on Solaris 2.x, and probably elsewhere.
16364 case "$usevfork" in
16370 Perl can only use a vfork() that doesn't suffer from strict
16371 restrictions on calling functions or modifying global data in
16372 the child. For example, glibc-2.1 contains such a vfork()
16373 that is unsuitable. If your system provides a proper fork()
16374 call, chances are that you do NOT want perl to use vfork().
16377 rp="Do you still want to use vfork()?"
16382 echo "Ok, we won't use vfork()."
16391 $define) usevfork='true';;
16392 *) usevfork='false';;
16395 : see if closedir exists
16396 set closedir d_closedir
16399 case "$d_closedir" in
16402 echo "Checking whether closedir() returns a status..." >&4
16404 #$i_dirent I_DIRENT /**/
16405 #$i_sysdir I_SYS_DIR /**/
16406 #$i_sysndir I_SYS_NDIR /**/
16407 #$i_systypes I_SYS_TYPES /**/
16409 #if defined(I_SYS_TYPES)
16410 #include <sys/types.h>
16412 #if defined(I_DIRENT)
16413 #include <dirent.h>
16414 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
16415 #include <sys/dir.h>
16419 #include <sys/ndir.h>
16423 #include <ndir.h> /* may be wrong in the future */
16425 #include <sys/dir.h>
16430 int main() { return closedir(opendir(".")); }
16433 if eval $compile_ok; then
16434 if $run ./try > /dev/null 2>&1 ; then
16435 echo "Yes, it does."
16438 echo "No, it doesn't."
16442 echo "(I can't seem to compile the test program--assuming it doesn't)"
16450 set d_void_closedir
16453 : see if there is a wait4
16457 : see if waitpid exists
16458 set waitpid d_waitpid
16461 : see if wcstombs exists
16462 set wcstombs d_wcstombs
16465 : see if wctomb exists
16466 set wctomb d_wctomb
16469 : see if writev exists
16470 set writev d_writev
16473 : preserve RCS keywords in files with variable substitution, grrr
16478 Revision='$Revision'
16480 : check for alignment requirements
16482 case "$usecrosscompile$multiarch" in
16485 You seem to be either cross-compiling or doing a multiarchitecture build,
16486 skipping the memory alignment check.
16489 case "$alignbytes" in
16490 '') alignbytes=8 ;;
16494 case "$alignbytes" in
16495 '') echo "Checking alignment constraints..." >&4
16496 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
16497 $cat >try.c <<'EOCP'
16498 typedef long double NV;
16501 $cat >try.c <<'EOCP'
16505 $cat >>try.c <<'EOCP'
16513 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
16518 if eval $compile_ok; then
16522 echo "(I can't seem to compile the test program...)"
16525 *) dflt="$alignbytes"
16528 rp="Doubles must be aligned on a how-many-byte boundary?"
16536 : set the base revision
16539 : how do we catenate cpp tokens here?
16541 echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
16542 $cat >cpp_stuff.c <<'EOCP'
16543 #define RCAT(a,b)a/**/b
16544 #define ACAT(a,b)a ## b
16548 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
16549 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
16550 echo "Oh! Smells like ANSI's been here." >&4
16551 echo "We can catify or stringify, separately or together!"
16553 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
16554 echo "Ah, yes! The good old days!" >&4
16555 echo "However, in the good old days we don't know how to stringify and"
16556 echo "catify at the same time."
16560 Hmm, I don't seem to be able to catenate tokens with your cpp. You're going
16561 to have to edit the values of CAT[2-5] in config.h...
16563 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
16567 : see if this is a db.h system
16573 : Check db version.
16575 echo "Checking Berkeley DB version ..." >&4
16581 #include <sys/types.h>
16584 int main(int argc, char *argv[])
16586 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
16587 int Major, Minor, Patch ;
16588 unsigned long Version ;
16589 (void)db_version(&Major, &Minor, &Patch) ;
16591 printf("%d %d %d %d %d %d\n",
16592 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
16593 Major, Minor, Patch);
16596 printf("You have Berkeley DB Version 2 or greater.\n");
16598 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
16599 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
16600 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
16601 Major, Minor, Patch) ;
16603 /* check that db.h & libdb are compatible */
16604 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
16605 printf("db.h and libdb are incompatible.\n") ;
16609 printf("db.h and libdb are compatible.\n") ;
16611 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
16612 + DB_VERSION_PATCH ;
16614 /* needs to be >= 2.3.4 */
16615 if (Version < 2003004) {
16616 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
16617 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
16623 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
16628 printf("You have Berkeley DB Version 1.\n");
16629 exit(0); /* DB version < 2: the coast is clear. */
16631 exit(1); /* <db.h> not Berkeley DB? */
16637 if eval $compile_ok && $run ./try; then
16638 echo 'Looks OK.' >&4
16640 db_version_major=$1
16641 db_version_minor=$2
16642 db_version_patch=$3
16644 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
16648 : Remove db from list of libraries to use
16649 echo "Removing unusable -ldb from library list" >&4
16650 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
16653 echo "libs = $libs" >&4
16663 : Check the return type needed for hash
16665 echo "Checking return type needed for hash for Berkeley DB ..." >&4
16671 #include <sys/types.h>
16674 #ifndef DB_VERSION_MAJOR
16675 u_int32_t hash_cb (ptr, size)
16683 info.hash = hash_cb;
16687 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16688 if $contains warning try.out >>/dev/null 2>&1 ; then
16691 db_hashtype='u_int32_t'
16694 : XXX Maybe we should just give up here.
16695 db_hashtype=u_int32_t
16697 echo "Help: I can't seem to compile the db test program." >&4
16698 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
16701 echo "Your version of Berkeley DB uses $db_hashtype for hash."
16703 *) db_hashtype=u_int32_t
16708 : Check the return type needed for prefix
16710 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
16716 #include <sys/types.h>
16719 #ifndef DB_VERSION_MAJOR
16720 size_t prefix_cb (key1, key2)
16728 info.prefix = prefix_cb;
16732 if $cc $ccflags -c try.c >try.out 2>&1 ; then
16733 if $contains warning try.out >>/dev/null 2>&1 ; then
16734 db_prefixtype='int'
16736 db_prefixtype='size_t'
16739 db_prefixtype='size_t'
16740 : XXX Maybe we should just give up here.
16742 echo "Help: I can't seem to compile the db test program." >&4
16743 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
16746 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
16748 *) db_prefixtype='size_t'
16753 : How can we generate normalized random numbers ?
16755 echo "Looking for a random number function..." >&4
16756 case "$randfunc" in
16758 if set drand48 val -f; eval $csym; $val; then
16760 echo "Good, found drand48()." >&4
16761 elif set random val -f; eval $csym; $val; then
16763 echo "OK, found random()." >&4
16766 echo "Yick, looks like I have to use rand()." >&4
16777 *-Dmy_rand=*|*-Dmy_srand=*)
16778 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
16779 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
16780 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
16781 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
16785 while $test "$cont"; do
16786 rp="Use which function to generate random numbers?"
16788 if $test "$ans" = "$dflt"; then
16794 if set $ans val -f; eval $csym; $val; then
16798 rp="I cannot find function $ans. Use that name anyway?"
16807 case "$randfunc" in
16809 drand01="drand48()"
16815 case "$randbits" in
16817 echo "Checking to see how many bits your $randfunc() function produces..." >&4
16819 #$i_unistd I_UNISTD
16820 #$i_stdlib I_STDLIB
16823 # include <unistd.h>
16826 # include <stdlib.h>
16831 register unsigned long tmp;
16832 register unsigned long max = 0L;
16834 for (i = 1000; i; i--) {
16835 tmp = (unsigned long) $randfunc();
16836 if (tmp > max) max = tmp;
16838 for (i = 0; max; i++)
16844 if eval $compile_ok; then
16848 echo "(I can't seem to compile the test program...)"
16855 rp="How many bits does your $randfunc() function produce?"
16859 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
16860 seedfunc="s$randfunc"
16861 randseedtype=unsigned
16865 rp="How many bits does your $randfunc() function produce?"
16868 seedfunc="s$randfunc"
16869 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
16870 if set $seedfunc val -f; eval $csym; $val; then
16871 echo "(Using $seedfunc() to seed random generator)"
16873 echo "(Warning: no $seedfunc() to seed random generator)"
16876 randseedtype=unsigned
16884 echo "Determining whether or not we are on an EBCDIC system..." >&4
16885 $cat >try.c <<'EOM'
16888 if ('M'==0xd4) return 0;
16895 if eval $compile_ok; then
16896 if $run ./try; then
16897 echo "You seem to speak EBCDIC." >&4
16900 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
16903 echo "I'm unable to compile the test program." >&4
16904 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
16912 Checking how to flush all pending stdio output...
16914 # I only know how to find the first 32 possibly open files on SunOS.
16915 # See also hints/sunos_4_1.sh and util.c --AD
16917 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
16919 $cat >>try.c <<EOCP
16921 #$i_unistd I_UNISTD
16923 # include <unistd.h>
16925 #$d_sysconf HAS_SYSCONF
16926 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
16927 #ifdef HAS_STDIO_STREAM_ARRAY
16928 # define STDIO_STREAM_ARRAY $stdio_stream_array
16933 p = fopen("try.out", "w");
16937 # ifdef TRY_FPRINTF
16941 #ifdef TRY_FFLUSH_NULL
16944 #ifdef TRY_FFLUSH_ALL
16946 long open_max = -1;
16947 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
16948 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
16950 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
16951 open_max = sysconf(_SC_OPEN_MAX);
16954 open_max = FOPEN_MAX;
16957 open_max = OPEN_MAX;
16966 # ifdef HAS_STDIO_STREAM_ARRAY
16967 if (open_max > 0) {
16969 for (i = 0; i < open_max; i++)
16970 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
16971 STDIO_STREAM_ARRAY[i]._file < open_max &&
16972 STDIO_STREAM_ARRAY[i]._flag)
16973 fflush(&STDIO_STREAM_ARRAY[i]);
16981 : first we have to find out how _not_ to flush
16983 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
16985 set try -DTRY_FPUTC
16986 if eval $compile; then
16987 $run ./try 2>/dev/null
16990 if $test ! -s try.out -a "X$code" = X42; then
16996 set try -DTRY_FPRINTF
16997 if eval $compile; then
16998 $run ./try 2>/dev/null
17001 if $test ! -s try.out -a "X$code" = X42; then
17002 output=-DTRY_FPRINTF
17008 : check for fflush NULL behaviour
17009 case "$fflushNULL" in
17010 '') set try -DTRY_FFLUSH_NULL $output
17011 if eval $compile; then
17012 $run ./try 2>/dev/null
17015 if $test -s try.out -a "X$code" = X42; then
17016 fflushNULL="`$cat try.out`"
17018 if $test "X$code" != X42; then
17020 (If this test failed, don't worry, we'll try another method shortly.)
17025 $rm -f core try.core core.try.*
17026 case "$fflushNULL" in
17028 Your fflush(NULL) works okay for output streams.
17029 Let's see if it clobbers input pipes...
17031 # As of mid-March 2000 all versions of Solaris appear to have a stdio
17032 # bug that improperly flushes the input end of pipes. So we avoid the
17033 # autoflush on fork/system/exec support for now. :-(
17034 $cat >tryp.c <<EOCP
17037 main(int argc, char **argv)
17043 while ((i = getc(stdin)) != -1
17044 && (*bp++ = i) != '\n'
17045 && bp < &buf[1024])
17048 fprintf(stdout, "%s", buf);
17056 fflushNULL="$define"
17058 if eval $compile; then
17060 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
17061 if cmp tryp.c tryp.out >/dev/null 2>&1; then
17063 fflush(NULL) seems to behave okay with input streams.
17065 fflushNULL="$define"
17068 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
17070 fflushNULL="$undef"
17073 $rm -f core tryp.c tryp.core core.tryp.*
17076 Your fflush(NULL) isn't working (contrary to ANSI C).
17078 fflushNULL="$undef"
17081 Cannot figure out whether your fflush(NULL) works or not.
17082 I'm assuming it doesn't (contrary to ANSI C).
17084 fflushNULL="$undef"
17088 $define|true|[yY]*)
17089 fflushNULL="$define"
17092 fflushNULL="$undef"
17095 : check explicit looping only if NULL did not work, and if the pipe
17096 : bug does not show up on an explicit flush too
17097 case "$fflushNULL" in
17099 $cat >tryp.c <<EOCP
17102 main(int argc, char **argv)
17108 while ((i = getc(stdin)) != -1
17109 && (*bp++ = i) != '\n'
17110 && bp < &buf[1024])
17113 fprintf(stdout, "%s", buf);
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 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
17129 : now check for fflushall behaviour
17130 case "$fflushall" in
17131 '') set try -DTRY_FFLUSH_ALL $output
17132 if eval $compile; then
17134 (Now testing the other method--but note that this also may fail.)
17136 $run ./try 2>/dev/null
17139 if $test -s try.out -a "X$code" = X42; then
17140 fflushall="`$cat try.out`"
17143 $rm -f core try.core core.try.*
17144 case "$fflushall" in
17146 Whew. Flushing explicitly all the stdio streams works.
17148 fflushall="$define"
17151 Sigh. Flushing explicitly all the stdio streams doesn't work.
17156 Cannot figure out whether flushing stdio streams explicitly works or not.
17157 I'm assuming it doesn't.
17163 "$define"|true|[yY]*)
17164 fflushall="$define"
17172 All is futile. Even fflush(stdin) clobbers input pipes!
17179 $rm -f core tryp.c tryp.core core.tryp.*
17181 *) fflushall="$undef"
17185 case "$fflushNULL$fflushall" in
17188 OK, I give up. I cannot figure out how to flush pending stdio output.
17189 We won't be flushing handles at all before fork/exec/popen.
17193 $rm -f try.* try$exe_ext
17195 : Store the full pathname to the ar program for use in the C program
17196 : Respect a hint or command line value for full_ar.
17201 : Store the full pathname to the sed program for use in the C program
17204 : see what type gids are declared as in the kernel
17206 echo "Looking for the type for group ids returned by getgid()."
17207 set gid_t gidtype xxx stdio.h sys/types.h
17211 xxx=`./findhdr sys/user.h`
17212 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
17214 unsigned) dflt="$1 $2" ;;
17218 *) dflt="$gidtype";;
17221 gid_t) echo "gid_t found." ;;
17222 *) rp="What is the type for group ids returned by getgid()?"
17230 *_t) zzz="$gidtype" ;;
17233 echo "Checking the size of $zzz..." >&4
17235 #include <sys/types.h>
17238 printf("%d\n", (int)sizeof($gidtype));
17243 if eval $compile_ok; then
17247 echo "(I can't execute the test program--guessing $gidsize.)" >&4
17250 echo "Your $zzz is $gidsize bytes long."
17255 echo "(I can't compile the test program--guessing $gidsize.)" >&4
17261 *_t) zzz="$gidtype" ;;
17264 echo "Checking the sign of $zzz..." >&4
17266 #include <sys/types.h>
17277 if eval $compile; then
17281 echo "(I can't execute the test program--guessing unsigned.)" >&4
17285 1) echo "Your $zzz is unsigned." ;;
17286 -1) echo "Your $zzz is signed." ;;
17292 echo "(I can't compile the test program--guessing unsigned.)" >&4
17298 if $test X"$quadtype" != X; then
17300 echo "Checking how to print 64-bit integers..." >&4
17302 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
17303 $cat >try.c <<'EOCP'
17304 #include <sys/types.h>
17307 int q = 12345678901;
17308 printf("%ld\n", q);
17312 if eval $compile; then
17316 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
17317 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
17318 echo "We will use %d."
17324 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
17325 $cat >try.c <<'EOCP'
17326 #include <sys/types.h>
17329 long q = 12345678901;
17330 printf("%ld\n", q);
17334 if eval $compile; then
17338 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
17339 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
17340 echo "We will use %ld."
17346 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
17347 $cat >try.c <<'EOCP'
17348 #include <sys/types.h>
17349 #include <inttypes.h>
17352 int64_t q = 12345678901;
17353 printf("%" PRId64 "\n", q);
17357 if eval $compile; then
17361 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
17362 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
17363 echo "We will use the C9X style."
17369 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17371 #include <sys/types.h>
17374 $quadtype q = 12345678901;
17375 printf("%Ld\n", q);
17379 if eval $compile; then
17383 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
17384 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
17385 echo "We will use %Ld."
17391 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
17392 $cat >try.c <<'EOCP'
17393 #include <sys/types.h>
17396 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
17397 printf("%lld\n", q);
17401 if eval $compile; then
17405 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
17406 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
17407 echo "We will use the %lld style."
17413 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
17415 #include <sys/types.h>
17418 $quadtype q = 12345678901;
17419 printf("%qd\n", q);
17423 if eval $compile; then
17427 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
17428 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
17429 echo "We will use %qd."
17435 if $test X"$sPRId64" = X; then
17436 echo "Cannot figure out how to print 64-bit integers." >&4
17444 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
17445 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
17447 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
17448 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
17454 $echo "Checking the format strings to be used for Perl's internal types..." >&4
17456 if $test X"$ivsize" = X8; then
17457 ivdformat="$sPRId64"
17458 uvuformat="$sPRIu64"
17459 uvoformat="$sPRIo64"
17460 uvxformat="$sPRIx64"
17461 uvXUformat="$sPRIXU64"
17463 if $test X"$ivsize" = X"$longsize"; then
17470 if $test X"$ivsize" = X"$intsize"; then
17478 if $test X"$ivsize" = X"$shortsize"; then
17489 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
17490 nveformat="$sPRIeldbl"
17491 nvfformat="$sPRIfldbl"
17492 nvgformat="$sPRIgldbl"
17493 nvEUformat="$sPRIEUldbl"
17494 nvFUformat="$sPRIFUldbl"
17495 nvGUformat="$sPRIGUldbl"
17505 case "$ivdformat" in
17506 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
17513 $echo "Checking the format string to be used for gids..." >&4
17516 -1) if $test X"$gidsize" = X"$ivsize"; then
17517 gidformat="$ivdformat"
17519 if $test X"$gidsize" = X"$longsize"; then
17522 if $test X"$gidsize" = X"$intsize"; then
17525 if $test X"$gidsize" = X"$shortsize"; then
17532 *) if $test X"$gidsize" = X"$uvsize"; then
17533 gidformat="$uvuformat"
17535 if $test X"$gidsize" = X"$longsize"; then
17538 if $test X"$gidsize" = X"$intsize"; then
17541 if $test X"$gidsize" = X"$shortsize"; then
17550 : see if getgroups exists
17551 set getgroups d_getgrps
17554 : see if setgroups exists
17555 set setgroups d_setgrps
17559 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
17561 case "$d_getgrps$d_setgrps" in
17563 case "$groupstype" in
17564 '') dflt="$gidtype" ;;
17565 *) dflt="$groupstype" ;;
17568 What type of pointer is the second argument to getgroups() and setgroups()?
17569 Usually this is the same as group ids, $gidtype, but not always.
17572 rp='What type pointer is the second argument to getgroups() and setgroups()?'
17576 *) groupstype="$gidtype";;
17580 echo "Checking if your $make program sets \$(MAKE)..." >&4
17581 case "$make_set_make" in
17583 $sed 's/^X //' > testmake.mak << 'EOF'
17585 X @echo 'maketemp="$(MAKE)"'
17587 case "`$make -f testmake.mak 2>/dev/null`" in
17588 *maketemp=*) make_set_make='#' ;;
17589 *) make_set_make="MAKE=$make" ;;
17591 $rm -f testmake.mak
17594 case "$make_set_make" in
17595 '#') echo "Yup, it does.";;
17596 *) echo "Nope, it doesn't.";;
17599 : see what type is used for mode_t
17600 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
17601 set mode_t modetype int stdio.h sys/types.h
17604 : see if stdarg is available
17606 if $test `./findhdr stdarg.h`; then
17607 echo "<stdarg.h> found." >&4
17610 echo "<stdarg.h> NOT found." >&4
17614 : see if varags is available
17616 if $test `./findhdr varargs.h`; then
17617 echo "<varargs.h> found." >&4
17619 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
17622 : set up the varargs testing programs
17623 $cat > varargs.c <<EOP
17625 #include <stdarg.h>
17628 #include <varargs.h>
17632 int f(char *p, ...)
17646 p = va_arg(ap, char *);
17651 $cat > varargs <<EOP
17653 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
17662 : now check which varargs header should be included
17667 if `./varargs I_STDARG`; then
17669 elif `./varargs I_VARARGS`; then
17674 if `./varargs I_VARARGS`; then
17681 echo "I could not find the definition for va_dcl... You have problems..." >&4
17682 val="$undef"; set i_stdarg; eval $setvar
17683 val="$undef"; set i_varargs; eval $setvar
17688 case "$i_varhdr" in
17690 val="$define"; set i_stdarg; eval $setvar
17691 val="$undef"; set i_varargs; eval $setvar
17694 val="$undef"; set i_stdarg; eval $setvar
17695 val="$define"; set i_varargs; eval $setvar
17698 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
17702 : see if we need va_copy
17704 case "$i_stdarg" in
17707 #include <stdarg.h>
17709 #$i_stdlib I_STDLIB
17711 #include <stdlib.h>
17713 #include <signal.h>
17716 ivfprintf(FILE *f, const char *fmt, va_list *valp)
17718 return vfprintf(f, fmt, *valp);
17722 myvfprintf(FILE *f, const char *fmt, va_list val)
17724 return ivfprintf(f, fmt, &val);
17728 myprintf(char *fmt, ...)
17731 va_start(val, fmt);
17732 return myvfprintf(stdout, fmt, val);
17736 main(int ac, char **av)
17738 signal(SIGSEGV, exit);
17740 myprintf("%s%cs all right, then\n", "that", '\'');
17745 if eval $compile && $run ./try 2>&1 >/dev/null; then
17746 case "`$run ./try`" in
17747 "that's all right, then")
17753 yes) echo "It seems that you don't need va_copy()." >&4
17754 need_va_copy="$undef"
17756 *) echo "It seems that va_copy() or similar will be needed." >&4
17757 need_va_copy="$define"
17760 $rm -f try.* core core.* *.core *.core.*
17762 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
17766 : see what type is used for size_t
17767 rp="What is the type used for the length parameter for string functions?"
17768 set size_t sizetype 'unsigned int' stdio.h sys/types.h
17771 : check for type of arguments to gethostbyaddr.
17772 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
17773 case "$d_gethbyaddr" in
17777 Checking to see what type of arguments are accepted by gethostbyaddr().
17779 hdrs="$define sys/types.h
17780 $d_socket sys/socket.h
17781 $i_niin netinet/in.h
17783 $i_unistd unistd.h"
17784 : The first arg can 'char *' or 'void *'
17785 : The second arg is some of integral type
17786 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
17787 for yyy in size_t long int; do
17788 case "$netdb_host_type" in
17789 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
17790 if ./protochk "$try" $hdrs; then
17791 echo "Your system accepts $xxx for the first arg."
17792 echo "...and $yyy for the second arg."
17793 netdb_host_type="$xxx"
17794 netdb_hlen_type="$yyy"
17800 : In case none of those worked, prompt the user.
17801 case "$netdb_host_type" in
17802 '') rp='What is the type for the 1st argument to gethostbyaddr?'
17805 netdb_host_type=$ans
17806 rp='What is the type for the 2nd argument to gethostbyaddr?'
17809 netdb_hlen_type=$ans
17813 *) : no gethostbyaddr, so pick harmless defaults
17814 netdb_host_type='char *'
17815 netdb_hlen_type="$sizetype"
17818 # Remove the "const" if needed. -- but then we'll have a
17820 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
17823 : check for type of argument to gethostbyname.
17824 if test "X$netdb_name_type" = X ; then
17825 case "$d_gethbyname" in
17829 Checking to see what type of argument is accepted by gethostbyname().
17831 hdrs="$define sys/types.h
17832 $d_socket sys/socket.h
17833 $i_niin netinet/in.h
17835 $i_unistd unistd.h"
17836 for xxx in "const char *" "char *"; do
17837 case "$netdb_name_type" in
17838 '') try="extern struct hostent *gethostbyname($xxx);"
17839 if ./protochk "$try" $hdrs; then
17840 echo "Your system accepts $xxx."
17841 netdb_name_type="$xxx"
17846 : In case none of those worked, prompt the user.
17847 case "$netdb_name_type" in
17848 '') rp='What is the type for the 1st argument to gethostbyname?'
17851 netdb_name_type=$ans
17855 *) : no gethostbyname, so pick harmless default
17856 netdb_name_type='char *'
17861 : check for type of 1st argument to getnetbyaddr.
17862 if test "X$netdb_net_type" = X ; then
17863 case "$d_getnbyaddr" in
17867 Checking to see what type of 1st argument is accepted by getnetbyaddr().
17869 hdrs="$define sys/types.h
17870 $d_socket sys/socket.h
17871 $i_niin netinet/in.h
17873 $i_unistd unistd.h"
17874 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
17875 case "$netdb_net_type" in
17876 '') try="extern struct netent *getnetbyaddr($xxx, int);"
17877 if ./protochk "$try" $hdrs; then
17878 echo "Your system accepts $xxx."
17879 netdb_net_type="$xxx"
17884 : In case none of those worked, prompt the user.
17885 case "$netdb_net_type" in
17886 '') rp='What is the type for the 1st argument to getnetbyaddr?'
17889 netdb_net_type=$ans
17893 *) : no getnetbyaddr, so pick harmless default
17894 netdb_net_type='long'
17898 : locate the preferred pager for this system
17905 [a-zA-Z]:/*) dflt=$pg;;
17909 [a-zA-Z]:/*) dflt=$more;;
17913 [a-zA-Z]:/*) dflt=$less;;
17916 '') dflt=/usr/ucb/more;;
17920 : Instruct ./getfile to trust the hinted or previous pager value,
17921 : even if it does not begin with a slash. For example, on os2,
17922 : pager might be cmd /c more. See comments in UU/getfile.
17927 rp='What pager is used on your system?'
17931 : see what type pids are declared as in the kernel
17932 rp="What is the type of process ids on this system?"
17933 set pid_t pidtype int stdio.h sys/types.h
17936 : Find earliest binary compatible site_perl subdirectory perl can use.
17937 xs_apiversion=$version # The current site_perl version.
17938 : Find earliest pure perl site_perl subdirectory perl can use.
17939 : The versioned directories started at 5.005.
17940 pm_apiversion='5.005'
17942 : see if ar generates random libraries by itself
17944 echo "Checking how to generate random libraries on your machine..." >&4
17945 echo 'int bar1() { return bar2(); }' > bar1.c
17946 echo 'int bar2() { return 2; }' > bar2.c
17947 $cat > foo.c <<'EOP'
17948 int main() { printf("%d\n", bar1()); exit(0); }
17950 $cc $ccflags -c bar1.c >/dev/null 2>&1
17951 $cc $ccflags -c bar2.c >/dev/null 2>&1
17952 $cc $ccflags -c foo.c >/dev/null 2>&1
17953 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
17954 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
17955 $run ./foobar >/dev/null 2>&1; then
17956 echo "$ar appears to generate random libraries itself."
17959 elif $ar ts bar$_a >/dev/null 2>&1 &&
17960 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
17961 $run ./foobar >/dev/null 2>&1; then
17962 echo "a table of contents needs to be added with '$ar ts'."
17969 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
17970 $test -f $ranlib || ranlib=''
17973 if $test -n "$ranlib"; then
17974 echo "your system has '$ranlib'; we'll use that."
17977 echo "your system doesn't seem to support random libraries"
17978 echo "so we'll use lorder and tsort to order the libraries."
17985 : check for type of arguments to select.
17986 case "$selecttype" in
17987 '') case "$d_select" in
17991 Checking to see what type of arguments are accepted by select().
17993 hdrs="$define sys/types.h
17994 $i_systime sys/time.h
17995 $i_sysselct sys/select.h
17996 $d_socket sys/socket.h"
17997 : The first arg can be int, unsigned, or size_t
17998 : The last arg may or may not be 'const'
18000 : void pointer has been seen but using that
18001 : breaks the selectminbits test
18002 for xxx in 'fd_set *' 'int *'; do
18003 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
18004 for tmo in 'struct timeval *' 'const struct timeval *'; do
18006 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
18007 if ./protochk "$try" $hdrs; then
18008 echo "Your system accepts $xxx."
18017 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
18018 case "$d_fd_set" in
18019 $define) dflt="fd_set *" ;;
18028 *) : no select, so pick a harmless default
18035 : check for the select 'width'
18036 case "$selectminbits" in
18037 '') case "$d_select" in
18041 Checking to see on how many bits at a time your select() operates...
18044 #include <sys/types.h>
18046 #$i_systime I_SYS_TIME
18047 #$i_systimek I_SYS_TIME_KERNEL
18052 # ifdef I_SYS_TIME_KERNEL
18055 # include <sys/time.h>
18056 # ifdef I_SYS_TIME_KERNEL
18060 #$i_sysselct I_SYS_SELECT
18061 #ifdef I_SYS_SELECT
18062 #include <sys/select.h>
18064 #$d_socket HAS_SOCKET
18066 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
18070 #define S sizeof(*(b))
18072 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
18073 #define NBITS (NBYTES * 8)
18082 fp = fopen("try.c", "r");
18088 b = ($selecttype)s;
18089 for (i = 0; i < NBITS; i++)
18093 select(fd + 1, b, 0, 0, &t);
18094 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
18095 printf("%d\n", i + 1);
18100 if eval $compile_ok; then
18101 selectminbits=`$run ./try`
18102 case "$selectminbits" in
18104 Cannot figure out on how many bits at a time your select() operates.
18105 I'll play safe and guess it is 32 bits.
18111 *) bits="$selectminbits bits" ;;
18113 echo "Your select() operates on $bits at a time." >&4
18115 rp='What is the minimum number of bits your select() operates on?'
18116 case "$byteorder" in
18117 1234|12345678) dflt=32 ;;
18122 selectminbits="$val"
18126 *) : no select, so pick a harmless default
18133 : Trace out the files included by signal.h, then look for SIGxxx names.
18134 : Remove SIGARRAYSIZE used by HPUX.
18135 : Remove SIGSTKSIZE used by Linux.
18136 : Remove SIGSTKSZ used by Posix.
18137 : Remove SIGTYP void lines used by OS2.
18138 : Some cpps, like os390, dont give the file name anywhere
18139 if [ "X$fieldn" = X ]; then
18140 : Just make some guesses. We check them later.
18141 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
18143 xxx=`echo '#include <signal.h>' |
18144 $cppstdin $cppminus $cppflags 2>/dev/null |
18145 $grep '^[ ]*#.*include' |
18146 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
18148 : Check this list of files to be sure we have parsed the cpp output ok.
18149 : This will also avoid potentially non-existent files, such
18152 for xx in $xxx /dev/null ; do
18153 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
18155 : If we have found no files, at least try signal.h
18156 case "$xxxfiles" in
18157 '') xxxfiles=`./findhdr signal.h` ;;
18160 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
18161 print substr($2, 4, 20)
18163 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
18164 print substr($3, 4, 20)
18166 : Append some common names just in case the awk scan failed.
18167 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
18168 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
18169 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
18170 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
18171 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
18173 : generate a few handy files for later
18174 $cat > signal.c <<'EOCP'
18175 #include <sys/types.h>
18176 #include <signal.h>
18180 /* Strange style to avoid deeply-nested #if/#else/#endif */
18183 # define NSIG (_NSIG)
18189 # define NSIG (SIGMAX+1)
18195 # define NSIG (SIG_MAX+1)
18201 # define NSIG (MAXSIG+1)
18207 # define NSIG (MAX_SIG+1)
18212 # ifdef SIGARRAYSIZE
18213 # define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
18219 # define NSIG (_sys_nsig) /* Solaris 2.5 */
18223 /* Default to some arbitrary number that's big enough to get most
18224 of the common signals.
18230 printf("NSIG %d\n", NSIG);
18236 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
18238 printf "#ifdef SIG"; printf $1; printf "\n"
18239 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
18240 printf $1; printf ");\n"
18244 printf "#endif /* JUST_NSIG */\n";
18245 printf "exit(0);\n}\n";
18248 $cat >signal.awk <<'EOP'
18249 BEGIN { ndups = 0 }
18250 $1 ~ /^NSIG$/ { nsig = $2 }
18251 ($1 !~ /^NSIG$/) && (NF == 2) {
18252 if ($2 > maxsig) { maxsig = $2 }
18253 if (sig_name[$2]) {
18254 dup_name[ndups] = $1
18255 dup_num[ndups] = $2
18267 printf("NSIG %d\n", nsig);
18268 for (n = 1; n < nsig; n++) {
18270 printf("%s %d\n", sig_name[n], sig_num[n])
18273 printf("NUM%d %d\n", n, n)
18276 for (n = 0; n < ndups; n++) {
18277 printf("%s %d\n", dup_name[n], dup_num[n])
18281 $cat >signal_cmd <<EOS
18283 if $test -s signal.lst; then
18284 echo "Using your existing signal.lst file"
18289 $cat >>signal_cmd <<'EOS'
18292 if eval $compile_ok; then
18293 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst
18295 echo "(I can't seem be able to compile the whole test program)" >&4
18296 echo "(I'll try it in little pieces.)" >&4
18297 set signal -DJUST_NSIG
18298 if eval $compile_ok; then
18299 $run ./signal$_exe > signal.nsg
18302 echo "I can't seem to figure out how many signals you have." >&4
18303 echo "Guessing 50." >&4
18304 echo 'NSIG 50' > signal.nsg
18306 : Now look at all the signal names, one at a time.
18307 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
18308 $cat > signal.c <<EOCP
18309 #include <sys/types.h>
18310 #include <signal.h>
18313 printf("$xx %d\n", SIG${xx});
18318 if eval $compile; then
18319 echo "SIG${xx} found."
18320 $run ./signal$_exe >> signal.ls1
18322 echo "SIG${xx} NOT found."
18325 if $test -s signal.ls1; then
18326 $cat signal.nsg signal.ls1 |
18327 $sort -n | $uniq | $awk -f signal.awk >signal.lst
18331 if $test -s signal.lst; then
18334 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
18335 echo 'kill -l' >signal
18336 set X `csh -f <signal`
18340 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
18342 echo $@ | $tr ' ' $trnl | \
18343 $awk '{ printf "%s %d\n", $1, ++s; }
18344 END { printf "NSIG %d\n", ++s }' >signal.lst
18346 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
18348 chmod a+x signal_cmd
18349 $eunicefix signal_cmd
18351 : generate list of signal names
18353 case "$sig_name_init" in
18355 *) case "$sig_num_init" in
18356 ''|*,*) doinit=yes ;;
18361 echo "Generating a list of signal names and numbers..." >&4
18363 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
18364 sig_name=`$awk 'BEGIN { printf "ZERO " }
18365 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
18366 sig_num=`$awk 'BEGIN { printf "0 " }
18367 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
18368 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
18369 !/^NSIG/ { printf "\"%s\", ", $1 }
18370 END { printf "0\n" }' signal.lst`
18371 sig_num_init=`$awk 'BEGIN { printf "0, " }
18372 !/^NSIG/ { printf "%d, ", $2}
18373 END { printf "0\n"}' signal.lst`
18376 echo "The following $sig_count signals are available:"
18378 echo $sig_name | $awk \
18379 'BEGIN { linelen = 0 }
18381 for (i = 1; i <= NF; i++) {
18382 name = "SIG" $i " "
18383 linelen = linelen + length(name)
18384 if (linelen > 70) {
18386 linelen = length(name)
18392 sig_size=`echo $sig_name | awk '{print NF}'`
18393 $rm -f signal signal.c signal.awk signal.lst signal_cmd
18396 case "$sizetype" in
18397 *_t) zzz="$sizetype" ;;
18398 *) zzz="filesize" ;;
18400 echo "Checking the size of $zzz..." >&4
18402 #include <sys/types.h>
18405 printf("%d\n", (int)sizeof($sizetype));
18410 if eval $compile_ok; then
18414 echo "(I can't execute the test program--guessing $sizesize.)" >&4
18417 echo "Your $zzz size is $sizesize bytes."
18422 echo "(I can't compile the test program--guessing $sizesize.)" >&4
18426 : check for socklen_t
18428 echo "Checking to see if you have socklen_t..." >&4
18430 #include <sys/types.h>
18431 #$d_socket HAS_SOCKET
18433 #include <sys/socket.h>
18435 int main() { socklen_t x = 16; }
18438 if eval $compile; then
18440 echo "You have socklen_t."
18443 echo "You do not have socklen_t."
18444 case "$sizetype" in
18445 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
18452 : see if this is a socks.h system
18453 set socks.h i_socks
18456 : check for type of the size argument to socket calls
18457 case "$d_socket" in
18461 Checking to see what type is the last argument of accept().
18464 case "$d_socklen_t" in
18465 "$define") yyy="$yyy socklen_t"
18467 yyy="$yyy $sizetype int long unsigned"
18468 for xxx in $yyy; do
18469 case "$socksizetype" in
18470 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
18471 case "$usesocks" in
18473 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
18474 echo "Your system accepts '$xxx *' for the last argument of accept()."
18475 socksizetype="$xxx"
18478 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
18479 echo "Your system accepts '$xxx *' for the last argument of accept()."
18480 socksizetype="$xxx"
18487 : In case none of those worked, prompt the user.
18488 case "$socksizetype" in
18489 '') rp='What is the type for socket address structure sizes?'
18496 *) : no sockets, so pick relatively harmless default
18501 : see what type is used for signed size_t
18502 set ssize_t ssizetype int stdio.h sys/types.h
18507 #include <sys/types.h>
18508 #define Size_t $sizetype
18509 #define SSize_t $dflt
18512 if (sizeof(Size_t) == sizeof(SSize_t))
18514 else if (sizeof(Size_t) == sizeof(int))
18523 if eval $compile_ok && $run ./try > /dev/null; then
18524 ssizetype=`$run ./try`
18525 echo "I'll be using $ssizetype for functions returning a byte count." >&4
18528 Help! I can't compile and run the ssize_t test program: please enlighten me!
18529 (This is probably a misconfiguration in your system or libraries, and
18530 you really ought to fix it. Still, I'll try anyway.)
18532 I need a type that is the same size as $sizetype, but is guaranteed to
18533 be signed. Common values are ssize_t, int and long.
18536 rp="What signed type is the same size as $sizetype?"
18542 : see what type of char stdio uses.
18544 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
18545 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
18546 echo "Your stdio uses unsigned chars." >&4
18547 stdchar="unsigned char"
18549 echo "Your stdio uses signed chars." >&4
18556 : see what type uids are declared as in the kernel
18558 echo "Looking for the type for user ids returned by getuid()."
18559 set uid_t uidtype xxx stdio.h sys/types.h
18563 xxx=`./findhdr sys/user.h`
18564 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
18566 unsigned) dflt="$1 $2" ;;
18570 *) dflt="$uidtype";;
18573 uid_t) echo "uid_t found." ;;
18574 *) rp="What is the type for user ids returned by getuid()?"
18582 *_t) zzz="$uidtype" ;;
18585 echo "Checking the size of $zzz..." >&4
18587 #include <sys/types.h>
18590 printf("%d\n", (int)sizeof($uidtype));
18595 if eval $compile_ok; then
18599 echo "(I can't execute the test program--guessing $uidsize.)" >&4
18602 echo "Your $zzz is $uidsize bytes long."
18607 echo "(I can't compile the test program--guessing $uidsize.)" >&4
18612 *_t) zzz="$uidtype" ;;
18615 echo "Checking the sign of $zzz..." >&4
18617 #include <sys/types.h>
18628 if eval $compile; then
18632 echo "(I can't execute the test program--guessing unsigned.)" >&4
18636 1) echo "Your $zzz is unsigned." ;;
18637 -1) echo "Your $zzz is signed." ;;
18643 echo "(I can't compile the test program--guessing unsigned.)" >&4
18649 $echo "Checking the format string to be used for uids..." >&4
18652 -1) if $test X"$uidsize" = X"$ivsize"; then
18653 uidformat="$ivdformat"
18655 if $test X"$uidsize" = X"$longsize"; then
18658 if $test X"$uidsize" = X"$intsize"; then
18661 if $test X"$uidsize" = X"$shortsize"; then
18668 *) if $test X"$uidsize" = X"$uvsize"; then
18669 uidformat="$uvuformat"
18671 if $test X"$uidsize" = X"$longsize"; then
18674 if $test X"$uidsize" = X"$intsize"; then
18677 if $test X"$uidsize" = X"$shortsize"; then
18686 : determine compiler compiler
18695 if $test -f "$byacc$_exe"; then
18697 comp="byacc or $comp"
18699 if $test -f "$bison$_exe"; then
18700 comp="$comp or bison -y"
18702 rp="Which compiler compiler ($comp) shall I use?"
18711 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
18717 : see if this is a fp.h system
18721 : see if this is a fp_class.h system
18722 set fp_class.h i_fp_class
18725 : see if this is a ieeefp.h system
18726 case "$i_ieeefp" in
18727 '' ) set ieeefp.h i_ieeefp
18732 : see if this is a libutil.h system
18733 set libutil.h i_libutil
18736 : see if mach cthreads are available
18737 if test "X$usethreads" = "X$define"; then
18738 set mach/cthreads.h i_machcthr
18741 i_machcthr="$undef"
18746 : see if this is a math.h system
18750 : see if this is a mntent.h system
18751 set mntent.h i_mntent
18754 : see if ndbm.h is available
18760 # Some Linux distributions such as RedHat 7.1 put the
18761 # ndbm.h header in /usr/include/gdbm/ndbm.h.
18762 if $test -f /usr/include/gdbm/ndbm.h; then
18763 echo '<gdbm/ndbm.h> found.'
18764 ccflags="$ccflags -I/usr/include/gdbm"
18765 cppflags="$cppflags -I/usr/include/gdbm"
18773 : see if dbm_open exists
18774 set dbm_open d_dbm_open
18776 case "$d_dbm_open" in
18779 echo "We won't be including <ndbm.h>"
18788 : see if net/errno.h is available
18790 set net/errno.h val
18793 : Unfortunately, it causes problems on some systems. Arrgh.
18796 cat > try.c <<'EOM'
18799 #include <net/errno.h>
18805 if $cc $ccflags -c try.c >/dev/null 2>&1; then
18806 echo "We'll be including <net/errno.h>." >&4
18808 echo "We won't be including <net/errno.h>." >&4
18817 : see if netinet/tcp.h is available
18818 set netinet/tcp.h i_netinettcp
18821 : see if this is a poll.h system
18825 : see if this is a prot.h system
18830 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
18831 $cat <<'EOSH' > Cppsym.know
18832 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
18833 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
18834 alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX
18835 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
18836 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
18837 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
18838 bull c cadmus clipper CMU COFF COMPILER_VERSION
18839 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
18840 CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
18841 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
18842 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
18844 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
18845 H3050R H3050RX hbullx20 hcx host_mips
18846 hp200 hp300 hp700 HP700 hp800 hp9000
18847 hp9000s200 hp9000s300 hp9000s400 hp9000s500
18848 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
18849 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
18850 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
18851 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
18852 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
18853 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
18854 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
18855 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
18856 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
18857 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
18858 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
18859 MATH_HAS_NO_SIDE_EFFECTS
18860 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
18861 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
18862 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
18863 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
18864 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
18865 NetBSD news1500 news1700 news1800 news1900 news3700
18866 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
18867 ns32016 ns32332 ns32k nsc32000
18868 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
18869 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
18870 pc532 pdp11 PGC PIC plexus PORTAR posix
18871 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
18872 POSIX_C_SOURCE POSIX_SOURCE POWER
18873 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
18874 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
18875 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
18876 sony sony_news sonyrisc sparc sparclite spectrum
18877 stardent stdc STDC_EXT stratos sun sun3 sun386
18878 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
18879 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
18880 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
18881 sysV68 sysV88 Tek4132 Tek4300 titan
18882 TM3200 TM5400 TM5600
18883 tower tower32 tower32_200 tower32_600 tower32_700
18884 tower32_800 tower32_850 tss
18885 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
18886 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
18887 unix UNIX95 UNIX99 unixpc unos
18888 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
18889 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
18890 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
18892 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
18893 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
18894 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
18897 # Maybe put other stuff here too.
18898 cat <<EOSH >>Cppsym.know
18901 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
18902 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
18903 $cat Cppsym.know > Cppsym.c
18904 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
18905 $rm -f Cppsym.a Cppsym.b Cppsym.c
18906 cat <<EOSH > Cppsym
18908 if $test \$# -gt 0; then
18909 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
18910 if $test -s Cppsym.got; then
18917 $tr " " "$trnl" | ./Cppsym.try
18923 cat <<EOSH > Cppsym.try
18925 cat <<'EOCP' > try.c
18931 cat <<'EOSH' >> Cppsym.try
18933 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
18934 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
18935 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
18936 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
18938 echo 'return 0;}' >> try.c
18940 cat <<EOSH >> Cppsym.try
18942 case "$osname-$gccversion" in
18943 irix-) ccflags="\$ccflags -woff 1178" ;;
18944 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
18946 $cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try
18948 chmod +x Cppsym.try
18949 $eunicefix Cppsym.try
18950 ./Cppsym < Cppsym.know > Cppsym.true
18951 : now check the C compiler for additional symbols
18952 postprocess_cc_v=''
18954 aix) postprocess_cc_v="|$tr , ' '" ;;
18961 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
18964 -D*) echo "\$i" | $sed 's/^-D//';;
18965 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
18970 postprocess_cc_v=''
18973 ./ccsym > ccsym1.raw
18974 if $test -s ccsym1.raw; then
18975 $sort ccsym1.raw | $uniq >ccsym.raw
18977 mv ccsym1.raw ccsym.raw
18980 $awk '/\=/ { print $0; next }
18981 { print $0"=1" }' ccsym.raw >ccsym.list
18982 $awk '/\=/ { print $0; next }
18983 { print $0"=1" }' Cppsym.true >ccsym.true
18984 $comm -13 ccsym.true ccsym.list >ccsym.own
18985 $comm -12 ccsym.true ccsym.list >ccsym.com
18986 $comm -23 ccsym.true ccsym.list >ccsym.cpp
18988 if $test -z ccsym.raw; then
18989 echo "Your C compiler doesn't seem to define any symbols!" >&4
18991 echo "However, your C preprocessor defines the following symbols:"
18994 cppsymbols=`$cat Cppsym.true`
18995 cppsymbols=`echo $cppsymbols`
18996 cppccsymbols="$cppsymbols"
18998 if $test -s ccsym.com; then
18999 echo "Your C compiler and pre-processor define these symbols:"
19000 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
19003 cppccsymbols=`$cat ccsym.com`
19004 cppccsymbols=`echo $cppccsymbols`
19005 $test "$silent" || sleep 1
19007 if $test -s ccsym.cpp; then
19008 $test "$also" && echo " "
19009 echo "Your C pre-processor ${also}defines the following symbols:"
19010 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
19012 cppsymbols=`$cat ccsym.cpp`
19013 cppsymbols=`echo $cppsymbols`
19014 $test "$silent" || sleep 1
19016 if $test -s ccsym.own; then
19017 $test "$also" && echo " "
19018 echo "Your C compiler ${also}defines the following cpp symbols:"
19019 $sed -e 's/\(..*\)=1/\1/' ccsym.own
19020 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
19021 ccsymbols=`$cat ccsym.own`
19022 ccsymbols=`echo $ccsymbols`
19023 $test "$silent" || sleep 1
19027 : see if this is a termio system
19031 if $test `./findhdr termios.h`; then
19032 set tcsetattr i_termios
19038 "$define") echo "You have POSIX termios.h... good!" >&4;;
19039 *) if ./Cppsym pyr; then
19040 case "`/bin/universe`" in
19041 ucb) if $test `./findhdr sgtty.h`; then
19043 echo "<sgtty.h> found." >&4
19045 echo "System is pyramid with BSD universe."
19046 echo "<sgtty.h> not found--you could have problems." >&4
19048 *) if $test `./findhdr termio.h`; then
19050 echo "<termio.h> found." >&4
19052 echo "System is pyramid with USG universe."
19053 echo "<termio.h> not found--you could have problems." >&4
19057 if $test `./findhdr termio.h`; then
19058 echo "<termio.h> found." >&4
19060 elif $test `./findhdr sgtty.h`; then
19061 echo "<sgtty.h> found." >&4
19064 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
19067 if $test `./findhdr sgtty.h`; then
19068 echo "<sgtty.h> found." >&4
19070 elif $test `./findhdr termio.h`; then
19071 echo "<termio.h> found." >&4
19074 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
19078 set i_termio; eval $setvar
19079 val=$val2; set i_sgtty; eval $setvar
19080 val=$val3; set i_termios; eval $setvar
19082 : see if stddef is available
19083 set stddef.h i_stddef
19086 : see if this is a sunmath.h system
19087 set sunmath.h i_sunmath
19090 : see if sys/access.h is available
19091 set sys/access.h i_sysaccess
19094 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
19095 set sys/filio.h i_sysfilio
19098 if $test `./findhdr sys/ioctl.h`; then
19100 echo '<sys/ioctl.h> found.' >&4
19103 if $test $i_sysfilio = "$define"; then
19104 echo '<sys/ioctl.h> NOT found.' >&4
19106 $test $i_sgtty = "$define" && xxx="sgtty.h"
19107 $test $i_termio = "$define" && xxx="termio.h"
19108 $test $i_termios = "$define" && xxx="termios.h"
19109 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
19115 : see if socket ioctl defs are in sys/sockio.h
19117 xxx=`./findhdr sys/sockio.h`
19118 if $test "$xxx"; then
19119 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
19121 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
19124 echo "No socket ioctls found in <sys/sockio.h>." >&4
19129 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
19136 : see if this is a syslog.h system
19137 set syslog.h i_syslog
19141 : see if this is a sys/mode.h system
19142 set sys/mode.h i_sysmode
19145 : see if sys/resource.h has to be included
19146 set sys/resource.h i_sysresrc
19149 : see if sys/security.h is available
19150 set sys/security.h i_syssecrt
19153 : see if this is a sys/statvfs.h system
19154 set sys/statvfs.h i_sysstatvfs
19157 : see if this is a sys/un.h system
19158 set sys/un.h i_sysun
19162 : see if this is a sys/utsname.h system
19163 set sys/utsname.h i_sysutsname
19166 : see if this is a syswait system
19167 set sys/wait.h i_syswait
19170 : see if this is a ustat.h system
19171 set ustat.h i_ustat
19174 : see if this is an utime system
19175 set utime.h i_utime
19178 : see if this is a values.h system
19179 set values.h i_values
19182 : see if this is a vfork system
19185 set vfork.h i_vfork
19193 : see if gdbm.h is available
19198 : see if gdbm_open exists
19199 set gdbm_open d_gdbm_open
19201 case "$d_gdbm_open" in
19204 echo "We won't be including <gdbm.h>"
19214 echo "Looking for extensions..." >&4
19215 : If we are using the old config.sh, known_extensions may contain
19216 : old or inaccurate or duplicate values.
19217 known_extensions=''
19218 nonxs_extensions=''
19219 : We do not use find because it might not be available.
19220 : We do not just use MANIFEST because the user may have dropped
19221 : some additional extensions into the source tree and expect them
19224 : Function to recursively find available extensions, ignoring DynaLoader
19225 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
19229 DynaLoader|dynaload) ;;
19231 if $test -f $xxx/$xxx.xs; then
19232 known_extensions="$known_extensions $1$xxx";
19233 elif $test -f $xxx/Makefile.PL; then
19234 nonxs_extensions="$nonxs_extensions $1$xxx";
19236 if $test -d $xxx -a $# -lt 10; then
19239 eval $find_extensions;
19251 eval $find_extensions
19252 # Special case: Add in threads/shared since it is not picked up by the
19253 # recursive find above (and adding in general recursive finding breaks
19254 # SDBM_File/sdbm). A.D. 10/25/2001.
19255 known_extensions="$known_extensions threads/shared"
19256 set X $nonxs_extensions
19258 nonxs_extensions="$*"
19259 set X $known_extensions
19261 known_extensions="$*"
19264 : Now see which are supported on this system.
19266 for xxx in $known_extensions ; do
19270 $define) avail_ext="$avail_ext $xxx" ;;
19273 GDBM_File|gdbm_fil)
19275 $define) avail_ext="$avail_ext $xxx" ;;
19278 I18N/Langinfo|i18n_lan)
19279 case "$i_langinfo$d_nl_langinfo" in
19280 $define$define) avail_ext="$avail_ext $xxx" ;;
19283 NDBM_File|ndbm_fil)
19286 case "$osname-$use64bitint" in
19287 cygwin-*|hpux-define)
19289 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
19292 *) avail_ext="$avail_ext $xxx" ;;
19297 ODBM_File|odbm_fil)
19298 case "${i_dbm}${i_rpcsvcdbm}" in
19300 case "$osname-$use64bitint" in
19301 cygwin-*|hpux-define)
19303 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
19306 *) avail_ext="$avail_ext $xxx" ;;
19312 case "$useposix" in
19313 true|define|y) avail_ext="$avail_ext $xxx" ;;
19317 case "$useopcode" in
19318 true|define|y) avail_ext="$avail_ext $xxx" ;;
19322 case "$d_socket" in
19325 beos) ;; # not unless BONE
19326 *) avail_ext="$avail_ext $xxx" ;;
19331 Sys/Syslog|sys/syslog)
19332 : XXX syslog requires socket
19333 case "$d_socket" in
19334 true|$define|y) avail_ext="$avail_ext $xxx" ;;
19338 case "$usethreads" in
19340 case "$useithreads" in
19341 $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
19345 threads|threads/shared)
19346 # threads and threads::shared are special cases.
19347 # To stop people from asking "Perl 5.8.0 was supposed
19348 # to have this new fancy threads implementation but my
19349 # perl doesn't have it" and from people trying to
19350 # (re)install the threads module using CPAN.pm and
19351 # CPAN.pm then offering to reinstall Perl 5.8.0,
19352 # the threads.pm and threads/shared.pm will always be
19353 # there, croaking informatively ("you need to rebuild
19354 # all of Perl with threads, sorry") when threads haven't
19355 # been compiled in.
19357 avail_ext="$avail_ext $xxx"
19360 : XXX Do we need a useipcsysv variable here
19361 case "${d_msg}${d_sem}${d_shm}" in
19362 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
19365 *) avail_ext="$avail_ext $xxx"
19374 : Now see which nonxs extensions are supported on this system.
19375 : For now assume all are.
19377 for xxx in $nonxs_extensions ; do
19379 *) nonxs_ext="$nonxs_ext $xxx"
19391 A number of extensions are supplied with $package. You may choose to
19392 compile these extensions for dynamic loading (the default), compile
19393 them into the $package executable (static loading), or not include
19394 them at all. Answer "none" to include no extensions.
19395 Note that DynaLoader is always built and need not be mentioned here.
19398 case "$dynamic_ext" in
19399 '') dflt="$avail_ext" ;;
19400 *) dflt="$dynamic_ext"
19401 # Perhaps we are reusing an old out-of-date config.sh.
19404 if test X"$dynamic_ext" != X"$avail_ext"; then
19406 NOTICE: Your previous config.sh list may be incorrect.
19407 The extensions now available to you are
19409 but the default list from your previous config.sh is
19421 rp="What extensions do you wish to load dynamically?"
19424 none) dynamic_ext=' ' ;;
19425 *) dynamic_ext="$ans" ;;
19428 case "$static_ext" in
19430 : Exclude those already listed in dynamic linking
19432 for xxx in $avail_ext; do
19433 case " $dynamic_ext " in
19435 *) dflt="$dflt $xxx" ;;
19442 *) dflt="$static_ext"
19449 rp="What extensions do you wish to load statically?"
19452 none) static_ext=' ' ;;
19453 *) static_ext="$ans" ;;
19458 A number of extensions are supplied with $package. Answer "none"
19459 to include no extensions.
19460 Note that DynaLoader is always built and need not be mentioned here.
19463 case "$static_ext" in
19464 '') dflt="$avail_ext" ;;
19465 *) dflt="$static_ext"
19466 # Perhaps we are reusing an old out-of-date config.sh.
19469 if test X"$static_ext" != X"$avail_ext"; then
19471 NOTICE: Your previous config.sh list may be incorrect.
19472 The extensions now available to you are
19474 but the default list from your previous config.sh is
19483 : Exclude those that are not xs extensions
19487 rp="What extensions do you wish to include?"
19490 none) static_ext=' ' ;;
19491 *) static_ext="$ans" ;;
19496 # Encode is a special case. If we are building Encode as a static
19497 # extension, we need to explicitly list its subextensions as well.
19498 # For other nested extensions, this is handled automatically by
19499 # the appropriate Makefile.PL.
19500 case " $static_ext " in
19501 *" Encode "*) # Add the subextensions of Encode
19503 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
19504 static_ext="$static_ext Encode/$xxx"
19510 set X $dynamic_ext $static_ext $nonxs_ext
19514 : Remove libraries needed only for extensions
19515 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
19516 : The exception is SunOS 4.x, which needs them.
19517 case "${osname}X${osvers}" in
19521 *) case "$usedl" in
19522 $define|true|[yY]*)
19523 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
19527 *) perllibs="$libs"
19533 : Remove build directory name from cppstdin so it can be used from
19534 : either the present location or the final installed location.
19536 : Get out of the UU directory to get correct path name.
19538 case "$cppstdin" in
19540 echo "Stripping down cppstdin path name"
19546 : end of configuration questions
19548 echo "End of configuration questions."
19551 : back to where it started
19552 if test -d ../UU; then
19556 : configuration may be patched via a 'config.arch' file
19557 if $test -f config.arch; then
19558 echo "I see a config.arch file, loading it."
19562 : configuration may be patched via a 'config.over' file
19563 if $test -f config.over; then
19566 rp='I see a config.over file. Do you wish to load it?'
19569 n*) echo "OK, I'll ignore it.";;
19571 echo "Configuration override changes have been loaded."
19576 : in case they want portability, strip down executable paths
19577 case "$d_portable" in
19580 echo "Stripping down executable paths..." >&4
19581 for file in $loclist $trylist; do
19583 eval $file=`basename $temp`
19588 : create config.sh file
19590 echo "Creating config.sh..." >&4
19591 $spitshell <<EOT >config.sh
19594 # This file was produced by running the Configure script. It holds all the
19595 # definitions figured out by Configure. Should you modify one of these values,
19596 # do not forget to propagate your changes by running "Configure -der". You may
19597 # instead choose to run each of the .SH files by yourself, or "Configure -S".
19600 # Package name : $package
19601 # Source directory : $src
19602 # Configuration time: $cf_time
19603 # Configured by : $cf_by
19604 # Target system : $myuname
19614 Revision='$Revision'
19622 alignbytes='$alignbytes'
19623 ansi2knr='$ansi2knr'
19624 aphostname='$aphostname'
19625 api_revision='$api_revision'
19626 api_subversion='$api_subversion'
19627 api_version='$api_version'
19628 api_versionstring='$api_versionstring'
19631 archlibexp='$archlibexp'
19632 archname64='$archname64'
19633 archname='$archname'
19634 archobjs='$archobjs'
19635 asctime_r_proto='$asctime_r_proto'
19643 byteorder='$byteorder'
19645 castflags='$castflags'
19648 cccdlflags='$cccdlflags'
19649 ccdlflags='$ccdlflags'
19651 ccflags_uselargefiles='$ccflags_uselargefiles'
19653 ccsymbols='$ccsymbols'
19654 ccversion='$ccversion'
19656 cf_email='$cf_email'
19658 charsize='$charsize'
19662 clocktype='$clocktype'
19664 compress='$compress'
19665 contains='$contains'
19669 cpp_stuff='$cpp_stuff'
19670 cppccsymbols='$cppccsymbols'
19671 cppflags='$cppflags'
19673 cppminus='$cppminus'
19675 cppstdin='$cppstdin'
19676 cppsymbols='$cppsymbols'
19677 crypt_r_proto='$crypt_r_proto'
19678 cryptlib='$cryptlib'
19680 ctermid_r_proto='$ctermid_r_proto'
19681 ctime_r_proto='$ctime_r_proto'
19682 d_Gconvert='$d_Gconvert'
19683 d_PRIEUldbl='$d_PRIEUldbl'
19684 d_PRIFUldbl='$d_PRIFUldbl'
19685 d_PRIGUldbl='$d_PRIGUldbl'
19686 d_PRIXU64='$d_PRIXU64'
19687 d_PRId64='$d_PRId64'
19688 d_PRIeldbl='$d_PRIeldbl'
19689 d_PRIfldbl='$d_PRIfldbl'
19690 d_PRIgldbl='$d_PRIgldbl'
19691 d_PRIi64='$d_PRIi64'
19692 d_PRIo64='$d_PRIo64'
19693 d_PRIu64='$d_PRIu64'
19694 d_PRIx64='$d_PRIx64'
19695 d_SCNfldbl='$d_SCNfldbl'
19696 d__fwalk='$d__fwalk'
19697 d_access='$d_access'
19698 d_accessx='$d_accessx'
19700 d_archlib='$d_archlib'
19701 d_asctime_r='$d_asctime_r'
19704 d_attribut='$d_attribut'
19708 d_bsdgetpgrp='$d_bsdgetpgrp'
19709 d_bsdsetpgrp='$d_bsdsetpgrp'
19711 d_casti32='$d_casti32'
19712 d_castneg='$d_castneg'
19713 d_charvspr='$d_charvspr'
19715 d_chroot='$d_chroot'
19716 d_chsize='$d_chsize'
19718 d_closedir='$d_closedir'
19719 d_cmsghdr_s='$d_cmsghdr_s'
19722 d_crypt_r='$d_crypt_r'
19724 d_ctermid_r='$d_ctermid_r'
19725 d_ctime_r='$d_ctime_r'
19726 d_cuserid='$d_cuserid'
19727 d_dbl_dig='$d_dbl_dig'
19728 d_dbminitproto='$d_dbminitproto'
19729 d_difftime='$d_difftime'
19731 d_dirnamlen='$d_dirnamlen'
19732 d_dlerror='$d_dlerror'
19733 d_dlopen='$d_dlopen'
19734 d_dlsymun='$d_dlsymun'
19735 d_dosuid='$d_dosuid'
19736 d_drand48_r='$d_drand48_r'
19737 d_drand48proto='$d_drand48proto'
19739 d_eaccess='$d_eaccess'
19740 d_endgrent='$d_endgrent'
19741 d_endgrent_r='$d_endgrent_r'
19742 d_endhent='$d_endhent'
19743 d_endhostent_r='$d_endhostent_r'
19744 d_endnent='$d_endnent'
19745 d_endnetent_r='$d_endnetent_r'
19746 d_endpent='$d_endpent'
19747 d_endprotoent_r='$d_endprotoent_r'
19748 d_endpwent='$d_endpwent'
19749 d_endpwent_r='$d_endpwent_r'
19750 d_endsent='$d_endsent'
19751 d_endservent_r='$d_endservent_r'
19752 d_eofnblk='$d_eofnblk'
19753 d_eunice='$d_eunice'
19754 d_fchdir='$d_fchdir'
19755 d_fchmod='$d_fchmod'
19756 d_fchown='$d_fchown'
19758 d_fcntl_can_lock='$d_fcntl_can_lock'
19759 d_fd_macros='$d_fd_macros'
19760 d_fd_set='$d_fd_set'
19761 d_fds_bits='$d_fds_bits'
19762 d_fgetpos='$d_fgetpos'
19763 d_finite='$d_finite'
19764 d_finitel='$d_finitel'
19765 d_flexfnam='$d_flexfnam'
19767 d_flockproto='$d_flockproto'
19769 d_fp_class='$d_fp_class'
19770 d_fpathconf='$d_fpathconf'
19771 d_fpclass='$d_fpclass'
19772 d_fpclassify='$d_fpclassify'
19773 d_fpclassl='$d_fpclassl'
19774 d_fpos64_t='$d_fpos64_t'
19775 d_frexpl='$d_frexpl'
19776 d_fs_data_s='$d_fs_data_s'
19777 d_fseeko='$d_fseeko'
19778 d_fsetpos='$d_fsetpos'
19779 d_fstatfs='$d_fstatfs'
19780 d_fstatvfs='$d_fstatvfs'
19782 d_ftello='$d_ftello'
19784 d_getcwd='$d_getcwd'
19785 d_getespwnam='$d_getespwnam'
19786 d_getfsstat='$d_getfsstat'
19787 d_getgrent='$d_getgrent'
19788 d_getgrent_r='$d_getgrent_r'
19789 d_getgrgid_r='$d_getgrgid_r'
19790 d_getgrnam_r='$d_getgrnam_r'
19791 d_getgrps='$d_getgrps'
19792 d_gethbyaddr='$d_gethbyaddr'
19793 d_gethbyname='$d_gethbyname'
19794 d_gethent='$d_gethent'
19795 d_gethname='$d_gethname'
19796 d_gethostbyaddr_r='$d_gethostbyaddr_r'
19797 d_gethostbyname_r='$d_gethostbyname_r'
19798 d_gethostent_r='$d_gethostent_r'
19799 d_gethostprotos='$d_gethostprotos'
19800 d_getitimer='$d_getitimer'
19801 d_getlogin='$d_getlogin'
19802 d_getlogin_r='$d_getlogin_r'
19803 d_getmnt='$d_getmnt'
19804 d_getmntent='$d_getmntent'
19805 d_getnbyaddr='$d_getnbyaddr'
19806 d_getnbyname='$d_getnbyname'
19807 d_getnent='$d_getnent'
19808 d_getnetbyaddr_r='$d_getnetbyaddr_r'
19809 d_getnetbyname_r='$d_getnetbyname_r'
19810 d_getnetent_r='$d_getnetent_r'
19811 d_getnetprotos='$d_getnetprotos'
19812 d_getpagsz='$d_getpagsz'
19813 d_getpbyname='$d_getpbyname'
19814 d_getpbynumber='$d_getpbynumber'
19815 d_getpent='$d_getpent'
19816 d_getpgid='$d_getpgid'
19817 d_getpgrp2='$d_getpgrp2'
19818 d_getpgrp='$d_getpgrp'
19819 d_getppid='$d_getppid'
19820 d_getprior='$d_getprior'
19821 d_getprotobyname_r='$d_getprotobyname_r'
19822 d_getprotobynumber_r='$d_getprotobynumber_r'
19823 d_getprotoent_r='$d_getprotoent_r'
19824 d_getprotoprotos='$d_getprotoprotos'
19825 d_getprpwnam='$d_getprpwnam'
19826 d_getpwent='$d_getpwent'
19827 d_getpwent_r='$d_getpwent_r'
19828 d_getpwnam_r='$d_getpwnam_r'
19829 d_getpwuid_r='$d_getpwuid_r'
19830 d_getsbyname='$d_getsbyname'
19831 d_getsbyport='$d_getsbyport'
19832 d_getsent='$d_getsent'
19833 d_getservbyname_r='$d_getservbyname_r'
19834 d_getservbyport_r='$d_getservbyport_r'
19835 d_getservent_r='$d_getservent_r'
19836 d_getservprotos='$d_getservprotos'
19837 d_getspnam='$d_getspnam'
19838 d_getspnam_r='$d_getspnam_r'
19839 d_gettimeod='$d_gettimeod'
19840 d_gmtime_r='$d_gmtime_r'
19841 d_gnulibc='$d_gnulibc'
19842 d_grpasswd='$d_grpasswd'
19843 d_hasmntopt='$d_hasmntopt'
19846 d_inetaton='$d_inetaton'
19847 d_int64_t='$d_int64_t'
19848 d_isascii='$d_isascii'
19849 d_isfinite='$d_isfinite'
19852 d_isnanl='$d_isnanl'
19853 d_killpg='$d_killpg'
19854 d_lchown='$d_lchown'
19855 d_ldbl_dig='$d_ldbl_dig'
19857 d_localtime_r='$d_localtime_r'
19858 d_locconv='$d_locconv'
19860 d_longdbl='$d_longdbl'
19861 d_longlong='$d_longlong'
19862 d_lseekproto='$d_lseekproto'
19864 d_madvise='$d_madvise'
19866 d_mbstowcs='$d_mbstowcs'
19867 d_mbtowc='$d_mbtowc'
19868 d_memchr='$d_memchr'
19869 d_memcmp='$d_memcmp'
19870 d_memcpy='$d_memcpy'
19871 d_memmove='$d_memmove'
19872 d_memset='$d_memset'
19874 d_mkdtemp='$d_mkdtemp'
19875 d_mkfifo='$d_mkfifo'
19876 d_mkstemp='$d_mkstemp'
19877 d_mkstemps='$d_mkstemps'
19878 d_mktime='$d_mktime'
19881 d_modfl_pow32_bug='$d_modfl_pow32_bug'
19882 d_mprotect='$d_mprotect'
19884 d_msg_ctrunc='$d_msg_ctrunc'
19885 d_msg_dontroute='$d_msg_dontroute'
19886 d_msg_oob='$d_msg_oob'
19887 d_msg_peek='$d_msg_peek'
19888 d_msg_proxy='$d_msg_proxy'
19889 d_msgctl='$d_msgctl'
19890 d_msgget='$d_msgget'
19891 d_msghdr_s='$d_msghdr_s'
19892 d_msgrcv='$d_msgrcv'
19893 d_msgsnd='$d_msgsnd'
19895 d_munmap='$d_munmap'
19896 d_mymalloc='$d_mymalloc'
19898 d_nl_langinfo='$d_nl_langinfo'
19899 d_nv_preserves_uv='$d_nv_preserves_uv'
19900 d_off64_t='$d_off64_t'
19901 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
19902 d_oldpthreads='$d_oldpthreads'
19903 d_oldsock='$d_oldsock'
19905 d_pathconf='$d_pathconf'
19907 d_perl_otherlibdirs='$d_perl_otherlibdirs'
19908 d_phostname='$d_phostname'
19911 d_portable='$d_portable'
19912 d_procselfexe='$d_procselfexe'
19913 d_pthread_atfork='$d_pthread_atfork'
19914 d_pthread_yield='$d_pthread_yield'
19916 d_pwchange='$d_pwchange'
19917 d_pwclass='$d_pwclass'
19918 d_pwcomment='$d_pwcomment'
19919 d_pwexpire='$d_pwexpire'
19920 d_pwgecos='$d_pwgecos'
19921 d_pwpasswd='$d_pwpasswd'
19922 d_pwquota='$d_pwquota'
19925 d_random_r='$d_random_r'
19926 d_readdir64_r='$d_readdir64_r'
19927 d_readdir='$d_readdir'
19928 d_readdir_r='$d_readdir_r'
19929 d_readlink='$d_readlink'
19931 d_recvmsg='$d_recvmsg'
19932 d_rename='$d_rename'
19933 d_rewinddir='$d_rewinddir'
19935 d_safebcpy='$d_safebcpy'
19936 d_safemcpy='$d_safemcpy'
19937 d_sanemcmp='$d_sanemcmp'
19938 d_sbrkproto='$d_sbrkproto'
19939 d_sched_yield='$d_sched_yield'
19940 d_scm_rights='$d_scm_rights'
19941 d_seekdir='$d_seekdir'
19942 d_select='$d_select'
19944 d_semctl='$d_semctl'
19945 d_semctl_semid_ds='$d_semctl_semid_ds'
19946 d_semctl_semun='$d_semctl_semun'
19947 d_semget='$d_semget'
19949 d_sendmsg='$d_sendmsg'
19950 d_setegid='$d_setegid'
19951 d_seteuid='$d_seteuid'
19952 d_setgrent='$d_setgrent'
19953 d_setgrent_r='$d_setgrent_r'
19954 d_setgrps='$d_setgrps'
19955 d_sethent='$d_sethent'
19956 d_sethostent_r='$d_sethostent_r'
19957 d_setitimer='$d_setitimer'
19958 d_setlinebuf='$d_setlinebuf'
19959 d_setlocale='$d_setlocale'
19960 d_setlocale_r='$d_setlocale_r'
19961 d_setnent='$d_setnent'
19962 d_setnetent_r='$d_setnetent_r'
19963 d_setpent='$d_setpent'
19964 d_setpgid='$d_setpgid'
19965 d_setpgrp2='$d_setpgrp2'
19966 d_setpgrp='$d_setpgrp'
19967 d_setprior='$d_setprior'
19968 d_setproctitle='$d_setproctitle'
19969 d_setprotoent_r='$d_setprotoent_r'
19970 d_setpwent='$d_setpwent'
19971 d_setpwent_r='$d_setpwent_r'
19972 d_setregid='$d_setregid'
19973 d_setresgid='$d_setresgid'
19974 d_setresuid='$d_setresuid'
19975 d_setreuid='$d_setreuid'
19976 d_setrgid='$d_setrgid'
19977 d_setruid='$d_setruid'
19978 d_setsent='$d_setsent'
19979 d_setservent_r='$d_setservent_r'
19980 d_setsid='$d_setsid'
19981 d_setvbuf='$d_setvbuf'
19985 d_shmatprototype='$d_shmatprototype'
19986 d_shmctl='$d_shmctl'
19988 d_shmget='$d_shmget'
19989 d_sigaction='$d_sigaction'
19990 d_sigprocmask='$d_sigprocmask'
19991 d_sigsetjmp='$d_sigsetjmp'
19992 d_sockatmark='$d_sockatmark'
19993 d_sockatmarkproto='$d_sockatmarkproto'
19994 d_socket='$d_socket'
19995 d_socklen_t='$d_socklen_t'
19996 d_sockpair='$d_sockpair'
19997 d_socks5_init='$d_socks5_init'
19999 d_srand48_r='$d_srand48_r'
20000 d_srandom_r='$d_srandom_r'
20001 d_sresgproto='$d_sresgproto'
20002 d_sresuproto='$d_sresuproto'
20003 d_statblks='$d_statblks'
20004 d_statfs_f_flags='$d_statfs_f_flags'
20005 d_statfs_s='$d_statfs_s'
20006 d_statvfs='$d_statvfs'
20007 d_stdio_cnt_lval='$d_stdio_cnt_lval'
20008 d_stdio_ptr_lval='$d_stdio_ptr_lval'
20009 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
20010 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
20011 d_stdio_stream_array='$d_stdio_stream_array'
20012 d_stdiobase='$d_stdiobase'
20013 d_stdstdio='$d_stdstdio'
20014 d_strchr='$d_strchr'
20015 d_strcoll='$d_strcoll'
20016 d_strctcpy='$d_strctcpy'
20017 d_strerrm='$d_strerrm'
20018 d_strerror='$d_strerror'
20019 d_strerror_r='$d_strerror_r'
20020 d_strftime='$d_strftime'
20021 d_strtod='$d_strtod'
20022 d_strtol='$d_strtol'
20023 d_strtold='$d_strtold'
20024 d_strtoll='$d_strtoll'
20025 d_strtoq='$d_strtoq'
20026 d_strtoul='$d_strtoul'
20027 d_strtoull='$d_strtoull'
20028 d_strtouq='$d_strtouq'
20029 d_strxfrm='$d_strxfrm'
20030 d_suidsafe='$d_suidsafe'
20031 d_symlink='$d_symlink'
20032 d_syscall='$d_syscall'
20033 d_syscallproto='$d_syscallproto'
20034 d_sysconf='$d_sysconf'
20035 d_sysernlst='$d_sysernlst'
20036 d_syserrlst='$d_syserrlst'
20037 d_system='$d_system'
20038 d_tcgetpgrp='$d_tcgetpgrp'
20039 d_tcsetpgrp='$d_tcsetpgrp'
20040 d_telldir='$d_telldir'
20041 d_telldirproto='$d_telldirproto'
20044 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
20045 d_tm_tm_zone='$d_tm_tm_zone'
20046 d_tmpnam_r='$d_tmpnam_r'
20047 d_truncate='$d_truncate'
20048 d_ttyname_r='$d_ttyname_r'
20049 d_tzname='$d_tzname'
20050 d_u32align='$d_u32align'
20051 d_ualarm='$d_ualarm'
20054 d_union_semun='$d_union_semun'
20055 d_unordered='$d_unordered'
20056 d_usleep='$d_usleep'
20057 d_usleepproto='$d_usleepproto'
20059 d_vendorarch='$d_vendorarch'
20060 d_vendorbin='$d_vendorbin'
20061 d_vendorlib='$d_vendorlib'
20063 d_void_closedir='$d_void_closedir'
20064 d_voidsig='$d_voidsig'
20065 d_voidtty='$d_voidtty'
20066 d_volatile='$d_volatile'
20067 d_vprintf='$d_vprintf'
20069 d_waitpid='$d_waitpid'
20070 d_wcstombs='$d_wcstombs'
20071 d_wctomb='$d_wctomb'
20072 d_writev='$d_writev'
20075 db_hashtype='$db_hashtype'
20076 db_prefixtype='$db_prefixtype'
20077 db_version_major='$db_version_major'
20078 db_version_minor='$db_version_minor'
20079 db_version_patch='$db_version_patch'
20080 defvoidused='$defvoidused'
20081 direntrytype='$direntrytype'
20084 doublesize='$doublesize'
20086 drand48_r_proto='$drand48_r_proto'
20087 dynamic_ext='$dynamic_ext'
20093 endgrent_r_proto='$endgrent_r_proto'
20094 endhostent_r_proto='$endhostent_r_proto'
20095 endnetent_r_proto='$endnetent_r_proto'
20096 endprotoent_r_proto='$endprotoent_r_proto'
20097 endpwent_r_proto='$endpwent_r_proto'
20098 endservent_r_proto='$endservent_r_proto'
20099 eunicefix='$eunicefix'
20102 extensions='$extensions'
20104 fflushNULL='$fflushNULL'
20105 fflushall='$fflushall'
20107 firstmakefile='$firstmakefile'
20109 fpossize='$fpossize'
20110 fpostype='$fpostype'
20111 freetype='$freetype'
20114 full_csh='$full_csh'
20115 full_sed='$full_sed'
20116 gccosandvers='$gccosandvers'
20117 gccversion='$gccversion'
20118 getgrent_r_proto='$getgrent_r_proto'
20119 getgrgid_r_proto='$getgrgid_r_proto'
20120 getgrnam_r_proto='$getgrnam_r_proto'
20121 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
20122 gethostbyname_r_proto='$gethostbyname_r_proto'
20123 gethostent_r_proto='$gethostent_r_proto'
20124 getlogin_r_proto='$getlogin_r_proto'
20125 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
20126 getnetbyname_r_proto='$getnetbyname_r_proto'
20127 getnetent_r_proto='$getnetent_r_proto'
20128 getprotobyname_r_proto='$getprotobyname_r_proto'
20129 getprotobynumber_r_proto='$getprotobynumber_r_proto'
20130 getprotoent_r_proto='$getprotoent_r_proto'
20131 getpwent_r_proto='$getpwent_r_proto'
20132 getpwnam_r_proto='$getpwnam_r_proto'
20133 getpwuid_r_proto='$getpwuid_r_proto'
20134 getservbyname_r_proto='$getservbyname_r_proto'
20135 getservbyport_r_proto='$getservbyport_r_proto'
20136 getservent_r_proto='$getservent_r_proto'
20137 getspnam_r_proto='$getspnam_r_proto'
20138 gidformat='$gidformat'
20144 gmtime_r_proto='$gmtime_r_proto'
20145 gnulibc_version='$gnulibc_version'
20147 groupcat='$groupcat'
20148 groupstype='$groupstype'
20151 h_sysfile='$h_sysfile'
20162 i_arpainet='$i_arpainet'
20163 i_bsdioctl='$i_bsdioctl'
20167 i_dirent='$i_dirent'
20173 i_fp_class='$i_fp_class'
20176 i_ieeefp='$i_ieeefp'
20177 i_inttypes='$i_inttypes'
20178 i_langinfo='$i_langinfo'
20179 i_libutil='$i_libutil'
20180 i_limits='$i_limits'
20181 i_locale='$i_locale'
20182 i_machcthr='$i_machcthr'
20183 i_malloc='$i_malloc'
20185 i_memory='$i_memory'
20186 i_mntent='$i_mntent'
20189 i_neterrno='$i_neterrno'
20190 i_netinettcp='$i_netinettcp'
20194 i_pthread='$i_pthread'
20196 i_rpcsvcdbm='$i_rpcsvcdbm'
20199 i_shadow='$i_shadow'
20201 i_stdarg='$i_stdarg'
20202 i_stddef='$i_stddef'
20203 i_stdlib='$i_stdlib'
20204 i_string='$i_string'
20205 i_sunmath='$i_sunmath'
20206 i_sysaccess='$i_sysaccess'
20207 i_sysdir='$i_sysdir'
20208 i_sysfile='$i_sysfile'
20209 i_sysfilio='$i_sysfilio'
20211 i_sysioctl='$i_sysioctl'
20212 i_syslog='$i_syslog'
20213 i_sysmman='$i_sysmman'
20214 i_sysmode='$i_sysmode'
20215 i_sysmount='$i_sysmount'
20216 i_sysndir='$i_sysndir'
20217 i_sysparam='$i_sysparam'
20218 i_sysresrc='$i_sysresrc'
20219 i_syssecrt='$i_syssecrt'
20220 i_sysselct='$i_sysselct'
20221 i_syssockio='$i_syssockio'
20222 i_sysstat='$i_sysstat'
20223 i_sysstatfs='$i_sysstatfs'
20224 i_sysstatvfs='$i_sysstatvfs'
20225 i_systime='$i_systime'
20226 i_systimek='$i_systimek'
20227 i_systimes='$i_systimes'
20228 i_systypes='$i_systypes'
20229 i_sysuio='$i_sysuio'
20231 i_sysutsname='$i_sysutsname'
20232 i_sysvfs='$i_sysvfs'
20233 i_syswait='$i_syswait'
20234 i_termio='$i_termio'
20235 i_termios='$i_termios'
20237 i_unistd='$i_unistd'
20240 i_values='$i_values'
20241 i_varargs='$i_varargs'
20242 i_varhdr='$i_varhdr'
20244 ignore_versioned_solibs='$ignore_versioned_solibs'
20245 inc_version_list='$inc_version_list'
20246 inc_version_list_init='$inc_version_list_init'
20249 installarchlib='$installarchlib'
20250 installbin='$installbin'
20251 installman1dir='$installman1dir'
20252 installman3dir='$installman3dir'
20253 installprefix='$installprefix'
20254 installprefixexp='$installprefixexp'
20255 installprivlib='$installprivlib'
20256 installscript='$installscript'
20257 installsitearch='$installsitearch'
20258 installsitebin='$installsitebin'
20259 installsitelib='$installsitelib'
20260 installstyle='$installstyle'
20261 installusrbinperl='$installusrbinperl'
20262 installvendorarch='$installvendorarch'
20263 installvendorbin='$installvendorbin'
20264 installvendorlib='$installvendorlib'
20266 issymlink='$issymlink'
20267 ivdformat='$ivdformat'
20270 known_extensions='$known_extensions'
20273 lddlflags='$lddlflags'
20275 ldflags_uselargefiles='$ldflags_uselargefiles'
20276 ldlibpthname='$ldlibpthname'
20283 libsdirs='$libsdirs'
20284 libsfiles='$libsfiles'
20285 libsfound='$libsfound'
20286 libspath='$libspath'
20287 libswanted='$libswanted'
20288 libswanted_uselargefiles='$libswanted_uselargefiles'
20294 localtime_r_proto='$localtime_r_proto'
20295 locincpth='$locincpth'
20296 loclibpth='$loclibpth'
20297 longdblsize='$longdblsize'
20298 longlongsize='$longlongsize'
20299 longsize='$longsize'
20303 lseeksize='$lseeksize'
20304 lseektype='$lseektype'
20308 make_set_make='$make_set_make'
20309 mallocobj='$mallocobj'
20310 mallocsrc='$mallocsrc'
20311 malloctype='$malloctype'
20313 man1direxp='$man1direxp'
20316 man3direxp='$man3direxp'
20318 mips_type='$mips_type'
20320 mmaptype='$mmaptype'
20321 modetype='$modetype'
20323 multiarch='$multiarch'
20325 myarchname='$myarchname'
20326 mydomain='$mydomain'
20327 myhostname='$myhostname'
20330 need_va_copy='$need_va_copy'
20331 netdb_hlen_type='$netdb_hlen_type'
20332 netdb_host_type='$netdb_host_type'
20333 netdb_name_type='$netdb_name_type'
20334 netdb_net_type='$netdb_net_type'
20337 nm_so_opt='$nm_so_opt'
20338 nonxs_ext='$nonxs_ext'
20340 nvEUformat='$nvEUformat'
20341 nvFUformat='$nvFUformat'
20342 nvGUformat='$nvGUformat'
20343 nv_preserves_uv_bits='$nv_preserves_uv_bits'
20344 nveformat='$nveformat'
20345 nvfformat='$nvfformat'
20346 nvgformat='$nvgformat'
20349 o_nonblock='$o_nonblock'
20351 old_pthread_create_joinable='$old_pthread_create_joinable'
20352 optimize='$optimize'
20353 orderlib='$orderlib'
20356 otherlibdirs='$otherlibdirs'
20360 patchlevel='$patchlevel'
20361 path_sep='$path_sep'
20364 perl_patchlevel='$perl_patchlevel'
20365 perladmin='$perladmin'
20366 perllibs='$perllibs'
20367 perlpath='$perlpath'
20369 phostname='$phostname'
20372 pm_apiversion='$pm_apiversion'
20376 prefixexp='$prefixexp'
20378 privlibexp='$privlibexp'
20379 procselfexe='$procselfexe'
20380 prototype='$prototype'
20382 quadkind='$quadkind'
20383 quadtype='$quadtype'
20384 randbits='$randbits'
20385 randfunc='$randfunc'
20386 random_r_proto='$random_r_proto'
20387 randseedtype='$randseedtype'
20389 rd_nodata='$rd_nodata'
20390 readdir64_r_proto='$readdir64_r_proto'
20391 readdir_r_proto='$readdir_r_proto'
20392 revision='$revision'
20397 sPRIEUldbl='$sPRIEUldbl'
20398 sPRIFUldbl='$sPRIFUldbl'
20399 sPRIGUldbl='$sPRIGUldbl'
20400 sPRIXU64='$sPRIXU64'
20402 sPRIeldbl='$sPRIeldbl'
20403 sPRIfldbl='$sPRIfldbl'
20404 sPRIgldbl='$sPRIgldbl'
20409 sSCNfldbl='$sSCNfldbl'
20410 sched_yield='$sched_yield'
20411 scriptdir='$scriptdir'
20412 scriptdirexp='$scriptdirexp'
20414 seedfunc='$seedfunc'
20415 selectminbits='$selectminbits'
20416 selecttype='$selecttype'
20417 sendmail='$sendmail'
20418 setgrent_r_proto='$setgrent_r_proto'
20419 sethostent_r_proto='$sethostent_r_proto'
20420 setlocale_r_proto='$setlocale_r_proto'
20421 setnetent_r_proto='$setnetent_r_proto'
20422 setprotoent_r_proto='$setprotoent_r_proto'
20423 setpwent_r_proto='$setpwent_r_proto'
20424 setservent_r_proto='$setservent_r_proto'
20427 sharpbang='$sharpbang'
20428 shmattype='$shmattype'
20429 shortsize='$shortsize'
20432 sig_count='$sig_count'
20433 sig_name='$sig_name'
20434 sig_name_init='$sig_name_init'
20436 sig_num_init='$sig_num_init'
20437 sig_size='$sig_size'
20438 signal_t='$signal_t'
20439 sitearch='$sitearch'
20440 sitearchexp='$sitearchexp'
20442 sitebinexp='$sitebinexp'
20444 sitelib_stem='$sitelib_stem'
20445 sitelibexp='$sitelibexp'
20446 siteprefix='$siteprefix'
20447 siteprefixexp='$siteprefixexp'
20448 sizesize='$sizesize'
20449 sizetype='$sizetype'
20453 sockethdr='$sockethdr'
20454 socketlib='$socketlib'
20455 socksizetype='$socksizetype'
20457 spackage='$spackage'
20458 spitshell='$spitshell'
20459 srand48_r_proto='$srand48_r_proto'
20460 srandom_r_proto='$srandom_r_proto'
20462 ssizetype='$ssizetype'
20463 startperl='$startperl'
20465 static_ext='$static_ext'
20467 stdio_base='$stdio_base'
20468 stdio_bufsiz='$stdio_bufsiz'
20469 stdio_cnt='$stdio_cnt'
20470 stdio_filbuf='$stdio_filbuf'
20471 stdio_ptr='$stdio_ptr'
20472 stdio_stream_array='$stdio_stream_array'
20473 strerror_r_proto='$strerror_r_proto'
20476 subversion='$subversion'
20480 targetarch='$targetarch'
20484 timeincl='$timeincl'
20485 timetype='$timetype'
20486 tmpnam_r_proto='$tmpnam_r_proto'
20492 ttyname_r_proto='$ttyname_r_proto'
20501 uidformat='$uidformat'
20507 uquadtype='$uquadtype'
20508 use5005threads='$use5005threads'
20509 use64bitall='$use64bitall'
20510 use64bitint='$use64bitint'
20511 usecrosscompile='$usecrosscompile'
20513 useithreads='$useithreads'
20514 uselargefiles='$uselargefiles'
20515 uselongdouble='$uselongdouble'
20516 usemorebits='$usemorebits'
20517 usemultiplicity='$usemultiplicity'
20518 usemymalloc='$usemymalloc'
20520 useopcode='$useopcode'
20521 useperlio='$useperlio'
20522 useposix='$useposix'
20523 usereentrant='$usereentrant'
20525 useshrplib='$useshrplib'
20526 usesocks='$usesocks'
20527 usethreads='$usethreads'
20528 usevendorprefix='$usevendorprefix'
20529 usevfork='$usevfork'
20532 uvXUformat='$uvXUformat'
20533 uvoformat='$uvoformat'
20536 uvuformat='$uvuformat'
20537 uvxformat='$uvxformat'
20538 vendorarch='$vendorarch'
20539 vendorarchexp='$vendorarchexp'
20540 vendorbin='$vendorbin'
20541 vendorbinexp='$vendorbinexp'
20542 vendorlib='$vendorlib'
20543 vendorlib_stem='$vendorlib_stem'
20544 vendorlibexp='$vendorlibexp'
20545 vendorprefix='$vendorprefix'
20546 vendorprefixexp='$vendorprefixexp'
20548 version_patchlevel_string='$version_patchlevel_string'
20549 versiononly='$versiononly'
20551 voidflags='$voidflags'
20553 xs_apiversion='$xs_apiversion'
20555 yaccflags='$yaccflags'
20560 : Add in command line options if available
20561 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
20563 : add special variables
20564 $test -f $src/patchlevel.h && \
20565 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
20566 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
20567 echo "PERL_CONFIG_SH=true" >>config.sh
20569 : propagate old symbols
20570 if $test -f UU/config.sh; then
20571 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
20572 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
20573 $sort | $uniq -u >UU/oldsyms
20574 set X `cat UU/oldsyms`
20580 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
20582 echo "# Variables propagated from previous config.sh file." >>config.sh
20583 for sym in `cat UU/oldsyms`; do
20584 echo " Propagating $hint variable "'$'"$sym..."
20585 eval 'tmp="$'"${sym}"'"'
20587 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
20593 : Finish up by extracting the .SH files
20597 echo "Extraction done."
20607 If you'd like to make any changes to the config.sh file before I begin
20608 to configure things, do it as a shell escape now (e.g. !vi config.sh).
20611 rp="Press return or use a shell escape to edit config.sh:"
20616 *) : in case they cannot read
20617 sh 1>&4 -c "$ans";;
20622 : if this fails, just run all the .SH files by hand
20631 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
20638 Now you need to generate make dependencies by running "$make depend".
20639 You might prefer to run it in background: "$make depend > makedepend.out &"
20640 It can take a while, so you might not want to run it right now.
20645 rp="Run $make depend now?"
20649 $make depend && echo "Now you must run '$make'."
20652 echo "You must run '$make depend' then '$make'."
20655 elif test -f [Mm]akefile; then
20657 echo "Now you must run a $make."
20659 echo "Configure done."
20662 if $test -f Policy.sh; then
20665 If you compile $package on a different machine or from a different object
20666 directory, copy the Policy.sh file from this object directory to the
20667 new one before you run Configure -- this will help you with most of
20668 the policy defaults.
20672 if $test -f config.msg; then
20673 echo "Hmm. I also noted the following information while running:"
20675 $cat config.msg >&4
20678 $rm -f kit*isdone ark*isdone