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 Sun Apr 24 14:17:04 CEST 2005 [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 if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
53 *** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do
54 *** Configure that well. (Plan 9 is close to UNIX but not close enough.)
55 *** Please read the README.plan9 for further instructions.
56 *** Cannot continue, aborting.
62 : compute my invocation name
66 me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
71 : Proper separator for the PATH environment variable
73 : On OS/2 this directory should exist if this is not floppy only system :-]
74 if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then
75 if test -n "$OS2_SHELL"; then
77 PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
78 OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
80 elif test -n "$DJGPP"; then
81 case "X${MACHTYPE:-nonesuchmach}" in
89 paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
90 paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
91 paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
92 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
93 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
94 paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
95 paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
96 paths="$paths /sbin /usr/sbin /usr/libexec"
97 paths="$paths /system/gnu_library/bin"
101 case "$p_$PATH$p_" in
103 *) test -d $p && PATH=$PATH$p_$p ;;
110 : shall we be using ksh?
116 if (PATH=.; alias -x) >/dev/null 2>&1; then
119 if test -f /hp-ux -a -f /bin/ksh; then
120 needksh='to avoid sh bug in "here document" expansion'
122 if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
123 if test X`/usr/bin/uname -v` = X4; then
124 avoidksh="to avoid AIX 4's /bin/sh"
128 if test -f /osf_boot -a -f /usr/sbin/setld; then
129 if test X`/usr/bin/uname -s` = XOSF1; then
130 avoidksh="to avoid Digital UNIX' ksh"
132 unset BIN_SH # if this is 'xpg4' sh will start up ksh
135 case "$inksh/$needksh" in
142 case "$inksh/$avoidksh" in
148 case "$inksh/$needksh-$avoidksh-" in
151 (I see you are using the Korn shell. Some ksh's blow up on $me,
152 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
159 echo "(Feeding myself to $newsh $reason.)"
161 Configure|*/Configure) exec $newsh $0 "$@";;
162 *) exec $newsh Configure "$@";;
167 : if needed set CDPATH to a harmless value that is not chatty
168 : avoid bash 2.02 problems with empty CDPATH.
172 *bash*) CDPATH='.' ;;
177 : Configure runs within the UU subdirectory
178 test -d UU || mkdir UU
342 d_attribute_format=''
343 d_attribute_malloc=''
344 d_attribute_nonnull=''
345 d_attribute_noreturn=''
347 d_attribute_unused=''
348 d_attribute_warn_unused_result=''
394 endhostent_r_proto=''
400 endprotoent_r_proto=''
406 endservent_r_proto=''
457 gethostbyaddr_r_proto=''
459 gethostbyname_r_proto=''
461 gethostent_r_proto=''
473 getnetbyaddr_r_proto=''
475 getnetbyname_r_proto=''
489 d_getprotobyname_r=''
490 getprotobyname_r_proto=''
491 d_getprotobynumber_r=''
492 getprotobynumber_r_proto=''
494 getprotoent_r_proto=''
506 getservbyname_r_proto=''
508 getservbyport_r_proto=''
510 getservent_r_proto=''
534 d_libm_lib_version=''
587 d_old_pthread_create_joinable=''
588 old_pthread_create_joinable=''
590 d_pthread_attr_setscope=''
629 sethostent_r_proto=''
646 setprotoent_r_proto=''
658 setservent_r_proto=''
703 d_stdio_ptr_lval_nochange_cnt=''
704 d_stdio_ptr_lval_sets_cnt=''
907 inc_version_list_init=''
926 ignore_versioned_solibs=''
986 d_perl_otherlibdirs=''
1000 version_patchlevel_string=''
1004 d_nv_preserves_uv=''
1015 nv_preserves_uv_bits=''
1086 installsitehtml1dir=''
1089 installsitehtml3dir=''
1096 installsiteman1dir=''
1099 installsiteman3dir=''
1104 installsitescript=''
1119 d_stdio_stream_array=''
1120 stdio_stream_array=''
1131 ccflags_uselargefiles=''
1132 ldflags_uselargefiles=''
1133 libswanted_uselargefiles=''
1143 userelocatableinc=''
1154 installvendorarch=''
1161 installvendorhtml1dir=''
1163 vendorhtml1direxp=''
1164 installvendorhtml3dir=''
1166 vendorhtml3direxp=''
1172 installvendorman1dir=''
1175 installvendorman3dir=''
1182 installvendorscript=''
1194 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1197 : We must find out about Eunice early
1199 if test -f /etc/unixtovms; then
1200 eunicefix=/etc/unixtovms
1202 if test -f /etc/unixtovms.exe; then
1203 eunicefix=/etc/unixtovms.exe
1206 : Set executable suffix now -- needed before hints available
1207 if test -f "/libs/version.library"; then
1210 elif test -f "/system/gnu_library/bin/ar.pm"; then
1213 elif test -n "$DJGPP"; then
1216 elif test -d c:/. -o -n "$is_os2" ; then
1225 : set useposix=false in your hint file to disable the POSIX extension.
1227 : set useopcode=false in your hint file to disable the Opcode extension.
1229 : Trailing extension. Override this in a hint file, if needed.
1230 : Extra object files, if any, needed on this platform.
1233 : Possible local include directories to search.
1234 : Set locincpth to "" in a hint file to defeat local include searches.
1235 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1236 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1238 : no include file wanted by default
1243 : change the next line if compiling for Xenix/286 on Xenix/386
1244 xlibpth='/usr/lib/386 /lib/386'
1245 : Possible local library directories to search.
1246 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1247 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1249 : general looking path for locating libraries
1250 glibpth="/lib /usr/lib $xlibpth"
1251 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1252 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1253 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1255 : Private path used by Configure to find libraries. Its value
1256 : is prepended to libpth. This variable takes care of special
1257 : machines, like the mips. Usually, it should be empty.
1260 : default library list
1262 : some systems want to use only the non-versioned libso:s
1263 ignore_versioned_solibs=''
1268 ccflags_uselargefiles=''
1269 ldflags_uselargefiles=''
1270 libswanted_uselargefiles=''
1271 : set usemultiplicity on the Configure command line to enable multiplicity.
1272 : set usesocks on the Configure command line to enable socks.
1273 : set usethreads on the Configure command line to enable threads.
1274 usereentrant='undef'
1275 : full support for void wanted by default
1278 : List of libraries we want.
1279 : If anyone needs extra -lxxx, put those in a hint file.
1280 libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun"
1281 libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
1282 : We probably want to search /usr/shlib before most other libraries.
1283 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1284 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1285 glibpth="/usr/shlib $glibpth"
1286 : Do not use vfork unless overridden by a hint file.
1289 : Find the basic shell for Bourne shell scripts
1293 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1296 if test -f "$xxx"; then
1299 : Build up a list and do a single loop so we can 'break' out.
1300 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1301 for xxx in sh bash ksh pdksh ash; do
1303 try="$try ${p}/${xxx}"
1307 if test -f "$xxx"; then
1310 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1313 elif test -f "$xxx.exe"; then
1324 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1326 Usually it's in /bin/sh. How did you even get this far?
1327 Please contact me (Perl Maintainers) at perlbug@perl.org and
1328 we'll try to straighten this all out.
1334 : see if sh knows # comments
1335 if `$sh -c '#' >/dev/null 2>&1`; then
1339 test -f $xcat$_exe || xcat=/usr/bin/cat
1340 if test ! -f $xcat$_exe; then
1341 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1342 if test -f $p/cat$_exe; then
1347 if test ! -f $xcat$_exe; then
1348 echo "Can't find cat anywhere!"
1352 echo "#!$xcat" >sharp
1356 if test -s today; then
1359 echo "#! $xcat" > sharp
1363 if test -s today; then
1371 echo "Your $sh doesn't grok # comments--I will strip them later on."
1374 echo "exec grep -v '^[ ]*#'" >spitshell
1376 $eunicefix spitshell
1377 spitshell=`pwd`/spitshell
1379 echo "I presume that if # doesn't work, #! won't work either!"
1384 : figure out how to guarantee sh startup
1386 '') startsh=${sharpbang}${sh} ;;
1398 : echo "Yup, it does."
1400 echo "Hmm... '$startsh' does not guarantee sh startup..."
1401 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1406 : Save command line options in file UU/cmdline.opt for later use in
1407 : generating config.sh.
1408 cat > cmdline.opt <<EOSH
1409 # Configure command line arguments.
1418 cat >>cmdline.opt <<EOSH
1419 config_arg$argn='$arg'
1421 # Extreme backslashitis: replace each ' by '"'"'
1422 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1425 arg_exp=`cat cmdl.opt`
1426 args_exp="$args_exp$args_sep'$arg_exp'"
1427 argn=`expr $argn + 1`
1430 # args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
1431 # used by ./hints/os2.sh
1434 : produce awk script to parse command line options
1435 cat >options.awk <<'EOF'
1437 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1439 len = length(optstr);
1440 for (i = 1; i <= len; i++) {
1441 c = substr(optstr, i, 1);
1442 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1453 if (substr(str, 1, 1) != "-") {
1454 printf("'%s'\n", str);
1458 for (i = 2; i <= len; i++) {
1459 c = substr(str, i, 1);
1461 printf("-%s\n", substr(str, i));
1467 printf("'%s'\n", substr(str, i + 1));
1480 : process the command line options
1481 set X `for arg in "$@"; do echo "X$arg"; done |
1482 sed -e s/X// | awk -f options.awk`
1487 : set up default values
1497 rm -f optdef.sh posthint.sh
1498 cat >optdef.sh <<EOS
1504 while test $# -gt 0; do
1506 -d) shift; fastread=yes;;
1507 -e) shift; alldone=cont;;
1511 if test -r "$1"; then
1514 echo "$me: cannot read config file $1." >&2
1519 -h) shift; error=true;;
1520 -r) shift; reuseval=true;;
1521 -s) shift; silent=true; realsilent=true;;
1522 -E) shift; alldone=exit;;
1523 -K) shift; knowitall=true;;
1524 -O) shift; override=true;;
1525 -S) shift; silent=true; extractsh=true;;
1530 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1531 echo "$me: ignoring -D $1" >&2
1534 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1535 *) echo "$1='define'" >> optdef.sh;;
1542 *=) echo "$1" >> optdef.sh;;
1544 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1545 echo "$me: ignoring -U $1" >&2
1547 *) echo "$1='undef'" >> optdef.sh;;
1558 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
1562 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
1563 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1569 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1570 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1571 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1572 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1573 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1574 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
1580 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1582 echo "$yyy=''" >> posthint.sh ;;
1587 echo "$yyy='$zzz'" >> posthint.sh ;;
1589 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1591 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1596 echo "$yyy=$zzz" >> posthint.sh ;;
1597 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1601 -V) echo "$me generated by metaconfig 3.0 PL70." >&2
1604 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1612 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1613 [-U symbol] [-U symbol=] [-A command:symbol...]
1614 -d : use defaults for all answers.
1615 -e : go on without questioning past the production of config.sh.
1616 -f : specify an alternate default configuration file.
1617 -h : print this help message and exit (with an error status).
1618 -r : reuse C symbols value if possible (skips costly nm extraction).
1619 -s : silent mode, only echoes questions and essential information.
1620 -D : define symbol to have some value:
1621 -D symbol symbol gets the value 'define'
1622 -D symbol=value symbol gets the value 'value'
1623 -E : stop at the end of questions, after having produced config.sh.
1624 -K : do not use unless you know what you are doing.
1625 -O : let -D and -U override definitions from loaded configuration file.
1626 -S : perform variable substitutions on all .SH files (can mix with -f)
1627 -U : undefine symbol:
1628 -U symbol symbol gets the value 'undef'
1629 -U symbol= symbol gets completely empty
1630 -A : manipulate symbol after the platform specific hints have been applied:
1631 -A symbol=value append " "value to symbol
1632 -A append:symbol=value append value to symbol
1633 -A define:symbol=value define symbol to have value
1634 -A clear:symbol define symbol to be ''
1635 -A define:symbol define symbol to be 'define'
1636 -A eval:symbol=value define symbol to be eval of value
1637 -A prepend:symbol=value prepend value to symbol
1638 -A undef:symbol define symbol to be 'undef'
1639 -A undef:symbol= define symbol to be ''
1640 -V : print version number and exit (with a zero status).
1647 case "$fastread$alldone" in
1650 case "$extractsh" in
1653 if test ! -t 0; then
1654 echo "Say 'sh Configure', not 'sh <Configure'"
1664 true) exec 1>/dev/null;;
1667 : run the defines and the undefines, if any, but leave the file out there...
1670 : create the posthint manipulation script and leave the file out there...
1675 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1676 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1677 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1678 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1679 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1682 : Some greps do not return status, grrr.
1683 echo "grimblepritz" >grimble
1684 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1686 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1692 : the following should work in any shell
1696 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1697 cat >contains <<'EOSS'
1698 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1703 : Find the path to the source tree
1706 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1710 *) src=`cd ../$src && pwd` ;;
1723 if test -f $rsrc/Configure && \
1724 $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
1726 : found it, so we are ok.
1729 for src in . .. ../.. ../../.. ../../../..; do
1730 if test -f ../$src/Configure && \
1731 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1742 Sorry, I can't seem to locate the source dir for $package. Please start
1743 Configure with an explicit path -- i.e. /some/path/Configure.
1751 echo "Sources for $package found in \"$src\"." >&4
1755 : script used to extract .SH files with variable substitutions
1756 cat >extract <<'EOS'
1758 echo "Doing variable substitutions on .SH files..."
1759 if test -f MANIFEST; then
1760 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1762 echo "(Looking for .SH files under the source directory.)"
1763 set x `(cd "$src"; find . -name "*.SH" -print)`
1767 0) set x `(cd "$src"; echo *.SH)`; shift;;
1769 if test ! -f "$src/$1"; then
1775 while test $name; do
1776 if test ! -d "$name"; then
1777 create="$name $create";
1778 name=`echo $name | sed -e "s|^[^/]*$||"`;
1779 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1784 for file in $create; do
1793 dir=`expr X$file : 'X\(.*\)/'`
1794 file=`expr X$file : 'X.*/\(.*\)'`
1795 (cd "$dir" && . ./$file)
1805 dir=`expr X$file : 'X\(.*\)/'`
1806 file=`expr X$file : 'X.*/\(.*\)'`
1807 (set x $dir; shift; eval $mkdir_p)
1808 sh <"$src/$dir/$file"
1817 if test -f "$src/config_h.SH"; then
1818 if test ! -f config.h; then
1819 : oops, they left it out of MANIFEST, probably, so do it anyway.
1820 . "$src/config_h.SH"
1825 : extract files and exit if asked to do so
1826 case "$extractsh" in
1828 case "$realsilent" in
1832 case "$config_sh" in
1833 '') config_sh='config.sh';;
1836 echo "Fetching answers from $config_sh..."
1839 test "$override" && . ./optdef.sh
1843 echo "Extraction done."
1848 : Eunice requires " " instead of "", can you believe it
1851 echo "Beginning of configuration questions for $package."
1853 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1855 : first determine how to suppress newline on echo command
1857 echo "Checking echo to see how to suppress newlines..."
1858 (echo "hi there\c" ; echo " ") >.echotmp
1859 if $contains c .echotmp >/dev/null 2>&1 ; then
1870 echo $n "The star should be here-->$c"
1874 : Now test for existence of everything in MANIFEST
1876 if test -f "$rsrc/MANIFEST"; then
1877 echo "First let's make sure your kit is complete. Checking..." >&4
1878 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50)
1881 for filelist in x??; do
1882 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing")
1884 if test -s missing; then
1888 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1890 You have the option of continuing the configuration process, despite the
1891 distinct possibility that your kit is damaged, by typing 'y'es. If you
1892 do, don't blame me if something goes wrong. I advise you to type 'n'o
1893 and contact the author (perlbug@perl.org).
1896 echo $n "Continue? [n] $c" >&4
1900 echo "Continuing..." >&4
1904 echo "ABORTING..." >&4
1909 echo "Looks good..."
1912 echo "There is no MANIFEST file. I hope your kit is complete !"
1917 : Find the appropriate value for a newline for tr
1918 if test -n "$DJGPP"; then
1921 if test X"$trnl" = X; then
1922 case "`echo foo|tr '\n' x 2>/dev/null`" in
1926 if test X"$trnl" = X; then
1927 case "`echo foo|tr '\012' x 2>/dev/null`" in
1928 foox) trnl='\012' ;;
1931 if test X"$trnl" = X; then
1932 case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
1933 fooxy) trnl='\n\r' ;;
1936 if test X"$trnl" = X; then
1939 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1945 : compute the number of columns on the terminal for proper question formatting
1950 : set up the echo used in my read
1951 myecho="case \"\$xxxm\" in
1952 '') echo $n \"\$rp $c\" >&4;;
1954 '') echo $n \"[\$xxxm] $c\";;
1956 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
1958 echo $n \"[\$xxxm] $c\" >&4
1960 echo $n \"\$rp [\$xxxm] $c\" >&4
1966 : now set up to do reads with possible shell escape and default assignment
1972 case "\$fastread" in
1973 yes) case "\$dflt" in
1976 case "\$silent-\$rp" in
1981 *) case "\$silent" in
1982 true) case "\$rp" in
1987 while expr "X\$ans" : "X!" >/dev/null; do
1991 aok=''; eval "ans=\\"\$answ\\"" && aok=y
1999 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
2008 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
2013 echo "(OK, I'll run with -d after this question.)" >&4
2016 echo "*** Sorry, \$1 not supported yet." >&4
2026 echo "*** Substitution done -- please confirm."
2028 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
2033 echo "*** Error -- try again."
2040 case "\$ans\$xxxm\$nostick" in
2052 : create .config dir to save info across Configure sessions
2053 test -d ../.config || mkdir ../.config
2054 cat >../.config/README <<EOF
2055 This directory created by Configure to save information that should
2056 persist across sessions for $package.
2058 You may safely delete it if you wish.
2061 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
2063 $define|true|[yY]*) ;;
2064 *) case "$xversion" in
2067 *** WHOA THERE!!! ***
2069 This is an UNSTABLE DEVELOPMENT release.
2070 The version of this $package distribution is $xversion, that is, odd,
2071 (as opposed to even) and that signifies a development release.
2072 If you want a maintenance release, you want an even-numbered version.
2074 Do ***NOT*** install this into production use.
2075 Data corruption and crashes are possible.
2077 It is most seriously suggested that you do not continue any further
2078 unless you want to help in developing and debugging Perl.
2080 If you *still* want to build perl, you can answer 'y' now,
2081 or pass -Dusedevel to Configure.
2084 rp='Do you really want to continue?'
2088 [yY]) echo >&4 "Okay, continuing."
2089 usedevel="$define" ;;
2090 *) echo >&4 "Okay, bye."
2100 case "$versiononly" in
2101 '') versiononly="$define" ;;
2103 case "$installusrbinperl" in
2104 '') installusrbinperl="$undef" ;;
2109 : general instructions
2112 user=`(logname) 2>/dev/null`
2114 '') user=`whoami 2>&1`;;
2116 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2119 rp='Would you like to see the instructions?'
2130 This installation shell script will examine your system and ask you questions
2131 to determine how the perl5 package should be installed. If you get
2132 stuck on a question, you may use a ! shell escape to start a subshell or
2133 execute a command. Many of the questions will have default answers in square
2134 brackets; typing carriage return will give you the default.
2136 On some of the questions which ask for file or directory names you are allowed
2137 to use the ~name construct to specify the login directory belonging to "name",
2138 even if you don't have a shell which knows about that. Questions where this is
2139 allowed will be marked "(~name ok)".
2143 dflt='Type carriage return to continue'
2147 The prompter used in this script allows you to use shell variables and
2148 backticks in your answers. You may use $1, $2, etc... to refer to the words
2149 in the default answer, as if the default line was a set of arguments given to a
2150 script shell. This means you may also use $* to repeat the whole default line,
2151 so you do not have to re-type everything to add something to the default.
2153 Everytime there is a substitution, you will have to confirm. If there is an
2154 error (e.g. an unmatched backtick), the default answer will remain unchanged
2155 and you will be prompted again.
2157 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2158 the questions and use the computed defaults (or the previous answers if there
2159 was already a config.sh file). Type 'Configure -h' for a list of options.
2160 You may also start interactively and then answer '& -d' at any prompt to turn
2161 on the non-interactive behaviour for the remainder of the execution.
2167 Much effort has been expended to ensure that this shell script will run on any
2168 Unix system. If despite that it blows up on yours, your best bet is to edit
2169 Configure and run it again. If you can't run Configure for some reason,
2170 you'll have to generate a config.sh file by hand. Whatever problems you
2171 have, let me (perlbug@perl.org) know how I blew it.
2173 This installation script affects things in two ways:
2175 1) it may do direct variable substitutions on some of the files included
2177 2) it builds a config.h file for inclusion in C programs. You may edit
2178 any of these files as the need arises after running this script.
2180 If you make a mistake on a question, there is no easy way to back up to it
2181 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2182 files. Configure will offer to let you do this before it runs the SH files.
2185 dflt='Type carriage return to continue'
2187 case "$firsttime" in
2188 true) echo $user >>../.config/instruct;;
2192 : find out where common programs are
2194 echo "Locating common programs..." >&4
2207 if test -d \$dir/\$thing; then
2213 for thisthing in \$dir/\$thing; do
2214 : just loop through to pick last item
2216 if test -f \$thisthing; then
2219 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2222 elif test -f \$dir/\$thing.exe; then
2223 if test -n "$DJGPP"; then
2224 echo \$dir/\$thing.exe
2225 elif test "$eunicefix" != ":"; then
2226 : on Eunice apparently
2280 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2281 pth="$pth /lib /usr/lib"
2282 for file in $loclist; do
2286 if test -f "$xxx"; then
2289 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2290 xxx=`./loc $file $file $pth`
2293 '') xxx=`./loc $file $file $pth`;;
2294 *) xxx=`./loc $xxx $xxx $pth`;;
2296 eval $file=$xxx$_exe
2300 echo $file is in $xxx.
2303 echo $file is in $xxx.
2306 echo "I don't know where '$file' is, and my life depends on it." >&4
2307 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2313 echo "Don't worry if any of the following aren't found..."
2315 for file in $trylist; do
2319 if test -f "$xxx"; then
2322 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2323 xxx=`./loc $file $file $pth`
2326 '') xxx=`./loc $file $file $pth`;;
2327 *) xxx=`./loc $xxx $xxx $pth`;;
2329 eval $file=$xxx$_exe
2333 echo $file is in $xxx.
2336 echo $file is in $xxx.
2339 echo "I don't see $file out there, $say."
2346 echo "Substituting grep for egrep."
2353 echo "Substituting cp for ln."
2362 echo "I can't find make or gmake, and my life depends on it." >&4
2363 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2371 *) # We can't have osname yet.
2372 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2373 # Assume that gmake, if found, is definitely GNU make
2374 # and prefer it over the system make.
2375 echo "Substituting gmake for make."
2383 echo "Hopefully test is built into your sh."
2386 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2387 echo "Using the test built into your sh."
2395 echo "Hopefully echo is built into your sh."
2400 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2401 $echo $n "hi there$c" >foo1
2402 echo $n "hi there$c" >foo2
2403 if cmp foo1 foo2 >/dev/null 2>&1; then
2404 echo "They are compatible. In fact, they may be identical."
2411 They are not compatible! You are probably running ksh on a non-USG system.
2412 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2413 have echo built in and we may have to run some Bourne shell scripts. That
2414 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2417 $echo $n "The star should be here-->$c"
2427 cat <<'EOSC' >>trygcc
2432 int main(int argc, char *argv[]) {
2436 if $cc -o try $ccflags $ldflags try.c; then
2439 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2445 case "`$cc -v -c try.c 2>&1`" in
2448 if $test X"$trygcc" = Xyes; then
2449 if gcc -o try -c try.c; then
2451 echo "You seem to have a working gcc, though." >&4
2452 rp="Would you like to use it?"
2454 if $test -f myread; then
2457 if $test -f UU/myread; then
2460 echo "Cannot find myread, sorry. Aborting." >&2
2465 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2466 if $test -f usethreads.cbu; then
2469 *** However, any setting of the C compiler flags (e.g. for thread support)
2470 *** has been lost. It may be necessary to pass -Dcc=gcc to Configure
2471 *** (together with e.g. -Dusethreads).
2487 cat <<'EOSC' >>checkcc
2492 int main(int argc, char *argv[]) {
2496 if $cc -o try $ccflags $ldflags try.c; then
2499 if $test X"$despair" = Xyes; then
2500 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2503 You need to find a working C compiler.
2504 Either (purchase and) install the C compiler supplied by your OS vendor,
2505 or for a free C compiler try http://gcc.gnu.org/
2506 I cannot continue any further, aborting.
2515 : determine whether symbolic links are supported
2518 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2519 echo "Symbolic links are supported." >&4
2522 echo "Symbolic links are NOT supported." >&4
2527 : determine whether symbolic links are supported
2531 echo "Checking how to test for symbolic links..." >&4
2533 if $test "X$issymlink" = X; then
2535 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2536 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2538 if test $? = 0; then
2541 echo "Your builtin 'test -h' may be broken." >&4
2544 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2547 if test -f "$p/$test"; then
2556 echo "Trying external '$test -h'." >&4
2557 issymlink="$test -h"
2558 if $test ! -h sym >/dev/null 2>&1; then
2559 echo "External '$test -h' is broken, too." >&4
2567 if $test "X$issymlink" = X; then
2568 if $test -L sym 2>/dev/null; then
2569 issymlink="$test -L"
2570 echo "The builtin '$test -L' worked." >&4
2573 if $test "X$issymlink" != X; then
2574 echo "You can test for symbolic links with '$issymlink'." >&4
2576 echo "I do not know how you can test for symbolic links." >&4
2580 *) echo "No symbolic links, so not testing for their testing..." >&4
2586 case "$mksymlinks" in
2589 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2592 *) case "$lns:$issymlink" in
2593 *"ln"*" -s:"*"test -"?)
2594 echo "Creating the symbolic links..." >&4
2595 echo "(First creating the subdirectories...)" >&4
2597 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2599 test -z "$directory" && break
2603 if test ! -d t/base; then
2604 echo "Failed to create the subdirectories. Aborting." >&4
2607 echo "(Then creating the symlinks...)" >&4
2608 awk '{print $1}' $src/MANIFEST | while true; do
2610 test -z "$filename" && break
2611 if test -f $filename; then
2612 if $issymlink $filename; then
2616 if test -f $filename; then
2617 echo "$filename already exists, not symlinking."
2619 ln -s $src/$filename $filename
2623 if test ! -f t/base/lex.t; then
2624 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2629 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2638 case "$usecrosscompile" in
2640 $echo "Cross-compiling..."
2643 *-*-gcc) # A cross-compiling gcc, probably.
2644 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2646 # leave out ld, choosing it is more complex
2648 ranlib=$targetarch-ranlib
2649 $echo 'extern int foo;' > try.c
2650 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2652 if $test $# -gt 0; then
2654 incpth="`$echo $incpth|$sed 's/^ //'`"
2655 echo "Guessing incpth '$incpth'." >&4
2657 j="`$echo $i|$sed 's,/include$,/lib,'`"
2658 if $test -d $j; then
2662 libpth="`$echo $libpth|$sed 's/^ //'`"
2663 echo "Guessing libpth '$libpth'." >&4
2668 case "$targetarch" in
2669 '') echo "Targetarch not defined." >&4; croak=y ;;
2670 *) echo "Using targetarch $targetarch." >&4 ;;
2673 '') echo "Incpth not defined." >&4; croak=y ;;
2674 *) echo "Using incpth '$incpth'." >&4 ;;
2677 '') echo "Libpth not defined." >&4; croak=y ;;
2678 *) echo "Using libpth '$libpth'." >&4 ;;
2681 '') for i in $incpth; do
2682 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2684 echo "Guessing usrinc $usrinc." >&4
2689 '') echo "Usrinc not defined." >&4; croak=y ;;
2692 *) echo "Using usrinc $usrinc." >&4 ;;
2694 case "$targethost" in
2695 '') echo "Targethost not defined." >&4; croak=y ;;
2696 *) echo "Using targethost $targethost." >&4
2701 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2704 /*) run=$src/Cross/run
2705 targetmkdir=$src/Cross/mkdir
2707 from=$src/Cross/from
2709 *) pwd=`$test -f ../Configure & cd ..; pwd`
2711 targetmkdir=$pwd/Cross/mkdir
2713 from=$pwd/Cross/from
2716 case "$targetrun" in
2717 '') targetrun=ssh ;;
2722 case "$targetfrom" in
2723 '') targetfrom=scp ;;
2727 from=$from-$targetfrom
2728 case "$targetdir" in
2730 echo "Guessing targetdir $targetdir." >&4
2733 case "$targetuser" in
2735 echo "Guessing targetuser $targetuser." >&4
2738 case "$targetfrom" in
2742 case "$targetrun" in
2754 '') cwd=$targetdir ;;
2758 if $test ! -f \$exe.xok; then
2762 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2765 *) echo "Unknown targetrun '$targetrun'" >&4
2769 case "$targetmkdir" in
2771 cat >$targetmkdir <<EOF
2773 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2775 $chmod a+rx $targetmkdir
2777 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2789 $targetmkdir \`dirname \$f\`
2790 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2793 $targetmkdir $targetdir/\`dirname \$f\`
2794 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2807 $mkdir -p $targetdir/\`dirname \$f\`
2808 $cp \$f $targetdir/\$f || exit 1
2811 $targetmkdir $targetdir/\`dirname \$f\`
2812 $cp \$f $targetdir/\$f || exit 1
2819 *) echo "Unknown targetto '$targetto'" >&4
2823 case "$targetfrom" in
2830 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2835 cp) cat >$from <<EOF
2840 cp $targetdir/\$f . || exit 1
2845 *) echo "Unknown targetfrom '$targetfrom'" >&4
2849 if $test ! -f $run; then
2850 echo "Target 'run' script '$run' not found." >&4
2854 if $test ! -f $to; then
2855 echo "Target 'to' script '$to' not found." >&4
2859 if $test ! -f $from; then
2860 echo "Target 'from' script '$from' not found." >&4
2864 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2868 Using '$run' for remote execution,
2869 and '$from' and '$to'
2870 for remote file transfer.
2876 usecrosscompile='undef'
2881 : see whether [:lower:] and [:upper:] are supported character classes
2883 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2885 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2889 *) # There is a discontinuity in EBCDIC between 'R' and 'S'
2890 # (0xd9 and 0xe2), therefore that is a nice testing point.
2891 if test "X$up" = X -o "X$low" = X; then
2892 case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in
2898 if test "X$up" = X -o "X$low" = X; then
2899 case "`echo RS | $tr R-S r-s 2>/dev/null`" in
2905 if test "X$up" = X -o "X$low" = X; then
2906 case "`echo RS | od -x 2>/dev/null`" in
2908 echo "Hey, this might be EBCDIC." >&4
2909 if test "X$up" = X -o "X$low" = X; then
2910 case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2911 rs) up='[A-IJ-RS-Z]'
2916 if test "X$up" = X -o "X$low" = X; then
2917 case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2927 case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in
2929 echo "Using $up and $low to convert case." >&4
2932 echo "I don't know how to translate letters from upper to lower case." >&4
2933 echo "Your tr is not acting any way I know of." >&4
2937 : set up the translation script tr, must be called with ./tr of course
2941 '[A-Z][a-z]') exec $tr '$up' '$low';;
2942 '[a-z][A-Z]') exec $tr '$low' '$up';;
2949 : Try to determine whether config.sh was made on this system
2950 case "$config_sh" in
2952 myuname=`$uname -a 2>/dev/null`
2953 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2954 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2955 # because the A-Z/a-z are not consecutive.
2956 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2957 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2958 newmyuname="$myuname"
2960 case "$knowitall" in
2962 if test -f ../config.sh; then
2963 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2964 eval "`grep myuname= ../config.sh`"
2966 if test "X$myuname" = "X$newmyuname"; then
2974 : Get old answers from old config file if Configure was run on the
2975 : same system, otherwise use the hints.
2978 if test -f config.sh; then
2980 rp="I see a config.sh file. Shall I use it to set the defaults?"
2983 n*|N*) echo "OK, I'll ignore it."
2984 mv config.sh config.sh.old
2985 myuname="$newmyuname"
2987 *) echo "Fetching default answers from your old config.sh file..." >&4
2995 : Older versions did not always set $sh. Catch re-use of such
3005 if test ! -f config.sh; then
3008 First time through, eh? I have some defaults handy for some systems
3009 that need some extra help getting the Configure answers right:
3012 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
3014 : Half the following guesses are probably wrong... If you have better
3015 : tests or hints, please send them to perlbug@perl.org
3016 : The metaconfig authors would also appreciate a copy...
3017 $test -f /irix && osname=irix
3018 $test -f /xenix && osname=sco_xenix
3019 $test -f /dynix && osname=dynix
3020 $test -f /dnix && osname=dnix
3021 $test -f /lynx.os && osname=lynxos
3022 $test -f /unicos && osname=unicos && osvers=`$uname -r`
3023 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
3024 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
3025 $test -f /bin/mips && /bin/mips && osname=mips
3026 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
3027 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
3028 $test -d /usr/apollo/bin && osname=apollo
3029 $test -f /etc/saf/_sactab && osname=svr4
3030 $test -d /usr/include/minix && osname=minix
3031 $test -f /system/gnu_library/bin/ar.pm && osname=vos
3032 if $test -d /MachTen -o -d /MachTen_Folder; then
3034 if $test -x /sbin/version; then
3035 osvers=`/sbin/version | $awk '{print $2}' |
3036 $sed -e 's/[A-Za-z]$//'`
3037 elif $test -x /usr/etc/version; then
3038 osvers=`/usr/etc/version | $awk '{print $2}' |
3039 $sed -e 's/[A-Za-z]$//'`
3045 $test -f /sys/posix.dll &&
3046 $test -f /usr/bin/what &&
3047 set X `/usr/bin/what /sys/posix.dll` &&
3048 $test "$3" = UWIN &&
3052 if $test -f $uname; then
3060 umips) osname=umips ;;
3063 [23]100) osname=mips ;;
3064 next*) osname=next ;;
3066 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
3067 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
3070 elif $test -f /etc/kconfig; then
3072 if test "$lns" = "$ln -s"; then
3074 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3076 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3083 if test -n "$DJGPP"; then
3092 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3094 # oslevel can fail with:
3095 # oslevel: Unable to acquire lock.
3096 *not\ found) osvers="$4"."$3" ;;
3097 '<3240'|'<>3240') osvers=3.2.0 ;;
3098 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3099 '=3250'|'>3250') osvers=3.2.5 ;;
3103 bsd386) osname=bsd386
3106 cygwin*) osname=cygwin
3109 *dc.osx) osname=dcosx
3115 domainos) osname=apollo
3121 dynixptx*) osname=dynixptx
3122 osvers=`echo "$4"|sed 's/^v//'`
3124 freebsd) osname=freebsd
3126 genix) osname=genix ;;
3130 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3146 netbsd*) osname=netbsd
3149 news-os) osvers="$3"
3151 4*) osname=newsos4 ;;
3155 next*) osname=next ;;
3156 nonstop-ux) osname=nonstopux ;;
3157 openbsd) osname=openbsd
3163 POSIX-BC | posix-bc ) osname=posix-bc
3166 powerux | power_ux | powermax_os | powermaxos | \
3167 powerunix | power_unix) osname=powerux
3173 solaris) osname=solaris
3175 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3182 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3186 titanos) osname=titanos
3195 ultrix) osname=ultrix
3198 osf1|mls+) case "$5" in
3201 osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3204 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3207 hp*) osname=hp_osf1 ;;
3208 mips) osname=mips_osf1 ;;
3211 # UnixWare 7.1.2 is known as Open UNIX 8
3212 openunix|unixware) osname=svr5
3220 $2) case "$osname" in
3224 : svr4.x or possibly later
3234 if test -f /stand/boot ; then
3235 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3236 if test -n "$INITPROG" -a -f "$INITPROG"; then
3237 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3238 if test -n "$isesix"; then
3246 *) if test -f /etc/systemid; then
3248 set `echo $3 | $sed 's/\./ /g'` $4
3249 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3251 elif $test -f $src/hints/sco_$1_$2.sh; then
3253 elif $test -f $src/hints/sco_$1.sh; then
3258 '') : Still unknown. Probably a generic Sys V.
3267 *) case "$osname" in
3268 '') : Still unknown. Probably a generic BSD.
3276 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3277 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3278 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3281 $rm -f UU/kernel.what
3282 elif test -d c:/. -o -n "$is_os2" ; then
3289 case "$targetarch" in
3292 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3297 : Now look for a hint file osname_osvers, unless one has been
3298 : specified already.
3301 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3302 : Also try without trailing minor version numbers.
3303 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3304 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3305 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3306 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3309 *) case "$osvers" in
3312 *) if $test -f $src/hints/$file.sh ; then
3314 elif $test -f $src/hints/$xfile.sh ; then
3316 elif $test -f $src/hints/$xxfile.sh ; then
3318 elif $test -f $src/hints/$xxxfile.sh ; then
3320 elif $test -f $src/hints/$xxxxfile.sh ; then
3322 elif $test -f "$src/hints/${osname}.sh" ; then
3331 if $test -f Policy.sh ; then
3334 none) dflt="Policy" ;;
3335 *) dflt="Policy $dflt" ;;
3340 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3344 if $test -f Policy.sh ; then
3347 There's also a Policy hint file available, which should make the
3348 site-specific (policy) questions easier to answer.
3355 You may give one or more space-separated answers, or "none" if appropriate.
3356 A well-behaved OS will have no hints, so answering "none" or just "Policy"
3357 is a good thing. DO NOT give a wrong version or a wrong OS.
3361 rp="Which of these apply, if any?"
3364 for file in $tans; do
3365 if $test X$file = XPolicy -a -f Policy.sh; then
3367 $cat Policy.sh >> UU/config.sh
3368 elif $test -f $src/hints/$file.sh; then
3369 . $src/hints/$file.sh
3370 $cat $src/hints/$file.sh >> UU/config.sh
3371 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3374 : Give one chance to correct a possible typo.
3375 echo "$file.sh does not exist"
3377 rp="hint to use instead?"
3379 for file in $ans; do
3380 if $test -f "$src/hints/$file.sh"; then
3381 . $src/hints/$file.sh
3382 $cat $src/hints/$file.sh >> UU/config.sh
3383 elif $test X$ans = X -o X$ans = Xnone ; then
3386 echo "$file.sh does not exist -- ignored."
3393 : Remember our hint file for later.
3394 if $test -f "$src/hints/$file.sh" ; then
3404 echo "Fetching default answers from $config_sh..." >&4
3408 cp $config_sh config.sh 2>/dev/null
3418 test "$override" && . ./optdef.sh
3420 : Restore computed paths
3421 for file in $loclist $trylist; do
3422 eval $file="\$_$file"
3427 Configure uses the operating system name and version to set some defaults.
3428 The default value is probably right if the name rings a bell. Otherwise,
3429 since spelling matters for me, either accept the default or answer "none"
3436 ''|' '|none) dflt=none ;;
3437 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3440 *) dflt="$osname" ;;
3442 rp="Operating system name?"
3446 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3452 ''|' '|none) dflt=none ;;
3453 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3454 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3456 ''|' ') dflt=none ;;
3461 *) dflt="$osvers" ;;
3463 rp="Operating system version?"
3473 : who configured the system
3474 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3477 cf_by=`(logname) 2>/dev/null`
3480 cf_by=`(whoami) 2>/dev/null`
3482 "") cf_by=unknown ;;
3487 : set up the script used to warn in case of inconsistency
3494 echo "*** WHOA THERE!!! ***" >&4
3495 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
3496 rp=" Keep the $hint value?"
3499 y) td=$was; tu=$was;;
3503 : function used to set $1 to $val
3504 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
3506 $define$undef) . ./whoa; eval "$var=\$td";;
3507 $undef$define) . ./whoa; eval "$var=\$tu";;
3508 *) eval "$var=$val";;
3512 $define|true|[yY]*) dflt='y';;
3517 Perl can be built to use the SOCKS proxy protocol library. To do so,
3518 Configure must be run with -Dusesocks. If you use SOCKS you also need
3519 to use the PerlIO abstraction layer, this will be implicitly selected.
3521 If this doesn't make any sense to you, just accept the default '$dflt'.
3523 rp='Build Perl for SOCKS?'
3526 y|Y) val="$define" ;;
3533 $define|true|[yY]*) useperlio="$define";;
3536 case "$useperlio" in
3537 $define|true|[yY]*|'') dflt='y';;
3542 Previous version of $package used the standard IO mechanisms as
3543 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
3544 alternate IO mechanisms via the PerlIO abstraction layer, but the
3545 stdio mechanism is still available if needed. The abstraction layer
3546 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
3547 Using PerlIO with sfio may cause problems with some extension modules.
3549 If this doesn't make any sense to you, just accept the default '$dflt'.
3551 rp='Use the PerlIO abstraction layer?'
3558 echo "Ok, doing things the stdio way."
3567 case "$useperlio" in
3568 $define|true|[yY]*) ;;
3571 You are using the SOCKS proxy protocol library which means that you
3572 should also use the PerlIO layer. You may be headed for trouble.
3581 case "$usethreads" in
3582 $define|true|[yY]*) dflt='y';;
3583 *) # Catch case where user specified ithreads or 5005threads but
3584 # forgot -Dusethreads (A.D. 4/2002)
3585 case "$useithreads$use5005threads" in
3587 case "$useperlio" in
3588 "$define") dflt='y' ;;
3598 Perl can be built to take advantage of threads on some systems.
3599 To do so, Configure can be run with -Dusethreads.
3601 Note that Perl built with threading support runs slightly slower
3602 and uses more memory than plain Perl. The current implementation
3603 is believed to be stable, but it is fairly new, and so should be
3604 treated with caution.
3606 If this doesn't make any sense to you, just accept the default '$dflt'.
3608 rp='Build a threading Perl?'
3611 y|Y) val="$define" ;;
3617 case "$usethreads" in
3621 Since release 5.6, Perl has had two different threading implementations,
3622 the newer interpreter-based version (ithreads) with one interpreter per
3623 thread, and the older 5.005 version (5005threads).
3624 The 5005threads version is effectively unmaintained and will probably be
3625 removed in Perl 5.10, so there should be no need to build a Perl using it
3626 unless needed for backwards compatibility with some existing 5.005threads
3630 : Default to ithreads unless overridden on command line or with
3633 case "$use5005threads" in
3634 $define|true|[yY]*) dflt='n';;
3636 case "$useithreads" in
3637 $undef|false|[nN]*) dflt='n';;
3639 rp='Use the newer interpreter-based ithreads?'
3642 y|Y) val="$define" ;;
3647 : Now set use5005threads to the opposite value.
3648 case "$useithreads" in
3649 $define) val="$undef" ;;
3656 useithreads="$undef"
3657 use5005threads="$undef"
3661 case "$useithreads$use5005threads" in
3665 You cannot have both the ithreads and the 5.005 threads enabled
3666 at the same time. Disabling the 5.005 threads since they are
3667 much less stable than the ithreads.
3670 use5005threads="$undef"
3674 if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then
3677 *** To build with ithreads you must also use the PerlIO layer.
3678 *** Cannot continue, aborting.
3684 case "$d_oldpthreads" in
3685 '') : Configure tests would be welcome here. For now, assume undef.
3687 *) val="$d_oldpthreads" ;;
3693 : Look for a hint-file generated 'call-back-unit'. If the
3694 : user has specified that a threading perl is to be built,
3695 : we may need to set or change some other defaults.
3696 if $test -f usethreads.cbu; then
3697 echo "Your platform has some specific hints regarding threaded builds, using them..."
3700 case "$usethreads" in
3701 "$define"|true|[yY]*)
3703 (Your platform does not have any specific hints for threaded builds.
3704 Assuming POSIX threads, then.)
3712 Perl can be built so that multiple Perl interpreters can coexist
3713 within the same Perl executable.
3716 case "$useithreads" in
3719 This multiple interpreter support is required for interpreter-based threads.
3723 *) case "$usemultiplicity" in
3724 $define|true|[yY]*) dflt='y';;
3728 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
3729 rp='Build Perl for multiplicity?'
3732 y|Y) val="$define" ;;
3741 case "$usemorebits" in
3742 "$define"|true|[yY]*)
3743 use64bitint="$define"
3744 uselongdouble="$define"
3745 usemorebits="$define"
3747 *) usemorebits="$undef"
3751 : make some quick guesses about what we are up against
3753 $echo $n "Hmm... $c"
3763 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
3764 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
3766 echo "Looks kind of like an OSF/1 system, but we'll see..."
3768 elif test `echo abc | $tr a-z A-Z` = Abc ; then
3769 xxx=`./loc addbib blurfl $pth`
3770 if $test -f $xxx; then
3771 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3775 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3776 echo "Looks kind of like an extended USG system, but we'll see..."
3778 echo "Looks kind of like a USG system, but we'll see..."
3782 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3783 echo "Looks kind of like a BSD system, but we'll see..."
3787 echo "Looks kind of like a Version 7 system, but we'll see..."
3790 case "$eunicefix" in
3793 There is, however, a strange, musty smell in the air that reminds me of
3794 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3798 : it so happens the Eunice I know will not run shell scripts in Unix format
3802 echo "Congratulations. You aren't running Eunice."
3806 : Detect OS2. The p_ variable is set above in the Head.U unit.
3807 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
3808 : semicolon as a patch separator
3813 I have the feeling something is not exactly right, however...don't tell me...
3814 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3815 (Or you may be running DOS with DJGPP.)
3820 if test -f /xenix; then
3821 echo "Actually, this looks more like a XENIX system..."
3826 echo "It's not Xenix..."
3831 if test -f /venix; then
3832 echo "Actually, this looks more like a VENIX system..."
3839 echo "Nor is it Venix..."
3842 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3843 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3850 rp="Use which C compiler?"
3854 : See if they have not cc but they do have gcc
3856 : Look for a hint-file generated 'call-back-unit'. Now that the
3857 : user has specified the compiler, we may need to set or change some
3859 if $test -f cc.cbu; then
3865 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3871 printf("%s\n", __VERSION__);
3873 printf("%s\n", "1");
3879 if $cc -o try $ccflags $ldflags try.c; then
3880 gccversion=`$run ./try`
3881 case "$gccversion" in
3882 '') echo "You are not using GNU cc." ;;
3883 *) echo "You are using GNU cc $gccversion."
3889 echo "*** WHOA THERE!!! ***" >&4
3890 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3891 case "$knowitall" in
3893 echo " You'd better start hunting for one and let me know about it." >&4
3899 case "$gccversion" in
3900 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3902 case "$gccversion" in
3903 '') gccosandvers='' ;;
3904 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3905 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3907 case "$gccosandvers" in
3908 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3909 $osname$osvers) ;; # looking good
3910 $osname*) cat <<EOM >&4
3912 *** WHOA THERE!!! ***
3914 Your gcc has not been compiled for the exact release of
3915 your operating system ($gccosandvers versus $osname$osvers).
3917 In general it is a good idea to keep gcc synchronized with
3918 the operating system because otherwise serious problems
3919 may ensue when trying to compile software, like Perl.
3921 I'm trying to be optimistic here, though, and will continue.
3922 If later during the configuration and build icky compilation
3923 problems appear (headerfile conflicts being the most common
3924 manifestation), I suggest reinstalling the gcc to match
3925 your operating system release.
3929 *) gccosandvers='' ;; # failed to parse, better be silent
3937 # gcc 3.* complain about adding -Idirectories that they already know about,
3938 # so we will take those off from locincpth.
3939 case "$gccversion" in
3941 echo "main(){}">try.c
3942 for incdir in $locincpth; do
3943 warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
3944 grep '^c[cp]p*[01]: warning: changing search order '`
3945 if test "X$warn" != X; then
3946 locincpth=`echo " $locincpth " | sed "s! $incdir ! !"`
3952 : decide how portable to be. Allow command line overrides.
3953 case "$d_portable" in
3955 *) d_portable="$define" ;;
3958 : set up shell script to do ~ expansion
3964 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3967 if $test -f /bin/csh; then
3968 /bin/csh -f -c "glob \$1"
3973 name=\`$expr x\$1 : '..\([^/]*\)'\`
3974 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3975 if $test ! -d "\$dir"; then
3977 echo "\$me: can't locate home directory for: \$name" >&2
3982 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3998 : now set up to get a file name
4002 cat <<'EOSC' >>getfile
4018 : getfile will accept an answer from the comma-separated list
4019 : enclosed in parentheses even if it does not meet other criteria.
4020 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
4021 fn=`echo $fn | sed 's/(.*)//'`
4027 loc_file=`expr $fn : '.*:\(.*\)'`
4028 fn=`expr $fn : '\(.*\):.*'`
4036 */*) fullpath=true;;
4045 *e*) exp_file=true;;
4048 *p*) nopath_ok=true;;
4053 *d*) type='Directory';;
4054 *l*) type='Locate';;
4059 Locate) what='File';;
4064 case "$d_portable" in
4072 while test "$type"; do
4077 true) rp="$rp (~name ok)";;
4080 if test -f UU/getfile.ok && \
4081 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
4100 value=`UU/filexp $ans`
4103 if test "$ans" != "$value"; then
4104 echo "(That expands to $value on this system.)"
4118 /*) value="$ansexp" ;;
4119 [a-zA-Z]:/*) value="$ansexp" ;;
4124 echo "I shall only accept a full path name, as in /bin/ls." >&4
4125 echo "Use a ! shell escape if you wish to check pathnames." >&4
4128 echo "Please give a full path name, starting with slash." >&4
4131 echo "Note that using ~name is ok provided it expands well." >&4
4144 for fp in $gfpth; do
4145 if test "X$fp" = X.; then
4150 if test -f "$pf"; then
4152 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
4154 echo "($value is not a plain file, but that's ok.)"
4157 if test X"$type" = X; then
4164 for fp in $gfpth; do
4165 if test "X$fp" = X.; then
4170 direxp="$fp/$ansexp"
4172 if test -d "$direxp"; then
4180 if test -d "$ansexp"; then
4181 echo "(Looking for $loc_file in directory $value.)"
4182 value="$value/$loc_file"
4183 ansexp="$ansexp/$loc_file"
4185 if test -f "$ansexp"; then
4188 case "$nopath_ok" in
4189 true) case "$value" in
4191 *) echo "Assuming $value will be in people's path."
4207 if test "$fastread" = yes; then
4212 rp="$what $value doesn't exist. Use that name anyway?"
4231 test "X$gfpthkeep" != Xy && gfpth=""
4234 : What should the include directory be ?
4236 $echo $n "Hmm... $c"
4240 if $test -f /bin/mips && /bin/mips; then
4241 echo "Looks like a MIPS system..."
4242 $cat >usr.c <<'EOCP'
4243 #ifdef SYSTYPE_BSD43
4247 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4248 dflt='/bsd43/usr/include'
4252 mips_type='System V'
4254 $rm -f usr.c usr.out
4255 echo "and you're compiling with the $mips_type compiler and libraries."
4259 echo "Doesn't look like a MIPS system."
4269 case "$xxx_prompt" in
4272 rp='Where are the include files you want to use?'
4280 : see how we invoke the C preprocessor
4282 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4283 cat <<'EOT' >testcpp.c
4289 if test ! -f cppstdin; then
4290 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4291 # AIX cc -E doesn't show the absolute headerfile
4292 # locations but we'll cheat by using the -M flag.
4293 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
4295 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4298 echo "Keeping your $hint cppstdin wrapper."
4301 wrapper=`pwd`/cppstdin
4305 if $test "X$cppstdin" != "X" && \
4306 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4307 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4309 echo "You used to use $cppstdin $cppminus so we'll use that again."
4311 '') echo "But let's see if we can live without a wrapper..." ;;
4313 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4314 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4316 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4319 echo "(However, $cpprun $cpplast does not work, let's see...)"
4327 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4334 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4335 $cc -E <testcpp.c >testcpp.out 2>&1; \
4336 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4337 echo "Yup, it does."
4340 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4341 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4342 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4343 echo "Yup, it does."
4346 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4347 $cc -P <testcpp.c >testcpp.out 2>&1; \
4348 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4349 echo "Yipee, that works!"
4352 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4353 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4354 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4355 echo "At long last!"
4358 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4359 $cpp <testcpp.c >testcpp.out 2>&1; \
4360 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4364 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4365 $cpp - <testcpp.c >testcpp.out 2>&1; \
4366 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4367 echo "Hooray, it works! I was beginning to wonder."
4370 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4371 $wrapper <testcpp.c >testcpp.out 2>&1; \
4372 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4378 rp="No dice. I can't find a C preprocessor. Name one:"
4382 $x_cpp <testcpp.c >testcpp.out 2>&1
4383 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4384 echo "OK, that will do." >&4
4386 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4401 echo "Perhaps can we force $cc -E using a wrapper..."
4402 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4403 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4409 echo "Nope, we'll have to live without it..."
4423 "$wrapper"|'cppstdin') ;;
4424 *) $rm -f $wrapper;;
4426 $rm -f testcpp.c testcpp.out
4428 : Set private lib path
4431 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4436 '') dlist="$loclibpth $plibpth $glibpth";;
4437 *) dlist="$libpth";;
4440 : Now check and see which directories actually exist, avoiding duplicates
4444 if $test -d $xxx; then
4447 *) libpth="$libpth $xxx";;
4453 Some systems have incompatible or broken versions of libraries. Among
4454 the directories listed in the question below, please remove any you
4455 know not to be holding relevant libraries, and add any that are needed.
4456 Say "none" for none.
4467 rp="Directories to use for library searches?"
4474 : compute shared library extension
4477 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4487 On some systems, shared libraries may be available. Answer 'none' if
4488 you want to suppress searching of shared libraries for the remainder
4489 of this configuration.
4492 rp='What is the file extension used for shared libraries?'
4496 : Define several unixisms.
4497 : Hints files or command line option can be used to override them.
4498 : The convoluted testing is in case hints files set either the old
4501 '') case "$exe_ext" in
4503 *) _exe="$exe_ext" ;;
4508 '') case "$lib_ext" in
4515 '') case "$obj_ext" in
4522 '') case "$path_sep" in
4533 : Which makefile gets called first. This is used by make depend.
4534 case "$firstmakefile" in
4535 '') firstmakefile='makefile';;
4539 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
4542 case "$uselongdouble" in
4543 $define|true|[yY]*) dflt='y';;
4548 Perl can be built to take advantage of long doubles which
4549 (if available) may give more accuracy and range for floating point numbers.
4551 If this doesn't make any sense to you, just accept the default '$dflt'.
4553 rp='Try to use long doubles if available?'
4556 y|Y) val="$define" ;;
4562 case "$uselongdouble" in
4563 true|[yY]*) uselongdouble="$define" ;;
4566 : Look for a hint-file generated 'call-back-unit'. If the
4567 : user has specified that long doubles should be used,
4568 : we may need to set or change some other defaults.
4569 if $test -f uselongdouble.cbu; then
4570 echo "Your platform has some specific hints regarding long doubles, using them..."
4571 . ./uselongdouble.cbu
4573 case "$uselongdouble" in
4576 (Your platform does not have any specific hints for long doubles.)
4582 : Looking for optional libraries
4584 echo "Checking for optional libraries..." >&4
4589 case "$libswanted" in
4590 '') libswanted='c_s';;
4593 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4599 for thisdir in $libpth $xlibpth; do
4600 test -d $thisdir && libspath="$libspath $thisdir"
4602 for thislib in $libswanted; do
4603 for thisdir in $libspath; do
4605 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4606 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4607 $test -f "$xxx" && eval $libscheck
4608 $test -f "$xxx" && libstyle=shared
4610 if test ! -f "$xxx"; then
4611 xxx=$thisdir/lib$thislib.$so
4612 $test -f "$xxx" && eval $libscheck
4613 $test -f "$xxx" && libstyle=shared
4615 if test ! -f "$xxx"; then
4616 xxx=$thisdir/lib$thislib$_a
4617 $test -f "$xxx" && eval $libscheck
4618 $test -f "$xxx" && libstyle=static
4620 if test ! -f "$xxx"; then
4621 xxx=$thisdir/$thislib$_a
4622 $test -f "$xxx" && eval $libscheck
4623 $test -f "$xxx" && libstyle=static
4625 if test ! -f "$xxx"; then
4626 xxx=$thisdir/lib${thislib}_s$_a
4627 $test -f "$xxx" && eval $libscheck
4628 $test -f "$xxx" && libstyle=static
4629 $test -f "$xxx" && thislib=${thislib}_s
4631 if test ! -f "$xxx"; then
4632 xxx=$thisdir/Slib$thislib$_a
4633 $test -f "$xxx" && eval $libscheck
4634 $test -f "$xxx" && libstyle=static
4636 if $test -f "$xxx"; then
4638 shared) echo "Found -l$thislib (shared)." ;;
4639 static) echo "Found -l$thislib." ;;
4640 *) echo "Found -l$thislib ($libstyle)." ;;
4644 *) dflt="$dflt -l$thislib"
4645 libsfound="$libsfound $xxx"
4647 libsfiles="$libsfiles $yyy"
4648 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4649 case " $libsdirs " in
4651 *) libsdirs="$libsdirs $yyy" ;;
4658 if $test ! -f "$xxx"; then
4659 echo "No -l$thislib."
4670 ' '|'') dflt='none';;
4675 In order to compile $package on your machine, a number of libraries
4676 are usually needed. Include any other special libraries here as well.
4677 Say "none" for none. The default list is almost always right.
4681 rp="What libraries to use?"
4688 : determine optimization, if desired, or use for debug flag also
4690 ' '|$undef) dflt='none';;
4692 *) dflt="$optimize";;
4696 By default, $package compiles with the -O flag to use the optimizer.
4697 Alternately, you might want to use the symbolic debugger, which uses
4698 the -g flag (on traditional Unix systems). Either flag can be
4699 specified here. To use neither flag, specify the word "none".
4702 rp="What optimizer/debugger flag should be used?"
4706 'none') optimize=" ";;
4710 : We will not override a previous value, but we might want to
4711 : augment a hint file
4713 default|recommended)
4714 case "$gccversion" in
4715 1*) dflt='-fpcc-struct-return' ;;
4718 *-g*) dflt="$dflt -DDEBUGGING";;
4720 case "$gccversion" in
4721 2*) if test -d /etc/conf/kconfig.d &&
4722 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
4724 # Interactive Systems (ISC) POSIX mode.
4729 case "$gccversion" in
4733 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
4734 echo 'int main(void) { return 0; }' > gcctest.c
4735 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
4736 echo "Yes, it does." 2>&1
4739 echo "Leaving current flags $ccflags alone." 2>&1
4741 *) dflt="$dflt -fno-strict-aliasing" ;;
4744 echo "Nope, it doesn't, but that's ok." 2>&1
4748 # For gcc, adding -pipe speeds up compilations for some, but apparently
4749 # some assemblers can't read from stdin. (It also slows down compilations
4750 # in other cases, but those are apparently rarer these days.) AD 5/2004.
4751 case "$gccversion" in
4753 echo "Checking if your compiler accepts -pipe" 2>&1
4754 echo 'int main(void) { return 0; }' > gcctest.c
4755 if $cc -pipe -o gcctest gcctest.c; then
4756 echo "Yes, it does." 2>&1
4759 echo "Leaving current flags $ccflags alone." 2>&1
4761 *) dflt="$dflt -pipe" ;;
4764 echo "Nope, it doesn't, but that's ok." 2>&1
4767 echo "Checking if your compiler accepts -Wdeclaration-after-statement" 2>&1
4768 echo 'int main(void) { return 0; }' > gcctest.c
4769 if $cc -Wdeclaration-after-statement -o gcctest gcctest.c; then
4770 echo "Yes, it does." 2>&1
4772 *-Wdeclaration-after-statement*)
4773 echo "Leaving current flags $ccflags alone." 2>&1
4775 *) dflt="$dflt -Wdeclaration-after-statement" ;;
4778 echo "Nope, it doesn't, but that's ok." 2>&1
4785 case "$mips_type" in
4786 *BSD*|'') inclwanted="$locincpth $usrinc";;
4787 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
4789 for thisincl in $inclwanted; do
4790 if $test -d $thisincl; then
4791 if $test x$thisincl != x$usrinc; then
4793 *" -I$thisincl "*);;
4794 *) dflt="$dflt -I$thisincl ";;
4800 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
4802 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
4810 *) dflt="$dflt -D$2";;
4814 set signal.h LANGUAGE_C; eval $inctest
4818 ccflags="$ccflags -DSOCKS"
4823 default|recommended) dflt="$ccflags $dflt" ;;
4824 *) dflt="$ccflags";;
4833 Your C compiler may want other flags. For this question you should include
4834 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
4835 but you should NOT include libraries or ld flags like -lwhatever. If you
4836 want $package to honor its debug switch, you should include -DDEBUGGING here.
4837 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
4839 To use no flags, specify the word "none".
4845 rp="Any additional cc flags?"
4852 : the following weeds options from ccflags that are of no interest to cpp
4854 '') cppflags="$ccflags" ;;
4855 *) cppflags="$cppflags $ccflags" ;;
4857 case "$gccversion" in
4858 1*) cppflags="$cppflags -D__GNUC__"
4860 case "$mips_type" in
4862 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4868 echo "Let me guess what the preprocessor flags are..." >&4
4882 *) ftry="$previous $flag";;
4884 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4885 >cpp1.out 2>/dev/null && \
4886 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4887 >cpp2.out 2>/dev/null && \
4888 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4889 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4891 cppflags="$cppflags $ftry"
4901 *-*) echo "They appear to be: $cppflags";;
4903 $rm -f cpp.c cpp?.out
4907 : flags used in final linking phase
4909 '') if ./venix; then
4915 *-posix*) dflt="$dflt -posix" ;;
4918 *) dflt="$ldflags";;
4921 : Try to guess additional flags to pick up local libraries.
4922 for thislibdir in $libpth; do
4923 case " $loclibpth " in
4926 *"-L$thislibdir "*) ;;
4927 *) dflt="$dflt -L$thislibdir" ;;
4939 Your C linker may need flags. For this question you should
4940 include -L/whatever and any other flags used by the C linker, but you
4941 should NOT include libraries like -lwhatever.
4943 Make sure you include the appropriate -L/path flags if your C linker
4944 does not normally search all of the directories you specified above,
4947 To use no flags, specify the word "none".
4951 rp="Any additional ld flags (NOT including libraries)?"
4957 rmlist="$rmlist pdp11"
4961 echo "Checking your choice of C compiler and flags for coherency..." >&4
4962 $cat > try.c <<'EOF'
4964 int main() { printf("Ok\n"); return(0); }
4966 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
4968 $cat >try.msg <<'EOM'
4969 I've tried to compile and run the following simple program:
4972 $cat try.c >> try.msg
4974 $cat >> try.msg <<EOM
4981 and I got the following output:
4985 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
4986 if $sh -c "$run ./try" >>try.msg 2>&1; then
4990 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4993 cat >> try.msg <<'EOQS'
4994 If $libs contains -lsfio, and sfio is mis-configured, then it
4995 sometimes (apparently) runs and exits with a 0 status, but with no
4996 output! It may have to do with sfio's use of _exit vs. exit.
4999 rp="You have a big problem. Shall I abort Configure"
5006 echo "The program compiled OK, but exited with status $?." >>try.msg
5007 rp="You have a problem. Shall I abort Configure"
5011 echo "I can't compile the test program." >>try.msg
5012 rp="You have a BIG problem. Shall I abort Configure"
5018 case "$knowitall" in
5020 echo "(The supplied flags or libraries might be incorrect.)"
5028 *) echo "Ok. Stopping Configure." >&4
5033 n) echo "OK, that should do.";;
5035 $rm -f try try.* core
5037 : define a shorthand compile call
5041 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
5042 : define a shorthand compile call for compilations that should be ok.
5046 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
5048 : determine filename position in cpp output
5050 echo "Computing filename position in cpp output for #include directives..." >&4
5052 vos) testaccess=-e ;;
5055 echo '#include <stdio.h>' > foo.c
5058 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5059 $grep '^[ ]*#.*stdio\.h' | \
5060 while read cline; do
5063 while $test \$# -gt 0; do
5064 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5069 pos=\`expr \$pos + 1\`
5081 *) pos="${fieldn}th";;
5083 echo "Your cpp writes the filename in the $pos field of the line."
5086 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
5087 os2) cppfilter="sed -e 's|\\\\\\\\|/|g' |" ;; # path component separator is \
5090 : locate header file
5095 for usrincdir in $usrinc
5097 if test -f \$usrincdir/\$wanted; then
5098 echo "\$usrincdir/\$wanted"
5102 awkprg='{ print \$$fieldn }'
5103 echo "#include <\$wanted>" > foo\$\$.c
5104 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5105 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5106 while read cline; do
5107 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5109 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5110 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5115 # status = 0: grep returned 0 lines, case statement not executed
5116 # status = 1: headerfile found
5117 # status = 2: while loop executed, no headerfile found
5121 if test \$status -eq 1; then
5128 : define an alternate in-header-list? function
5129 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5130 cont=true; xxf="echo \"<\$1> found.\" >&4";
5131 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5132 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5134 case $# in 4) instead=instead;; *) instead="at last";; esac;
5135 while $test "$cont"; do
5137 var=$2; eval "was=\$$2";
5138 if $test "$xxx" && $test -r "$xxx";
5140 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5143 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5144 set $yyy; shift; shift; yyy=$@;
5145 case $# in 0) cont="";;
5146 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5147 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5148 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5149 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5153 do set $yyy; var=$2; eval "was=\$$2";
5154 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5155 set $yyy; shift; shift; yyy=$@;
5158 : see if stdlib is available
5159 set stdlib.h i_stdlib
5162 : check for lengths of integral types
5166 echo "Checking to see how big your integers are..." >&4
5175 printf("intsize=%d;\n", (int)sizeof(int));
5176 printf("longsize=%d;\n", (int)sizeof(long));
5177 printf("shortsize=%d;\n", (int)sizeof(short));
5182 if eval $compile_ok && $run ./try > /dev/null; then
5184 echo "Your integers are $intsize bytes long."
5185 echo "Your long integers are $longsize bytes long."
5186 echo "Your short integers are $shortsize bytes long."
5190 Help! I can't compile and run the intsize test program: please enlighten me!
5191 (This is probably a misconfiguration in your system or libraries, and
5192 you really ought to fix it. Still, I'll try anyway.)
5196 rp="What is the size of an integer (in bytes)?"
5200 rp="What is the size of a long integer (in bytes)?"
5204 rp="What is the size of a short integer (in bytes)?"
5212 : check for long long
5214 echo "Checking to see if you have long long..." >&4
5215 echo 'int main() { long long x = 7; return 0; }' > try.c
5217 if eval $compile; then
5219 echo "You have long long."
5222 echo "You do not have long long."
5228 : check for length of long long
5229 case "${d_longlong}${longlongsize}" in
5232 echo "Checking to see how big your long longs are..." >&4
5233 $cat >try.c <<'EOCP'
5237 printf("%d\n", (int)sizeof(long long));
5242 if eval $compile_ok; then
5243 longlongsize=`$run ./try`
5244 echo "Your long longs are $longlongsize bytes long."
5248 echo "(I can't seem to compile the test program. Guessing...)"
5249 rp="What is the size of a long long (in bytes)?"
5253 if $test "X$longsize" = "X$longlongsize"; then
5254 echo "(That isn't any different from an ordinary long.)"
5260 : see if inttypes.h is available
5261 : we want a real compile instead of Inhdr because some systems
5262 : have an inttypes.h which includes non-existent headers
5265 #include <inttypes.h>
5267 static int32_t foo32 = 0x12345678;
5271 if eval $compile; then
5272 echo "<inttypes.h> found." >&4
5275 echo "<inttypes.h> NOT found." >&4
5284 echo "Checking to see if you have int64_t..." >&4
5286 #include <sys/types.h>
5287 #$i_inttypes I_INTTYPES
5289 #include <inttypes.h>
5291 int main() { int64_t x = 7; }
5294 if eval $compile; then
5296 echo "You have int64_t."
5299 echo "You do not have int64_t."
5307 echo "Checking which 64-bit integer type we could use..." >&4
5313 val='"unsigned int"'
5318 *) case "$longsize" in
5322 val='"unsigned long"'
5327 *) case "$d_longlong:$longlongsize" in
5332 val='"unsigned long long"'
5337 *) case "$d_int64_t" in
5356 '') echo "Alas, no 64-bit integer types in sight." >&4
5359 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5365 case "$uselonglong" in
5366 "$define"|true|[yY]*)
5369 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5371 use64bitint="$define"
5374 case "$use64bits" in
5375 "$define"|true|[yY]*)
5378 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5380 use64bitint="$define"
5383 case "$use64bitints" in
5384 "$define"|true|[yY]*)
5387 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5389 use64bitint="$define"
5392 case "$use64bitsint" in
5393 "$define"|true|[yY]*)
5396 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5398 use64bitint="$define"
5401 case "$uselonglongs" in
5402 "$define"|true|[yY]*)
5405 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5407 use64bitint="$define"
5410 case "$use64bitsall" in
5411 "$define"|true|[yY]*)
5414 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5416 use64bitall="$define"
5421 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5423 case "$use64bitall" in
5424 "$define"|true|[yY]*) use64bitint="$define" ;;
5430 You have natively 64-bit long integers.
5434 *) case "$use64bitint" in
5435 "$define"|true|[yY]*) dflt='y';;
5444 Perl can be built to take advantage of 64-bit integer types
5445 on some systems. To do so, Configure can be run with -Duse64bitint.
5446 Choosing this option will most probably introduce binary incompatibilities.
5448 If this doesn't make any sense to you, just accept the default '$dflt'.
5449 (The default has been chosen based on your configuration.)
5451 rp='Try to use 64-bit integers, if available?'
5454 [yY]*) val="$define" ;;
5462 case "$use64bitall" in
5463 "$define"|true|[yY]*) dflt='y' ;;
5464 *) case "$longsize" in
5472 You may also choose to try maximal 64-bitness. It means using as much
5473 64-bitness as possible on the platform. This in turn means even more
5474 binary incompatibilities. On the other hand, your platform may not
5475 have any more 64-bitness available than what you already have chosen.
5477 If this doesn't make any sense to you, just accept the default '$dflt'.
5478 (The default has been chosen based on your configuration.)
5480 rp='Try to use maximal 64-bit support, if available?'
5483 [yY]*) val="$define" ;;
5488 case "$use64bitall" in
5490 case "$use64bitint" in
5494 Since you have chosen a maximally 64-bit build, I'm also turning on
5495 the use of 64-bit integers.
5497 use64bitint="$define" ;;
5502 : Look for a hint-file generated 'call-back-unit'. If the
5503 : user has specified that a 64-bit perl is to be built,
5504 : we may need to set or change some other defaults.
5505 if $test -f use64bitint.cbu; then
5506 echo "Your platform has some specific hints regarding 64-bit integers, using them..."
5509 case "$use64bitint" in
5510 "$define"|true|[yY]*)
5512 4) case "$archname64" in
5513 '') archname64=64int ;;
5520 : Look for a hint-file generated 'call-back-unit'. If the
5521 : user has specified that a maximally 64-bit perl is to be built,
5522 : we may need to set or change some other defaults.
5523 if $test -f use64bitall.cbu; then
5524 echo "Your platform has some specific hints regarding 64-bit builds, using them..."
5527 case "$use64bitall" in
5528 "$define"|true|[yY]*)
5530 4) case "$archname64" in
5531 ''|64int) archname64=64all ;;
5538 case "$d_quad:$use64bitint" in
5542 *** You have chosen to use 64-bit integers,
5543 *** but none can be found.
5544 *** Please rerun Configure without -Duse64bitint and/or -Dusemorebits.
5545 *** Cannot continue, aborting.
5552 : check for length of double
5554 case "$doublesize" in
5556 echo "Checking to see how big your double precision numbers are..." >&4
5565 printf("%d\n", (int)sizeof(double));
5570 if eval $compile_ok; then
5571 doublesize=`$run ./try`
5572 echo "Your double is $doublesize bytes long."
5575 echo "(I can't seem to compile the test program. Guessing...)"
5576 rp="What is the size of a double precision number (in bytes)?"
5584 : check for long doubles
5586 echo "Checking to see if you have long double..." >&4
5587 echo 'int main() { long double x = 7.0; }' > try.c
5589 if eval $compile; then
5591 echo "You have long double."
5594 echo "You do not have long double."
5600 : check for length of long double
5601 case "${d_longdbl}${longdblsize}" in
5604 echo "Checking to see how big your long doubles are..." >&4
5605 $cat >try.c <<'EOCP'
5609 printf("%d\n", sizeof(long double));
5614 if eval $compile; then
5615 longdblsize=`$run ./try`
5616 echo "Your long doubles are $longdblsize bytes long."
5620 echo "(I can't seem to compile the test program. Guessing...)" >&4
5621 rp="What is the size of a long double (in bytes)?"
5625 if $test "X$doublesize" = "X$longdblsize"; then
5626 echo "That isn't any different from an ordinary double."
5627 echo "I'll keep your setting anyway, but you may see some"
5628 echo "harmless compilation warnings."
5634 : determine the architecture name
5636 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
5637 tarch=`arch`"-$osname"
5638 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
5639 if uname -m > tmparch 2>&1 ; then
5640 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
5641 -e 's/$/'"-$osname/" tmparch`
5649 case "$myarchname" in
5652 echo "(Your architecture name used to be $myarchname.)"
5656 case "$targetarch" in
5658 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
5663 *) dflt="$archname";;
5665 rp='What is your architecture name'
5668 case "$usethreads" in
5670 echo "Threads selected." >&4
5672 *-thread*) echo "...and architecture name already has -thread." >&4
5674 *) archname="$archname-thread"
5675 echo "...setting architecture name to $archname." >&4
5680 case "$usemultiplicity" in
5682 echo "Multiplicity selected." >&4
5684 *-multi*) echo "...and architecture name already has -multi." >&4
5686 *) archname="$archname-multi"
5687 echo "...setting architecture name to $archname." >&4
5692 case "$use64bitint$use64bitall" in
5694 case "$archname64" in
5696 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
5699 case "$use64bitint" in
5700 "$define") echo "64 bit integers selected." >&4 ;;
5702 case "$use64bitall" in
5703 "$define") echo "Maximal 64 bitness selected." >&4 ;;
5706 *-$archname64*) echo "...and architecture name already has $archname64." >&4
5708 *) archname="$archname-$archname64"
5709 echo "...setting architecture name to $archname." >&4
5715 case "$uselongdouble" in
5717 echo "Long doubles selected." >&4
5718 case "$longdblsize" in
5720 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
5724 *-ld*) echo "...and architecture name already has -ld." >&4
5726 *) archname="$archname-ld"
5727 echo "...setting architecture name to $archname." >&4
5734 case "$useperlio" in
5736 echo "Perlio selected." >&4
5739 echo "Perlio not selected, using stdio." >&4
5741 *-stdio*) echo "...and architecture name already has -stdio." >&4
5743 *) archname="$archname-stdio"
5744 echo "...setting architecture name to $archname." >&4
5749 if $test -f archname.cbu; then
5750 echo "Your platform has some specific hints for architecture name, using them..."
5754 : determine root of directory hierarchy where package will be installed.
5757 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
5760 dflt=`echo "$prefix" | sed 's/.$//'`
5768 By default, $package will be installed in $dflt/bin, manual pages
5769 under $dflt/man, etc..., i.e. with $dflt as prefix for all
5770 installation directories. Typically this is something like /usr/local.
5771 If you wish to have binaries under /usr/bin but other parts of the
5772 installation under /usr/local, that's ok: you will be prompted
5773 separately for each of the installation directories, the prefix being
5774 only used to set the defaults.
5778 rp='Installation prefix to use?'
5786 *) oldprefix="$prefix";;
5795 *) afsroot=$afsroot ;;
5801 $define|true) afs=true ;;
5802 $undef|false) afs=false ;;
5803 *) if test -d $afsroot; then
5811 echo "AFS may be running... I'll be extra cautious then..." >&4
5813 echo "AFS does not seem to be running..." >&4
5816 : determine installation prefix for where package is to be installed.
5820 Since you are running AFS, I need to distinguish the directory in which
5821 files will reside from the directory in which they are installed (and from
5822 which they are presumably copied to the former directory by occult means).
5825 case "$installprefix" in
5826 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
5827 *) dflt="$installprefix";;
5832 In some special cases, particularly when building $package for distribution,
5833 it is convenient to distinguish the directory in which files should be
5834 installed from the directory ($prefix) in which they will
5835 eventually reside. For most users, these two directories are the same.
5838 case "$installprefix" in
5840 *) dflt=$installprefix;;
5844 rp='What installation prefix should I use for installing files?'
5846 installprefix="$ans"
5847 installprefixexp="$ansexp"
5849 : set the prefixit variable, to compute a suitable default value
5850 prefixit='case "$3" in
5852 case "$oldprefix" in
5853 "") eval "$1=\"\$$2\"";;
5860 ""|" ") eval "$1=\"\$$2\"";;
5866 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
5868 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
5869 /*-$oldprefix/*|\~*-$oldprefix/*)
5870 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
5871 *) eval "$1=\"\$$2\"";;
5875 : get the patchlevel
5877 echo "Getting the current patchlevel..." >&4
5878 if $test -r $rsrc/patchlevel.h;then
5879 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
5880 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
5881 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
5882 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
5883 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
5884 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
5885 perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
5894 $echo "(You do not have patchlevel.h. Eek.)"
5896 if $test -r $rsrc/.patch ; then
5897 if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
5898 perl_patchlevel=`cat $rsrc/.patch`
5901 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
5902 version_patchlevel_string="version $patchlevel subversion $subversion"
5903 case "$perl_patchlevel" in
5905 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
5908 $echo "(You have $package $version_patchlevel_string.)"
5912 : XXX Should be a Configure test for double-dots in filenames.
5913 version=`echo $revision $patchlevel $subversion | \
5914 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
5915 api_versionstring=`echo $api_revision $api_version $api_subversion | \
5916 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
5919 version=`echo $revision $patchlevel $subversion | \
5920 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
5921 api_versionstring=`echo $api_revision $api_version $api_subversion | \
5922 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
5925 : Special case the 5.005_xx maintenance series, which used 5.005
5926 : without any subversion label as a subdirectory in $sitelib
5927 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
5928 api_versionstring='5.005'
5931 : determine installation style
5932 : For now, try to deduce it from prefix unless it is already set.
5933 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
5934 case "$installstyle" in
5935 '') case "$prefix" in
5936 *perl*) dflt='lib';;
5937 *) dflt='lib/perl5' ;;
5940 *) dflt="$installstyle" ;;
5942 : Probably not worth prompting for this since we prompt for all
5943 : the directories individually, and the prompt would be too long and
5947 : determine where private library files go
5948 : Usual default is /usr/local/lib/perl5/$version.
5949 : Also allow things like /opt/perl/lib/$version, since
5950 : /opt/perl/lib/perl5... would be redundant.
5951 : The default "style" setting is made in installstyle.U
5952 case "$installstyle" in
5953 *lib/perl5*) set dflt privlib lib/$package/$version ;;
5954 *) set dflt privlib lib/$version ;;
5959 There are some auxiliary files for $package that need to be put into a
5960 private library directory that is accessible by everyone.
5964 rp='Pathname where the private library files will reside?'
5967 privlibexp="$ansexp"
5968 : Change installation prefix, if necessary.
5969 if $test X"$prefix" != X"$installprefix"; then
5970 installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
5972 installprivlib="$privlibexp"
5975 : set the prefixup variable, to restore leading tilda escape
5976 prefixup='case "$prefixexp" in
5978 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
5981 : determine where public architecture dependent libraries go
5984 : privlib default is /usr/local/lib/$package/$version
5985 : archlib default is /usr/local/lib/$package/$version/$archname
5986 : privlib may have an optional trailing /share.
5987 tdflt=`echo $privlib | $sed 's,/share$,,'`
5988 tdflt=$tdflt/$archname
5997 $spackage contains architecture-dependent library files. If you are
5998 sharing libraries in a heterogeneous environment, you might store
5999 these files in a separate location. Otherwise, you can just include
6000 them with the rest of the public library files.
6004 rp='Where do you want to put the public architecture-dependent libraries?'
6007 archlibexp="$ansexp"
6008 if $test X"$archlib" = X"$privlib"; then
6013 : Change installation prefix, if necessary.
6014 if $test X"$prefix" != X"$installprefix"; then
6015 installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
6017 installarchlib="$archlibexp"
6020 : see if setuid scripts can be secure
6023 Some kernels have a bug that prevents setuid #! scripts from being
6024 secure. Some sites have disabled setuid #! scripts because of this.
6026 First let's decide if your kernel supports secure setuid #! scripts.
6027 (If setuid #! scripts would be secure but have been disabled anyway,
6028 don't say that they are secure if asked.)
6033 if $test -d /dev/fd; then
6034 echo "#!$ls" >reflect
6035 chmod +x,u+s reflect
6036 ./reflect >flect 2>&1
6037 if $contains "/dev/fd" flect >/dev/null; then
6038 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6042 If you are not sure if they are secure, I can check but I'll need a
6043 username and password different from the one you are using right now.
6044 If you don't have such a username or don't want me to test, simply
6048 rp='Other username to test security of setuid scripts with?'
6053 case "$d_suidsafe" in
6054 '') echo "I'll assume setuid scripts are *not* secure." >&4
6057 echo "Well, the $hint value is *not* secure." >&4
6059 *) echo "Well, the $hint value *is* secure." >&4
6064 $rm -f reflect flect
6065 echo "#!$ls" >reflect
6066 chmod +x,u+s reflect
6069 echo '"su" will (probably) prompt you for '"$ans's password."
6070 su $ans -c './reflect >flect'
6071 if $contains "/dev/fd" flect >/dev/null; then
6072 echo "Okay, it looks like setuid scripts are secure." >&4
6075 echo "I don't think setuid scripts are secure." >&4
6080 rp='Does your kernel have *secure* setuid scripts?'
6083 [yY]*) val="$define";;
6088 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6089 echo "(That's for file descriptors, not floppy disks.)"
6095 $rm -f reflect flect
6097 : now see if they want to do setuid emulation
6100 case "$d_suidsafe" in
6103 echo "No need to emulate SUID scripts since they are secure here." >&4
6107 Some systems have disabled setuid scripts, especially systems where
6108 setuid scripts cannot be secure. On systems where setuid scripts have
6109 been disabled, the setuid/setgid bits on scripts are currently
6110 useless. It is possible for $package to detect those bits and emulate
6111 setuid/setgid in a secure fashion. This emulation will only work if
6112 setuid scripts have been disabled in your kernel.
6116 "$define") dflt=y ;;
6119 rp="Do you want to do setuid/setgid emulation?"
6122 [yY]*) val="$define";;
6130 : see if this is a malloc.h system
6131 : we want a real compile instead of Inhdr because some systems have a
6132 : malloc.h that just gives a compile error saying to use stdlib.h instead
6137 int main () { return 0; }
6140 if eval $compile; then
6141 echo "<malloc.h> found." >&4
6144 echo "<malloc.h> NOT found." >&4
6151 : check for void type
6153 echo "Checking to see how well your C compiler groks the void type..." >&4
6154 case "$voidflags" in
6166 extern void moo(); /* function returning void */
6167 void (*goo)(); /* ptr to func returning void */
6169 void *hue; /* generic ptr */
6182 int main() { sub(); }
6184 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
6185 voidflags=$defvoidused
6186 echo "Good. It appears to support void to the level $package wants.">&4
6187 if $contains warning .out >/dev/null 2>&1; then
6188 echo "However, you might get some warnings that look like this:"
6192 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
6193 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
6194 echo "It supports 1..."
6195 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
6196 echo "It also supports 2..."
6197 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
6199 echo "And it supports 4 but not 8 definitely."
6201 echo "It doesn't support 4..."
6202 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
6204 echo "But it supports 8."
6207 echo "Neither does it support 8."
6211 echo "It does not support 2..."
6212 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
6214 echo "But it supports 4 and 8."
6216 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
6218 echo "And it supports 4 but has not heard about 8."
6220 echo "However it supports 8 but not 4."
6225 echo "There is no support at all for void."
6230 case "$voidflags" in
6233 Support flag bits are:
6234 1: basic void declarations.
6235 2: arrays of pointers to functions returning void.
6236 4: operations between pointers to and addresses of void functions.
6237 8: generic void pointers.
6240 rp="Your void support flags add up to what?"
6247 : check for length of pointer
6251 echo "Checking to see how big your pointers are..." >&4
6252 if test "$voidflags" -gt 7; then
6253 echo '#define VOID_PTR char *' > try.c
6255 echo '#define VOID_PTR void *' > try.c
6265 printf("%d\n", (int)sizeof(VOID_PTR));
6270 if eval $compile_ok; then
6271 ptrsize=`$run ./try`
6272 echo "Your pointers are $ptrsize bytes long."
6275 echo "(I can't seem to compile the test program. Guessing...)" >&4
6276 rp="What is the size of a pointer (in bytes)?"
6283 case "$use64bitall" in
6284 "$define"|true|[yY]*)
6288 *** You have chosen a maximally 64-bit build,
6289 *** but your pointers are only 4 bytes wide.
6290 *** Please rerun Configure without -Duse64bitall.
6295 *** Since you have quads, you could possibly try with -Duse64bitint.
6300 *** Cannot continue, aborting.
6311 : determine whether to use malloc wrapping
6313 case "$usemallocwrap" in
6314 [yY]*|true|$define) dflt='y' ;;
6315 [nN]*|false|$undef) dflt='n' ;;
6316 *) case "$usedevel" in
6317 [yY]*|true|$define) dflt='y' ;;
6322 rp="Do you wish to wrap malloc calls to protect against potential overflows?"
6324 usemallocwrap="$ans"
6327 usemallocwrap="$define" ;;
6329 usemallocwrap="$undef" ;;
6332 : determine which malloc to compile in
6334 case "$usemymalloc" in
6335 [yY]*|true|$define) dflt='y' ;;
6336 [nN]*|false|$undef) dflt='n' ;;
6337 *) case "$ptrsize" in
6343 rp="Do you wish to attempt to use the malloc that comes with $package?"
6349 mallocsrc='malloc.c'
6350 mallocobj="malloc$_o"
6351 d_mymalloc="$define"
6354 : Remove malloc from list of libraries to use
6355 echo "Removing unneeded -lmalloc from library list" >&4
6356 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6359 echo "libs = $libs" >&4
6371 : compute the return types of malloc and free
6373 $cat >malloc.c <<END
6377 #include <sys/types.h>
6391 case "$malloctype" in
6393 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6400 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6404 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6411 echo "Your system uses $freetype free(), it would seem." >&4
6415 After $package is installed, you may wish to install various
6416 add-on modules and utilities. Typically, these add-ons will
6417 be installed under $prefix with the rest
6418 of this package. However, you may wish to install such add-ons
6419 elsewhere under a different prefix.
6421 If you do not wish to put everything under a single prefix, that's
6422 ok. You will be prompted for the individual locations; this siteprefix
6423 is only used to suggest the defaults.
6425 The default should be fine for most people.
6429 rp='Installation prefix to use for add-on modules and utilities?'
6430 : XXX Here might be another good place for an installstyle setting.
6431 case "$siteprefix" in
6433 *) dflt=$siteprefix ;;
6436 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6438 case "$siteprefix" in
6442 *) oldsiteprefix="$prefix";;
6447 siteprefixexp="$ansexp"
6449 : determine where site specific libraries go.
6450 : Usual default is /usr/local/lib/perl5/site_perl/$version
6451 : The default "style" setting is made in installstyle.U
6452 : XXX No longer works with Prefixit stuff.
6453 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6455 '') case "$installstyle" in
6456 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6457 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6465 The installation process will create a directory for
6466 site-specific extensions and modules. Most users find it convenient
6467 to place all site-specific files in this directory rather than in the
6468 main distribution directory.
6472 rp='Pathname for the site-specific library files?'
6475 sitelibexp="$ansexp"
6476 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
6477 : Change installation prefix, if necessary.
6478 if $test X"$prefix" != X"$installprefix"; then
6479 installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
6481 installsitelib="$sitelibexp"
6484 : determine where site specific architecture-dependent libraries go.
6485 : sitelib default is /usr/local/lib/perl5/site_perl/$version
6486 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
6487 : sitelib may have an optional trailing /share.
6489 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
6490 dflt="$dflt/$archname"
6495 set sitearch sitearch none
6499 The installation process will also create a directory for
6500 architecture-dependent site-specific extensions and modules.
6504 rp='Pathname for the site-specific architecture-dependent library files?'
6507 sitearchexp="$ansexp"
6508 : Change installation prefix, if necessary.
6509 if $test X"$prefix" != X"$installprefix"; then
6510 installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
6512 installsitearch="$sitearchexp"
6517 The installation process will also create a directory for
6518 vendor-supplied add-ons. Vendors who supply perl with their system
6519 may find it convenient to place all vendor-supplied files in this
6520 directory rather than in the main distribution directory. This will
6521 ease upgrades between binary-compatible maintenance versions of perl.
6523 Of course you may also use these directories in whatever way you see
6524 fit. For example, you might use them to access modules shared over a
6525 company-wide network.
6527 The default answer should be fine for most people.
6528 This causes further questions about vendor add-ons to be skipped
6529 and no vendor-specific directories will be configured for perl.
6532 rp='Do you want to configure vendor-specific add-on directories?'
6533 case "$usevendorprefix" in
6534 define|true|[yY]*) dflt=y ;;
6535 *) : User may have set vendorprefix directly on Configure command line.
6536 case "$vendorprefix" in
6545 rp='Installation prefix to use for vendor-supplied add-ons?'
6546 case "$vendorprefix" in
6548 *) dflt=$vendorprefix ;;
6551 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6553 case "$vendorprefix" in
6557 *) oldvendorprefix="$prefix";;
6561 usevendorprefix="$define"
6563 vendorprefixexp="$ansexp"
6565 *) usevendorprefix="$undef"
6571 case "$vendorprefix" in
6572 '') d_vendorlib="$undef"
6576 *) d_vendorlib="$define"
6577 : determine where vendor-supplied modules go.
6578 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
6579 case "$vendorlib" in
6581 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6582 case "$installstyle" in
6583 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
6584 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
6587 *) dflt="$vendorlib"
6591 rp='Pathname for the vendor-supplied library files?'
6594 vendorlibexp="$ansexp"
6597 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
6598 : Change installation prefix, if necessary.
6599 if $test X"$prefix" != X"$installprefix"; then
6600 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
6602 installvendorlib="$vendorlibexp"
6605 case "$vendorprefix" in
6606 '') d_vendorarch="$undef"
6610 *) d_vendorarch="$define"
6611 : determine where vendor-supplied architecture-dependent libraries go.
6612 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
6613 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
6614 : vendorlib may have an optional trailing /share.
6615 case "$vendorarch" in
6616 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
6617 dflt="$dflt/$archname"
6619 *) dflt="$vendorarch" ;;
6622 rp='Pathname for vendor-supplied architecture-dependent files?'
6625 vendorarchexp="$ansexp"
6628 : Change installation prefix, if necessary.
6629 if $test X"$prefix" != X"$installprefix"; then
6630 installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
6632 installvendorarch="$vendorarchexp"
6635 : Final catch-all directories to search
6638 Lastly, you can have perl look in other directories for extensions and
6639 modules in addition to those already specified.
6640 These directories will be searched after
6644 test X"$vendorlib" != "X" && echo ' ' $vendorlib
6645 test X"$vendorarch" != "X" && echo ' ' $vendorarch
6647 case "$otherlibdirs" in
6648 ''|' ') dflt='none' ;;
6649 *) dflt="$otherlibdirs" ;;
6652 Enter a colon-separated set of extra paths to include in perl's @INC
6653 search path, or enter 'none' for no extra paths.
6657 rp='Colon-separated list of additional directories for perl to search?'
6660 ' '|''|none) otherlibdirs=' ' ;;
6661 *) otherlibdirs="$ans" ;;
6663 case "$otherlibdirs" in
6667 set d_perl_otherlibdirs
6670 : Cruising for prototypes
6672 echo "Checking out function prototypes..." >&4
6673 $cat >prototype.c <<EOCP
6678 int main(int argc, char *argv[]) {
6681 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
6682 echo "Your C compiler appears to support function prototypes."
6685 echo "Your C compiler doesn't seem to understand function prototypes."
6692 case "$prototype" in
6694 *) ansi2knr='ansi2knr'
6699 This version of $package can only be compiled by a compiler that
6700 understands function prototypes. Unfortunately, your C compiler
6702 doesn't seem to understand them. Sorry about that.
6704 If GNU cc is available for your system, perhaps you could try that instead.
6706 Eventually, we hope to support building Perl with pre-ANSI compilers.
6707 If you would like to help in that effort, please contact <perlbug@perl.org>.
6709 Aborting Configure now.
6715 : determine where public executables go
6720 rp='Pathname where the public executables will reside?'
6722 if $test "X$ansexp" != "X$binexp"; then
6727 : Change installation prefix, if necessary.
6728 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
6729 if $test X"$prefix" != X"$installprefix"; then
6730 installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
6732 installbin="$binexp"
6741 Perl can be built with extra modules or bundles of modules which
6742 will be fetched from the CPAN and installed alongside Perl.
6744 Notice that you will need access to the CPAN; either via the Internet,
6745 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
6746 be asked later to configure the CPAN.pm module which will in turn do
6747 the installation of the rest of the extra modules or bundles.)
6749 Notice also that if the modules require any external software such as
6750 libraries and headers (the libz library and the zlib.h header for the
6751 Compress::Zlib module, for example) you MUST have any such software
6752 already installed, this configuration process will NOT install such
6755 If this doesn't make any sense to you, just accept the default '$dflt'.
6757 rp='Install any extra modules (y or n)?'
6763 Please list any extra modules or bundles to be installed from CPAN,
6764 with spaces between the names. The names can be in any format the
6765 'install' command of CPAN.pm will understand. (Answer 'none',
6766 without the quotes, to install no extra modules or bundles.)
6776 $rm -f ../extras.lst
6778 *) echo "(Saving the list of extras for later...)"
6779 echo "$extras" > ../extras.lst
6787 : determine where html pages for programs go
6788 set html1dir html1dir none
6792 If you wish to install html files for programs in $spackage, indicate
6793 the appropriate directory here. To skip installing html files,
6797 ''|none|$undef|' ') dflt=none ;;
6798 *) dflt=$html1dir ;;
6801 rp="Directory for the main $spackage html pages?"
6804 html1direxp="$ansexp"
6805 : Use ' ' for none so value is preserved next time through Configure
6806 $test X"$html1dir" = "X" && html1dir=' '
6807 : Change installation prefix, if necessary.
6808 if $test X"$prefix" != X"$installprefix"; then
6809 installhtml1dir=`echo $html1direxp | sed "s#^$prefix#$installprefix#"`
6811 installhtml1dir="$html1direxp"
6814 : determine where html pages for libraries and modules go
6815 set html3dir html3dir none
6819 If you wish to install html files for modules associated with $spackage,
6820 indicate the appropriate directory here. To skip installing html files,
6823 : There is no obvious default. If they have specified html1dir, then
6824 : try to key off that, possibly changing .../html1 into .../html3.
6826 '') html3dir=`echo "$html1dir" | $sed 's/1$/3$/'` ;;
6827 *) dflt=$html3dir ;;
6830 rp="Directory for the $spackage module html pages?"
6833 html3direxp="$ansexp"
6834 : Use ' ' for none so value is preserved next time through Configure
6835 $test X"$html3dir" = "X" && html3dir=' '
6836 : Change installation prefix, if necessary.
6837 if $test X"$prefix" != X"$installprefix"; then
6838 installhtml3dir=`echo $html3direxp | sed "s#^$prefix#$installprefix#"`
6840 installhtml3dir="$html3direxp"
6843 : Find perl5.005 or later.
6844 echo "Looking for a previously installed perl5.005 or later... "
6846 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
6847 : Check if this perl is recent and can load a simple module
6848 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6851 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6861 '') echo "None found. That's ok.";;
6862 *) echo "Using $perl5." ;;
6865 : Determine list of previous versions to include in @INC
6866 $cat > getverlist <<EOPL
6869 \$api_versionstring = "$api_versionstring";
6870 \$version = "$version";
6871 \$stem = "$sitelib_stem";
6872 \$archname = "$archname";
6874 $cat >> getverlist <<'EOPL'
6875 # Can't have leading @ because metaconfig interprets it as a command!
6876 ;@inc_version_list=();
6877 # XXX Redo to do opendir/readdir?
6880 ;@candidates = glob("5.*");
6886 # XXX ToDo: These comparisons must be reworked when two-digit
6887 # subversions come along, so that 5.7.10 compares as greater than
6888 # 5.7.3! By that time, hope that 5.6.x is sufficiently
6889 # widespread that we can use the built-in version vectors rather
6890 # than reinventing them here. For 5.6.0, however, we must
6891 # assume this script will likely be run by 5.005_0x. --AD 1/2000.
6892 foreach $d (@candidates) {
6893 if ($d lt $version) {
6894 if ($d ge $api_versionstring) {
6895 unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
6897 elsif ($d ge "5.005") {
6898 unshift(@inc_version_list, grep { -d } $d);
6902 # Skip newer version. I.e. don't look in
6903 # 5.7.0 if we're installing 5.6.1.
6907 if (@inc_version_list) {
6908 print join(' ', @inc_version_list);
6911 # Blank space to preserve value for next Configure run.
6916 case "$inc_version_list" in
6917 '') if test -x "$perl5$exe_ext"; then
6918 dflt=`$perl5 getverlist`
6923 $undef) dflt='none' ;;
6924 *) eval dflt=\"$inc_version_list\" ;;
6927 ''|' ') dflt=none ;;
6934 In order to ease the process of upgrading, this version of perl
6935 can be configured to use modules built and installed with earlier
6936 versions of perl that were installed under $prefix. Specify here
6937 the list of earlier versions that this version of perl should check.
6938 If Configure detected no earlier versions of perl installed under
6939 $prefix, then the list will be empty. Answer 'none' to tell perl
6940 to not search earlier versions.
6942 The default should almost always be sensible, so if you're not sure,
6943 just accept the default.
6946 rp='List of earlier versions to include in @INC?'
6949 [Nn]one|''|' '|$undef) inc_version_list=' ' ;;
6950 *) inc_version_list="$ans" ;;
6952 case "$inc_version_list" in
6954 inc_version_list_init='0';;
6955 *) inc_version_list_init=`echo $inc_version_list |
6956 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
6961 : determine whether to install perl also as /usr/bin/perl
6964 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
6966 Many scripts expect perl to be installed as /usr/bin/perl.
6968 If you want to, I can install the perl you are about to compile
6969 as /usr/bin/perl (in addition to $bin/perl).
6971 if test -f /usr/bin/perl; then
6974 However, please note that because you already have a /usr/bin/perl,
6975 overwriting that with a new Perl would very probably cause problems.
6976 Therefore I'm assuming you don't want to do that (unless you insist).
6979 case "$installusrbinperl" in
6980 "$define"|[yY]*) dflt='y';;
6986 Since you don't have a /usr/bin/perl I'm assuming creating one is okay.
6989 case "$installusrbinperl" in
6990 "$undef"|[nN]*) dflt='n';;
6994 rp="Do you want to install perl as /usr/bin/perl?"
6997 [yY]*) val="$define";;
7003 set installusrbinperl
7007 echo "Checking for GNU C Library..." >&4
7009 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
7010 alone are insufficient to distinguish different versions, such as
7011 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
7012 libc version 2.1.0. A. Dougherty, June 3, 2002.
7018 # ifdef __GLIBC_MINOR__
7019 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
7020 # include <gnu/libc-version.h>
7021 printf("%s\n", gnu_get_libc_version());
7023 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
7026 printf("%d\n", __GLIBC__);
7035 if eval $compile_ok && $run ./try > glibc.ver; then
7037 gnulibc_version=`$cat glibc.ver`
7038 echo "You are using the GNU C Library version $gnulibc_version"
7042 echo "You are not using the GNU C Library"
7044 $rm -f try try.* glibc.ver
7048 : see if nm is to be used to determine whether a symbol is defined or not
7052 case "$d_gnulibc" in
7055 echo "nm probably won't work on the GNU C Library." >&4
7061 if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
7063 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
7064 echo "'nm' won't be sufficient on this sytem." >&4
7070 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
7071 if $test $dflt -gt 20; then
7081 true|$define) dflt=y;;
7088 I can use $nm to extract the symbols from your C libraries. This
7089 is a time consuming task which may generate huge output on the disk (up
7090 to 3 megabytes) but that should make the symbols extraction faster. The
7091 alternative is to skip the 'nm' extraction part and to compile a small
7092 test program instead to determine whether each symbol is present. If
7093 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
7094 this may be the best solution.
7096 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
7099 rp="Shall I use $nm to extract C symbols from the libraries?"
7102 [Nn]*) usenm=false;;
7111 : nm options which may be necessary
7113 '') if $test -f /mach_boot; then
7115 elif $test -d /usr/ccs/lib; then
7116 nm_opt='-p' # Solaris (and SunOS?)
7117 elif $test -f /dgux; then
7119 elif $test -f /lib64/rld; then
7120 nm_opt='-p' # 64-bit Irix
7126 : nm options which may be necessary for shared libraries but illegal
7127 : for archive libraries. Thank you, Linux.
7128 case "$nm_so_opt" in
7129 '') case "$myuname" in
7131 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
7132 nm_so_opt='--dynamic'
7141 : get list of predefined functions in a handy place
7146 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
7152 *) for thislib in $libs; do
7155 : Handle C library specially below.
7158 thislib=`echo $thislib | $sed -e 's/^-l//'`
7159 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
7161 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
7163 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
7165 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
7167 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
7169 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
7171 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
7176 libnames="$libnames $try"
7178 *) libnames="$libnames $thislib" ;;
7187 for xxx in $libpth; do
7188 $test -r $1 || set $xxx/libc.$so
7189 : The messy sed command sorts on library version numbers.
7191 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
7192 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
7194 s/[0-9][0-9]*/0000&/g
7195 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
7198 $sort | $sed -e 's/^.* //'`
7201 $test -r $1 || set /usr/ccs/lib/libc.$so
7202 $test -r $1 || set /lib/libsys_s$_a
7208 if $test -r "$1"; then
7209 echo "Your (shared) C library seems to be in $1."
7211 elif $test -r /lib/libc && $test -r /lib/clib; then
7212 echo "Your C library seems to be in both /lib/clib and /lib/libc."
7214 libc='/lib/clib /lib/libc'
7215 if $test -r /lib/syslib; then
7216 echo "(Your math library is in /lib/syslib.)"
7217 libc="$libc /lib/syslib"
7219 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
7220 echo "Your C library seems to be in $libc, as you said before."
7221 elif $test -r $incpath/usr/lib/libc$_a; then
7222 libc=$incpath/usr/lib/libc$_a;
7223 echo "Your C library seems to be in $libc. That's fine."
7224 elif $test -r /lib/libc$_a; then
7226 echo "Your C library seems to be in $libc. You're normal."
7228 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
7230 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
7231 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
7232 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
7234 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
7236 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
7239 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
7241 if $test -r "$tans"; then
7242 echo "Your C library seems to be in $tans, of all places."
7248 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
7252 If the guess above is wrong (which it might be if you're using a strange
7253 compiler, or your machine supports multiple models), you can override it here.
7258 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
7260 I can't seem to find your C library. I've looked in the following places:
7263 $sed 's/^/ /' libpath
7266 None of these seems to contain your C library. I need to get its name...
7271 rp='Where is your C library?'
7276 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
7277 set X `cat libnames`
7280 case $# in 1) xxx=file; esac
7281 echo "Extracting names from the following $xxx for later perusal:" >&4
7283 $sed 's/^/ /' libnames >&4
7285 $echo $n "This may take a while...$c" >&4
7289 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
7290 *) $nm $nm_opt $file 2>/dev/null;;
7295 $grep fprintf libc.tmp > libc.ptf
7296 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
7297 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
7299 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *//p'";\
7301 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7303 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
7305 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7307 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
7309 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7311 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
7313 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7315 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
7317 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7319 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
7321 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7323 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
7324 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
7326 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7328 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
7330 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7332 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
7334 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7336 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
7338 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7340 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
7342 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7344 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
7346 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7348 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
7350 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7352 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
7354 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7357 $nm -p $* 2>/dev/null >libc.tmp
7358 $grep fprintf libc.tmp > libc.ptf
7359 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
7360 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
7366 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
7368 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
7369 for thisname in $libnames $libc; do
7370 $ar t $thisname >>libc.tmp
7372 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
7374 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
7375 # Repeat libc to extract forwarders to DLL entries too
7376 for thisname in $libnames $libc; do
7377 $ar tv $thisname >>libc.tmp
7378 # Revision 50 of EMX has bug in $ar.
7379 # it will not extract forwarders to DLL entries
7380 # Use emximp which will extract exactly them.
7381 emximp -o tmp.imp $thisname \
7383 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
7384 < tmp.imp >>libc.tmp
7387 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
7390 echo "$ar didn't seem to work right." >&4
7391 echo "Maybe this is a Cray...trying bld instead..." >&4
7392 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
7394 for thisname in $libnames; do
7396 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
7397 $ar t $thisname >>libc.tmp
7401 echo "That didn't work either. Giving up." >&4
7411 echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4
7412 dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list
7414 *) if $test -f /lib/syscalls.exp; then
7416 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
7417 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list
7423 $rm -f libnames libpath
7425 : see if dld is available
7429 : is a C symbol defined?
7432 -v) tf=libc.tmp; tdc="";;
7433 -a) tf=libc.tmp; tdc="[]";;
7434 *) tlook="^$1\$"; tf=libc.list; tdc="()";;
7437 case "$reuseval-$4" in
7439 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
7444 if $test "$runnm" = true; then
7445 if $contains $tlook $tf >/dev/null 2>&1; then
7447 elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
7448 echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
7449 $cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true;
7450 $test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; };
7451 $rm -f try$_exe try.c core core.* try.core;
7454 echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
7455 $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
7456 $rm -f try$_exe try.c;
7461 $define) tval=true;;
7468 : define an is-in-libc? function
7469 inlibc='echo " "; td=$define; tu=$undef;
7470 sym=$1; var=$2; eval "was=\$$2";
7472 case "$reuseval$was" in
7482 echo "$sym() found." >&4;
7483 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
7485 echo "$sym() NOT found." >&4;
7486 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
7490 $define) echo "$sym() found." >&4;;
7491 *) echo "$sym() NOT found." >&4;;
7495 : see if dlopen exists
7502 : determine which dynamic loading, if any, to compile in
7504 dldir="ext/DynaLoader"
7517 $define) dflt='y' ;;
7520 $define) dflt='y' ;;
7522 : Does a dl_xxx.xs file exist for this operating system
7523 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7526 rp="Do you wish to use dynamic loading?"
7533 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7534 dflt="$dldir/dl_${osname}.xs"
7535 elif $test "$d_dlopen" = "$define" ; then
7536 dflt="$dldir/dl_dlopen.xs"
7537 elif $test "$i_dld" = "$define" ; then
7538 dflt="$dldir/dl_dld.xs"
7543 *) dflt="$dldir/$dlsrc"
7546 echo "The following dynamic loading files are available:"
7547 : Can not go over to $dldir because getfile has path hard-coded in.
7548 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7549 rp="Source file to use for dynamic loading"
7555 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7559 Some systems may require passing special flags to $cc -c to
7560 compile modules that will be used to create a shared library.
7561 To use no flags, say "none".
7564 case "$cccdlflags" in
7565 '') case "$gccversion" in
7566 '') case "$osname" in
7568 next) dflt='none' ;;
7569 irix*) dflt='-KPIC' ;;
7570 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7571 sunos) dflt='-pic' ;;
7575 *) case "$osname" in
7576 darwin) dflt='none' ;;
7577 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7582 *) dflt="$cccdlflags" ;;
7584 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7587 none) cccdlflags=' ' ;;
7588 *) cccdlflags="$ans" ;;
7593 Some systems use ld to create libraries that can be dynamically loaded,
7594 while other systems (such as those using ELF) use $cc.
7598 '') $cat >try.c <<EOM
7599 /* Test for whether ELF binaries are produced */
7607 int i = open("a.out",O_RDONLY);
7610 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7611 exit(0); /* succeed (yes, it's ELF) */
7616 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7618 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7622 echo "I'll use ld to build dynamic libraries."
7631 rp="What command should be used to create dynamic libraries?"
7637 Some systems may require passing special flags to $ld to create a
7638 library that can be dynamically loaded. If your ld flags include
7639 -L/other/path options to locate libraries outside your loader's normal
7640 search path, you may need to specify those -L options here as well. To
7641 use no flags, say "none".
7644 case "$lddlflags" in
7645 '') case "$osname" in
7646 beos) dflt='-nostart' ;;
7648 case "$gccversion" in
7649 '') dflt="$dflt +vnocompatwarnings" ;;
7652 linux|irix*|gnu*) dflt='-shared' ;;
7653 next) dflt='none' ;;
7654 solaris) dflt='-G' ;;
7655 sunos) dflt='-assert nodefinitions' ;;
7656 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
7660 *) dflt="$lddlflags" ;;
7663 : Try to guess additional flags to pick up local libraries.
7664 : Be careful not to append to a plain 'none'
7668 for thisflag in $ldflags; do
7673 *) dflt="$dflt $thisflag" ;;
7680 ''|' ') dflt='none' ;;
7683 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
7686 none) lddlflags=' ' ;;
7687 *) lddlflags="$ans" ;;
7692 Some systems may require passing special flags to $cc to indicate that
7693 the resulting executable will use dynamic linking. To use no flags,
7697 case "$ccdlflags" in
7698 '') case "$osname" in
7699 linux|hpux|gnu*) dflt='-Wl,-E' ;;
7700 next|sunos) dflt='none' ;;
7704 *) dflt="$ccdlflags" ;;
7706 rp="Any special flags to pass to $cc to use dynamic linking?"
7709 none) ccdlflags=' ' ;;
7710 *) ccdlflags="$ans" ;;
7724 # No dynamic loading being used, so don't bother even to prompt.
7727 *) case "$useshrplib" in
7728 '') case "$osname" in
7729 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
7731 also='Building a shared libperl is required for dynamic loading to work on your system.'
7736 also='Building a shared libperl is needed for MAB support.'
7754 The perl executable is normally obtained by linking perlmain.c with
7755 libperl${_a}, any static extensions (usually just DynaLoader), and
7756 any other libraries needed on this system (such as -lm, etc.). Since
7757 your system supports dynamic loading, it is probably possible to build
7758 a shared libperl.$so. If you will have more than one executable linked
7759 to libperl.$so, this will significantly reduce the size of each
7760 executable, but it may have a noticeable affect on performance. The
7761 default is probably sensible for your system.
7765 rp="Build a shared libperl.$so (y/n)"
7769 useshrplib='true' ;;
7770 *) useshrplib='false' ;;
7775 case "$useshrplib" in
7779 # Figure out a good name for libperl.so. Since it gets stored in
7780 # a version-specific architecture-dependent library, the version
7781 # number isn't really that important, except for making cc/ld happy.
7783 # A name such as libperl.so.3.1
7784 majmin="libperl.$so.$patchlevel.$subversion"
7785 # A name such as libperl.so.301
7786 majonly=`echo $patchlevel $subversion |
7787 $awk '{printf "%d%02d", $1, $2}'`
7788 majonly=libperl.$so.$majonly
7789 # I'd prefer to keep the os-specific stuff here to a minimum, and
7790 # rely on figuring it out from the naming of libc.
7791 case "${osname}${osvers}" in
7794 # XXX How handle the --version stuff for MAB?
7796 linux*|gnu*) # ld won't link with a bare -lperl otherwise.
7799 cygwin*) # ld links against an importlib
7800 dflt=libperl$lib_ext
7802 *) # Try to guess based on whether libc has major.minor.
7804 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
7805 *libc.$so.[0-9]*) dflt=$majonly ;;
7806 *) dflt=libperl.$so ;;
7816 I need to select a good name for the shared libperl. If your system uses
7817 library names with major and minor numbers, then you might want something
7818 like $majmin. Alternatively, if your system uses a single version
7819 number for shared libraries, then you might want to use $majonly.
7820 Or, your system might be quite happy with a simple libperl.$so.
7822 Since the shared libperl will get installed into a version-specific
7823 architecture-dependent directory, the version number of the shared perl
7824 library probably isn't important, so the default should be o.k.
7827 rp='What name do you want to give to the shared libperl?'
7830 echo "Ok, I'll use $libperl"
7833 libperl="libperl${_a}"
7837 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
7841 WARNING: Use of the shrpdir variable for the installation location of
7842 the shared $libperl is not supported. It was never documented and
7843 will not work in this version. Let me (perlbug@perl.org)
7844 know of any problems this may cause.
7850 But your current setting of $shrpdir is
7851 the default anyway, so it's harmless.
7856 Further, your current attempted setting of $shrpdir
7857 conflicts with the value of $archlibexp/CORE
7858 that installperl will use.
7865 # How will the perl executable find the installed shared $libperl?
7866 # Add $xxx to ccdlflags.
7867 # If we can't figure out a command-line option, use $shrpenv to
7868 # set env LD_RUN_PATH. The main perl makefile uses this.
7869 shrpdir=$archlibexp/CORE
7872 if "$useshrplib"; then
7875 # We'll set it in Makefile.SH...
7880 freebsd|netbsd|openbsd|interix)
7881 xxx="-Wl,-R$shrpdir"
7883 bsdos|linux|irix*|dec_osf|gnu*)
7884 xxx="-Wl,-rpath,$shrpdir"
7887 # next doesn't like the default...
7890 # beos doesn't like the default, either.
7893 # hpux doesn't like the default, either.
7894 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
7897 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
7903 # Only add $xxx if it isn't already in ccdlflags.
7904 case " $ccdlflags " in
7906 *) ccdlflags="$ccdlflags $xxx"
7909 Adding $xxx to the flags
7910 passed to $ld so that the perl executable will find the
7911 installed shared $libperl.
7919 # Fix ccdlflags in AIX for building external extensions.
7920 # (For building Perl itself bare -bE:perl.exp is needed,
7921 # Makefile.SH takes care of this.)
7923 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
7925 # Respect a hint or command-line value.
7927 '') shrpenv="$tmp_shrpenv" ;;
7929 case "$ldlibpthname" in
7930 '') ldlibpthname=LD_LIBRARY_PATH ;;
7931 none) ldlibpthname='' ;;
7934 : determine where manual pages are on this system
7938 syspath='/usr/share/man/man1 /usr/man/man1'
7939 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
7940 syspath="$syspath /usr/man/u_man/man1"
7941 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
7942 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
7943 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
7944 sysman=`./loc . /usr/man/man1 $syspath`
7947 if $test -d "$sysman"; then
7948 echo "System manual is in $sysman." >&4
7950 echo "Could not find manual pages in source form." >&4
7953 : determine where manual pages go
7954 set man1dir man1dir none
7958 $spackage has manual pages available in source form.
7962 echo "However, you don't have nroff, so they're probably useless to you."
7964 '') man1dir="none";;
7967 echo "If you don't want the manual sources installed, answer 'none'."
7972 lookpath="$prefixexp/share/man/man1"
7973 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
7974 lookpath="$lookpath $prefixexp/man/p_man/man1"
7975 lookpath="$lookpath $prefixexp/man/u_man/man1"
7976 lookpath="$lookpath $prefixexp/man/man.1"
7978 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
7979 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
7989 rp="Where do the main $spackage manual pages (source) go?"
7991 if $test "X$man1direxp" != "X$ansexp"; then
7995 man1direxp="$ansexp"
8001 : Change installation prefix, if necessary.
8002 if $test X"$prefix" != X"$installprefix"; then
8003 installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
8005 installman1dir="$man1direxp"
8008 : What suffix to use on installed man pages
8015 rp="What suffix should be used for the main $spackage man pages?"
8017 '') case "$man1dir" in
8031 *) dflt="$man1ext";;
8038 : see if we can have long filenames
8040 first=123456789abcdef
8042 if (echo hi >$first) 2>/dev/null; then
8043 if $test -f 123456789abcde; then
8044 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
8047 echo 'You can have filenames longer than 14 characters.'>&4
8052 You can't have filenames longer than 14 chars.
8053 You can't even think about them!
8059 $rm -rf 123456789abcde*
8061 : determine where library module manual pages go
8062 set man3dir man3dir none
8066 $spackage has manual pages for many of the library modules.
8072 However, you don't have nroff, so they're probably useless to you.
8075 '') man3dir="none";;
8079 case "$d_flexfnam" in
8082 However, your system can't handle the long file names like File::Basename.3.
8085 '') man3dir="none";;
8089 echo "If you don't want the manual sources installed, answer 'none'."
8090 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
8092 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
8093 if $test -d "$privlib/man/man3"; then
8096 WARNING: Previous versions of perl installed man3 pages into
8097 $privlib/man/man3. This version will suggest a
8098 new default of $dflt.
8102 rp='Do you wish to preserve the old behavior?(y/n)'
8105 y*) dflt="$privlib/man/man3" ;;
8110 *) dflt="$man3dir" ;;
8117 rp="Where do the $package library man pages (source) go?"
8120 man3direxp="$ansexp"
8126 : Change installation prefix, if necessary.
8127 if $test X"$prefix" != X"$installprefix"; then
8128 installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
8130 installman3dir="$man3direxp"
8133 : What suffix to use on installed man pages
8139 rp="What suffix should be used for the $package library man pages?"
8141 '') case "$man3dir" in
8155 *) dflt="$man3ext";;
8162 : see if we have to deal with yellow pages, now NIS.
8163 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8164 if $test -f /usr/etc/nibindd; then
8166 echo "I'm fairly confident you're on a NeXT."
8168 rp='Do you get the hosts file via NetInfo?'
8177 y*) hostcat='nidump hosts .';;
8178 *) case "$hostcat" in
8179 nidump*) hostcat='';;
8189 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8197 rp='Are you getting the hosts file via yellow pages?'
8200 y*) hostcat='ypcat hosts';;
8201 *) hostcat='cat /etc/hosts';;
8207 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8210 '') test -f /etc/group && groupcat='cat /etc/group';;
8213 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8216 : now get the host name
8218 echo "Figuring out host name..." >&4
8219 case "$myhostname" in
8221 echo 'Maybe "hostname" will work...'
8222 if tans=`sh -c hostname 2>&1` ; then
8230 if $test "$cont"; then
8232 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8233 if tans=`cat /etc/systemid 2>&1` ; then
8235 phostname='cat /etc/systemid'
8236 echo "Whadyaknow. Xenix always was a bit strange..."
8239 elif $test -r /etc/systemid; then
8240 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8243 if $test "$cont"; then
8244 echo 'No, maybe "uuname -l" will work...'
8245 if tans=`sh -c 'uuname -l' 2>&1` ; then
8247 phostname='uuname -l'
8249 echo 'Strange. Maybe "uname -n" will work...'
8250 if tans=`sh -c 'uname -n' 2>&1` ; then
8252 phostname='uname -n'
8254 echo 'Oh well, maybe I can mine it out of whoami.h...'
8255 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8256 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8257 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8259 case "$myhostname" in
8260 '') echo "Does this machine have an identity crisis or something?"
8263 echo "Well, you said $myhostname before..."
8264 phostname='echo $myhostname';;
8270 case "$myhostname" in
8271 '') myhostname=noname ;;
8273 : you do not want to know about this
8278 if $test "$myhostname" ; then
8280 rp='Your host name appears to be "'$myhostname'".'" Right?"
8288 : bad guess or no guess
8289 while $test "X$myhostname" = X ; do
8291 rp="Please type the (one word) name of your host:"
8296 : translate upper to lower if necessary
8297 case "$myhostname" in
8299 echo "(Normalizing case in your host name)"
8300 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8304 case "$myhostname" in
8306 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8307 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8308 echo "(Trimming domain name from host name--host name is now $myhostname)"
8310 *) case "$mydomain" in
8313 test "X$hostcat" = "Xypcat hosts" &&
8314 ypmatch "$myhostname" hosts 2>/dev/null |\
8315 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8318 test "X$hostcat" != "X" &&
8319 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8320 /[ ]$myhostname[ . ]/p" > hosts
8323 if $test -f hosts; then
8324 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8325 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8326 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8327 hosts | $sort | $uniq | \
8328 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8329 case `$echo X$dflt` in
8330 X*\ *) echo "(Several hosts in the database matched hostname)"
8333 X.) echo "(You do not have fully-qualified names in the hosts database)"
8337 echo "(I cannot locate a hosts database anywhere)"
8342 tans=`./loc resolv.conf X /etc /usr/etc`
8343 if $test -f "$tans"; then
8344 echo "(Attempting domain name extraction from $tans)"
8345 dflt=.`$sed -n -e 's/ / /g' \
8346 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8347 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8349 .) dflt=.`$sed -n -e 's/ / /g' \
8350 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8351 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8358 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8359 dflt=.`sh -c domainname 2>/dev/null`
8362 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8366 case "$dflt$osname" in
8367 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8368 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8372 .) echo "(Lost all hope -- silly guess then)"
8378 *) dflt="$mydomain";;
8382 rp="What is your domain name?"
8392 : translate upper to lower if necessary
8395 echo "(Normalizing case in your domain name)"
8396 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8400 : a little sanity check here
8401 case "$phostname" in
8404 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8405 $myhostname$mydomain|$myhostname) ;;
8407 case "$phostname" in
8409 echo "(That doesn't agree with your whoami.h file, by the way.)"
8412 echo "(That doesn't agree with your $phostname command, by the way.)"
8422 I need to get your e-mail address in Internet format if possible, i.e.
8423 something like user@host.domain. Please answer accurately since I have
8424 no easy means to double check it. The default value provided below
8425 is most probably close to reality but may not be valid from outside
8426 your organization...
8430 while test "$cont"; do
8432 '') dflt="$cf_by@$myhostname$mydomain";;
8433 *) dflt="$cf_email";;
8435 rp='What is your e-mail address?'
8441 rp='Address does not look like an Internet one. Use it anyway?'
8457 If you or somebody else will be maintaining perl at your site, please
8458 fill in the correct e-mail address here so that they may be contacted
8459 if necessary. Currently, the "perlbug" program included with perl
8460 will send mail to this address in addition to perlbug@perl.org. You may
8461 enter "none" for no administrator.
8464 case "$perladmin" in
8465 '') dflt="$cf_email";;
8466 *) dflt="$perladmin";;
8468 rp='Perl administrator e-mail address'
8472 : determine whether to only install version-specific parts.
8475 Do you want to install only the version-specific parts of the perl
8476 distribution? Usually you do *not* want to do this.
8478 case "$versiononly" in
8479 "$define"|[Yy]*|true) dflt='y' ;;
8482 rp="Do you want to install only the version-specific parts of perl?"
8485 [yY]*) val="$define";;
8491 case "$versiononly" in
8492 "$define") inc_version_list=''
8493 inc_version_list_init=0
8497 : figure out how to guarantee perl startup
8498 case "$startperl" in
8500 case "$sharpbang" in
8504 I can use the #! construct to start perl on your system. This will
8505 make startup of perl scripts faster, but may cause problems if you
8506 want to share those scripts and perl is not in a standard place
8507 ($binexp/perl) on all your platforms. The alternative is to force
8508 a shell by starting the script with a single ':' character.
8511 case "$versiononly" in
8512 "$define") dflt="$binexp/perl$version";;
8513 *) dflt="$binexp/perl";;
8515 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8518 none) startperl=": # use perl";;
8519 *) startperl="#!$ans"
8520 if $test 30 -lt `echo "$ans" | wc -c`; then
8523 WARNING: Some systems limit the #! command to 32 characters.
8524 If you experience difficulty running Perl scripts with #!, try
8525 installing Perl in a directory with a shorter pathname.
8531 *) startperl=": # use perl"
8536 echo "I'll use $startperl to start perl scripts."
8538 : figure best path for perl in scripts
8541 case "$versiononly" in
8542 "$define") perlpath="$binexp/perl$version";;
8543 *) perlpath="$binexp/perl";;
8545 case "$startperl" in
8550 I will use the "eval 'exec'" idiom to start Perl on your system.
8551 I can use the full path of your Perl binary for this purpose, but
8552 doing so may cause problems if you want to share those scripts and
8553 Perl is not always in a standard place ($binexp/perl).
8557 rp="What path shall I use in \"eval 'exec'\"?"
8564 case "$startperl" in
8566 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8569 : determine where public executable scripts go
8570 set scriptdir scriptdir
8572 case "$scriptdir" in
8575 : guess some guesses
8576 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8577 $test -d /usr/share/bin && dflt=/usr/share/bin
8578 $test -d /usr/local/script && dflt=/usr/local/script
8579 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8580 $test -d $prefixexp/script && dflt=$prefixexp/script
8584 *) dflt="$scriptdir"
8589 Some installations have a separate directory just for executable scripts so
8590 that they can mount it across multiple architectures but keep the scripts in
8591 one spot. You might, for example, have a subdirectory of /usr/share for this.
8592 Or you might just lump your scripts in with all your other executables.
8596 rp='Where do you keep publicly executable scripts?'
8598 if $test "X$ansexp" != "X$scriptdirexp"; then
8602 scriptdirexp="$ansexp"
8603 : Change installation prefix, if necessary.
8604 if $test X"$prefix" != X"$installprefix"; then
8605 installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
8607 installscript="$scriptdirexp"
8610 : determine where add-on public executables go
8612 '') dflt=$siteprefix/bin ;;
8616 rp='Pathname where the add-on public executables should be installed?'
8619 sitebinexp="$ansexp"
8620 : Change installation prefix, if necessary.
8621 if $test X"$prefix" != X"$installprefix"; then
8622 installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
8624 installsitebin="$sitebinexp"
8627 : determine where add-on html pages go
8628 : There is no standard location, so try to copy the previously-selected
8629 : directory structure for the core html pages.
8630 case "$sitehtml1dir" in
8631 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$siteprefix#"` ;;
8632 *) dflt=$sitehtml1dir ;;
8635 ''|' ') dflt=none ;;
8638 rp='Pathname where the site-specific html pages should be installed?'
8641 sitehtml1direxp="$ansexp"
8642 : Change installation prefix, if necessary.
8643 if $test X"$prefix" != X"$installprefix"; then
8644 installsitehtml1dir=`echo $sitehtml1direxp | $sed "s#^$prefix#$installprefix#"`
8646 installsitehtml1dir="$sitehtml1direxp"
8649 : determine where add-on library html pages go
8650 : There is no standard location, so try to copy the previously-selected
8651 : directory structure for the core html pages.
8652 case "$sitehtml3dir" in
8653 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$siteprefix#"` ;;
8654 *) dflt=$sitehtml3dir ;;
8657 ''|' ') dflt=none ;;
8660 rp='Pathname where the site-specific library html pages should be installed?'
8663 sitehtml3direxp="$ansexp"
8664 : Change installation prefix, if necessary.
8665 if $test X"$prefix" != X"$installprefix"; then
8666 installsitehtml3dir=`echo $sitehtml3direxp | $sed "s#^$prefix#$installprefix#"`
8668 installsitehtml3dir="$sitehtml3direxp"
8671 : determine where add-on manual pages go
8672 case "$siteman1dir" in
8673 '') dflt=`echo $man1dir | $sed "s#^$prefix#$siteprefix#"` ;;
8674 *) dflt=$siteman1dir ;;
8677 ''|' ') dflt=none ;;
8680 rp='Pathname where the site-specific manual pages should be installed?'
8683 siteman1direxp="$ansexp"
8684 : Change installation prefix, if necessary.
8685 if $test X"$prefix" != X"$installprefix"; then
8686 installsiteman1dir=`echo $siteman1direxp | $sed "s#^$prefix#$installprefix#"`
8688 installsiteman1dir="$siteman1direxp"
8691 : determine where add-on library man pages go
8692 case "$siteman3dir" in
8693 '') dflt=`echo $man3dir | $sed "s#^$prefix#$siteprefix#"` ;;
8694 *) dflt=$siteman3dir ;;
8697 ''|' ') dflt=none ;;
8700 rp='Pathname where the site-specific library manual pages should be installed?'
8703 siteman3direxp="$ansexp"
8704 : Change installation prefix, if necessary.
8705 if $test X"$prefix" != X"$installprefix"; then
8706 installsiteman3dir=`echo $siteman3direxp | $sed "s#^$prefix#$installprefix#"`
8708 installsiteman3dir="$siteman3direxp"
8711 : determine where add-on public executable scripts go
8712 case "$sitescript" in
8713 '') dflt=$siteprefix/script
8714 $test -d $dflt || dflt=$sitebin ;;
8715 *) dflt="$sitescript" ;;
8718 rp='Pathname where add-on public executable scripts should be installed?'
8721 sitescriptexp="$ansexp"
8722 : Change installation prefix, if necessary.
8723 if $test X"$prefix" != X"$installprefix"; then
8724 installsitescript=`echo $sitescriptexp | sed "s#^$prefix#$installprefix#"`
8726 installsitescript="$sitescriptexp"
8729 case "$usefaststdio" in
8730 $define|true|[yY]*|'')
8731 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
8741 Perl can be built to use 'fast stdio', which means using the stdio
8742 library but also directly manipulating the stdio buffers to enable
8743 faster I/O. Using stdio is better for backward compatibility (especially
8744 for Perl extensions), but on the other hand since Perl 5.8 the 'perlio'
8745 interface has been preferred instead of stdio.
8747 If this doesn't make any sense to you, just accept the default '$dflt'.
8749 rp='Use the "fast stdio" if available?'
8752 y|Y) val="$define" ;;
8759 : define an is-a-typedef? function
8760 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8762 "") inclist="sys/types.h";;
8764 eval "varval=\$$var";
8768 for inc in $inclist; do
8769 echo "#include <$inc>" >>temp.c;
8771 echo "#ifdef $type" >> temp.c;
8772 echo "printf(\"We have $type\");" >> temp.c;
8773 echo "#endif" >> temp.c;
8774 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8775 if $contains $type temp.E >/dev/null 2>&1; then
8781 *) eval "$var=\$varval";;
8784 : define an is-a-typedef? function that prompts if the type is not available.
8785 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8787 "") inclist="sys/types.h";;
8789 eval "varval=\$$var";
8793 for inc in $inclist; do
8794 echo "#include <$inc>" >>temp.c;
8796 echo "#ifdef $type" >> temp.c;
8797 echo "printf(\"We have $type\");" >> temp.c;
8798 echo "#endif" >> temp.c;
8799 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8801 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
8802 if $contains $type temp.E >/dev/null 2>&1; then
8803 echo "$type found." >&4;
8806 echo "$type NOT found." >&4;
8812 *) eval "$var=\$varval";;
8815 : see what type lseek is declared as in the kernel
8816 rp="What is the type used for lseek's offset on this system?"
8817 set off_t lseektype long stdio.h sys/types.h
8821 echo "Checking to see how big your file offsets are..." >&4
8823 #include <sys/types.h>
8827 printf("%d\n", (int)sizeof($lseektype));
8832 if eval $compile_ok; then
8833 lseeksize=`$run ./try`
8834 echo "Your file offsets are $lseeksize bytes long."
8838 echo "(I can't seem to compile the test program. Guessing...)"
8839 rp="What is the size of your file offsets (in bytes)?"
8845 : see what type file positions are declared as in the library
8846 rp="What is the type for file position used by fsetpos()?"
8847 set fpos_t fpostype long stdio.h sys/types.h
8852 *_t) zzz="$fpostype" ;;
8855 echo "Checking the size of $zzz..." >&4
8857 #include <sys/types.h>
8864 printf("%d\n", (int)sizeof($fpostype));
8869 if eval $compile_ok; then
8873 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8876 echo "Your $zzz is $fpossize bytes long."
8882 echo "(I can't compile the test program. Guessing...)" >&4
8883 rp="What is the size of your file positions (in bytes)?"
8888 # Backward compatibility (uselfs is deprecated).
8890 "$define"|true|[yY]*)
8893 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
8895 uselargefiles="$define"
8899 case "$lseeksize:$fpossize" in
8902 You can have files larger than 2 gigabytes.
8905 *) case "$uselargefiles" in
8906 "$undef"|false|[nN]*) dflt='n' ;;
8911 Perl can be built to understand large files (files larger than 2 gigabytes)
8912 on some systems. To do so, Configure can be run with -Duselargefiles.
8914 If this doesn't make any sense to you, just accept the default '$dflt'.
8916 rp='Try to understand large files, if available?'
8919 y|Y) val="$define" ;;
8926 : Look for a hint-file generated 'call-back-unit'. If the
8927 : user has specified that a large files perl is to be built,
8928 : we may need to set or change some other defaults.
8929 if $test -f uselargefiles.cbu; then
8930 echo "Your platform has some specific hints regarding large file builds, using them..."
8931 . ./uselargefiles.cbu
8933 case "$uselargefiles" in
8935 if $test -f uselargefiles.cbu; then
8937 echo "Rechecking to see how big your file offsets are..." >&4
8939 #include <sys/types.h>
8943 printf("%d\n", (int)sizeof($lseektype));
8948 if eval $compile_ok; then
8949 lseeksize=`$run ./try`
8950 $echo "Your file offsets are now $lseeksize bytes long."
8954 echo "(I can't seem to compile the test program. Guessing...)"
8955 rp="What is the size of your file offsets (in bytes)?"
8960 *_t) zzz="$fpostype" ;;
8963 $echo $n "Rechecking the size of $zzz...$c" >&4
8965 #include <sys/types.h>
8972 printf("%d\n", (int)sizeof($fpostype));
8977 if eval $compile_ok; then
8982 echo "(I can't execute the test program--guessing $fpossize.)" >&4
8985 echo " $fpossize bytes." >&4
8991 echo "(I can't compile the test program. Guessing...)" >&4
8992 rp="What is the size of your file positions (in bytes)?"
9001 # probably will refer to
9002 # $archlib $privlib $sitearch $sitelib $vendorarch $vendorlib
9004 userelocatableinc=undef
9006 case "$vendorprefix" in
9007 '') d_vendorbin="$undef"
9011 *) d_vendorbin="$define"
9012 : determine where vendor-supplied executables go.
9013 case "$vendorbin" in
9014 '') dflt=$vendorprefix/bin ;;
9015 *) dflt="$vendorbin" ;;
9018 rp='Pathname for the vendor-supplied executables directory?'
9021 vendorbinexp="$ansexp"
9024 : Change installation prefix, if necessary.
9025 if $test X"$prefix" != X"$installprefix"; then
9026 installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
9028 installvendorbin="$vendorbinexp"
9031 case "$vendorprefix" in
9032 '') vendorhtml1dir=''
9033 vendorhtml1direxp=''
9035 *) : determine where vendor-supplied html pages go.
9036 : There is no standard location, so try to copy the previously-selected
9037 : directory structure for the core html pages.
9038 : XXX Better default suggestions would be welcome.
9039 case "$vendorhtml1dir" in
9040 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9041 *) dflt=$vendorhtml1dir ;;
9044 ''|' ') dflt=none ;;
9047 rp='Pathname for the vendor-supplied html pages?'
9049 vendorhtml1dir="$ans"
9050 vendorhtml1direxp="$ansexp"
9053 : Use ' ' for none so value is preserved next time through Configure
9054 $test X"$vendorhtml1dir" = "X" && vendorhtml1dir=' '
9055 : Change installation prefix, if necessary.
9056 if $test X"$prefix" != X"$installprefix"; then
9057 installvendorhtml1dir=`echo $vendorhtml1direxp | $sed "s#^$prefix#$installprefix#"`
9059 installvendorhtml1dir="$vendorhtml1direxp"
9062 case "$vendorprefix" in
9063 '') vendorhtml3dir=''
9064 vendorhtml3direxp=''
9066 *) : determine where vendor-supplied module html pages go.
9067 : There is no standard location, so try to copy the previously-selected
9068 : directory structure for the core html pages.
9069 : XXX Better default suggestions would be welcome.
9070 case "$vendorhtml3dir" in
9071 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9072 *) dflt=$vendorhtml3dir ;;
9075 ''|' ') dflt=none ;;
9078 rp='Pathname for the vendor-supplied html pages?'
9080 vendorhtml3dir="$ans"
9081 vendorhtml3direxp="$ansexp"
9084 : Use ' ' for none so value is preserved next time through Configure
9085 $test X"$vendorhtml3dir" = "X" && vendorhtml3dir=' '
9086 : Change installation prefix, if necessary.
9087 if $test X"$prefix" != X"$installprefix"; then
9088 installvendorhtml3dir=`echo $vendorhtml3direxp | $sed "s#^$prefix#$installprefix#"`
9090 installvendorhtml3dir="$vendorhtml3direxp"
9093 case "$vendorprefix" in
9094 '') vendorman1dir=''
9097 *) : determine where vendor-supplied manual pages go.
9098 case "$vendorman1dir" in
9099 '') dflt=`echo "$man1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9100 *) dflt=$vendorman1dir ;;
9103 ''|' ') dflt=none ;;
9106 rp='Pathname for the vendor-supplied manual section 1 pages?'
9108 vendorman1dir="$ans"
9109 vendorman1direxp="$ansexp"
9112 : Use ' ' for none so value is preserved next time through Configure
9113 $test X"$vendorman1dir" = "X" && vendorman1dir=' '
9114 : Change installation prefix, if necessary.
9115 if $test X"$prefix" != X"$installprefix"; then
9116 installvendorman1dir=`echo "$vendorman1direxp" | $sed "s#^$prefix#$installprefix#"`
9118 installvendorman1dir="$vendorman1direxp"
9121 case "$vendorprefix" in
9122 '') vendorman3dir=''
9125 *) : determine where vendor-supplied module manual pages go.
9126 case "$vendorman3dir" in
9127 '') dflt=`echo "$man3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9128 *) dflt=$vendorman3dir ;;
9131 ''|' ') dflt=none ;;
9134 rp='Pathname for the vendor-supplied manual section 3 pages?'
9136 vendorman3dir="$ans"
9137 vendorman3direxp="$ansexp"
9140 : Use ' ' for none so value is preserved next time through Configure
9141 $test X"$vendorman3dir" = "X" && vendorman3dir=' '
9142 : Change installation prefix, if necessary.
9143 if $test X"$prefix" != X"$installprefix"; then
9144 installvendorman3dir=`echo "$vendorman3direxp" | $sed "s#^$prefix#$installprefix#"`
9146 installvendorman3dir="$vendorman3direxp"
9149 case "$vendorprefix" in
9150 '') d_vendorscript="$undef"
9154 *) d_vendorscript="$define"
9155 : determine where vendor-supplied scripts go.
9156 case "$vendorscript" in
9157 '') dflt=$vendorprefix/script
9158 $test -d $dflt || dflt=$vendorbin ;;
9159 *) dflt="$vendorscript" ;;
9163 The installation process will create a directory for
9164 vendor-supplied scripts.
9168 rp='Pathname for the vendor-supplied scripts directory?'
9171 vendorscriptexp="$ansexp"
9174 : Change installation prefix, if necessary.
9175 if $test X"$prefix" != X"$installprefix"; then
9176 installvendorscript=`echo $vendorscriptexp | $sed "s#^$prefix#$installprefix#"`
9178 installvendorscript="$vendorscriptexp"
9181 : see if qgcvt exists
9187 if $test X"$d_longdbl" = X"$define"; then
9189 echo "Checking how to print long doubles..." >&4
9191 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
9192 $cat >try.c <<'EOCP'
9193 #include <sys/types.h>
9197 printf("%.3f\n", d);
9201 if eval $compile; then
9205 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
9206 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
9207 echo "We will use %f."
9213 if $test X"$sPRIfldbl" = X; then
9214 $cat >try.c <<'EOCP'
9215 #include <sys/types.h>
9218 long double d = 123.456;
9219 printf("%.3Lf\n", d);
9223 if eval $compile; then
9227 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
9228 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
9229 echo "We will use %Lf."
9235 if $test X"$sPRIfldbl" = X; then
9236 $cat >try.c <<'EOCP'
9237 #include <sys/types.h>
9240 long double d = 123.456;
9241 printf("%.3llf\n", d);
9245 if eval $compile; then
9249 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
9250 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
9251 echo "We will use %llf."
9257 if $test X"$sPRIfldbl" = X; then
9258 $cat >try.c <<'EOCP'
9259 #include <sys/types.h>
9262 long double d = 123.456;
9263 printf("%.3lf\n", d);
9267 if eval $compile; then
9271 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
9272 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
9273 echo "We will use %lf."
9279 if $test X"$sPRIfldbl" = X; then
9280 echo "Cannot figure out how to print long doubles." >&4
9282 sSCNfldbl=$sPRIfldbl # expect consistency
9289 case "$sPRIfldbl" in
9290 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
9291 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
9292 d_SCNfldbl="$undef";
9294 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
9295 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
9296 d_SCNfldbl="$define";
9300 : Check how to convert floats to strings.
9302 if test "X$d_Gconvert" = X; then
9305 echo "Checking for an efficient way to convert floats to strings."
9307 case "$uselongdouble" in
9308 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
9310 case "$d_longdbl" in
9311 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
9313 case "$d_PRIgldbl" in
9314 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
9318 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
9319 char *myname = "gconvert";
9322 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
9323 char *myname = "gcvt";
9326 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
9327 char *myname = "qgcvt";
9328 #define DOUBLETYPE long double
9331 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
9333 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
9335 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
9338 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
9340 char *myname = "sprintf";
9344 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
9345 #define DOUBLETYPE long double
9347 #define DOUBLETYPE double
9353 #define I_STDLIB $i_stdlib
9359 checkit(expect, got)
9363 if (strcmp(expect, got)) {
9364 printf("%s oddity: Expected %s, got %s\n",
9365 myname, expect, got);
9375 /* This must be 1st test on (which?) platform */
9376 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
9377 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
9378 checkit("0.1", buf);
9380 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
9381 checkit("0.01", buf);
9383 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
9384 checkit("0.001", buf);
9386 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
9387 checkit("0.0001", buf);
9389 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
9390 if (strlen(buf) > 5)
9391 checkit("9e-005", buf); /* for Microsoft ?? */
9393 checkit("9e-05", buf);
9395 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
9398 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
9399 checkit("1.1", buf);
9401 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
9402 checkit("1.01", buf);
9404 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
9405 checkit("1.001", buf);
9407 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
9408 checkit("1.0001", buf);
9410 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
9411 checkit("1.00001", buf);
9413 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
9414 checkit("1.000001", buf);
9416 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
9419 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
9422 /* Some Linux gcvt's give 1.e+5 here. */
9423 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
9424 checkit("100000", buf);
9426 /* Some Linux gcvt's give -1.e+5 here. */
9427 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
9428 checkit("-100000", buf);
9430 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
9431 checkit("123.456", buf);
9433 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
9434 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
9435 /* 34 should be enough to scare even long double
9436 * places into using the e notation. */
9437 if (strlen(buf) > 5)
9438 checkit("1e+034", buf); /* for Microsoft */
9440 checkit("1e+34", buf);
9442 /* For Perl, if you add additional tests here, also add them to
9443 * t/base/num.t for benefit of platforms not using Configure or
9444 * overriding d_Gconvert */
9449 : first add preferred functions to our list
9451 for xxx_convert in $gconvert_preference; do
9452 case $xxx_convert in
9453 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
9454 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
9457 : then add any others
9458 for xxx_convert in gconvert gcvt sprintf; do
9461 *) xxx_list="$xxx_list $xxx_convert" ;;
9465 case "$d_longdbl$uselongdouble" in
9467 : again, add prefered functions to our list first
9469 for xxx_convert in $gconvert_ld_preference; do
9470 case $xxx_convert in
9471 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9472 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
9475 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
9476 for xxx_convert in qgcvt sprintf $xxx_list; do
9477 case "$xxx_ld_list" in
9478 $xxx_convert*|*" $xxx_convert"*) ;;
9479 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9482 : if sprintf cannot do long doubles, move it to the end
9483 if test "$d_PRIgldbl" != "$define"; then
9484 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
9486 : if no qgcvt, remove it
9487 if test "$d_qgcvt" != "$define"; then
9488 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
9491 xxx_list="$xxx_ld_list"
9495 for xxx_convert in $xxx_list; do
9496 echo "Trying $xxx_convert..."
9498 set try -DTRY_$xxx_convert
9499 if eval $compile; then
9500 echo "$xxx_convert() found." >&4
9502 echo "I'll use $xxx_convert to convert floats into a string." >&4
9505 echo "...But $xxx_convert didn't work as I expected."
9509 echo "$xxx_convert NOT found." >&4
9513 if test X$xxx_convert = X; then
9514 echo "*** WHOA THERE!!! ***" >&4
9515 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
9519 case "$xxx_convert" in
9520 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
9521 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
9522 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
9523 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
9524 "$define$define$define")
9525 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9526 "$define$define$undef")
9527 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9528 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9535 : see if _fwalk exists
9539 : Initialize h_fcntl
9542 : Initialize h_sysfile
9545 : access call always available on UNIX
9549 : locate the flags for 'access()'
9553 $cat >access.c <<EOCP
9554 #include <sys/types.h>
9559 #include <sys/file.h>
9572 : check sys/file.h first, no particular reason here
9573 if $test `./findhdr sys/file.h` && \
9574 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9576 echo "<sys/file.h> defines the *_OK access constants." >&4
9577 elif $test `./findhdr fcntl.h` && \
9578 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9580 echo "<fcntl.h> defines the *_OK access constants." >&4
9581 elif $test `./findhdr unistd.h` && \
9582 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9583 echo "<unistd.h> defines the *_OK access constants." >&4
9585 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9591 : see if accessx exists
9592 set accessx d_accessx
9595 : see if aintl exists
9599 : see if alarm exists
9603 : see if POSIX threads are available
9604 set pthread.h i_pthread
9607 : define a fucntion to check prototypes
9608 $cat > protochk <<EOSH
9611 optimize="$optimize"
9613 prototype="$prototype"
9616 usethreads=$usethreads
9617 i_pthread=$i_pthread
9618 pthread_h_first=$pthread_h_first
9621 $cat >> protochk <<'EOSH'
9626 while test $# -ge 2; do
9628 $define) echo "#include <$2>" >> try.c ;;
9629 literal) echo "$2" >> try.c ;;
9631 # Extra magic for the benefit of systems that need pthread.h
9632 # to be included early to correctly detect threadsafe functions.
9633 # Such functions must guarantee themselves, though, that the usethreads
9634 # and i_pthread have been defined, before calling protochk.
9635 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
9636 echo "#include <pthread.h>" >> try.c
9641 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
9642 cat >> try.c <<'EOCP'
9643 #ifdef CAN_PROTOTYPE
9644 #define _(args) args
9649 echo "$foo" >> try.c
9650 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
9651 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
9659 hasproto='varname=$1; func=$2; shift; shift;
9660 while $test $# -ge 2; do
9662 $define) echo "#include <$2>";;
9666 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
9667 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
9668 echo "$func() prototype found.";
9671 echo "$func() prototype NOT found.";
9676 $rm -f try.c tryout.c'
9678 : see if sys/types.h has to be included
9679 set sys/types.h i_systypes
9682 : see if sys/select.h has to be included
9683 set sys/select.h i_sysselct
9686 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9687 while $test $# -ge 2; do
9689 $define) echo "#include <$2>";;
9693 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9695 if eval $compile; then
9704 : see if we should include time.h, sys/time.h, or both
9706 if test "X$timeincl" = X; then
9707 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9708 $echo $n "I'm now running the test program...$c"
9710 #include <sys/types.h>
9715 #ifdef SYSTIMEKERNEL
9718 #include <sys/time.h>
9721 #include <sys/select.h>
9734 struct timezone tzp;
9736 if (foo.tm_sec == foo.tm_sec)
9739 if (bar.tv_sec == bar.tv_sec)
9746 for s_timezone in '-DS_TIMEZONE' ''; do
9748 for s_timeval in '-DS_TIMEVAL' ''; do
9749 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9750 for i_time in '' '-DI_TIME'; do
9751 for i_systime in '-DI_SYSTIME' ''; do
9754 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9755 if eval $compile; then
9756 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9760 $echo $n "Succeeded with $flags$c"
9772 *SYSTIMEKERNEL*) i_systimek="$define"
9773 timeincl=`./findhdr sys/time.h`
9774 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9775 *) i_systimek="$undef";;
9778 *I_TIME*) i_time="$define"
9779 timeincl=`./findhdr time.h`" $timeincl"
9780 echo "We'll include <time.h>." >&4;;
9781 *) i_time="$undef";;
9784 *I_SYSTIME*) i_systime="$define"
9785 timeincl=`./findhdr sys/time.h`" $timeincl"
9786 echo "We'll include <sys/time.h>." >&4;;
9787 *) i_systime="$undef";;
9791 : see if struct tm knows about tm_zone
9792 case "$i_systime$i_time" in
9795 echo "Checking to see if your struct tm has tm_zone field..." >&4
9796 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
9804 case "$d_tm_tm_zone" in
9805 "$define") echo "Yes, it does." ;;
9806 *) echo "No, it doesn't." ;;
9808 : see if struct tm knows about tm_gmtoff
9809 case "$i_systime$i_time" in
9812 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
9813 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
9821 case "$d_tm_tm_gmtoff" in
9822 "$define") echo "Yes, it does." ;;
9823 *) echo "No, it doesn't." ;;
9826 : see if asctime_r exists
9827 set asctime_r d_asctime_r
9829 case "$d_asctime_r" in
9831 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
9832 case "$d_asctime_r_proto:$usethreads" in
9833 ":define") d_asctime_r_proto=define
9834 set d_asctime_r_proto asctime_r $hdrs
9838 case "$d_asctime_r_proto" in
9840 case "$asctime_r_proto" in
9841 ''|0) try='char* asctime_r(const struct tm*, char*);'
9842 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;;
9844 case "$asctime_r_proto" in
9845 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
9846 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;;
9848 case "$asctime_r_proto" in
9849 ''|0) try='int asctime_r(const struct tm*, char*);'
9850 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;;
9852 case "$asctime_r_proto" in
9853 ''|0) try='int asctime_r(const struct tm*, char*, int);'
9854 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;;
9856 case "$asctime_r_proto" in
9857 ''|0) d_asctime_r=undef
9859 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
9860 * ) case "$asctime_r_proto" in
9861 REENTRANT_PROTO*) ;;
9862 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
9864 echo "Prototype: $try" ;;
9867 *) case "$usethreads" in
9868 define) echo "asctime_r has no prototype, not using it." >&4 ;;
9875 *) asctime_r_proto=0
9879 : see if atolf exists
9883 : see if atoll exists
9887 : Look for GCC-style attribute format
9888 case "$d_attribute_format" in
9891 echo "Checking whether your compiler can handle __attribute__((format)) ..." >&4
9892 $cat >attrib.c <<'EOCP'
9894 void my_special_printf(char* pat,...) __attribute__((__format__(__printf__,1,2)));
9896 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9897 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9898 echo "Your C compiler doesn't support __attribute__((format))."
9901 echo "Your C compiler supports __attribute__((format))."
9905 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9909 *) val="$d_attribute_format" ;;
9911 set d_attribute_format
9915 : Look for GCC-style attribute malloc
9916 case "$d_attribute_malloc" in
9919 echo "Checking whether your compiler can handle __attribute__((malloc)) ..." >&4
9920 $cat >attrib.c <<'EOCP'
9922 char *go_get_some_memory( int how_many_bytes ) __attribute__((malloc));
9924 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9925 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9926 echo "Your C compiler doesn't support __attribute__((malloc))."
9929 echo "Your C compiler supports __attribute__((malloc))."
9933 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9937 *) val="$d_attribute_malloc" ;;
9939 set d_attribute_malloc
9943 : Look for GCC-style attribute nonnull
9944 case "$d_attribute_nonnull" in
9947 echo "Checking whether your compiler can handle __attribute__((nonnull(1))) ..." >&4
9948 $cat >attrib.c <<'EOCP'
9950 void do_something (char *some_pointer,...) __attribute__((nonnull(1)));
9952 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9953 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9954 echo "Your C compiler doesn't support __attribute__((nonnull))."
9957 echo "Your C compiler supports __attribute__((nonnull))."
9961 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9965 *) val="$d_attribute_nonnull" ;;
9967 set d_attribute_nonnull
9971 : Look for GCC-style attribute noreturn
9972 case "$d_attribute_noreturn" in
9975 echo "Checking whether your compiler can handle __attribute__((noreturn)) ..." >&4
9976 $cat >attrib.c <<'EOCP'
9978 void fall_over_dead( void ) __attribute__((noreturn));
9980 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
9981 if $contains 'warning' attrib.out >/dev/null 2>&1; then
9982 echo "Your C compiler doesn't support __attribute__((noreturn))."
9985 echo "Your C compiler supports __attribute__((noreturn))."
9989 echo "Your C compiler doesn't seem to understand __attribute__ at all."
9993 *) val="$d_attribute_noreturn" ;;
9995 set d_attribute_noreturn
9999 : Look for GCC-style attribute pure
10000 case "$d_attribute_pure" in
10003 echo "Checking whether your compiler can handle __attribute__((pure)) ..." >&4
10004 $cat >attrib.c <<'EOCP'
10006 int square( int n ) __attribute__((pure));
10008 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10009 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10010 echo "Your C compiler doesn't support __attribute__((pure))."
10013 echo "Your C compiler supports __attribute__((pure))."
10017 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10021 *) val="$d_attribute_pure" ;;
10023 set d_attribute_pure
10027 : Look for GCC-style attribute unused
10028 case "$d_attribute_unused" in
10031 echo "Checking whether your compiler can handle __attribute__((unused)) ..." >&4
10032 $cat >attrib.c <<'EOCP'
10034 int do_something( int dummy __attribute__((unused)), int n );
10036 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10037 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10038 echo "Your C compiler doesn't support __attribute__((unused))."
10041 echo "Your C compiler supports __attribute__((unused))."
10045 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10049 *) val="$d_attribute_unused" ;;
10051 set d_attribute_unused
10055 : Look for GCC-style attribute warn_unused_result
10056 case "$d_attribute_warn_unused_result" in
10059 echo "Checking whether your compiler can handle __attribute__((warn_unused_result)) ..." >&4
10060 $cat >attrib.c <<'EOCP'
10062 int I_will_not_be_ignored(void) __attribute__((warn_unused_result));
10064 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10065 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10066 echo "Your C compiler doesn't support __attribute__((warn_unused_result))."
10069 echo "Your C compiler supports __attribute__((warn_unused_result))."
10073 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10077 *) val="$d_attribute_warn_unused_result" ;;
10079 set d_attribute_warn_unused_result
10083 : see if bcmp exists
10087 : see if bcopy exists
10091 : see if this is a unistd.h system
10092 set unistd.h i_unistd
10095 : see if getpgrp exists
10096 set getpgrp d_getpgrp
10099 case "$d_getpgrp" in
10102 echo "Checking to see which flavor of getpgrp is in use..."
10104 #$i_unistd I_UNISTD
10105 #include <sys/types.h>
10107 # include <unistd.h>
10109 #$i_stdlib I_STDLIB
10111 #include <stdlib.h>
10115 if (getuid() == 0) {
10116 printf("(I see you are running Configure as super-user...)\n");
10119 #ifdef TRY_BSD_PGRP
10120 if (getpgrp(1) == 0)
10129 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10130 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
10132 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10133 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
10136 echo "I can't seem to compile and run the test program."
10138 xxx="a USG one, i.e. you use getpgrp()."
10140 # SVR4 systems can appear rather BSD-ish.
10141 case "$i_unistd" in
10143 xxx="a BSD one, i.e. you use getpgrp(pid)."
10147 xxx="probably a USG one, i.e. you use getpgrp()."
10152 echo "Assuming your getpgrp is $xxx" >&4
10161 : see if setpgrp exists
10162 set setpgrp d_setpgrp
10165 case "$d_setpgrp" in
10168 echo "Checking to see which flavor of setpgrp is in use..."
10170 #$i_unistd I_UNISTD
10171 #include <sys/types.h>
10173 # include <unistd.h>
10175 #$i_stdlib I_STDLIB
10177 #include <stdlib.h>
10181 if (getuid() == 0) {
10182 printf("(I see you are running Configure as super-user...)\n");
10185 #ifdef TRY_BSD_PGRP
10186 if (-1 == setpgrp(1, 1))
10189 if (setpgrp() != -1)
10195 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10196 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
10198 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10199 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
10202 echo "(I can't seem to compile and run the test program.)"
10204 xxx="a USG one, i.e. you use setpgrp()."
10206 # SVR4 systems can appear rather BSD-ish.
10207 case "$i_unistd" in
10209 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
10213 xxx="probably a USG one, i.e. you use setpgrp()."
10218 echo "Assuming your setpgrp is $xxx" >&4
10226 : see if bzero exists
10230 : see if signal is declared as pointer to function returning int or void
10232 xxx=`./findhdr signal.h`
10233 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
10234 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
10235 echo "You have int (*signal())() instead of void." >&4
10237 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
10238 echo "You have void (*signal())()." >&4
10240 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
10241 echo "You have int (*signal())() instead of void." >&4
10243 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
10244 echo "You have void (*signal())()." >&4
10247 case "$d_voidsig" in
10249 echo "I can't determine whether signal handler returns void or int..." >&4
10251 rp="What type does your signal handler return?"
10254 v*) val="$define";;
10258 echo "As you already told me, signal handler returns void." >&4
10261 *) echo "As you already told me, signal handler returns int." >&4
10268 case "$d_voidsig" in
10269 "$define") signal_t="void";;
10270 *) signal_t="int";;
10274 : check for ability to cast large floats to 32-bit ints.
10276 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
10277 if $test "$intsize" -ge 4; then
10284 #$i_stdlib I_STDLIB
10286 #include <stdlib.h>
10288 #include <sys/types.h>
10289 #include <signal.h>
10290 $signal_t blech(s) int s; { exit(3); }
10297 signal(SIGFPE, blech);
10299 /* Don't let compiler optimize the test away. Store the number
10300 in a writable string for gcc to pass to sscanf under HP/UX.
10302 sprintf(str, "2147483647");
10303 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
10307 /* x86 processors will probably give 0x8000 0000, which is a
10308 sign change. We don't want that. We want to mimic SPARC
10309 behavior here, which is to preserve the sign and give
10312 if (i32 != ($xxx) f)
10318 if eval $compile_ok; then
10322 echo "(I can't seem to compile the test program--assuming it can't)"
10327 echo "Yup, it can."
10330 echo "Nope, it can't."
10337 : check for ability to cast negative floats to unsigned
10339 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
10342 #$i_stdlib I_STDLIB
10344 #include <stdlib.h>
10346 #include <sys/types.h>
10347 #include <signal.h>
10348 $signal_t blech(s) int s; { exit(7); }
10349 $signal_t blech_in_list(s) int s; { exit(4); }
10350 unsigned long dummy_long(p) unsigned long p; { return p; }
10351 unsigned int dummy_int(p) unsigned int p; { return p; }
10352 unsigned short dummy_short(p) unsigned short p; { return p; }
10356 unsigned long along;
10358 unsigned short ashort;
10362 /* Frustrate gcc-2.7.2's optimizer which failed this test with
10363 a direct f = -123. assignment. gcc-2.8.0 reportedly
10364 optimized the whole file away
10366 /* Store the number in a writable string for gcc to pass to
10367 sscanf under HP/UX.
10369 sprintf(str, "-123");
10370 sscanf(str, "%lf", &f); /* f = -123.; */
10372 signal(SIGFPE, blech);
10373 along = (unsigned long)f;
10374 aint = (unsigned int)f;
10375 ashort = (unsigned short)f;
10376 if (along != (unsigned long)-123)
10378 if (aint != (unsigned int)-123)
10380 if (ashort != (unsigned short)-123)
10382 sprintf(str, "1073741824.");
10383 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
10386 along = (unsigned long)f;
10387 if (along != 0x80000000)
10391 along = (unsigned long)f;
10392 if (along != 0x7fffffff)
10396 along = (unsigned long)f;
10397 if (along != 0x80000001)
10401 signal(SIGFPE, blech_in_list);
10402 sprintf(str, "123.");
10403 sscanf(str, "%lf", &f); /* f = 123.; */
10404 along = dummy_long((unsigned long)f);
10405 aint = dummy_int((unsigned int)f);
10406 ashort = dummy_short((unsigned short)f);
10407 if (along != (unsigned long)123)
10409 if (aint != (unsigned int)123)
10411 if (ashort != (unsigned short)123)
10418 if eval $compile_ok; then
10422 echo "(I can't seem to compile the test program--assuming it can't)"
10425 case "$castflags" in
10427 echo "Yup, it can."
10430 echo "Nope, it can't."
10437 : see if vprintf exists
10439 if set vprintf val -f d_vprintf; eval $csym; $val; then
10440 echo 'vprintf() found.' >&4
10443 #include <varargs.h>
10444 #$i_stdlib I_STDLIB
10446 #include <stdlib.h>
10449 int main() { xxx("foo"); }
10458 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
10462 if eval $compile && $run ./try; then
10463 echo "Your vsprintf() returns (int)." >&4
10466 echo "Your vsprintf() returns (char*)." >&4
10470 echo 'vprintf() NOT found.' >&4
10481 : see if chown exists
10485 : see if chroot exists
10486 set chroot d_chroot
10489 : see if chsize exists
10490 set chsize d_chsize
10493 : see if class exists
10497 hasstruct='varname=$1; struct=$2; shift; shift;
10498 while $test $# -ge 2; do
10500 $define) echo "#include <$2>";;
10504 echo "int main () { struct $struct foo; }" >> try.c;
10506 if eval $compile; then
10513 $rm -f try.c try.o'
10517 : see whether socket exists
10519 $echo $n "Hmm... $c" >&4
10520 if set socket val -f d_socket; eval $csym; $val; then
10521 echo "Looks like you have Berkeley networking support." >&4
10523 if set setsockopt val -f; eval $csym; $val; then
10526 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
10527 d_oldsock="$define"
10530 if $contains socklib libc.list >/dev/null 2>&1; then
10531 echo "Looks like you have Berkeley networking support." >&4
10533 : we will have to assume that it supports the 4.2 BSD interface
10536 echo "You don't have Berkeley networking in libc$_a..." >&4
10537 if test "X$d_socket" = "X$define"; then
10538 echo "...but you seem to believe that you have sockets." >&4
10540 for net in net socket
10542 if test -f /usr/lib/lib$net$_a; then
10543 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
10544 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
10545 if $contains socket libc.list >/dev/null 2>&1; then
10550 echo "...but the Wollongong group seems to have hacked it in." >&4
10551 sockethdr="-I/usr/netinclude"
10554 echo "Found Berkeley sockets interface in lib$net." >&4
10555 if $contains setsockopt libc.list >/dev/null 2>&1; then
10558 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
10559 d_oldsock="$define"
10565 if test "X$d_socket" != "X$define"; then
10566 echo "or anywhere else I see." >&4
10574 : see if socketpair exists
10575 set socketpair d_sockpair
10580 echo "Checking the availability of certain socket constants..." >&4
10581 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
10582 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
10584 #include <sys/types.h>
10585 #include <sys/socket.h>
10591 set try; if eval $compile; then
10594 set d_${enum}; eval $setvar
10598 : see if this is a sys/uio.h system
10599 set sys/uio.h i_sysuio
10604 echo "Checking to see if your system supports struct cmsghdr..." >&4
10605 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
10607 case "$d_cmsghdr_s" in
10608 "$define") echo "Yes, it does." ;;
10609 *) echo "No, it doesn't." ;;
10613 : check for const keyword
10615 echo 'Checking to see if your C compiler knows about "const"...' >&4
10616 $cat >const.c <<'EOCP'
10617 typedef struct spug { int drokk; } spug;
10624 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
10626 echo "Yup, it does."
10629 echo "Nope, it doesn't."
10634 : see if copysignl exists
10635 set copysignl d_copysignl
10638 : see if crypt exists
10643 $define) cryptlib='' ;;
10644 *) if set crypt val -f d_crypt; eval $csym; $val; then
10645 echo 'crypt() found.' >&4
10649 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
10650 if $test -z "$cryptlib"; then
10651 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
10655 if $test -z "$cryptlib"; then
10656 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
10660 if $test -z "$cryptlib"; then
10661 cryptlib=`./loc libcrypt$_a "" $libpth`
10665 if $test -z "$cryptlib"; then
10666 echo 'crypt() NOT found.' >&4
10677 : see if this is a crypt.h system
10678 set crypt.h i_crypt
10681 : see if crypt_r exists
10682 set crypt_r d_crypt_r
10684 case "$d_crypt_r" in
10686 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
10687 case "$d_crypt_r_proto:$usethreads" in
10688 ":define") d_crypt_r_proto=define
10689 set d_crypt_r_proto crypt_r $hdrs
10693 case "$d_crypt_r_proto" in
10695 case "$crypt_r_proto" in
10696 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
10697 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCS ;;
10699 case "$crypt_r_proto" in
10700 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
10701 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCD ;;
10703 case "$crypt_r_proto" in
10704 ''|0) d_crypt_r=undef
10706 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
10707 * ) case "$crypt_r_proto" in
10708 REENTRANT_PROTO*) ;;
10709 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
10711 echo "Prototype: $try" ;;
10714 *) case "$usethreads" in
10715 define) echo "crypt_r has no prototype, not using it." >&4 ;;
10726 : get csh whereabouts
10728 'csh') val="$undef" ;;
10729 *) val="$define" ;;
10733 : Respect a hint or command line value for full_csh.
10734 case "$full_csh" in
10735 '') full_csh=$csh ;;
10738 : see if ctermid_r exists
10739 set ctermid_r d_ctermid_r
10741 case "$d_ctermid_r" in
10743 hdrs="$i_systypes sys/types.h define stdio.h "
10744 case "$d_ctermid_r_proto:$usethreads" in
10745 ":define") d_ctermid_r_proto=define
10746 set d_ctermid_r_proto ctermid_r $hdrs
10750 case "$d_ctermid_r_proto" in
10752 case "$ctermid_r_proto" in
10753 ''|0) try='char* ctermid_r(char*);'
10754 ./protochk "extern $try" $hdrs && ctermid_r_proto=B_B ;;
10756 case "$ctermid_r_proto" in
10757 ''|0) d_ctermid_r=undef
10759 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
10760 * ) case "$ctermid_r_proto" in
10761 REENTRANT_PROTO*) ;;
10762 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
10764 echo "Prototype: $try" ;;
10767 *) case "$usethreads" in
10768 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
10775 *) ctermid_r_proto=0
10779 : see if ctime_r exists
10780 set ctime_r d_ctime_r
10782 case "$d_ctime_r" in
10784 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
10785 case "$d_ctime_r_proto:$usethreads" in
10786 ":define") d_ctime_r_proto=define
10787 set d_ctime_r_proto ctime_r $hdrs
10791 case "$d_ctime_r_proto" in
10793 case "$ctime_r_proto" in
10794 ''|0) try='char* ctime_r(const time_t*, char*);'
10795 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;;
10797 case "$ctime_r_proto" in
10798 ''|0) try='char* ctime_r(const time_t*, char*, int);'
10799 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;;
10801 case "$ctime_r_proto" in
10802 ''|0) try='int ctime_r(const time_t*, char*);'
10803 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;;
10805 case "$ctime_r_proto" in
10806 ''|0) try='int ctime_r(const time_t*, char*, int);'
10807 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;;
10809 case "$ctime_r_proto" in
10810 ''|0) d_ctime_r=undef
10812 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
10813 * ) case "$ctime_r_proto" in
10814 REENTRANT_PROTO*) ;;
10815 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
10817 echo "Prototype: $try" ;;
10820 *) case "$usethreads" in
10821 define) echo "ctime_r has no prototype, not using it." >&4 ;;
10832 : see if cuserid exists
10833 set cuserid d_cuserid
10836 : see if this is a limits.h system
10837 set limits.h i_limits
10840 : see if this is a float.h system
10841 set float.h i_float
10844 : See if number of significant digits in a double precision number is known
10846 $cat >dbl_dig.c <<EOM
10847 #$i_limits I_LIMITS
10850 #include <limits.h>
10856 printf("Contains DBL_DIG");
10859 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
10860 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
10861 echo "DBL_DIG found." >&4
10864 echo "DBL_DIG NOT found." >&4
10871 : see if dbm.h is available
10872 : see if dbmclose exists
10873 set dbmclose d_dbmclose
10876 case "$d_dbmclose" in
10886 *) set rpcsvc/dbm.h i_rpcsvcdbm
10891 *) echo "We won't be including <dbm.h>"
10901 : see if prototype for dbminit is available
10903 set d_dbminitproto dbminit $i_dbm dbm.h
10906 : see if difftime exists
10907 set difftime d_difftime
10910 : see if this is a dirent system
10912 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
10914 echo "<dirent.h> found." >&4
10917 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
10918 echo "<sys/dir.h> found." >&4
10921 xinc=`./findhdr sys/ndir.h`
10923 echo "<dirent.h> NOT found." >&4
10928 : Look for type of directory structure.
10930 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10932 case "$direntrytype" in
10934 case "$i_dirent" in
10935 $define) guess1='struct dirent' ;;
10936 *) guess1='struct direct' ;;
10939 *) guess1="$direntrytype"
10944 'struct dirent') guess2='struct direct' ;;
10945 *) guess2='struct dirent' ;;
10948 if $contains "$guess1" try.c >/dev/null 2>&1; then
10949 direntrytype="$guess1"
10950 echo "Your directory entries are $direntrytype." >&4
10951 elif $contains "$guess2" try.c >/dev/null 2>&1; then
10952 direntrytype="$guess2"
10953 echo "Your directory entries seem to be $direntrytype." >&4
10955 echo "I don't recognize your system's directory entries." >&4
10956 rp="What type is used for directory entries on this system?"
10959 direntrytype="$ans"
10964 : see if the directory entry stores field length
10966 $cppstdin $cppflags $cppminus < "$xinc" > try.c
10967 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
10968 echo "Good, your directory entry keeps length information in d_namlen." >&4
10971 echo "Your directory entry does not know about the d_namlen field." >&4
10978 : see if this is an sysdir system
10979 set sys/dir.h i_sysdir
10982 : see if this is an sysndir system
10983 set sys/ndir.h i_sysndir
10988 $cat >dirfd.c <<EOM
10990 #$i_stdlib I_STDLIB
10992 #include <stdlib.h>
10994 #$i_dirent I_DIRENT /**/
10995 #$i_sysdir I_SYS_DIR /**/
10996 #$i_sysndir I_SYS_NDIR /**/
10997 #$i_systypes I_SYS_TYPES /**/
10998 #if defined(I_SYS_TYPES)
10999 #include <sys/types.h>
11001 #if defined(I_DIRENT)
11002 #include <dirent.h>
11003 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
11004 #include <sys/dir.h>
11008 #include <sys/ndir.h>
11012 #include <ndir.h> /* may be wrong in the future */
11014 #include <sys/dir.h>
11020 DIR *dirp = opendir(".");
11021 if (dirfd(dirp) >= 0)
11028 if eval $compile; then
11032 $define) echo "dirfd() found." >&4 ;;
11033 *) echo "dirfd() NOT found." >&4 ;;
11039 : see if dlerror exists
11042 set dlerror d_dlerror
11046 : see if dlfcn is available
11047 set dlfcn.h i_dlfcn
11054 On a few systems, the dynamically loaded modules that perl generates and uses
11055 will need a different extension than shared libs. The default will probably
11061 *) dflt="$dlext" ;;
11063 rp='What is the extension of dynamically loaded modules'
11072 : Check if dlsym need a leading underscore
11078 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
11079 $cat >dyna.c <<'EOM'
11086 #$i_stdlib I_STDLIB
11088 #include <stdlib.h>
11092 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
11094 #include <sys/types.h>
11099 extern int fred() ;
11108 int mode = RTLD_LAZY ;
11110 handle = dlopen("./dyna.$dlext", mode) ;
11111 if (handle == NULL) {
11116 symbol = dlsym(handle, "fred") ;
11117 if (symbol == NULL) {
11118 /* try putting a leading underscore */
11119 symbol = dlsym(handle, "_fred") ;
11120 if (symbol == NULL) {
11133 : Call the object file tmp-dyna.o in case dlext=o.
11134 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
11135 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
11136 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
11137 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
11140 1) echo "Test program failed using dlopen." >&4
11141 echo "Perhaps you should not use dynamic loading." >&4;;
11142 2) echo "Test program failed using dlsym." >&4
11143 echo "Perhaps you should not use dynamic loading." >&4;;
11144 3) echo "dlsym needs a leading underscore" >&4
11146 4) echo "dlsym doesn't need a leading underscore." >&4;;
11149 echo "I can't compile and run the test program." >&4
11150 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
11155 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
11160 : see if drand48_r exists
11161 set drand48_r d_drand48_r
11163 case "$d_drand48_r" in
11165 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
11166 case "$d_drand48_r_proto:$usethreads" in
11167 ":define") d_drand48_r_proto=define
11168 set d_drand48_r_proto drand48_r $hdrs
11172 case "$d_drand48_r_proto" in
11174 case "$drand48_r_proto" in
11175 ''|0) try='int drand48_r(struct drand48_data*, double*);'
11176 ./protochk "extern $try" $hdrs && drand48_r_proto=I_ST ;;
11178 case "$drand48_r_proto" in
11179 ''|0) d_drand48_r=undef
11181 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
11182 * ) case "$drand48_r_proto" in
11183 REENTRANT_PROTO*) ;;
11184 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
11186 echo "Prototype: $try" ;;
11189 *) case "$usethreads" in
11190 define) echo "drand48_r has no prototype, not using it." >&4 ;;
11197 *) drand48_r_proto=0
11201 : see if prototype for drand48 is available
11203 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
11206 : see if dup2 exists
11210 : see if eaccess exists
11211 set eaccess d_eaccess
11214 : see if endgrent exists
11215 set endgrent d_endgrent
11218 : see if this is an grp system
11224 xxx=`./findhdr grp.h`
11225 $cppstdin $cppflags $cppminus < $xxx >$$.h
11227 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
11239 set d_grpasswd; eval $setvar
11243 : see if endgrent_r exists
11244 set endgrent_r d_endgrent_r
11246 case "$d_endgrent_r" in
11248 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11249 case "$d_endgrent_r_proto:$usethreads" in
11250 ":define") d_endgrent_r_proto=define
11251 set d_endgrent_r_proto endgrent_r $hdrs
11255 case "$d_endgrent_r_proto" in
11257 case "$endgrent_r_proto" in
11258 ''|0) try='int endgrent_r(FILE**);'
11259 ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;;
11261 case "$endgrent_r_proto" in
11262 ''|0) try='void endgrent_r(FILE**);'
11263 ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;;
11265 case "$endgrent_r_proto" in
11266 ''|0) d_endgrent_r=undef
11268 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
11269 * ) case "$endgrent_r_proto" in
11270 REENTRANT_PROTO*) ;;
11271 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
11273 echo "Prototype: $try" ;;
11276 *) case "$usethreads" in
11277 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
11284 *) endgrent_r_proto=0
11288 : see if endhostent exists
11289 set endhostent d_endhent
11292 : see if this is a netdb.h system
11293 set netdb.h i_netdb
11296 : see if endhostent_r exists
11297 set endhostent_r d_endhostent_r
11299 case "$d_endhostent_r" in
11301 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11302 case "$d_endhostent_r_proto:$usethreads" in
11303 ":define") d_endhostent_r_proto=define
11304 set d_endhostent_r_proto endhostent_r $hdrs
11308 case "$d_endhostent_r_proto" in
11310 case "$endhostent_r_proto" in
11311 ''|0) try='int endhostent_r(struct hostent_data*);'
11312 ./protochk "extern $try" $hdrs && endhostent_r_proto=I_D ;;
11314 case "$endhostent_r_proto" in
11315 ''|0) try='void endhostent_r(struct hostent_data*);'
11316 ./protochk "extern $try" $hdrs && endhostent_r_proto=V_D ;;
11318 case "$endhostent_r_proto" in
11319 ''|0) d_endhostent_r=undef
11320 endhostent_r_proto=0
11321 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
11322 * ) case "$endhostent_r_proto" in
11323 REENTRANT_PROTO*) ;;
11324 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
11326 echo "Prototype: $try" ;;
11329 *) case "$usethreads" in
11330 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
11332 d_endhostent_r=undef
11333 endhostent_r_proto=0
11337 *) endhostent_r_proto=0
11341 : see if endnetent exists
11342 set endnetent d_endnent
11345 : see if endnetent_r exists
11346 set endnetent_r d_endnetent_r
11348 case "$d_endnetent_r" in
11350 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11351 case "$d_endnetent_r_proto:$usethreads" in
11352 ":define") d_endnetent_r_proto=define
11353 set d_endnetent_r_proto endnetent_r $hdrs
11357 case "$d_endnetent_r_proto" in
11359 case "$endnetent_r_proto" in
11360 ''|0) try='int endnetent_r(struct netent_data*);'
11361 ./protochk "extern $try" $hdrs && endnetent_r_proto=I_D ;;
11363 case "$endnetent_r_proto" in
11364 ''|0) try='void endnetent_r(struct netent_data*);'
11365 ./protochk "extern $try" $hdrs && endnetent_r_proto=V_D ;;
11367 case "$endnetent_r_proto" in
11368 ''|0) d_endnetent_r=undef
11369 endnetent_r_proto=0
11370 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
11371 * ) case "$endnetent_r_proto" in
11372 REENTRANT_PROTO*) ;;
11373 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
11375 echo "Prototype: $try" ;;
11378 *) case "$usethreads" in
11379 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
11381 d_endnetent_r=undef
11382 endnetent_r_proto=0
11386 *) endnetent_r_proto=0
11390 : see if endprotoent exists
11391 set endprotoent d_endpent
11394 : see if endprotoent_r exists
11395 set endprotoent_r d_endprotoent_r
11397 case "$d_endprotoent_r" in
11399 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11400 case "$d_endprotoent_r_proto:$usethreads" in
11401 ":define") d_endprotoent_r_proto=define
11402 set d_endprotoent_r_proto endprotoent_r $hdrs
11406 case "$d_endprotoent_r_proto" in
11408 case "$endprotoent_r_proto" in
11409 ''|0) try='int endprotoent_r(struct protoent_data*);'
11410 ./protochk "extern $try" $hdrs && endprotoent_r_proto=I_D ;;
11412 case "$endprotoent_r_proto" in
11413 ''|0) try='void endprotoent_r(struct protoent_data*);'
11414 ./protochk "extern $try" $hdrs && endprotoent_r_proto=V_D ;;
11416 case "$endprotoent_r_proto" in
11417 ''|0) d_endprotoent_r=undef
11418 endprotoent_r_proto=0
11419 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
11420 * ) case "$endprotoent_r_proto" in
11421 REENTRANT_PROTO*) ;;
11422 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
11424 echo "Prototype: $try" ;;
11427 *) case "$usethreads" in
11428 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
11430 d_endprotoent_r=undef
11431 endprotoent_r_proto=0
11435 *) endprotoent_r_proto=0
11439 : see if endpwent exists
11440 set endpwent d_endpwent
11443 : see if this is a pwd.h system
11449 xxx=`./findhdr pwd.h`
11450 $cppstdin $cppflags $cppminus < $xxx >$$.h
11452 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
11460 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
11468 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
11476 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
11484 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
11492 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
11500 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
11508 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
11520 set d_pwquota; eval $setvar
11521 set d_pwage; eval $setvar
11522 set d_pwchange; eval $setvar
11523 set d_pwclass; eval $setvar
11524 set d_pwexpire; eval $setvar
11525 set d_pwcomment; eval $setvar
11526 set d_pwgecos; eval $setvar
11527 set d_pwpasswd; eval $setvar
11531 : see if endpwent_r exists
11532 set endpwent_r d_endpwent_r
11534 case "$d_endpwent_r" in
11536 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
11537 case "$d_endpwent_r_proto:$usethreads" in
11538 ":define") d_endpwent_r_proto=define
11539 set d_endpwent_r_proto endpwent_r $hdrs
11543 case "$d_endpwent_r_proto" in
11545 case "$endpwent_r_proto" in
11546 ''|0) try='int endpwent_r(FILE**);'
11547 ./protochk "extern $try" $hdrs && endpwent_r_proto=I_H ;;
11549 case "$endpwent_r_proto" in
11550 ''|0) try='void endpwent_r(FILE**);'
11551 ./protochk "extern $try" $hdrs && endpwent_r_proto=V_H ;;
11553 case "$endpwent_r_proto" in
11554 ''|0) d_endpwent_r=undef
11556 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
11557 * ) case "$endpwent_r_proto" in
11558 REENTRANT_PROTO*) ;;
11559 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
11561 echo "Prototype: $try" ;;
11564 *) case "$usethreads" in
11565 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
11572 *) endpwent_r_proto=0
11576 : see if endservent exists
11577 set endservent d_endsent
11580 : see if endservent_r exists
11581 set endservent_r d_endservent_r
11583 case "$d_endservent_r" in
11585 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11586 case "$d_endservent_r_proto:$usethreads" in
11587 ":define") d_endservent_r_proto=define
11588 set d_endservent_r_proto endservent_r $hdrs
11592 case "$d_endservent_r_proto" in
11594 case "$endservent_r_proto" in
11595 ''|0) try='int endservent_r(struct servent_data*);'
11596 ./protochk "extern $try" $hdrs && endservent_r_proto=I_D ;;
11598 case "$endservent_r_proto" in
11599 ''|0) try='void endservent_r(struct servent_data*);'
11600 ./protochk "extern $try" $hdrs && endservent_r_proto=V_D ;;
11602 case "$endservent_r_proto" in
11603 ''|0) d_endservent_r=undef
11604 endservent_r_proto=0
11605 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
11606 * ) case "$endservent_r_proto" in
11607 REENTRANT_PROTO*) ;;
11608 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
11610 echo "Prototype: $try" ;;
11613 *) case "$usethreads" in
11614 define) echo "endservent_r has no prototype, not using it." >&4 ;;
11616 d_endservent_r=undef
11617 endservent_r_proto=0
11621 *) endservent_r_proto=0
11625 : Locate the flags for 'open()'
11628 #include <sys/types.h>
11633 #include <sys/file.h>
11635 #$i_stdlib I_STDLIB
11637 #include <stdlib.h>
11648 : check sys/file.h first to get FREAD on Sun
11649 if $test `./findhdr sys/file.h` && \
11650 set try -DI_SYS_FILE && eval $compile; then
11652 echo "<sys/file.h> defines the O_* constants..." >&4
11653 if $run ./try; then
11654 echo "and you have the 3 argument form of open()." >&4
11657 echo "but not the 3 argument form of open(). Oh, well." >&4
11660 elif $test `./findhdr fcntl.h` && \
11661 set try -DI_FCNTL && eval $compile; then
11663 echo "<fcntl.h> defines the O_* constants..." >&4
11664 if $run ./try; then
11665 echo "and you have the 3 argument form of open()." >&4
11668 echo "but not the 3 argument form of open(). Oh, well." >&4
11673 echo "I can't find the O_* constant definitions! You got problems." >&4
11679 : see which of string.h or strings.h is needed
11681 strings=`./findhdr string.h`
11682 if $test "$strings" && $test -r "$strings"; then
11683 echo "Using <string.h> instead of <strings.h>." >&4
11687 strings=`./findhdr strings.h`
11688 if $test "$strings" && $test -r "$strings"; then
11689 echo "Using <strings.h> instead of <string.h>." >&4
11691 echo "No string header found -- You'll surely have problems." >&4
11696 case "$i_string" in
11697 "$undef") strings=`./findhdr strings.h`;;
11698 *) strings=`./findhdr string.h`;;
11701 : see if this is a sys/file.h system
11706 : do we need to include sys/file.h ?
11710 if $h_sysfile; then
11712 echo "We'll be including <sys/file.h>." >&4
11715 echo "We won't be including <sys/file.h>." >&4
11725 : see if fcntl.h is there
11730 : see if we can include fcntl.h
11736 echo "We'll be including <fcntl.h>." >&4
11739 if $h_sysfile; then
11740 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
11742 echo "We won't be including <fcntl.h>." >&4
11754 : check for non-blocking I/O stuff
11755 case "$h_sysfile" in
11756 true) echo "#include <sys/file.h>" > head.c;;
11759 true) echo "#include <fcntl.h>" > head.c;;
11760 *) echo "#include <sys/fcntl.h>" > head.c;;
11765 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
11766 case "$o_nonblock" in
11768 $cat head.c > try.c
11769 $cat >>try.c <<EOCP
11771 #$i_stdlib I_STDLIB
11773 #include <stdlib.h>
11781 printf("O_NONBLOCK\n");
11785 printf("O_NDELAY\n");
11789 printf("FNDELAY\n");
11796 if eval $compile_ok; then
11797 o_nonblock=`$run ./try`
11798 case "$o_nonblock" in
11799 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
11800 *) echo "Seems like we can use $o_nonblock.";;
11803 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
11806 *) echo "Using $hint value $o_nonblock.";;
11808 $rm -f try try.* .out core
11811 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
11814 $cat head.c > try.c
11815 $cat >>try.c <<EOCP
11817 #include <sys/types.h>
11818 #include <signal.h>
11820 #$i_stdlib I_STDLIB
11822 #include <stdlib.h>
11828 #define MY_O_NONBLOCK $o_nonblock
11829 #ifndef errno /* XXX need better Configure test */
11832 #$i_unistd I_UNISTD
11834 #include <unistd.h>
11836 #$i_string I_STRING
11838 #include <string.h>
11840 #include <strings.h>
11842 $signal_t blech(x) int x; { exit(3); }
11844 $cat >> try.c <<'EOCP'
11852 pipe(pd); /* Down: child -> parent */
11853 pipe(pu); /* Up: parent -> child */
11856 close(pd[1]); /* Parent reads from pd[0] */
11857 close(pu[0]); /* Parent writes (blocking) to pu[1] */
11859 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
11864 signal(SIGALRM, blech);
11866 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
11868 sprintf(string, "%d\n", ret);
11869 write(2, string, strlen(string));
11872 if (errno == EAGAIN) {
11873 printf("EAGAIN\n");
11878 if (errno == EWOULDBLOCK)
11879 printf("EWOULDBLOCK\n");
11882 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
11883 sleep(2); /* Give it time to close our pipe */
11885 ret = read(pd[0], buf, 1); /* Should read EOF */
11887 sprintf(string, "%d\n", ret);
11888 write(4, string, strlen(string));
11892 close(pd[0]); /* We write to pd[1] */
11893 close(pu[1]); /* We read from pu[0] */
11894 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
11895 close(pd[1]); /* Pipe pd is now fully closed! */
11896 exit(0); /* Bye bye, thank you for playing! */
11900 if eval $compile_ok; then
11901 echo "$startsh" >mtry
11902 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
11904 ./mtry >/dev/null 2>&1
11906 0) eagain=`$cat try.out`;;
11907 1) echo "Could not perform non-blocking setting!";;
11908 2) echo "I did a successful read() for something that was not there!";;
11909 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
11910 4) echo "Could not find F_SETFL!";;
11911 *) echo "Something terribly wrong happened during testing.";;
11913 rd_nodata=`$cat try.ret`
11914 echo "A read() system call with no data present returns $rd_nodata."
11915 case "$rd_nodata" in
11918 echo "(That's peculiar, fixing that to be -1.)"
11924 echo "Forcing errno EAGAIN on read() with no data available."
11928 echo "Your read() sets errno to $eagain when no data is available."
11931 status=`$cat try.err`
11933 0) echo "And it correctly returns 0 to signal EOF.";;
11934 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
11935 *) echo "However, your read() returns '$status' on EOF??";;
11938 if test "$status" = "$rd_nodata"; then
11939 echo "WARNING: you can't distinguish between EOF and no data!"
11943 echo "I can't compile the test program--assuming errno EAGAIN will do."
11950 echo "Using $hint value $eagain."
11951 echo "Your read() returns $rd_nodata when no data is present."
11952 case "$d_eofnblk" in
11953 "$define") echo "And you can see EOF because read() returns 0.";;
11954 "$undef") echo "But you can't see EOF status from read() returned value.";;
11956 echo "(Assuming you can't see EOF status from read anyway.)"
11962 $rm -f try try.* .out core head.c mtry
11964 : see if _ptr and _cnt from stdio act std
11967 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
11968 echo "(Looks like you have stdio.h from BSD.)"
11969 case "$stdio_ptr" in
11970 '') stdio_ptr='((fp)->_p)'
11973 *) ptr_lval=$d_stdio_ptr_lval;;
11975 case "$stdio_cnt" in
11976 '') stdio_cnt='((fp)->_r)'
11979 *) cnt_lval=$d_stdio_cnt_lval;;
11981 case "$stdio_base" in
11982 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
11984 case "$stdio_bufsiz" in
11985 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
11987 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
11988 echo "(Looks like you have stdio.h from Linux.)"
11989 case "$stdio_ptr" in
11990 '') stdio_ptr='((fp)->_IO_read_ptr)'
11993 *) ptr_lval=$d_stdio_ptr_lval;;
11995 case "$stdio_cnt" in
11996 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
11999 *) cnt_lval=$d_stdio_cnt_lval;;
12001 case "$stdio_base" in
12002 '') stdio_base='((fp)->_IO_read_base)';;
12004 case "$stdio_bufsiz" in
12005 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
12008 case "$stdio_ptr" in
12009 '') stdio_ptr='((fp)->_ptr)'
12012 *) ptr_lval=$d_stdio_ptr_lval;;
12014 case "$stdio_cnt" in
12015 '') stdio_cnt='((fp)->_cnt)'
12018 *) cnt_lval=$d_stdio_cnt_lval;;
12020 case "$stdio_base" in
12021 '') stdio_base='((fp)->_base)';;
12023 case "$stdio_bufsiz" in
12024 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
12028 : test whether _ptr and _cnt really work
12029 echo "Checking how std your stdio is..." >&4
12032 #$i_stdlib I_STDLIB
12034 #include <stdlib.h>
12036 #define FILE_ptr(fp) $stdio_ptr
12037 #define FILE_cnt(fp) $stdio_cnt
12039 FILE *fp = fopen("try.c", "r");
12042 18 <= FILE_cnt(fp) &&
12043 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
12051 if eval $compile && $to try.c; then
12052 if $run ./try; then
12053 echo "Your stdio acts pretty std."
12056 echo "Your stdio isn't very std."
12059 echo "Your stdio doesn't appear very std."
12063 # glibc 2.2.90 and above apparently change stdio streams so Perl's
12064 # direct buffer manipulation no longer works. The Configure tests
12065 # should be changed to correctly detect this, but until then,
12066 # the following check should at least let perl compile and run.
12067 # (This quick fix should be updated before 5.8.1.)
12068 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
12069 # A. Dougherty, June 3, 2002.
12070 case "$d_gnulibc" in
12072 case "$gnulibc_version" in
12076 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
12085 : Can _ptr be used as an lvalue?
12086 case "$d_stdstdio$ptr_lval" in
12087 $define$define) val=$define ;;
12090 set d_stdio_ptr_lval
12093 : Can _cnt be used as an lvalue?
12094 case "$d_stdstdio$cnt_lval" in
12095 $define$define) val=$define ;;
12098 set d_stdio_cnt_lval
12102 : test whether setting _ptr sets _cnt as a side effect
12103 d_stdio_ptr_lval_sets_cnt="$undef"
12104 d_stdio_ptr_lval_nochange_cnt="$undef"
12105 case "$d_stdio_ptr_lval$d_stdstdio" in
12107 echo "Checking to see what happens if we set the stdio ptr..." >&4
12110 /* Can we scream? */
12111 /* Eat dust sed :-) */
12112 /* In the buffer space, no one can hear you scream. */
12113 #$i_stdlib I_STDLIB
12115 #include <stdlib.h>
12117 #define FILE_ptr(fp) $stdio_ptr
12118 #define FILE_cnt(fp) $stdio_cnt
12119 #include <sys/types.h>
12121 FILE *fp = fopen("try.c", "r");
12126 puts("Fail even to read");
12129 c = getc(fp); /* Read away the first # */
12131 puts("Fail even to read");
12135 18 <= FILE_cnt(fp) &&
12136 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
12138 puts("Fail even to read");
12141 ptr = (char*) FILE_ptr(fp);
12142 cnt = (size_t)FILE_cnt(fp);
12144 FILE_ptr(fp) += 42;
12146 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
12147 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
12150 if (FILE_cnt(fp) <= 20) {
12151 printf ("Fail (<20 chars to test)");
12154 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
12155 puts("Fail compare");
12158 if (cnt == FILE_cnt(fp)) {
12159 puts("Pass_unchanged");
12162 if (FILE_cnt(fp) == (cnt - 42)) {
12163 puts("Pass_changed");
12166 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
12172 if eval $compile && $to try.c; then
12173 case `$run ./try` in
12175 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
12176 d_stdio_ptr_lval_sets_cnt="$define" ;;
12178 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
12179 d_stdio_ptr_lval_nochange_cnt="$define" ;;
12181 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
12183 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
12186 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
12192 : see if _base is also standard
12194 case "$d_stdstdio" in
12198 #$i_stdlib I_STDLIB
12200 #include <stdlib.h>
12202 #define FILE_base(fp) $stdio_base
12203 #define FILE_bufsiz(fp) $stdio_bufsiz
12205 FILE *fp = fopen("try.c", "r");
12208 19 <= FILE_bufsiz(fp) &&
12209 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
12216 if eval $compile && $to try.c; then
12217 if $run ./try; then
12218 echo "And its _base field acts std."
12221 echo "But its _base field isn't std."
12224 echo "However, it seems to be lacking the _base field."
12232 : see if fast_stdio exists
12234 case "$d_stdstdio:$d_stdio_ptr_lval" in
12236 case "$d_stdio_cnt_lval$d_stdio_ptr_lval_sets_cnt" in
12238 echo "You seem to have 'fast stdio' to directly manipulate the stdio buffers." >& 4
12249 : see if fchdir exists
12250 set fchdir d_fchdir
12253 : see if fchmod exists
12254 set fchmod d_fchmod
12257 : see if fchown exists
12258 set fchown d_fchown
12261 : see if this is an fcntl system
12266 : See if fcntl-based locking works.
12268 #$i_stdlib I_STDLIB
12270 #include <stdlib.h>
12272 #include <unistd.h>
12274 #include <signal.h>
12275 $signal_t blech(x) int x; { exit(3); }
12277 #if defined(F_SETLK) && defined(F_SETLKW)
12278 struct flock flock;
12280 fd = open("try.c", O_RDONLY);
12281 flock.l_type = F_RDLCK;
12282 flock.l_whence = SEEK_SET;
12283 flock.l_start = flock.l_len = 0;
12284 signal(SIGALRM, blech);
12286 retval = fcntl(fd, F_SETLK, &flock);
12288 (retval < 0 ? exit(2) : exit(0));
12294 echo "Checking if fcntl-based file locking works... "
12298 if eval $compile_ok; then
12299 if $run ./try; then
12300 echo "Yes, it seems to work."
12303 echo "Nope, it didn't work."
12308 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
12309 *** This is (almost) impossible.
12310 *** If your NFS lock daemons are not feeling well, something like
12311 *** this may happen, please investigate. Cannot continue, aborting.
12319 echo "I'm unable to compile the test program, so I'll assume not."
12324 echo "Nope, since you don't even have fcntl()."
12327 set d_fcntl_can_lock
12332 : check for fd_set items
12335 Checking to see how well your C compiler handles fd_set and friends ...
12338 #$i_stdlib I_STDLIB
12340 #include <stdlib.h>
12342 #$i_systime I_SYS_TIME
12343 #$i_sysselct I_SYS_SELECT
12344 #$d_socket HAS_SOCKET
12345 #include <sys/types.h>
12347 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
12350 #include <sys/time.h>
12352 #ifdef I_SYS_SELECT
12353 #include <sys/select.h>
12362 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
12370 if eval $compile; then
12371 d_fds_bits="$define"
12373 echo "Well, your system knows about the normal fd_set typedef..." >&4
12374 if $run ./try; then
12375 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
12376 d_fd_macros="$define"
12379 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
12381 d_fd_macros="$undef"
12385 Hmm, your compiler has some difficulty with fd_set. Checking further...
12388 if eval $compile; then
12389 d_fds_bits="$undef"
12391 echo "Well, your system has some sort of fd_set available..." >&4
12392 if $run ./try; then
12393 echo "and you have the normal fd_set macros." >&4
12394 d_fd_macros="$define"
12397 but not the normal fd_set macros! Gross! More work for me...
12399 d_fd_macros="$undef"
12402 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
12404 d_fds_bits="$undef"
12405 d_fd_macros="$undef"
12410 : see if fgetpos exists
12411 set fgetpos d_fgetpos
12414 : see if finite exists
12415 set finite d_finite
12418 : see if finitel exists
12419 set finitel d_finitel
12422 : see if flock exists
12426 : see if prototype for flock is available
12428 set d_flockproto flock $i_sysfile sys/file.h
12431 : see if fork exists
12435 : see if fp_class exists
12436 set fp_class d_fp_class
12439 : see if pathconf exists
12440 set pathconf d_pathconf
12443 : see if fpathconf exists
12444 set fpathconf d_fpathconf
12447 : see if fpclass exists
12448 set fpclass d_fpclass
12451 : see if fpclassify exists
12452 set fpclassify d_fpclassify
12455 : see if fpclassl exists
12456 set fpclassl d_fpclassl
12460 : check for fpos64_t
12462 echo "Checking to see if you have fpos64_t..." >&4
12465 int main() { fpos64_t x = 7; }
12468 if eval $compile; then
12470 echo "You have fpos64_t."
12473 echo "You do not have fpos64_t."
12474 case "$fpossize" in
12475 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
12482 : see if frexpl exists
12483 set frexpl d_frexpl
12486 : see if this is a sys/param system
12487 set sys/param.h i_sysparam
12490 : see if this is a sys/mount.h system
12491 set sys/mount.h i_sysmount
12496 echo "Checking to see if your system supports struct fs_data..." >&4
12497 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
12499 case "$d_fs_data_s" in
12500 "$define") echo "Yes, it does." ;;
12501 *) echo "No, it doesn't." ;;
12504 : see if fseeko exists
12505 set fseeko d_fseeko
12507 case "$longsize" in
12508 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
12511 : see if fsetpos exists
12512 set fsetpos d_fsetpos
12516 : see if fstatfs exists
12517 set fstatfs d_fstatfs
12521 : see if statvfs exists
12522 set statvfs d_statvfs
12525 : see if fstatvfs exists
12526 set fstatvfs d_fstatvfs
12530 : see if fsync exists
12534 : see if ftello exists
12535 set ftello d_ftello
12537 case "$longsize" in
12538 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
12541 : see if getcwd exists
12542 set getcwd d_getcwd
12545 : see if getespwnam exists
12546 set getespwnam d_getespwnam
12550 : see if getfsstat exists
12551 set getfsstat d_getfsstat
12554 : see if getgrent exists
12555 set getgrent d_getgrent
12558 : see if getgrent_r exists
12559 set getgrent_r d_getgrent_r
12561 case "$d_getgrent_r" in
12563 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
12564 case "$d_getgrent_r_proto:$usethreads" in
12565 ":define") d_getgrent_r_proto=define
12566 set d_getgrent_r_proto getgrent_r $hdrs
12570 case "$d_getgrent_r_proto" in
12572 case "$getgrent_r_proto" in
12573 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
12574 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBWR ;;
12576 case "$getgrent_r_proto" in
12577 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
12578 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIR ;;
12580 case "$getgrent_r_proto" in
12581 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
12582 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBW ;;
12584 case "$getgrent_r_proto" in
12585 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
12586 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBI ;;
12588 case "$getgrent_r_proto" in
12589 ''|0) try='int getgrent_r(struct group*, char*, int);'
12590 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBI ;;
12592 case "$getgrent_r_proto" in
12593 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
12594 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIH ;;
12596 case "$getgrent_r_proto" in
12597 ''|0) d_getgrent_r=undef
12599 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
12600 * ) case "$getgrent_r_proto" in
12601 REENTRANT_PROTO*) ;;
12602 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
12604 echo "Prototype: $try" ;;
12607 *) case "$usethreads" in
12608 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
12615 *) getgrent_r_proto=0
12619 : see if getgrgid_r exists
12620 set getgrgid_r d_getgrgid_r
12622 case "$d_getgrgid_r" in
12624 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
12625 case "$d_getgrgid_r_proto:$usethreads" in
12626 ":define") d_getgrgid_r_proto=define
12627 set d_getgrgid_r_proto getgrgid_r $hdrs
12631 case "$d_getgrgid_r_proto" in
12633 case "$getgrgid_r_proto" in
12634 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
12635 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
12637 case "$getgrgid_r_proto" in
12638 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
12639 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
12641 case "$getgrgid_r_proto" in
12642 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
12643 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
12645 case "$getgrgid_r_proto" in
12646 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
12647 ./protochk "extern $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
12649 case "$getgrgid_r_proto" in
12650 ''|0) d_getgrgid_r=undef
12652 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
12653 * ) case "$getgrgid_r_proto" in
12654 REENTRANT_PROTO*) ;;
12655 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
12657 echo "Prototype: $try" ;;
12660 *) case "$usethreads" in
12661 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
12668 *) getgrgid_r_proto=0
12672 : see if getgrnam_r exists
12673 set getgrnam_r d_getgrnam_r
12675 case "$d_getgrnam_r" in
12677 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
12678 case "$d_getgrnam_r_proto:$usethreads" in
12679 ":define") d_getgrnam_r_proto=define
12680 set d_getgrnam_r_proto getgrnam_r $hdrs
12684 case "$d_getgrnam_r_proto" in
12686 case "$getgrnam_r_proto" in
12687 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
12688 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
12690 case "$getgrnam_r_proto" in
12691 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
12692 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
12694 case "$getgrnam_r_proto" in
12695 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
12696 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CBI ;;
12698 case "$getgrnam_r_proto" in
12699 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
12700 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
12702 case "$getgrnam_r_proto" in
12703 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
12704 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
12706 case "$getgrnam_r_proto" in
12707 ''|0) d_getgrnam_r=undef
12709 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
12710 * ) case "$getgrnam_r_proto" in
12711 REENTRANT_PROTO*) ;;
12712 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
12714 echo "Prototype: $try" ;;
12717 *) case "$usethreads" in
12718 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
12725 *) getgrnam_r_proto=0
12729 : see if gethostbyaddr exists
12730 set gethostbyaddr d_gethbyaddr
12733 : see if gethostbyname exists
12734 set gethostbyname d_gethbyname
12737 : see if gethostent exists
12738 set gethostent d_gethent
12741 : see how we will look up host name
12744 if set gethostname val -f d_gethname; eval $csym; $val; then
12745 echo 'gethostname() found.' >&4
12746 d_gethname="$define"
12749 if set uname val -f d_uname; eval $csym; $val; then
12752 uname() was found, but you're running xenix, and older versions of xenix
12753 have a broken uname(). If you don't really know whether your xenix is old
12754 enough to have a broken system call, use the default answer.
12759 "$define") dflt=n;;
12761 rp='Is your uname() broken?'
12764 n*) d_uname="$define"; call=uname;;
12767 echo 'uname() found.' >&4
12774 case "$d_gethname" in
12775 '') d_gethname="$undef";;
12778 '') d_uname="$undef";;
12780 case "$d_uname$d_gethname" in
12785 Every now and then someone has a $call() that lies about the hostname
12786 but can't be fixed for political or economic reasons. If you wish, I can
12787 pretend $call() isn't there and maybe compute hostname at run-time
12788 thanks to the '$phostname' command.
12791 rp="Shall I ignore $call() from now on?"
12794 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
12797 case "$phostname" in
12798 '') aphostname='';;
12799 *) case "$aphostname" in
12801 *) set X $phostname
12805 file=`./loc $file $file $pth`
12806 aphostname=`echo $file $*`
12811 case "$d_uname$d_gethname" in
12814 case "$phostname" in
12816 echo "There will be no way for $package to get your hostname." >&4;;
12818 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
12822 case "$d_phostname" in
12823 '') d_phostname="$undef";;
12826 : see if gethostbyaddr_r exists
12827 set gethostbyaddr_r d_gethostbyaddr_r
12829 case "$d_gethostbyaddr_r" in
12831 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12832 case "$d_gethostbyaddr_r_proto:$usethreads" in
12833 ":define") d_gethostbyaddr_r_proto=define
12834 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
12838 case "$d_gethostbyaddr_r_proto" in
12840 case "$gethostbyaddr_r_proto" in
12841 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
12842 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
12844 case "$gethostbyaddr_r_proto" in
12845 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
12846 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
12848 case "$gethostbyaddr_r_proto" in
12849 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
12850 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
12852 case "$gethostbyaddr_r_proto" in
12853 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
12854 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
12856 case "$gethostbyaddr_r_proto" in
12857 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
12858 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
12860 case "$gethostbyaddr_r_proto" in
12861 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
12862 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
12864 case "$gethostbyaddr_r_proto" in
12865 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
12866 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
12868 case "$gethostbyaddr_r_proto" in
12869 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
12870 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
12872 case "$gethostbyaddr_r_proto" in
12873 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
12874 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
12876 case "$gethostbyaddr_r_proto" in
12877 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
12878 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
12880 case "$gethostbyaddr_r_proto" in
12881 ''|0) try='int gethostbyaddr_r(const void*, socklen_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
12882 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_TsISBWRE ;;
12884 case "$gethostbyaddr_r_proto" in
12885 ''|0) d_gethostbyaddr_r=undef
12886 gethostbyaddr_r_proto=0
12887 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
12888 * ) case "$gethostbyaddr_r_proto" in
12889 REENTRANT_PROTO*) ;;
12890 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
12892 echo "Prototype: $try" ;;
12895 *) case "$usethreads" in
12896 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
12898 d_gethostbyaddr_r=undef
12899 gethostbyaddr_r_proto=0
12903 *) gethostbyaddr_r_proto=0
12907 : see if gethostbyname_r exists
12908 set gethostbyname_r d_gethostbyname_r
12910 case "$d_gethostbyname_r" in
12912 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12913 case "$d_gethostbyname_r_proto:$usethreads" in
12914 ":define") d_gethostbyname_r_proto=define
12915 set d_gethostbyname_r_proto gethostbyname_r $hdrs
12919 case "$d_gethostbyname_r_proto" in
12921 case "$gethostbyname_r_proto" in
12922 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
12923 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
12925 case "$gethostbyname_r_proto" in
12926 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
12927 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
12929 case "$gethostbyname_r_proto" in
12930 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
12931 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
12933 case "$gethostbyname_r_proto" in
12934 ''|0) d_gethostbyname_r=undef
12935 gethostbyname_r_proto=0
12936 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
12937 * ) case "$gethostbyname_r_proto" in
12938 REENTRANT_PROTO*) ;;
12939 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
12941 echo "Prototype: $try" ;;
12944 *) case "$usethreads" in
12945 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
12947 d_gethostbyname_r=undef
12948 gethostbyname_r_proto=0
12952 *) gethostbyname_r_proto=0
12956 : see if gethostent_r exists
12957 set gethostent_r d_gethostent_r
12959 case "$d_gethostent_r" in
12961 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12962 case "$d_gethostent_r_proto:$usethreads" in
12963 ":define") d_gethostent_r_proto=define
12964 set d_gethostent_r_proto gethostent_r $hdrs
12968 case "$d_gethostent_r_proto" in
12970 case "$gethostent_r_proto" in
12971 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
12972 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
12974 case "$gethostent_r_proto" in
12975 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
12976 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBIE ;;
12978 case "$gethostent_r_proto" in
12979 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
12980 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBIE ;;
12982 case "$gethostent_r_proto" in
12983 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
12984 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBI ;;
12986 case "$gethostent_r_proto" in
12987 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
12988 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBI ;;
12990 case "$gethostent_r_proto" in
12991 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
12992 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SD ;;
12994 case "$gethostent_r_proto" in
12995 ''|0) d_gethostent_r=undef
12996 gethostent_r_proto=0
12997 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
12998 * ) case "$gethostent_r_proto" in
12999 REENTRANT_PROTO*) ;;
13000 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
13002 echo "Prototype: $try" ;;
13005 *) case "$usethreads" in
13006 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
13008 d_gethostent_r=undef
13009 gethostent_r_proto=0
13013 *) gethostent_r_proto=0
13017 : see if prototypes for various gethostxxx netdb.h functions are available
13019 set d_gethostprotos gethostent $i_netdb netdb.h
13022 : see if getitimer exists
13023 set getitimer d_getitimer
13026 : see if getlogin exists
13027 set getlogin d_getlogin
13030 : see if getlogin_r exists
13031 set getlogin_r d_getlogin_r
13033 case "$d_getlogin_r" in
13035 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
13036 case "$d_getlogin_r_proto:$usethreads" in
13037 ":define") d_getlogin_r_proto=define
13038 set d_getlogin_r_proto getlogin_r $hdrs
13042 case "$d_getlogin_r_proto" in
13044 case "$getlogin_r_proto" in
13045 ''|0) try='int getlogin_r(char*, size_t);'
13046 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BW ;;
13048 case "$getlogin_r_proto" in
13049 ''|0) try='int getlogin_r(char*, int);'
13050 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BI ;;
13052 case "$getlogin_r_proto" in
13053 ''|0) try='char* getlogin_r(char*, size_t);'
13054 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BW ;;
13056 case "$getlogin_r_proto" in
13057 ''|0) try='char* getlogin_r(char*, int);'
13058 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BI ;;
13060 case "$getlogin_r_proto" in
13061 ''|0) d_getlogin_r=undef
13063 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
13064 * ) case "$getlogin_r_proto" in
13065 REENTRANT_PROTO*) ;;
13066 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
13068 echo "Prototype: $try" ;;
13071 *) case "$usethreads" in
13072 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
13079 *) getlogin_r_proto=0
13083 : see if getmnt exists
13084 set getmnt d_getmnt
13087 : see if getmntent exists
13088 set getmntent d_getmntent
13091 : see if getnetbyaddr exists
13092 set getnetbyaddr d_getnbyaddr
13095 : see if getnetbyname exists
13096 set getnetbyname d_getnbyname
13099 : see if getnetent exists
13100 set getnetent d_getnent
13103 : see if getnetbyaddr_r exists
13104 set getnetbyaddr_r d_getnetbyaddr_r
13106 case "$d_getnetbyaddr_r" in
13108 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13109 case "$d_getnetbyaddr_r_proto:$usethreads" in
13110 ":define") d_getnetbyaddr_r_proto=define
13111 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
13115 case "$d_getnetbyaddr_r_proto" in
13117 case "$getnetbyaddr_r_proto" in
13118 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
13119 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
13121 case "$getnetbyaddr_r_proto" in
13122 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
13123 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
13125 case "$getnetbyaddr_r_proto" in
13126 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
13127 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
13129 case "$getnetbyaddr_r_proto" in
13130 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
13131 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
13133 case "$getnetbyaddr_r_proto" in
13134 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
13135 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
13137 case "$getnetbyaddr_r_proto" in
13138 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
13139 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
13141 case "$getnetbyaddr_r_proto" in
13142 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
13143 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
13145 case "$getnetbyaddr_r_proto" in
13146 ''|0) try='int getnetbyaddr_r(uint32_t, int, struct netent*, char*, size_t, struct netent**, int*);'
13147 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_uISBWRE ;;
13149 case "$getnetbyaddr_r_proto" in
13150 ''|0) d_getnetbyaddr_r=undef
13151 getnetbyaddr_r_proto=0
13152 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
13153 * ) case "$getnetbyaddr_r_proto" in
13154 REENTRANT_PROTO*) ;;
13155 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
13157 echo "Prototype: $try" ;;
13160 *) case "$usethreads" in
13161 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
13163 d_getnetbyaddr_r=undef
13164 getnetbyaddr_r_proto=0
13168 *) getnetbyaddr_r_proto=0
13172 : see if getnetbyname_r exists
13173 set getnetbyname_r d_getnetbyname_r
13175 case "$d_getnetbyname_r" in
13177 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13178 case "$d_getnetbyname_r_proto:$usethreads" in
13179 ":define") d_getnetbyname_r_proto=define
13180 set d_getnetbyname_r_proto getnetbyname_r $hdrs
13184 case "$d_getnetbyname_r_proto" in
13186 case "$getnetbyname_r_proto" in
13187 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
13188 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
13190 case "$getnetbyname_r_proto" in
13191 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
13192 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
13194 case "$getnetbyname_r_proto" in
13195 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
13196 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
13198 case "$getnetbyname_r_proto" in
13199 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
13200 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
13202 case "$getnetbyname_r_proto" in
13203 ''|0) d_getnetbyname_r=undef
13204 getnetbyname_r_proto=0
13205 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
13206 * ) case "$getnetbyname_r_proto" in
13207 REENTRANT_PROTO*) ;;
13208 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
13210 echo "Prototype: $try" ;;
13213 *) case "$usethreads" in
13214 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
13216 d_getnetbyname_r=undef
13217 getnetbyname_r_proto=0
13221 *) getnetbyname_r_proto=0
13225 : see if getnetent_r exists
13226 set getnetent_r d_getnetent_r
13228 case "$d_getnetent_r" in
13230 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13231 case "$d_getnetent_r_proto:$usethreads" in
13232 ":define") d_getnetent_r_proto=define
13233 set d_getnetent_r_proto getnetent_r $hdrs
13237 case "$d_getnetent_r_proto" in
13239 case "$getnetent_r_proto" in
13240 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
13241 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
13243 case "$getnetent_r_proto" in
13244 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
13245 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBIE ;;
13247 case "$getnetent_r_proto" in
13248 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
13249 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBIE ;;
13251 case "$getnetent_r_proto" in
13252 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
13253 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBI ;;
13255 case "$getnetent_r_proto" in
13256 ''|0) try='int getnetent_r(struct netent*, char*, int);'
13257 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBI ;;
13259 case "$getnetent_r_proto" in
13260 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
13261 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SD ;;
13263 case "$getnetent_r_proto" in
13264 ''|0) d_getnetent_r=undef
13265 getnetent_r_proto=0
13266 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
13267 * ) case "$getnetent_r_proto" in
13268 REENTRANT_PROTO*) ;;
13269 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
13271 echo "Prototype: $try" ;;
13274 *) case "$usethreads" in
13275 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
13277 d_getnetent_r=undef
13278 getnetent_r_proto=0
13282 *) getnetent_r_proto=0
13286 : see if prototypes for various getnetxxx netdb.h functions are available
13288 set d_getnetprotos getnetent $i_netdb netdb.h
13291 : see if getpagesize exists
13292 set getpagesize d_getpagsz
13296 : see if getprotobyname exists
13297 set getprotobyname d_getpbyname
13300 : see if getprotobynumber exists
13301 set getprotobynumber d_getpbynumber
13304 : see if getprotoent exists
13305 set getprotoent d_getpent
13308 : see if getpgid exists
13309 set getpgid d_getpgid
13312 : see if getpgrp2 exists
13313 set getpgrp2 d_getpgrp2
13316 : see if getppid exists
13317 set getppid d_getppid
13320 : see if getpriority exists
13321 set getpriority d_getprior
13324 : see if getprotobyname_r exists
13325 set getprotobyname_r d_getprotobyname_r
13327 case "$d_getprotobyname_r" in
13329 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13330 case "$d_getprotobyname_r_proto:$usethreads" in
13331 ":define") d_getprotobyname_r_proto=define
13332 set d_getprotobyname_r_proto getprotobyname_r $hdrs
13336 case "$d_getprotobyname_r_proto" in
13338 case "$getprotobyname_r_proto" in
13339 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
13340 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
13342 case "$getprotobyname_r_proto" in
13343 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
13344 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
13346 case "$getprotobyname_r_proto" in
13347 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
13348 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
13350 case "$getprotobyname_r_proto" in
13351 ''|0) d_getprotobyname_r=undef
13352 getprotobyname_r_proto=0
13353 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
13354 * ) case "$getprotobyname_r_proto" in
13355 REENTRANT_PROTO*) ;;
13356 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
13358 echo "Prototype: $try" ;;
13361 *) case "$usethreads" in
13362 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
13364 d_getprotobyname_r=undef
13365 getprotobyname_r_proto=0
13369 *) getprotobyname_r_proto=0
13373 : see if getprotobynumber_r exists
13374 set getprotobynumber_r d_getprotobynumber_r
13376 case "$d_getprotobynumber_r" in
13378 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13379 case "$d_getprotobynumber_r_proto:$usethreads" in
13380 ":define") d_getprotobynumber_r_proto=define
13381 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
13385 case "$d_getprotobynumber_r_proto" in
13387 case "$getprotobynumber_r_proto" in
13388 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
13389 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
13391 case "$getprotobynumber_r_proto" in
13392 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
13393 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
13395 case "$getprotobynumber_r_proto" in
13396 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
13397 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
13399 case "$getprotobynumber_r_proto" in
13400 ''|0) d_getprotobynumber_r=undef
13401 getprotobynumber_r_proto=0
13402 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
13403 * ) case "$getprotobynumber_r_proto" in
13404 REENTRANT_PROTO*) ;;
13405 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
13407 echo "Prototype: $try" ;;
13410 *) case "$usethreads" in
13411 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
13413 d_getprotobynumber_r=undef
13414 getprotobynumber_r_proto=0
13418 *) getprotobynumber_r_proto=0
13422 : see if getprotoent_r exists
13423 set getprotoent_r d_getprotoent_r
13425 case "$d_getprotoent_r" in
13427 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13428 case "$d_getprotoent_r_proto:$usethreads" in
13429 ":define") d_getprotoent_r_proto=define
13430 set d_getprotoent_r_proto getprotoent_r $hdrs
13434 case "$d_getprotoent_r_proto" in
13436 case "$getprotoent_r_proto" in
13437 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
13438 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
13440 case "$getprotoent_r_proto" in
13441 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
13442 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBI ;;
13444 case "$getprotoent_r_proto" in
13445 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
13446 ./protochk "extern $try" $hdrs && getprotoent_r_proto=S_SBI ;;
13448 case "$getprotoent_r_proto" in
13449 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
13450 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SD ;;
13452 case "$getprotoent_r_proto" in
13453 ''|0) d_getprotoent_r=undef
13454 getprotoent_r_proto=0
13455 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
13456 * ) case "$getprotoent_r_proto" in
13457 REENTRANT_PROTO*) ;;
13458 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
13460 echo "Prototype: $try" ;;
13463 *) case "$usethreads" in
13464 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
13466 d_getprotoent_r=undef
13467 getprotoent_r_proto=0
13471 *) getprotoent_r_proto=0
13475 : see if prototypes for various getprotoxxx netdb.h functions are available
13477 set d_getprotoprotos getprotoent $i_netdb netdb.h
13480 : see if getprpwnam exists
13481 set getprpwnam d_getprpwnam
13484 : see if getpwent exists
13485 set getpwent d_getpwent
13488 : see if getpwent_r exists
13489 set getpwent_r d_getpwent_r
13491 case "$d_getpwent_r" in
13493 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
13494 case "$d_getpwent_r_proto:$usethreads" in
13495 ":define") d_getpwent_r_proto=define
13496 set d_getpwent_r_proto getpwent_r $hdrs
13500 case "$d_getpwent_r_proto" in
13502 case "$getpwent_r_proto" in
13503 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
13504 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBWR ;;
13506 case "$getpwent_r_proto" in
13507 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
13508 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIR ;;
13510 case "$getpwent_r_proto" in
13511 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
13512 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBW ;;
13514 case "$getpwent_r_proto" in
13515 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
13516 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBI ;;
13518 case "$getpwent_r_proto" in
13519 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
13520 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBI ;;
13522 case "$getpwent_r_proto" in
13523 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
13524 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIH ;;
13526 case "$getpwent_r_proto" in
13527 ''|0) d_getpwent_r=undef
13529 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
13530 * ) case "$getpwent_r_proto" in
13531 REENTRANT_PROTO*) ;;
13532 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
13534 echo "Prototype: $try" ;;
13537 *) case "$usethreads" in
13538 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
13545 *) getpwent_r_proto=0
13549 : see if getpwnam_r exists
13550 set getpwnam_r d_getpwnam_r
13552 case "$d_getpwnam_r" in
13554 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
13555 case "$d_getpwnam_r_proto:$usethreads" in
13556 ":define") d_getpwnam_r_proto=define
13557 set d_getpwnam_r_proto getpwnam_r $hdrs
13561 case "$d_getpwnam_r_proto" in
13563 case "$getpwnam_r_proto" in
13564 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
13565 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
13567 case "$getpwnam_r_proto" in
13568 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
13569 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
13571 case "$getpwnam_r_proto" in
13572 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
13573 ./protochk "extern $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
13575 case "$getpwnam_r_proto" in
13576 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
13577 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
13579 case "$getpwnam_r_proto" in
13580 ''|0) d_getpwnam_r=undef
13582 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
13583 * ) case "$getpwnam_r_proto" in
13584 REENTRANT_PROTO*) ;;
13585 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
13587 echo "Prototype: $try" ;;
13590 *) case "$usethreads" in
13591 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
13598 *) getpwnam_r_proto=0
13602 : see if getpwuid_r exists
13603 set getpwuid_r d_getpwuid_r
13605 case "$d_getpwuid_r" in
13607 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
13608 case "$d_getpwuid_r_proto:$usethreads" in
13609 ":define") d_getpwuid_r_proto=define
13610 set d_getpwuid_r_proto getpwuid_r $hdrs
13614 case "$d_getpwuid_r_proto" in
13616 case "$getpwuid_r_proto" in
13617 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
13618 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
13620 case "$getpwuid_r_proto" in
13621 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
13622 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
13624 case "$getpwuid_r_proto" in
13625 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
13626 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
13628 case "$getpwuid_r_proto" in
13629 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
13630 ./protochk "extern $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
13632 case "$getpwuid_r_proto" in
13633 ''|0) d_getpwuid_r=undef
13635 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
13636 * ) case "$getpwuid_r_proto" in
13637 REENTRANT_PROTO*) ;;
13638 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
13640 echo "Prototype: $try" ;;
13643 *) case "$usethreads" in
13644 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
13651 *) getpwuid_r_proto=0
13656 : see if getservbyname exists
13657 set getservbyname d_getsbyname
13660 : see if getservbyport exists
13661 set getservbyport d_getsbyport
13664 : see if getservent exists
13665 set getservent d_getsent
13668 : see if getservbyname_r exists
13669 set getservbyname_r d_getservbyname_r
13671 case "$d_getservbyname_r" in
13673 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13674 case "$d_getservbyname_r_proto:$usethreads" in
13675 ":define") d_getservbyname_r_proto=define
13676 set d_getservbyname_r_proto getservbyname_r $hdrs
13680 case "$d_getservbyname_r_proto" in
13682 case "$getservbyname_r_proto" in
13683 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
13684 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
13686 case "$getservbyname_r_proto" in
13687 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
13688 ./protochk "extern $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
13690 case "$getservbyname_r_proto" in
13691 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
13692 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
13694 case "$getservbyname_r_proto" in
13695 ''|0) d_getservbyname_r=undef
13696 getservbyname_r_proto=0
13697 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
13698 * ) case "$getservbyname_r_proto" in
13699 REENTRANT_PROTO*) ;;
13700 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
13702 echo "Prototype: $try" ;;
13705 *) case "$usethreads" in
13706 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
13708 d_getservbyname_r=undef
13709 getservbyname_r_proto=0
13713 *) getservbyname_r_proto=0
13717 : see if getservbyport_r exists
13718 set getservbyport_r d_getservbyport_r
13720 case "$d_getservbyport_r" in
13722 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13723 case "$d_getservbyport_r_proto:$usethreads" in
13724 ":define") d_getservbyport_r_proto=define
13725 set d_getservbyport_r_proto getservbyport_r $hdrs
13729 case "$d_getservbyport_r_proto" in
13731 case "$getservbyport_r_proto" in
13732 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
13733 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
13735 case "$getservbyport_r_proto" in
13736 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
13737 ./protochk "extern $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
13739 case "$getservbyport_r_proto" in
13740 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
13741 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
13743 case "$getservbyport_r_proto" in
13744 ''|0) d_getservbyport_r=undef
13745 getservbyport_r_proto=0
13746 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
13747 * ) case "$getservbyport_r_proto" in
13748 REENTRANT_PROTO*) ;;
13749 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
13751 echo "Prototype: $try" ;;
13754 *) case "$usethreads" in
13755 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
13757 d_getservbyport_r=undef
13758 getservbyport_r_proto=0
13762 *) getservbyport_r_proto=0
13766 : see if getservent_r exists
13767 set getservent_r d_getservent_r
13769 case "$d_getservent_r" in
13771 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13772 case "$d_getservent_r_proto:$usethreads" in
13773 ":define") d_getservent_r_proto=define
13774 set d_getservent_r_proto getservent_r $hdrs
13778 case "$d_getservent_r_proto" in
13780 case "$getservent_r_proto" in
13781 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
13782 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBWR ;;
13784 case "$getservent_r_proto" in
13785 ''|0) try='int getservent_r(struct servent*, char*, int);'
13786 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBI ;;
13788 case "$getservent_r_proto" in
13789 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
13790 ./protochk "extern $try" $hdrs && getservent_r_proto=S_SBI ;;
13792 case "$getservent_r_proto" in
13793 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
13794 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SD ;;
13796 case "$getservent_r_proto" in
13797 ''|0) d_getservent_r=undef
13798 getservent_r_proto=0
13799 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
13800 * ) case "$getservent_r_proto" in
13801 REENTRANT_PROTO*) ;;
13802 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
13804 echo "Prototype: $try" ;;
13807 *) case "$usethreads" in
13808 define) echo "getservent_r has no prototype, not using it." >&4 ;;
13810 d_getservent_r=undef
13811 getservent_r_proto=0
13815 *) getservent_r_proto=0
13819 : see if prototypes for various getservxxx netdb.h functions are available
13821 set d_getservprotos getservent $i_netdb netdb.h
13824 : see if getspnam exists
13825 set getspnam d_getspnam
13828 : see if this is a shadow.h system
13829 set shadow.h i_shadow
13832 : see if getspnam_r exists
13833 set getspnam_r d_getspnam_r
13835 case "$d_getspnam_r" in
13837 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
13838 case "$d_getspnam_r_proto:$usethreads" in
13839 ":define") d_getspnam_r_proto=define
13840 set d_getspnam_r_proto getspnam_r $hdrs
13844 case "$d_getspnam_r_proto" in
13846 case "$getspnam_r_proto" in
13847 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
13848 ./protochk "extern $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
13850 case "$getspnam_r_proto" in
13851 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
13852 ./protochk "extern $try" $hdrs && getspnam_r_proto=S_CSBI ;;
13854 case "$getspnam_r_proto" in
13855 ''|0) d_getspnam_r=undef
13857 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
13858 * ) case "$getspnam_r_proto" in
13859 REENTRANT_PROTO*) ;;
13860 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
13862 echo "Prototype: $try" ;;
13865 *) case "$usethreads" in
13866 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
13873 *) getspnam_r_proto=0
13877 : see if gettimeofday or ftime exists
13878 set gettimeofday d_gettimeod
13880 case "$d_gettimeod" in
13886 val="$undef"; set d_ftime; eval $setvar
13889 case "$d_gettimeod$d_ftime" in
13892 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
13896 : see if gmtime_r exists
13897 set gmtime_r d_gmtime_r
13899 case "$d_gmtime_r" in
13901 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
13902 case "$d_gmtime_r_proto:$usethreads" in
13903 ":define") d_gmtime_r_proto=define
13904 set d_gmtime_r_proto gmtime_r $hdrs
13908 case "$d_gmtime_r_proto" in
13910 case "$gmtime_r_proto" in
13911 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
13912 ./protochk "extern $try" $hdrs && gmtime_r_proto=S_TS ;;
13914 case "$gmtime_r_proto" in
13915 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
13916 ./protochk "extern $try" $hdrs && gmtime_r_proto=I_TS ;;
13918 case "$gmtime_r_proto" in
13919 ''|0) d_gmtime_r=undef
13921 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
13922 * ) case "$gmtime_r_proto" in
13923 REENTRANT_PROTO*) ;;
13924 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
13926 echo "Prototype: $try" ;;
13929 *) case "$usethreads" in
13930 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
13937 *) gmtime_r_proto=0
13941 : see if hasmntopt exists
13942 set hasmntopt d_hasmntopt
13945 : see if this is a netinet/in.h or sys/in.h system
13946 set netinet/in.h i_niin sys/in.h i_sysin
13949 : see if arpa/inet.h has to be included
13950 set arpa/inet.h i_arpainet
13953 : see if htonl --and friends-- exists
13958 : Maybe they are macros.
13961 $cat >htonl.c <<EOM
13963 #include <sys/types.h>
13964 #$i_niin I_NETINET_IN
13966 #$i_arpainet I_ARPA_INET
13967 #ifdef I_NETINET_IN
13968 #include <netinet/in.h>
13971 #include <sys/in.h>
13974 #include <arpa/inet.h>
13977 printf("Defined as a macro.");
13980 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
13981 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
13983 echo "But it seems to be defined as a macro." >&4
13991 : see if ilogbl exists
13992 set ilogbl d_ilogbl
13997 if set index val -f; eval $csym; $val; then
13998 if set strchr val -f d_strchr; eval $csym; $val; then
13999 if $contains strchr "$strings" >/dev/null 2>&1 ; then
14002 echo "strchr() found." >&4
14006 echo "index() found." >&4
14011 echo "index() found." >&4
14014 if set strchr val -f d_strchr; eval $csym; $val; then
14017 echo "strchr() found." >&4
14019 echo "No index() or strchr() found!" >&4
14024 set d_strchr; eval $setvar
14026 set d_index; eval $setvar
14028 : check whether inet_aton exists
14029 set inet_aton d_inetaton
14034 $cat >isascii.c <<EOCP
14037 #$i_stdlib I_STDLIB
14039 #include <stdlib.h>
14050 if eval $compile; then
14051 echo "isascii() found." >&4
14054 echo "isascii() NOT found." >&4
14061 : see if isfinite exists
14062 set isfinite d_isfinite
14065 : see if isinf exists
14069 : see if isnan exists
14073 : see if isnanl exists
14074 set isnanl d_isnanl
14077 : see if killpg exists
14078 set killpg d_killpg
14081 : see if lchown exists
14083 $cat > try.c <<'EOCP'
14084 /* System header to define __stub macros and hopefully few prototypes,
14085 which can conflict with char lchown(); below. */
14086 #include <assert.h>
14087 /* Override any gcc2 internal prototype to avoid an error. */
14088 /* We use char because int might match the return type of a gcc2
14089 builtin and then its argument prototype would still apply. */
14092 /* The GNU C library defines this for functions which it implements
14093 to always fail with ENOSYS. Some functions are actually named
14094 something starting with __ and the normal name is an alias. */
14095 #if defined (__stub_lchown) || defined (__stub___lchown)
14103 if eval $compile; then
14104 $echo "lchown() found." >&4
14107 $echo "lchown() NOT found." >&4
14113 : See if number of significant digits in a double precision number is known
14115 $cat >ldbl_dig.c <<EOM
14116 #$i_limits I_LIMITS
14119 #include <limits.h>
14125 printf("Contains LDBL_DIG");
14128 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
14129 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
14130 echo "LDBL_DIG found." >&4
14133 echo "LDBL_DIG NOT found." >&4
14140 : see if this is a math.h system
14144 d_libm_lib_version="$undef"
14147 : check to see if math.h defines _LIB_VERSION
14149 echo "Checking to see if your libm supports _LIB_VERSION..." >&4
14151 #include <unistd.h>
14153 int main (int argc, char *argv[])
14155 printf ("%d\n", _LIB_VERSION);
14160 if eval $compile; then
14162 echo "Yes, it does ($foo)" >&4
14163 d_libm_lib_version="$define"
14165 echo "No, it does not (probably harmless)\n" >&4
14167 $rm -f try.* try core core.try.*
14172 : see if link exists
14176 : see if localtime_r exists
14177 set localtime_r d_localtime_r
14179 case "$d_localtime_r" in
14181 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
14182 case "$d_localtime_r_proto:$usethreads" in
14183 ":define") d_localtime_r_proto=define
14184 set d_localtime_r_proto localtime_r $hdrs
14188 case "$d_localtime_r_proto" in
14190 case "$localtime_r_proto" in
14191 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
14192 ./protochk "extern $try" $hdrs && localtime_r_proto=S_TS ;;
14194 case "$localtime_r_proto" in
14195 ''|0) try='int localtime_r(const time_t*, struct tm*);'
14196 ./protochk "extern $try" $hdrs && localtime_r_proto=I_TS ;;
14198 case "$localtime_r_proto" in
14199 ''|0) d_localtime_r=undef
14200 localtime_r_proto=0
14201 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
14202 * ) case "$localtime_r_proto" in
14203 REENTRANT_PROTO*) ;;
14204 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
14206 echo "Prototype: $try" ;;
14209 *) case "$usethreads" in
14210 define) echo "localtime_r has no prototype, not using it." >&4 ;;
14212 d_localtime_r=undef
14213 localtime_r_proto=0
14217 *) localtime_r_proto=0
14221 : see if localeconv exists
14222 set localeconv d_locconv
14225 : see if lockf exists
14229 : see if prototype for lseek is available
14231 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
14234 : see if lstat exists
14238 : see if madvise exists
14239 set madvise d_madvise
14242 : see if mblen exists
14246 : see if mbstowcs exists
14247 set mbstowcs d_mbstowcs
14250 : see if mbtowc exists
14251 set mbtowc d_mbtowc
14254 : see if memchr exists
14255 set memchr d_memchr
14258 : see if memcmp exists
14259 set memcmp d_memcmp
14262 : see if memcpy exists
14263 set memcpy d_memcpy
14266 : see if memmove exists
14267 set memmove d_memmove
14270 : see if memset exists
14271 set memset d_memset
14274 : see if mkdir exists
14278 : see if mkdtemp exists
14279 set mkdtemp d_mkdtemp
14282 : see if mkfifo exists
14283 set mkfifo d_mkfifo
14286 : see if mkstemp exists
14287 set mkstemp d_mkstemp
14290 : see if mkstemps exists
14291 set mkstemps d_mkstemps
14294 : see if mktime exists
14295 set mktime d_mktime
14298 : see if this is a sys/mman.h system
14299 set sys/mman.h i_sysmman
14302 : see if mmap exists
14305 : see what shmat returns
14306 : default to something harmless
14308 case "$i_sysmman$d_mmap" in
14310 $cat >mmap.c <<'END'
14311 #include <sys/mman.h>
14314 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
14319 echo "and it returns ($mmaptype)." >&4
14325 : see if sqrtl exists
14329 : see if scalbnl exists
14330 set scalbnl d_scalbnl
14333 : see if modfl exists
14337 : see if prototype for modfl is available
14339 set d_modflproto modfl $i_math math.h
14342 d_modfl_pow32_bug="$undef"
14344 case "$d_longdbl$d_modfl" in
14347 Checking to see whether your modfl() is okay for large values...
14353 if $test "X$d_modflproto" != "X$define"; then
14354 $cat >>try.c <<EOCP
14355 /* Sigh. many current glibcs provide the function, but do not prototype it. */
14356 long double modfl (long double, long double *);
14359 $cat >>try.c <<EOCP
14361 long double nv = 4294967303.15;
14367 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
14371 case "$osname:$gccversion" in
14372 aix:) saveccflags="$ccflags"
14373 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
14376 if eval $compile; then
14379 *" 4294967303.150000 1.150000 4294967302.000000")
14380 echo >&4 "Your modfl() is broken for large values."
14381 d_modfl_pow32_bug="$define"
14383 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
14387 *" 4294967303.150000 0.150000 4294967303.000000")
14388 echo >&4 "Your modfl() seems okay for large values."
14390 *) echo >&4 "I don't understand your modfl() at all."
14394 $rm -f try.* try core core.try.*
14396 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
14399 case "$osname:$gccversion" in
14400 aix:) ccflags="$saveccflags" ;; # restore
14405 if $test "$uselongdouble" = "$define"; then
14407 if $test "$d_sqrtl" != "$define"; then
14408 message="$message sqrtl"
14410 if $test "$d_modfl" != "$define"; then
14411 if $test "$d_aintl:$d_copysignl" = "$define:$define"; then
14412 echo "You have both aintl and copysignl, so I can emulate modfl."
14414 message="$message modfl"
14417 if $test "$d_frexpl" != "$define"; then
14418 if $test "$d_ilogbl:$d_scalbnl" = "$define:$define"; then
14419 echo "You have both ilogbl and scalbnl, so I can emulate frexpl."
14421 message="$message frexpl"
14425 if $test "$message" != ""; then
14428 *** You requested the use of long doubles but you do not seem to have
14429 *** the following mathematical functions needed for long double support:
14431 *** Please rerun Configure without -Duselongdouble and/or -Dusemorebits.
14432 *** Cannot continue, aborting.
14440 : see if mprotect exists
14441 set mprotect d_mprotect
14444 : see if msgctl exists
14445 set msgctl d_msgctl
14448 : see if msgget exists
14449 set msgget d_msgget
14452 : see if msgsnd exists
14453 set msgsnd d_msgsnd
14456 : see if msgrcv exists
14457 set msgrcv d_msgrcv
14460 : see how much of the 'msg*(2)' library is present.
14463 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
14464 *"$undef"*) h_msg=false;;
14468 case "`ipcs 2>&1`" in
14469 "SVID messages"*"not configured"*)
14470 echo "Your $osname does not have the msg*(2) configured." >&4
14473 set msgctl d_msgctl
14475 set msgget d_msgget
14477 set msgsnd d_msgsnd
14479 set msgrcv d_msgrcv
14485 : we could also check for sys/ipc.h ...
14486 if $h_msg && $test `./findhdr sys/msg.h`; then
14487 echo "You have the full msg*(2) library." >&4
14490 echo "You don't have the full msg*(2) library." >&4
14498 echo "Checking to see if your system supports struct msghdr..." >&4
14499 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
14501 case "$d_msghdr_s" in
14502 "$define") echo "Yes, it does." ;;
14503 *) echo "No, it doesn't." ;;
14507 : see if msync exists
14511 : see if munmap exists
14512 set munmap d_munmap
14515 : see if nice exists
14519 : see if this is a langinfo.h system
14520 set langinfo.h i_langinfo
14523 : see if nl_langinfo exists
14524 set nl_langinfo d_nl_langinfo
14527 : check for length of character
14529 case "$charsize" in
14531 echo "Checking to see how big your characters are (hey, you never know)..." >&4
14534 #$i_stdlib I_STDLIB
14536 #include <stdlib.h>
14540 printf("%d\n", (int)sizeof(char));
14545 if eval $compile_ok; then
14549 echo "(I can't seem to compile the test program. Guessing...)"
14556 rp="What is the size of a character (in bytes)?"
14561 : check for volatile keyword
14563 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
14564 $cat >try.c <<'EOCP'
14567 typedef struct _goo_struct goo_struct;
14568 goo_struct * volatile goo = ((goo_struct *)0);
14569 struct _goo_struct {
14574 typedef unsigned short foo_t;
14575 char *volatile foo;
14577 volatile foo_t blech;
14581 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
14583 echo "Yup, it does."
14586 echo "Nope, it doesn't."
14594 $echo "Choosing the C types to be used for Perl's internal types..." >&4
14596 case "$use64bitint:$d_quad:$quadtype" in
14599 uvtype="$uquadtype"
14604 uvtype="unsigned long"
14610 case "$uselongdouble:$d_longdbl" in
14612 nvtype="long double"
14613 nvsize=$longdblsize
14620 $echo "(IV will be "$ivtype", $ivsize bytes)"
14621 $echo "(UV will be "$uvtype", $uvsize bytes)"
14622 $echo "(NV will be "$nvtype", $nvsize bytes)"
14625 #$i_inttypes I_INTTYPES
14627 #include <inttypes.h>
14632 int8_t i = INT8_MAX;
14633 uint8_t u = UINT8_MAX;
14634 printf("int8_t\n");
14637 int16_t i = INT16_MAX;
14638 uint16_t i = UINT16_MAX;
14639 printf("int16_t\n");
14642 int32_t i = INT32_MAX;
14643 uint32_t u = UINT32_MAX;
14644 printf("int32_t\n");
14650 '') case "$charsize" in
14652 u8type="unsigned char"
14661 if eval $compile; then
14662 case "`$run ./try`" in
14663 int8_t) i8type=int8_t
14673 '') if $test $charsize -ge 1; then
14675 u8type="unsigned char"
14683 '') case "$shortsize" in
14685 u16type="unsigned short"
14693 '') set try -DINT16
14694 if eval $compile; then
14695 case "`$run ./try`" in
14707 '') if $test $shortsize -ge 2; then
14709 u16type="unsigned short"
14717 '') case "$longsize" in
14719 u32type="unsigned long"
14723 *) case "$intsize" in
14725 u32type="unsigned int"
14735 '') set try -DINT32
14736 if eval $compile; then
14737 case "`$run ./try`" in
14749 '') if $test $intsize -ge 4; then
14751 u32type="unsigned int"
14759 '') case "$d_quad:$quadtype" in
14761 i64type="$quadtype"
14762 u64type="$uquadtype"
14770 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
14771 : volatile so that the compiler has to store it out to memory.
14772 if test X"$d_volatile" = X"$define"; then
14777 #$i_stdlib I_STDLIB
14779 #include <stdlib.h>
14781 #include <sys/types.h>
14782 #include <signal.h>
14784 $volatile int bletched = 0;
14785 $signal_t blech(s) int s; { bletched = 1; }
14790 int n = 8 * $uvsize;
14793 signal(SIGFPE, blech);
14796 for (i = 0; i < n; i++) {
14797 u = u << 1 | ($uvtype)1;
14799 if (($uvtype)d != u)
14803 d = ($nvtype)(u - 1);
14804 if (($uvtype)d != (u - 1))
14812 printf("%d\n", ((i == n) ? -n : i));
14818 d_nv_preserves_uv="$undef"
14819 if eval $compile; then
14820 nv_preserves_uv_bits="`$run ./try`"
14822 case "$nv_preserves_uv_bits" in
14824 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
14825 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
14826 d_nv_preserves_uv="$define"
14828 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
14829 d_nv_preserves_uv="$undef" ;;
14830 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
14831 nv_preserves_uv_bits="$undef" ;;
14837 : check for off64_t
14839 echo "Checking to see if you have off64_t..." >&4
14841 #include <sys/types.h>
14842 #include <unistd.h>
14843 int main() { off64_t x = 7; }
14846 if eval $compile; then
14848 echo "You have off64_t."
14851 echo "You do not have off64_t."
14852 case "$lseeksize" in
14853 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
14860 : how to create joinable pthreads
14861 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
14863 echo "Checking what constant to use for creating joinable pthreads..." >&4
14864 $cat >try.c <<'EOCP'
14865 #include <pthread.h>
14867 int detachstate = JOINABLE;
14870 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
14871 if eval $compile; then
14872 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
14873 val="$undef" # Yes, undef.
14874 set d_old_pthread_create_joinable
14877 set old_pthread_create_joinable
14880 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
14881 if eval $compile; then
14882 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
14884 set d_old_pthread_create_joinable
14886 val=PTHREAD_CREATE_UNDETACHED
14887 set old_pthread_create_joinable
14890 set try -DJOINABLE=__UNDETACHED
14891 if eval $compile; then
14892 echo "You seem to use __UNDETACHED." >&4
14894 set d_old_pthread_create_joinable
14897 set old_pthread_create_joinable
14900 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
14902 set d_old_pthread_create_joinable
14905 set old_pthread_create_joinable
14912 d_old_pthread_create_joinable="$undef"
14913 old_pthread_create_joinable=""
14916 : see if pause exists
14920 : see if pipe exists
14924 : see if poll exists
14928 : see if readlink exists
14929 set readlink d_readlink
14935 case "$d_readlink" in
14937 if $issymlink /proc/self/exe ; then
14938 $ls -l /proc/self/exe > reflect
14939 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
14940 echo "You have Linux-like /proc/self/exe."
14941 procselfexe='"/proc/self/exe"'
14945 if $issymlink /proc/curproc/file ; then
14946 $ls -l /proc/curproc/file > reflect
14947 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
14948 echo "You have BSD-like /proc/curproc/file."
14949 procselfexe='"/proc/curproc/file"'
14959 : see whether the pthread_atfork exists
14961 #include <pthread.h>
14964 #ifdef PTHREAD_ATFORK
14965 pthread_atfork(NULL,NULL,NULL);
14970 : see if pthread_atfork exists
14971 set try -DPTHREAD_ATFORK
14972 if eval $compile; then
14977 case "$usethreads" in
14980 $define) echo 'pthread_atfork found.' >&4 ;;
14981 *) echo 'pthread_atfork NOT found.' >&4 ;;
14984 set d_pthread_atfork
14987 : see if pthread_attr_setscope exists
14988 set pthread_attr_setscope d_pthread_attr_setscope
14992 : see whether the various POSIXish _yields exist
14994 #include <pthread.h>
15000 #ifdef PTHREAD_YIELD
15003 #ifdef PTHREAD_YIELD_NULL
15004 pthread_yield(NULL);
15010 : see if sched_yield exists
15011 set try -DSCHED_YIELD
15012 if eval $compile; then
15014 sched_yield='sched_yield()'
15018 case "$usethreads" in
15021 $define) echo 'sched_yield() found.' >&4 ;;
15022 *) echo 'sched_yield() NOT found.' >&4 ;;
15028 : see if pthread_yield exists
15029 set try -DPTHREAD_YIELD
15030 if eval $compile; then
15032 case "$sched_yield" in
15033 '') sched_yield='pthread_yield()' ;;
15036 set try -DPTHREAD_YIELD_NULL
15037 if eval $compile; then
15039 case "$sched_yield" in
15040 '') sched_yield='pthread_yield(NULL)' ;;
15046 case "$usethreads" in
15049 $define) echo 'pthread_yield() found.' >&4 ;;
15050 *) echo 'pthread_yield() NOT found.' >&4 ;;
15054 set d_pthread_yield
15057 case "$sched_yield" in
15058 '') sched_yield=undef ;;
15063 : see if random_r exists
15064 set random_r d_random_r
15066 case "$d_random_r" in
15068 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15069 case "$d_random_r_proto:$usethreads" in
15070 ":define") d_random_r_proto=define
15071 set d_random_r_proto random_r $hdrs
15075 case "$d_random_r_proto" in
15077 case "$random_r_proto" in
15078 ''|0) try='int random_r(int*, struct random_data*);'
15079 ./protochk "extern $try" $hdrs && random_r_proto=I_iS ;;
15081 case "$random_r_proto" in
15082 ''|0) try='int random_r(long*, struct random_data*);'
15083 ./protochk "extern $try" $hdrs && random_r_proto=I_lS ;;
15085 case "$random_r_proto" in
15086 ''|0) try='int random_r(struct random_data*, int32_t*);'
15087 ./protochk "extern $try" $hdrs && random_r_proto=I_St ;;
15089 case "$random_r_proto" in
15090 ''|0) d_random_r=undef
15092 echo "Disabling random_r, cannot determine prototype." >&4 ;;
15093 * ) case "$random_r_proto" in
15094 REENTRANT_PROTO*) ;;
15095 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
15097 echo "Prototype: $try" ;;
15100 *) case "$usethreads" in
15101 define) echo "random_r has no prototype, not using it." >&4 ;;
15108 *) random_r_proto=0
15112 : see if readdir and friends exist
15113 set readdir d_readdir
15115 set seekdir d_seekdir
15117 set telldir d_telldir
15119 set rewinddir d_rewinddir
15122 : see if readdir64_r exists
15123 set readdir64_r d_readdir64_r
15125 case "$d_readdir64_r" in
15127 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
15128 case "$d_readdir64_r_proto:$usethreads" in
15129 ":define") d_readdir64_r_proto=define
15130 set d_readdir64_r_proto readdir64_r $hdrs
15134 case "$d_readdir64_r_proto" in
15136 case "$readdir64_r_proto" in
15137 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
15138 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TSR ;;
15140 case "$readdir64_r_proto" in
15141 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
15142 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TS ;;
15144 case "$readdir64_r_proto" in
15145 ''|0) d_readdir64_r=undef
15146 readdir64_r_proto=0
15147 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
15148 * ) case "$readdir64_r_proto" in
15149 REENTRANT_PROTO*) ;;
15150 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
15152 echo "Prototype: $try" ;;
15155 *) case "$usethreads" in
15156 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
15158 d_readdir64_r=undef
15159 readdir64_r_proto=0
15163 *) readdir64_r_proto=0
15167 : see if readdir_r exists
15168 set readdir_r d_readdir_r
15170 case "$d_readdir_r" in
15172 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
15173 case "$d_readdir_r_proto:$usethreads" in
15174 ":define") d_readdir_r_proto=define
15175 set d_readdir_r_proto readdir_r $hdrs
15179 case "$d_readdir_r_proto" in
15181 case "$readdir_r_proto" in
15182 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
15183 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TSR ;;
15185 case "$readdir_r_proto" in
15186 ''|0) try='int readdir_r(DIR*, struct dirent*);'
15187 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TS ;;
15189 case "$readdir_r_proto" in
15190 ''|0) d_readdir_r=undef
15192 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
15193 * ) case "$readdir_r_proto" in
15194 REENTRANT_PROTO*) ;;
15195 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
15197 echo "Prototype: $try" ;;
15200 *) case "$usethreads" in
15201 define) echo "readdir_r has no prototype, not using it." >&4 ;;
15208 *) readdir_r_proto=0
15212 : see if readv exists
15216 : see if recvmsg exists
15217 set recvmsg d_recvmsg
15220 : see if rename exists
15221 set rename d_rename
15224 : see if rmdir exists
15228 : see if memory.h is available.
15233 : See if it conflicts with string.h
15239 $cppstdin $cppflags $cppminus < $strings > mem.h
15240 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
15242 echo "We won't be including <memory.h>."
15252 : can bcopy handle overlapping blocks?
15255 case "$d_memmove" in
15256 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
15257 *) case "$d_bcopy" in
15259 echo "Checking to see if bcopy() can do overlapping copies..." >&4
15261 #$i_memory I_MEMORY
15262 #$i_stdlib I_STDLIB
15263 #$i_string I_STRING
15264 #$i_unistd I_UNISTD
15266 $cat >>try.c <<'EOCP'
15269 # include <memory.h>
15272 # include <stdlib.h>
15275 # include <string.h>
15277 # include <strings.h>
15280 # include <unistd.h> /* Needed for NetBSD */
15284 char buf[128], abc[128];
15290 /* Copy "abcde..." string to char abc[] so that gcc doesn't
15291 try to store the string in read-only memory. */
15292 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
15294 for (align = 7; align >= 0; align--) {
15295 for (len = 36; len; len--) {
15297 bcopy(abc, b, len);
15298 for (off = 1; off <= len; off++) {
15299 bcopy(b, b+off, len);
15300 bcopy(b+off, b, len);
15301 if (bcmp(b, abc, len))
15310 if eval $compile_ok; then
15311 if ./try 2>/dev/null; then
15312 echo "Yes, it can."
15315 echo "It can't, sorry."
15318 echo "(I can't compile the test program, so we'll assume not...)"
15322 $rm -f try.* try core
15328 : can memcpy handle overlapping blocks?
15331 case "$d_memmove" in
15332 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
15333 *) case "$d_memcpy" in
15335 echo "Checking to see if memcpy() can do overlapping copies..." >&4
15337 #$i_memory I_MEMORY
15338 #$i_stdlib I_STDLIB
15339 #$i_string I_STRING
15340 #$i_unistd I_UNISTD
15342 $cat >>try.c <<'EOCP'
15345 # include <memory.h>
15348 # include <stdlib.h>
15351 # include <string.h>
15353 # include <strings.h>
15356 # include <unistd.h> /* Needed for NetBSD */
15360 char buf[128], abc[128];
15366 /* Copy "abcde..." string to char abc[] so that gcc doesn't
15367 try to store the string in read-only memory. */
15368 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
15370 for (align = 7; align >= 0; align--) {
15371 for (len = 36; len; len--) {
15373 memcpy(b, abc, len);
15374 for (off = 1; off <= len; off++) {
15375 memcpy(b+off, b, len);
15376 memcpy(b, b+off, len);
15377 if (memcmp(b, abc, len))
15386 if eval $compile_ok; then
15387 if ./try 2>/dev/null; then
15388 echo "Yes, it can."
15391 echo "It can't, sorry."
15394 echo "(I can't compile the test program, so we'll assume not...)"
15398 $rm -f try.* try core
15404 : can memcmp be trusted to compare relative magnitude?
15406 case "$d_memcmp" in
15409 echo "Checking if your memcmp() can compare relative magnitude..." >&4
15411 #$i_memory I_MEMORY
15412 #$i_stdlib I_STDLIB
15413 #$i_string I_STRING
15414 #$i_unistd I_UNISTD
15416 $cat >>try.c <<'EOCP'
15419 # include <memory.h>
15422 # include <stdlib.h>
15425 # include <string.h>
15427 # include <strings.h>
15430 # include <unistd.h> /* Needed for NetBSD */
15436 if ((a < b) && memcmp(&a, &b, 1) < 0)
15442 if eval $compile_ok; then
15443 if $run ./try 2>/dev/null; then
15444 echo "Yes, it can."
15447 echo "No, it can't (it uses signed chars)."
15450 echo "(I can't compile the test program, so we'll assume not...)"
15454 $rm -f try.* try core
15458 : see if prototype for sbrk is available
15460 set d_sbrkproto sbrk $i_unistd unistd.h
15463 : see if select exists
15464 set select d_select
15467 : see if semctl exists
15468 set semctl d_semctl
15471 : see if semget exists
15472 set semget d_semget
15475 : see if semop exists
15479 : see how much of the 'sem*(2)' library is present.
15482 case "$d_semctl$d_semget$d_semop" in
15483 *"$undef"*) h_sem=false;;
15487 case "`ipcs 2>&1`" in
15488 "SVID messages"*"not configured"*)
15489 echo "Your $osname does not have the sem*(2) configured." >&4
15492 set semctl d_semctl
15494 set semget d_semget
15502 : we could also check for sys/ipc.h ...
15503 if $h_sem && $test `./findhdr sys/sem.h`; then
15504 echo "You have the full sem*(2) library." >&4
15507 echo "You don't have the full sem*(2) library." >&4
15513 : see whether sys/sem.h defines union semun
15515 $cat > try.c <<'END'
15516 #include <sys/types.h>
15517 #include <sys/ipc.h>
15518 #include <sys/sem.h>
15519 int main () { union semun semun; semun.buf = 0; }
15522 if eval $compile; then
15523 echo "You have union semun in <sys/sem.h>." >&4
15526 echo "You do not have union semun in <sys/sem.h>." >&4
15533 : see how to do semctl IPC_STAT
15540 # define S_IRUSR S_IREAD
15541 # define S_IWUSR S_IWRITE
15542 # define S_IXUSR S_IEXEC
15544 # define S_IRUSR 0400
15545 # define S_IWUSR 0200
15546 # define S_IXUSR 0100
15548 # define S_IRGRP (S_IRUSR>>3)
15549 # define S_IWGRP (S_IWUSR>>3)
15550 # define S_IXGRP (S_IXUSR>>3)
15551 # define S_IROTH (S_IRUSR>>6)
15552 # define S_IWOTH (S_IWUSR>>6)
15553 # define S_IXOTH (S_IXUSR>>6)
15556 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
15557 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
15558 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
15561 : see whether semctl IPC_STAT can use union semun
15563 case "$d_semctl_semun" in
15566 #include <sys/types.h>
15567 #include <sys/ipc.h>
15568 #include <sys/sem.h>
15569 #include <sys/stat.h>
15576 #$d_union_semun HAS_UNION_SEMUN
15579 #ifndef HAS_UNION_SEMUN
15582 struct semid_ds *buf;
15583 unsigned short *array;
15589 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
15590 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
15592 struct semid_ds argbuf;
15595 st = semctl(sem, 0, IPC_STAT, arg);
15599 # endif /* IPC_STAT */
15600 printf("semctl IPC_STAT failed: errno = %d\n", errno);
15602 if (semctl(sem, 0, IPC_RMID, arg) != 0)
15603 # endif /* IPC_RMID */
15604 printf("semctl IPC_RMID failed: errno = %d\n", errno);
15606 #endif /* IPC_PRIVATE && ... */
15607 printf("semget failed: errno = %d\n", errno);
15612 if eval $compile; then
15615 semun) val="$define" ;;
15623 case "$d_semctl_semun" in
15625 echo "You can use union semun for semctl IPC_STAT." >&4
15628 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
15633 : see whether semctl IPC_STAT can use struct semid_ds pointer
15635 case "$d_semctl_semid_ds" in
15637 $cat > try.c <<'END'
15638 #include <sys/types.h>
15639 #include <sys/ipc.h>
15640 #include <sys/sem.h>
15641 #include <sys/stat.h>
15649 struct semid_ds arg;
15652 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
15653 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
15656 st = semctl(sem, 0, IPC_STAT, &arg);
15658 printf("semid_ds\n");
15660 # endif /* IPC_STAT */
15661 printf("semctl IPC_STAT failed: errno = %d\n", errno);
15663 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
15664 # endif /* IPC_RMID */
15665 printf("semctl IPC_RMID failed: errno = %d\n", errno);
15667 #endif /* IPC_PRIVATE && ... */
15668 printf("semget failed: errno = %d\n", errno);
15674 if eval $compile; then
15677 semid_ds) val="$define" ;;
15683 set d_semctl_semid_ds
15685 case "$d_semctl_semid_ds" in
15687 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
15689 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
15696 # We do not have the full sem*(2) library, so assume we can not
15702 set d_semctl_semid_ds
15707 : see if sendmsg exists
15708 set sendmsg d_sendmsg
15711 : see if setegid exists
15712 set setegid d_setegid
15715 : see if seteuid exists
15716 set seteuid d_seteuid
15719 : see if setgrent exists
15720 set setgrent d_setgrent
15723 : see if setgrent_r exists
15724 set setgrent_r d_setgrent_r
15726 case "$d_setgrent_r" in
15728 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
15729 case "$d_setgrent_r_proto:$usethreads" in
15730 ":define") d_setgrent_r_proto=define
15731 set d_setgrent_r_proto setgrent_r $hdrs
15735 case "$d_setgrent_r_proto" in
15737 case "$setgrent_r_proto" in
15738 ''|0) try='int setgrent_r(FILE**);'
15739 ./protochk "extern $try" $hdrs && setgrent_r_proto=I_H ;;
15741 case "$setgrent_r_proto" in
15742 ''|0) try='void setgrent_r(FILE**);'
15743 ./protochk "extern $try" $hdrs && setgrent_r_proto=V_H ;;
15745 case "$setgrent_r_proto" in
15746 ''|0) d_setgrent_r=undef
15748 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
15749 * ) case "$setgrent_r_proto" in
15750 REENTRANT_PROTO*) ;;
15751 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
15753 echo "Prototype: $try" ;;
15756 *) case "$usethreads" in
15757 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
15764 *) setgrent_r_proto=0
15768 : see if sethostent exists
15769 set sethostent d_sethent
15772 : see if sethostent_r exists
15773 set sethostent_r d_sethostent_r
15775 case "$d_sethostent_r" in
15777 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15778 case "$d_sethostent_r_proto:$usethreads" in
15779 ":define") d_sethostent_r_proto=define
15780 set d_sethostent_r_proto sethostent_r $hdrs
15784 case "$d_sethostent_r_proto" in
15786 case "$sethostent_r_proto" in
15787 ''|0) try='int sethostent_r(int, struct hostent_data*);'
15788 ./protochk "extern $try" $hdrs && sethostent_r_proto=I_ID ;;
15790 case "$sethostent_r_proto" in
15791 ''|0) try='void sethostent_r(int, struct hostent_data*);'
15792 ./protochk "extern $try" $hdrs && sethostent_r_proto=V_ID ;;
15794 case "$sethostent_r_proto" in
15795 ''|0) d_sethostent_r=undef
15796 sethostent_r_proto=0
15797 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
15798 * ) case "$sethostent_r_proto" in
15799 REENTRANT_PROTO*) ;;
15800 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
15802 echo "Prototype: $try" ;;
15805 *) case "$usethreads" in
15806 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
15808 d_sethostent_r=undef
15809 sethostent_r_proto=0
15813 *) sethostent_r_proto=0
15817 : see if setitimer exists
15818 set setitimer d_setitimer
15821 : see if setlinebuf exists
15822 set setlinebuf d_setlinebuf
15825 : see if setlocale exists
15826 set setlocale d_setlocale
15829 : see if locale.h is available
15830 set locale.h i_locale
15833 : see if setlocale_r exists
15834 set setlocale_r d_setlocale_r
15836 case "$d_setlocale_r" in
15838 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
15839 case "$d_setlocale_r_proto:$usethreads" in
15840 ":define") d_setlocale_r_proto=define
15841 set d_setlocale_r_proto setlocale_r $hdrs
15845 case "$d_setlocale_r_proto" in
15847 case "$setlocale_r_proto" in
15848 ''|0) try='int setlocale_r(int, const char*, char*, int);'
15849 ./protochk "extern $try" $hdrs && setlocale_r_proto=I_ICBI ;;
15851 case "$setlocale_r_proto" in
15852 ''|0) d_setlocale_r=undef
15853 setlocale_r_proto=0
15854 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
15855 * ) case "$setlocale_r_proto" in
15856 REENTRANT_PROTO*) ;;
15857 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
15859 echo "Prototype: $try" ;;
15862 *) case "$usethreads" in
15863 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
15865 d_setlocale_r=undef
15866 setlocale_r_proto=0
15870 *) setlocale_r_proto=0
15874 : see if setnetent exists
15875 set setnetent d_setnent
15878 : see if setnetent_r exists
15879 set setnetent_r d_setnetent_r
15881 case "$d_setnetent_r" in
15883 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15884 case "$d_setnetent_r_proto:$usethreads" in
15885 ":define") d_setnetent_r_proto=define
15886 set d_setnetent_r_proto setnetent_r $hdrs
15890 case "$d_setnetent_r_proto" in
15892 case "$setnetent_r_proto" in
15893 ''|0) try='int setnetent_r(int, struct netent_data*);'
15894 ./protochk "extern $try" $hdrs && setnetent_r_proto=I_ID ;;
15896 case "$setnetent_r_proto" in
15897 ''|0) try='void setnetent_r(int, struct netent_data*);'
15898 ./protochk "extern $try" $hdrs && setnetent_r_proto=V_ID ;;
15900 case "$setnetent_r_proto" in
15901 ''|0) d_setnetent_r=undef
15902 setnetent_r_proto=0
15903 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
15904 * ) case "$setnetent_r_proto" in
15905 REENTRANT_PROTO*) ;;
15906 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
15908 echo "Prototype: $try" ;;
15911 *) case "$usethreads" in
15912 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
15914 d_setnetent_r=undef
15915 setnetent_r_proto=0
15919 *) setnetent_r_proto=0
15923 : see if setprotoent exists
15924 set setprotoent d_setpent
15927 : see if setpgid exists
15928 set setpgid d_setpgid
15931 : see if setpgrp2 exists
15932 set setpgrp2 d_setpgrp2
15935 : see if setpriority exists
15936 set setpriority d_setprior
15939 : see if setproctitle exists
15940 set setproctitle d_setproctitle
15943 : see if setprotoent_r exists
15944 set setprotoent_r d_setprotoent_r
15946 case "$d_setprotoent_r" in
15948 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15949 case "$d_setprotoent_r_proto:$usethreads" in
15950 ":define") d_setprotoent_r_proto=define
15951 set d_setprotoent_r_proto setprotoent_r $hdrs
15955 case "$d_setprotoent_r_proto" in
15957 case "$setprotoent_r_proto" in
15958 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
15959 ./protochk "extern $try" $hdrs && setprotoent_r_proto=I_ID ;;
15961 case "$setprotoent_r_proto" in
15962 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
15963 ./protochk "extern $try" $hdrs && setprotoent_r_proto=V_ID ;;
15965 case "$setprotoent_r_proto" in
15966 ''|0) d_setprotoent_r=undef
15967 setprotoent_r_proto=0
15968 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
15969 * ) case "$setprotoent_r_proto" in
15970 REENTRANT_PROTO*) ;;
15971 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
15973 echo "Prototype: $try" ;;
15976 *) case "$usethreads" in
15977 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
15979 d_setprotoent_r=undef
15980 setprotoent_r_proto=0
15984 *) setprotoent_r_proto=0
15988 : see if setpwent exists
15989 set setpwent d_setpwent
15992 : see if setpwent_r exists
15993 set setpwent_r d_setpwent_r
15995 case "$d_setpwent_r" in
15997 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
15998 case "$d_setpwent_r_proto:$usethreads" in
15999 ":define") d_setpwent_r_proto=define
16000 set d_setpwent_r_proto setpwent_r $hdrs
16004 case "$d_setpwent_r_proto" in
16006 case "$setpwent_r_proto" in
16007 ''|0) try='int setpwent_r(FILE**);'
16008 ./protochk "extern $try" $hdrs && setpwent_r_proto=I_H ;;
16010 case "$setpwent_r_proto" in
16011 ''|0) try='void setpwent_r(FILE**);'
16012 ./protochk "extern $try" $hdrs && setpwent_r_proto=V_H ;;
16014 case "$setpwent_r_proto" in
16015 ''|0) d_setpwent_r=undef
16017 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
16018 * ) case "$setpwent_r_proto" in
16019 REENTRANT_PROTO*) ;;
16020 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
16022 echo "Prototype: $try" ;;
16025 *) case "$usethreads" in
16026 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
16033 *) setpwent_r_proto=0
16037 : see if setregid exists
16038 set setregid d_setregid
16040 set setresgid d_setresgid
16043 : see if setreuid exists
16044 set setreuid d_setreuid
16046 set setresuid d_setresuid
16049 : see if setrgid exists
16050 set setrgid d_setrgid
16053 : see if setruid exists
16054 set setruid d_setruid
16057 : see if setservent exists
16058 set setservent d_setsent
16061 : see if setservent_r exists
16062 set setservent_r d_setservent_r
16064 case "$d_setservent_r" in
16066 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16067 case "$d_setservent_r_proto:$usethreads" in
16068 ":define") d_setservent_r_proto=define
16069 set d_setservent_r_proto setservent_r $hdrs
16073 case "$d_setservent_r_proto" in
16075 case "$setservent_r_proto" in
16076 ''|0) try='int setservent_r(int, struct servent_data*);'
16077 ./protochk "extern $try" $hdrs && setservent_r_proto=I_ID ;;
16079 case "$setservent_r_proto" in
16080 ''|0) try='void setservent_r(int, struct servent_data*);'
16081 ./protochk "extern $try" $hdrs && setservent_r_proto=V_ID ;;
16083 case "$setservent_r_proto" in
16084 ''|0) d_setservent_r=undef
16085 setservent_r_proto=0
16086 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
16087 * ) case "$setservent_r_proto" in
16088 REENTRANT_PROTO*) ;;
16089 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
16091 echo "Prototype: $try" ;;
16094 *) case "$usethreads" in
16095 define) echo "setservent_r has no prototype, not using it." >&4 ;;
16097 d_setservent_r=undef
16098 setservent_r_proto=0
16102 *) setservent_r_proto=0
16106 : see if setsid exists
16107 set setsid d_setsid
16110 : see if setvbuf exists
16111 set setvbuf d_setvbuf
16114 : see if sfio.h is available
16119 : see if sfio library is available
16130 : Ok, but do we want to use it.
16134 true|$define|[yY]*) dflt='y';;
16137 echo "$package can use the sfio library, but it is experimental."
16138 case "$useperlio" in
16140 echo "For sfio also the PerlIO abstraction layer is needed."
16141 echo "Earlier you said you wouldn't want that."
16144 rp="You seem to have sfio available, do you want to try using it?"
16147 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
16148 useperlio="$define"
16151 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
16156 *) case "$usesfio" in
16157 true|$define|[yY]*)
16158 echo "Sorry, cannot find sfio on this machine." >&4
16159 echo "Ignoring your setting of usesfio=$usesfio." >&4
16168 $define) usesfio='true';;
16169 *) usesfio='false';;
16173 *) : Remove sfio from list of libraries to use
16176 echo "Removing unneeded -lsfio from library list" >&4
16177 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
16180 echo "libs = $libs" >&4
16187 : see if shmctl exists
16188 set shmctl d_shmctl
16191 : see if shmget exists
16192 set shmget d_shmget
16195 : see if shmat exists
16198 : see what shmat returns
16201 $cat >shmat.c <<'END'
16202 #include <sys/shm.h>
16205 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
16210 echo "and it returns ($shmattype)." >&4
16211 : see if a prototype for shmat is available
16212 xxx=`./findhdr sys/shm.h`
16213 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
16214 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
16225 set d_shmatprototype
16228 : see if shmdt exists
16232 : see how much of the 'shm*(2)' library is present.
16235 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
16236 *"$undef"*) h_shm=false;;
16240 case "`ipcs 2>&1`" in
16241 "SVID shared memory"*"not configured"*)
16242 echo "Your $osname does not have the shm*(2) configured." >&4
16245 set shmctl d_shmctl
16247 set shmget d_shmget
16257 : we could also check for sys/ipc.h ...
16258 if $h_shm && $test `./findhdr sys/shm.h`; then
16259 echo "You have the full shm*(2) library." >&4
16262 echo "You don't have the full shm*(2) library." >&4
16269 : see if we have sigaction
16270 if set sigaction val -f d_sigaction; eval $csym; $val; then
16271 echo 'sigaction() found.' >&4
16274 #include <sys/types.h>
16275 #include <signal.h>
16276 #$i_stdlib I_STDLIB
16278 #include <stdlib.h>
16282 struct sigaction act, oact;
16284 oact.sa_handler = 0;
16285 /* so that act and oact are used */
16286 exit(act.sa_flags == 0 && oact.sa_handler == 0);
16290 if eval $compile_ok; then
16293 echo "But you don't seem to have a useable struct sigaction." >&4
16297 echo 'sigaction NOT found.' >&4
16300 set d_sigaction; eval $setvar
16301 $rm -f try try$_o try.c
16303 : see if sigprocmask exists
16304 set sigprocmask d_sigprocmask
16307 : see if sigsetjmp exists
16309 case "$d_sigsetjmp" in
16312 #include <setjmp.h>
16313 #$i_stdlib I_STDLIB
16315 #include <stdlib.h>
16321 if (sigsetjmp(env,1))
16324 siglongjmp(env, 1);
16329 if eval $compile; then
16330 if $run ./try >/dev/null 2>&1; then
16331 echo "POSIX sigsetjmp found." >&4
16335 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
16341 echo "sigsetjmp not found." >&4
16345 *) val="$d_sigsetjmp"
16346 case "$d_sigsetjmp" in
16347 $define) echo "POSIX sigsetjmp found." >&4;;
16348 $undef) echo "sigsetjmp not found." >&4;;
16356 : see if sockatmark exists
16357 set sockatmark d_sockatmark
16360 : see if prototype for sockatmark is available
16362 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
16365 : see if socks5_init exists
16366 set socks5_init d_socks5_init
16369 : see if srand48_r exists
16370 set srand48_r d_srand48_r
16372 case "$d_srand48_r" in
16374 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
16375 case "$d_srand48_r_proto:$usethreads" in
16376 ":define") d_srand48_r_proto=define
16377 set d_srand48_r_proto srand48_r $hdrs
16381 case "$d_srand48_r_proto" in
16383 case "$srand48_r_proto" in
16384 ''|0) try='int srand48_r(long, struct drand48_data*);'
16385 ./protochk "extern $try" $hdrs && srand48_r_proto=I_LS ;;
16387 case "$srand48_r_proto" in
16388 ''|0) d_srand48_r=undef
16390 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
16391 * ) case "$srand48_r_proto" in
16392 REENTRANT_PROTO*) ;;
16393 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
16395 echo "Prototype: $try" ;;
16398 *) case "$usethreads" in
16399 define) echo "srand48_r has no prototype, not using it." >&4 ;;
16406 *) srand48_r_proto=0
16410 : see if srandom_r exists
16411 set srandom_r d_srandom_r
16413 case "$d_srandom_r" in
16415 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
16416 case "$d_srandom_r_proto:$usethreads" in
16417 ":define") d_srandom_r_proto=define
16418 set d_srandom_r_proto srandom_r $hdrs
16422 case "$d_srandom_r_proto" in
16424 case "$srandom_r_proto" in
16425 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
16426 ./protochk "extern $try" $hdrs && srandom_r_proto=I_TS ;;
16428 case "$srandom_r_proto" in
16429 ''|0) d_srandom_r=undef
16431 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
16432 * ) case "$srandom_r_proto" in
16433 REENTRANT_PROTO*) ;;
16434 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
16436 echo "Prototype: $try" ;;
16439 *) case "$usethreads" in
16440 define) echo "srandom_r has no prototype, not using it." >&4 ;;
16447 *) srandom_r_proto=0
16451 : see if prototype for setresgid is available
16453 set d_sresgproto setresgid $i_unistd unistd.h
16456 : see if prototype for setresuid is available
16458 set d_sresuproto setresuid $i_unistd unistd.h
16461 : see if sys/stat.h is available
16462 set sys/stat.h i_sysstat
16466 : see if stat knows about block sizes
16468 echo "Checking to see if your struct stat has st_blocks field..." >&4
16469 set d_statblks stat st_blocks $i_sysstat sys/stat.h
16473 : see if this is a sys/vfs.h system
16474 set sys/vfs.h i_sysvfs
16478 : see if this is a sys/statfs.h system
16479 set sys/statfs.h i_sysstatfs
16484 echo "Checking to see if your system supports struct statfs..." >&4
16485 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
16487 case "$d_statfs_s" in
16488 "$define") echo "Yes, it does." ;;
16489 *) echo "No, it doesn't." ;;
16494 : see if struct statfs knows about f_flags
16495 case "$d_statfs_s" in
16498 echo "Checking to see if your struct statfs has f_flags field..." >&4
16499 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
16503 set d_statfs_f_flags
16507 case "$d_statfs_f_flags" in
16508 "$define") echo "Yes, it does." ;;
16509 *) echo "No, it doesn't." ;;
16513 Checking how to access stdio streams by file descriptor number...
16515 case "$stdio_stream_array" in
16516 '') $cat >try.c <<EOCP
16519 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
16523 for s in _iob __iob __sF
16525 set try -DSTDIO_STREAM_ARRAY=$s
16526 if eval $compile; then
16527 case "`$run ./try`" in
16528 yes) stdio_stream_array=$s; break ;;
16532 $rm -f try.* try$exe_ext
16534 case "$stdio_stream_array" in
16536 I can't figure out how to access stdio streams by file descriptor number.
16538 d_stdio_stream_array="$undef"
16541 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
16543 d_stdio_stream_array="$define"
16547 : see if strcoll exists
16548 set strcoll d_strcoll
16551 : check for structure copying
16553 echo "Checking to see if your C compiler can copy structs..." >&4
16554 $cat >try.c <<'EOCP'
16564 if $cc -c try.c >/dev/null 2>&1 ; then
16566 echo "Yup, it can."
16569 echo "Nope, it can't."
16575 : see if strerror and/or sys_errlist[] exist
16577 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
16578 if set strerror val -f d_strerror; eval $csym; $val; then
16579 echo 'strerror() found.' >&4
16580 d_strerror="$define"
16581 d_strerrm='strerror(e)'
16582 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
16583 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
16584 d_syserrlst="$define"
16586 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
16587 d_syserrlst="$undef"
16589 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
16590 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
16591 echo 'strerror() found in string header.' >&4
16592 d_strerror="$define"
16593 d_strerrm='strerror(e)'
16594 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
16595 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
16596 d_syserrlst="$define"
16598 echo "(You don't appear to have any sys_errlist[], how can this be?)"
16599 d_syserrlst="$undef"
16601 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
16602 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
16603 d_strerror="$undef"
16604 d_syserrlst="$define"
16605 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
16607 echo 'strerror() and sys_errlist[] NOT found.' >&4
16608 d_strerror="$undef"
16609 d_syserrlst="$undef"
16610 d_strerrm='"unknown"'
16614 : see if strerror_r exists
16615 set strerror_r d_strerror_r
16617 case "$d_strerror_r" in
16619 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
16620 case "$d_strerror_r_proto:$usethreads" in
16621 ":define") d_strerror_r_proto=define
16622 set d_strerror_r_proto strerror_r $hdrs
16626 case "$d_strerror_r_proto" in
16628 case "$strerror_r_proto" in
16629 ''|0) try='int strerror_r(int, char*, size_t);'
16630 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;;
16632 case "$strerror_r_proto" in
16633 ''|0) try='int strerror_r(int, char*, int);'
16634 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;;
16636 case "$strerror_r_proto" in
16637 ''|0) try='char* strerror_r(int, char*, size_t);'
16638 ./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;;
16640 case "$strerror_r_proto" in
16641 ''|0) d_strerror_r=undef
16643 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
16644 * ) case "$strerror_r_proto" in
16645 REENTRANT_PROTO*) ;;
16646 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
16648 echo "Prototype: $try" ;;
16651 *) case "$usethreads" in
16652 define) echo "strerror_r has no prototype, not using it." >&4 ;;
16659 *) strerror_r_proto=0
16663 : see if strftime exists
16664 set strftime d_strftime
16667 : see if strlcat exists
16668 set strlcat d_strlcat
16671 : see if strlcpy exists
16672 set strlcpy d_strlcpy
16675 : see if strtod exists
16676 set strtod d_strtod
16679 : see if strtol exists
16680 set strtol d_strtol
16683 : see if strtold exists
16684 set strtold d_strtold
16687 : see if strtoll exists
16688 set strtoll d_strtoll
16691 case "$d_longlong-$d_strtoll" in
16694 Checking whether your strtoll() works okay...
16696 $cat >try.c <<'EOCP'
16699 #define strtoll __strtoll
16702 #define strtoll _strtoll
16705 extern long long int strtoll(char *s, char **, int);
16706 static int bad = 0;
16707 int check(char *s, long long ell, int een) {
16710 gll = strtoll(s, 0, 10);
16711 if (!((gll == ell) && (errno == een)))
16715 check(" 1", 1LL, 0);
16716 check(" 0", 0LL, 0);
16717 check("-1", -1LL, 0);
16718 check("-9223372036854775808", -9223372036854775808LL, 0);
16719 check("-9223372036854775808", -9223372036854775808LL, 0);
16720 check(" 9223372036854775807", 9223372036854775807LL, 0);
16721 check("-9223372036854775808", -9223372036854775808LL, 0);
16722 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
16723 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
16729 if eval $compile; then
16732 ok) echo "Your strtoll() seems to be working okay." ;;
16734 Your strtoll() doesn't seem to be working okay.
16740 echo "(I can't seem to compile the test program--assuming it doesn't)"
16746 : see if strtoq exists
16747 set strtoq d_strtoq
16750 : see if strtoul exists
16751 set strtoul d_strtoul
16754 case "$d_strtoul" in
16757 Checking whether your strtoul() works okay...
16759 $cat >try.c <<'EOCP'
16762 extern unsigned long int strtoul(char *s, char **, int);
16763 static int bad = 0;
16764 void check(char *s, unsigned long eul, int een) {
16767 gul = strtoul(s, 0, 10);
16768 if (!((gul == eul) && (errno == een)))
16772 check(" 1", 1L, 0);
16773 check(" 0", 0L, 0);
16775 case "$longsize" in
16777 $cat >>try.c <<'EOCP'
16778 check("18446744073709551615", 18446744073709551615UL, 0);
16779 check("18446744073709551616", 18446744073709551615UL, ERANGE);
16780 #if 0 /* strtoul() for /^-/ strings is undefined. */
16781 check("-1", 18446744073709551615UL, 0);
16782 check("-18446744073709551614", 2, 0);
16783 check("-18446744073709551615", 1, 0);
16784 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
16785 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
16790 $cat >>try.c <<'EOCP'
16791 check("4294967295", 4294967295UL, 0);
16792 check("4294967296", 4294967295UL, ERANGE);
16793 #if 0 /* strtoul() for /^-/ strings is undefined. */
16794 check("-1", 4294967295UL, 0);
16795 check("-4294967294", 2, 0);
16796 check("-4294967295", 1, 0);
16797 check("-4294967296", 4294967295UL, ERANGE);
16798 check("-4294967297", 4294967295UL, ERANGE);
16803 : Should we write these tests to be more portable by sprintf-ing
16804 : ~0 and then manipulating that char string as input for strtol?
16807 $cat >>try.c <<'EOCP'
16814 if eval $compile; then
16815 case "`$run ./try`" in
16816 ok) echo "Your strtoul() seems to be working okay." ;;
16818 Your strtoul() doesn't seem to be working okay.
16827 : see if strtoull exists
16828 set strtoull d_strtoull
16831 case "$d_longlong-$d_strtoull" in
16834 Checking whether your strtoull() works okay...
16836 $cat >try.c <<'EOCP'
16839 #define strtoull __strtoull
16842 extern unsigned long long int strtoull(char *s, char **, int);
16843 static int bad = 0;
16844 int check(char *s, long long eull, int een) {
16847 gull = strtoull(s, 0, 10);
16848 if (!((gull == eull) && (errno == een)))
16852 check(" 1", 1LL, 0);
16853 check(" 0", 0LL, 0);
16854 check("18446744073709551615", 18446744073709551615ULL, 0);
16855 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
16856 #if 0 /* strtoull() for /^-/ strings is undefined. */
16857 check("-1", 18446744073709551615ULL, 0);
16858 check("-18446744073709551614", 2LL, 0);
16859 check("-18446744073709551615", 1LL, 0);
16860 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
16861 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
16868 if eval $compile; then
16869 case "`$run ./try`" in
16870 ok) echo "Your strtoull() seems to be working okay." ;;
16872 Your strtoull() doesn't seem to be working okay.
16874 d_strtoull="$undef"
16881 : see if strtouq exists
16882 set strtouq d_strtouq
16885 case "$d_strtouq" in
16888 Checking whether your strtouq() works okay...
16890 $cat >try.c <<'EOCP'
16893 extern unsigned long long int strtouq(char *s, char **, int);
16894 static int bad = 0;
16895 void check(char *s, unsigned long long eull, int een) {
16896 unsigned long long gull;
16898 gull = strtouq(s, 0, 10);
16899 if (!((gull == eull) && (errno == een)))
16903 check(" 1", 1LL, 0);
16904 check(" 0", 0LL, 0);
16905 check("18446744073709551615", 18446744073709551615ULL, 0);
16906 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
16907 #if 0 /* strtouq() for /^-/ strings is undefined. */
16908 check("-1", 18446744073709551615ULL, 0);
16909 check("-18446744073709551614", 2LL, 0);
16910 check("-18446744073709551615", 1LL, 0);
16911 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
16912 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
16920 if eval $compile; then
16921 case "`$run ./try`" in
16922 ok) echo "Your strtouq() seems to be working okay." ;;
16924 Your strtouq() doesn't seem to be working okay.
16933 : see if strxfrm exists
16934 set strxfrm d_strxfrm
16937 : see if symlink exists
16938 set symlink d_symlink
16941 : see if syscall exists
16942 set syscall d_syscall
16945 : see if prototype for syscall is available
16947 set d_syscallproto syscall $i_unistd unistd.h
16950 : see if sysconf exists
16951 set sysconf d_sysconf
16954 : see if system exists
16955 set system d_system
16958 : see if tcgetpgrp exists
16959 set tcgetpgrp d_tcgetpgrp
16962 : see if tcsetpgrp exists
16963 set tcsetpgrp d_tcsetpgrp
16966 : see if prototype for telldir is available
16968 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
16971 : see if time exists
16973 if test "X$d_time" = X -o X"$timetype" = X; then
16974 if set time val -f d_time; eval $csym; $val; then
16975 echo 'time() found.' >&4
16977 rp="What is the type returned by time() on this system?"
16978 set time_t timetype long stdio.h sys/types.h
16981 echo 'time() not found, hope that will do.' >&4
16989 : see if this is a sys/times.h system
16990 set sys/times.h i_systimes
16993 : see if times exists
16995 if set times val -f d_times; eval $csym; $val; then
16996 echo 'times() found.' >&4
16999 case "$i_systimes" in
17000 "$define") inc='sys/times.h';;
17002 rp="What is the type returned by times() on this system?"
17003 set clock_t clocktype long stdio.h sys/types.h $inc
17006 echo 'times() NOT found, hope that will do.' >&4
17011 : see if tmpnam_r exists
17012 set tmpnam_r d_tmpnam_r
17014 case "$d_tmpnam_r" in
17016 hdrs="$i_systypes sys/types.h define stdio.h "
17017 case "$d_tmpnam_r_proto:$usethreads" in
17018 ":define") d_tmpnam_r_proto=define
17019 set d_tmpnam_r_proto tmpnam_r $hdrs
17023 case "$d_tmpnam_r_proto" in
17025 case "$tmpnam_r_proto" in
17026 ''|0) try='char* tmpnam_r(char*);'
17027 ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;;
17029 case "$tmpnam_r_proto" in
17030 ''|0) d_tmpnam_r=undef
17032 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
17033 * ) case "$tmpnam_r_proto" in
17034 REENTRANT_PROTO*) ;;
17035 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
17037 echo "Prototype: $try" ;;
17040 *) case "$usethreads" in
17041 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
17048 *) tmpnam_r_proto=0
17052 : see if truncate exists
17053 set truncate d_truncate
17056 : see if ttyname_r exists
17057 set ttyname_r d_ttyname_r
17059 case "$d_ttyname_r" in
17061 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
17062 case "$d_ttyname_r_proto:$usethreads" in
17063 ":define") d_ttyname_r_proto=define
17064 set d_ttyname_r_proto ttyname_r $hdrs
17068 case "$d_ttyname_r_proto" in
17070 case "$ttyname_r_proto" in
17071 ''|0) try='int ttyname_r(int, char*, size_t);'
17072 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;;
17074 case "$ttyname_r_proto" in
17075 ''|0) try='int ttyname_r(int, char*, int);'
17076 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;;
17078 case "$ttyname_r_proto" in
17079 ''|0) try='char* ttyname_r(int, char*, int);'
17080 ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;;
17082 case "$ttyname_r_proto" in
17083 ''|0) d_ttyname_r=undef
17085 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
17086 * ) case "$ttyname_r_proto" in
17087 REENTRANT_PROTO*) ;;
17088 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
17090 echo "Prototype: $try" ;;
17093 *) case "$usethreads" in
17094 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
17101 *) ttyname_r_proto=0
17105 : see if tzname[] exists
17107 if set tzname val -a d_tzname; eval $csym; $val; then
17109 echo 'tzname[] found.' >&4
17112 echo 'tzname[] NOT found.' >&4
17118 next|rhapsody|darwin) multiarch="$define" ;;
17120 case "$multiarch" in
17121 ''|[nN]*) multiarch="$undef" ;;
17124 : check for ordering of bytes in a UV
17126 case "$usecrosscompile$multiarch" in
17129 You seem to be either cross-compiling or doing a multiarchitecture build,
17130 skipping the byteorder check.
17136 case "$byteorder" in
17139 In the following, larger digits indicate more significance. A big-endian
17140 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
17141 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
17142 machines may have weird orders like 3412. A Cray will report 87654321,
17143 an Alpha will report 12345678. If the test program works the default is
17145 I'm now running the test program...
17149 #$i_stdlib I_STDLIB
17151 #include <stdlib.h>
17153 #include <sys/types.h>
17154 typedef $uvtype UV;
17164 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
17166 u.l = (UV)0x04030201;
17167 for (i = 0; i < $uvsize; i++)
17168 printf("%c", u.c[i]+'0');
17175 if eval $compile && ./try > /dev/null; then
17178 [1-4][1-4][1-4][1-4]|12345678|87654321)
17179 echo "(The test program ran ok.)"
17180 echo "byteorder=$dflt"
17183 ????|????????) echo "(The test program ran ok.)" ;;
17184 *) echo "(The test program didn't run right for some reason.)" ;;
17189 (I can't seem to compile the test program. Guessing big-endian...)
17192 case "$xxx_prompt" in
17194 rp="What is the order of bytes in $uvtype?"
17210 Checking to see whether you can access character data unalignedly...
17212 case "$d_u32align" in
17213 '') $cat >try.c <<EOCP
17215 #$i_stdlib I_STDLIB
17217 #include <stdlib.h>
17219 #define U32 $u32type
17220 #define BYTEORDER 0x$byteorder
17222 #include <signal.h>
17224 $signal_t bletch(s) int s; { exit(4); }
17227 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
17232 if (sizeof(U32) != 4) {
17233 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
17240 signal(SIGBUS, bletch);
17252 for (i = 0; i < 4; i++) {
17253 up = (U32*)(buf + i);
17254 if (! ((*up == 1 << (8*i)) || /* big-endian */
17255 (*up == 1 << (8*(3-i))) /* little-endian */
17259 printf("read failed (%x)\n", *up);
17265 for (i = 0; i < 4; i++) {
17266 up = (U32*)(buf + i);
17268 if (*up != 0xBeef) {
17269 printf("write failed (%x)\n", *up);
17283 if eval $compile_ok; then
17284 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
17285 $run ./try 2>&1 >/dev/null
17288 You can access character data pretty unalignedly.
17290 d_u32align="$undef"
17293 It seems that you must access character data in an aligned manner.
17295 d_u32align="$define"
17299 rp='Can you access character data at unaligned addresses?'
17303 [yY]*) d_u32align="$undef" ;;
17304 *) d_u32align="$define" ;;
17307 $rm -f core core.try.* try.core
17311 : see if ualarm exists
17312 set ualarm d_ualarm
17315 : see if umask exists
17319 : see if unordered exists
17320 set unordered d_unordered
17323 : see if usleep exists
17324 set usleep d_usleep
17327 : see if prototype for usleep is available
17329 set d_usleepproto usleep $i_unistd unistd.h
17332 : see if ustat exists
17336 : backward compatibility for d_hvfork
17337 if test X$d_hvfork != X; then
17338 d_vfork="$d_hvfork"
17341 : see if there is a vfork
17346 : Ok, but do we want to use it. vfork is reportedly unreliable in
17347 : perl on Solaris 2.x, and probably elsewhere.
17351 case "$usevfork" in
17357 Perl can only use a vfork() that doesn't suffer from strict
17358 restrictions on calling functions or modifying global data in
17359 the child. For example, glibc-2.1 contains such a vfork()
17360 that is unsuitable. If your system provides a proper fork()
17361 call, chances are that you do NOT want perl to use vfork().
17364 rp="Do you still want to use vfork()?"
17369 echo "Ok, we won't use vfork()."
17378 $define) usevfork='true';;
17379 *) usevfork='false';;
17382 : see if closedir exists
17383 set closedir d_closedir
17386 case "$d_closedir" in
17389 echo "Checking whether closedir() returns a status..." >&4
17391 #$i_dirent I_DIRENT /**/
17392 #$i_sysdir I_SYS_DIR /**/
17393 #$i_sysndir I_SYS_NDIR /**/
17394 #$i_systypes I_SYS_TYPES /**/
17396 #if defined(I_SYS_TYPES)
17397 #include <sys/types.h>
17399 #if defined(I_DIRENT)
17400 #include <dirent.h>
17401 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
17402 #include <sys/dir.h>
17406 #include <sys/ndir.h>
17410 #include <ndir.h> /* may be wrong in the future */
17412 #include <sys/dir.h>
17417 int main() { return closedir(opendir(".")); }
17420 if eval $compile_ok; then
17421 if $run ./try > /dev/null 2>&1 ; then
17422 echo "Yes, it does."
17425 echo "No, it doesn't."
17429 echo "(I can't seem to compile the test program--assuming it doesn't)"
17437 set d_void_closedir
17440 : see if there is a wait4
17444 : see if waitpid exists
17445 set waitpid d_waitpid
17448 : see if wcstombs exists
17449 set wcstombs d_wcstombs
17452 : see if wctomb exists
17453 set wctomb d_wctomb
17456 : see if writev exists
17457 set writev d_writev
17460 : preserve RCS keywords in files with variable substitution, grrr
17465 Revision='$Revision'
17467 : check for alignment requirements
17469 case "$usecrosscompile$multiarch" in
17472 You seem to be either cross-compiling or doing a multiarchitecture build,
17473 skipping the memory alignment check.
17476 case "$alignbytes" in
17477 '') alignbytes=8 ;;
17481 case "$alignbytes" in
17482 '') echo "Checking alignment constraints..." >&4
17483 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
17484 $cat >try.c <<'EOCP'
17485 typedef long double NV;
17488 $cat >try.c <<'EOCP'
17492 $cat >>try.c <<'EOCP'
17500 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
17505 if eval $compile_ok; then
17509 echo "(I can't seem to compile the test program...)"
17512 *) dflt="$alignbytes"
17515 rp="Doubles must be aligned on a how-many-byte boundary?"
17523 : set the base revision
17526 : how do we concatenate cpp tokens here?
17528 echo "Checking to see how your cpp does stuff like concatenate tokens..." >&4
17529 $cat >cpp_stuff.c <<'EOCP'
17530 #define RCAT(a,b)a/**/b
17531 #define ACAT(a,b)a ## b
17535 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
17536 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
17537 echo "Oh! Smells like ANSI's been here." >&4
17538 echo "We can catify or stringify, separately or together!"
17540 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
17541 echo "Ah, yes! The good old days!" >&4
17542 echo "However, in the good old days we don't know how to stringify and"
17543 echo "catify at the same time."
17547 Hmm, I don't seem to be able to concatenate tokens with your cpp.
17548 You're going to have to edit the values of CAT[2-5] in config.h...
17550 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
17554 : see if this is a db.h system
17560 : Check db version.
17562 echo "Checking Berkeley DB version ..." >&4
17568 #include <sys/types.h>
17570 #$i_stdlib I_STDLIB
17572 #include <stdlib.h>
17575 int main(int argc, char *argv[])
17577 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
17578 int Major, Minor, Patch ;
17579 unsigned long Version ;
17580 (void)db_version(&Major, &Minor, &Patch) ;
17582 printf("%d %d %d %d %d %d\n",
17583 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
17584 Major, Minor, Patch);
17587 printf("You have Berkeley DB Version 2 or greater.\n");
17589 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
17590 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
17591 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
17592 Major, Minor, Patch) ;
17594 /* check that db.h & libdb are compatible */
17595 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
17596 printf("db.h and libdb are incompatible.\n") ;
17600 printf("db.h and libdb are compatible.\n") ;
17602 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
17603 + DB_VERSION_PATCH ;
17605 /* needs to be >= 2.3.4 */
17606 if (Version < 2003004) {
17607 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
17608 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
17614 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
17619 printf("You have Berkeley DB Version 1.\n");
17620 exit(0); /* DB version < 2: the coast is clear. */
17622 exit(1); /* <db.h> not Berkeley DB? */
17628 if eval $compile_ok && $run ./try; then
17629 echo 'Looks OK.' >&4
17631 db_version_major=$1
17632 db_version_minor=$2
17633 db_version_patch=$3
17635 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
17639 : Remove db from list of libraries to use
17640 echo "Removing unusable -ldb from library list" >&4
17641 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
17644 echo "libs = $libs" >&4
17654 : Check the return type needed for hash
17656 echo "Checking return type needed for hash for Berkeley DB ..." >&4
17662 #include <sys/types.h>
17665 #ifndef DB_VERSION_MAJOR
17666 u_int32_t hash_cb (ptr, size)
17674 info.hash = hash_cb;
17678 if $cc $ccflags -c try.c >try.out 2>&1 ; then
17679 if $contains warning try.out >>/dev/null 2>&1 ; then
17682 db_hashtype='u_int32_t'
17685 : XXX Maybe we should just give up here.
17686 db_hashtype=u_int32_t
17688 echo "Help: I can't seem to compile the db test program." >&4
17689 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
17692 echo "Your version of Berkeley DB uses $db_hashtype for hash."
17694 *) db_hashtype=u_int32_t
17699 : Check the return type needed for prefix
17701 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
17707 #include <sys/types.h>
17710 #ifndef DB_VERSION_MAJOR
17711 size_t prefix_cb (key1, key2)
17719 info.prefix = prefix_cb;
17723 if $cc $ccflags -c try.c >try.out 2>&1 ; then
17724 if $contains warning try.out >>/dev/null 2>&1 ; then
17725 db_prefixtype='int'
17727 db_prefixtype='size_t'
17730 db_prefixtype='size_t'
17731 : XXX Maybe we should just give up here.
17733 echo "Help: I can't seem to compile the db test program." >&4
17734 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
17737 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
17739 *) db_prefixtype='size_t'
17744 : How can we generate normalized random numbers ?
17746 echo "Looking for a random number function..." >&4
17747 case "$randfunc" in
17749 if set drand48 val -f; eval $csym; $val; then
17751 echo "Good, found drand48()." >&4
17752 elif set random val -f; eval $csym; $val; then
17754 echo "OK, found random()." >&4
17757 echo "Yick, looks like I have to use rand()." >&4
17768 *-Dmy_rand=*|*-Dmy_srand=*)
17769 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
17770 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
17771 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
17772 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
17776 while $test "$cont"; do
17777 rp="Use which function to generate random numbers?"
17779 if $test "$ans" = "$dflt"; then
17785 if set $ans val -f; eval $csym; $val; then
17789 rp="I cannot find function $ans. Use that name anyway?"
17798 case "$randfunc" in
17800 drand01="drand48()"
17806 case "$randbits" in
17808 echo "Checking to see how many bits your $randfunc() function produces..." >&4
17810 #$i_unistd I_UNISTD
17811 #$i_stdlib I_STDLIB
17814 # include <unistd.h>
17817 # include <stdlib.h>
17822 register unsigned long tmp;
17823 register unsigned long max = 0L;
17825 for (i = 1000; i; i--) {
17826 tmp = (unsigned long) $randfunc();
17827 if (tmp > max) max = tmp;
17829 for (i = 0; max; i++)
17835 if eval $compile_ok; then
17839 echo "(I can't seem to compile the test program...)"
17846 rp="How many bits does your $randfunc() function produce?"
17850 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
17851 seedfunc="s$randfunc"
17852 randseedtype=unsigned
17856 rp="How many bits does your $randfunc() function produce?"
17859 seedfunc="s$randfunc"
17860 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
17861 if set $seedfunc val -f; eval $csym; $val; then
17862 echo "(Using $seedfunc() to seed random generator)"
17864 echo "(Warning: no $seedfunc() to seed random generator)"
17867 randseedtype=unsigned
17875 echo "Determining whether or not we are on an EBCDIC system..." >&4
17876 $cat >try.c <<'EOM'
17879 if ('M'==0xd4) return 0;
17886 if eval $compile_ok; then
17887 if $run ./try; then
17888 echo "You seem to speak EBCDIC." >&4
17891 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
17894 echo "I'm unable to compile the test program." >&4
17895 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
17903 Checking how to flush all pending stdio output...
17905 # I only know how to find the first 32 possibly open files on SunOS.
17906 # See also hints/sunos_4_1.sh and util.c --AD
17908 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
17910 $cat >>try.c <<EOCP
17912 #$i_stdlib I_STDLIB
17914 #include <stdlib.h>
17916 #$i_unistd I_UNISTD
17918 # include <unistd.h>
17920 #$d_sysconf HAS_SYSCONF
17921 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
17922 #ifdef HAS_STDIO_STREAM_ARRAY
17923 # define STDIO_STREAM_ARRAY $stdio_stream_array
17928 p = fopen("try.out", "w");
17932 # ifdef TRY_FPRINTF
17936 #ifdef TRY_FFLUSH_NULL
17939 #ifdef TRY_FFLUSH_ALL
17941 long open_max = -1;
17942 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
17943 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
17945 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
17946 open_max = sysconf(_SC_OPEN_MAX);
17949 open_max = FOPEN_MAX;
17952 open_max = OPEN_MAX;
17961 # ifdef HAS_STDIO_STREAM_ARRAY
17962 if (open_max > 0) {
17964 for (i = 0; i < open_max; i++)
17965 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
17966 STDIO_STREAM_ARRAY[i]._file < open_max &&
17967 STDIO_STREAM_ARRAY[i]._flag)
17968 fflush(&STDIO_STREAM_ARRAY[i]);
17976 : first we have to find out how _not_ to flush
17978 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
17980 set try -DTRY_FPUTC
17981 if eval $compile; then
17982 $run ./try 2>/dev/null
17985 if $test ! -s try.out -a "X$code" = X42; then
17991 set try -DTRY_FPRINTF
17992 if eval $compile; then
17993 $run ./try 2>/dev/null
17996 if $test ! -s try.out -a "X$code" = X42; then
17997 output=-DTRY_FPRINTF
18003 : check for fflush NULL behaviour
18004 case "$fflushNULL" in
18005 '') set try -DTRY_FFLUSH_NULL $output
18006 if eval $compile; then
18007 $run ./try 2>/dev/null
18010 if $test -s try.out -a "X$code" = X42; then
18011 fflushNULL="`$cat try.out`"
18013 if $test "X$code" != X42; then
18015 (If this test failed, don't worry, we'll try another method shortly.)
18020 $rm -f core try.core core.try.*
18021 case "$fflushNULL" in
18023 Your fflush(NULL) works okay for output streams.
18024 Let's see if it clobbers input pipes...
18026 # As of mid-March 2000 all versions of Solaris appear to have a stdio
18027 # bug that improperly flushes the input end of pipes. So we avoid the
18028 # autoflush on fork/system/exec support for now. :-(
18029 $cat >tryp.c <<EOCP
18032 main(int argc, char **argv)
18038 while ((i = getc(stdin)) != -1
18039 && (*bp++ = i) != '\n'
18040 && bp < &buf[1024])
18043 fprintf(stdout, "%s", buf);
18051 fflushNULL="$define"
18053 if eval $compile; then
18055 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
18056 if cmp tryp.c tryp.out >/dev/null 2>&1; then
18058 fflush(NULL) seems to behave okay with input streams.
18060 fflushNULL="$define"
18063 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
18065 fflushNULL="$undef"
18068 $rm -f core tryp.c tryp.core core.tryp.*
18071 Your fflush(NULL) isn't working (contrary to ANSI C).
18073 fflushNULL="$undef"
18076 Cannot figure out whether your fflush(NULL) works or not.
18077 I'm assuming it doesn't (contrary to ANSI C).
18079 fflushNULL="$undef"
18083 $define|true|[yY]*)
18084 fflushNULL="$define"
18087 fflushNULL="$undef"
18090 : check explicit looping only if NULL did not work, and if the pipe
18091 : bug does not show up on an explicit flush too
18092 case "$fflushNULL" in
18094 $cat >tryp.c <<EOCP
18097 main(int argc, char **argv)
18103 while ((i = getc(stdin)) != -1
18104 && (*bp++ = i) != '\n'
18105 && bp < &buf[1024])
18108 fprintf(stdout, "%s", buf);
18117 if eval $compile; then
18119 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
18120 if cmp tryp.c tryp.out >/dev/null 2>&1; then
18122 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
18124 : now check for fflushall behaviour
18125 case "$fflushall" in
18126 '') set try -DTRY_FFLUSH_ALL $output
18127 if eval $compile; then
18129 (Now testing the other method--but note that this also may fail.)
18131 $run ./try 2>/dev/null
18134 if $test -s try.out -a "X$code" = X42; then
18135 fflushall="`$cat try.out`"
18138 $rm -f core try.core core.try.*
18139 case "$fflushall" in
18141 Whew. Flushing explicitly all the stdio streams works.
18143 fflushall="$define"
18146 Sigh. Flushing explicitly all the stdio streams doesn't work.
18151 Cannot figure out whether flushing stdio streams explicitly works or not.
18152 I'm assuming it doesn't.
18158 "$define"|true|[yY]*)
18159 fflushall="$define"
18167 All is futile. Even fflush(stdin) clobbers input pipes!
18174 $rm -f core tryp.c tryp.core core.tryp.*
18176 *) fflushall="$undef"
18180 case "$fflushNULL$fflushall" in
18183 OK, I give up. I cannot figure out how to flush pending stdio output.
18184 We won't be flushing handles at all before fork/exec/popen.
18188 $rm -f try.* try$exe_ext
18190 : Store the full pathname to the ar program for use in the C program
18191 : Respect a hint or command line value for full_ar.
18196 : Store the full pathname to the sed program for use in the C program
18199 : see what type gids are declared as in the kernel
18201 echo "Looking for the type for group ids returned by getgid()."
18202 set gid_t gidtype xxx stdio.h sys/types.h
18206 xxx=`./findhdr sys/user.h`
18207 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
18209 unsigned) dflt="$1 $2" ;;
18213 *) dflt="$gidtype";;
18216 gid_t) echo "gid_t found." ;;
18217 *) rp="What is the type for group ids returned by getgid()?"
18225 *_t) zzz="$gidtype" ;;
18228 echo "Checking the size of $zzz..." >&4
18230 #include <sys/types.h>
18232 #$i_stdlib I_STDLIB
18234 #include <stdlib.h>
18237 printf("%d\n", (int)sizeof($gidtype));
18242 if eval $compile_ok; then
18246 echo "(I can't execute the test program--guessing $gidsize.)" >&4
18249 echo "Your $zzz is $gidsize bytes long."
18254 echo "(I can't compile the test program--guessing $gidsize.)" >&4
18260 *_t) zzz="$gidtype" ;;
18263 echo "Checking the sign of $zzz..." >&4
18265 #include <sys/types.h>
18276 if eval $compile; then
18280 echo "(I can't execute the test program--guessing unsigned.)" >&4
18284 1) echo "Your $zzz is unsigned." ;;
18285 -1) echo "Your $zzz is signed." ;;
18291 echo "(I can't compile the test program--guessing unsigned.)" >&4
18297 if $test X"$quadtype" != X; then
18299 echo "Checking how to print 64-bit integers..." >&4
18301 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
18302 $cat >try.c <<'EOCP'
18303 #include <sys/types.h>
18306 int q = 12345678901;
18307 printf("%ld\n", q);
18311 if eval $compile; then
18315 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
18316 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
18317 echo "We will use %d."
18323 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
18324 $cat >try.c <<'EOCP'
18325 #include <sys/types.h>
18328 long q = 12345678901;
18329 printf("%ld\n", q);
18333 if eval $compile; then
18337 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
18338 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
18339 echo "We will use %ld."
18345 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
18346 $cat >try.c <<'EOCP'
18347 #include <sys/types.h>
18348 #include <inttypes.h>
18351 int64_t q = 12345678901;
18352 printf("%" PRId64 "\n", q);
18356 if eval $compile; then
18360 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
18361 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
18362 echo "We will use the C9X style."
18368 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
18370 #include <sys/types.h>
18373 $quadtype q = 12345678901;
18374 printf("%Ld\n", q);
18378 if eval $compile; then
18382 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
18383 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
18384 echo "We will use %Ld."
18390 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
18391 $cat >try.c <<'EOCP'
18392 #include <sys/types.h>
18395 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
18396 printf("%lld\n", q);
18400 if eval $compile; then
18404 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
18405 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
18406 echo "We will use the %lld style."
18412 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
18414 #include <sys/types.h>
18417 $quadtype q = 12345678901;
18418 printf("%qd\n", q);
18422 if eval $compile; then
18426 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
18427 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
18428 echo "We will use %qd."
18434 if $test X"$sPRId64" = X; then
18435 echo "Cannot figure out how to print 64-bit integers." >&4
18443 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
18444 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
18446 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
18447 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
18453 $echo "Checking the format strings to be used for Perl's internal types..." >&4
18455 if $test X"$ivsize" = X8; then
18456 ivdformat="$sPRId64"
18457 uvuformat="$sPRIu64"
18458 uvoformat="$sPRIo64"
18459 uvxformat="$sPRIx64"
18460 uvXUformat="$sPRIXU64"
18462 if $test X"$ivsize" = X"$longsize"; then
18469 if $test X"$ivsize" = X"$intsize"; then
18477 if $test X"$ivsize" = X"$shortsize"; then
18488 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
18489 nveformat="$sPRIeldbl"
18490 nvfformat="$sPRIfldbl"
18491 nvgformat="$sPRIgldbl"
18492 nvEUformat="$sPRIEUldbl"
18493 nvFUformat="$sPRIFUldbl"
18494 nvGUformat="$sPRIGUldbl"
18504 case "$ivdformat" in
18505 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
18512 $echo "Checking the format string to be used for gids..." >&4
18515 -1) if $test X"$gidsize" = X"$ivsize"; then
18516 gidformat="$ivdformat"
18518 if $test X"$gidsize" = X"$longsize"; then
18521 if $test X"$gidsize" = X"$intsize"; then
18524 if $test X"$gidsize" = X"$shortsize"; then
18531 *) if $test X"$gidsize" = X"$uvsize"; then
18532 gidformat="$uvuformat"
18534 if $test X"$gidsize" = X"$longsize"; then
18537 if $test X"$gidsize" = X"$intsize"; then
18540 if $test X"$gidsize" = X"$shortsize"; then
18549 : see if getgroups exists
18550 set getgroups d_getgrps
18553 : see if setgroups exists
18554 set setgroups d_setgrps
18558 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
18560 case "$d_getgrps$d_setgrps" in
18562 case "$groupstype" in
18563 '') dflt="$gidtype" ;;
18564 *) dflt="$groupstype" ;;
18567 What type of pointer is the second argument to getgroups() and setgroups()?
18568 Usually this is the same as group ids, $gidtype, but not always.
18571 rp='What type pointer is the second argument to getgroups() and setgroups()?'
18575 *) groupstype="$gidtype";;
18579 echo "Checking if your $make program sets \$(MAKE)..." >&4
18580 case "$make_set_make" in
18582 $sed 's/^X //' > testmake.mak << 'EOF'
18584 X @echo 'maketemp="$(MAKE)"'
18586 case "`$make -f testmake.mak 2>/dev/null`" in
18587 *maketemp=*) make_set_make='#' ;;
18588 *) make_set_make="MAKE=$make" ;;
18590 $rm -f testmake.mak
18593 case "$make_set_make" in
18594 '#') echo "Yup, it does.";;
18595 *) echo "Nope, it doesn't.";;
18598 : see what type is used for mode_t
18599 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
18600 set mode_t modetype int stdio.h sys/types.h
18603 : see if stdarg is available
18605 if $test `./findhdr stdarg.h`; then
18606 echo "<stdarg.h> found." >&4
18609 echo "<stdarg.h> NOT found." >&4
18613 : see if varags is available
18615 if $test `./findhdr varargs.h`; then
18616 echo "<varargs.h> found." >&4
18618 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
18621 : set up the varargs testing programs
18622 $cat > varargs.c <<EOP
18624 #include <stdarg.h>
18627 #include <varargs.h>
18631 int f(char *p, ...)
18645 p = va_arg(ap, char *);
18650 $cat > varargs <<EOP
18652 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
18661 : now check which varargs header should be included
18666 if `./varargs I_STDARG`; then
18668 elif `./varargs I_VARARGS`; then
18673 if `./varargs I_VARARGS`; then
18680 echo "I could not find the definition for va_dcl... You have problems..." >&4
18681 val="$undef"; set i_stdarg; eval $setvar
18682 val="$undef"; set i_varargs; eval $setvar
18687 case "$i_varhdr" in
18689 val="$define"; set i_stdarg; eval $setvar
18690 val="$undef"; set i_varargs; eval $setvar
18693 val="$undef"; set i_stdarg; eval $setvar
18694 val="$define"; set i_varargs; eval $setvar
18697 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
18701 : see if we need va_copy
18703 case "$i_stdarg" in
18706 #include <stdarg.h>
18708 #$i_stdlib I_STDLIB
18710 #include <stdlib.h>
18712 #include <signal.h>
18715 ivfprintf(FILE *f, const char *fmt, va_list *valp)
18717 return vfprintf(f, fmt, *valp);
18721 myvfprintf(FILE *f, const char *fmt, va_list val)
18723 return ivfprintf(f, fmt, &val);
18727 myprintf(char *fmt, ...)
18730 va_start(val, fmt);
18731 return myvfprintf(stdout, fmt, val);
18735 main(int ac, char **av)
18737 signal(SIGSEGV, exit);
18739 myprintf("%s%cs all right, then\n", "that", '\'');
18744 if eval $compile && $run ./try 2>&1 >/dev/null; then
18745 case "`$run ./try`" in
18746 "that's all right, then")
18752 yes) echo "It seems that you don't need va_copy()." >&4
18753 need_va_copy="$undef"
18755 *) echo "It seems that va_copy() or similar will be needed." >&4
18756 need_va_copy="$define"
18759 $rm -f try.* core core.* *.core *.core.*
18761 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
18765 : see what type is used for size_t
18766 rp="What is the type used for the length parameter for string functions?"
18767 set size_t sizetype 'unsigned int' stdio.h sys/types.h
18770 : check for type of arguments to gethostbyaddr.
18771 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
18772 case "$d_gethbyaddr" in
18776 Checking to see what type of arguments are accepted by gethostbyaddr().
18778 hdrs="$define sys/types.h
18779 $d_socket sys/socket.h
18780 $i_niin netinet/in.h
18782 $i_unistd unistd.h"
18783 : The first arg can 'char *' or 'void *'
18784 : The second arg is some of integral type
18785 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
18786 for yyy in size_t long int; do
18787 case "$netdb_host_type" in
18788 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
18789 if ./protochk "$try" $hdrs; then
18790 echo "Your system accepts $xxx for the first arg."
18791 echo "...and $yyy for the second arg."
18792 netdb_host_type="$xxx"
18793 netdb_hlen_type="$yyy"
18799 : In case none of those worked, prompt the user.
18800 case "$netdb_host_type" in
18801 '') rp='What is the type for the 1st argument to gethostbyaddr?'
18804 netdb_host_type=$ans
18805 rp='What is the type for the 2nd argument to gethostbyaddr?'
18808 netdb_hlen_type=$ans
18812 *) : no gethostbyaddr, so pick harmless defaults
18813 netdb_host_type='char *'
18814 netdb_hlen_type="$sizetype"
18817 # Remove the "const" if needed. -- but then we'll have a
18819 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
18822 : check for type of argument to gethostbyname.
18823 if test "X$netdb_name_type" = X ; then
18824 case "$d_gethbyname" in
18828 Checking to see what type of argument is accepted by gethostbyname().
18830 hdrs="$define sys/types.h
18831 $d_socket sys/socket.h
18832 $i_niin netinet/in.h
18834 $i_unistd unistd.h"
18835 for xxx in "const char *" "char *"; do
18836 case "$netdb_name_type" in
18837 '') try="extern struct hostent *gethostbyname($xxx);"
18838 if ./protochk "$try" $hdrs; then
18839 echo "Your system accepts $xxx."
18840 netdb_name_type="$xxx"
18845 : In case none of those worked, prompt the user.
18846 case "$netdb_name_type" in
18847 '') rp='What is the type for the 1st argument to gethostbyname?'
18850 netdb_name_type=$ans
18854 *) : no gethostbyname, so pick harmless default
18855 netdb_name_type='char *'
18860 : check for type of 1st argument to getnetbyaddr.
18861 if test "X$netdb_net_type" = X ; then
18862 case "$d_getnbyaddr" in
18866 Checking to see what type of 1st argument is accepted by getnetbyaddr().
18868 hdrs="$define sys/types.h
18869 $d_socket sys/socket.h
18870 $i_niin netinet/in.h
18872 $i_unistd unistd.h"
18873 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
18874 case "$netdb_net_type" in
18875 '') try="extern struct netent *getnetbyaddr($xxx, int);"
18876 if ./protochk "$try" $hdrs; then
18877 echo "Your system accepts $xxx."
18878 netdb_net_type="$xxx"
18883 : In case none of those worked, prompt the user.
18884 case "$netdb_net_type" in
18885 '') rp='What is the type for the 1st argument to getnetbyaddr?'
18888 netdb_net_type=$ans
18892 *) : no getnetbyaddr, so pick harmless default
18893 netdb_net_type='long'
18897 : locate the preferred pager for this system
18904 [a-zA-Z]:/*) dflt=$pg;;
18908 [a-zA-Z]:/*) dflt=$more;;
18912 [a-zA-Z]:/*) dflt=$less;;
18915 '') dflt=/usr/ucb/more;;
18919 : Instruct ./getfile to trust the hinted or previous pager value,
18920 : even if it does not begin with a slash. For example, on os2,
18921 : pager might be cmd /c more. See comments in UU/getfile.
18926 rp='What pager is used on your system?'
18930 : see what type pids are declared as in the kernel
18931 rp="What is the type of process ids on this system?"
18932 set pid_t pidtype int stdio.h sys/types.h
18935 : see if ar generates random libraries by itself
18937 echo "Checking how to generate random libraries on your machine..." >&4
18938 echo 'int bar1() { return bar2(); }' > bar1.c
18939 echo 'int bar2() { return 2; }' > bar2.c
18941 #$i_stdlib I_STDLIB
18943 #include <stdlib.h>
18945 int main() { printf("%d\n", bar1()); exit(0); }
18947 $cc $ccflags -c bar1.c >/dev/null 2>&1
18948 $cc $ccflags -c bar2.c >/dev/null 2>&1
18949 $cc $ccflags -c foo.c >/dev/null 2>&1
18950 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
18951 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18952 $run ./foobar >/dev/null 2>&1; then
18953 echo "$ar appears to generate random libraries itself."
18956 elif $ar ts bar$_a >/dev/null 2>&1 &&
18957 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
18958 $run ./foobar >/dev/null 2>&1; then
18959 echo "a table of contents needs to be added with '$ar ts'."
18966 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
18967 $test -f $ranlib || ranlib=''
18970 if $test -n "$ranlib"; then
18971 echo "your system has '$ranlib'; we'll use that."
18974 echo "your system doesn't seem to support random libraries"
18975 echo "so we'll use lorder and tsort to order the libraries."
18982 : check for type of arguments to select.
18983 case "$selecttype" in
18984 '') case "$d_select" in
18988 Checking to see what type of arguments are accepted by select().
18990 hdrs="$define sys/types.h
18991 $i_systime sys/time.h
18992 $i_sysselct sys/select.h
18993 $d_socket sys/socket.h"
18994 : The first arg can be int, unsigned, or size_t
18995 : The last arg may or may not be 'const'
18997 : void pointer has been seen but using that
18998 : breaks the selectminbits test
18999 for xxx in 'fd_set *' 'int *'; do
19000 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
19001 for tmo in 'struct timeval *' 'const struct timeval *'; do
19003 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
19004 if ./protochk "$try" $hdrs; then
19005 echo "Your system accepts $xxx."
19014 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
19015 case "$d_fd_set" in
19016 $define) dflt="fd_set *" ;;
19025 *) : no select, so pick a harmless default
19032 : check for the select 'width'
19033 case "$selectminbits" in
19034 '') safebits=`expr $ptrsize \* 8`
19035 case "$d_select" in
19039 Checking to see on how many bits at a time your select() operates...
19042 #include <sys/types.h>
19044 #$i_systime I_SYS_TIME
19045 #$i_systimek I_SYS_TIME_KERNEL
19050 # ifdef I_SYS_TIME_KERNEL
19053 # include <sys/time.h>
19054 # ifdef I_SYS_TIME_KERNEL
19058 #$i_sysselct I_SYS_SELECT
19059 #ifdef I_SYS_SELECT
19060 #include <sys/select.h>
19062 #$d_socket HAS_SOCKET
19064 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
19067 #$i_stdlib I_STDLIB
19069 #include <stdlib.h>
19072 #define S sizeof(*(b))
19074 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
19075 #define NBITS (NBYTES * 8)
19077 char *s = malloc(NBYTES);
19086 fp = fopen("try.c", "r");
19092 b = ($selecttype)s;
19093 for (i = 0; i < NBITS; i++)
19097 select(fd + 1, b, 0, 0, &t);
19098 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
19100 printf("%d\n", i + 1);
19105 if eval $compile_ok; then
19106 selectminbits=`$run ./try`
19107 case "$selectminbits" in
19109 Cannot figure out on how many bits at a time your select() operates.
19110 I'll play safe and guess it is $safebits bits.
19112 selectminbits=$safebits
19113 bits="$safebits bits"
19116 *) bits="$selectminbits bits" ;;
19118 echo "Your select() operates on $bits at a time." >&4
19120 rp='What is the minimum number of bits your select() operates on?'
19121 case "$byteorder" in
19122 12345678) dflt=64 ;;
19128 selectminbits="$val"
19132 *) : no select, so pick a harmless default
19133 selectminbits=$safebits
19139 : Trace out the files included by signal.h, then look for SIGxxx names.
19140 : Remove SIGARRAYSIZE used by HPUX.
19141 : Remove SIGSTKSIZE used by Linux.
19142 : Remove SIGSTKSZ used by Posix.
19143 : Remove SIGTYP void lines used by OS2.
19144 : Some cpps, like os390, dont give the file name anywhere
19145 if [ "X$fieldn" = X ]; then
19146 : Just make some guesses. We check them later.
19147 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
19149 xxx=`echo '#include <signal.h>' |
19150 $cppstdin $cppminus $cppflags 2>/dev/null |
19151 $grep '^[ ]*#.*include' |
19152 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
19154 : Check this list of files to be sure we have parsed the cpp output ok.
19155 : This will also avoid potentially non-existent files, such
19158 for xx in $xxx /dev/null ; do
19159 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
19161 : If we have found no files, at least try signal.h
19162 case "$xxxfiles" in
19163 '') xxxfiles=`./findhdr signal.h` ;;
19166 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
19167 print substr($2, 4, 20)
19169 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
19170 print substr($3, 4, 20)
19172 : Append some common names just in case the awk scan failed.
19173 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
19174 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
19175 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
19176 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
19177 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
19179 : generate a few handy files for later
19180 $cat > signal.c <<EOCP
19181 #include <sys/types.h>
19182 #include <signal.h>
19183 #$i_stdlib I_STDLIB
19185 #include <stdlib.h>
19190 /* Strange style to avoid deeply-nested #if/#else/#endif */
19193 # define NSIG (_NSIG)
19199 # define NSIG (SIGMAX+1)
19205 # define NSIG (SIG_MAX+1)
19211 # define NSIG (MAXSIG+1)
19217 # define NSIG (MAX_SIG+1)
19222 # ifdef SIGARRAYSIZE
19223 # define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
19229 # define NSIG (_sys_nsig) /* Solaris 2.5 */
19233 /* Default to some arbitrary number that's big enough to get most
19234 of the common signals.
19240 printf("NSIG %d\n", NSIG);
19246 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
19248 printf "#ifdef SIG"; printf $1; printf "\n"
19249 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
19250 printf $1; printf ");\n"
19254 printf "#endif /* JUST_NSIG */\n";
19255 printf "exit(0);\n}\n";
19258 $cat >signal.awk <<'EOP'
19259 BEGIN { ndups = 0 }
19260 $1 ~ /^NSIG$/ { nsig = $2 }
19261 ($1 !~ /^NSIG$/) && (NF == 2) && ($2 ~ /^[0-9][0-9]*$/) {
19262 if ($2 > maxsig) { maxsig = $2 }
19263 if (sig_name[$2]) {
19264 dup_name[ndups] = $1
19265 dup_num[ndups] = $2
19277 printf("NSIG %d\n", nsig);
19278 for (n = 1; n < nsig; n++) {
19280 printf("%s %d\n", sig_name[n], sig_num[n])
19283 printf("NUM%d %d\n", n, n)
19286 for (n = 0; n < ndups; n++) {
19287 printf("%s %d\n", dup_name[n], dup_num[n])
19291 $cat >signal_cmd <<EOS
19293 if $test -s signal.lst; then
19294 echo "Using your existing signal.lst file"
19299 $cat >>signal_cmd <<'EOS'
19302 if eval $compile_ok; then
19303 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst
19305 echo "(I can't seem be able to compile the whole test program)" >&4
19306 echo "(I'll try it in little pieces.)" >&4
19307 set signal -DJUST_NSIG
19308 if eval $compile_ok; then
19309 $run ./signal$_exe > signal.nsg
19312 echo "I can't seem to figure out how many signals you have." >&4
19313 echo "Guessing 50." >&4
19314 echo 'NSIG 50' > signal.nsg
19316 : Now look at all the signal names, one at a time.
19317 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
19318 $cat > signal.c <<EOCP
19319 #include <sys/types.h>
19320 #include <signal.h>
19323 printf("$xx %d\n", SIG${xx});
19328 if eval $compile; then
19329 echo "SIG${xx} found."
19330 $run ./signal$_exe >> signal.ls1
19332 echo "SIG${xx} NOT found."
19335 if $test -s signal.ls1; then
19336 $cat signal.nsg signal.ls1 |
19337 $sort -n | $uniq | $awk -f signal.awk >signal.lst
19341 if $test -s signal.lst; then
19344 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
19345 echo 'kill -l' >signal
19346 set X `csh -f <signal`
19350 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
19352 echo $@ | $tr ' ' $trnl | \
19353 $awk '{ printf "%s %d\n", $1, ++s; }
19354 END { printf "NSIG %d\n", ++s }' >signal.lst
19356 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
19358 chmod a+x signal_cmd
19359 $eunicefix signal_cmd
19361 : generate list of signal names
19363 case "$sig_name_init" in
19365 *) case "$sig_num_init" in
19366 ''|*,*) doinit=yes ;;
19371 echo "Generating a list of signal names and numbers..." >&4
19373 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
19374 sig_name=`$awk 'BEGIN { printf "ZERO " }
19375 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
19376 sig_num=`$awk 'BEGIN { printf "0 " }
19377 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
19378 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
19379 !/^NSIG/ { printf "\"%s\", ", $1 }
19380 END { printf "0\n" }' signal.lst`
19381 sig_num_init=`$awk 'BEGIN { printf "0, " }
19382 !/^NSIG/ { printf "%d, ", $2}
19383 END { printf "0\n"}' signal.lst`
19386 echo "The following $sig_count signals are available:"
19388 echo $sig_name | $awk \
19389 'BEGIN { linelen = 0 }
19391 for (i = 1; i <= NF; i++) {
19392 name = "SIG" $i " "
19393 linelen = linelen + length(name)
19394 if (linelen > 70) {
19396 linelen = length(name)
19402 sig_size=`echo $sig_name | awk '{print NF}'`
19403 $rm -f signal signal.c signal.awk signal.lst signal_cmd
19406 case "$sizetype" in
19407 *_t) zzz="$sizetype" ;;
19408 *) zzz="filesize" ;;
19410 echo "Checking the size of $zzz..." >&4
19412 #include <sys/types.h>
19414 #$i_stdlib I_STDLIB
19416 #include <stdlib.h>
19419 printf("%d\n", (int)sizeof($sizetype));
19424 if eval $compile_ok; then
19428 echo "(I can't execute the test program--guessing $sizesize.)" >&4
19431 echo "Your $zzz size is $sizesize bytes."
19436 echo "(I can't compile the test program--guessing $sizesize.)" >&4
19440 : check for socklen_t
19442 echo "Checking to see if you have socklen_t..." >&4
19444 #include <sys/types.h>
19445 #$d_socket HAS_SOCKET
19447 #include <sys/socket.h>
19449 int main() { socklen_t x = 16; }
19452 if eval $compile; then
19454 echo "You have socklen_t."
19457 echo "You do not have socklen_t."
19458 case "$sizetype" in
19459 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
19466 : see if this is a socks.h system
19467 set socks.h i_socks
19470 : check for type of the size argument to socket calls
19471 case "$d_socket" in
19475 Checking to see what type is the last argument of accept().
19478 case "$d_socklen_t" in
19479 "$define") yyy="$yyy socklen_t"
19481 yyy="$yyy $sizetype int long unsigned"
19482 for xxx in $yyy; do
19483 case "$socksizetype" in
19484 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
19485 case "$usesocks" in
19487 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
19488 echo "Your system accepts '$xxx *' for the last argument of accept()."
19489 socksizetype="$xxx"
19492 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
19493 echo "Your system accepts '$xxx *' for the last argument of accept()."
19494 socksizetype="$xxx"
19501 : In case none of those worked, prompt the user.
19502 case "$socksizetype" in
19503 '') rp='What is the type for socket address structure sizes?'
19510 *) : no sockets, so pick relatively harmless default
19515 : see what type is used for signed size_t
19516 set ssize_t ssizetype int stdio.h sys/types.h
19521 #$i_stdlib I_STDLIB
19523 #include <stdlib.h>
19525 #include <sys/types.h>
19526 #define Size_t $sizetype
19527 #define SSize_t $dflt
19530 if (sizeof(Size_t) == sizeof(SSize_t))
19532 else if (sizeof(Size_t) == sizeof(int))
19541 if eval $compile_ok && $run ./try > /dev/null; then
19542 ssizetype=`$run ./try`
19543 echo "I'll be using $ssizetype for functions returning a byte count." >&4
19546 Help! I can't compile and run the ssize_t test program: please enlighten me!
19547 (This is probably a misconfiguration in your system or libraries, and
19548 you really ought to fix it. Still, I'll try anyway.)
19550 I need a type that is the same size as $sizetype, but is guaranteed to
19551 be signed. Common values are ssize_t, int and long.
19554 rp="What signed type is the same size as $sizetype?"
19560 : see what type of char stdio uses.
19562 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
19563 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
19564 echo "Your stdio uses unsigned chars." >&4
19565 stdchar="unsigned char"
19567 echo "Your stdio uses signed chars." >&4
19574 : see what type uids are declared as in the kernel
19576 echo "Looking for the type for user ids returned by getuid()."
19577 set uid_t uidtype xxx stdio.h sys/types.h
19581 xxx=`./findhdr sys/user.h`
19582 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
19584 unsigned) dflt="$1 $2" ;;
19588 *) dflt="$uidtype";;
19591 uid_t) echo "uid_t found." ;;
19592 *) rp="What is the type for user ids returned by getuid()?"
19600 *_t) zzz="$uidtype" ;;
19603 echo "Checking the size of $zzz..." >&4
19605 #include <sys/types.h>
19607 #$i_stdlib I_STDLIB
19609 #include <stdlib.h>
19612 printf("%d\n", (int)sizeof($uidtype));
19617 if eval $compile_ok; then
19621 echo "(I can't execute the test program--guessing $uidsize.)" >&4
19624 echo "Your $zzz is $uidsize bytes long."
19629 echo "(I can't compile the test program--guessing $uidsize.)" >&4
19634 *_t) zzz="$uidtype" ;;
19637 echo "Checking the sign of $zzz..." >&4
19639 #include <sys/types.h>
19650 if eval $compile; then
19654 echo "(I can't execute the test program--guessing unsigned.)" >&4
19658 1) echo "Your $zzz is unsigned." ;;
19659 -1) echo "Your $zzz is signed." ;;
19665 echo "(I can't compile the test program--guessing unsigned.)" >&4
19671 $echo "Checking the format string to be used for uids..." >&4
19674 -1) if $test X"$uidsize" = X"$ivsize"; then
19675 uidformat="$ivdformat"
19677 if $test X"$uidsize" = X"$longsize"; then
19680 if $test X"$uidsize" = X"$intsize"; then
19683 if $test X"$uidsize" = X"$shortsize"; then
19690 *) if $test X"$uidsize" = X"$uvsize"; then
19691 uidformat="$uvuformat"
19693 if $test X"$uidsize" = X"$longsize"; then
19696 if $test X"$uidsize" = X"$intsize"; then
19699 if $test X"$uidsize" = X"$shortsize"; then
19709 case "$usesitecustomize" in
19710 $define|true|[Yy]*)
19711 usesitecustomize="$define"
19714 usesitecustomize="$undef"
19718 : determine compiler compiler
19727 if $test -f "$byacc$_exe"; then
19729 comp="byacc or $comp"
19731 if $test -f "$bison$_exe"; then
19732 comp="$comp or bison -y"
19734 rp="Which compiler compiler ($comp) shall I use?"
19743 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
19749 : see if this is a fp.h system
19753 : see if this is a fp_class.h system
19754 set fp_class.h i_fp_class
19757 : see if this is a ieeefp.h system
19758 case "$i_ieeefp" in
19759 '' ) set ieeefp.h i_ieeefp
19764 : see if this is a libutil.h system
19765 set libutil.h i_libutil
19768 : see if mach cthreads are available
19769 if test "X$usethreads" = "X$define"; then
19770 set mach/cthreads.h i_machcthr
19773 i_machcthr="$undef"
19778 : see if this is a mntent.h system
19779 set mntent.h i_mntent
19782 : see if ndbm.h is available
19788 # Some Linux distributions such as RedHat 7.1 put the
19789 # ndbm.h header in /usr/include/gdbm/ndbm.h.
19790 if $test -f /usr/include/gdbm/ndbm.h; then
19791 echo '<gdbm/ndbm.h> found.'
19792 ccflags="$ccflags -I/usr/include/gdbm"
19793 cppflags="$cppflags -I/usr/include/gdbm"
19801 : see if dbm_open exists
19802 set dbm_open d_dbm_open
19804 case "$d_dbm_open" in
19807 echo "We won't be including <ndbm.h>"
19816 : see if net/errno.h is available
19818 set net/errno.h val
19821 : Unfortunately, it causes problems on some systems. Arrgh.
19824 cat > try.c <<'EOM'
19827 #include <net/errno.h>
19833 if $cc $ccflags -c try.c >/dev/null 2>&1; then
19834 echo "We'll be including <net/errno.h>." >&4
19836 echo "We won't be including <net/errno.h>." >&4
19845 : see if netinet/tcp.h is available
19846 set netinet/tcp.h i_netinettcp
19849 : see if this is a poll.h system
19853 : see if this is a prot.h system
19858 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
19859 $cat <<'EOSH' > Cppsym.know
19860 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
19861 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
19862 alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX
19863 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
19864 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
19865 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
19866 bull c cadmus clipper CMU COFF COMPILER_VERSION
19867 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
19868 CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
19869 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
19870 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
19872 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
19873 H3050R H3050RX hbullx20 hcx host_mips
19874 hp200 hp300 hp700 HP700 hp800 hp9000
19875 hp9000s200 hp9000s300 hp9000s400 hp9000s500
19876 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
19877 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
19878 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
19879 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
19880 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
19881 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
19882 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
19883 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
19884 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
19885 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
19886 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
19887 MATH_HAS_NO_SIDE_EFFECTS
19888 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
19889 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
19890 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
19891 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
19892 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
19893 NetBSD news1500 news1700 news1800 news1900 news3700
19894 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
19895 ns32016 ns32332 ns32k nsc32000
19896 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
19897 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
19898 pc532 pdp11 PGC PIC plexus PORTAR posix
19899 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
19900 POSIX_C_SOURCE POSIX_SOURCE POWER
19901 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
19902 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
19903 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
19904 sony sony_news sonyrisc sparc sparclite spectrum
19905 stardent stdc STDC_EXT stratos sun sun3 sun386
19906 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
19907 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
19908 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
19909 sysV68 sysV88 Tek4132 Tek4300 titan
19910 TM3200 TM5400 TM5600
19911 tower tower32 tower32_200 tower32_600 tower32_700
19912 tower32_800 tower32_850 tss
19913 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
19914 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
19915 unix UNIX95 UNIX99 unixpc unos
19916 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
19917 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
19918 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
19920 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
19921 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
19922 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
19925 # Maybe put other stuff here too.
19926 cat <<EOSH >>Cppsym.know
19929 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
19930 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
19931 $cat Cppsym.know > Cppsym.c
19932 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
19933 $rm -f Cppsym.a Cppsym.b Cppsym.c
19934 cat <<EOSH > Cppsym
19936 if $test \$# -gt 0; then
19937 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
19938 if $test -s Cppsym.got; then
19945 $tr " " "$trnl" | ./Cppsym.try
19951 cat <<EOSH > Cppsym.try
19953 cat <<'EOCP' > try.c
19959 cat <<'EOSH' >> Cppsym.try
19961 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
19962 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
19963 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
19964 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
19966 echo 'return 0;}' >> try.c
19968 cat <<EOSH >> Cppsym.try
19970 case "$osname-$gccversion" in
19971 irix-) ccflags="\$ccflags -woff 1178" ;;
19972 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
19974 $cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try
19976 chmod +x Cppsym.try
19977 $eunicefix Cppsym.try
19978 ./Cppsym < Cppsym.know > Cppsym.true
19979 : now check the C compiler for additional symbols
19980 postprocess_cc_v=''
19982 aix) postprocess_cc_v="|$tr , ' '" ;;
19989 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
19992 -D*) echo "\$i" | $sed 's/^-D//';;
19993 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
19998 postprocess_cc_v=''
20001 ./ccsym > ccsym1.raw
20002 if $test -s ccsym1.raw; then
20003 $sort ccsym1.raw | $uniq >ccsym.raw
20005 mv ccsym1.raw ccsym.raw
20008 $awk '/\=/ { print $0; next }
20009 { print $0"=1" }' ccsym.raw >ccsym.list
20010 $awk '/\=/ { print $0; next }
20011 { print $0"=1" }' Cppsym.true >ccsym.true
20012 $comm -13 ccsym.true ccsym.list >ccsym.own
20013 $comm -12 ccsym.true ccsym.list >ccsym.com
20014 $comm -23 ccsym.true ccsym.list >ccsym.cpp
20016 if $test -z ccsym.raw; then
20017 echo "Your C compiler doesn't seem to define any symbols!" >&4
20019 echo "However, your C preprocessor defines the following symbols:"
20022 cppsymbols=`$cat Cppsym.true`
20023 cppsymbols=`echo $cppsymbols`
20024 cppccsymbols="$cppsymbols"
20026 if $test -s ccsym.com; then
20027 echo "Your C compiler and pre-processor define these symbols:"
20028 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
20031 cppccsymbols=`$cat ccsym.com`
20032 cppccsymbols=`echo $cppccsymbols`
20033 $test "$silent" || sleep 1
20035 if $test -s ccsym.cpp; then
20036 $test "$also" && echo " "
20037 echo "Your C pre-processor ${also}defines the following symbols:"
20038 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
20040 cppsymbols=`$cat ccsym.cpp`
20041 cppsymbols=`echo $cppsymbols`
20042 $test "$silent" || sleep 1
20044 if $test -s ccsym.own; then
20045 $test "$also" && echo " "
20046 echo "Your C compiler ${also}defines the following cpp symbols:"
20047 $sed -e 's/\(..*\)=1/\1/' ccsym.own
20048 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
20049 ccsymbols=`$cat ccsym.own`
20050 ccsymbols=`echo $ccsymbols`
20051 $test "$silent" || sleep 1
20055 : see if this is a termio system
20059 if $test `./findhdr termios.h`; then
20060 set tcsetattr i_termios
20066 "$define") echo "You have POSIX termios.h... good!" >&4;;
20067 *) if ./Cppsym pyr; then
20068 case "`/bin/universe`" in
20069 ucb) if $test `./findhdr sgtty.h`; then
20071 echo "<sgtty.h> found." >&4
20073 echo "System is pyramid with BSD universe."
20074 echo "<sgtty.h> not found--you could have problems." >&4
20076 *) if $test `./findhdr termio.h`; then
20078 echo "<termio.h> found." >&4
20080 echo "System is pyramid with USG universe."
20081 echo "<termio.h> not found--you could have problems." >&4
20085 if $test `./findhdr termio.h`; then
20086 echo "<termio.h> found." >&4
20088 elif $test `./findhdr sgtty.h`; then
20089 echo "<sgtty.h> found." >&4
20092 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
20095 if $test `./findhdr sgtty.h`; then
20096 echo "<sgtty.h> found." >&4
20098 elif $test `./findhdr termio.h`; then
20099 echo "<termio.h> found." >&4
20102 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
20106 set i_termio; eval $setvar
20107 val=$val2; set i_sgtty; eval $setvar
20108 val=$val3; set i_termios; eval $setvar
20110 : see if stddef is available
20111 set stddef.h i_stddef
20114 : see if this is a sunmath.h system
20115 set sunmath.h i_sunmath
20118 : see if sys/access.h is available
20119 set sys/access.h i_sysaccess
20122 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
20123 set sys/filio.h i_sysfilio
20126 if $test `./findhdr sys/ioctl.h`; then
20128 echo '<sys/ioctl.h> found.' >&4
20131 if $test $i_sysfilio = "$define"; then
20132 echo '<sys/ioctl.h> NOT found.' >&4
20134 $test $i_sgtty = "$define" && xxx="sgtty.h"
20135 $test $i_termio = "$define" && xxx="termio.h"
20136 $test $i_termios = "$define" && xxx="termios.h"
20137 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
20143 : see if socket ioctl defs are in sys/sockio.h
20145 xxx=`./findhdr sys/sockio.h`
20146 if $test "$xxx"; then
20147 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
20149 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
20152 echo "No socket ioctls found in <sys/sockio.h>." >&4
20157 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
20164 : see if this is a syslog.h system
20165 set syslog.h i_syslog
20169 : see if this is a sys/mode.h system
20170 set sys/mode.h i_sysmode
20173 : see if sys/resource.h has to be included
20174 set sys/resource.h i_sysresrc
20177 : see if sys/security.h is available
20178 set sys/security.h i_syssecrt
20181 : see if this is a sys/statvfs.h system
20182 set sys/statvfs.h i_sysstatvfs
20185 : see if this is a sys/un.h system
20186 set sys/un.h i_sysun
20190 : see if this is a sys/utsname.h system
20191 set sys/utsname.h i_sysutsname
20194 : see if this is a syswait system
20195 set sys/wait.h i_syswait
20198 : see if this is a ustat.h system
20199 set ustat.h i_ustat
20202 : see if this is an utime system
20203 set utime.h i_utime
20206 : see if this is a values.h system
20207 set values.h i_values
20210 : see if this is a vfork system
20213 set vfork.h i_vfork
20221 : see if gdbm.h is available
20226 : see if gdbm_open exists
20227 set gdbm_open d_gdbm_open
20229 case "$d_gdbm_open" in
20232 echo "We won't be including <gdbm.h>"
20242 echo "Looking for extensions..." >&4
20243 : If we are using the old config.sh, known_extensions may contain
20244 : old or inaccurate or duplicate values.
20245 known_extensions=''
20246 nonxs_extensions=''
20247 : We do not use find because it might not be available.
20248 : We do not just use MANIFEST because the user may have dropped
20249 : some additional extensions into the source tree and expect them
20252 : Function to recursively find available extensions, ignoring DynaLoader
20253 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
20257 DynaLoader|dynaload) ;;
20259 if $test -f $xxx/$xxx.xs; then
20260 known_extensions="$known_extensions $1$xxx";
20261 elif $test -f $xxx/Makefile.PL; then
20262 nonxs_extensions="$nonxs_extensions $1$xxx";
20264 if $test -d $xxx -a $# -lt 10; then
20267 eval $find_extensions;
20279 eval $find_extensions
20280 # Special case: Add in threads/shared since it is not picked up by the
20281 # recursive find above (and adding in general recursive finding breaks
20282 # SDBM_File/sdbm). A.D. 10/25/2001.
20283 known_extensions="$known_extensions threads/shared"
20284 set X $nonxs_extensions
20286 nonxs_extensions="$*"
20287 set X $known_extensions
20289 known_extensions="$*"
20292 : Now see which are supported on this system.
20294 for xxx in $known_extensions ; do
20298 $define) avail_ext="$avail_ext $xxx" ;;
20301 GDBM_File|gdbm_fil)
20303 $define) avail_ext="$avail_ext $xxx" ;;
20306 I18N/Langinfo|i18n_lan)
20307 case "$i_langinfo$d_nl_langinfo" in
20308 $define$define) avail_ext="$avail_ext $xxx" ;;
20311 NDBM_File|ndbm_fil)
20314 case "$osname-$use64bitint" in
20317 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
20320 *) avail_ext="$avail_ext $xxx" ;;
20325 ODBM_File|odbm_fil)
20326 case "${i_dbm}${i_rpcsvcdbm}" in
20328 case "$osname-$use64bitint" in
20331 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
20334 *) avail_ext="$avail_ext $xxx" ;;
20340 case "$useposix" in
20341 true|define|y) avail_ext="$avail_ext $xxx" ;;
20345 case "$useopcode" in
20346 true|define|y) avail_ext="$avail_ext $xxx" ;;
20350 case "$d_socket" in
20353 beos) ;; # not unless BONE
20354 *) avail_ext="$avail_ext $xxx" ;;
20359 Sys/Syslog|sys/syslog)
20360 : XXX syslog requires socket
20361 case "$d_socket" in
20362 true|$define|y) avail_ext="$avail_ext $xxx" ;;
20366 case "$usethreads" in
20368 case "$useithreads" in
20369 $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
20373 XS/APItest|xs/apitest)
20374 # This is just for testing. Skip it unless we have dynamic loading.
20377 $define) avail_ext="$avail_ext $xxx" ;;
20380 XS/Typemap|xs/typemap)
20381 # This is just for testing. Skip it unless we have dynamic loading.
20383 $define) avail_ext="$avail_ext $xxx" ;;
20386 threads|threads/shared)
20387 # threads and threads::shared are special cases.
20388 # To stop people from asking "Perl 5.8.0 was supposed
20389 # to have this new fancy threads implementation but my
20390 # perl doesn't have it" and from people trying to
20391 # (re)install the threads module using CPAN.pm and
20392 # CPAN.pm then offering to reinstall Perl 5.8.0,
20393 # the threads.pm and threads/shared.pm will always be
20394 # there, croaking informatively ("you need to rebuild
20395 # all of Perl with threads, sorry") when threads haven't
20396 # been compiled in.
20398 avail_ext="$avail_ext $xxx"
20401 : XXX Do we need a useipcsysv variable here
20402 case "${d_msg}${d_sem}${d_shm}" in
20403 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
20406 *) avail_ext="$avail_ext $xxx"
20415 case "$onlyextensions" in
20417 *) keepextensions=''
20418 echo "You have requested that only certains extensions be included..." >&4
20419 for i in $onlyextensions; do
20420 case " $avail_ext " in
20422 echo "Keeping extension $i."
20423 keepextensions="$keepextensions $i"
20425 *) echo "Ignoring extension $i." ;;
20428 avail_ext="$keepextensions"
20432 case "$noextensions" in
20434 *) keepextensions=''
20435 echo "You have requested that certain extensions be ignored..." >&4
20436 for i in $avail_ext; do
20437 case " $noextensions " in
20438 *" $i "*) echo "Ignoring extension $i." ;;
20439 *) echo "Keeping extension $i.";
20440 keepextensions="$keepextensions $i"
20444 avail_ext="$keepextensions"
20448 : Now see which nonxs extensions are supported on this system.
20449 : For now assume all are.
20451 for xxx in $nonxs_extensions ; do
20453 *) nonxs_ext="$nonxs_ext $xxx"
20465 A number of extensions are supplied with $package. You may choose to
20466 compile these extensions for dynamic loading (the default), compile
20467 them into the $package executable (static loading), or not include
20468 them at all. Answer "none" to include no extensions.
20469 Note that DynaLoader is always built and need not be mentioned here.
20472 case "$dynamic_ext" in
20474 : Exclude those listed in static_ext
20476 for xxx in $avail_ext; do
20477 case " $static_ext " in
20479 *) dflt="$dflt $xxx" ;;
20486 *) dflt="$dynamic_ext"
20487 # Perhaps we are reusing an old out-of-date config.sh.
20490 if test X"$dynamic_ext" != X"$avail_ext"; then
20492 NOTICE: Your previous config.sh list may be incorrect.
20493 The extensions now available to you are
20495 but the default list from your previous config.sh is
20507 rp="What extensions do you wish to load dynamically?"
20510 none) dynamic_ext=' ' ;;
20511 *) dynamic_ext="$ans" ;;
20514 case "$static_ext" in
20516 : Exclude those already listed in dynamic linking
20518 for xxx in $avail_ext; do
20519 case " $dynamic_ext " in
20521 *) dflt="$dflt $xxx" ;;
20528 *) dflt="$static_ext"
20535 rp="What extensions do you wish to load statically?"
20538 none) static_ext=' ' ;;
20539 *) static_ext="$ans" ;;
20544 A number of extensions are supplied with $package. Answer "none"
20545 to include no extensions.
20546 Note that DynaLoader is always built and need not be mentioned here.
20549 case "$static_ext" in
20550 '') dflt="$avail_ext" ;;
20551 *) dflt="$static_ext"
20552 # Perhaps we are reusing an old out-of-date config.sh.
20555 if test X"$static_ext" != X"$avail_ext"; then
20557 NOTICE: Your previous config.sh list may be incorrect.
20558 The extensions now available to you are
20560 but the default list from your previous config.sh is
20569 : Exclude those that are not xs extensions
20573 rp="What extensions do you wish to include?"
20576 none) static_ext=' ' ;;
20577 *) static_ext="$ans" ;;
20582 # Encode is a special case. If we are building Encode as a static
20583 # extension, we need to explicitly list its subextensions as well.
20584 # For other nested extensions, this is handled automatically by
20585 # the appropriate Makefile.PL.
20586 case " $static_ext " in
20587 *" Encode "*) # Add the subextensions of Encode
20589 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
20590 static_ext="$static_ext Encode/$xxx"
20596 set X $dynamic_ext $static_ext $nonxs_ext
20600 # Sanity check: We require an extension suitable for use with
20601 # AnyDBM_File, as well as Fcntl and IO. (Failure to have these
20602 # should show up as failures in the test suite, but it's helpful to
20603 # catch them now.) The 'extensions' list is normally sorted
20604 # alphabetically, so we need to accept either
20605 # DB_File ... Fcntl ... IO ....
20606 # or something like
20607 # Fcntl ... NDBM_File ... IO ....
20608 case " $extensions" in
20609 *"_File "*" Fcntl "*" IO "*) ;; # DB_File
20610 *" Fcntl "*"_File "*" IO "*) ;; # GDBM_File
20611 *" Fcntl "*" IO "*"_File "*) ;; # NDBM_File
20612 *) echo "WARNING: Extensions DB_File or *DBM_File, Fcntl, and IO not configured." >&4
20613 echo "WARNING: The Perl you are building will be quite crippled." >& 4
20617 : Remove libraries needed only for extensions
20618 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
20619 : The exception is SunOS 4.x, which needs them.
20620 case "${osname}X${osvers}" in
20624 *) case "$usedl" in
20625 $define|true|[yY]*)
20626 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
20630 *) perllibs="$libs"
20636 : Remove build directory name from cppstdin so it can be used from
20637 : either the present location or the final installed location.
20639 : Get out of the UU directory to get correct path name.
20641 case "$cppstdin" in
20643 echo "Stripping down cppstdin path name"
20649 : end of configuration questions
20651 echo "End of configuration questions."
20654 : back to where it started
20655 if test -d ../UU; then
20659 : configuration may be patched via a 'config.arch' file
20660 if $test -f config.arch; then
20661 echo "I see a config.arch file, loading it."
20665 : configuration may be patched via a 'config.over' file
20666 if $test -f config.over; then
20669 rp='I see a config.over file. Do you wish to load it?'
20672 n*) echo "OK, I'll ignore it.";;
20674 echo "Configuration override changes have been loaded."
20679 : in case they want portability, strip down executable paths
20680 case "$d_portable" in
20683 echo "Stripping down executable paths..." >&4
20684 for file in $loclist $trylist; do
20686 eval $file=`basename $temp`
20691 : create config.sh file
20693 echo "Creating config.sh..." >&4
20694 $spitshell <<EOT >config.sh
20697 # This file was produced by running the Configure script. It holds all the
20698 # definitions figured out by Configure. Should you modify one of these values,
20699 # do not forget to propagate your changes by running "Configure -der". You may
20700 # instead choose to run each of the .SH files by yourself, or "Configure -S".
20703 # Package name : $package
20704 # Source directory : $src
20705 # Configuration time: $cf_time
20706 # Configured by : $cf_by
20707 # Target system : $myuname
20717 Revision='$Revision'
20725 alignbytes='$alignbytes'
20726 ansi2knr='$ansi2knr'
20727 aphostname='$aphostname'
20728 api_revision='$api_revision'
20729 api_subversion='$api_subversion'
20730 api_version='$api_version'
20731 api_versionstring='$api_versionstring'
20734 archlibexp='$archlibexp'
20735 archname64='$archname64'
20736 archname='$archname'
20737 archobjs='$archobjs'
20738 asctime_r_proto='$asctime_r_proto'
20746 byteorder='$byteorder'
20748 castflags='$castflags'
20751 cccdlflags='$cccdlflags'
20752 ccdlflags='$ccdlflags'
20754 ccflags_uselargefiles='$ccflags_uselargefiles'
20756 ccsymbols='$ccsymbols'
20757 ccversion='$ccversion'
20759 cf_email='$cf_email'
20761 charsize='$charsize'
20765 clocktype='$clocktype'
20767 compress='$compress'
20768 contains='$contains'
20772 cpp_stuff='$cpp_stuff'
20773 cppccsymbols='$cppccsymbols'
20774 cppflags='$cppflags'
20776 cppminus='$cppminus'
20778 cppstdin='$cppstdin'
20779 cppsymbols='$cppsymbols'
20780 crypt_r_proto='$crypt_r_proto'
20781 cryptlib='$cryptlib'
20783 ctermid_r_proto='$ctermid_r_proto'
20784 ctime_r_proto='$ctime_r_proto'
20785 d_Gconvert='$d_Gconvert'
20786 d_PRIEUldbl='$d_PRIEUldbl'
20787 d_PRIFUldbl='$d_PRIFUldbl'
20788 d_PRIGUldbl='$d_PRIGUldbl'
20789 d_PRIXU64='$d_PRIXU64'
20790 d_PRId64='$d_PRId64'
20791 d_PRIeldbl='$d_PRIeldbl'
20792 d_PRIfldbl='$d_PRIfldbl'
20793 d_PRIgldbl='$d_PRIgldbl'
20794 d_PRIi64='$d_PRIi64'
20795 d_PRIo64='$d_PRIo64'
20796 d_PRIu64='$d_PRIu64'
20797 d_PRIx64='$d_PRIx64'
20798 d_SCNfldbl='$d_SCNfldbl'
20799 d__fwalk='$d__fwalk'
20800 d_access='$d_access'
20801 d_accessx='$d_accessx'
20804 d_archlib='$d_archlib'
20805 d_asctime_r='$d_asctime_r'
20808 d_attribute_format='$d_attribute_format'
20809 d_attribute_malloc='$d_attribute_malloc'
20810 d_attribute_nonnull='$d_attribute_nonnull'
20811 d_attribute_noreturn='$d_attribute_noreturn'
20812 d_attribute_pure='$d_attribute_pure'
20813 d_attribute_unused='$d_attribute_unused'
20814 d_attribute_warn_unused_result='$d_attribute_warn_unused_result'
20818 d_bsdgetpgrp='$d_bsdgetpgrp'
20819 d_bsdsetpgrp='$d_bsdsetpgrp'
20821 d_casti32='$d_casti32'
20822 d_castneg='$d_castneg'
20823 d_charvspr='$d_charvspr'
20825 d_chroot='$d_chroot'
20826 d_chsize='$d_chsize'
20828 d_closedir='$d_closedir'
20829 d_cmsghdr_s='$d_cmsghdr_s'
20831 d_copysignl='$d_copysignl'
20833 d_crypt_r='$d_crypt_r'
20835 d_ctermid_r='$d_ctermid_r'
20836 d_ctime_r='$d_ctime_r'
20837 d_cuserid='$d_cuserid'
20838 d_dbl_dig='$d_dbl_dig'
20839 d_dbminitproto='$d_dbminitproto'
20840 d_difftime='$d_difftime'
20842 d_dirnamlen='$d_dirnamlen'
20843 d_dlerror='$d_dlerror'
20844 d_dlopen='$d_dlopen'
20845 d_dlsymun='$d_dlsymun'
20846 d_dosuid='$d_dosuid'
20847 d_drand48_r='$d_drand48_r'
20848 d_drand48proto='$d_drand48proto'
20850 d_eaccess='$d_eaccess'
20851 d_endgrent='$d_endgrent'
20852 d_endgrent_r='$d_endgrent_r'
20853 d_endhent='$d_endhent'
20854 d_endhostent_r='$d_endhostent_r'
20855 d_endnent='$d_endnent'
20856 d_endnetent_r='$d_endnetent_r'
20857 d_endpent='$d_endpent'
20858 d_endprotoent_r='$d_endprotoent_r'
20859 d_endpwent='$d_endpwent'
20860 d_endpwent_r='$d_endpwent_r'
20861 d_endsent='$d_endsent'
20862 d_endservent_r='$d_endservent_r'
20863 d_eofnblk='$d_eofnblk'
20864 d_eunice='$d_eunice'
20865 d_faststdio='$d_faststdio'
20866 d_fchdir='$d_fchdir'
20867 d_fchmod='$d_fchmod'
20868 d_fchown='$d_fchown'
20870 d_fcntl_can_lock='$d_fcntl_can_lock'
20871 d_fd_macros='$d_fd_macros'
20872 d_fd_set='$d_fd_set'
20873 d_fds_bits='$d_fds_bits'
20874 d_fgetpos='$d_fgetpos'
20875 d_finite='$d_finite'
20876 d_finitel='$d_finitel'
20877 d_flexfnam='$d_flexfnam'
20879 d_flockproto='$d_flockproto'
20881 d_fp_class='$d_fp_class'
20882 d_fpathconf='$d_fpathconf'
20883 d_fpclass='$d_fpclass'
20884 d_fpclassify='$d_fpclassify'
20885 d_fpclassl='$d_fpclassl'
20886 d_fpos64_t='$d_fpos64_t'
20887 d_frexpl='$d_frexpl'
20888 d_fs_data_s='$d_fs_data_s'
20889 d_fseeko='$d_fseeko'
20890 d_fsetpos='$d_fsetpos'
20891 d_fstatfs='$d_fstatfs'
20892 d_fstatvfs='$d_fstatvfs'
20894 d_ftello='$d_ftello'
20896 d_getcwd='$d_getcwd'
20897 d_getespwnam='$d_getespwnam'
20898 d_getfsstat='$d_getfsstat'
20899 d_getgrent='$d_getgrent'
20900 d_getgrent_r='$d_getgrent_r'
20901 d_getgrgid_r='$d_getgrgid_r'
20902 d_getgrnam_r='$d_getgrnam_r'
20903 d_getgrps='$d_getgrps'
20904 d_gethbyaddr='$d_gethbyaddr'
20905 d_gethbyname='$d_gethbyname'
20906 d_gethent='$d_gethent'
20907 d_gethname='$d_gethname'
20908 d_gethostbyaddr_r='$d_gethostbyaddr_r'
20909 d_gethostbyname_r='$d_gethostbyname_r'
20910 d_gethostent_r='$d_gethostent_r'
20911 d_gethostprotos='$d_gethostprotos'
20912 d_getitimer='$d_getitimer'
20913 d_getlogin='$d_getlogin'
20914 d_getlogin_r='$d_getlogin_r'
20915 d_getmnt='$d_getmnt'
20916 d_getmntent='$d_getmntent'
20917 d_getnbyaddr='$d_getnbyaddr'
20918 d_getnbyname='$d_getnbyname'
20919 d_getnent='$d_getnent'
20920 d_getnetbyaddr_r='$d_getnetbyaddr_r'
20921 d_getnetbyname_r='$d_getnetbyname_r'
20922 d_getnetent_r='$d_getnetent_r'
20923 d_getnetprotos='$d_getnetprotos'
20924 d_getpagsz='$d_getpagsz'
20925 d_getpbyname='$d_getpbyname'
20926 d_getpbynumber='$d_getpbynumber'
20927 d_getpent='$d_getpent'
20928 d_getpgid='$d_getpgid'
20929 d_getpgrp2='$d_getpgrp2'
20930 d_getpgrp='$d_getpgrp'
20931 d_getppid='$d_getppid'
20932 d_getprior='$d_getprior'
20933 d_getprotobyname_r='$d_getprotobyname_r'
20934 d_getprotobynumber_r='$d_getprotobynumber_r'
20935 d_getprotoent_r='$d_getprotoent_r'
20936 d_getprotoprotos='$d_getprotoprotos'
20937 d_getprpwnam='$d_getprpwnam'
20938 d_getpwent='$d_getpwent'
20939 d_getpwent_r='$d_getpwent_r'
20940 d_getpwnam_r='$d_getpwnam_r'
20941 d_getpwuid_r='$d_getpwuid_r'
20942 d_getsbyname='$d_getsbyname'
20943 d_getsbyport='$d_getsbyport'
20944 d_getsent='$d_getsent'
20945 d_getservbyname_r='$d_getservbyname_r'
20946 d_getservbyport_r='$d_getservbyport_r'
20947 d_getservent_r='$d_getservent_r'
20948 d_getservprotos='$d_getservprotos'
20949 d_getspnam='$d_getspnam'
20950 d_getspnam_r='$d_getspnam_r'
20951 d_gettimeod='$d_gettimeod'
20952 d_gmtime_r='$d_gmtime_r'
20953 d_gnulibc='$d_gnulibc'
20954 d_grpasswd='$d_grpasswd'
20955 d_hasmntopt='$d_hasmntopt'
20957 d_ilogbl='$d_ilogbl'
20959 d_inetaton='$d_inetaton'
20960 d_int64_t='$d_int64_t'
20961 d_isascii='$d_isascii'
20962 d_isfinite='$d_isfinite'
20965 d_isnanl='$d_isnanl'
20966 d_killpg='$d_killpg'
20967 d_lchown='$d_lchown'
20968 d_ldbl_dig='$d_ldbl_dig'
20969 d_libm_lib_version='$d_libm_lib_version'
20971 d_localtime_r='$d_localtime_r'
20972 d_locconv='$d_locconv'
20974 d_longdbl='$d_longdbl'
20975 d_longlong='$d_longlong'
20976 d_lseekproto='$d_lseekproto'
20978 d_madvise='$d_madvise'
20980 d_mbstowcs='$d_mbstowcs'
20981 d_mbtowc='$d_mbtowc'
20982 d_memchr='$d_memchr'
20983 d_memcmp='$d_memcmp'
20984 d_memcpy='$d_memcpy'
20985 d_memmove='$d_memmove'
20986 d_memset='$d_memset'
20988 d_mkdtemp='$d_mkdtemp'
20989 d_mkfifo='$d_mkfifo'
20990 d_mkstemp='$d_mkstemp'
20991 d_mkstemps='$d_mkstemps'
20992 d_mktime='$d_mktime'
20995 d_modfl_pow32_bug='$d_modfl_pow32_bug'
20996 d_modflproto='$d_modflproto'
20997 d_mprotect='$d_mprotect'
20999 d_msg_ctrunc='$d_msg_ctrunc'
21000 d_msg_dontroute='$d_msg_dontroute'
21001 d_msg_oob='$d_msg_oob'
21002 d_msg_peek='$d_msg_peek'
21003 d_msg_proxy='$d_msg_proxy'
21004 d_msgctl='$d_msgctl'
21005 d_msgget='$d_msgget'
21006 d_msghdr_s='$d_msghdr_s'
21007 d_msgrcv='$d_msgrcv'
21008 d_msgsnd='$d_msgsnd'
21010 d_munmap='$d_munmap'
21011 d_mymalloc='$d_mymalloc'
21013 d_nl_langinfo='$d_nl_langinfo'
21014 d_nv_preserves_uv='$d_nv_preserves_uv'
21015 d_off64_t='$d_off64_t'
21016 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
21017 d_oldpthreads='$d_oldpthreads'
21018 d_oldsock='$d_oldsock'
21020 d_pathconf='$d_pathconf'
21022 d_perl_otherlibdirs='$d_perl_otherlibdirs'
21023 d_phostname='$d_phostname'
21026 d_portable='$d_portable'
21027 d_procselfexe='$d_procselfexe'
21028 d_pthread_atfork='$d_pthread_atfork'
21029 d_pthread_attr_setscope='$d_pthread_attr_setscope'
21030 d_pthread_yield='$d_pthread_yield'
21032 d_pwchange='$d_pwchange'
21033 d_pwclass='$d_pwclass'
21034 d_pwcomment='$d_pwcomment'
21035 d_pwexpire='$d_pwexpire'
21036 d_pwgecos='$d_pwgecos'
21037 d_pwpasswd='$d_pwpasswd'
21038 d_pwquota='$d_pwquota'
21041 d_random_r='$d_random_r'
21042 d_readdir64_r='$d_readdir64_r'
21043 d_readdir='$d_readdir'
21044 d_readdir_r='$d_readdir_r'
21045 d_readlink='$d_readlink'
21047 d_recvmsg='$d_recvmsg'
21048 d_rename='$d_rename'
21049 d_rewinddir='$d_rewinddir'
21051 d_safebcpy='$d_safebcpy'
21052 d_safemcpy='$d_safemcpy'
21053 d_sanemcmp='$d_sanemcmp'
21054 d_sbrkproto='$d_sbrkproto'
21055 d_scalbnl='$d_scalbnl'
21056 d_sched_yield='$d_sched_yield'
21057 d_scm_rights='$d_scm_rights'
21058 d_seekdir='$d_seekdir'
21059 d_select='$d_select'
21061 d_semctl='$d_semctl'
21062 d_semctl_semid_ds='$d_semctl_semid_ds'
21063 d_semctl_semun='$d_semctl_semun'
21064 d_semget='$d_semget'
21066 d_sendmsg='$d_sendmsg'
21067 d_setegid='$d_setegid'
21068 d_seteuid='$d_seteuid'
21069 d_setgrent='$d_setgrent'
21070 d_setgrent_r='$d_setgrent_r'
21071 d_setgrps='$d_setgrps'
21072 d_sethent='$d_sethent'
21073 d_sethostent_r='$d_sethostent_r'
21074 d_setitimer='$d_setitimer'
21075 d_setlinebuf='$d_setlinebuf'
21076 d_setlocale='$d_setlocale'
21077 d_setlocale_r='$d_setlocale_r'
21078 d_setnent='$d_setnent'
21079 d_setnetent_r='$d_setnetent_r'
21080 d_setpent='$d_setpent'
21081 d_setpgid='$d_setpgid'
21082 d_setpgrp2='$d_setpgrp2'
21083 d_setpgrp='$d_setpgrp'
21084 d_setprior='$d_setprior'
21085 d_setproctitle='$d_setproctitle'
21086 d_setprotoent_r='$d_setprotoent_r'
21087 d_setpwent='$d_setpwent'
21088 d_setpwent_r='$d_setpwent_r'
21089 d_setregid='$d_setregid'
21090 d_setresgid='$d_setresgid'
21091 d_setresuid='$d_setresuid'
21092 d_setreuid='$d_setreuid'
21093 d_setrgid='$d_setrgid'
21094 d_setruid='$d_setruid'
21095 d_setsent='$d_setsent'
21096 d_setservent_r='$d_setservent_r'
21097 d_setsid='$d_setsid'
21098 d_setvbuf='$d_setvbuf'
21102 d_shmatprototype='$d_shmatprototype'
21103 d_shmctl='$d_shmctl'
21105 d_shmget='$d_shmget'
21106 d_sigaction='$d_sigaction'
21107 d_sigprocmask='$d_sigprocmask'
21108 d_sigsetjmp='$d_sigsetjmp'
21109 d_sockatmark='$d_sockatmark'
21110 d_sockatmarkproto='$d_sockatmarkproto'
21111 d_socket='$d_socket'
21112 d_socklen_t='$d_socklen_t'
21113 d_sockpair='$d_sockpair'
21114 d_socks5_init='$d_socks5_init'
21116 d_srand48_r='$d_srand48_r'
21117 d_srandom_r='$d_srandom_r'
21118 d_sresgproto='$d_sresgproto'
21119 d_sresuproto='$d_sresuproto'
21120 d_statblks='$d_statblks'
21121 d_statfs_f_flags='$d_statfs_f_flags'
21122 d_statfs_s='$d_statfs_s'
21123 d_statvfs='$d_statvfs'
21124 d_stdio_cnt_lval='$d_stdio_cnt_lval'
21125 d_stdio_ptr_lval='$d_stdio_ptr_lval'
21126 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
21127 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
21128 d_stdio_stream_array='$d_stdio_stream_array'
21129 d_stdiobase='$d_stdiobase'
21130 d_stdstdio='$d_stdstdio'
21131 d_strchr='$d_strchr'
21132 d_strcoll='$d_strcoll'
21133 d_strctcpy='$d_strctcpy'
21134 d_strerrm='$d_strerrm'
21135 d_strerror='$d_strerror'
21136 d_strerror_r='$d_strerror_r'
21137 d_strftime='$d_strftime'
21138 d_strlcat='$d_strlcat'
21139 d_strlcpy='$d_strlcpy'
21140 d_strtod='$d_strtod'
21141 d_strtol='$d_strtol'
21142 d_strtold='$d_strtold'
21143 d_strtoll='$d_strtoll'
21144 d_strtoq='$d_strtoq'
21145 d_strtoul='$d_strtoul'
21146 d_strtoull='$d_strtoull'
21147 d_strtouq='$d_strtouq'
21148 d_strxfrm='$d_strxfrm'
21149 d_suidsafe='$d_suidsafe'
21150 d_symlink='$d_symlink'
21151 d_syscall='$d_syscall'
21152 d_syscallproto='$d_syscallproto'
21153 d_sysconf='$d_sysconf'
21154 d_sysernlst='$d_sysernlst'
21155 d_syserrlst='$d_syserrlst'
21156 d_system='$d_system'
21157 d_tcgetpgrp='$d_tcgetpgrp'
21158 d_tcsetpgrp='$d_tcsetpgrp'
21159 d_telldir='$d_telldir'
21160 d_telldirproto='$d_telldirproto'
21163 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
21164 d_tm_tm_zone='$d_tm_tm_zone'
21165 d_tmpnam_r='$d_tmpnam_r'
21166 d_truncate='$d_truncate'
21167 d_ttyname_r='$d_ttyname_r'
21168 d_tzname='$d_tzname'
21169 d_u32align='$d_u32align'
21170 d_ualarm='$d_ualarm'
21173 d_union_semun='$d_union_semun'
21174 d_unordered='$d_unordered'
21175 d_usleep='$d_usleep'
21176 d_usleepproto='$d_usleepproto'
21178 d_vendorarch='$d_vendorarch'
21179 d_vendorbin='$d_vendorbin'
21180 d_vendorlib='$d_vendorlib'
21181 d_vendorscript='$d_vendorscript'
21183 d_void_closedir='$d_void_closedir'
21184 d_voidsig='$d_voidsig'
21185 d_voidtty='$d_voidtty'
21186 d_volatile='$d_volatile'
21187 d_vprintf='$d_vprintf'
21189 d_waitpid='$d_waitpid'
21190 d_wcstombs='$d_wcstombs'
21191 d_wctomb='$d_wctomb'
21192 d_writev='$d_writev'
21195 db_hashtype='$db_hashtype'
21196 db_prefixtype='$db_prefixtype'
21197 db_version_major='$db_version_major'
21198 db_version_minor='$db_version_minor'
21199 db_version_patch='$db_version_patch'
21200 defvoidused='$defvoidused'
21201 direntrytype='$direntrytype'
21204 doublesize='$doublesize'
21206 drand48_r_proto='$drand48_r_proto'
21207 dynamic_ext='$dynamic_ext'
21213 endgrent_r_proto='$endgrent_r_proto'
21214 endhostent_r_proto='$endhostent_r_proto'
21215 endnetent_r_proto='$endnetent_r_proto'
21216 endprotoent_r_proto='$endprotoent_r_proto'
21217 endpwent_r_proto='$endpwent_r_proto'
21218 endservent_r_proto='$endservent_r_proto'
21219 eunicefix='$eunicefix'
21222 extensions='$extensions'
21224 fflushNULL='$fflushNULL'
21225 fflushall='$fflushall'
21227 firstmakefile='$firstmakefile'
21229 fpossize='$fpossize'
21230 fpostype='$fpostype'
21231 freetype='$freetype'
21234 full_csh='$full_csh'
21235 full_sed='$full_sed'
21236 gccansipedantic='$gccansipedantic'
21237 gccosandvers='$gccosandvers'
21238 gccversion='$gccversion'
21239 getgrent_r_proto='$getgrent_r_proto'
21240 getgrgid_r_proto='$getgrgid_r_proto'
21241 getgrnam_r_proto='$getgrnam_r_proto'
21242 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
21243 gethostbyname_r_proto='$gethostbyname_r_proto'
21244 gethostent_r_proto='$gethostent_r_proto'
21245 getlogin_r_proto='$getlogin_r_proto'
21246 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
21247 getnetbyname_r_proto='$getnetbyname_r_proto'
21248 getnetent_r_proto='$getnetent_r_proto'
21249 getprotobyname_r_proto='$getprotobyname_r_proto'
21250 getprotobynumber_r_proto='$getprotobynumber_r_proto'
21251 getprotoent_r_proto='$getprotoent_r_proto'
21252 getpwent_r_proto='$getpwent_r_proto'
21253 getpwnam_r_proto='$getpwnam_r_proto'
21254 getpwuid_r_proto='$getpwuid_r_proto'
21255 getservbyname_r_proto='$getservbyname_r_proto'
21256 getservbyport_r_proto='$getservbyport_r_proto'
21257 getservent_r_proto='$getservent_r_proto'
21258 getspnam_r_proto='$getspnam_r_proto'
21259 gidformat='$gidformat'
21265 gmtime_r_proto='$gmtime_r_proto'
21266 gnulibc_version='$gnulibc_version'
21268 groupcat='$groupcat'
21269 groupstype='$groupstype'
21272 h_sysfile='$h_sysfile'
21275 html1dir='$html1dir'
21276 html1direxp='$html1direxp'
21277 html3dir='$html3dir'
21278 html3direxp='$html3direxp'
21287 i_arpainet='$i_arpainet'
21288 i_bsdioctl='$i_bsdioctl'
21292 i_dirent='$i_dirent'
21298 i_fp_class='$i_fp_class'
21301 i_ieeefp='$i_ieeefp'
21302 i_inttypes='$i_inttypes'
21303 i_langinfo='$i_langinfo'
21304 i_libutil='$i_libutil'
21305 i_limits='$i_limits'
21306 i_locale='$i_locale'
21307 i_machcthr='$i_machcthr'
21308 i_malloc='$i_malloc'
21310 i_memory='$i_memory'
21311 i_mntent='$i_mntent'
21314 i_neterrno='$i_neterrno'
21315 i_netinettcp='$i_netinettcp'
21319 i_pthread='$i_pthread'
21321 i_rpcsvcdbm='$i_rpcsvcdbm'
21324 i_shadow='$i_shadow'
21326 i_stdarg='$i_stdarg'
21327 i_stddef='$i_stddef'
21328 i_stdlib='$i_stdlib'
21329 i_string='$i_string'
21330 i_sunmath='$i_sunmath'
21331 i_sysaccess='$i_sysaccess'
21332 i_sysdir='$i_sysdir'
21333 i_sysfile='$i_sysfile'
21334 i_sysfilio='$i_sysfilio'
21336 i_sysioctl='$i_sysioctl'
21337 i_syslog='$i_syslog'
21338 i_sysmman='$i_sysmman'
21339 i_sysmode='$i_sysmode'
21340 i_sysmount='$i_sysmount'
21341 i_sysndir='$i_sysndir'
21342 i_sysparam='$i_sysparam'
21343 i_sysresrc='$i_sysresrc'
21344 i_syssecrt='$i_syssecrt'
21345 i_sysselct='$i_sysselct'
21346 i_syssockio='$i_syssockio'
21347 i_sysstat='$i_sysstat'
21348 i_sysstatfs='$i_sysstatfs'
21349 i_sysstatvfs='$i_sysstatvfs'
21350 i_systime='$i_systime'
21351 i_systimek='$i_systimek'
21352 i_systimes='$i_systimes'
21353 i_systypes='$i_systypes'
21354 i_sysuio='$i_sysuio'
21356 i_sysutsname='$i_sysutsname'
21357 i_sysvfs='$i_sysvfs'
21358 i_syswait='$i_syswait'
21359 i_termio='$i_termio'
21360 i_termios='$i_termios'
21362 i_unistd='$i_unistd'
21365 i_values='$i_values'
21366 i_varargs='$i_varargs'
21367 i_varhdr='$i_varhdr'
21369 ignore_versioned_solibs='$ignore_versioned_solibs'
21370 inc_version_list='$inc_version_list'
21371 inc_version_list_init='$inc_version_list_init'
21374 installarchlib='$installarchlib'
21375 installbin='$installbin'
21376 installhtml1dir='$installhtml1dir'
21377 installhtml3dir='$installhtml3dir'
21378 installman1dir='$installman1dir'
21379 installman3dir='$installman3dir'
21380 installprefix='$installprefix'
21381 installprefixexp='$installprefixexp'
21382 installprivlib='$installprivlib'
21383 installscript='$installscript'
21384 installsitearch='$installsitearch'
21385 installsitebin='$installsitebin'
21386 installsitehtml1dir='$installsitehtml1dir'
21387 installsitehtml3dir='$installsitehtml3dir'
21388 installsitelib='$installsitelib'
21389 installsiteman1dir='$installsiteman1dir'
21390 installsiteman3dir='$installsiteman3dir'
21391 installsitescript='$installsitescript'
21392 installstyle='$installstyle'
21393 installusrbinperl='$installusrbinperl'
21394 installvendorarch='$installvendorarch'
21395 installvendorbin='$installvendorbin'
21396 installvendorhtml1dir='$installvendorhtml1dir'
21397 installvendorhtml3dir='$installvendorhtml3dir'
21398 installvendorlib='$installvendorlib'
21399 installvendorman1dir='$installvendorman1dir'
21400 installvendorman3dir='$installvendorman3dir'
21401 installvendorscript='$installvendorscript'
21403 issymlink='$issymlink'
21404 ivdformat='$ivdformat'
21407 known_extensions='$known_extensions'
21410 lddlflags='$lddlflags'
21412 ldflags_uselargefiles='$ldflags_uselargefiles'
21413 ldlibpthname='$ldlibpthname'
21420 libsdirs='$libsdirs'
21421 libsfiles='$libsfiles'
21422 libsfound='$libsfound'
21423 libspath='$libspath'
21424 libswanted='$libswanted'
21425 libswanted_uselargefiles='$libswanted_uselargefiles'
21431 localtime_r_proto='$localtime_r_proto'
21432 locincpth='$locincpth'
21433 loclibpth='$loclibpth'
21434 longdblsize='$longdblsize'
21435 longlongsize='$longlongsize'
21436 longsize='$longsize'
21440 lseeksize='$lseeksize'
21441 lseektype='$lseektype'
21445 make_set_make='$make_set_make'
21446 mallocobj='$mallocobj'
21447 mallocsrc='$mallocsrc'
21448 malloctype='$malloctype'
21450 man1direxp='$man1direxp'
21453 man3direxp='$man3direxp'
21455 mips_type='$mips_type'
21456 mistrustnm='$mistrustnm'
21458 mmaptype='$mmaptype'
21459 modetype='$modetype'
21461 multiarch='$multiarch'
21463 myarchname='$myarchname'
21464 mydomain='$mydomain'
21465 myhostname='$myhostname'
21468 need_va_copy='$need_va_copy'
21469 netdb_hlen_type='$netdb_hlen_type'
21470 netdb_host_type='$netdb_host_type'
21471 netdb_name_type='$netdb_name_type'
21472 netdb_net_type='$netdb_net_type'
21475 nm_so_opt='$nm_so_opt'
21476 nonxs_ext='$nonxs_ext'
21478 nvEUformat='$nvEUformat'
21479 nvFUformat='$nvFUformat'
21480 nvGUformat='$nvGUformat'
21481 nv_preserves_uv_bits='$nv_preserves_uv_bits'
21482 nveformat='$nveformat'
21483 nvfformat='$nvfformat'
21484 nvgformat='$nvgformat'
21487 o_nonblock='$o_nonblock'
21489 old_pthread_create_joinable='$old_pthread_create_joinable'
21490 optimize='$optimize'
21491 orderlib='$orderlib'
21494 otherlibdirs='$otherlibdirs'
21498 patchlevel='$patchlevel'
21499 path_sep='$path_sep'
21502 perl_patchlevel='$perl_patchlevel'
21503 perladmin='$perladmin'
21504 perllibs='$perllibs'
21505 perlpath='$perlpath'
21507 phostname='$phostname'
21513 prefixexp='$prefixexp'
21515 privlibexp='$privlibexp'
21516 procselfexe='$procselfexe'
21517 prototype='$prototype'
21519 quadkind='$quadkind'
21520 quadtype='$quadtype'
21521 randbits='$randbits'
21522 randfunc='$randfunc'
21523 random_r_proto='$random_r_proto'
21524 randseedtype='$randseedtype'
21526 rd_nodata='$rd_nodata'
21527 readdir64_r_proto='$readdir64_r_proto'
21528 readdir_r_proto='$readdir_r_proto'
21529 revision='$revision'
21534 sPRIEUldbl='$sPRIEUldbl'
21535 sPRIFUldbl='$sPRIFUldbl'
21536 sPRIGUldbl='$sPRIGUldbl'
21537 sPRIXU64='$sPRIXU64'
21539 sPRIeldbl='$sPRIeldbl'
21540 sPRIfldbl='$sPRIfldbl'
21541 sPRIgldbl='$sPRIgldbl'
21546 sSCNfldbl='$sSCNfldbl'
21547 sched_yield='$sched_yield'
21548 scriptdir='$scriptdir'
21549 scriptdirexp='$scriptdirexp'
21551 seedfunc='$seedfunc'
21552 selectminbits='$selectminbits'
21553 selecttype='$selecttype'
21554 sendmail='$sendmail'
21555 setgrent_r_proto='$setgrent_r_proto'
21556 sethostent_r_proto='$sethostent_r_proto'
21557 setlocale_r_proto='$setlocale_r_proto'
21558 setnetent_r_proto='$setnetent_r_proto'
21559 setprotoent_r_proto='$setprotoent_r_proto'
21560 setpwent_r_proto='$setpwent_r_proto'
21561 setservent_r_proto='$setservent_r_proto'
21564 sharpbang='$sharpbang'
21565 shmattype='$shmattype'
21566 shortsize='$shortsize'
21569 sig_count='$sig_count'
21570 sig_name='$sig_name'
21571 sig_name_init='$sig_name_init'
21573 sig_num_init='$sig_num_init'
21574 sig_size='$sig_size'
21575 signal_t='$signal_t'
21576 sitearch='$sitearch'
21577 sitearchexp='$sitearchexp'
21579 sitebinexp='$sitebinexp'
21580 sitehtml1dir='$sitehtml1dir'
21581 sitehtml1direxp='$sitehtml1direxp'
21582 sitehtml3dir='$sitehtml3dir'
21583 sitehtml3direxp='$sitehtml3direxp'
21585 sitelib_stem='$sitelib_stem'
21586 sitelibexp='$sitelibexp'
21587 siteman1dir='$siteman1dir'
21588 siteman1direxp='$siteman1direxp'
21589 siteman3dir='$siteman3dir'
21590 siteman3direxp='$siteman3direxp'
21591 siteprefix='$siteprefix'
21592 siteprefixexp='$siteprefixexp'
21593 sitescript='$sitescript'
21594 sitescriptexp='$sitescriptexp'
21595 sizesize='$sizesize'
21596 sizetype='$sizetype'
21600 sockethdr='$sockethdr'
21601 socketlib='$socketlib'
21602 socksizetype='$socksizetype'
21604 spackage='$spackage'
21605 spitshell='$spitshell'
21606 srand48_r_proto='$srand48_r_proto'
21607 srandom_r_proto='$srandom_r_proto'
21609 ssizetype='$ssizetype'
21610 startperl='$startperl'
21612 static_ext='$static_ext'
21614 stdio_base='$stdio_base'
21615 stdio_bufsiz='$stdio_bufsiz'
21616 stdio_cnt='$stdio_cnt'
21617 stdio_filbuf='$stdio_filbuf'
21618 stdio_ptr='$stdio_ptr'
21619 stdio_stream_array='$stdio_stream_array'
21620 strerror_r_proto='$strerror_r_proto'
21623 subversion='$subversion'
21627 targetarch='$targetarch'
21631 timeincl='$timeincl'
21632 timetype='$timetype'
21633 tmpnam_r_proto='$tmpnam_r_proto'
21639 ttyname_r_proto='$ttyname_r_proto'
21648 uidformat='$uidformat'
21654 uquadtype='$uquadtype'
21655 use5005threads='$use5005threads'
21656 use64bitall='$use64bitall'
21657 use64bitint='$use64bitint'
21658 usecrosscompile='$usecrosscompile'
21660 usefaststdio='$usefaststdio'
21661 useithreads='$useithreads'
21662 uselargefiles='$uselargefiles'
21663 uselongdouble='$uselongdouble'
21664 usemallocwrap='$usemallocwrap'
21665 usemorebits='$usemorebits'
21666 usemultiplicity='$usemultiplicity'
21667 usemymalloc='$usemymalloc'
21669 useopcode='$useopcode'
21670 useperlio='$useperlio'
21671 useposix='$useposix'
21672 usereentrant='$usereentrant'
21673 userelocatableinc='$userelocatableinc'
21675 useshrplib='$useshrplib'
21676 usesitecustomize='$usesitecustomize'
21677 usesocks='$usesocks'
21678 usethreads='$usethreads'
21679 usevendorprefix='$usevendorprefix'
21680 usevfork='$usevfork'
21683 uvXUformat='$uvXUformat'
21684 uvoformat='$uvoformat'
21687 uvuformat='$uvuformat'
21688 uvxformat='$uvxformat'
21689 vendorarch='$vendorarch'
21690 vendorarchexp='$vendorarchexp'
21691 vendorbin='$vendorbin'
21692 vendorbinexp='$vendorbinexp'
21693 vendorhtml1dir='$vendorhtml1dir'
21694 vendorhtml1direxp='$vendorhtml1direxp'
21695 vendorhtml3dir='$vendorhtml3dir'
21696 vendorhtml3direxp='$vendorhtml3direxp'
21697 vendorlib='$vendorlib'
21698 vendorlib_stem='$vendorlib_stem'
21699 vendorlibexp='$vendorlibexp'
21700 vendorman1dir='$vendorman1dir'
21701 vendorman1direxp='$vendorman1direxp'
21702 vendorman3dir='$vendorman3dir'
21703 vendorman3direxp='$vendorman3direxp'
21704 vendorprefix='$vendorprefix'
21705 vendorprefixexp='$vendorprefixexp'
21706 vendorscript='$vendorscript'
21707 vendorscriptexp='$vendorscriptexp'
21709 version_patchlevel_string='$version_patchlevel_string'
21710 versiononly='$versiononly'
21712 voidflags='$voidflags'
21715 yaccflags='$yaccflags'
21720 : Add in command line options if available
21721 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
21723 : add special variables
21724 $test -f $src/patchlevel.h && \
21725 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
21726 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
21727 echo "PERL_CONFIG_SH=true" >>config.sh
21729 : propagate old symbols
21730 if $test -f UU/config.sh; then
21731 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
21732 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
21733 $sort | $uniq -u >UU/oldsyms
21734 set X `cat UU/oldsyms`
21740 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
21742 echo "# Variables propagated from previous config.sh file." >>config.sh
21743 for sym in `cat UU/oldsyms`; do
21744 echo " Propagating $hint variable "'$'"$sym..."
21745 eval 'tmp="$'"${sym}"'"'
21747 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
21753 : Finish up by extracting the .SH files
21757 echo "Extraction done."
21767 If you'd like to make any changes to the config.sh file before I begin
21768 to configure things, do it as a shell escape now (e.g. !vi config.sh).
21771 rp="Press return or use a shell escape to edit config.sh:"
21776 *) : in case they cannot read
21777 sh 1>&4 -c "$ans";;
21782 : if this fails, just run all the .SH files by hand
21791 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
21798 Now you need to generate make dependencies by running "$make depend".
21799 You might prefer to run it in background: "$make depend > makedepend.out &"
21800 It can take a while, so you might not want to run it right now.
21805 rp="Run $make depend now?"
21809 $make depend && echo "Now you must run '$make'."
21812 echo "You must run '$make depend' then '$make'."
21815 elif test -f [Mm]akefile; then
21817 echo "Now you must run a $make."
21819 echo "Configure done."
21822 if $test -f Policy.sh; then
21825 If you compile $package on a different machine or from a different object
21826 directory, copy the Policy.sh file from this object directory to the
21827 new one before you run Configure -- this will help you with most of
21828 the policy defaults.
21832 if $test -f config.msg; then
21833 echo "Hmm. I also noted the following information while running:"
21835 $cat config.msg >&4
21838 $rm -f kit*isdone ark*isdone