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 package (which contains metaconfig) is available via SVN:
17 # svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
20 # Though this script was generated by metaconfig, it is OK to send
21 # patches against it. It's up to the Configure pumpkin to backport
22 # the patch to the metaunits if it is accepted.
23 # See Porting/pumpkin.pod for more information on metaconfig.
26 # $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
28 # Generated on Wed Oct 29 09:08:09 CET 2008 [metaconfig 3.5 PL0]
29 # (with additional metaconfig patches by perlbug@perl.org)
34 SCO csh still thinks true is false. Write to SCO today and tell them that next
35 year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
37 (Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
38 we'd have to do is go in and swap the && and || tokens, wherever they are.)
40 [End of diatribe. We now return you to your regularly scheduled programming...]
44 OOPS! You naughty creature! You didn't run Configure with sh!
45 I will attempt to remedy the situation by running sh for you...
49 true || exec sh $0 $argv:q
51 (exit $?0) || cat c2$$
52 (exit $?0) || exec sh $0 $argv:q
55 if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
58 *** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do
59 *** Configure that well. (Plan 9 is close to UNIX but not close enough.)
60 *** Please read the README.plan9 for further instructions.
61 *** Cannot continue, aborting.
67 if test ! -c /dev/null ; then
70 *** I'm sorry, but /dev/null appears to be a file rather than a device.
71 *** Please consult your operating sytem's notes for making a device
73 *** Cannot continue, aborting.
79 : compute my invocation name
83 me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
88 : Proper separator for the PATH environment variable
90 : On OS/2 this directory should exist if this is not floppy only system ":-]"
91 if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then
92 if test -n "$OS2_SHELL"; then
94 PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
95 OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
97 elif test -n "$DJGPP"; then
98 case "X${MACHTYPE:-nonesuchmach}" in
105 : Proper PATH setting
106 paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
107 paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
108 paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
109 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
110 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
111 paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
112 paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
113 paths="$paths /sbin /usr/sbin /usr/libexec"
114 paths="$paths /system/gnu_library/bin"
118 case "$p_$PATH$p_" in
120 *) test -d $p && PATH=$PATH$p_$p ;;
127 : shall we be using ksh?
133 if (PATH=.; alias -x) >/dev/null 2>&1; then
136 if test -f /hp-ux -a -f /bin/ksh; then
137 needksh='to avoid sh bug in "here document" expansion'
139 if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
140 if test X`/usr/bin/uname -v` = X4; then
141 avoidksh="to avoid AIX 4's /bin/sh"
145 if test -f /osf_boot -a -f /usr/sbin/setld; then
146 if test X`/usr/bin/uname -s` = XOSF1; then
147 avoidksh="to avoid Digital UNIX' ksh"
152 case "$inksh/$needksh" in
159 case "$inksh/$avoidksh" in
165 case "$inksh/$needksh-$avoidksh-" in
168 (I see you are using the Korn shell. Some ksh's blow up on $me,
169 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
176 echo "(Feeding myself to $newsh $reason.)"
178 Configure|*/Configure) exec $newsh $0 "$@";;
179 *) exec $newsh Configure "$@";;
183 test -x "${newsh}" || unset newsh
185 : if needed, set CDPATH to a harmless value that is not chatty
186 : avoid bash 2.02 problems with empty CDPATH.
190 *bash*) CDPATH='.' ;;
196 : Configure runs within the UU subdirectory
197 test -d UU || mkdir UU
336 initialinstalllocation=''
363 d_attribute_format=''
364 d_attribute_malloc=''
365 d_attribute_nonnull=''
366 d_attribute_noreturn=''
368 d_attribute_unused=''
369 d_attribute_warn_unused_result=''
370 d_printf_format_null=''
373 d_builtin_choose_expr=''
376 d_c99_variadic_macros=''
423 endhostent_r_proto=''
429 endprotoent_r_proto=''
435 endservent_r_proto=''
487 gethostbyaddr_r_proto=''
489 gethostbyname_r_proto=''
491 gethostent_r_proto=''
503 getnetbyaddr_r_proto=''
505 getnetbyname_r_proto=''
519 d_getprotobyname_r=''
520 getprotobyname_r_proto=''
521 d_getprotobynumber_r=''
522 getprotobynumber_r_proto=''
524 getprotoent_r_proto=''
536 getservbyname_r_proto=''
538 getservbyport_r_proto=''
540 getservent_r_proto=''
564 d_libm_lib_version=''
567 d_localtime_r_needs_tzset=''
578 d_malloc_good_size=''
620 d_old_pthread_create_joinable=''
621 old_pthread_create_joinable=''
623 d_pthread_attr_setscope=''
662 sethostent_r_proto=''
679 setprotoent_r_proto=''
691 setservent_r_proto=''
725 d_sprintf_returns_strlen=''
740 d_stdio_ptr_lval_nochange_cnt=''
741 d_stdio_ptr_lval_sets_cnt=''
958 d_inc_version_list=''
960 inc_version_list_init=''
979 ignore_versioned_solibs=''
1043 d_perl_otherlibdirs=''
1051 api_versionstring=''
1057 version_patchlevel_string=''
1061 d_nv_preserves_uv=''
1062 d_nv_zero_is_allbits_zero=''
1073 nv_overflows_integers_at=''
1074 nv_preserves_uv_bits=''
1146 installsitehtml1dir=''
1149 installsitehtml3dir=''
1156 installsiteman1dir=''
1159 installsiteman3dir=''
1164 installsitescript=''
1179 d_stdio_stream_array=''
1180 stdio_stream_array=''
1197 ccflags_uselargefiles=''
1198 ldflags_uselargefiles=''
1199 libswanted_uselargefiles=''
1219 installvendorarch=''
1226 installvendorhtml1dir=''
1228 vendorhtml1direxp=''
1229 installvendorhtml3dir=''
1231 vendorhtml3direxp=''
1237 installvendorman1dir=''
1240 installvendorman3dir=''
1247 installvendorscript=''
1260 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1263 : We must find out about Eunice early
1265 if test -f /etc/unixtovms; then
1266 eunicefix=/etc/unixtovms
1268 if test -f /etc/unixtovms.exe; then
1269 eunicefix=/etc/unixtovms.exe
1272 : Set executable suffix now -- needed before hints available
1273 if test -f "/libs/version.library"; then
1276 elif test -f "/system/gnu_library/bin/ar.pm"; then
1279 elif test -n "$DJGPP"; then
1282 elif test -d c:/. -o -n "$is_os2" ; then
1289 : Trailing extension. Override this in a hint file, if needed.
1290 : Extra object files, if any, needed on this platform.
1294 : change the next line if compiling for Xenix/286 on Xenix/386
1295 xlibpth='/usr/lib/386 /lib/386'
1296 : Possible local library directories to search.
1297 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1298 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1300 : general looking path for locating libraries
1301 glibpth="/lib /usr/lib $xlibpth"
1302 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1303 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1304 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1305 test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
1307 : Private path used by Configure to find libraries. Its value
1308 : is prepended to libpth. This variable takes care of special
1309 : machines, like the mips. Usually, it should be empty.
1312 : default library list
1314 : some systems want to use only the non-versioned libso:s
1315 ignore_versioned_solibs=''
1316 : set usethreads on the Configure command line to enable threads.
1317 usereentrant='undef'
1318 : full support for void wanted by default
1321 : Possible local include directories to search.
1322 : Set locincpth to "" in a hint file to defeat local include searches.
1323 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1324 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1326 : no include file wanted by default
1329 : Enable -DEBUGGING and -DDEBUGGING from the command line
1336 : set useposix=false in your hint file to disable the POSIX extension.
1338 : set useopcode=false in your hint file to disable the Opcode extension.
1341 ccflags_uselargefiles=''
1342 ldflags_uselargefiles=''
1343 libswanted_uselargefiles=''
1344 : set usemultiplicity on the Configure command line to enable multiplicity.
1345 : set usesocks on the Configure command line to enable socks.
1346 : List of libraries we want.
1347 : If anyone needs extra -lxxx, put those in a hint file.
1348 libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun"
1349 libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
1350 : We probably want to search /usr/shlib before most other libraries.
1351 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1352 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1353 glibpth="/usr/shlib $glibpth"
1354 : Do not use vfork unless overridden by a hint file.
1357 : Find the basic shell for Bourne shell scripts
1361 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1364 if test -f "$xxx"; then
1367 : Build up a list and do a single loop so we can 'break' out.
1368 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1369 for xxx in sh bash ksh pdksh ash; do
1371 try="$try ${p}/${xxx}"
1375 if test -f "$xxx"; then
1378 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1381 elif test -f "$xxx.exe"; then
1392 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1394 Usually it's in /bin/sh. How did you even get this far?
1395 Please contact me (Perl Maintainers) at perlbug@perl.org and
1396 we'll try to straighten this all out.
1402 : see if sh knows # comments
1403 if `$sh -c '#' >/dev/null 2>&1`; then
1407 test -f $xcat$_exe || xcat=/usr/bin/cat
1408 if test ! -f $xcat$_exe; then
1409 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1410 if test -f $p/cat$_exe; then
1415 if test ! -f $xcat$_exe; then
1416 echo "Can't find cat anywhere!"
1420 echo "#!$xcat" >sharp
1423 ./sharp > today 2>/dev/null
1424 if test -s today; then
1427 echo "#! $xcat" > sharp
1430 ./sharp > today 2>/dev/null
1431 if test -s today; then
1439 echo "Your $sh doesn't grok # comments--I will strip them later on."
1442 echo "exec grep -v '^[ ]*#'" >spitshell
1444 $eunicefix spitshell
1445 spitshell=`pwd`/spitshell
1447 echo "I presume that if # doesn't work, #! won't work either!"
1452 : figure out how to guarantee sh startup
1454 '') startsh=${sharpbang}${sh} ;;
1466 : echo "Yup, it does."
1468 echo "Hmm... '$startsh' does not guarantee sh startup..."
1469 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1473 : Save command line options in file UU/cmdline.opt for later use in
1474 : generating config.sh.
1475 cat > cmdline.opt <<EOSH
1476 : Configure command line arguments.
1485 cat >>cmdline.opt <<EOSH
1486 config_arg$argn='$arg'
1488 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1491 arg_exp=`cat cmdl.opt`
1492 args_exp="$args_exp$args_sep'$arg_exp'"
1493 argn=`expr $argn + 1`
1498 : produce awk script to parse command line options
1499 cat >options.awk <<'EOF'
1501 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1503 len = length(optstr);
1504 for (i = 1; i <= len; i++) {
1505 c = substr(optstr, i, 1);
1506 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1517 if (substr(str, 1, 1) != "-") {
1518 printf("'%s'\n", str);
1522 for (i = 2; i <= len; i++) {
1523 c = substr(str, i, 1);
1525 printf("-%s\n", substr(str, i));
1531 printf("'%s'\n", substr(str, i + 1));
1544 : process the command line options
1545 set X `for arg in "$@"; do echo "X$arg"; done |
1546 sed -e s/X// | awk -f options.awk`
1551 : set up default values
1561 rm -f optdef.sh posthint.sh
1562 cat >optdef.sh <<EOS
1568 while test $# -gt 0; do
1570 -d) shift; fastread=yes;;
1571 -e) shift; alldone=cont;;
1575 if test -r "$1"; then
1578 echo "$me: cannot read config file $1." >&2
1584 -h) shift; error=true;;
1585 -r) shift; reuseval=true;;
1586 -s) shift; silent=true; realsilent=true;;
1587 -E) shift; alldone=exit;;
1588 -K) shift; knowitall=true;;
1589 -O) shift; override=true;;
1590 -S) shift; silent=true; extractsh=true;;
1595 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1596 echo "$me: ignoring -D $1" >&2
1599 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1600 *) echo "$1='define'" >> optdef.sh;;
1607 *=) echo "$1" >> optdef.sh;;
1609 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1610 echo "$me: ignoring -U $1" >&2
1612 *) echo "$1='undef'" >> optdef.sh;;
1623 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
1627 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
1628 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1634 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1635 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1636 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1637 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1638 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1639 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
1645 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1647 echo "$yyy=''" >> posthint.sh ;;
1652 echo "$yyy='$zzz'" >> posthint.sh ;;
1654 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1656 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1661 echo "$yyy=$zzz" >> posthint.sh ;;
1662 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1666 -V) echo "$me generated by metaconfig 3.5 PL0." >&2
1669 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1677 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1678 [-U symbol] [-U symbol=] [-A command:symbol...]
1679 -d : use defaults for all answers.
1680 -e : go on without questioning past the production of config.sh.
1681 -f : specify an alternate default configuration file.
1682 -h : print this help message and exit (with an error status).
1683 -r : reuse C symbols value if possible (skips costly nm extraction).
1684 -s : silent mode, only echoes questions and essential information.
1685 -D : define symbol to have some value:
1686 -D symbol symbol gets the value 'define'
1687 -D symbol=value symbol gets the value 'value'
1688 common used examples (see INSTALL for more info):
1689 -Duse64bitint use 64bit integers
1690 -Duse64bitall use 64bit integers and pointers
1691 -Dusethreads use thread support
1692 -Dinc_version_list=none do not include older perl trees in @INC
1693 -DEBUGGING=none DEBUGGING options
1694 -Dcc=gcc choose your compiler
1695 -Dprefix=/opt/perl5 choose your destination
1696 -E : stop at the end of questions, after having produced config.sh.
1697 -K : do not use unless you know what you are doing.
1698 -O : let -D and -U override definitions from loaded configuration file.
1699 -S : perform variable substitutions on all .SH files (can mix with -f)
1700 -U : undefine symbol:
1701 -U symbol symbol gets the value 'undef'
1702 -U symbol= symbol gets completely empty
1704 -A : manipulate symbol after the platform specific hints have been applied:
1705 -A append:symbol=value append value to symbol
1706 -A symbol=value like append:, but with a separating space
1707 -A define:symbol=value define symbol to have value
1708 -A clear:symbol define symbol to be ''
1709 -A define:symbol define symbol to be 'define'
1710 -A eval:symbol=value define symbol to be eval of value
1711 -A prepend:symbol=value prepend value to symbol
1712 -A undef:symbol define symbol to be 'undef'
1713 -A undef:symbol= define symbol to be ''
1714 e.g.: -A prepend:libswanted='cl pthread '
1715 -A ccflags=-DSOME_MACRO
1716 -V : print version number and exit (with a zero status).
1723 case "$fastread$alldone" in
1726 case "$extractsh" in
1729 if test ! -t 0; then
1730 echo "Say 'sh Configure', not 'sh <Configure'"
1740 true) exec 1>/dev/null;;
1743 : run the defines and the undefines, if any, but leave the file out there...
1746 : create the posthint manipulation script and leave the file out there...
1751 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1752 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1753 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1754 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1755 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1758 : Some greps do not return status, grrr.
1759 echo "grimblepritz" >grimble
1760 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1762 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1768 : the following should work in any shell
1772 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1773 cat >contains <<'EOSS'
1774 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1779 : Find the path to the source tree
1782 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1786 *) src=`cd ../$src && pwd` ;;
1799 if test -f $rsrc/Configure && \
1800 $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
1802 : found it, so we are ok.
1805 for src in . .. ../.. ../../.. ../../../..; do
1806 if test -f ../$src/Configure && \
1807 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1818 Sorry, I can't seem to locate the source dir for $package. Please start
1819 Configure with an explicit path -- i.e. /some/path/Configure.
1827 echo "Sources for $package found in \"$src\"." >&4
1831 : script used to extract .SH files with variable substitutions
1832 cat >extract <<'EOS'
1834 echo "Doing variable substitutions on .SH files..."
1835 if test -f MANIFEST; then
1836 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1838 echo "(Looking for .SH files under the source directory.)"
1839 set x `(cd "$src"; find . -name "*.SH" -print)`
1843 0) set x `(cd "$src"; echo *.SH)`; shift;;
1845 if test ! -f "$src/$1"; then
1851 while test $name; do
1852 if test ! -d "$name"; then
1853 create="$name $create";
1854 name=`echo $name | sed -e "s|^[^/]*$||"`;
1855 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1860 for file in $create; do
1869 dir=`expr X$file : 'X\(.*\)/'`
1870 file=`expr X$file : 'X.*/\(.*\)'`
1871 (cd "$dir" && . ./$file)
1881 dir=`expr X$file : 'X\(.*\)/'`
1882 file=`expr X$file : 'X.*/\(.*\)'`
1883 (set x $dir; shift; eval $mkdir_p)
1884 sh <"$src/$dir/$file"
1893 if test -f "$src/config_h.SH"; then
1894 if test ! -f config.h; then
1895 : oops, they left it out of MANIFEST, probably, so do it anyway.
1896 . "$src/config_h.SH"
1901 : extract files and exit if asked to do so
1902 case "$extractsh" in
1904 case "$realsilent" in
1908 case "$config_sh" in
1909 '') config_sh='config.sh';;
1912 echo "Fetching answers from $config_sh..."
1915 test "$override" && . ./optdef.sh
1919 echo "Extraction done."
1924 : Eunice requires " " instead of "", can you believe it
1927 echo "Beginning of configuration questions for $package."
1929 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1931 : first determine how to suppress newline on echo command
1933 echo "Checking echo to see how to suppress newlines..."
1934 (echo "hi there\c" ; echo " ") >.echotmp
1935 if $contains c .echotmp >/dev/null 2>&1 ; then
1946 echo $n "The star should be here-->$c"
1950 : Now test for existence of everything in MANIFEST
1952 if test -f "$rsrc/MANIFEST"; then
1953 echo "First let's make sure your kit is complete. Checking..." >&4
1954 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
1955 (split -l 50 2>/dev/null || split -50)
1958 for filelist in x??; do
1959 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
1960 >/dev/null 2>>"$tmppwd/missing")
1962 if test -s missing; then
1966 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1968 You have the option of continuing the configuration process, despite the
1969 distinct possibility that your kit is damaged, by typing 'y'es. If you
1970 do, don't blame me if something goes wrong. I advise you to type 'n'o
1971 and contact the author (perlbug@perl.org).
1974 echo $n "Continue? [n] $c" >&4
1978 echo "Continuing..." >&4
1982 echo "ABORTING..." >&4
1987 echo "Looks good..."
1990 echo "There is no MANIFEST file. I hope your kit is complete !"
1994 : Find the appropriate value for a newline for tr
1996 if test -n "$DJGPP"; then
1999 if test X"$trnl" = X; then
2000 case "`echo foo|tr '\n' x 2>/dev/null`" in
2004 if test X"$trnl" = X; then
2005 case "`echo foo|tr '\012' x 2>/dev/null`" in
2006 foox) trnl='\012' ;;
2009 if test X"$trnl" = X; then
2010 case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
2011 fooxy) trnl='\n\r' ;;
2014 if test X"$trnl" = X; then
2017 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
2023 : compute the number of columns on the terminal for proper question formatting
2028 : set up the echo used in my read
2029 myecho="case \"\$xxxm\" in
2030 '') echo $n \"\$rp $c\" >&4;;
2032 '') echo $n \"[\$xxxm] $c\";;
2034 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
2036 echo $n \"[\$xxxm] $c\" >&4
2038 echo $n \"\$rp [\$xxxm] $c\" >&4
2044 : now set up to do reads with possible shell escape and default assignment
2050 case "\$fastread" in
2051 yes) case "\$dflt" in
2054 case "\$silent-\$rp" in
2059 *) case "\$silent" in
2060 true) case "\$rp" in
2065 while expr "X\$ans" : "X!" >/dev/null; do
2069 aok=''; eval "ans=\\"\$answ\\"" && aok=y
2077 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
2086 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
2091 echo "(OK, I'll run with -d after this question.)" >&4
2094 echo "*** Sorry, \$1 not supported yet." >&4
2104 echo "*** Substitution done -- please confirm."
2106 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
2111 echo "*** Error -- try again."
2118 case "\$ans\$xxxm\$nostick" in
2130 : create .config dir to save info across Configure sessions
2131 test -d ../.config || mkdir ../.config
2132 cat >../.config/README <<EOF
2133 This directory created by Configure to save information that should
2134 persist across sessions for $package.
2136 You may safely delete it if you wish.
2139 : See if we are using a devel version and want that
2140 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
2142 $define|true|[yY]*) ;;
2143 *) case "$xversion" in
2146 *** WHOA THERE!!! ***
2148 This is an UNSTABLE DEVELOPMENT release.
2149 The version of this $package distribution is $xversion, that is, odd,
2150 (as opposed to even) and that signifies a development release.
2151 If you want a maintenance release, you want an even-numbered version.
2153 Do ***NOT*** install this into production use.
2154 Data corruption and crashes are possible.
2156 It is most seriously suggested that you do not continue any further
2157 unless you want to help in developing and debugging Perl.
2159 If you *still* want to build perl, you can answer 'y' now,
2160 or pass -Dusedevel to Configure.
2163 rp='Do you really want to continue?'
2167 [yY]) echo >&4 "Okay, continuing."
2168 usedevel="$define" ;;
2169 *) echo >&4 "Okay, bye."
2179 case "$versiononly" in
2180 '') versiononly="$define" ;;
2182 case "$installusrbinperl" in
2183 '') installusrbinperl="$undef" ;;
2188 : general instructions
2191 user=`(logname) 2>/dev/null`
2193 '') user=`whoami 2>&1`;;
2195 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2198 rp='Would you like to see the instructions?'
2209 This installation shell script will examine your system and ask you questions
2210 to determine how the perl5 package should be installed. If you get
2211 stuck on a question, you may use a ! shell escape to start a subshell or
2212 execute a command. Many of the questions will have default answers in square
2213 brackets; typing carriage return will give you the default.
2215 On some of the questions which ask for file or directory names you are allowed
2216 to use the ~name construct to specify the login directory belonging to "name",
2217 even if you don't have a shell which knows about that. Questions where this is
2218 allowed will be marked "(~name ok)".
2222 dflt='Type carriage return to continue'
2226 The prompter used in this script allows you to use shell variables and
2227 backticks in your answers. You may use $1, $2, etc... to refer to the words
2228 in the default answer, as if the default line was a set of arguments given to a
2229 script shell. This means you may also use $* to repeat the whole default line,
2230 so you do not have to re-type everything to add something to the default.
2232 Everytime there is a substitution, you will have to confirm. If there is an
2233 error (e.g. an unmatched backtick), the default answer will remain unchanged
2234 and you will be prompted again.
2236 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2237 the questions and use the computed defaults (or the previous answers if there
2238 was already a config.sh file). Type 'Configure -h' for a list of options.
2239 You may also start interactively and then answer '& -d' at any prompt to turn
2240 on the non-interactive behaviour for the remainder of the execution.
2246 Much effort has been expended to ensure that this shell script will run on any
2247 Unix system. If despite that it blows up on yours, your best bet is to edit
2248 Configure and run it again. If you can't run Configure for some reason,
2249 you'll have to generate a config.sh file by hand. Whatever problems you
2250 have, let me (perlbug@perl.org) know how I blew it.
2252 This installation script affects things in two ways:
2254 1) it may do direct variable substitutions on some of the files included
2256 2) it builds a config.h file for inclusion in C programs. You may edit
2257 any of these files as the need arises after running this script.
2259 If you make a mistake on a question, there is no easy way to back up to it
2260 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2261 files. Configure will offer to let you do this before it runs the SH files.
2264 dflt='Type carriage return to continue'
2266 case "$firsttime" in
2267 true) echo $user >>../.config/instruct;;
2271 : find out where common programs are
2273 echo "Locating common programs..." >&4
2286 if test -d \$dir/\$thing; then
2292 for thisthing in \$dir/\$thing; do
2293 : just loop through to pick last item
2295 if test -f \$thisthing; then
2298 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2301 elif test -f \$dir/\$thing.exe; then
2302 if test -n "$DJGPP"; then
2303 echo \$dir/\$thing.exe
2304 elif test "$eunicefix" != ":"; then
2305 : on Eunice apparently
2357 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2358 pth="$pth /lib /usr/lib"
2359 for file in $loclist; do
2363 if test -f "$xxx"; then
2366 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2367 xxx=`./loc $file $file $pth`
2370 '') xxx=`./loc $file $file $pth`;;
2371 *) xxx=`./loc $xxx $xxx $pth`;;
2373 eval $file=$xxx$_exe
2377 echo $file is in $xxx.
2380 echo $file is in $xxx.
2383 echo "I don't know where '$file' is, and my life depends on it." >&4
2384 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2390 echo "Don't worry if any of the following aren't found..."
2392 for file in $trylist; do
2396 if test -f "$xxx"; then
2399 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2400 xxx=`./loc $file $file $pth`
2403 '') xxx=`./loc $file $file $pth`;;
2404 *) xxx=`./loc $xxx $xxx $pth`;;
2406 eval $file=$xxx$_exe
2410 echo $file is in $xxx.
2413 echo $file is in $xxx.
2416 echo "I don't see $file out there, $say."
2423 echo "Substituting grep for egrep."
2430 echo "Substituting cp for ln."
2439 echo "I can't find make or gmake, and my life depends on it." >&4
2440 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2448 *) # We can't have osname yet.
2449 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2450 # Assume that gmake, if found, is definitely GNU make
2451 # and prefer it over the system make.
2452 echo "Substituting gmake for make."
2460 echo "Hopefully test is built into your sh."
2463 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2464 echo "Using the test built into your sh."
2472 echo "Hopefully echo is built into your sh."
2477 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2478 $echo $n "hi there$c" >foo1
2479 echo $n "hi there$c" >foo2
2480 if cmp foo1 foo2 >/dev/null 2>&1; then
2481 echo "They are compatible. In fact, they may be identical."
2488 They are not compatible! You are probably running ksh on a non-USG system.
2489 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2490 have echo built in and we may have to run some Bourne shell scripts. That
2491 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2494 $echo $n "The star should be here-->$c"
2501 # This question was auctioned at YAPC::Europe-2007 in Vienna
2502 # I never promised you could answer it. I only auctioned the question.
2504 The following message is sponsored by
2506 Dresden.pm<--The stars should be here.
2508 Dear Perl user, system administrator or package
2509 maintainer, the Perl community sends greetings to
2510 you. Do you (emblematical) greet back [Y/n]? n
2514 : Check what type of C compiler we use
2518 cat <<'EOSC' >>trygcc
2523 int main(int argc, char *argv[]) {
2527 if $cc -o try $ccflags $ldflags try.c; then
2530 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2536 # Skip this test because it gives a false match on output like:
2537 # ./trygcc: line 23: cc: command not found
2538 # case "`$cc -v -c try.c 2>&1`" in
2539 # *gcc*) trygcc=no ;;
2541 if $test X"$trygcc" = Xyes; then
2542 if gcc -o try -c try.c; then
2544 echo "You seem to have a working gcc, though." >&4
2545 # Switching compilers may undo the work of hints files.
2546 # The most common problem is -D_REENTRANT for threads.
2547 # This heuristic catches that case, but gets false positives
2548 # if -Dusethreads was not actually specified. Better to
2549 # bail out here with a useful message than fail
2550 # mysteriously later. Should we perhaps just try to
2551 # re-invoke Configure -Dcc=gcc config_args ?
2552 if $test -f usethreads.cbu; then
2555 *** However, any setting of the C compiler flags (e.g. for thread support)
2556 *** will be lost. It may be necessary for you to restart Configure and
2557 *** add -Dcc=gcc to your Configure command line.
2560 rp="Would you like to go ahead and try gcc anyway?"
2563 rp="Would you like to use it?"
2566 if $test -f myread; then
2569 if $test -f UU/myread; then
2572 echo "Cannot find myread, sorry. Aborting." >&2
2577 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2590 cat <<'EOSC' >>checkcc
2595 int main(int argc, char *argv[]) {
2599 if $cc -o try $ccflags $ldflags try.c; then
2602 if $test X"$despair" = Xyes; then
2603 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2606 You need to find a working C compiler.
2607 Either (purchase and) install the C compiler supplied by your OS vendor,
2608 or for a free C compiler try http://gcc.gnu.org/
2609 I cannot continue any further, aborting.
2618 : determine whether symbolic links are supported
2621 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2622 echo "Symbolic links are supported." >&4
2625 echo "Symbolic links are NOT supported." >&4
2630 : determine whether symbolic links are supported
2634 echo "Checking how to test for symbolic links..." >&4
2636 if $test "X$issymlink" = X; then
2638 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2639 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2641 if test $? = 0; then
2644 echo "Your builtin 'test -h' may be broken." >&4
2647 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2650 if test -f "$p/$test"; then
2659 echo "Trying external '$test -h'." >&4
2660 issymlink="$test -h"
2661 if $test ! -h sym >/dev/null 2>&1; then
2662 echo "External '$test -h' is broken, too." >&4
2670 if $test "X$issymlink" = X; then
2671 if $test -L sym 2>/dev/null; then
2672 issymlink="$test -L"
2673 echo "The builtin '$test -L' worked." >&4
2676 if $test "X$issymlink" != X; then
2677 echo "You can test for symbolic links with '$issymlink'." >&4
2679 echo "I do not know how you can test for symbolic links." >&4
2683 *) echo "No symbolic links, so not testing for their testing..." >&4
2688 : Make symlinks util
2689 case "$mksymlinks" in
2692 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2695 *) case "$lns:$issymlink" in
2696 *"ln"*" -s:"*"test -"?)
2697 echo "Creating the symbolic links..." >&4
2698 echo "(First creating the subdirectories...)" >&4
2700 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2702 test -z "$directory" && break
2706 if test ! -d t/base; then
2707 echo "Failed to create the subdirectories. Aborting." >&4
2710 echo "(Then creating the symlinks...)" >&4
2711 awk '{print $1}' $src/MANIFEST | while true; do
2713 test -z "$filename" && break
2714 if test -f $filename; then
2715 if $issymlink $filename; then
2719 if test -f $filename; then
2720 echo "$filename already exists, not symlinking."
2722 ln -s $src/$filename $filename
2726 if test ! -f t/base/lex.t; then
2727 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2732 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2740 : Check for Cross-Compilation
2741 case "$usecrosscompile" in
2743 $echo "Cross-compiling..."
2746 *-*-gcc) # A cross-compiling gcc, probably.
2747 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2749 # leave out ld, choosing it is more complex
2751 ranlib=$targetarch-ranlib
2752 $echo 'extern int foo;' > try.c
2753 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2755 if $test $# -gt 0; then
2757 incpth="`$echo $incpth|$sed 's/^ //'`"
2758 echo "Guessing incpth '$incpth'." >&4
2760 j="`$echo $i|$sed 's,/include$,/lib,'`"
2761 if $test -d $j; then
2765 libpth="`$echo $libpth|$sed 's/^ //'`"
2766 echo "Guessing libpth '$libpth'." >&4
2771 case "$targetarch" in
2772 '') echo "Targetarch not defined." >&4; croak=y ;;
2773 *) echo "Using targetarch $targetarch." >&4 ;;
2776 '') echo "Incpth not defined." >&4; croak=y ;;
2777 *) echo "Using incpth '$incpth'." >&4 ;;
2780 '') echo "Libpth not defined." >&4; croak=y ;;
2781 *) echo "Using libpth '$libpth'." >&4 ;;
2784 '') for i in $incpth; do
2785 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2787 echo "Guessing usrinc $usrinc." >&4
2792 '') echo "Usrinc not defined." >&4; croak=y ;;
2795 *) echo "Using usrinc $usrinc." >&4 ;;
2797 case "$targethost" in
2798 '') echo "Targethost not defined." >&4; croak=y ;;
2799 *) echo "Using targethost $targethost." >&4
2804 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2807 /*) run=$src/Cross/run
2808 targetmkdir=$src/Cross/mkdir
2810 from=$src/Cross/from
2812 *) pwd=`$test -f ../Configure & cd ..; pwd`
2814 targetmkdir=$pwd/Cross/mkdir
2816 from=$pwd/Cross/from
2819 case "$targetrun" in
2820 '') targetrun=ssh ;;
2825 case "$targetfrom" in
2826 '') targetfrom=scp ;;
2830 from=$from-$targetfrom
2831 case "$targetdir" in
2833 echo "Guessing targetdir $targetdir." >&4
2836 case "$targetuser" in
2838 echo "Guessing targetuser $targetuser." >&4
2841 case "$targetfrom" in
2845 case "$targetrun" in
2857 '') cwd=$targetdir ;;
2861 if $test ! -f \$exe.xok; then
2865 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2868 *) echo "Unknown targetrun '$targetrun'" >&4
2872 case "$targetmkdir" in
2874 cat >$targetmkdir <<EOF
2876 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2878 $chmod a+rx $targetmkdir
2880 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2892 $targetmkdir \`dirname \$f\`
2893 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2896 $targetmkdir $targetdir/\`dirname \$f\`
2897 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2910 $mkdir -p $targetdir/\`dirname \$f\`
2911 $cp \$f $targetdir/\$f || exit 1
2914 $targetmkdir $targetdir/\`dirname \$f\`
2915 $cp \$f $targetdir/\$f || exit 1
2922 *) echo "Unknown targetto '$targetto'" >&4
2926 case "$targetfrom" in
2933 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2938 cp) cat >$from <<EOF
2943 cp $targetdir/\$f . || exit 1
2948 *) echo "Unknown targetfrom '$targetfrom'" >&4
2952 if $test ! -f $run; then
2953 echo "Target 'run' script '$run' not found." >&4
2957 if $test ! -f $to; then
2958 echo "Target 'to' script '$to' not found." >&4
2962 if $test ! -f $from; then
2963 echo "Target 'from' script '$from' not found." >&4
2967 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2971 Using '$run' for remote execution,
2972 and '$from' and '$to'
2973 for remote file transfer.
2979 usecrosscompile='undef'
2984 : see whether [:lower:] and [:upper:] are supported character classes
2986 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2988 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2992 *) # There is a discontinuity in EBCDIC between 'R' and 'S'
2993 # (0xd9 and 0xe2), therefore that is a nice testing point.
2994 if test "X$up" = X -o "X$low" = X; then
2995 case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in
3001 if test "X$up" = X -o "X$low" = X; then
3002 case "`echo RS | $tr R-S r-s 2>/dev/null`" in
3008 if test "X$up" = X -o "X$low" = X; then
3009 case "`echo RS | od -x 2>/dev/null`" in
3011 echo "Hey, this might be EBCDIC." >&4
3012 if test "X$up" = X -o "X$low" = X; then
3013 case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
3014 rs) up='[A-IJ-RS-Z]'
3019 if test "X$up" = X -o "X$low" = X; then
3020 case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
3030 case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in
3032 echo "Using $up and $low to convert case." >&4
3035 echo "I don't know how to translate letters from upper to lower case." >&4
3036 echo "Your tr is not acting any way I know of." >&4
3040 : set up the translation script tr, must be called with ./tr of course
3044 '[A-Z][a-z]') exec $tr '$up' '$low';;
3045 '[a-z][A-Z]') exec $tr '$low' '$up';;
3052 : Try to determine whether config.sh was made on this system
3053 case "$config_sh" in
3055 myuname=`$uname -a 2>/dev/null`
3056 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
3057 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
3058 # because the A-Z/a-z are not consecutive.
3059 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \
3060 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
3061 newmyuname="$myuname"
3063 case "$knowitall" in
3065 if test -f ../config.sh; then
3066 if $contains myuname= ../config.sh >/dev/null 2>&1; then
3067 eval "`grep myuname= ../config.sh`"
3069 if test "X$myuname" = "X$newmyuname"; then
3077 : Get old answers from old config file if Configure was run on the
3078 : same system, otherwise use the hints.
3081 if test -f config.sh; then
3083 rp="I see a config.sh file. Shall I use it to set the defaults?"
3086 n*|N*) echo "OK, I'll ignore it."
3087 mv config.sh config.sh.old
3088 myuname="$newmyuname"
3090 *) echo "Fetching default answers from your old config.sh file..." >&4
3098 : Older versions did not always set $sh. Catch re-use of such
3108 if test ! -f config.sh; then
3111 First time through, eh? I have some defaults handy for some systems
3112 that need some extra help getting the Configure answers right:
3115 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
3117 : Half the following guesses are probably wrong... If you have better
3118 : tests or hints, please send them to perlbug@perl.org
3119 : The metaconfig authors would also appreciate a copy...
3120 $test -f /irix && osname=irix
3121 $test -f /xenix && osname=sco_xenix
3122 $test -f /dynix && osname=dynix
3123 $test -f /dnix && osname=dnix
3124 $test -f /lynx.os && osname=lynxos
3125 $test -f /unicos && osname=unicos && osvers=`$uname -r`
3126 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
3127 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
3128 $test -f /bin/mips && /bin/mips && osname=mips
3129 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
3130 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
3131 $test -d /usr/apollo/bin && osname=apollo
3132 $test -f /etc/saf/_sactab && osname=svr4
3133 $test -d /usr/include/minix && osname=minix
3134 $test -f /system/gnu_library/bin/ar.pm && osname=vos
3135 if $test -d /MachTen -o -d /MachTen_Folder; then
3137 if $test -x /sbin/version; then
3138 osvers=`/sbin/version | $awk '{print $2}' |
3139 $sed -e 's/[A-Za-z]$//'`
3140 elif $test -x /usr/etc/version; then
3141 osvers=`/usr/etc/version | $awk '{print $2}' |
3142 $sed -e 's/[A-Za-z]$//'`
3148 $test -f /sys/posix.dll &&
3149 $test -f /usr/bin/what &&
3150 set X `/usr/bin/what /sys/posix.dll` &&
3151 $test "$3" = UWIN &&
3155 if $test -f $uname; then
3163 umips) osname=umips ;;
3166 [23]100) osname=mips ;;
3167 next*) osname=next ;;
3169 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
3170 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
3173 elif $test -f /etc/kconfig; then
3175 if test "$lns" = "$ln -s"; then
3177 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3179 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3186 if test -n "$DJGPP"; then
3195 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3197 # oslevel can fail with:
3198 # oslevel: Unable to acquire lock.
3199 *not\ found) osvers="$4"."$3" ;;
3200 '<3240'|'<>3240') osvers=3.2.0 ;;
3201 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3202 '=3250'|'>3250') osvers=3.2.5 ;;
3206 bsd386) osname=bsd386
3209 cygwin*) osname=cygwin
3212 *dc.osx) osname=dcosx
3218 domainos) osname=apollo
3224 dragonfly) osname=dragonfly
3227 dynixptx*) osname=dynixptx
3228 osvers=`echo "$4"|sed 's/^v//'`
3230 freebsd) osname=freebsd
3232 genix) osname=genix ;;
3236 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3252 netbsd*) osname=netbsd
3255 news-os) osvers="$3"
3257 4*) osname=newsos4 ;;
3261 next*) osname=next ;;
3262 nonstop-ux) osname=nonstopux ;;
3263 openbsd) osname=openbsd
3269 POSIX-BC | posix-bc ) osname=posix-bc
3272 powerux | power_ux | powermax_os | powermaxos | \
3273 powerunix | power_unix) osname=powerux
3279 solaris) osname=solaris
3281 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3288 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3292 titanos) osname=titanos
3301 ultrix) osname=ultrix
3304 osf1|mls+) case "$5" in
3307 osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3310 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3313 hp*) osname=hp_osf1 ;;
3314 mips) osname=mips_osf1 ;;
3317 # UnixWare 7.1.2 is known as Open UNIX 8
3318 openunix|unixware) osname=svr5
3326 $2) case "$osname" in
3330 : svr4.x or possibly later
3340 if test -f /stand/boot ; then
3341 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3342 if test -n "$INITPROG" -a -f "$INITPROG"; then
3343 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3344 if test -n "$isesix"; then
3352 *) if test -f /etc/systemid; then
3354 set `echo $3 | $sed 's/\./ /g'` $4
3355 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3357 elif $test -f $src/hints/sco_$1_$2.sh; then
3359 elif $test -f $src/hints/sco_$1.sh; then
3364 '') : Still unknown. Probably a generic Sys V.
3373 *) case "$osname" in
3374 '') : Still unknown. Probably a generic BSD.
3382 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3383 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3384 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3387 $rm -f UU/kernel.what
3388 elif test -d c:/. -o -n "$is_os2" ; then
3395 case "$targetarch" in
3398 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3403 : Now look for a hint file osname_osvers, unless one has been
3404 : specified already.
3407 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3408 : Also try without trailing minor version numbers.
3409 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3410 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3411 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3412 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3415 *) case "$osvers" in
3418 *) if $test -f $src/hints/$file.sh ; then
3420 elif $test -f $src/hints/$xfile.sh ; then
3422 elif $test -f $src/hints/$xxfile.sh ; then
3424 elif $test -f $src/hints/$xxxfile.sh ; then
3426 elif $test -f $src/hints/$xxxxfile.sh ; then
3428 elif $test -f "$src/hints/${osname}.sh" ; then
3437 if $test -f Policy.sh ; then
3440 none) dflt="Policy" ;;
3441 *) dflt="Policy $dflt" ;;
3446 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3450 if $test -f Policy.sh ; then
3453 There's also a Policy hint file available, which should make the
3454 site-specific (policy) questions easier to answer.
3461 You may give one or more space-separated answers, or "none" if appropriate.
3462 If you have a handcrafted Policy.sh file or a Policy.sh file generated by a
3463 previous run of Configure, you may specify it as well as or instead of
3464 OS-specific hints. If hints are provided for your OS, you should use them:
3465 although Perl can probably be built without hints on many platforms, using
3466 hints often improve performance and may enable features that Configure can't
3467 set up on its own. If there are no hints that match your OS, specify "none";
3468 DO NOT give a wrong version or a wrong OS.
3472 rp="Which of these apply, if any?"
3475 for file in $tans; do
3476 if $test X$file = XPolicy -a -f Policy.sh; then
3478 $cat Policy.sh >> UU/config.sh
3479 elif $test -f $src/hints/$file.sh; then
3480 . $src/hints/$file.sh
3481 $cat $src/hints/$file.sh >> UU/config.sh
3482 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3485 : Give one chance to correct a possible typo.
3486 echo "$file.sh does not exist"
3488 rp="hint to use instead?"
3490 for file in $ans; do
3491 if $test -f "$src/hints/$file.sh"; then
3492 . $src/hints/$file.sh
3493 $cat $src/hints/$file.sh >> UU/config.sh
3494 elif $test X$ans = X -o X$ans = Xnone ; then
3497 echo "$file.sh does not exist -- ignored."
3504 : Remember our hint file for later.
3505 if $test -f "$src/hints/$file.sh" ; then
3515 echo "Fetching default answers from $config_sh..." >&4
3519 cp $config_sh config.sh 2>/dev/null
3529 test "$override" && . ./optdef.sh
3531 : Restore computed paths
3532 for file in $loclist $trylist; do
3533 eval $file="\$_$file"
3538 Configure uses the operating system name and version to set some defaults.
3539 The default value is probably right if the name rings a bell. Otherwise,
3540 since spelling matters for me, either accept the default or answer "none"
3547 ''|' '|none) dflt=none ;;
3548 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3551 *) dflt="$osname" ;;
3553 rp="Operating system name?"
3557 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3563 ''|' '|none) dflt=none ;;
3564 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3565 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3567 ''|' ') dflt=none ;;
3572 *) dflt="$osvers" ;;
3574 rp="Operating system version?"
3584 : who configured the system
3585 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3588 cf_by=`(logname) 2>/dev/null`
3591 cf_by=`(whoami) 2>/dev/null`
3593 "") cf_by=unknown ;;
3598 : decide how portable to be. Allow command line overrides.
3599 case "$d_portable" in
3601 *) d_portable="$define" ;;
3604 : set up shell script to do ~ expansion
3610 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3613 if $test -f /bin/csh; then
3614 /bin/csh -f -c "glob \$1"
3619 name=\`$expr x\$1 : '..\([^/]*\)'\`
3620 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3621 if $test ! -d "\$dir"; then
3623 echo "\$me: can't locate home directory for: \$name" >&2
3628 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3644 : now set up to get a file name
3648 cat <<'EOSC' >>getfile
3664 : getfile will accept an answer from the comma-separated list
3665 : enclosed in parentheses even if it does not meet other criteria.
3666 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3667 fn=`echo $fn | sed 's/(.*)//'`
3673 loc_file=`expr $fn : '.*:\(.*\)'`
3674 fn=`expr $fn : '\(.*\):.*'`
3682 */*) fullpath=true;;
3691 *e*) exp_file=true;;
3694 *p*) nopath_ok=true;;
3699 *d*) type='Directory';;
3700 *l*) type='Locate';;
3705 Locate) what='File';;
3710 case "$d_portable" in
3718 while test "$type"; do
3723 true) rp="$rp (~name ok)";;
3726 if test -f UU/getfile.ok && \
3727 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3746 value=`UU/filexp $ans`
3749 if test "$ans" != "$value"; then
3750 echo "(That expands to $value on this system.)"
3764 /*) value="$ansexp" ;;
3765 [a-zA-Z]:/*) value="$ansexp" ;;
3770 echo "I shall only accept a full path name, as in /bin/ls." >&4
3771 echo "Use a ! shell escape if you wish to check pathnames." >&4
3774 echo "Please give a full path name, starting with slash." >&4
3777 echo "Note that using ~name is ok provided it expands well." >&4
3790 for fp in $gfpth; do
3791 if test "X$fp" = X.; then
3796 if test -f "$pf"; then
3798 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
3800 echo "($value is not a plain file, but that's ok.)"
3803 if test X"$type" = X; then
3810 for fp in $gfpth; do
3811 if test "X$fp" = X.; then
3816 direxp="$fp/$ansexp"
3818 if test -d "$direxp"; then
3826 if test -d "$ansexp"; then
3827 echo "(Looking for $loc_file in directory $value.)"
3828 value="$value/$loc_file"
3829 ansexp="$ansexp/$loc_file"
3831 if test -f "$ansexp"; then
3834 case "$nopath_ok" in
3835 true) case "$value" in
3837 *) echo "Assuming $value will be in people's path."
3853 if test "$fastread" = yes; then
3858 rp="$what $value doesn't exist. Use that name anyway?"
3877 test "X$gfpthkeep" != Xy && gfpth=""
3880 : determine root of directory hierarchy where package will be installed.
3883 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
3886 dflt=`echo "$prefix" | sed 's/.$//'`
3894 By default, $package will be installed in $dflt/bin, manual pages
3895 under $dflt/man, etc..., i.e. with $dflt as prefix for all
3896 installation directories. Typically this is something like /usr/local.
3897 If you wish to have binaries under /usr/bin but other parts of the
3898 installation under /usr/local, that's ok: you will be prompted
3899 separately for each of the installation directories, the prefix being
3900 only used to set the defaults.
3904 rp='Installation prefix to use?'
3912 *) oldprefix="$prefix";;
3919 : allow them to override the AFS root
3922 *) afsroot=$afsroot ;;
3928 $define|true) afs=true ;;
3929 $undef|false) afs=false ;;
3930 *) if $test -d $afsroot; then
3938 echo "AFS may be running... I'll be extra cautious then..." >&4
3940 echo "AFS does not seem to be running..." >&4
3943 : determine installation prefix for where package is to be installed.
3947 Since you are running AFS, I need to distinguish the directory in which
3948 files will reside from the directory in which they are installed (and from
3949 which they are presumably copied to the former directory by occult means).
3952 case "$installprefix" in
3953 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
3954 *) dflt="$installprefix";;
3959 In some special cases, particularly when building $package for distribution,
3960 it is convenient to distinguish the directory in which files should be
3961 installed from the directory ($prefix) in which they will
3962 eventually reside. For most users, these two directories are the same.
3965 case "$installprefix" in
3967 *) dflt=$installprefix;;
3971 rp='What installation prefix should I use for installing files?'
3973 installprefix="$ans"
3974 installprefixexp="$ansexp"
3976 : Perform the prefixexp/installprefixexp correction if necessary
3977 cat <<EOS >installprefix
3980 cat <<'EOSC' >>installprefix
3981 : Change installation prefix, if necessary.
3982 if $test X"$prefix" != X"$installprefix"; then
3983 eval "install${prefixvar}=\`echo \$${prefixvar}exp | sed \"s#^\$prefixexp#\$installprefixexp#\"\`"
3985 eval "install${prefixvar}=\"\$${prefixvar}exp\""
3988 chmod +x installprefix
3989 $eunicefix installprefix
3991 : Set variables such as privlib and privlibexp from the output of ./getfile
3992 : performing the prefixexp/installprefixexp correction if necessary.
3993 cat <<EOS >setprefixvar
3996 cat <<'EOSC' >>setprefixvar
3997 eval "${prefixvar}=\"\$ans\""
3998 eval "${prefixvar}exp=\"\$ansexp\""
4001 chmod +x setprefixvar
4002 $eunicefix setprefixvar
4004 : set up the script used to warn in case of inconsistency
4013 '') echo "The $hint value for \$$var on this machine was \"$was\"!" >&4
4015 *) echo "Hmm. Based on the hints in hints/$hintfile.sh, " >&4
4016 echo "the $hint value for \$$var on this machine was \"$was\"!" >&4
4021 echo "*** WHOA THERE!!! ***" >&4
4022 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
4025 rp=" Keep the $hint value?"
4028 y) td=$was; tu=$was;;
4032 : function used to set '$1' to '$val'
4033 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
4035 $define$undef) . ./whoa; eval "$var=\$td";;
4036 $undef$define) . ./whoa; eval "$var=\$tu";;
4037 *) eval "$var=$val";;
4040 : Check is we will use socks
4042 $define|true|[yY]*) dflt='y';;
4047 Perl can be built to use the SOCKS proxy protocol library. To do so,
4048 Configure must be run with -Dusesocks. If you use SOCKS you also need
4049 to use the PerlIO abstraction layer, this will be implicitly selected.
4051 If this doesn't make any sense to you, just accept the default '$dflt'.
4053 rp='Build Perl for SOCKS?'
4056 y|Y) val="$define" ;;
4063 $define|true|[yY]*) useperlio="$define";;
4066 : Check if we want perlio
4067 case "$useperlio" in
4068 $define|true|[yY]*|'') dflt='y';;
4073 Previous version of $package used the standard IO mechanisms as
4074 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
4075 alternate IO mechanisms via the PerlIO abstraction layer, but the
4076 stdio mechanism is still available if needed. The abstraction layer
4077 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
4078 Using PerlIO with sfio may cause problems with some extension modules.
4080 If this doesn't make any sense to you, just accept the default '$dflt'.
4082 rp='Use the PerlIO abstraction layer?'
4089 echo "Ok, doing things the stdio way."
4098 case "$useperlio" in
4099 $define|true|[yY]*) ;;
4102 You are using the SOCKS proxy protocol library which means that you
4103 should also use the PerlIO layer. You may be headed for trouble.
4111 : get the patchlevel
4113 echo "Getting the current patchlevel..." >&4
4114 if $test -r $rsrc/patchlevel.h;then
4115 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
4116 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
4117 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4118 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
4119 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
4120 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4121 perl_patchlevel=`egrep ',"(MAINT|SMOKE)[0-9][0-9]*"' $rsrc/patchlevel.h|tail -1|sed 's/[^0-9]//g'`
4130 $echo "(You do not have patchlevel.h. Eek.)"
4132 if $test -r $rsrc/.patch ; then
4133 if $test "X$perl_patchlevel" = "X" || $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
4134 perl_patchlevel=`cat $rsrc/.patch`
4137 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
4138 version_patchlevel_string="version $patchlevel subversion $subversion"
4139 case "$perl_patchlevel" in
4141 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
4144 $echo "(You have $package $version_patchlevel_string.)"
4148 : XXX Should be a Configure test for double-dots in filenames.
4149 version=`echo $revision $patchlevel $subversion | \
4150 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
4151 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4152 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
4155 version=`echo $revision $patchlevel $subversion | \
4156 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
4157 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4158 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
4161 : Special case the 5.005_xx maintenance series, which used 5.005
4162 : without any subversion label as a subdirectory in $sitelib
4163 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
4164 api_versionstring='5.005'
4167 : Do we want threads support and if so, what type
4168 case "$usethreads" in
4169 $define|true|[yY]*) dflt='y';;
4170 *) # Catch case where user specified ithreads or 5005threads but
4171 # forgot -Dusethreads (A.D. 4/2002)
4172 case "$useithreads$use5005threads" in
4174 case "$useperlio" in
4175 "$define") dflt='y' ;;
4185 Perl can be built to take advantage of threads on some systems.
4186 To do so, Configure can be run with -Dusethreads.
4188 Note that Perl built with threading support runs slightly slower
4189 and uses more memory than plain Perl. The current implementation
4190 is believed to be stable, but it is fairly new, and so should be
4191 treated with caution.
4193 If this doesn't make any sense to you, just accept the default '$dflt'.
4195 rp='Build a threading Perl?'
4198 y|Y) val="$define" ;;
4204 if $test $patchlevel -lt 9; then
4205 case "$usethreads" in
4209 Since release 5.6, Perl has had two different threading implementations,
4210 the newer interpreter-based version (ithreads) with one interpreter per
4211 thread, and the older 5.005 version (5005threads).
4212 The 5005threads version is effectively unmaintained and will probably be
4213 removed in Perl 5.10, so there should be no need to build a Perl using it
4214 unless needed for backwards compatibility with some existing 5.005threads
4218 : Default to ithreads unless overridden on command line or with
4221 case "$use5005threads" in
4222 $define|true|[yY]*) dflt='n';;
4224 case "$useithreads" in
4225 $undef|false|[nN]*) dflt='n';;
4227 rp='Use the newer interpreter-based ithreads?'
4230 y|Y) val="$define" ;;
4235 : Now set use5005threads to the opposite value.
4236 case "$useithreads" in
4237 $define) val="$undef" ;;
4244 useithreads="$undef"
4245 use5005threads="$undef"
4249 case "$useithreads$use5005threads" in
4253 You cannot have both the ithreads and the 5.005 threads enabled
4254 at the same time. Disabling the 5.005 threads since they are
4255 much less stable than the ithreads.
4258 use5005threads="$undef"
4263 : perl-5.9.x and later
4265 if test X"$usethreads" = "X$define"; then
4266 case "$use5005threads" in
4270 5.005 threads has been removed for 5.10. Perl will be built using ithreads.
4277 use5005threads="$undef"
4278 useithreads="$usethreads"
4281 if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then
4284 *** To build with ithreads you must also use the PerlIO layer.
4285 *** Cannot continue, aborting.
4291 case "$d_oldpthreads" in
4292 '') : Configure tests would be welcome here. For now, assume undef.
4294 *) val="$d_oldpthreads" ;;
4300 : Look for a hint-file generated 'call-back-unit'. If the
4301 : user has specified that a threading perl is to be built,
4302 : we may need to set or change some other defaults.
4303 if $test -f usethreads.cbu; then
4304 echo "Your platform has some specific hints regarding threaded builds, using them..."
4307 case "$usethreads" in
4308 "$define"|true|[yY]*)
4310 (Your platform does not have any specific hints for threaded builds.
4311 Assuming POSIX threads, then.)
4317 : Check if multiplicity is required
4320 Perl can be built so that multiple Perl interpreters can coexist
4321 within the same Perl executable.
4324 case "$useithreads" in
4327 This multiple interpreter support is required for interpreter-based threads.
4331 *) case "$usemultiplicity" in
4332 $define|true|[yY]*) dflt='y';;
4336 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
4337 rp='Build Perl for multiplicity?'
4340 y|Y) val="$define" ;;
4348 : Check if morebits is requested
4349 case "$usemorebits" in
4350 "$define"|true|[yY]*)
4351 use64bitint="$define"
4352 uselongdouble="$define"
4353 usemorebits="$define"
4355 *) usemorebits="$undef"
4359 : Determine the C compiler to be used
4365 rp="Use which C compiler?"
4369 : See whether they have no cc but they do have gcc
4371 if $test -f cc.cbu; then
4376 : make some quick guesses about what we are up against
4378 $echo $n "Hmm... $c"
4388 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
4389 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
4391 echo "Looks kind of like an OSF/1 system, but we'll see..."
4393 elif test `echo abc | $tr a-z A-Z` = Abc ; then
4394 xxx=`./loc addbib blurfl $pth`
4395 if $test -f $xxx; then
4396 echo "Looks kind of like a USG system with BSD features, but we'll see..."
4400 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
4401 echo "Looks kind of like an extended USG system, but we'll see..."
4403 echo "Looks kind of like a USG system, but we'll see..."
4407 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
4408 echo "Looks kind of like a BSD system, but we'll see..."
4412 echo "Looks kind of like a Version 7 system, but we'll see..."
4415 case "$eunicefix" in
4418 There is, however, a strange, musty smell in the air that reminds me of
4419 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
4423 : it so happens the Eunice I know will not run shell scripts in Unix format
4427 echo "Congratulations. You aren't running Eunice."
4431 : Detect OS2. The p_ variable is set above in the Head.U unit.
4432 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
4433 : semicolon as a patch separator
4438 I have the feeling something is not exactly right, however...don't tell me...
4439 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
4440 (Or you may be running DOS with DJGPP.)
4445 if test -f /xenix; then
4446 echo "Actually, this looks more like a XENIX system..."
4451 echo "It's not Xenix..."
4456 if test -f /venix; then
4457 echo "Actually, this looks more like a VENIX system..."
4464 echo "Nor is it Venix..."
4467 chmod +x bsd usg v7 osf1 eunice xenix venix os2
4468 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
4471 : Check if we are using GNU gcc and what its version is
4473 echo "Checking for GNU cc in disguise and/or its version number..." >&4
4477 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
4479 printf("%s\n", __VERSION__);
4481 printf("%s\n", "1");
4487 if $cc -o try $ccflags $ldflags try.c; then
4488 gccversion=`$run ./try`
4489 case "$gccversion" in
4490 '') echo "You are not using GNU cc." ;;
4491 *) echo "You are using GNU cc $gccversion."
4497 echo "*** WHOA THERE!!! ***" >&4
4498 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
4499 case "$knowitall" in
4501 echo " You'd better start hunting for one and let me know about it." >&4
4507 case "$gccversion" in
4508 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
4510 case "$gccversion" in
4511 '') gccosandvers='' ;;
4512 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
4513 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
4515 case "$gccosandvers" in
4516 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
4517 $osname$osvers) ;; # looking good
4518 $osname*) cat <<EOM >&4
4520 *** WHOA THERE!!! ***
4522 Your gcc has not been compiled for the exact release of
4523 your operating system ($gccosandvers versus $osname$osvers).
4525 In general it is a good idea to keep gcc synchronized with
4526 the operating system because otherwise serious problems
4527 may ensue when trying to compile software, like Perl.
4529 I'm trying to be optimistic here, though, and will continue.
4530 If later during the configuration and build icky compilation
4531 problems appear (headerfile conflicts being the most common
4532 manifestation), I suggest reinstalling the gcc to match
4533 your operating system release.
4537 *) gccosandvers='' ;; # failed to parse, better be silent
4545 # gcc 3.* complain about adding -Idirectories that they already know about,
4546 # so we will take those off from locincpth.
4547 case "$gccversion" in
4549 echo "main(){}">try.c
4550 for incdir in $locincpth; do
4551 warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
4552 grep '^c[cp]p*[01]: warning: changing search order '`
4553 if test "X$warn" != X; then
4554 locincpth=`echo " $locincpth " | sed "s! $incdir ! !"`
4560 : What should the include directory be ?
4562 $echo $n "Hmm... $c"
4566 if $test -f /bin/mips && /bin/mips; then
4567 echo "Looks like a MIPS system..."
4568 $cat >usr.c <<'EOCP'
4569 #ifdef SYSTYPE_BSD43
4573 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4574 dflt='/bsd43/usr/include'
4578 mips_type='System V'
4580 $rm -f usr.c usr.out
4581 echo "and you're compiling with the $mips_type compiler and libraries."
4585 echo "Doesn't look like a MIPS system."
4595 case "$xxx_prompt" in
4598 rp='Where are the include files you want to use?'
4606 : see how we invoke the C preprocessor
4608 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4609 cat <<'EOT' >testcpp.c
4615 if test ! -f cppstdin; then
4616 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4617 # AIX cc -E doesn't show the absolute headerfile
4618 # locations but we'll cheat by using the -M flag.
4619 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
4621 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4624 echo "Keeping your $hint cppstdin wrapper."
4627 wrapper=`pwd`/cppstdin
4631 if $test "X$cppstdin" != "X" && \
4632 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4633 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4635 echo "You used to use $cppstdin $cppminus so we'll use that again."
4637 '') echo "But let's see if we can live without a wrapper..." ;;
4639 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4640 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4642 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4645 echo "(However, $cpprun $cpplast does not work, let's see...)"
4653 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4660 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4661 $cc -E <testcpp.c >testcpp.out 2>&1; \
4662 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4663 echo "Yup, it does."
4666 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4667 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4668 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4669 echo "Yup, it does."
4672 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4673 $cc -P <testcpp.c >testcpp.out 2>&1; \
4674 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4675 echo "Yipee, that works!"
4678 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4679 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4680 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4681 echo "At long last!"
4684 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4685 $cpp <testcpp.c >testcpp.out 2>&1; \
4686 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4690 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4691 $cpp - <testcpp.c >testcpp.out 2>&1; \
4692 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4693 echo "Hooray, it works! I was beginning to wonder."
4696 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4697 $wrapper <testcpp.c >testcpp.out 2>&1; \
4698 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4704 rp="No dice. I can't find a C preprocessor. Name one:"
4708 $x_cpp <testcpp.c >testcpp.out 2>&1
4709 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4710 echo "OK, that will do." >&4
4712 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4727 echo "Perhaps can we force $cc -E using a wrapper..."
4728 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4729 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4735 echo "Nope, we'll have to live without it..."
4749 "$wrapper"|'cppstdin') ;;
4750 *) $rm -f $wrapper;;
4752 $rm -f testcpp.c testcpp.out
4754 : Set private lib path
4757 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4762 '') dlist="$loclibpth $plibpth $glibpth";;
4763 *) dlist="$libpth";;
4766 : Now check and see which directories actually exist, avoiding duplicates
4770 if $test -d $xxx; then
4773 *) libpth="$libpth $xxx";;
4779 Some systems have incompatible or broken versions of libraries. Among
4780 the directories listed in the question below, please remove any you
4781 know not to be holding relevant libraries, and add any that are needed.
4782 Say "none" for none.
4793 rp="Directories to use for library searches?"
4800 : compute shared library extension
4803 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4813 On some systems, shared libraries may be available. Answer 'none' if
4814 you want to suppress searching of shared libraries for the remainder
4815 of this configuration.
4818 rp='What is the file extension used for shared libraries?'
4822 : Define several unixisms.
4823 : Hints files or command line option can be used to override them.
4824 : The convoluted testing is in case hints files set either the old
4827 '') case "$exe_ext" in
4829 *) _exe="$exe_ext" ;;
4834 '') case "$lib_ext" in
4841 '') case "$obj_ext" in
4848 '') case "$path_sep" in
4859 rm_try="$rm -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*"
4861 : Which makefile gets called first. This is used by make depend.
4862 case "$firstmakefile" in
4863 '') firstmakefile='makefile';;
4866 : Check for uselongdouble support
4868 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
4871 case "$uselongdouble" in
4872 $define|true|[yY]*) dflt='y';;
4877 Perl can be built to take advantage of long doubles which
4878 (if available) may give more accuracy and range for floating point numbers.
4880 If this doesn't make any sense to you, just accept the default '$dflt'.
4882 rp='Try to use long doubles if available?'
4885 y|Y) val="$define" ;;
4891 case "$uselongdouble" in
4892 true|[yY]*) uselongdouble="$define" ;;
4895 : Look for a hint-file generated 'call-back-unit'. If the
4896 : user has specified that long doubles should be used,
4897 : we may need to set or change some other defaults.
4898 if $test -f uselongdouble.cbu; then
4899 echo "Your platform has some specific hints regarding long doubles, using them..."
4900 . ./uselongdouble.cbu
4902 case "$uselongdouble" in
4905 (Your platform does not have any specific hints for long doubles.)
4911 : Looking for optional libraries
4913 echo "Checking for optional libraries..." >&4
4918 case "$libswanted" in
4919 '') libswanted='c_s';;
4922 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4928 for thisdir in $libpth $xlibpth; do
4929 test -d $thisdir && libspath="$libspath $thisdir"
4931 for thislib in $libswanted; do
4932 for thisdir in $libspath; do
4934 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4935 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4936 $test -f "$xxx" && eval $libscheck
4937 $test -f "$xxx" && libstyle=shared
4939 if test ! -f "$xxx"; then
4940 xxx=$thisdir/lib$thislib.$so
4941 $test -f "$xxx" && eval $libscheck
4942 $test -f "$xxx" && libstyle=shared
4944 if test ! -f "$xxx"; then
4945 xxx=$thisdir/lib$thislib$_a
4946 $test -f "$xxx" && eval $libscheck
4947 $test -f "$xxx" && libstyle=static
4949 if test ! -f "$xxx"; then
4950 xxx=$thisdir/$thislib$_a
4951 $test -f "$xxx" && eval $libscheck
4952 $test -f "$xxx" && libstyle=static
4954 if test ! -f "$xxx"; then
4955 xxx=$thisdir/lib${thislib}_s$_a
4956 $test -f "$xxx" && eval $libscheck
4957 $test -f "$xxx" && libstyle=static
4958 $test -f "$xxx" && thislib=${thislib}_s
4960 if test ! -f "$xxx"; then
4961 xxx=$thisdir/Slib$thislib$_a
4962 $test -f "$xxx" && eval $libscheck
4963 $test -f "$xxx" && libstyle=static
4965 if $test -f "$xxx"; then
4967 shared) echo "Found -l$thislib (shared)." ;;
4968 static) echo "Found -l$thislib." ;;
4969 *) echo "Found -l$thislib ($libstyle)." ;;
4973 *) dflt="$dflt -l$thislib"
4974 libsfound="$libsfound $xxx"
4976 libsfiles="$libsfiles $yyy"
4977 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4978 case " $libsdirs " in
4980 *) libsdirs="$libsdirs $yyy" ;;
4987 if $test ! -f "$xxx"; then
4988 echo "No -l$thislib."
4999 ' '|'') dflt='none';;
5004 In order to compile $package on your machine, a number of libraries
5005 are usually needed. Include any other special libraries here as well.
5006 Say "none" for none. The default list is almost always right.
5010 rp="What libraries to use?"
5017 : determine optimization, if desired, or use for debug flag also
5019 ' '|$undef) dflt='none';;
5021 *) dflt="$optimize";;
5025 By default, $package compiles with the -O flag to use the optimizer.
5026 Alternately, you might want to use the symbolic debugger, which uses
5027 the -g flag (on traditional Unix systems). Either flag can be
5028 specified here. To use neither flag, specify the word "none".
5031 rp="What optimizer/debugger flag should be used?"
5035 'none') optimize=" ";;
5038 : Check what DEBUGGING is required from the command line
5039 : -DEBUGGING or -DDEBUGGING or
5040 : -DEBUGGING=both = -g + -DDEBUGGING
5041 : -DEBUGGING=-g or -Doptimize=-g = -g
5042 : -DEBUGGING=none or -UDEBUGGING =
5043 : -DEBUGGING=old or -DEBUGGING=default = ? $optimize
5046 *) DEBUGGING=$EBUGGING ;;
5049 case "$DEBUGGING" in
5053 *) optimize="$optimize -g" ;;
5057 *-g*) set `echo "X $optimize " | sed 's/ -g / /'`
5065 case "$DEBUGGING" in
5066 both|$define) dflt='-DDEBUGGING'
5069 : argument order is deliberate, as the flag will start with - which set could
5070 : think is an option
5071 checkccflag='check=$1; flag=$2; callback=$3;
5073 echo "Checking if your compiler accepts $flag" 2>&1;
5074 echo "int main(void) { return 0; }" > gcctest.c;
5075 if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && ./gcctest; then
5076 echo "Yes, it does." 2>&1;
5077 if $test -s gcctest.out ; then
5078 echo "But your platform does not like it:";
5083 echo "Leaving current flags $ccflags alone." 2>&1
5085 *) dflt="$dflt $flag";
5091 echo "Nope, it does not, but that is ok." 2>&1;
5095 : We will not override a previous value, but we might want to
5096 : augment a hint file
5098 default|recommended)
5099 case "$gccversion" in
5100 1*) dflt="$dflt -fpcc-struct-return" ;;
5102 case "$optimize:$DEBUGGING" in
5103 *-g*:old) dflt="$dflt -DDEBUGGING";;
5105 case "$gccversion" in
5106 2*) if $test -d /etc/conf/kconfig.d &&
5107 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
5109 # Interactive Systems (ISC) POSIX mode.
5114 case "$gccversion" in
5117 ?*) set strict-aliasing -fno-strict-aliasing
5121 # For gcc, adding -pipe speeds up compilations for some, but apparently
5122 # some assemblers can't read from stdin. (It also slows down compilations
5123 # in other cases, but those are apparently rarer these days.) AD 5/2004.
5124 case "$gccversion" in
5130 # on x86_64 (at least) we require an extra library (libssp) in the
5131 # link command line. This library is not named, so I infer that it is
5132 # an implementation detail that may change. Hence the safest approach
5133 # is to add the flag to the flags passed to the compiler at link time,
5134 # as that way the compiler can do the right implementation dependant
5136 case "$gccversion" in
5137 ?*) set stack-protector -fstack-protector
5144 case "$mips_type" in
5145 *BSD*|'') inclwanted="$locincpth $usrinc";;
5146 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
5148 for thisincl in $inclwanted; do
5149 if $test -d $thisincl; then
5150 if $test x$thisincl != x$usrinc; then
5152 *" -I$thisincl "*);;
5153 *) dflt="$dflt -I$thisincl ";;
5159 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
5161 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
5169 *) dflt="$dflt -D$2";;
5173 set signal.h LANGUAGE_C; eval $inctest
5177 ccflags="$ccflags -DSOCKS"
5182 default|recommended) dflt="$ccflags $dflt" ;;
5183 *) dflt="$ccflags";;
5192 Your C compiler may want other flags. For this question you should include
5193 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
5194 but you should NOT include libraries or ld flags like -lwhatever. If you
5195 want $package to honor its debug switch, you should include -DDEBUGGING here.
5196 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
5198 To use no flags, specify the word "none".
5204 rp="Any additional cc flags?"
5211 : the following weeds options from ccflags that are of no interest to cpp
5213 '') cppflags="$ccflags" ;;
5214 *) cppflags="$cppflags $ccflags" ;;
5216 case "$gccversion" in
5217 1*) cppflags="$cppflags -D__GNUC__"
5219 case "$mips_type" in
5221 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
5227 echo "Let me guess what the preprocessor flags are..." >&4
5241 *) ftry="$previous $flag";;
5243 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
5244 >cpp1.out 2>/dev/null && \
5245 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
5246 >cpp2.out 2>/dev/null && \
5247 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
5248 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
5250 cppflags="$cppflags $ftry"
5260 *-*) echo "They appear to be: $cppflags";;
5262 $rm -f cpp.c cpp?.out
5266 : flags used in final linking phase
5268 '') if ./venix; then
5274 *-posix*) dflt="$dflt -posix" ;;
5277 *) dflt="$ldflags";;
5279 # See note above about -fstack-protector
5281 *-fstack-protector*)
5283 *-fstack-protector*) ;; # Don't add it again
5284 *) dflt="$dflt -fstack-protector" ;;
5289 : Try to guess additional flags to pick up local libraries.
5290 for thislibdir in $libpth; do
5291 case " $loclibpth " in
5294 *"-L$thislibdir "*) ;;
5295 *) dflt="$dflt -L$thislibdir" ;;
5307 Your C linker may need flags. For this question you should
5308 include -L/whatever and any other flags used by the C linker, but you
5309 should NOT include libraries like -lwhatever.
5311 Make sure you include the appropriate -L/path flags if your C linker
5312 does not normally search all of the directories you specified above,
5315 To use no flags, specify the word "none".
5319 rp="Any additional ld flags (NOT including libraries)?"
5325 rmlist="$rmlist pdp11"
5329 echo "Checking your choice of C compiler and flags for coherency..." >&4
5330 $cat > try.c <<'EOF'
5332 int main() { printf("Ok\n"); return(0); }
5334 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
5336 $cat >try.msg <<'EOM'
5337 I've tried to compile and run the following simple program:
5340 $cat try.c >> try.msg
5342 $cat >> try.msg <<EOM
5349 and I got the following output:
5353 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
5354 if $sh -c "$run ./try " >>try.msg 2>&1; then
5358 *) echo 'The program compiled OK, but produced no output.' >> try.msg
5361 cat >> try.msg <<'EOQS'
5362 If $libs contains -lsfio, and sfio is mis-configured, then it
5363 sometimes (apparently) runs and exits with a 0 status, but with no
5364 output! It may have to do with sfio's use of _exit vs. exit.
5367 rp="You have a big problem. Shall I abort Configure"
5374 echo "The program compiled OK, but exited with status $?." >>try.msg
5375 rp="You have a problem. Shall I abort Configure"
5379 echo "I can't compile the test program." >>try.msg
5380 rp="You have a BIG problem. Shall I abort Configure"
5386 case "$knowitall" in
5388 echo "(The supplied flags or libraries might be incorrect.)"
5396 *) echo "Ok. Stopping Configure." >&4
5401 n) echo "OK, that should do.";;
5403 $rm_try gcctest gcctest.out
5405 : define a shorthand compile call
5409 case "$usedevel" in $define|true|[yY]*) if $test ! -f "${mc_file}.c"; then
5410 echo "Internal Configure script bug - compiler test file ${mc_file}.c is missing. Please report this to perlbug@perl.org" >&4;
5414 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
5415 : define a shorthand compile call for compilations that should be ok.
5419 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
5421 : determine filename position in cpp output
5423 echo "Computing filename position in cpp output for #include directives..." >&4
5425 vos) testaccess=-e ;;
5428 echo '#include <stdio.h>' > foo.c
5431 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5432 $grep '^[ ]*#.*stdio\.h' | \
5433 while read cline; do
5436 while $test \$# -gt 0; do
5437 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5442 pos=\`expr \$pos + 1\`
5454 *) pos="${fieldn}th";;
5456 echo "Your cpp writes the filename in the $pos field of the line."
5459 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
5460 os2) cppfilter="sed -e 's|\\\\\\\\|/|g' |" ;; # path component separator is \
5463 : locate header file
5468 for usrincdir in $usrinc
5470 if test -f \$usrincdir/\$wanted; then
5471 echo "\$usrincdir/\$wanted"
5475 awkprg='{ print \$$fieldn }'
5476 echo "#include <\$wanted>" > foo\$\$.c
5477 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5478 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5479 while read cline; do
5480 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5482 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5483 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5488 # status = 0: grep returned 0 lines, case statement not executed
5489 # status = 1: headerfile found
5490 # status = 2: while loop executed, no headerfile found
5494 if test \$status -eq 1; then
5501 : define an alternate in-header-list? function
5502 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5503 cont=true; xxf="echo \"<\$1> found.\" >&4";
5504 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5505 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5507 case $# in 4) instead=instead;; *) instead="at last";; esac;
5508 while $test "$cont"; do
5510 var=$2; eval "was=\$$2";
5511 if $test "$xxx" && $test -r "$xxx";
5513 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5516 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5517 set $yyy; shift; shift; yyy=$@;
5518 case $# in 0) cont="";;
5519 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5520 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5521 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5522 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5526 do set $yyy; var=$2; eval "was=\$$2";
5527 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5528 set $yyy; shift; shift; yyy=$@;
5531 : see if stdlib is available
5532 set stdlib.h i_stdlib
5535 : check for lengths of integral types
5539 echo "Checking to see how big your integers are..." >&4
5548 printf("intsize=%d;\n", (int)sizeof(int));
5549 printf("longsize=%d;\n", (int)sizeof(long));
5550 printf("shortsize=%d;\n", (int)sizeof(short));
5555 if eval $compile_ok && $run ./try > /dev/null; then
5557 echo "Your integers are $intsize bytes long."
5558 echo "Your long integers are $longsize bytes long."
5559 echo "Your short integers are $shortsize bytes long."
5563 Help! I can't compile and run the intsize test program: please enlighten me!
5564 (This is probably a misconfiguration in your system or libraries, and
5565 you really ought to fix it. Still, I'll try anyway.)
5569 rp="What is the size of an integer (in bytes)?"
5573 rp="What is the size of a long integer (in bytes)?"
5577 rp="What is the size of a short integer (in bytes)?"
5585 : check for long long
5587 echo "Checking to see if you have long long..." >&4
5588 echo 'int main() { long long x = 7; return 0; }' > try.c
5590 if eval $compile; then
5592 echo "You have long long."
5595 echo "You do not have long long."
5601 : check for length of long long
5602 case "${d_longlong}${longlongsize}" in
5605 echo "Checking to see how big your long longs are..." >&4
5606 $cat >try.c <<'EOCP'
5610 printf("%d\n", (int)sizeof(long long));
5615 if eval $compile_ok; then
5616 longlongsize=`$run ./try`
5617 echo "Your long longs are $longlongsize bytes long."
5621 echo "(I can't seem to compile the test program. Guessing...)"
5622 rp="What is the size of a long long (in bytes)?"
5626 if $test "X$longsize" = "X$longlongsize"; then
5627 echo "(That isn't any different from an ordinary long.)"
5633 : see if inttypes.h is available
5634 : we want a real compile instead of Inhdr because some systems
5635 : have an inttypes.h which includes non-existent headers
5638 #include <inttypes.h>
5640 static int32_t foo32 = 0x12345678;
5644 if eval $compile; then
5645 echo "<inttypes.h> found." >&4
5648 echo "<inttypes.h> NOT found." >&4
5657 echo "Checking to see if you have int64_t..." >&4
5659 #include <sys/types.h>
5660 #$i_inttypes I_INTTYPES
5662 #include <inttypes.h>
5664 int main() { int64_t x = 7; }
5667 if eval $compile; then
5669 echo "You have int64_t."
5672 echo "You do not have int64_t."
5678 : Check if 64bit ints have a quad type
5680 echo "Checking which 64-bit integer type we could use..." >&4
5686 val='"unsigned int"'
5691 *) case "$longsize" in
5695 val='"unsigned long"'
5700 *) case "$d_longlong:$longlongsize" in
5705 val='"unsigned long long"'
5710 *) case "$d_int64_t" in
5729 '') echo "Alas, no 64-bit integer types in sight." >&4
5732 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5737 : Do we want 64bit support
5738 case "$uselonglong" in
5739 "$define"|true|[yY]*)
5742 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5744 use64bitint="$define"
5747 case "$use64bits" in
5748 "$define"|true|[yY]*)
5751 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5753 use64bitint="$define"
5756 case "$use64bitints" in
5757 "$define"|true|[yY]*)
5760 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5762 use64bitint="$define"
5765 case "$use64bitsint" in
5766 "$define"|true|[yY]*)
5769 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5771 use64bitint="$define"
5774 case "$uselonglongs" in
5775 "$define"|true|[yY]*)
5778 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5780 use64bitint="$define"
5783 case "$use64bitsall" in
5784 "$define"|true|[yY]*)
5787 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5789 use64bitall="$define"
5794 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5796 case "$use64bitall" in
5797 "$define"|true|[yY]*) use64bitint="$define" ;;
5803 You have natively 64-bit long integers.
5807 *) case "$use64bitint" in
5808 "$define"|true|[yY]*) dflt='y';;
5817 Perl can be built to take advantage of 64-bit integer types
5818 on some systems. To do so, Configure can be run with -Duse64bitint.
5819 Choosing this option will most probably introduce binary incompatibilities.
5821 If this doesn't make any sense to you, just accept the default '$dflt'.
5822 (The default has been chosen based on your configuration.)
5824 rp='Try to use 64-bit integers, if available?'
5827 [yY]*) val="$define" ;;
5835 case "$use64bitall" in
5836 "$define"|true|[yY]*) dflt='y' ;;
5837 *) case "$longsize" in
5845 You may also choose to try maximal 64-bitness. It means using as much
5846 64-bitness as possible on the platform. This in turn means even more
5847 binary incompatibilities. On the other hand, your platform may not
5848 have any more 64-bitness available than what you already have chosen.
5850 If this doesn't make any sense to you, just accept the default '$dflt'.
5851 (The default has been chosen based on your configuration.)
5853 rp='Try to use maximal 64-bit support, if available?'
5856 [yY]*) val="$define" ;;
5861 case "$use64bitall" in
5863 case "$use64bitint" in
5867 Since you have chosen a maximally 64-bit build, I'm also turning on
5868 the use of 64-bit integers.
5870 use64bitint="$define" ;;
5875 : Look for a hint-file generated 'call-back-unit'. If the
5876 : user has specified that a 64-bit perl is to be built,
5877 : we may need to set or change some other defaults.
5878 if $test -f use64bitint.cbu; then
5879 echo "Your platform has some specific hints regarding 64-bit integers, using them..."
5882 case "$use64bitint" in
5883 "$define"|true|[yY]*)
5885 4) case "$archname64" in
5886 '') archname64=64int ;;
5893 : Look for a hint-file generated 'call-back-unit'. If the
5894 : user has specified that a maximally 64-bit perl is to be built,
5895 : we may need to set or change some other defaults.
5896 if $test -f use64bitall.cbu; then
5897 echo "Your platform has some specific hints regarding 64-bit builds, using them..."
5900 case "$use64bitall" in
5901 "$define"|true|[yY]*)
5903 4) case "$archname64" in
5904 ''|64int) archname64=64all ;;
5911 case "$d_quad:$use64bitint" in
5915 *** You have chosen to use 64-bit integers,
5916 *** but none can be found.
5917 *** Please rerun Configure without -Duse64bitint and/or -Dusemorebits.
5918 *** Cannot continue, aborting.
5925 : check for length of double
5927 case "$doublesize" in
5929 echo "Checking to see how big your double precision numbers are..." >&4
5938 printf("%d\n", (int)sizeof(double));
5943 if eval $compile_ok; then
5944 doublesize=`$run ./try`
5945 echo "Your double is $doublesize bytes long."
5948 echo "(I can't seem to compile the test program. Guessing...)"
5949 rp="What is the size of a double precision number (in bytes)?"
5957 : check for long doubles
5959 echo "Checking to see if you have long double..." >&4
5960 echo 'int main() { long double x = 7.0; }' > try.c
5962 if eval $compile; then
5964 echo "You have long double."
5967 echo "You do not have long double."
5973 : check for length of long double
5974 case "${d_longdbl}${longdblsize}" in
5977 echo "Checking to see how big your long doubles are..." >&4
5978 $cat >try.c <<'EOCP'
5982 printf("%d\n", sizeof(long double));
5987 if eval $compile; then
5988 longdblsize=`$run ./try`
5989 echo "Your long doubles are $longdblsize bytes long."
5993 echo "(I can't seem to compile the test program. Guessing...)" >&4
5994 rp="What is the size of a long double (in bytes)?"
5998 if $test "X$doublesize" = "X$longdblsize"; then
5999 echo "That isn't any different from an ordinary double."
6000 echo "I'll keep your setting anyway, but you may see some"
6001 echo "harmless compilation warnings."
6007 : determine the architecture name
6009 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
6010 tarch=`arch`"-$osname"
6011 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
6012 if uname -m > tmparch 2>&1 ; then
6013 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
6014 -e 's/$/'"-$osname/" tmparch`
6022 case "$myarchname" in
6025 echo "(Your architecture name used to be $myarchname.)"
6029 case "$targetarch" in
6031 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
6036 *) dflt="$archname";;
6038 rp='What is your architecture name'
6041 case "$usethreads" in
6043 echo "Threads selected." >&4
6045 *-thread*) echo "...and architecture name already has -thread." >&4
6047 *) archname="$archname-thread"
6048 echo "...setting architecture name to $archname." >&4
6053 case "$usemultiplicity" in
6055 echo "Multiplicity selected." >&4
6057 *-multi*) echo "...and architecture name already has -multi." >&4
6059 *) archname="$archname-multi"
6060 echo "...setting architecture name to $archname." >&4
6065 case "$use64bitint$use64bitall" in
6067 case "$archname64" in
6069 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
6072 case "$use64bitint" in
6073 "$define") echo "64 bit integers selected." >&4 ;;
6075 case "$use64bitall" in
6076 "$define") echo "Maximal 64 bitness selected." >&4 ;;
6079 *-$archname64*) echo "...and architecture name already has $archname64." >&4
6081 *) archname="$archname-$archname64"
6082 echo "...setting architecture name to $archname." >&4
6088 case "$uselongdouble" in
6090 echo "Long doubles selected." >&4
6091 case "$longdblsize" in
6093 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
6097 *-ld*) echo "...and architecture name already has -ld." >&4
6099 *) archname="$archname-ld"
6100 echo "...setting architecture name to $archname." >&4
6107 case "$useperlio" in
6109 echo "Perlio selected." >&4
6112 echo "Perlio not selected, using stdio." >&4
6114 *-stdio*) echo "...and architecture name already has -stdio." >&4
6116 *) archname="$archname-stdio"
6117 echo "...setting architecture name to $archname." >&4
6122 if $test -f archname.cbu; then
6123 echo "Your platform has some specific hints for architecture name, using them..."
6127 : set the prefixit variable, to compute a suitable default value
6128 prefixit='case "$3" in
6130 case "$oldprefix" in
6131 "") eval "$1=\"\$$2\"";;
6138 ""|" ") eval "$1=\"\$$2\"";;
6144 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
6146 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
6147 /*-$oldprefix/*|\~*-$oldprefix/*)
6148 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
6149 *) eval "$1=\"\$$2\"";;
6153 : determine installation style
6154 : For now, try to deduce it from prefix unless it is already set.
6155 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
6156 case "$installstyle" in
6157 '') case "$prefix" in
6158 *perl*) dflt='lib';;
6159 *) dflt='lib/perl5' ;;
6162 *) dflt="$installstyle" ;;
6164 : Probably not worth prompting for this since we prompt for all
6165 : the directories individually, and the prompt would be too long and
6169 : determine where public executables go
6174 rp='Pathname where the public executables will reside?'
6176 if $test "X$ansexp" != "X$binexp"; then
6180 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
6181 : XXX If this is fixed, also fix the "start perl" hunk below, which relies on
6182 : this via initialinstalllocation
6185 case "$userelocatableinc" in
6186 $define|true|[yY]*) dflt='y' ;;
6191 Would you like to build Perl so that the installation is relocatable, so that
6192 library paths in @INC are determined relative to the path of the perl binary?
6193 This is not advised for system Perl installs, or if you need to run setid
6194 scripts or scripts under taint mode.
6196 If this doesn't make any sense to you, just accept the default '$dflt'.
6198 rp='Use relocatable @INC?'
6201 y|Y) val="$define" ;;
6204 set userelocatableinc
6207 initialinstalllocation="$binexp"
6208 : Default prefix is now "up one level from where the binaries are"
6209 case "$userelocatableinc" in
6215 installprefixexp=".../.."
6219 : determine where private library files go
6220 : Usual default is /usr/local/lib/perl5/$version.
6221 : Also allow things like /opt/perl/lib/$version, since
6222 : /opt/perl/lib/perl5... would be redundant.
6223 : The default "style" setting is made in installstyle.U
6224 case "$installstyle" in
6225 *lib/perl5*) set dflt privlib lib/$package/$version ;;
6226 *) set dflt privlib lib/$version ;;
6231 There are some auxiliary files for $package that need to be put into a
6232 private library directory that is accessible by everyone.
6237 rp='Pathname where the private library files will reside?'
6242 : set the prefixup variable, to restore leading tilda escape
6243 prefixup='case "$prefixexp" in
6245 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
6248 : determine where public architecture dependent libraries go
6251 : privlib default is /usr/local/lib/$package/$version
6252 : archlib default is /usr/local/lib/$package/$version/$archname
6253 : privlib may have an optional trailing /share.
6254 tdflt=`echo $privlib | $sed 's,/share$,,'`
6255 tdflt=$tdflt/$archname
6264 $spackage contains architecture-dependent library files. If you are
6265 sharing libraries in a heterogeneous environment, you might store
6266 these files in a separate location. Otherwise, you can just include
6267 them with the rest of the public library files.
6272 rp='Where do you want to put the public architecture-dependent libraries?'
6276 if $test X"$archlib" = X"$privlib"; then
6282 : see if setuid scripts can be secure
6285 Some kernels have a bug that prevents setuid #! scripts from being
6286 secure. Some sites have disabled setuid #! scripts because of this.
6288 First let's decide if your kernel supports secure setuid #! scripts.
6289 (If setuid #! scripts would be secure but have been disabled anyway,
6290 don't say that they are secure if asked.)
6295 if $test -d /dev/fd; then
6296 echo "#!$ls" >reflect
6297 chmod +x,u+s reflect
6298 ./reflect >flect 2>&1
6299 if $contains "/dev/fd" flect >/dev/null; then
6300 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6304 If you are not sure if they are secure, I can check but I'll need a
6305 username and password different from the one you are using right now.
6306 If you don't have such a username or don't want me to test, simply
6310 rp='Other username to test security of setuid scripts with?'
6315 case "$d_suidsafe" in
6316 '') echo "I'll assume setuid scripts are *not* secure." >&4
6319 echo "Well, the $hint value is *not* secure." >&4
6321 *) echo "Well, the $hint value *is* secure." >&4
6326 $rm -f reflect flect
6327 echo "#!$ls" >reflect
6328 chmod +x,u+s reflect
6331 echo '"su" will (probably) prompt you for '"$ans's password."
6332 su $ans -c './reflect >flect'
6333 if $contains "/dev/fd" flect >/dev/null; then
6334 echo "Okay, it looks like setuid scripts are secure." >&4
6337 echo "I don't think setuid scripts are secure." >&4
6342 rp='Does your kernel have *secure* setuid scripts?'
6345 [yY]*) val="$define";;
6350 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6351 echo "(That's for file descriptors, not floppy disks.)"
6357 $rm -f reflect flect
6359 : now see if they want to do setuid emulation
6362 case "$d_suidsafe" in
6365 echo "No need to emulate SUID scripts since they are secure here." >&4
6369 Some systems have disabled setuid scripts, especially systems where
6370 setuid scripts cannot be secure. On systems where setuid scripts have
6371 been disabled, the setuid/setgid bits on scripts are currently
6372 useless. It is possible for $package to detect those bits and emulate
6373 setuid/setgid in a secure fashion. This emulation will only work if
6374 setuid scripts have been disabled in your kernel.
6378 "$define") dflt=y ;;
6381 rp="Do you want to do setuid/setgid emulation?"
6384 [yY]*) val="$define";;
6392 : Find perl5.005 or later.
6393 echo "Looking for a previously installed perl5.005 or later... "
6395 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
6396 : Check if this perl is recent and can load a simple module
6397 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6400 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6410 '') echo "None found. That's ok.";;
6411 *) echo "Using $perl5." ;;
6414 : Set the siteprefix variables
6417 After $package is installed, you may wish to install various
6418 add-on modules and utilities. Typically, these add-ons will
6419 be installed under $prefix with the rest
6420 of this package. However, you may wish to install such add-ons
6421 elsewhere under a different prefix.
6423 If you do not wish to put everything under a single prefix, that's
6424 ok. You will be prompted for the individual locations; this siteprefix
6425 is only used to suggest the defaults.
6427 The default should be fine for most people.
6431 rp='Installation prefix to use for add-on modules and utilities?'
6432 : XXX Here might be another good place for an installstyle setting.
6433 case "$siteprefix" in
6435 *) dflt=$siteprefix ;;
6438 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6440 case "$siteprefix" in
6444 *) oldsiteprefix="$prefix";;
6449 siteprefixexp="$ansexp"
6451 : determine where site specific libraries go.
6452 : Usual default is /usr/local/lib/perl5/site_perl/$version
6453 : The default "style" setting is made in installstyle.U
6454 : XXX No longer works with Prefixit stuff.
6455 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6457 '') case "$installstyle" in
6458 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6459 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6467 The installation process will create a directory for
6468 site-specific extensions and modules. Most users find it convenient
6469 to place all site-specific files in this directory rather than in the
6470 main distribution directory.
6474 rp='Pathname for the site-specific library files?'
6478 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
6480 : Determine list of previous versions to include in @INC
6481 $cat > getverlist <<EOPL
6484 \$api_versionstring = "$api_versionstring";
6485 \$version = "$version";
6486 \$stem = "$sitelib_stem";
6487 \$archname = "$archname";
6489 $cat >> getverlist <<'EOPL'
6490 # The list found is store twice for each entry: the original name, and
6491 # the binary broken down version as pack "sss", so sorting is easy and
6492 # unambiguous. This will work for all versions that have a maximum of
6493 # three digit groups, separate by '.'s or '_'s. Names are extended with
6494 # ".0.0" to ensure at least three elements for the pack.
6495 # -- H.Merijn Brand (m)'06 23-10-2006
6497 # Can't have leading @ because metaconfig interprets it as a command!
6498 ;@inc_version_list=();
6499 # XXX Redo to do opendir/readdir?
6502 ;@candidates = map {
6503 [ $_, pack "sss", split m/[._]/, "$_.0.0" ] } glob("5.*");
6509 ($pversion, $aversion, $vsn5005) = map {
6510 pack "sss", split m/[._]/, "$_.0.0" } $version, $api_versionstring, "5.005";
6511 foreach $d (@candidates) {
6512 if ($d->[1] lt $pversion) {
6513 if ($d->[1] ge $aversion) {
6514 unshift(@inc_version_list, grep { -d } $d->[0]."/$archname", $d->[0]);
6516 elsif ($d->[1] ge $vsn5005) {
6517 unshift(@inc_version_list, grep { -d } $d->[0]);
6521 # Skip newer version. I.e. don't look in
6522 # 5.7.0 if we're installing 5.6.1.
6526 if (@inc_version_list) {
6527 print join(' ', @inc_version_list);
6530 # Blank space to preserve value for next Configure run.
6535 case "$inc_version_list" in
6536 '') if test -x "$perl5$exe_ext"; then
6537 dflt=`$perl5 getverlist`
6542 $undef) dflt='none' ;;
6543 *) eval dflt=\"$inc_version_list\" ;;
6546 ''|' ') dflt=none ;;
6553 In order to ease the process of upgrading, this version of perl
6554 can be configured to use modules built and installed with earlier
6555 versions of perl that were installed under $prefix. Specify here
6556 the list of earlier versions that this version of perl should check.
6557 If Configure detected no earlier versions of perl installed under
6558 $prefix, then the list will be empty. Answer 'none' to tell perl
6559 to not search earlier versions.
6561 The default should almost always be sensible, so if you're not sure,
6562 just accept the default.
6565 rp='List of earlier versions to include in @INC?'
6568 [Nn]one|''|' '|$undef) inc_version_list=' ' ;;
6569 *) inc_version_list="$ans" ;;
6571 case "$inc_version_list" in
6573 inc_version_list_init='0'
6574 d_inc_version_list="$undef"
6576 *) inc_version_list_init=`echo $inc_version_list |
6577 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
6578 d_inc_version_list="$define"
6583 : see if malloc/malloc.h has to be included
6584 set malloc/malloc.h i_mallocmalloc
6587 : see if this is a malloc.h system
6588 : we want a real compile instead of Inhdr because some systems have a
6589 : malloc.h that just gives a compile error saying to use stdlib.h instead
6594 #$i_mallocmalloc I_MALLOCMALLOC
6595 #ifdef I_MALLOCMALLOC
6596 # include <malloc/malloc.h>
6599 int main () { return 0; }
6602 if eval $compile; then
6603 echo "<malloc.h> found." >&4
6606 echo "<malloc.h> NOT found." >&4
6613 : check for void type
6615 echo "Checking to see how well your C compiler groks the void type..." >&4
6616 case "$voidflags" in
6628 extern void moo(); /* function returning void */
6629 void (*goo)(); /* ptr to func returning void */
6631 void *hue; /* generic ptr */
6644 int main() { sub(); }
6646 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
6647 voidflags=$defvoidused
6648 echo "Good. It appears to support void to the level $package wants.">&4
6649 if $contains warning .out >/dev/null 2>&1; then
6650 echo "However, you might get some warnings that look like this:"
6654 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
6655 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
6656 echo "It supports 1..."
6657 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
6658 echo "It also supports 2..."
6659 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
6661 echo "And it supports 4 but not 8 definitely."
6663 echo "It doesn't support 4..."
6664 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
6666 echo "But it supports 8."
6669 echo "Neither does it support 8."
6673 echo "It does not support 2..."
6674 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
6676 echo "But it supports 4 and 8."
6678 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
6680 echo "And it supports 4 but has not heard about 8."
6682 echo "However it supports 8 but not 4."
6687 echo "There is no support at all for void."
6692 case "$voidflags" in
6695 Support flag bits are:
6696 1: basic void declarations.
6697 2: arrays of pointers to functions returning void.
6698 4: operations between pointers to and addresses of void functions.
6699 8: generic void pointers.
6702 rp="Your void support flags add up to what?"
6709 : check for length of pointer
6713 echo "Checking to see how big your pointers are..." >&4
6714 if test "$voidflags" -gt 7; then
6715 echo '#define VOID_PTR char *' > try.c
6717 echo '#define VOID_PTR void *' > try.c
6727 printf("%d\n", (int)sizeof(VOID_PTR));
6732 if eval $compile_ok; then
6733 ptrsize=`$run ./try`
6734 echo "Your pointers are $ptrsize bytes long."
6737 echo "(I can't seem to compile the test program. Guessing...)" >&4
6738 rp="What is the size of a pointer (in bytes)?"
6745 case "$use64bitall" in
6746 "$define"|true|[yY]*)
6750 *** You have chosen a maximally 64-bit build,
6751 *** but your pointers are only 4 bytes wide.
6752 *** Please rerun Configure without -Duse64bitall.
6757 *** Since you have quads, you could possibly try with -Duse64bitint.
6762 *** Cannot continue, aborting.
6773 : determine whether to use malloc wrapping
6775 case "$usemallocwrap" in
6776 [yY]*|true|$define) dflt='y' ;;
6777 [nN]*|false|$undef) dflt='n' ;;
6778 *) case "$usedevel" in
6779 [yY]*|true|$define) dflt='y' ;;
6784 rp="Do you wish to wrap malloc calls to protect against potential overflows?"
6786 usemallocwrap="$ans"
6789 usemallocwrap="$define" ;;
6791 usemallocwrap="$undef" ;;
6794 : determine which malloc to compile in
6796 case "$usemymalloc" in
6797 [yY]*|true|$define) dflt='y' ;;
6798 [nN]*|false|$undef) dflt='n' ;;
6799 *) case "$ptrsize" in
6805 rp="Do you wish to attempt to use the malloc that comes with $package?"
6811 mallocsrc='malloc.c'
6812 mallocobj="malloc$_o"
6813 d_mymalloc="$define"
6816 : Remove malloc from list of libraries to use
6817 echo "Removing unneeded -lmalloc from library list" >&4
6818 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6821 echo "libs = $libs" >&4
6833 : compute the return types of malloc and free
6835 $cat >malloc.c <<END
6839 #include <sys/types.h>
6853 case "$malloctype" in
6855 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6862 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6866 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6873 echo "Your system uses $freetype free(), it would seem." >&4
6875 : determine where site specific architecture-dependent libraries go.
6876 : sitelib default is /usr/local/lib/perl5/site_perl/$version
6877 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
6878 : sitelib may have an optional trailing /share.
6880 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
6881 dflt="$dflt/$archname"
6886 set sitearch sitearch none
6890 The installation process will also create a directory for
6891 architecture-dependent site-specific extensions and modules.
6895 rp='Pathname for the site-specific architecture-dependent library files?'
6899 if $test X"$sitearch" = X"$sitelib"; then
6902 d_sitearch="$define"
6905 : Set the vendorprefix variables
6908 The installation process will also create a directory for
6909 vendor-supplied add-ons. Vendors who supply perl with their system
6910 may find it convenient to place all vendor-supplied files in this
6911 directory rather than in the main distribution directory. This will
6912 ease upgrades between binary-compatible maintenance versions of perl.
6914 Of course you may also use these directories in whatever way you see
6915 fit. For example, you might use them to access modules shared over a
6916 company-wide network.
6918 The default answer should be fine for most people.
6919 This causes further questions about vendor add-ons to be skipped
6920 and no vendor-specific directories will be configured for perl.
6923 rp='Do you want to configure vendor-specific add-on directories?'
6924 case "$usevendorprefix" in
6925 define|true|[yY]*) dflt=y ;;
6926 *) : User may have set vendorprefix directly on Configure command line.
6927 case "$vendorprefix" in
6936 rp='Installation prefix to use for vendor-supplied add-ons?'
6937 case "$vendorprefix" in
6939 *) dflt=$vendorprefix ;;
6942 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6944 case "$vendorprefix" in
6948 *) oldvendorprefix="$prefix";;
6952 usevendorprefix="$define"
6954 vendorprefixexp="$ansexp"
6956 *) usevendorprefix="$undef"
6962 : Set the vendorlib variables
6963 case "$vendorprefix" in
6964 '') d_vendorlib="$undef"
6968 *) d_vendorlib="$define"
6969 : determine where vendor-supplied modules go.
6970 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
6971 case "$vendorlib" in
6973 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6974 case "$installstyle" in
6975 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
6976 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
6979 *) dflt="$vendorlib"
6983 rp='Pathname for the vendor-supplied library files?'
6986 vendorlibexp="$ansexp"
6989 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
6993 : Set the vendorarch variables
6994 case "$vendorprefix" in
6995 '') d_vendorarch="$undef"
6999 *) d_vendorarch="$define"
7000 : determine where vendor-supplied architecture-dependent libraries go.
7001 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
7002 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
7003 : vendorlib may have an optional trailing /share.
7004 case "$vendorarch" in
7005 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
7006 dflt="$dflt/$archname"
7008 *) dflt="$vendorarch" ;;
7011 rp='Pathname for vendor-supplied architecture-dependent files?'
7014 vendorarchexp="$ansexp"
7017 prefixvar=vendorarch
7020 : Final catch-all directories to search
7023 Lastly, you can have perl look in other directories for extensions and
7024 modules in addition to those already specified.
7025 These directories will be searched after
7029 test X"$vendorlib" != "X" && echo ' ' $vendorlib
7030 test X"$vendorarch" != "X" && echo ' ' $vendorarch
7032 case "$otherlibdirs" in
7033 ''|' ') dflt='none' ;;
7034 *) dflt="$otherlibdirs" ;;
7037 Enter a colon-separated set of extra paths to include in perl's @INC
7038 search path, or enter 'none' for no extra paths.
7042 rp='Colon-separated list of additional directories for perl to search?'
7045 ' '|''|none) otherlibdirs=' ' ;;
7046 *) otherlibdirs="$ans" ;;
7048 case "$otherlibdirs" in
7052 set d_perl_otherlibdirs
7055 : Cruising for prototypes
7057 echo "Checking out function prototypes..." >&4
7058 $cat >prototype.c <<EOCP
7063 int main(int argc, char *argv[]) {
7066 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
7067 echo "Your C compiler appears to support function prototypes."
7070 echo "Your C compiler doesn't seem to understand function prototypes."
7077 : Check if ansi2knr is required
7078 case "$prototype" in
7080 *) ansi2knr='ansi2knr'
7085 This version of $package can only be compiled by a compiler that
7086 understands function prototypes. Unfortunately, your C compiler
7088 doesn't seem to understand them. Sorry about that.
7090 If GNU cc is available for your system, perhaps you could try that instead.
7092 Eventually, we hope to support building Perl with pre-ANSI compilers.
7093 If you would like to help in that effort, please contact <perlbug@perl.org>.
7095 Aborting Configure now.
7102 dflt_dtrace='/usr/sbin/dtrace'
7105 Perl can be built to support DTrace on platforms that support it.
7106 DTrace is a diagnosis and performance analysis tool from Sun.
7108 If this doesn't make any sense to you, just accept the default '$dflt'.
7112 case "$usedtrace" in
7118 dflt_dtrace=$usedtrace
7125 rp='Support DTrace if available?'
7128 y|Y) val="$define" ;;
7134 test "X$usedtrace" != "X$define" && break
7137 rp='Where is the dtrace executable?'
7146 if $dtrace -h -s ../perldtrace.d \
7147 -o perldtrace.tmp >/dev/null 2>&1 \
7148 && rm -f perldtrace.tmp
7151 echo "Good: your $dtrace knows about the -h flag."
7155 *** $me: Fatal Error: $dtrace doesn't support -h flag
7157 *** Your installed dtrace doesn't support the -h switch to compile a D
7158 *** program into a C header. Can't continue.
7170 *** $me: Fatal Error: $dtrace not found.
7177 echo "*** $dtrace was not found."
7183 : See if we want extra modules installed
7190 Perl can be built with extra modules or bundles of modules which
7191 will be fetched from the CPAN and installed alongside Perl.
7193 Notice that you will need access to the CPAN; either via the Internet,
7194 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
7195 be asked later to configure the CPAN.pm module which will in turn do
7196 the installation of the rest of the extra modules or bundles.)
7198 Notice also that if the modules require any external software such as
7199 libraries and headers (the libz library and the zlib.h header for the
7200 Compress::Zlib module, for example) you MUST have any such software
7201 already installed, this configuration process will NOT install such
7204 If this doesn't make any sense to you, just accept the default '$dflt'.
7206 rp='Install any extra modules (y or n)?'
7212 Please list any extra modules or bundles to be installed from CPAN,
7213 with spaces between the names. The names can be in any format the
7214 'install' command of CPAN.pm will understand. (Answer 'none',
7215 without the quotes, to install no extra modules or bundles.)
7225 $rm -f ../extras.lst
7227 *) echo "(Saving the list of extras for later...)"
7228 echo "$extras" > ../extras.lst
7236 : determine where html pages for programs go
7237 set html1dir html1dir none
7241 If you wish to install html files for programs in $spackage, indicate
7242 the appropriate directory here. To skip installing html files,
7246 ''|none|$undef|' ') dflt=none ;;
7247 *) dflt=$html1dir ;;
7250 rp="Directory for the main $spackage html pages?"
7254 : Use ' ' for none so value is preserved next time through Configure
7255 $test X"$html1dir" = "X" && html1dir=' '
7257 : determine where html pages for libraries and modules go
7258 set html3dir html3dir none
7262 If you wish to install html files for modules associated with $spackage,
7263 indicate the appropriate directory here. To skip installing html files,
7266 : There is no obvious default. If they have specified html1dir, then
7267 : try to key off that, possibly changing .../html1 into .../html3.
7269 '') html3dir=`echo "$html1dir" | $sed 's/1$/3$/'` ;;
7270 *) dflt=$html3dir ;;
7273 rp="Directory for the $spackage module html pages?"
7277 : Use ' ' for none so value is preserved next time through Configure
7278 $test X"$html3dir" = "X" && html3dir=' '
7280 : determine whether to install perl also as /usr/bin/perl
7283 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
7285 Many scripts expect perl to be installed as /usr/bin/perl.
7287 If you want to, I can install the perl you are about to compile
7288 as /usr/bin/perl (in addition to $bin/perl).
7290 if test -f /usr/bin/perl; then
7293 However, please note that because you already have a /usr/bin/perl,
7294 overwriting that with a new Perl would very probably cause problems.
7295 Therefore I'm assuming you don't want to do that (unless you insist).
7298 case "$installusrbinperl" in
7299 "$define"|[yY]*) dflt='y';;
7305 Since you don't have a /usr/bin/perl I'm assuming creating one is okay.
7308 case "$installusrbinperl" in
7309 "$undef"|[nN]*) dflt='n';;
7313 rp="Do you want to install perl as /usr/bin/perl?"
7316 [yY]*) val="$define";;
7322 set installusrbinperl
7325 : Check if we are using the GNU C library
7327 echo "Checking for GNU C Library..." >&4
7329 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
7330 alone are insufficient to distinguish different versions, such as
7331 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
7332 libc version 2.1.0. A. Dougherty, June 3, 2002.
7338 # ifdef __GLIBC_MINOR__
7339 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 && !defined(__cplusplus)
7340 # include <gnu/libc-version.h>
7341 printf("%s\n", gnu_get_libc_version());
7343 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
7346 printf("%d\n", __GLIBC__);
7355 if eval $compile_ok && $run ./try > glibc.ver; then
7357 gnulibc_version=`$cat glibc.ver`
7358 echo "You are using the GNU C Library version $gnulibc_version"
7362 echo "You are not using the GNU C Library"
7368 : see if nm is to be used to determine whether a symbol is defined or not
7372 case "$d_gnulibc" in
7375 echo "nm probably won't work on the GNU C Library." >&4
7381 if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
7383 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
7384 echo "'nm' won't be sufficient on this sytem." >&4
7390 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
7391 if $test $dflt -gt 20; then
7401 true|$define) dflt=y;;
7408 I can use $nm to extract the symbols from your C libraries. This
7409 is a time consuming task which may generate huge output on the disk (up
7410 to 3 megabytes) but that should make the symbols extraction faster. The
7411 alternative is to skip the 'nm' extraction part and to compile a small
7412 test program instead to determine whether each symbol is present. If
7413 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
7414 this may be the best solution.
7416 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
7419 rp="Shall I use $nm to extract C symbols from the libraries?"
7422 [Nn]*) usenm=false;;
7431 : nm options which may be necessary
7433 '') if $test -f /mach_boot; then
7435 elif $test -d /usr/ccs/lib; then
7436 nm_opt='-p' # Solaris (and SunOS?)
7437 elif $test -f /dgux; then
7439 elif $test -f /lib64/rld; then
7440 nm_opt='-p' # 64-bit Irix
7446 : nm options which may be necessary for shared libraries but illegal
7447 : for archive libraries. Thank you, Linux.
7448 case "$nm_so_opt" in
7449 '') case "$myuname" in
7451 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
7452 nm_so_opt='--dynamic'
7459 : Figure out where the libc is located
7462 : get list of predefined functions in a handy place
7467 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
7473 *) for thislib in $libs; do
7476 : Handle C library specially below.
7479 thislib=`echo $thislib | $sed -e 's/^-l//'`
7480 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
7482 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
7484 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
7486 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
7488 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
7490 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
7492 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
7497 libnames="$libnames $try"
7499 *) libnames="$libnames $thislib" ;;
7508 for xxx in $libpth; do
7509 $test -r $1 || set $xxx/libc.$so
7510 : The messy sed command sorts on library version numbers.
7512 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
7513 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
7515 s/[0-9][0-9]*/0000&/g
7516 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
7519 $sort | $sed -e 's/^.* //'`
7522 $test -r $1 || set /usr/ccs/lib/libc.$so
7523 $test -r $1 || set /lib/libsys_s$_a
7529 if $test -r "$1"; then
7530 echo "Your (shared) C library seems to be in $1."
7532 elif $test -r /lib/libc && $test -r /lib/clib; then
7533 echo "Your C library seems to be in both /lib/clib and /lib/libc."
7535 libc='/lib/clib /lib/libc'
7536 if $test -r /lib/syslib; then
7537 echo "(Your math library is in /lib/syslib.)"
7538 libc="$libc /lib/syslib"
7540 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
7541 echo "Your C library seems to be in $libc, as you said before."
7542 elif $test -r $incpath/usr/lib/libc$_a; then
7543 libc=$incpath/usr/lib/libc$_a;
7544 echo "Your C library seems to be in $libc. That's fine."
7545 elif $test -r /lib/libc$_a; then
7547 echo "Your C library seems to be in $libc. You're normal."
7549 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
7551 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
7552 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
7553 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
7555 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
7557 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
7560 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
7562 if $test -r "$tans"; then
7563 echo "Your C library seems to be in $tans, of all places."
7569 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
7573 If the guess above is wrong (which it might be if you're using a strange
7574 compiler, or your machine supports multiple models), you can override it here.
7579 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
7581 I can't seem to find your C library. I've looked in the following places:
7584 $sed 's/^/ /' libpath
7587 None of these seems to contain your C library. I need to get its name...
7592 rp='Where is your C library?'
7597 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
7598 set X `cat libnames`
7601 case $# in 1) xxx=file; esac
7602 echo "Extracting names from the following $xxx for later perusal:" >&4
7604 $sed 's/^/ /' libnames >&4
7606 $echo $n "This may take a while...$c" >&4
7610 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
7611 *) $nm $nm_opt $file 2>/dev/null;;
7616 $grep fprintf libc.tmp > libc.ptf
7617 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
7618 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
7620 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *//p'";\
7622 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7624 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
7626 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7628 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
7630 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7632 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
7634 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7636 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
7638 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7640 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
7642 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7644 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
7645 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
7647 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7649 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
7651 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7653 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
7655 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7657 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
7659 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7661 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
7663 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7665 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
7667 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7669 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
7671 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7673 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
7675 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7678 $nm -p $* 2>/dev/null >libc.tmp
7679 $grep fprintf libc.tmp > libc.ptf
7680 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
7681 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
7687 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
7689 if $ar t $libc > libc.tmp && \
7690 $contains '^fprintf$' libc.tmp >/dev/null 2>&1
7692 for thisname in $libnames $libc; do
7693 $ar t $thisname >>libc.tmp
7695 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
7697 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
7698 for thisname in $libnames $libc; do
7699 $ar tv $thisname >>libc.tmp
7700 emximp -o tmp.imp $thisname \
7702 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
7703 < tmp.imp >>libc.tmp
7706 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
7709 echo "$ar didn't seem to work right." >&4
7710 echo "Maybe this is a Cray...trying bld instead..." >&4
7712 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list &&
7715 for thisname in $libnames; do
7717 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
7718 $ar t $thisname >>libc.tmp
7722 echo "That didn't work either. Giving up." >&4
7732 echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4
7733 dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list
7735 *) if $test -f /lib/syscalls.exp; then
7737 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
7738 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' \
7739 /lib/syscalls.exp >>libc.list
7745 $rm -f libnames libpath
7747 : see if dld is available
7751 : Check if we are using C++
7753 echo "Checking for C++..." >&4
7754 $cat >try.c <<'EOCP'
7766 if eval $compile_ok && $run ./try; then
7768 echo "You are using a C++ compiler."
7771 echo "You are not using a C++ compiler."
7777 : is a C symbol defined?
7780 -v) tf=libc.tmp; tdc="";;
7781 -a) tf=libc.tmp; tdc="[]";;
7782 *) tlook="^$1\$"; tf=libc.list; tdc="()";;
7784 case "$d_cplusplus" in
7785 $define) extern_C="extern \"C\"" ;;
7786 *) extern_C="extern" ;;
7789 case "$reuseval-$4" in
7791 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
7796 if $test "$runnm" = true; then
7797 if $contains $tlook $tf >/dev/null 2>&1; then
7799 elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
7800 echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
7801 $cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true;
7802 $test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; };
7806 echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
7807 $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
7813 $define) tval=true;;
7820 : define an is-in-libc? function
7821 inlibc='echo " "; td=$define; tu=$undef;
7822 sym=$1; var=$2; eval "was=\$$2";
7824 case "$reuseval$was" in
7834 echo "$sym() found." >&4;
7835 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
7837 echo "$sym() NOT found." >&4;
7838 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
7842 $define) echo "$sym() found." >&4;;
7843 *) echo "$sym() NOT found." >&4;;
7847 : see if dlopen exists
7849 xxx_ccflags="$ccflags"
7851 : with g++ one needs -shared to get is-in-libc to work for dlopen
7852 case "$gccversion" in
7854 *) case "$d_cplusplus" in
7855 "$define") ccflags="$ccflags -shared" ;;
7862 ccflags="$xxx_ccflags"
7864 : see if this is a unistd.h system
7865 set unistd.h i_unistd
7868 : determine which dynamic loading, if any, to compile in
7870 dldir="ext/DynaLoader"
7883 $define) dflt='y' ;;
7886 $define) dflt='y' ;;
7888 : Does a dl_xxx.xs file exist for this operating system
7889 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7892 rp="Do you wish to use dynamic loading?"
7899 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7900 dflt="$dldir/dl_${osname}.xs"
7901 elif $test "$d_dlopen" = "$define" ; then
7902 dflt="$dldir/dl_dlopen.xs"
7903 elif $test "$i_dld" = "$define" ; then
7904 dflt="$dldir/dl_dld.xs"
7909 *) dflt="$dldir/$dlsrc"
7912 echo "The following dynamic loading files are available:"
7913 : Can not go over to $dldir because getfile has path hard-coded in.
7914 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7915 rp="Source file to use for dynamic loading"
7921 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7925 Some systems may require passing special flags to $cc -c to
7926 compile modules that will be used to create a shared library.
7927 To use no flags, say "none".
7930 case "$cccdlflags" in
7931 '') case "$gccversion" in
7932 '') case "$osname" in
7934 next) dflt='none' ;;
7935 irix*) dflt='-KPIC' ;;
7936 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7937 sunos) dflt='-pic' ;;
7941 *) case "$osname" in
7942 darwin) dflt='none' ;;
7943 linux*|svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7948 *) dflt="$cccdlflags" ;;
7950 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7953 none) cccdlflags=' ' ;;
7954 *) cccdlflags="$ans" ;;
7959 Some systems use ld to create libraries that can be dynamically loaded,
7960 while other systems (such as those using ELF) use $cc.
7964 '') $cat >try.c <<EOM
7965 /* Test for whether ELF binaries are produced */
7977 int i = open("a.out",O_RDONLY);
7980 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7981 exit(0); /* succeed (yes, it's ELF) */
7986 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7988 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7992 echo "I'll use ld to build dynamic libraries."
8001 rp="What command should be used to create dynamic libraries?"
8007 Some systems may require passing special flags to $ld to create a
8008 library that can be dynamically loaded. If your ld flags include
8009 -L/other/path options to locate libraries outside your loader's normal
8010 search path, you may need to specify those -L options here as well. To
8011 use no flags, say "none".
8014 case "$lddlflags" in
8015 '') case "$osname" in
8016 beos) dflt='-nostart' ;;
8017 haiku) dflt='-shared' ;;
8019 case "$gccversion" in
8020 '') dflt="$dflt +vnocompatwarnings" ;;
8023 linux|irix*|gnu*) dflt="-shared $optimize" ;;
8024 next) dflt='none' ;;
8025 solaris) dflt='-G' ;;
8026 sunos) dflt='-assert nodefinitions' ;;
8027 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
8031 *) dflt="$lddlflags" ;;
8034 : Try to guess additional flags to pick up local libraries.
8035 : Be careful not to append to a plain 'none'
8039 for thisflag in $ldflags; do
8044 *) dflt="$dflt $thisflag" ;;
8051 ''|' ') dflt='none' ;;
8055 *-fstack-protector*)
8057 *-fstack-protector*) ;; # Don't add it again
8058 *) dflt="$dflt -fstack-protector" ;;
8064 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
8067 none) lddlflags=' ' ;;
8068 *) lddlflags="$ans" ;;
8073 Some systems may require passing special flags to $cc to indicate that
8074 the resulting executable will use dynamic linking. To use no flags,
8078 case "$ccdlflags" in
8079 '') case "$osname" in
8080 linux|hpux|gnu*) dflt='-Wl,-E' ;;
8081 next|sunos) dflt='none' ;;
8085 *) dflt="$ccdlflags" ;;
8087 rp="Any special flags to pass to $cc to use dynamic linking?"
8090 none) ccdlflags=' ' ;;
8091 *) ccdlflags="$ans" ;;
8102 : Do we want a shared libperl?
8106 # No dynamic loading being used, so don't bother even to prompt.
8109 *) case "$useshrplib" in
8110 '') case "$osname" in
8111 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|haiku|cygwin*)
8113 also='Building a shared libperl is required for dynamic loading to work on your system.'
8118 also='Building a shared libperl is needed for MAB support.'
8136 The perl executable is normally obtained by linking perlmain.c with
8137 libperl${_a}, any static extensions (usually just DynaLoader), and
8138 any other libraries needed on this system (such as -lm, etc.). Since
8139 your system supports dynamic loading, it is probably possible to build
8140 a shared libperl.$so. If you will have more than one executable linked
8141 to libperl.$so, this will significantly reduce the size of each
8142 executable, but it may have a noticeable effect on performance. The
8143 default is probably sensible for your system.
8147 rp="Build a shared libperl.$so (y/n)"
8151 useshrplib='true' ;;
8152 *) useshrplib='false' ;;
8157 case "$useshrplib" in
8161 # Figure out a good name for libperl.so. Since it gets stored in
8162 # a version-specific architecture-dependent library, the version
8163 # number isn't really that important, except for making cc/ld happy.
8165 # A name such as libperl.so.10.1
8166 majmin="libperl.$so.$patchlevel.$subversion"
8167 # A name such as libperl.so.100
8168 majonly=`echo $patchlevel $subversion |
8169 $awk '{printf "%d%02d", $1, $2}'`
8170 majonly=libperl.$so.$majonly
8171 # I'd prefer to keep the os-specific stuff here to a minimum, and
8172 # rely on figuring it out from the naming of libc.
8173 case "${osname}${osvers}" in
8176 # XXX How handle the --version stuff for MAB?
8178 linux*|gnu*) # ld won't link with a bare -lperl otherwise.
8181 cygwin*) # ld links now against the dll directly
8182 majmin="cygperl5_${patchlevel}_${subversion}.${so}"
8183 majonly=`echo $patchlevel $subversion |
8184 $awk '{printf "%03d%03d", $1, $2}'`
8185 majonly=cygperl5.$majonly.$so
8188 *) # Try to guess based on whether libc has major.minor.
8190 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
8191 *libc.$so.[0-9]*) dflt=$majonly ;;
8192 *) dflt=libperl.$so ;;
8202 I need to select a good name for the shared libperl. If your system uses
8203 library names with major and minor numbers, then you might want something
8204 like $majmin. Alternatively, if your system uses a single version
8205 number for shared libraries, then you might want to use $majonly.
8206 Or, your system might be quite happy with a simple libperl.$so.
8208 Since the shared libperl will get installed into a version-specific
8209 architecture-dependent directory, the version number of the shared perl
8210 library probably isn't important, so the default should be o.k.
8213 rp='What name do you want to give to the shared libperl?'
8216 echo "Ok, I'll use $libperl"
8219 libperl="libperl${_a}"
8223 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
8227 WARNING: Use of the shrpdir variable for the installation location of
8228 the shared $libperl is not supported. It was never documented and
8229 will not work in this version. Let me (perlbug@perl.org)
8230 know of any problems this may cause.
8236 But your current setting of $shrpdir is
8237 the default anyway, so it's harmless.
8242 Further, your current attempted setting of $shrpdir
8243 conflicts with the value of $archlibexp/CORE
8244 that installperl will use.
8251 # How will the perl executable find the installed shared $libperl?
8252 # Add $xxx to ccdlflags.
8253 # If we can't figure out a command-line option, use $shrpenv to
8254 # set env LD_RUN_PATH. The main perl makefile uses this.
8255 shrpdir=$archlibexp/CORE
8258 if "$useshrplib"; then
8261 # We'll set it in Makefile.SH...
8266 freebsd|netbsd|openbsd|interix|dragonfly)
8267 xxx="-Wl,-R$shrpdir"
8269 bsdos|linux|irix*|dec_osf|gnu*)
8270 xxx="-Wl,-rpath,$shrpdir"
8273 # next doesn't like the default...
8276 # beos doesn't like the default, either.
8279 # Haiku doesn't like the default, either.
8282 # hpux doesn't like the default, either.
8283 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
8286 # cygwin needs only ldlibpth
8289 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
8295 # Only add $xxx if it isn't already in ccdlflags.
8296 case " $ccdlflags " in
8298 *) ccdlflags="$ccdlflags $xxx"
8301 Adding $xxx to the flags
8302 passed to $ld so that the perl executable will find the
8303 installed shared $libperl.
8311 # Fix ccdlflags in AIX for building external extensions.
8312 # (For building Perl itself bare -bE:perl.exp is needed,
8313 # Makefile.SH takes care of this.)
8315 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
8317 # Respect a hint or command-line value.
8319 '') shrpenv="$tmp_shrpenv" ;;
8321 case "$ldlibpthname" in
8322 '') ldlibpthname=LD_LIBRARY_PATH ;;
8323 none) ldlibpthname='' ;;
8326 : determine where manual pages are on this system
8330 syspath='/usr/share/man/man1 /usr/man/man1'
8331 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
8332 syspath="$syspath /usr/man/u_man/man1"
8333 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
8334 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
8335 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
8336 sysman=`./loc . /usr/man/man1 $syspath`
8339 if $test -d "$sysman"; then
8340 echo "System manual is in $sysman." >&4
8342 echo "Could not find manual pages in source form." >&4
8345 : determine where manual pages go
8346 set man1dir man1dir none
8350 $spackage has manual pages available in source form.
8354 echo "However, you don't have nroff, so they're probably useless to you."
8356 '') man1dir="none";;
8359 echo "If you don't want the manual sources installed, answer 'none'."
8364 lookpath="$prefixexp/share/man/man1"
8365 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
8366 lookpath="$lookpath $prefixexp/man/p_man/man1"
8367 lookpath="$lookpath $prefixexp/man/u_man/man1"
8368 lookpath="$lookpath $prefixexp/man/man.1"
8370 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
8371 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
8381 rp="Where do the main $spackage manual pages (source) go?"
8383 if $test "X$man1direxp" != "X$ansexp"; then
8394 : What suffix to use on installed man pages
8401 rp="What suffix should be used for the main $spackage man pages?"
8403 '') case "$man1dir" in
8417 *) dflt="$man1ext";;
8424 : see if we can have long filenames
8426 first=123456789abcdef
8428 if (echo hi >$first) 2>/dev/null; then
8429 if $test -f 123456789abcde; then
8430 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
8433 echo 'You can have filenames longer than 14 characters.'>&4
8438 You can't have filenames longer than 14 chars.
8439 You can't even think about them!
8445 $rm -rf 123456789abcde*
8447 : determine where library module manual pages go
8448 set man3dir man3dir none
8452 $spackage has manual pages for many of the library modules.
8458 However, you don't have nroff, so they're probably useless to you.
8461 '') man3dir="none";;
8465 case "$d_flexfnam" in
8468 However, your system can't handle the long file names like File::Basename.3.
8471 '') man3dir="none";;
8475 echo "If you don't want the manual sources installed, answer 'none'."
8476 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
8478 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
8479 if $test -d "$privlib/man/man3"; then
8482 WARNING: Previous versions of perl installed man3 pages into
8483 $privlib/man/man3. This version will suggest a
8484 new default of $dflt.
8488 rp='Do you wish to preserve the old behavior?(y/n)'
8491 y*) dflt="$privlib/man/man3" ;;
8496 *) dflt="$man3dir" ;;
8503 rp="Where do the $package library man pages (source) go?"
8513 : What suffix to use on installed man pages
8519 rp="What suffix should be used for the $package library man pages?"
8521 '') case "$man3dir" in
8535 *) dflt="$man3ext";;
8542 : see if we have to deal with yellow pages, now NIS.
8543 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8544 if $test -f /usr/etc/nibindd; then
8546 echo "I'm fairly confident you're on a NeXT."
8548 rp='Do you get the hosts file via NetInfo?'
8557 y*) hostcat='nidump hosts .';;
8558 *) case "$hostcat" in
8559 nidump*) hostcat='';;
8569 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8577 rp='Are you getting the hosts file via yellow pages?'
8580 y*) hostcat='ypcat hosts';;
8581 *) hostcat='cat /etc/hosts';;
8587 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8590 '') test -f /etc/group && groupcat='cat /etc/group';;
8593 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8596 : now get the host name
8598 echo "Figuring out host name..." >&4
8599 case "$myhostname" in
8601 echo 'Maybe "hostname" will work...'
8602 if tans=`sh -c hostname 2>&1` ; then
8610 if $test "$cont"; then
8612 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8613 if tans=`cat /etc/systemid 2>&1` ; then
8615 phostname='cat /etc/systemid'
8616 echo "Whadyaknow. Xenix always was a bit strange..."
8619 elif $test -r /etc/systemid; then
8620 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8623 if $test "$cont"; then
8624 echo 'No, maybe "uuname -l" will work...'
8625 if tans=`sh -c 'uuname -l' 2>&1` ; then
8627 phostname='uuname -l'
8629 echo 'Strange. Maybe "uname -n" will work...'
8630 if tans=`sh -c 'uname -n' 2>&1` ; then
8632 phostname='uname -n'
8634 echo 'Oh well, maybe I can mine it out of whoami.h...'
8635 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8636 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8637 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8639 case "$myhostname" in
8640 '') echo "Does this machine have an identity crisis or something?"
8643 echo "Well, you said $myhostname before..."
8644 phostname='echo $myhostname';;
8650 case "$myhostname" in
8651 '') myhostname=noname ;;
8653 : you do not want to know about this
8658 if $test "$myhostname" ; then
8660 rp='Your host name appears to be "'$myhostname'".'" Right?"
8668 : bad guess or no guess
8669 while $test "X$myhostname" = X ; do
8671 rp="Please type the (one word) name of your host:"
8676 : translate upper to lower if necessary
8677 case "$myhostname" in
8679 echo "(Normalizing case in your host name)"
8680 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8684 case "$myhostname" in
8686 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8687 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8688 echo "(Trimming domain name from host name--host name is now $myhostname)"
8690 *) case "$mydomain" in
8693 test "X$hostcat" = "Xypcat hosts" &&
8694 ypmatch "$myhostname" hosts 2>/dev/null |\
8695 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8698 test "X$hostcat" != "X" &&
8699 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8700 /[ ]$myhostname[ . ]/p" > hosts
8703 if $test -f hosts; then
8704 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8705 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8706 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8707 hosts | $sort | $uniq | \
8708 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8709 case `$echo X$dflt` in
8710 X*\ *) echo "(Several hosts in the database matched hostname)"
8713 X.) echo "(You do not have fully-qualified names in the hosts database)"
8717 echo "(I cannot locate a hosts database anywhere)"
8722 tans=`./loc resolv.conf X /etc /usr/etc`
8723 if $test -f "$tans"; then
8724 echo "(Attempting domain name extraction from $tans)"
8725 dflt=.`$sed -n -e 's/ / /g' \
8726 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8729 .) dflt=.`$sed -n -e 's/ / /g' \
8730 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8738 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8739 dflt=.`sh -c domainname 2>/dev/null`
8742 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8746 case "$dflt$osname" in
8747 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8748 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8752 .) echo "(Lost all hope -- silly guess then)"
8758 *) dflt="$mydomain";;
8762 rp="What is your domain name?"
8772 : translate upper to lower if necessary
8775 echo "(Normalizing case in your domain name)"
8776 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8780 : a little sanity check here
8781 case "$phostname" in
8784 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8785 $myhostname$mydomain|$myhostname) ;;
8787 case "$phostname" in
8789 echo "(That doesn't agree with your whoami.h file, by the way.)"
8792 echo "(That doesn't agree with your $phostname command, by the way.)"
8800 : determine the e-mail address of the user who is running us
8803 I need to get your e-mail address in Internet format if possible, i.e.
8804 something like user@host.domain. Please answer accurately since I have
8805 no easy means to double check it. The default value provided below
8806 is most probably close to reality but may not be valid from outside
8807 your organization...
8811 while test "$cont"; do
8813 '') dflt="$cf_by@$myhostname$mydomain";;
8814 *) dflt="$cf_email";;
8816 rp='What is your e-mail address?'
8822 rp='Address does not look like an Internet one. Use it anyway?'
8836 : Ask e-mail of administrator
8839 If you or somebody else will be maintaining perl at your site, please
8840 fill in the correct e-mail address here so that they may be contacted
8841 if necessary. Currently, the "perlbug" program included with perl
8842 will send mail to this address in addition to perlbug@perl.org. You may
8843 enter "none" for no administrator.
8846 case "$perladmin" in
8847 '') dflt="$cf_email";;
8848 *) dflt="$perladmin";;
8850 rp='Perl administrator e-mail address'
8854 : determine whether to only install version-specific parts.
8857 Do you want to install only the version-specific parts of the perl
8858 distribution? Usually you do *not* want to do this.
8860 case "$versiononly" in
8861 "$define"|[Yy]*|true) dflt='y' ;;
8864 rp="Do you want to install only the version-specific parts of perl?"
8867 [yY]*) val="$define";;
8873 case "$versiononly" in
8874 "$define") inc_version_list=''
8875 inc_version_list_init=0
8879 : figure out how to guarantee perl startup
8880 : XXX Note that this currently takes advantage of the bug that binexp ignores
8881 : the Configure -Dinstallprefix setting, which in turn means that under
8882 : relocatable @INC, initialinstalllocation is what binexp started as.
8883 case "$startperl" in
8885 case "$sharpbang" in
8889 I can use the #! construct to start perl on your system. This will
8890 make startup of perl scripts faster, but may cause problems if you
8891 want to share those scripts and perl is not in a standard place
8892 ($initialinstalllocation/perl) on all your platforms. The alternative
8893 is to force a shell by starting the script with a single ':' character.
8896 case "$versiononly" in
8897 "$define") dflt="$initialinstalllocation/perl$version";;
8898 *) dflt="$initialinstalllocation/perl";;
8900 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8903 none) startperl=": # use perl";;
8904 *) startperl="#!$ans"
8905 if $test 30 -lt `echo "$ans" | wc -c`; then
8908 WARNING: Some systems limit the #! command to 32 characters.
8909 If you experience difficulty running Perl scripts with #!, try
8910 installing Perl in a directory with a shorter pathname.
8916 *) startperl=": # use perl"
8921 echo "I'll use $startperl to start perl scripts."
8923 : figure best path for perl in scripts
8926 case "$versiononly" in
8927 "$define") perlpath="$initialinstalllocation/perl$version";;
8928 *) perlpath="$initialinstalllocation/perl";;
8930 case "$startperl" in
8935 I will use the "eval 'exec'" idiom to start Perl on your system.
8936 I can use the full path of your Perl binary for this purpose, but
8937 doing so may cause problems if you want to share those scripts and
8938 Perl is not always in a standard place ($initialinstalllocation/perl).
8941 dflt="$initialinstalllocation/perl"
8942 rp="What path shall I use in \"eval 'exec'\"?"
8949 case "$startperl" in
8951 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8954 : determine where public executable scripts go
8955 set scriptdir scriptdir
8957 case "$scriptdir" in
8960 : guess some guesses
8961 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8962 $test -d /usr/share/bin && dflt=/usr/share/bin
8963 $test -d /usr/local/script && dflt=/usr/local/script
8964 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8965 $test -d $prefixexp/script && dflt=$prefixexp/script
8969 *) dflt="$scriptdir"
8974 Some installations have a separate directory just for executable scripts so
8975 that they can mount it across multiple architectures but keep the scripts in
8976 one spot. You might, for example, have a subdirectory of /usr/share for this.
8977 Or you might just lump your scripts in with all your other executables.
8981 rp='Where do you keep publicly executable scripts?'
8983 if $test "X$ansexp" != "X$scriptdirexp"; then
8989 : A little fix up for an irregularly named variable.
8990 installscript="$installscriptdir"
8992 : determine where add-on public executables go
8994 '') dflt=$siteprefix/bin ;;
8998 rp='Pathname where the add-on public executables should be installed?'
9003 : determine where add-on html pages go
9004 : There is no standard location, so try to copy the previously-selected
9005 : directory structure for the core html pages.
9006 case "$sitehtml1dir" in
9007 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$siteprefix#"` ;;
9008 *) dflt=$sitehtml1dir ;;
9011 ''|' ') dflt=none ;;
9014 rp='Pathname where the site-specific html pages should be installed?'
9016 prefixvar=sitehtml1dir
9019 : determine where add-on library html pages go
9020 : There is no standard location, so try to copy the previously-selected
9021 : directory structure for the core html pages.
9022 case "$sitehtml3dir" in
9023 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$siteprefix#"` ;;
9024 *) dflt=$sitehtml3dir ;;
9027 ''|' ') dflt=none ;;
9030 rp='Pathname where the site-specific library html pages should be installed?'
9032 prefixvar=sitehtml3dir
9035 : determine where add-on manual pages go
9036 case "$siteman1dir" in
9037 '') dflt=`echo $man1dir | $sed "s#^$prefix#$siteprefix#"` ;;
9038 *) dflt=$siteman1dir ;;
9041 ''|' ') dflt=none ;;
9044 rp='Pathname where the site-specific manual pages should be installed?'
9046 prefixvar=siteman1dir
9049 : determine where add-on library man pages go
9050 case "$siteman3dir" in
9051 '') dflt=`echo $man3dir | $sed "s#^$prefix#$siteprefix#"` ;;
9052 *) dflt=$siteman3dir ;;
9055 ''|' ') dflt=none ;;
9058 rp='Pathname where the site-specific library manual pages should be installed?'
9060 prefixvar=siteman3dir
9063 : determine where add-on public executable scripts go
9064 case "$sitescript" in
9065 '') dflt=$siteprefix/script
9066 $test -d $dflt || dflt=$sitebin ;;
9067 *) dflt="$sitescript" ;;
9070 rp='Pathname where add-on public executable scripts should be installed?'
9072 prefixvar=sitescript
9075 : Check if faststdio is requested and available
9076 case "$usefaststdio" in
9077 $define|true|[yY]*|'')
9078 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
9088 Perl can be built to use 'fast stdio', which means using the stdio
9089 library but also directly manipulating the stdio buffers to enable
9090 faster I/O. Using stdio is better for backward compatibility (especially
9091 for Perl extensions), but on the other hand since Perl 5.8 the 'perlio'
9092 interface has been preferred instead of stdio.
9094 If this doesn't make any sense to you, just accept the default '$dflt'.
9096 rp='Use the "fast stdio" if available?'
9099 y|Y) val="$define" ;;
9106 : define an is-a-typedef? function
9107 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
9109 "") inclist="sys/types.h";;
9111 eval "varval=\$$var";
9115 for inc in $inclist; do
9116 echo "#include <$inc>" >>temp.c;
9118 echo "#ifdef $type" >> temp.c;
9119 echo "printf(\"We have $type\");" >> temp.c;
9120 echo "#endif" >> temp.c;
9121 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
9122 if $contains $type temp.E >/dev/null 2>&1; then
9128 *) eval "$var=\$varval";;
9131 : define an is-a-typedef? function that prompts if the type is not available.
9132 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
9134 "") inclist="sys/types.h";;
9136 eval "varval=\$$var";
9140 for inc in $inclist; do
9141 echo "#include <$inc>" >>temp.c;
9143 echo "#ifdef $type" >> temp.c;
9144 echo "printf(\"We have $type\");" >> temp.c;
9145 echo "#endif" >> temp.c;
9146 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
9148 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
9149 if $contains $type temp.E >/dev/null 2>&1; then
9150 echo "$type found." >&4;
9153 echo "$type NOT found." >&4;
9159 *) eval "$var=\$varval";;
9162 : see what type lseek is declared as in the kernel
9163 rp="What is the type used for lseek's offset on this system?"
9164 set off_t lseektype long stdio.h sys/types.h
9168 echo "Checking to see how big your file offsets are..." >&4
9170 #include <sys/types.h>
9174 printf("%d\n", (int)sizeof($lseektype));
9179 if eval $compile_ok; then
9180 lseeksize=`$run ./try`
9181 echo "Your file offsets are $lseeksize bytes long."
9185 echo "(I can't seem to compile the test program. Guessing...)"
9186 rp="What is the size of your file offsets (in bytes)?"
9192 : see what type file positions are declared as in the library
9193 rp="What is the type for file position used by fsetpos()?"
9194 set fpos_t fpostype long stdio.h sys/types.h
9197 : Check size for Fpos_t
9200 *_t) zzz="$fpostype" ;;
9203 echo "Checking the size of $zzz..." >&4
9205 #include <sys/types.h>
9212 printf("%d\n", (int)sizeof($fpostype));
9217 if eval $compile_ok; then
9221 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9224 echo "Your $zzz is $fpossize bytes long."
9230 echo "(I can't compile the test program. Guessing...)" >&4
9231 rp="What is the size of your file positions (in bytes)?"
9236 : Check for large file support
9237 # Backward compatibility (uselfs is deprecated).
9239 "$define"|true|[yY]*)
9242 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
9244 uselargefiles="$define"
9248 case "$lseeksize:$fpossize" in
9251 You can have files larger than 2 gigabytes.
9254 *) case "$uselargefiles" in
9255 "$undef"|false|[nN]*) dflt='n' ;;
9260 Perl can be built to understand large files (files larger than 2 gigabytes)
9261 on some systems. To do so, Configure can be run with -Duselargefiles.
9263 If this doesn't make any sense to you, just accept the default '$dflt'.
9265 rp='Try to understand large files, if available?'
9268 y|Y) val="$define" ;;
9275 : Look for a hint-file generated 'call-back-unit'. If the
9276 : user has specified that a large files perl is to be built,
9277 : we may need to set or change some other defaults.
9278 if $test -f uselargefiles.cbu; then
9279 echo "Your platform has some specific hints regarding large file builds, using them..."
9280 . ./uselargefiles.cbu
9282 case "$uselargefiles" in
9284 if $test -f uselargefiles.cbu; then
9286 echo "Rechecking to see how big your file offsets are..." >&4
9288 #include <sys/types.h>
9292 printf("%d\n", (int)sizeof($lseektype));
9297 if eval $compile_ok; then
9298 lseeksize=`$run ./try`
9299 $echo "Your file offsets are now $lseeksize bytes long."
9303 echo "(I can't seem to compile the test program. Guessing...)"
9304 rp="What is the size of your file offsets (in bytes)?"
9309 *_t) zzz="$fpostype" ;;
9312 $echo $n "Rechecking the size of $zzz...$c" >&4
9314 #include <sys/types.h>
9321 printf("%d\n", (int)sizeof($fpostype));
9326 if eval $compile_ok; then
9331 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9334 echo " $fpossize bytes." >&4
9340 echo "(I can't compile the test program. Guessing...)" >&4
9341 rp="What is the size of your file positions (in bytes)?"
9350 : Set the vendorbin variables
9351 case "$vendorprefix" in
9352 '') d_vendorbin="$undef"
9356 *) d_vendorbin="$define"
9357 : determine where vendor-supplied executables go.
9358 case "$vendorbin" in
9359 '') dflt=$vendorprefix/bin ;;
9360 *) dflt="$vendorbin" ;;
9363 rp='Pathname for the vendor-supplied executables directory?'
9366 vendorbinexp="$ansexp"
9372 : Set the vendorhtml1dir variables
9373 case "$vendorprefix" in
9374 '') vendorhtml1dir=''
9375 vendorhtml1direxp=''
9377 *) : determine where vendor-supplied html pages go.
9378 : There is no standard location, so try to copy the previously-selected
9379 : directory structure for the core html pages.
9380 : XXX Better default suggestions would be welcome.
9381 case "$vendorhtml1dir" in
9382 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9383 *) dflt=$vendorhtml1dir ;;
9386 ''|' ') dflt=none ;;
9389 rp='Pathname for the vendor-supplied html pages?'
9391 vendorhtml1dir="$ans"
9392 vendorhtml1direxp="$ansexp"
9395 : Use ' ' for none so value is preserved next time through Configure
9396 $test X"$vendorhtml1dir" = "X" && vendorhtml1dir=' '
9397 prefixvar=vendorhtml1dir
9400 : Set the vendorhtml3dir variables
9401 case "$vendorprefix" in
9402 '') vendorhtml3dir=''
9403 vendorhtml3direxp=''
9405 *) : determine where vendor-supplied module html pages go.
9406 : There is no standard location, so try to copy the previously-selected
9407 : directory structure for the core html pages.
9408 : XXX Better default suggestions would be welcome.
9409 case "$vendorhtml3dir" in
9410 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9411 *) dflt=$vendorhtml3dir ;;
9414 ''|' ') dflt=none ;;
9417 rp='Pathname for the vendor-supplied html pages?'
9419 vendorhtml3dir="$ans"
9420 vendorhtml3direxp="$ansexp"
9423 : Use ' ' for none so value is preserved next time through Configure
9424 $test X"$vendorhtml3dir" = "X" && vendorhtml3dir=' '
9425 prefixvar=vendorhtml3dir
9428 : Set the vendorman1dir variables
9429 case "$vendorprefix" in
9430 '') vendorman1dir=''
9433 *) : determine where vendor-supplied manual pages go.
9434 case "$vendorman1dir" in
9435 '') dflt=`echo "$man1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9436 *) dflt=$vendorman1dir ;;
9439 ''|' ') dflt=none ;;
9442 rp='Pathname for the vendor-supplied manual section 1 pages?'
9444 vendorman1dir="$ans"
9445 vendorman1direxp="$ansexp"
9448 : Use ' ' for none so value is preserved next time through Configure
9449 $test X"$vendorman1dir" = "X" && vendorman1dir=' '
9450 prefixvar=vendorman1dir
9453 : Set the vendorman3dir variables
9454 case "$vendorprefix" in
9455 '') vendorman3dir=''
9458 *) : determine where vendor-supplied module manual pages go.
9459 case "$vendorman3dir" in
9460 '') dflt=`echo "$man3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9461 *) dflt=$vendorman3dir ;;
9464 ''|' ') dflt=none ;;
9467 rp='Pathname for the vendor-supplied manual section 3 pages?'
9469 vendorman3dir="$ans"
9470 vendorman3direxp="$ansexp"
9473 : Use ' ' for none so value is preserved next time through Configure
9474 $test X"$vendorman3dir" = "X" && vendorman3dir=' '
9475 prefixvar=vendorman3dir
9478 : Set the vendorscript variables
9479 case "$vendorprefix" in
9480 '') d_vendorscript="$undef"
9484 *) d_vendorscript="$define"
9485 : determine where vendor-supplied scripts go.
9486 case "$vendorscript" in
9487 '') dflt=$vendorprefix/script
9488 $test -d $dflt || dflt=$vendorbin ;;
9489 *) dflt="$vendorscript" ;;
9493 The installation process will create a directory for
9494 vendor-supplied scripts.
9498 rp='Pathname for the vendor-supplied scripts directory?'
9501 vendorscriptexp="$ansexp"
9504 prefixvar=vendorscript
9507 : script used to emit important warnings
9510 if test \$# -gt 0; then
9515 echo "*** WARNING:" >&4
9516 sed -e 's/^/*** /' <msg >&4
9518 cat msg >>config.msg
9519 echo " " >>config.msg
9525 : see which of string.h or strings.h is needed
9527 strings=`./findhdr string.h`
9528 if $test "$strings" && $test -r "$strings"; then
9529 echo "Using <string.h> instead of <strings.h>." >&4
9533 strings=`./findhdr strings.h`
9534 if $test "$strings" && $test -r "$strings"; then
9535 echo "Using <strings.h> instead of <string.h>." >&4
9537 ./warn "No string header found -- You'll surely have problems."
9543 "$undef") strings=`./findhdr strings.h`;;
9544 *) strings=`./findhdr string.h`;;
9547 : see if qgcvt exists
9551 : Check print/scan long double stuff
9554 if $test X"$d_longdbl" = X"$define"; then
9556 echo "Checking how to print long doubles..." >&4
9558 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
9559 $cat >try.c <<'EOCP'
9560 #include <sys/types.h>
9564 printf("%.3f\n", d);
9568 if eval $compile; then
9572 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
9573 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
9574 echo "We will use %f."
9580 if $test X"$sPRIfldbl" = X; then
9581 $cat >try.c <<'EOCP'
9582 #include <sys/types.h>
9585 long double d = 123.456;
9586 printf("%.3Lf\n", d);
9590 if eval $compile; then
9594 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
9595 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
9596 echo "We will use %Lf."
9602 if $test X"$sPRIfldbl" = X; then
9603 $cat >try.c <<'EOCP'
9604 #include <sys/types.h>
9607 long double d = 123.456;
9608 printf("%.3llf\n", d);
9612 if eval $compile; then
9616 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
9617 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
9618 echo "We will use %llf."
9624 if $test X"$sPRIfldbl" = X; then
9625 $cat >try.c <<'EOCP'
9626 #include <sys/types.h>
9629 long double d = 123.456;
9630 printf("%.3lf\n", d);
9634 if eval $compile; then
9638 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
9639 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
9640 echo "We will use %lf."
9646 if $test X"$sPRIfldbl" = X; then
9647 echo "Cannot figure out how to print long doubles." >&4
9649 sSCNfldbl=$sPRIfldbl # expect consistency
9656 case "$sPRIfldbl" in
9657 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
9658 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
9659 d_SCNfldbl="$undef";
9661 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
9662 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
9663 d_SCNfldbl="$define";
9667 : Check how to convert floats to strings.
9669 if test "X$d_Gconvert" = X; then
9672 echo "Checking for an efficient way to convert floats to strings."
9674 case "$uselongdouble" in
9675 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
9677 case "$d_longdbl" in
9678 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
9680 case "$d_PRIgldbl" in
9681 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
9685 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
9686 char *myname = "gconvert";
9689 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
9690 char *myname = "gcvt";
9693 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
9694 char *myname = "qgcvt";
9695 #define DOUBLETYPE long double
9698 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
9700 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
9702 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
9705 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
9707 char *myname = "sprintf";
9711 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
9712 #define DOUBLETYPE long double
9714 #define DOUBLETYPE double
9726 # include <string.h>
9728 # include <strings.h>
9731 int checkit(char *expect, char *got)
9733 if (strcmp(expect, got)) {
9734 printf("%s oddity: Expected %s, got %s\n",
9735 myname, expect, got);
9745 /* This must be 1st test on (which?) platform */
9746 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
9747 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
9748 checkit("0.1", buf);
9750 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
9751 checkit("0.01", buf);
9753 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
9754 checkit("0.001", buf);
9756 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
9757 checkit("0.0001", buf);
9759 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
9760 if (strlen(buf) > 5)
9761 checkit("9e-005", buf); /* for Microsoft ?? */
9763 checkit("9e-05", buf);
9765 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
9768 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
9769 checkit("1.1", buf);
9771 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
9772 checkit("1.01", buf);
9774 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
9775 checkit("1.001", buf);
9777 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
9778 checkit("1.0001", buf);
9780 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
9781 checkit("1.00001", buf);
9783 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
9784 checkit("1.000001", buf);
9786 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
9789 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
9792 /* Some Linux gcvt's give 1.e+5 here. */
9793 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
9794 checkit("100000", buf);
9796 /* Some Linux gcvt's give -1.e+5 here. */
9797 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
9798 checkit("-100000", buf);
9800 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
9801 checkit("123.456", buf);
9803 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
9804 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
9805 /* 34 should be enough to scare even long double
9806 * places into using the e notation. */
9807 if (strlen(buf) > 5)
9808 checkit("1e+034", buf); /* for Microsoft */
9810 checkit("1e+34", buf);
9812 /* For Perl, if you add additional tests here, also add them to
9813 * t/base/num.t for benefit of platforms not using Configure or
9814 * overriding d_Gconvert */
9819 : first add preferred functions to our list
9821 for xxx_convert in $gconvert_preference; do
9822 case $xxx_convert in
9823 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
9824 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
9827 : then add any others
9828 for xxx_convert in gconvert gcvt sprintf; do
9831 *) xxx_list="$xxx_list $xxx_convert" ;;
9835 case "$d_longdbl$uselongdouble" in
9837 : again, add prefered functions to our list first
9839 for xxx_convert in $gconvert_ld_preference; do
9840 case $xxx_convert in
9841 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9842 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
9845 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
9846 for xxx_convert in qgcvt sprintf $xxx_list; do
9847 case "$xxx_ld_list" in
9848 $xxx_convert*|*" $xxx_convert"*) ;;
9849 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9852 : if sprintf cannot do long doubles, move it to the end
9853 if test "$d_PRIgldbl" != "$define"; then
9854 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
9856 : if no qgcvt, remove it
9857 if test "$d_qgcvt" != "$define"; then
9858 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
9861 xxx_list="$xxx_ld_list"
9865 for xxx_convert in $xxx_list; do
9866 echo "Trying $xxx_convert..."
9867 $rm -f try try$_o core
9868 set try -DTRY_$xxx_convert
9869 if eval $compile; then
9870 echo "$xxx_convert() found." >&4
9872 echo "I'll use $xxx_convert to convert floats into a string." >&4
9875 echo "...But $xxx_convert didn't work as I expected."
9879 echo "$xxx_convert NOT found." >&4
9883 if test X$xxx_convert = X; then
9884 echo "*** WHOA THERE!!! ***" >&4
9885 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
9889 case "$xxx_convert" in
9890 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
9891 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
9892 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
9893 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
9894 "$define$define$define")
9895 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9896 "$define$define$undef")
9897 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9898 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9906 : see if _fwalk exists
9910 : Initialize h_fcntl
9913 : Initialize h_sysfile
9916 : access call always available on UNIX
9920 : locate the flags for 'access()'
9924 $cat >access.c <<EOCP
9925 #include <sys/types.h>
9930 #include <sys/file.h>
9943 : check sys/file.h first, no particular reason here
9944 if $test `./findhdr sys/file.h` && \
9945 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9947 echo "<sys/file.h> defines the *_OK access constants." >&4
9948 elif $test `./findhdr fcntl.h` && \
9949 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9951 echo "<fcntl.h> defines the *_OK access constants." >&4
9952 elif $test `./findhdr unistd.h` && \
9953 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9954 echo "<unistd.h> defines the *_OK access constants." >&4
9956 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9962 : see if accessx exists
9963 set accessx d_accessx
9966 : see if aintl exists
9970 : see if alarm exists
9974 : see if 64bit time functions exists
9976 set ctime64 d_ctime64
9979 set localtime64 d_localtime64
9982 set gmtime64 d_gmtime64
9985 set mktime64 d_mktime64
9988 set difftime64 d_difftime64
9991 set asctime64 d_asctime64
9994 : see if POSIX threads are available
9995 set pthread.h i_pthread
9998 : define a fucntion to check prototypes
9999 $cat > protochk <<EOSH
10002 optimize="$optimize"
10004 prototype="$prototype"
10007 usethreads=$usethreads
10008 i_pthread=$i_pthread
10009 pthread_h_first=$pthread_h_first
10012 $cat >> protochk <<'EOSH'
10017 while test $# -ge 2; do
10019 $define) echo "#include <$2>" >> try.c ;;
10020 literal) echo "$2" >> try.c ;;
10022 # Extra magic for the benefit of systems that need pthread.h
10023 # to be included early to correctly detect threadsafe functions.
10024 # Such functions must guarantee themselves, though, that the usethreads
10025 # and i_pthread have been defined, before calling protochk.
10026 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
10027 echo "#include <pthread.h>" >> try.c
10032 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
10033 cat >> try.c <<'EOCP'
10034 #ifdef CAN_PROTOTYPE
10035 #define _(args) args
10040 echo "$foo" >> try.c
10041 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
10042 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
10048 $eunicefix protochk
10050 : Define hasproto macro for Configure internal use
10051 hasproto='varname=$1; func=$2; shift; shift;
10052 while $test $# -ge 2; do
10054 $define) echo "#include <$2>";;
10058 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
10059 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
10060 echo "$func() prototype found.";
10063 echo "$func() prototype NOT found.";
10070 : see if sys/types.h has to be included
10071 set sys/types.h i_systypes
10074 : see if sys/select.h has to be included
10075 set sys/select.h i_sysselct
10078 : Define hasfield macro for Configure internal use
10079 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
10080 while $test $# -ge 2; do
10082 $define) echo "#include <$2>";;
10086 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
10088 if eval $compile; then
10097 : see if we should include time.h, sys/time.h, or both
10099 if test "X$timeincl" = X; then
10100 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
10101 $echo $n "I'm now running the test program...$c"
10103 #include <sys/types.h>
10108 #ifdef SYSTIMEKERNEL
10111 #include <sys/time.h>
10114 #include <sys/select.h>
10116 #$i_stdlib I_STDLIB
10118 #include <stdlib.h>
10124 struct timeval bar;
10127 struct timezone tzp;
10129 if (foo.tm_sec == foo.tm_sec)
10132 if (bar.tv_sec == bar.tv_sec)
10139 for s_timezone in '-DS_TIMEZONE' ''; do
10141 for s_timeval in '-DS_TIMEVAL' ''; do
10142 for i_systimek in '' '-DSYSTIMEKERNEL'; do
10143 for i_time in '' '-DI_TIME'; do
10144 for i_systime in '-DI_SYSTIME' ''; do
10147 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
10148 if eval $compile; then
10149 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
10153 $echo $n "Succeeded with $flags$c"
10165 *SYSTIMEKERNEL*) i_systimek="$define"
10166 timeincl=`./findhdr sys/time.h`
10167 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
10168 *) i_systimek="$undef";;
10171 *I_TIME*) i_time="$define"
10172 timeincl=`./findhdr time.h`" $timeincl"
10173 echo "We'll include <time.h>." >&4;;
10174 *) i_time="$undef";;
10177 *I_SYSTIME*) i_systime="$define"
10178 timeincl=`./findhdr sys/time.h`" $timeincl"
10179 echo "We'll include <sys/time.h>." >&4;;
10180 *) i_systime="$undef";;
10184 : see if struct tm knows about tm_zone
10185 case "$i_systime$i_time" in
10188 echo "Checking to see if your struct tm has tm_zone field..." >&4
10189 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
10197 case "$d_tm_tm_zone" in
10198 "$define") echo "Yes, it does." ;;
10199 *) echo "No, it doesn't." ;;
10201 : see if struct tm knows about tm_gmtoff
10202 case "$i_systime$i_time" in
10205 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
10206 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
10214 case "$d_tm_tm_gmtoff" in
10215 "$define") echo "Yes, it does." ;;
10216 *) echo "No, it doesn't." ;;
10219 : see if asctime_r exists
10220 set asctime_r d_asctime_r
10222 case "$d_asctime_r" in
10224 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
10225 case "$d_asctime_r_proto:$usethreads" in
10226 ":define") d_asctime_r_proto=define
10227 set d_asctime_r_proto asctime_r $hdrs
10231 case "$d_asctime_r_proto" in
10233 case "$asctime_r_proto" in
10234 ''|0) try='char* asctime_r(const struct tm*, char*);'
10235 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SB ;;
10237 case "$asctime_r_proto" in
10238 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
10239 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SBI ;;
10241 case "$asctime_r_proto" in
10242 ''|0) try='int asctime_r(const struct tm*, char*);'
10243 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SB ;;
10245 case "$asctime_r_proto" in
10246 ''|0) try='int asctime_r(const struct tm*, char*, int);'
10247 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SBI ;;
10249 case "$asctime_r_proto" in
10250 ''|0) d_asctime_r=undef
10252 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
10253 * ) case "$asctime_r_proto" in
10254 REENTRANT_PROTO*) ;;
10255 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
10257 echo "Prototype: $try" ;;
10260 *) case "$usethreads" in
10261 define) echo "asctime_r has no prototype, not using it." >&4 ;;
10268 *) asctime_r_proto=0
10272 : see if atolf exists
10276 : see if atoll exists
10280 : Look for GCC-style attribute format
10281 case "$d_attribute_format" in
10284 echo "Checking whether your compiler can handle __attribute__((format)) ..." >&4
10285 $cat >attrib.c <<'EOCP'
10287 void my_special_printf(char* pat,...) __attribute__((__format__(__printf__,1,2)));
10289 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10290 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10291 echo "Your C compiler doesn't support __attribute__((format))."
10294 echo "Your C compiler supports __attribute__((format))."
10298 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10302 *) val="$d_attribute_format" ;;
10304 set d_attribute_format
10308 : Look for GCC-style attribute format with null format allowed
10309 case "$d_printf_format_null" in
10310 '') case "$d_attribute_format" in
10313 echo "Checking whether your compiler allows __printf__ format to be null ..." >&4
10314 $cat >attrib.c <<EOCP
10316 #$i_stdlib I_STDLIB
10318 #include <stdlib.h>
10320 int null_printf (char* pat,...) __attribute__((__format__(__printf__,1,2)));
10321 int null_printf (char* pat,...) { return (int)pat; }
10322 int main () { exit(null_printf(NULL)); }
10324 if $cc $ccflags -o attrib attrib.c >attrib.out 2>&1 ; then
10325 : run the executable in case it produces a run-time warning
10326 if $run ./attrib >>attrib.out 2>&1; then
10327 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10328 echo "Your C compiler doesn't allow __printf__ format to be null."
10331 echo "Your C compiler allows __printf__ format to be null."
10335 echo "Your C compiler executable failed with __printf__ format null."
10339 echo "Your C compiler fails with __printf__ format null."
10346 *) val="$d_printf_format_null" ;;
10348 set d_printf_format_null
10352 : Look for GCC-style attribute malloc
10353 case "$d_attribute_malloc" in
10356 echo "Checking whether your compiler can handle __attribute__((malloc)) ..." >&4
10357 $cat >attrib.c <<'EOCP'
10359 char *go_get_some_memory( int how_many_bytes ) __attribute__((malloc));
10361 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10362 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10363 echo "Your C compiler doesn't support __attribute__((malloc))."
10366 echo "Your C compiler supports __attribute__((malloc))."
10370 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10374 *) val="$d_attribute_malloc" ;;
10376 set d_attribute_malloc
10380 : Look for GCC-style attribute nonnull
10381 case "$d_attribute_nonnull" in
10384 echo "Checking whether your compiler can handle __attribute__((nonnull(1))) ..." >&4
10385 $cat >attrib.c <<'EOCP'
10387 void do_something (char *some_pointer,...) __attribute__((nonnull(1)));
10389 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10390 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10391 echo "Your C compiler doesn't support __attribute__((nonnull))."
10394 echo "Your C compiler supports __attribute__((nonnull))."
10398 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10402 *) val="$d_attribute_nonnull" ;;
10404 set d_attribute_nonnull
10408 : Look for GCC-style attribute noreturn
10409 case "$d_attribute_noreturn" in
10412 echo "Checking whether your compiler can handle __attribute__((noreturn)) ..." >&4
10413 $cat >attrib.c <<'EOCP'
10415 void fall_over_dead( void ) __attribute__((noreturn));
10417 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10418 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10419 echo "Your C compiler doesn't support __attribute__((noreturn))."
10422 echo "Your C compiler supports __attribute__((noreturn))."
10426 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10430 *) val="$d_attribute_noreturn" ;;
10432 set d_attribute_noreturn
10436 : Look for GCC-style attribute pure
10437 case "$d_attribute_pure" in
10440 echo "Checking whether your compiler can handle __attribute__((pure)) ..." >&4
10441 $cat >attrib.c <<'EOCP'
10443 int square( int n ) __attribute__((pure));
10445 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10446 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10447 echo "Your C compiler doesn't support __attribute__((pure))."
10450 echo "Your C compiler supports __attribute__((pure))."
10454 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10458 *) val="$d_attribute_pure" ;;
10460 set d_attribute_pure
10464 : Look for GCC-style attribute unused
10465 case "$d_attribute_unused" in
10468 echo "Checking whether your compiler can handle __attribute__((unused)) ..." >&4
10469 $cat >attrib.c <<'EOCP'
10471 int do_something( int dummy __attribute__((unused)), int n );
10473 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10474 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10475 echo "Your C compiler doesn't support __attribute__((unused))."
10478 echo "Your C compiler supports __attribute__((unused))."
10482 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10486 *) val="$d_attribute_unused" ;;
10488 set d_attribute_unused
10492 : Look for GCC-style attribute warn_unused_result
10493 case "$d_attribute_warn_unused_result" in
10496 echo "Checking whether your compiler can handle __attribute__((warn_unused_result)) ..." >&4
10497 $cat >attrib.c <<'EOCP'
10499 int I_will_not_be_ignored(void) __attribute__((warn_unused_result));
10501 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10502 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10503 echo "Your C compiler doesn't support __attribute__((warn_unused_result))."
10506 echo "Your C compiler supports __attribute__((warn_unused_result))."
10510 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10514 *) val="$d_attribute_warn_unused_result" ;;
10516 set d_attribute_warn_unused_result
10520 : see if bcmp exists
10524 : see if bcopy exists
10528 : see if getpgrp exists
10529 set getpgrp d_getpgrp
10532 case "$d_getpgrp" in
10535 echo "Checking to see which flavor of getpgrp is in use..."
10537 #$i_unistd I_UNISTD
10538 #include <sys/types.h>
10540 # include <unistd.h>
10542 #$i_stdlib I_STDLIB
10544 #include <stdlib.h>
10548 if (getuid() == 0) {
10549 printf("(I see you are running Configure as super-user...)\n");
10552 #ifdef TRY_BSD_PGRP
10553 if (getpgrp(1) == 0)
10562 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10563 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
10565 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10566 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
10569 echo "I can't seem to compile and run the test program."
10571 xxx="a USG one, i.e. you use getpgrp()."
10573 # SVR4 systems can appear rather BSD-ish.
10574 case "$i_unistd" in
10576 xxx="a BSD one, i.e. you use getpgrp(pid)."
10580 xxx="probably a USG one, i.e. you use getpgrp()."
10585 echo "Assuming your getpgrp is $xxx" >&4
10594 : see if setpgrp exists
10595 set setpgrp d_setpgrp
10598 case "$d_setpgrp" in
10601 echo "Checking to see which flavor of setpgrp is in use..."
10603 #$i_unistd I_UNISTD
10604 #include <sys/types.h>
10606 # include <unistd.h>
10608 #$i_stdlib I_STDLIB
10610 #include <stdlib.h>
10614 if (getuid() == 0) {
10615 printf("(I see you are running Configure as super-user...)\n");
10618 #ifdef TRY_BSD_PGRP
10619 if (-1 == setpgrp(1, 1))
10622 if (setpgrp() != -1)
10628 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10629 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
10631 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10632 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
10635 echo "(I can't seem to compile and run the test program.)"
10637 xxx="a USG one, i.e. you use setpgrp()."
10639 # SVR4 systems can appear rather BSD-ish.
10640 case "$i_unistd" in
10642 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
10646 xxx="probably a USG one, i.e. you use setpgrp()."
10651 echo "Assuming your setpgrp is $xxx" >&4
10660 : Look for GCC-style __builtin_choose_expr
10661 case "$d_builtin_choose_expr" in
10664 echo "Checking whether your compiler can handle __builtin_choose_expr ..." >&4
10665 $cat >try.c <<'EOCP'
10666 #include <assert.h>
10667 #include <stdlib.h>
10670 #define SYRINX(x) __builtin_choose_expr( x, (1056*2), (103*50) )
10673 assert( SYRINX(1) == 2112 );
10674 assert( SYRINX(1) != 5150 );
10675 assert( SYRINX(0) == 5150 );
10676 assert( SYRINX(0) != 2112 );
10677 puts( "All good!" );
10683 if eval $compile && $run ./try; then
10684 echo "Your C compiler supports __builtin_choose_expr."
10687 echo "Your C compiler doesn't seem to understand __builtin_choose_expr."
10691 *) val="$d_builtin_choose_expr" ;;
10694 set d_builtin_choose_expr
10698 : Look for GCC-style __builtin_expect
10699 case "$d_builtin_expect" in
10702 echo "Checking whether your compiler can handle __builtin_expect ..." >&4
10703 $cat >try.c <<'EOCP'
10706 if ( __builtin_expect(n, 0) ) n = 1;
10707 /* Remember shell exit code truth is 0, C truth is non-zero */
10712 if eval $compile && $run ./try; then
10713 echo "Your C compiler supports __builtin_expect."
10716 echo "Your C compiler doesn't seem to understand __builtin_expect."
10720 *) val="$d_builtin_expect" ;;
10723 set d_builtin_expect
10727 : see if bzero exists
10731 : see if stdarg is available
10733 if $test `./findhdr stdarg.h`; then
10734 echo "<stdarg.h> found." >&4
10737 echo "<stdarg.h> NOT found." >&4
10741 : see if varags is available
10743 if $test `./findhdr varargs.h`; then
10744 echo "<varargs.h> found." >&4
10746 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
10749 : set up the varargs testing programs
10750 $cat > varargs.c <<EOP
10752 #include <stdarg.h>
10755 #include <varargs.h>
10759 int f(char *p, ...)
10773 p = va_arg(ap, char *);
10779 $cat > varargs <<EOP
10781 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
10790 : now check which varargs header should be included
10795 if `./varargs I_STDARG`; then
10797 elif `./varargs I_VARARGS`; then
10802 if `./varargs I_VARARGS`; then
10809 echo "I could not find the definition for va_dcl... You have problems..." >&4
10810 val="$undef"; set i_stdarg; eval $setvar
10811 val="$undef"; set i_varargs; eval $setvar
10816 case "$i_varhdr" in
10818 val="$define"; set i_stdarg; eval $setvar
10819 val="$undef"; set i_varargs; eval $setvar
10822 val="$undef"; set i_stdarg; eval $setvar
10823 val="$define"; set i_varargs; eval $setvar
10826 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
10830 : see if the Compiler supports C99 variadic macros
10831 case "$i_stdarg$i_stdlib" in
10833 echo "You have <stdarg.h> and <stdlib.h>, so checking for C99 variadic macros." >&4
10836 #include <stdarg.h>
10838 #define foo(buffer, format, ...) sprintf(buffer, format, __VA_ARGS__)
10842 foo(buf, "%d %g %.*s", 123, 456.0, (int)3, "789fail");
10848 if eval $compile && $run ./try 2>&1 >/dev/null; then
10849 case "`$run ./try`" in
10851 echo "You have C99 variadic macros." >&4
10852 d_c99_variadic_macros="$define"
10855 echo "You don't have functional C99 variadic macros." >&4
10856 d_c99_variadic_macros="$undef"
10860 echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4
10861 d_c99_variadic_macros="$undef"
10866 echo "You don't have <stdarg.h> and <stdlib.h>, so not checking for C99 variadic macros." >&4
10867 d_c99_variadic_macros="$undef"
10871 : see if signal is declared as pointer to function returning int or void
10873 xxx=`./findhdr signal.h`
10874 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
10875 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
10876 echo "You have int (*signal())() instead of void." >&4
10878 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
10879 echo "You have void (*signal())()." >&4
10881 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
10882 echo "You have int (*signal())() instead of void." >&4
10884 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
10885 echo "You have void (*signal())()." >&4
10888 case "$d_voidsig" in
10890 echo "I can't determine whether signal handler returns void or int..." >&4
10892 rp="What type does your signal handler return?"
10895 v*) val="$define";;
10899 echo "As you already told me, signal handler returns void." >&4
10902 *) echo "As you already told me, signal handler returns int." >&4
10909 case "$d_voidsig" in
10910 "$define") signal_t="void";;
10911 *) signal_t="int";;
10915 : check for ability to cast large floats to 32-bit ints.
10917 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
10918 if $test "$intsize" -ge 4; then
10925 #$i_stdlib I_STDLIB
10927 #include <stdlib.h>
10929 #include <sys/types.h>
10930 #include <signal.h>
10931 $signal_t blech(int s) { exit(3); }
10938 signal(SIGFPE, blech);
10940 /* Don't let compiler optimize the test away. Store the number
10941 in a writable string for gcc to pass to sscanf under HP/UX.
10943 sprintf(str, "2147483647");
10944 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
10948 /* x86 processors will probably give 0x8000 0000, which is a
10949 sign change. We don't want that. We want to mimic SPARC
10950 behavior here, which is to preserve the sign and give
10953 if (i32 != ($xxx) f)
10959 if eval $compile_ok; then
10963 echo "(I can't seem to compile the test program--assuming it can't)"
10968 echo "Yup, it can."
10971 echo "Nope, it can't."
10978 : check for ability to cast negative floats to unsigned
10980 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
10983 #$i_stdlib I_STDLIB
10985 #include <stdlib.h>
10987 #include <sys/types.h>
10988 #include <signal.h>
10989 $signal_t blech(int s) { exit(7); }
10990 $signal_t blech_in_list(int s) { exit(4); }
10991 unsigned long dummy_long(unsigned long p) { return p; }
10992 unsigned int dummy_int(unsigned int p) { return p; }
10993 unsigned short dummy_short(unsigned short p) { return p; }
10997 unsigned long along;
10999 unsigned short ashort;
11003 /* Frustrate gcc-2.7.2's optimizer which failed this test with
11004 a direct f = -123. assignment. gcc-2.8.0 reportedly
11005 optimized the whole file away
11007 /* Store the number in a writable string for gcc to pass to
11008 sscanf under HP/UX.
11010 sprintf(str, "-123");
11011 sscanf(str, "%lf", &f); /* f = -123.; */
11013 signal(SIGFPE, blech);
11014 along = (unsigned long)f;
11015 aint = (unsigned int)f;
11016 ashort = (unsigned short)f;
11017 if (along != (unsigned long)-123)
11019 if (aint != (unsigned int)-123)
11021 if (ashort != (unsigned short)-123)
11023 sprintf(str, "1073741824.");
11024 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
11027 along = (unsigned long)f;
11028 if (along != 0x80000000)
11032 along = (unsigned long)f;
11033 if (along != 0x7fffffff)
11037 along = (unsigned long)f;
11038 if (along != 0x80000001)
11042 signal(SIGFPE, blech_in_list);
11043 sprintf(str, "123.");
11044 sscanf(str, "%lf", &f); /* f = 123.; */
11045 along = dummy_long((unsigned long)f);
11046 aint = dummy_int((unsigned int)f);
11047 ashort = dummy_short((unsigned short)f);
11048 if (along != (unsigned long)123)
11050 if (aint != (unsigned int)123)
11052 if (ashort != (unsigned short)123)
11059 if eval $compile_ok; then
11063 echo "(I can't seem to compile the test program--assuming it can't)"
11066 case "$castflags" in
11068 echo "Yup, it can."
11071 echo "Nope, it can't."
11078 : see if vprintf exists
11080 if set vprintf val -f d_vprintf; eval $csym; $val; then
11081 echo 'vprintf() found.' >&4
11084 #$i_stdarg I_STDARG /* Only one of these can be defined by i_varhrd */
11085 #$i_varargs I_VARARGS
11087 #$i_stdlib I_STDLIB
11088 #$i_unistd I_UNISTD
11091 # include <stdarg.h>
11092 #else /* I_VARARGS */
11093 # include <varargs.h>
11097 # include <unistd.h>
11101 # include <stdlib.h>
11104 #include <stdio.h> /* vsprintf prototype */
11107 void xxx(int n, ...)
11112 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
11114 int main() { xxx(1, "foo"); }
11116 #else /* I_VARARGS */
11124 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
11126 int main() { xxx("foo"); }
11132 if eval $compile_ok; then
11133 if $run ./try; then
11134 echo "Your vsprintf() returns (int)." >&4
11137 echo "Your vsprintf() returns (char*)." >&4
11141 echo 'I am unable to compile the vsprintf() test program.' >&4
11142 # We shouldn't get here. If we do, assume the standard signature,
11143 # not the old BSD one.
11144 echo 'Guessing that vsprintf() returns (int).' >&4
11148 echo 'vprintf() NOT found.' >&4
11159 : see if chown exists
11163 : see if chroot exists
11164 set chroot d_chroot
11167 : see if chsize exists
11168 set chsize d_chsize
11171 : see if class exists
11175 : see if clearenv exists
11176 set clearenv d_clearenv
11179 : Define hasstruct macro for Configure internal use
11180 hasstruct='varname=$1; struct=$2; shift; shift;
11181 while $test $# -ge 2; do
11183 $define) echo "#include <$2>";;
11187 echo "int main () { struct $struct foo; }" >> try.c;
11189 if eval $compile; then
11198 : see whether socket exists
11202 $echo $n "Hmm... $c" >&4
11203 if set socket val -f d_socket; eval $csym; $val; then
11204 echo "Looks like you have Berkeley networking support." >&4
11206 if set setsockopt val -f; eval $csym; $val; then
11209 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
11210 d_oldsock="$define"
11213 if $contains socklib libc.list >/dev/null 2>&1; then
11214 echo "Looks like you have Berkeley networking support." >&4
11216 : we will have to assume that it supports the 4.2 BSD interface
11219 echo "You don't have Berkeley networking in libc$_a..." >&4
11220 if test "X$d_socket" = "X$define"; then
11221 echo "...but you seem to believe that you have sockets." >&4
11223 for net in net socket
11225 if test -f /usr/lib/lib$net$_a; then
11226 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
11227 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
11228 if $contains socket libc.list >/dev/null 2>&1; then
11233 echo "...but the Wollongong group seems to have hacked it in." >&4
11234 sockethdr="-I/usr/netinclude"
11237 echo "Found Berkeley sockets interface in lib$net." >&4
11238 if $contains setsockopt libc.list >/dev/null 2>&1; then
11241 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
11242 d_oldsock="$define"
11248 if test "X$d_socket" != "X$define"; then
11249 echo "or anywhere else I see." >&4
11257 : see if socketpair exists
11258 set socketpair d_sockpair
11263 echo "Checking the availability of certain socket constants..." >&4
11264 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
11265 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
11267 #include <sys/types.h>
11268 #include <sys/socket.h>
11274 set try; if eval $compile; then
11277 set d_${enum}; eval $setvar
11281 : see if this is a sys/uio.h system
11282 set sys/uio.h i_sysuio
11285 : Check for cmsghdr support
11287 echo "Checking to see if your system supports struct cmsghdr..." >&4
11288 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
11290 case "$d_cmsghdr_s" in
11291 "$define") echo "Yes, it does." ;;
11292 *) echo "No, it doesn't." ;;
11296 : check for const keyword
11298 echo 'Checking to see if your C compiler knows about "const"...' >&4
11299 $cat >const.c <<'EOCP'
11300 typedef struct spug { int drokk; } spug;
11304 const spug y = { 0 };
11307 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
11309 echo "Yup, it does."
11312 echo "Nope, it doesn't."
11317 : see if copysignl exists
11318 set copysignl d_copysignl
11321 : see if crypt exists
11326 $define) cryptlib='' ;;
11327 *) if set crypt val -f d_crypt; eval $csym; $val; then
11328 echo 'crypt() found.' >&4
11332 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
11333 if $test -z "$cryptlib"; then
11334 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
11338 if $test -z "$cryptlib"; then
11339 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
11343 if $test -z "$cryptlib"; then
11344 cryptlib=`./loc libcrypt$_a "" $libpth`
11348 if $test -z "$cryptlib"; then
11349 echo 'crypt() NOT found.' >&4
11360 : see if this is a crypt.h system
11361 set crypt.h i_crypt
11364 : see if crypt_r exists
11365 set crypt_r d_crypt_r
11367 case "$d_crypt_r" in
11369 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
11370 case "$d_crypt_r_proto:$usethreads" in
11371 ":define") d_crypt_r_proto=define
11372 set d_crypt_r_proto crypt_r $hdrs
11376 case "$d_crypt_r_proto" in
11378 case "$crypt_r_proto" in
11379 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
11380 ./protochk "$extern_C $try" $hdrs && crypt_r_proto=B_CCS ;;
11382 case "$crypt_r_proto" in
11383 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
11384 ./protochk "$extern_C $try" $hdrs && crypt_r_proto=B_CCD ;;
11386 case "$crypt_r_proto" in
11387 ''|0) d_crypt_r=undef
11389 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
11390 * ) case "$crypt_r_proto" in
11391 REENTRANT_PROTO*) ;;
11392 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
11394 echo "Prototype: $try" ;;
11397 *) case "$usethreads" in
11398 define) echo "crypt_r has no prototype, not using it." >&4 ;;
11409 : get csh whereabouts
11411 'csh') val="$undef" ;;
11412 *) val="$define" ;;
11416 : Respect a hint or command line value for full_csh.
11417 case "$full_csh" in
11418 '') full_csh=$csh ;;
11421 : see if ctermid exists
11422 set ctermid d_ctermid
11425 : see if ctermid_r exists
11426 set ctermid_r d_ctermid_r
11428 case "$d_ctermid_r" in
11430 hdrs="$i_systypes sys/types.h define stdio.h "
11431 case "$d_ctermid_r_proto:$usethreads" in
11432 ":define") d_ctermid_r_proto=define
11433 set d_ctermid_r_proto ctermid_r $hdrs
11437 case "$d_ctermid_r_proto" in
11439 case "$ctermid_r_proto" in
11440 ''|0) try='char* ctermid_r(char*);'
11441 ./protochk "$extern_C $try" $hdrs && ctermid_r_proto=B_B ;;
11443 case "$ctermid_r_proto" in
11444 ''|0) d_ctermid_r=undef
11446 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
11447 * ) case "$ctermid_r_proto" in
11448 REENTRANT_PROTO*) ;;
11449 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
11451 echo "Prototype: $try" ;;
11454 *) case "$usethreads" in
11455 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
11462 *) ctermid_r_proto=0
11466 : see if ctime_r exists
11467 set ctime_r d_ctime_r
11469 case "$d_ctime_r" in
11471 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
11472 case "$d_ctime_r_proto:$usethreads" in
11473 ":define") d_ctime_r_proto=define
11474 set d_ctime_r_proto ctime_r $hdrs
11478 case "$d_ctime_r_proto" in
11480 case "$ctime_r_proto" in
11481 ''|0) try='char* ctime_r(const time_t*, char*);'
11482 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=B_SB ;;
11484 case "$ctime_r_proto" in
11485 ''|0) try='char* ctime_r(const time_t*, char*, int);'
11486 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=B_SBI ;;
11488 case "$ctime_r_proto" in
11489 ''|0) try='int ctime_r(const time_t*, char*);'
11490 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=I_SB ;;
11492 case "$ctime_r_proto" in
11493 ''|0) try='int ctime_r(const time_t*, char*, int);'
11494 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=I_SBI ;;
11496 case "$ctime_r_proto" in
11497 ''|0) d_ctime_r=undef
11499 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
11500 * ) case "$ctime_r_proto" in
11501 REENTRANT_PROTO*) ;;
11502 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
11504 echo "Prototype: $try" ;;
11507 *) case "$usethreads" in
11508 define) echo "ctime_r has no prototype, not using it." >&4 ;;
11519 : see if cuserid exists
11520 set cuserid d_cuserid
11523 : see if this is a limits.h system
11524 set limits.h i_limits
11527 : see if this is a float.h system
11528 set float.h i_float
11531 : See if number of significant digits in a double precision number is known
11533 $cat >dbl_dig.c <<EOM
11534 #$i_limits I_LIMITS
11537 #include <limits.h>
11543 printf("Contains DBL_DIG");
11546 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
11547 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
11548 echo "DBL_DIG found." >&4
11551 echo "DBL_DIG NOT found." >&4
11558 : see if dbm.h is available
11559 : see if dbmclose exists
11560 set dbmclose d_dbmclose
11563 case "$d_dbmclose" in
11573 *) set rpcsvc/dbm.h i_rpcsvcdbm
11578 *) echo "We won't be including <dbm.h>"
11588 : see if prototype for dbminit is available
11590 set d_dbminitproto dbminit $i_dbm dbm.h
11593 : see if difftime exists
11594 set difftime d_difftime
11597 : see if this is a dirent system
11599 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
11601 echo "<dirent.h> found." >&4
11604 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
11605 echo "<sys/dir.h> found." >&4
11608 xinc=`./findhdr sys/ndir.h`
11610 echo "<dirent.h> NOT found." >&4
11615 : Look for type of directory structure.
11617 $cppstdin $cppflags $cppminus < "$xinc" > try.c
11619 case "$direntrytype" in
11621 case "$i_dirent" in
11622 $define) guess1='struct dirent' ;;
11623 *) guess1='struct direct' ;;
11626 *) guess1="$direntrytype"
11631 'struct dirent') guess2='struct direct' ;;
11632 *) guess2='struct dirent' ;;
11635 if $contains "$guess1" try.c >/dev/null 2>&1; then
11636 direntrytype="$guess1"
11637 echo "Your directory entries are $direntrytype." >&4
11638 elif $contains "$guess2" try.c >/dev/null 2>&1; then
11639 direntrytype="$guess2"
11640 echo "Your directory entries seem to be $direntrytype." >&4
11642 echo "I don't recognize your system's directory entries." >&4
11643 rp="What type is used for directory entries on this system?"
11646 direntrytype="$ans"
11650 : see if the directory entry stores field length
11652 $cppstdin $cppflags $cppminus < "$xinc" > try.c
11653 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
11654 echo "Good, your directory entry keeps length information in d_namlen." >&4
11657 echo "Your directory entry does not know about the d_namlen field." >&4
11664 : Look for DIR.dd_fd
11665 case "$i_dirent" in
11667 echo "Checking to see if DIR has a dd_fd member variable" >&4
11669 #$i_stdlib I_STDLIB
11671 #include <stdlib.h>
11673 #include <dirent.h>
11683 if eval $compile; then
11684 echo "Yes, it does."
11687 echo "No, it does not."
11692 echo "You don't have a <dirent.h>, so not checking for dd_fd." >&4
11700 : see if this is an sysdir system
11701 set sys/dir.h i_sysdir
11704 : see if this is an sysndir system
11705 set sys/ndir.h i_sysndir
11710 $cat >dirfd.c <<EOM
11712 #$i_stdlib I_STDLIB
11714 #include <stdlib.h>
11716 #$i_dirent I_DIRENT /**/
11717 #$i_sysdir I_SYS_DIR /**/
11718 #$i_sysndir I_SYS_NDIR /**/
11719 #$i_systypes I_SYS_TYPES /**/
11720 #if defined(I_SYS_TYPES)
11721 #include <sys/types.h>
11723 #if defined(I_DIRENT)
11724 #include <dirent.h>
11725 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
11726 #include <sys/dir.h>
11730 #include <sys/ndir.h>
11734 #include <ndir.h> /* may be wrong in the future */
11736 #include <sys/dir.h>
11742 DIR *dirp = opendir(".");
11743 if (dirfd(dirp) >= 0)
11751 if eval $compile; then
11755 $define) echo "dirfd() found." >&4 ;;
11756 *) echo "dirfd() NOT found." >&4 ;;
11762 : see if dlerror exists
11765 set dlerror d_dlerror
11769 : see if dlfcn is available
11770 set dlfcn.h i_dlfcn
11773 : Check what extension to use for shared libs
11778 On a few systems, the dynamically loaded modules that perl generates and uses
11779 will need a different extension than shared libs. The default will probably
11785 *) dflt="$dlext" ;;
11787 rp='What is the extension of dynamically loaded modules'
11796 : Check if dlsym need a leading underscore
11802 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
11803 $cat >dyna.c <<'EOM'
11810 #$i_stdlib I_STDLIB
11812 #include <stdlib.h>
11816 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
11818 #include <sys/types.h>
11823 extern int fred() ;
11832 int mode = RTLD_LAZY ;
11834 handle = dlopen("./dyna.$dlext", mode) ;
11835 if (handle == NULL) {
11840 symbol = dlsym(handle, "fred") ;
11841 if (symbol == NULL) {
11842 /* try putting a leading underscore */
11843 symbol = dlsym(handle, "_fred") ;
11844 if (symbol == NULL) {
11857 : Call the object file tmp-dyna.o in case dlext=o.
11858 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
11859 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
11860 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
11861 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
11864 1) echo "Test program failed using dlopen." >&4
11865 echo "Perhaps you should not use dynamic loading." >&4;;
11866 2) echo "Test program failed using dlsym." >&4
11867 echo "Perhaps you should not use dynamic loading." >&4;;
11868 3) echo "dlsym needs a leading underscore" >&4
11870 4) echo "dlsym doesn't need a leading underscore." >&4;;
11873 echo "I can't compile and run the test program." >&4
11874 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
11879 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
11884 : see if drand48_r exists
11885 set drand48_r d_drand48_r
11887 case "$d_drand48_r" in
11889 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
11890 case "$d_drand48_r_proto:$usethreads" in
11891 ":define") d_drand48_r_proto=define
11892 set d_drand48_r_proto drand48_r $hdrs
11896 case "$d_drand48_r_proto" in
11898 case "$drand48_r_proto" in
11899 ''|0) try='int drand48_r(struct drand48_data*, double*);'
11900 ./protochk "$extern_C $try" $hdrs && drand48_r_proto=I_ST ;;
11902 case "$drand48_r_proto" in
11903 ''|0) d_drand48_r=undef
11905 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
11906 * ) case "$drand48_r_proto" in
11907 REENTRANT_PROTO*) ;;
11908 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
11910 echo "Prototype: $try" ;;
11913 *) case "$usethreads" in
11914 define) echo "drand48_r has no prototype, not using it." >&4 ;;
11921 *) drand48_r_proto=0
11925 : see if prototype for drand48 is available
11927 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
11930 : see if dup2 exists
11934 : see if eaccess exists
11935 set eaccess d_eaccess
11938 : see if endgrent exists
11939 set endgrent d_endgrent
11942 : see if this is an grp system
11948 xxx=`./findhdr grp.h`
11949 $cppstdin $cppflags $cppminus < $xxx >$$.h
11951 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
11963 set d_grpasswd; eval $setvar
11967 : see if endgrent_r exists
11968 set endgrent_r d_endgrent_r
11970 case "$d_endgrent_r" in
11972 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11973 case "$d_endgrent_r_proto:$usethreads" in
11974 ":define") d_endgrent_r_proto=define
11975 set d_endgrent_r_proto endgrent_r $hdrs
11979 case "$d_endgrent_r_proto" in
11981 case "$endgrent_r_proto" in
11982 ''|0) try='int endgrent_r(FILE**);'
11983 ./protochk "$extern_C $try" $hdrs && endgrent_r_proto=I_H ;;
11985 case "$endgrent_r_proto" in
11986 ''|0) try='void endgrent_r(FILE**);'
11987 ./protochk "$extern_C $try" $hdrs && endgrent_r_proto=V_H ;;
11989 case "$endgrent_r_proto" in
11990 ''|0) d_endgrent_r=undef
11992 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
11993 * ) case "$endgrent_r_proto" in
11994 REENTRANT_PROTO*) ;;
11995 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
11997 echo "Prototype: $try" ;;
12000 *) case "$usethreads" in
12001 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
12008 *) endgrent_r_proto=0
12012 : see if endhostent exists
12013 set endhostent d_endhent
12016 : see if this is a netdb.h system
12017 set netdb.h i_netdb
12020 : see if endhostent_r exists
12021 set endhostent_r d_endhostent_r
12023 case "$d_endhostent_r" in
12025 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12026 case "$d_endhostent_r_proto:$usethreads" in
12027 ":define") d_endhostent_r_proto=define
12028 set d_endhostent_r_proto endhostent_r $hdrs
12032 case "$d_endhostent_r_proto" in
12034 case "$endhostent_r_proto" in
12035 ''|0) try='int endhostent_r(struct hostent_data*);'
12036 ./protochk "$extern_C $try" $hdrs && endhostent_r_proto=I_D ;;
12038 case "$endhostent_r_proto" in
12039 ''|0) try='void endhostent_r(struct hostent_data*);'
12040 ./protochk "$extern_C $try" $hdrs && endhostent_r_proto=V_D ;;
12042 case "$endhostent_r_proto" in
12043 ''|0) d_endhostent_r=undef
12044 endhostent_r_proto=0
12045 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
12046 * ) case "$endhostent_r_proto" in
12047 REENTRANT_PROTO*) ;;
12048 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
12050 echo "Prototype: $try" ;;
12053 *) case "$usethreads" in
12054 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
12056 d_endhostent_r=undef
12057 endhostent_r_proto=0
12061 *) endhostent_r_proto=0
12065 : see if endnetent exists
12066 set endnetent d_endnent
12069 : see if endnetent_r exists
12070 set endnetent_r d_endnetent_r
12072 case "$d_endnetent_r" in
12074 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12075 case "$d_endnetent_r_proto:$usethreads" in
12076 ":define") d_endnetent_r_proto=define
12077 set d_endnetent_r_proto endnetent_r $hdrs
12081 case "$d_endnetent_r_proto" in
12083 case "$endnetent_r_proto" in
12084 ''|0) try='int endnetent_r(struct netent_data*);'
12085 ./protochk "$extern_C $try" $hdrs && endnetent_r_proto=I_D ;;
12087 case "$endnetent_r_proto" in
12088 ''|0) try='void endnetent_r(struct netent_data*);'
12089 ./protochk "$extern_C $try" $hdrs && endnetent_r_proto=V_D ;;
12091 case "$endnetent_r_proto" in
12092 ''|0) d_endnetent_r=undef
12093 endnetent_r_proto=0
12094 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
12095 * ) case "$endnetent_r_proto" in
12096 REENTRANT_PROTO*) ;;
12097 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
12099 echo "Prototype: $try" ;;
12102 *) case "$usethreads" in
12103 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
12105 d_endnetent_r=undef
12106 endnetent_r_proto=0
12110 *) endnetent_r_proto=0
12114 : see if endprotoent exists
12115 set endprotoent d_endpent
12118 : see if endprotoent_r exists
12119 set endprotoent_r d_endprotoent_r
12121 case "$d_endprotoent_r" in
12123 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12124 case "$d_endprotoent_r_proto:$usethreads" in
12125 ":define") d_endprotoent_r_proto=define
12126 set d_endprotoent_r_proto endprotoent_r $hdrs
12130 case "$d_endprotoent_r_proto" in
12132 case "$endprotoent_r_proto" in
12133 ''|0) try='int endprotoent_r(struct protoent_data*);'
12134 ./protochk "$extern_C $try" $hdrs && endprotoent_r_proto=I_D ;;
12136 case "$endprotoent_r_proto" in
12137 ''|0) try='void endprotoent_r(struct protoent_data*);'
12138 ./protochk "$extern_C $try" $hdrs && endprotoent_r_proto=V_D ;;
12140 case "$endprotoent_r_proto" in
12141 ''|0) d_endprotoent_r=undef
12142 endprotoent_r_proto=0
12143 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
12144 * ) case "$endprotoent_r_proto" in
12145 REENTRANT_PROTO*) ;;
12146 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
12148 echo "Prototype: $try" ;;
12151 *) case "$usethreads" in
12152 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
12154 d_endprotoent_r=undef
12155 endprotoent_r_proto=0
12159 *) endprotoent_r_proto=0
12163 : see if endpwent exists
12164 set endpwent d_endpwent
12167 : see if this is a pwd.h system
12173 xxx=`./findhdr pwd.h`
12174 $cppstdin $cppflags $cppminus < $xxx >$$.h
12176 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
12184 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
12192 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
12200 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
12208 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
12216 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
12224 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
12232 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
12244 set d_pwquota; eval $setvar
12245 set d_pwage; eval $setvar
12246 set d_pwchange; eval $setvar
12247 set d_pwclass; eval $setvar
12248 set d_pwexpire; eval $setvar
12249 set d_pwcomment; eval $setvar
12250 set d_pwgecos; eval $setvar
12251 set d_pwpasswd; eval $setvar
12255 : see if endpwent_r exists
12256 set endpwent_r d_endpwent_r
12258 case "$d_endpwent_r" in
12260 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12261 case "$d_endpwent_r_proto:$usethreads" in
12262 ":define") d_endpwent_r_proto=define
12263 set d_endpwent_r_proto endpwent_r $hdrs
12267 case "$d_endpwent_r_proto" in
12269 case "$endpwent_r_proto" in
12270 ''|0) try='int endpwent_r(FILE**);'
12271 ./protochk "$extern_C $try" $hdrs && endpwent_r_proto=I_H ;;
12273 case "$endpwent_r_proto" in
12274 ''|0) try='void endpwent_r(FILE**);'
12275 ./protochk "$extern_C $try" $hdrs && endpwent_r_proto=V_H ;;
12277 case "$endpwent_r_proto" in
12278 ''|0) d_endpwent_r=undef
12280 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
12281 * ) case "$endpwent_r_proto" in
12282 REENTRANT_PROTO*) ;;
12283 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
12285 echo "Prototype: $try" ;;
12288 *) case "$usethreads" in
12289 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
12296 *) endpwent_r_proto=0
12300 : see if endservent exists
12301 set endservent d_endsent
12304 : see if endservent_r exists
12305 set endservent_r d_endservent_r
12307 case "$d_endservent_r" in
12309 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12310 case "$d_endservent_r_proto:$usethreads" in
12311 ":define") d_endservent_r_proto=define
12312 set d_endservent_r_proto endservent_r $hdrs
12316 case "$d_endservent_r_proto" in
12318 case "$endservent_r_proto" in
12319 ''|0) try='int endservent_r(struct servent_data*);'
12320 ./protochk "$extern_C $try" $hdrs && endservent_r_proto=I_D ;;
12322 case "$endservent_r_proto" in
12323 ''|0) try='void endservent_r(struct servent_data*);'
12324 ./protochk "$extern_C $try" $hdrs && endservent_r_proto=V_D ;;
12326 case "$endservent_r_proto" in
12327 ''|0) d_endservent_r=undef
12328 endservent_r_proto=0
12329 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
12330 * ) case "$endservent_r_proto" in
12331 REENTRANT_PROTO*) ;;
12332 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
12334 echo "Prototype: $try" ;;
12337 *) case "$usethreads" in
12338 define) echo "endservent_r has no prototype, not using it." >&4 ;;
12340 d_endservent_r=undef
12341 endservent_r_proto=0
12345 *) endservent_r_proto=0
12349 : Locate the flags for 'open()'
12352 #include <sys/types.h>
12357 #include <sys/file.h>
12359 #$i_stdlib I_STDLIB
12361 #include <stdlib.h>
12372 : check sys/file.h first to get FREAD on Sun
12373 if $test `./findhdr sys/file.h` && \
12374 set try -DI_SYS_FILE && eval $compile; then
12376 echo "<sys/file.h> defines the O_* constants..." >&4
12377 if $run ./try; then
12378 echo "and you have the 3 argument form of open()." >&4
12381 echo "but not the 3 argument form of open(). Oh, well." >&4
12384 elif $test `./findhdr fcntl.h` && \
12385 set try -DI_FCNTL && eval $compile; then
12387 echo "<fcntl.h> defines the O_* constants..." >&4
12388 if $run ./try; then
12389 echo "and you have the 3 argument form of open()." >&4
12392 echo "but not the 3 argument form of open(). Oh, well." >&4
12397 echo "I can't find the O_* constant definitions! You got problems." >&4
12403 : see if this is a sys/file.h system
12408 : do we need to include sys/file.h ?
12412 if $h_sysfile; then
12414 echo "We'll be including <sys/file.h>." >&4
12417 echo "We won't be including <sys/file.h>." >&4
12427 : see if fcntl.h is there
12432 : see if we can include fcntl.h
12438 echo "We'll be including <fcntl.h>." >&4
12441 if $h_sysfile; then
12442 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
12444 echo "We won't be including <fcntl.h>." >&4
12456 : see if fork exists
12460 : see if pipe exists
12464 : check for non-blocking I/O stuff
12465 case "$h_sysfile" in
12466 true) echo "#include <sys/file.h>" > head.c;;
12469 true) echo "#include <fcntl.h>" > head.c;;
12470 *) echo "#include <sys/fcntl.h>" > head.c;;
12475 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
12476 case "$o_nonblock" in
12478 $cat head.c > try.c
12479 $cat >>try.c <<EOCP
12481 #$i_stdlib I_STDLIB
12483 #include <stdlib.h>
12491 printf("O_NONBLOCK\n");
12495 printf("O_NDELAY\n");
12499 printf("FNDELAY\n");
12506 if eval $compile_ok; then
12507 o_nonblock=`$run ./try`
12508 case "$o_nonblock" in
12509 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
12510 *) echo "Seems like we can use $o_nonblock.";;
12513 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
12516 *) echo "Using $hint value $o_nonblock.";;
12521 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
12524 case "$d_fork:$d_pipe" in
12526 $cat head.c > try.c
12527 $cat >>try.c <<EOCP
12529 #include <sys/types.h>
12530 #include <signal.h>
12532 #$i_stdlib I_STDLIB
12534 #include <stdlib.h>
12540 #define MY_O_NONBLOCK $o_nonblock
12541 #ifndef errno /* XXX need better Configure test */
12544 #$i_unistd I_UNISTD
12546 #include <unistd.h>
12548 #$i_string I_STRING
12550 #include <string.h>
12552 #include <strings.h>
12554 $signal_t blech(int x) { exit(3); }
12556 $cat >> try.c <<'EOCP'
12564 pipe(pd); /* Down: child -> parent */
12565 pipe(pu); /* Up: parent -> child */
12568 close(pd[1]); /* Parent reads from pd[0] */
12569 close(pu[0]); /* Parent writes (blocking) to pu[1] */
12571 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
12576 signal(SIGALRM, blech);
12578 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
12580 sprintf(string, "%d\n", ret);
12581 write(2, string, strlen(string));
12584 if (errno == EAGAIN) {
12585 printf("EAGAIN\n");
12590 if (errno == EWOULDBLOCK)
12591 printf("EWOULDBLOCK\n");
12594 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
12595 sleep(2); /* Give it time to close our pipe */
12597 ret = read(pd[0], buf, 1); /* Should read EOF */
12599 sprintf(string, "%d\n", ret);
12600 write(4, string, strlen(string));
12604 close(pd[0]); /* We write to pd[1] */
12605 close(pu[1]); /* We read from pu[0] */
12606 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
12607 close(pd[1]); /* Pipe pd is now fully closed! */
12608 exit(0); /* Bye bye, thank you for playing! */
12612 if eval $compile_ok; then
12613 echo "$startsh" >mtry
12614 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
12616 ./mtry >/dev/null 2>&1
12618 0) eagain=`$cat try.out`;;
12619 1) echo "Could not perform non-blocking setting!";;
12620 2) echo "I did a successful read() for something that was not there!";;
12621 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
12622 4) echo "Could not find F_SETFL!";;
12623 *) echo "Something terribly wrong happened during testing.";;
12625 rd_nodata=`$cat try.ret`
12626 echo "A read() system call with no data present returns $rd_nodata."
12627 case "$rd_nodata" in
12630 echo "(That's peculiar, fixing that to be -1.)"
12636 echo "Forcing errno EAGAIN on read() with no data available."
12640 echo "Your read() sets errno to $eagain when no data is available."
12643 status=`$cat try.err`
12645 0) echo "And it correctly returns 0 to signal EOF.";;
12646 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
12647 *) echo "However, your read() returns '$status' on EOF??";;
12650 if test "$status" = "$rd_nodata"; then
12651 echo "WARNING: you can't distinguish between EOF and no data!"
12655 echo "I can't compile the test program--assuming errno EAGAIN will do."
12659 *) echo "Can't figure out how to test this--assuming errno EAGAIN will do."
12668 echo "Using $hint value $eagain."
12669 echo "Your read() returns $rd_nodata when no data is present."
12670 case "$d_eofnblk" in
12671 "$define") echo "And you can see EOF because read() returns 0.";;
12672 "$undef") echo "But you can't see EOF status from read() returned value.";;
12674 echo "(Assuming you can't see EOF status from read anyway.)"
12680 $rm_try head.c mtry
12682 : see if _ptr and _cnt from stdio act std
12685 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
12686 echo "(Looks like you have stdio.h from BSD.)"
12687 case "$stdio_ptr" in
12688 '') stdio_ptr='((fp)->_p)'
12691 *) ptr_lval=$d_stdio_ptr_lval;;
12693 case "$stdio_cnt" in
12694 '') stdio_cnt='((fp)->_r)'
12697 *) cnt_lval=$d_stdio_cnt_lval;;
12699 case "$stdio_base" in
12700 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
12702 case "$stdio_bufsiz" in
12703 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
12705 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
12706 echo "(Looks like you have stdio.h from Linux.)"
12707 case "$stdio_ptr" in
12708 '') stdio_ptr='((fp)->_IO_read_ptr)'
12711 *) ptr_lval=$d_stdio_ptr_lval;;
12713 case "$stdio_cnt" in
12714 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
12717 *) cnt_lval=$d_stdio_cnt_lval;;
12719 case "$stdio_base" in
12720 '') stdio_base='((fp)->_IO_read_base)';;
12722 case "$stdio_bufsiz" in
12723 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
12726 case "$stdio_ptr" in
12727 '') stdio_ptr='((fp)->_ptr)'
12730 *) ptr_lval=$d_stdio_ptr_lval;;
12732 case "$stdio_cnt" in
12733 '') stdio_cnt='((fp)->_cnt)'
12736 *) cnt_lval=$d_stdio_cnt_lval;;
12738 case "$stdio_base" in
12739 '') stdio_base='((fp)->_base)';;
12741 case "$stdio_bufsiz" in
12742 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
12746 : test whether _ptr and _cnt really work
12747 echo "Checking how std your stdio is..." >&4
12750 #$i_stdlib I_STDLIB
12752 #include <stdlib.h>
12754 #define FILE_ptr(fp) $stdio_ptr
12755 #define FILE_cnt(fp) $stdio_cnt
12757 FILE *fp = fopen("try.c", "r");
12760 18 <= FILE_cnt(fp) &&
12761 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
12769 if eval $compile && $to try.c; then
12770 if $run ./try; then
12771 echo "Your stdio acts pretty std."
12774 echo "Your stdio isn't very std."
12777 echo "Your stdio doesn't appear very std."
12781 # glibc 2.2.90 and above apparently change stdio streams so Perl's
12782 # direct buffer manipulation no longer works. The Configure tests
12783 # should be changed to correctly detect this, but until then,
12784 # the following check should at least let perl compile and run.
12785 # (This quick fix should be updated before 5.8.1.)
12786 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
12787 # A. Dougherty, June 3, 2002.
12788 case "$d_gnulibc" in
12790 case "$gnulibc_version" in
12794 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
12803 : Can _ptr be used as an lvalue?
12804 case "$d_stdstdio$ptr_lval" in
12805 $define$define) val=$define ;;
12808 set d_stdio_ptr_lval
12811 : Can _cnt be used as an lvalue?
12812 case "$d_stdstdio$cnt_lval" in
12813 $define$define) val=$define ;;
12816 set d_stdio_cnt_lval
12820 : test whether setting _ptr sets _cnt as a side effect
12821 d_stdio_ptr_lval_sets_cnt="$undef"
12822 d_stdio_ptr_lval_nochange_cnt="$undef"
12823 case "$d_stdio_ptr_lval$d_stdstdio" in
12825 echo "Checking to see what happens if we set the stdio ptr..." >&4
12828 /* Can we scream? */
12829 /* Eat dust sed :-) */
12830 /* In the buffer space, no one can hear you scream. */
12831 #$i_stdlib I_STDLIB
12833 #include <stdlib.h>
12835 #define FILE_ptr(fp) $stdio_ptr
12836 #define FILE_cnt(fp) $stdio_cnt
12837 #include <sys/types.h>
12839 FILE *fp = fopen("try.c", "r");
12844 puts("Fail even to read");
12847 c = getc(fp); /* Read away the first # */
12849 puts("Fail even to read");
12853 18 <= FILE_cnt(fp) &&
12854 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
12856 puts("Fail even to read");
12859 ptr = (char*) FILE_ptr(fp);
12860 cnt = (size_t)FILE_cnt(fp);
12862 FILE_ptr(fp) += 42;
12864 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
12865 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
12868 if (FILE_cnt(fp) <= 20) {
12869 printf ("Fail (<20 chars to test)");
12872 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
12873 puts("Fail compare");
12876 if (cnt == FILE_cnt(fp)) {
12877 puts("Pass_unchanged");
12880 if (FILE_cnt(fp) == (cnt - 42)) {
12881 puts("Pass_changed");
12884 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
12890 if eval $compile && $to try.c; then
12891 case `$run ./try` in
12893 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
12894 d_stdio_ptr_lval_sets_cnt="$define" ;;
12896 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
12897 d_stdio_ptr_lval_nochange_cnt="$define" ;;
12899 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
12901 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
12904 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
12910 : see if _base is also standard
12912 case "$d_stdstdio" in
12916 #$i_stdlib I_STDLIB
12918 #include <stdlib.h>
12920 #define FILE_base(fp) $stdio_base
12921 #define FILE_bufsiz(fp) $stdio_bufsiz
12923 FILE *fp = fopen("try.c", "r");
12926 19 <= FILE_bufsiz(fp) &&
12927 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
12934 if eval $compile && $to try.c; then
12935 if $run ./try; then
12936 echo "And its _base field acts std."
12939 echo "But its _base field isn't std."
12942 echo "However, it seems to be lacking the _base field."
12950 : see if fast_stdio exists
12952 case "$d_stdstdio:$d_stdio_ptr_lval" in
12954 case "$d_stdio_cnt_lval$d_stdio_ptr_lval_sets_cnt" in
12956 echo "You seem to have 'fast stdio' to directly manipulate the stdio buffers." >& 4
12967 : see if fchdir exists
12968 set fchdir d_fchdir
12971 : see if fchmod exists
12972 set fchmod d_fchmod
12975 : see if fchown exists
12976 set fchown d_fchown
12979 : see if this is an fcntl system
12983 : See if fcntl-based locking works.
12986 #$i_stdlib I_STDLIB
12988 #include <stdlib.h>
12990 #include <unistd.h>
12992 #include <signal.h>
12993 $signal_t blech(int x) { exit(3); }
12995 #if defined(F_SETLK) && defined(F_SETLKW)
12996 struct flock flock;
12998 fd = open("try.c", O_RDONLY);
12999 flock.l_type = F_RDLCK;
13000 flock.l_whence = SEEK_SET;
13001 flock.l_start = flock.l_len = 0;
13002 signal(SIGALRM, blech);
13004 retval = fcntl(fd, F_SETLK, &flock);
13006 (retval < 0 ? exit(2) : exit(0));
13012 echo "Checking if fcntl-based file locking works... "
13016 if eval $compile_ok; then
13017 if $run ./try; then
13018 echo "Yes, it seems to work."
13021 echo "Nope, it didn't work."
13026 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
13027 *** This is (almost) impossible.
13028 *** If your NFS lock daemons are not feeling well, something like
13029 *** this may happen, please investigate. Cannot continue, aborting.
13037 echo "I'm unable to compile the test program, so I'll assume not."
13042 echo "Nope, since you don't even have fcntl()."
13045 set d_fcntl_can_lock
13049 : check for fd_set items
13052 Checking to see how well your C compiler handles fd_set and friends ...
13055 #$i_stdlib I_STDLIB
13057 #include <stdlib.h>
13059 #$i_systime I_SYS_TIME
13060 #$i_sysselct I_SYS_SELECT
13061 #$d_socket HAS_SOCKET
13062 #include <sys/types.h>
13064 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
13067 #include <sys/time.h>
13069 #ifdef I_SYS_SELECT
13070 #include <sys/select.h>
13079 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
13087 if eval $compile; then
13088 d_fds_bits="$define"
13090 echo "Well, your system knows about the normal fd_set typedef..." >&4
13091 if $run ./try; then
13092 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
13093 d_fd_macros="$define"
13096 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
13098 d_fd_macros="$undef"
13102 Hmm, your compiler has some difficulty with fd_set. Checking further...
13105 if eval $compile; then
13106 d_fds_bits="$undef"
13108 echo "Well, your system has some sort of fd_set available..." >&4
13109 if $run ./try; then
13110 echo "and you have the normal fd_set macros." >&4
13111 d_fd_macros="$define"
13114 but not the normal fd_set macros! Gross! More work for me...
13116 d_fd_macros="$undef"
13119 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
13121 d_fds_bits="$undef"
13122 d_fd_macros="$undef"
13127 : see if fgetpos exists
13128 set fgetpos d_fgetpos
13131 : see if finite exists
13132 set finite d_finite
13135 : see if finitel exists
13136 set finitel d_finitel
13139 : see if flock exists
13143 : see if prototype for flock is available
13145 set d_flockproto flock $i_sysfile sys/file.h
13148 : see if fp_class exists
13149 set fp_class d_fp_class
13152 : see if pathconf exists
13153 set pathconf d_pathconf
13156 : see if fpathconf exists
13157 set fpathconf d_fpathconf
13160 : see if fpclass exists
13161 set fpclass d_fpclass
13164 : see if fpclassify exists
13165 set fpclassify d_fpclassify
13168 : see if fpclassl exists
13169 set fpclassl d_fpclassl
13172 : check for fpos64_t
13174 echo "Checking to see if you have fpos64_t..." >&4
13177 int main() { fpos64_t x = 7; }
13180 if eval $compile; then
13182 echo "You have fpos64_t."
13185 echo "You do not have fpos64_t."
13186 case "$fpossize" in
13187 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
13194 : see if frexpl exists
13195 set frexpl d_frexpl
13198 : see if this is a sys/param system
13199 set sys/param.h i_sysparam
13202 : see if this is a sys/mount.h system
13203 set sys/mount.h i_sysmount
13206 : Check for fs_data_s
13208 echo "Checking to see if your system supports struct fs_data..." >&4
13209 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
13211 case "$d_fs_data_s" in
13212 "$define") echo "Yes, it does." ;;
13213 *) echo "No, it doesn't." ;;
13216 : see if fseeko exists
13217 set fseeko d_fseeko
13219 case "$longsize" in
13220 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
13223 : see if fsetpos exists
13224 set fsetpos d_fsetpos
13227 : see if fstatfs exists
13228 set fstatfs d_fstatfs
13231 : see if statvfs exists
13232 set statvfs d_statvfs
13235 : see if fstatvfs exists
13236 set fstatvfs d_fstatvfs
13240 : see if fsync exists
13244 : see if ftello exists
13245 set ftello d_ftello
13247 case "$longsize" in
13248 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
13251 : check for a working futimes
13254 echo "Checking if you have a working futimes()" >&4
13257 #include <sys/time.h>
13264 fd = open ("try.c", O_RDWR);
13265 if (-1 == fd) exit (1);
13266 rv = futimes (fd, NULL);
13267 exit (rv == -1 ? errno : 0);
13271 if eval $compile; then
13275 0) echo "Yes, you have" >&4
13276 d_futimes="$define"
13278 *) echo "No, you have futimes, but it isn't working ($rc) (probably harmless)" >&4
13282 echo "No, it does not (probably harmless)" >&4
13286 : see if getcwd exists
13287 set getcwd d_getcwd
13290 : see if getespwnam exists
13291 set getespwnam d_getespwnam
13294 : see if getfsstat exists
13295 set getfsstat d_getfsstat
13298 : see if getgrent exists
13299 set getgrent d_getgrent
13302 : see if getgrent_r exists
13303 set getgrent_r d_getgrent_r
13305 case "$d_getgrent_r" in
13307 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
13308 case "$d_getgrent_r_proto:$usethreads" in
13309 ":define") d_getgrent_r_proto=define
13310 set d_getgrent_r_proto getgrent_r $hdrs
13314 case "$d_getgrent_r_proto" in
13316 case "$getgrent_r_proto" in
13317 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
13318 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBWR ;;
13320 case "$getgrent_r_proto" in
13321 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
13322 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBIR ;;
13324 case "$getgrent_r_proto" in
13325 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
13326 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=S_SBW ;;
13328 case "$getgrent_r_proto" in
13329 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
13330 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=S_SBI ;;
13332 case "$getgrent_r_proto" in
13333 ''|0) try='int getgrent_r(struct group*, char*, int);'
13334 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBI ;;
13336 case "$getgrent_r_proto" in
13337 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
13338 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBIH ;;
13340 case "$getgrent_r_proto" in
13341 ''|0) d_getgrent_r=undef
13343 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
13344 * ) case "$getgrent_r_proto" in
13345 REENTRANT_PROTO*) ;;
13346 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
13348 echo "Prototype: $try" ;;
13351 *) case "$usethreads" in
13352 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
13359 *) getgrent_r_proto=0
13363 : see if getgrgid_r exists
13364 set getgrgid_r d_getgrgid_r
13366 case "$d_getgrgid_r" in
13368 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
13369 case "$d_getgrgid_r_proto:$usethreads" in
13370 ":define") d_getgrgid_r_proto=define
13371 set d_getgrgid_r_proto getgrgid_r $hdrs
13375 case "$d_getgrgid_r_proto" in
13377 case "$getgrgid_r_proto" in
13378 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
13379 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
13381 case "$getgrgid_r_proto" in
13382 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
13383 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
13385 case "$getgrgid_r_proto" in
13386 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
13387 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
13389 case "$getgrgid_r_proto" in
13390 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
13391 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
13393 case "$getgrgid_r_proto" in
13394 ''|0) d_getgrgid_r=undef
13396 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
13397 * ) case "$getgrgid_r_proto" in
13398 REENTRANT_PROTO*) ;;
13399 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
13401 echo "Prototype: $try" ;;
13404 *) case "$usethreads" in
13405 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
13412 *) getgrgid_r_proto=0
13416 : see if getgrnam_r exists
13417 set getgrnam_r d_getgrnam_r
13419 case "$d_getgrnam_r" in
13421 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
13422 case "$d_getgrnam_r_proto:$usethreads" in
13423 ":define") d_getgrnam_r_proto=define
13424 set d_getgrnam_r_proto getgrnam_r $hdrs
13428 case "$d_getgrnam_r_proto" in
13430 case "$getgrnam_r_proto" in
13431 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
13432 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
13434 case "$getgrnam_r_proto" in
13435 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
13436 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
13438 case "$getgrnam_r_proto" in
13439 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
13440 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=S_CBI ;;
13442 case "$getgrnam_r_proto" in
13443 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
13444 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
13446 case "$getgrnam_r_proto" in
13447 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
13448 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
13450 case "$getgrnam_r_proto" in
13451 ''|0) d_getgrnam_r=undef
13453 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
13454 * ) case "$getgrnam_r_proto" in
13455 REENTRANT_PROTO*) ;;
13456 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
13458 echo "Prototype: $try" ;;
13461 *) case "$usethreads" in
13462 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
13469 *) getgrnam_r_proto=0
13473 : see if gethostbyaddr exists
13474 set gethostbyaddr d_gethbyaddr
13477 : see if gethostbyname exists
13478 set gethostbyname d_gethbyname
13481 : see if gethostent exists
13482 set gethostent d_gethent
13485 : see how we will look up host name
13488 if set gethostname val -f d_gethname; eval $csym; $val; then
13489 echo 'gethostname() found.' >&4
13490 d_gethname="$define"
13493 if set uname val -f d_uname; eval $csym; $val; then
13496 uname() was found, but you're running xenix, and older versions of xenix
13497 have a broken uname(). If you don't really know whether your xenix is old
13498 enough to have a broken system call, use the default answer.
13503 "$define") dflt=n;;
13505 rp='Is your uname() broken?'
13508 n*) d_uname="$define"; call=uname;;
13511 echo 'uname() found.' >&4
13518 case "$d_gethname" in
13519 '') d_gethname="$undef";;
13522 '') d_uname="$undef";;
13524 case "$d_uname$d_gethname" in
13529 Every now and then someone has a $call() that lies about the hostname
13530 but can't be fixed for political or economic reasons. If you wish, I can
13531 pretend $call() isn't there and maybe compute hostname at run-time
13532 thanks to the '$phostname' command.
13535 rp="Shall I ignore $call() from now on?"
13538 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
13541 case "$phostname" in
13542 '') aphostname='';;
13543 *) case "$aphostname" in
13545 *) set X $phostname
13549 file=`./loc $file $file $pth`
13550 aphostname=`echo $file $*`
13555 case "$d_uname$d_gethname" in
13558 case "$phostname" in
13560 echo "There will be no way for $package to get your hostname." >&4;;
13562 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
13566 case "$d_phostname" in
13567 '') d_phostname="$undef";;
13570 : see if gethostbyaddr_r exists
13571 set gethostbyaddr_r d_gethostbyaddr_r
13573 case "$d_gethostbyaddr_r" in
13575 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13576 case "$d_gethostbyaddr_r_proto:$usethreads" in
13577 ":define") d_gethostbyaddr_r_proto=define
13578 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
13582 case "$d_gethostbyaddr_r_proto" in
13584 case "$gethostbyaddr_r_proto" in
13585 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
13586 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
13588 case "$gethostbyaddr_r_proto" in
13589 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
13590 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
13592 case "$gethostbyaddr_r_proto" in
13593 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
13594 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
13596 case "$gethostbyaddr_r_proto" in
13597 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
13598 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
13600 case "$gethostbyaddr_r_proto" in
13601 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
13602 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
13604 case "$gethostbyaddr_r_proto" in
13605 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
13606 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
13608 case "$gethostbyaddr_r_proto" in
13609 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
13610 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
13612 case "$gethostbyaddr_r_proto" in
13613 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
13614 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
13616 case "$gethostbyaddr_r_proto" in
13617 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
13618 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
13620 case "$gethostbyaddr_r_proto" in
13621 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
13622 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
13624 case "$gethostbyaddr_r_proto" in
13625 ''|0) try='int gethostbyaddr_r(const void*, socklen_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
13626 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_TsISBWRE ;;
13628 case "$gethostbyaddr_r_proto" in
13629 ''|0) d_gethostbyaddr_r=undef
13630 gethostbyaddr_r_proto=0
13631 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
13632 * ) case "$gethostbyaddr_r_proto" in
13633 REENTRANT_PROTO*) ;;
13634 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
13636 echo "Prototype: $try" ;;
13639 *) case "$usethreads" in
13640 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
13642 d_gethostbyaddr_r=undef
13643 gethostbyaddr_r_proto=0
13647 *) gethostbyaddr_r_proto=0
13651 : see if gethostbyname_r exists
13652 set gethostbyname_r d_gethostbyname_r
13654 case "$d_gethostbyname_r" in
13656 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13657 case "$d_gethostbyname_r_proto:$usethreads" in
13658 ":define") d_gethostbyname_r_proto=define
13659 set d_gethostbyname_r_proto gethostbyname_r $hdrs
13663 case "$d_gethostbyname_r_proto" in
13665 case "$gethostbyname_r_proto" in
13666 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
13667 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
13669 case "$gethostbyname_r_proto" in
13670 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
13671 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
13673 case "$gethostbyname_r_proto" in
13674 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
13675 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
13677 case "$gethostbyname_r_proto" in
13678 ''|0) d_gethostbyname_r=undef
13679 gethostbyname_r_proto=0
13680 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
13681 * ) case "$gethostbyname_r_proto" in
13682 REENTRANT_PROTO*) ;;
13683 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
13685 echo "Prototype: $try" ;;
13688 *) case "$usethreads" in
13689 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
13691 d_gethostbyname_r=undef
13692 gethostbyname_r_proto=0
13696 *) gethostbyname_r_proto=0
13700 : see if gethostent_r exists
13701 set gethostent_r d_gethostent_r
13703 case "$d_gethostent_r" in
13705 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13706 case "$d_gethostent_r_proto:$usethreads" in
13707 ":define") d_gethostent_r_proto=define
13708 set d_gethostent_r_proto gethostent_r $hdrs
13712 case "$d_gethostent_r_proto" in
13714 case "$gethostent_r_proto" in
13715 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
13716 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
13718 case "$gethostent_r_proto" in
13719 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
13720 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBIE ;;
13722 case "$gethostent_r_proto" in
13723 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
13724 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=S_SBIE ;;
13726 case "$gethostent_r_proto" in
13727 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
13728 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=S_SBI ;;
13730 case "$gethostent_r_proto" in
13731 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
13732 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBI ;;
13734 case "$gethostent_r_proto" in
13735 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
13736 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SD ;;
13738 case "$gethostent_r_proto" in
13739 ''|0) d_gethostent_r=undef
13740 gethostent_r_proto=0
13741 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
13742 * ) case "$gethostent_r_proto" in
13743 REENTRANT_PROTO*) ;;
13744 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
13746 echo "Prototype: $try" ;;
13749 *) case "$usethreads" in
13750 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
13752 d_gethostent_r=undef
13753 gethostent_r_proto=0
13757 *) gethostent_r_proto=0
13761 : see if prototypes for various gethostxxx netdb.h functions are available
13763 set d_gethostprotos gethostent $i_netdb netdb.h
13766 : see if getitimer exists
13767 set getitimer d_getitimer
13770 : see if getlogin exists
13771 set getlogin d_getlogin
13774 : see if getlogin_r exists
13775 set getlogin_r d_getlogin_r
13777 case "$d_getlogin_r" in
13779 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
13780 case "$d_getlogin_r_proto:$usethreads" in
13781 ":define") d_getlogin_r_proto=define
13782 set d_getlogin_r_proto getlogin_r $hdrs
13786 case "$d_getlogin_r_proto" in
13788 case "$getlogin_r_proto" in
13789 ''|0) try='int getlogin_r(char*, size_t);'
13790 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=I_BW ;;
13792 case "$getlogin_r_proto" in
13793 ''|0) try='int getlogin_r(char*, int);'
13794 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=I_BI ;;
13796 case "$getlogin_r_proto" in
13797 ''|0) try='char* getlogin_r(char*, size_t);'
13798 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=B_BW ;;
13800 case "$getlogin_r_proto" in
13801 ''|0) try='char* getlogin_r(char*, int);'
13802 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=B_BI ;;
13804 case "$getlogin_r_proto" in
13805 ''|0) d_getlogin_r=undef
13807 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
13808 * ) case "$getlogin_r_proto" in
13809 REENTRANT_PROTO*) ;;
13810 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
13812 echo "Prototype: $try" ;;
13815 *) case "$usethreads" in
13816 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
13823 *) getlogin_r_proto=0
13827 : see if getmnt exists
13828 set getmnt d_getmnt
13831 : see if getmntent exists
13832 set getmntent d_getmntent
13835 : see if getnetbyaddr exists
13836 set getnetbyaddr d_getnbyaddr
13839 : see if getnetbyname exists
13840 set getnetbyname d_getnbyname
13843 : see if getnetent exists
13844 set getnetent d_getnent
13847 : see if getnetbyaddr_r exists
13848 set getnetbyaddr_r d_getnetbyaddr_r
13850 case "$d_getnetbyaddr_r" in
13852 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13853 case "$d_getnetbyaddr_r_proto:$usethreads" in
13854 ":define") d_getnetbyaddr_r_proto=define
13855 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
13859 case "$d_getnetbyaddr_r_proto" in
13861 case "$getnetbyaddr_r_proto" in
13862 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
13863 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
13865 case "$getnetbyaddr_r_proto" in
13866 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
13867 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
13869 case "$getnetbyaddr_r_proto" in
13870 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
13871 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
13873 case "$getnetbyaddr_r_proto" in
13874 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
13875 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
13877 case "$getnetbyaddr_r_proto" in
13878 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
13879 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
13881 case "$getnetbyaddr_r_proto" in
13882 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
13883 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
13885 case "$getnetbyaddr_r_proto" in
13886 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
13887 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
13889 case "$getnetbyaddr_r_proto" in
13890 ''|0) try='int getnetbyaddr_r(uint32_t, int, struct netent*, char*, size_t, struct netent**, int*);'
13891 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_uISBWRE ;;
13893 case "$getnetbyaddr_r_proto" in
13894 ''|0) d_getnetbyaddr_r=undef
13895 getnetbyaddr_r_proto=0
13896 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
13897 * ) case "$getnetbyaddr_r_proto" in
13898 REENTRANT_PROTO*) ;;
13899 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
13901 echo "Prototype: $try" ;;
13904 *) case "$usethreads" in
13905 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
13907 d_getnetbyaddr_r=undef
13908 getnetbyaddr_r_proto=0
13912 *) getnetbyaddr_r_proto=0
13916 : see if getnetbyname_r exists
13917 set getnetbyname_r d_getnetbyname_r
13919 case "$d_getnetbyname_r" in
13921 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13922 case "$d_getnetbyname_r_proto:$usethreads" in
13923 ":define") d_getnetbyname_r_proto=define
13924 set d_getnetbyname_r_proto getnetbyname_r $hdrs
13928 case "$d_getnetbyname_r_proto" in
13930 case "$getnetbyname_r_proto" in
13931 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
13932 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
13934 case "$getnetbyname_r_proto" in
13935 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
13936 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
13938 case "$getnetbyname_r_proto" in
13939 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
13940 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
13942 case "$getnetbyname_r_proto" in
13943 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
13944 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
13946 case "$getnetbyname_r_proto" in
13947 ''|0) d_getnetbyname_r=undef
13948 getnetbyname_r_proto=0
13949 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
13950 * ) case "$getnetbyname_r_proto" in
13951 REENTRANT_PROTO*) ;;
13952 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
13954 echo "Prototype: $try" ;;
13957 *) case "$usethreads" in
13958 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
13960 d_getnetbyname_r=undef
13961 getnetbyname_r_proto=0
13965 *) getnetbyname_r_proto=0
13969 : see if getnetent_r exists
13970 set getnetent_r d_getnetent_r
13972 case "$d_getnetent_r" in
13974 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13975 case "$d_getnetent_r_proto:$usethreads" in
13976 ":define") d_getnetent_r_proto=define
13977 set d_getnetent_r_proto getnetent_r $hdrs
13981 case "$d_getnetent_r_proto" in
13983 case "$getnetent_r_proto" in
13984 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
13985 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
13987 case "$getnetent_r_proto" in
13988 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
13989 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBIE ;;
13991 case "$getnetent_r_proto" in
13992 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
13993 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=S_SBIE ;;
13995 case "$getnetent_r_proto" in
13996 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
13997 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=S_SBI ;;
13999 case "$getnetent_r_proto" in
14000 ''|0) try='int getnetent_r(struct netent*, char*, int);'
14001 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBI ;;
14003 case "$getnetent_r_proto" in
14004 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
14005 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SD ;;
14007 case "$getnetent_r_proto" in
14008 ''|0) d_getnetent_r=undef
14009 getnetent_r_proto=0
14010 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
14011 * ) case "$getnetent_r_proto" in
14012 REENTRANT_PROTO*) ;;
14013 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
14015 echo "Prototype: $try" ;;
14018 *) case "$usethreads" in
14019 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
14021 d_getnetent_r=undef
14022 getnetent_r_proto=0
14026 *) getnetent_r_proto=0
14030 : see if prototypes for various getnetxxx netdb.h functions are available
14032 set d_getnetprotos getnetent $i_netdb netdb.h
14035 : see if getpagesize exists
14036 set getpagesize d_getpagsz
14039 : Optional checks for getprotobyname and getprotobynumber
14041 : see if getprotobyname exists
14042 set getprotobyname d_getpbyname
14045 : see if getprotobynumber exists
14046 set getprotobynumber d_getpbynumber
14049 : see if getprotoent exists
14050 set getprotoent d_getpent
14053 : see if getpgid exists
14054 set getpgid d_getpgid
14057 : see if getpgrp2 exists
14058 set getpgrp2 d_getpgrp2
14061 : see if getppid exists
14062 set getppid d_getppid
14065 : see if getpriority exists
14066 set getpriority d_getprior
14069 : see if getprotobyname_r exists
14070 set getprotobyname_r d_getprotobyname_r
14072 case "$d_getprotobyname_r" in
14074 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14075 case "$d_getprotobyname_r_proto:$usethreads" in
14076 ":define") d_getprotobyname_r_proto=define
14077 set d_getprotobyname_r_proto getprotobyname_r $hdrs
14081 case "$d_getprotobyname_r_proto" in
14083 case "$getprotobyname_r_proto" in
14084 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
14085 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
14087 case "$getprotobyname_r_proto" in
14088 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
14089 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
14091 case "$getprotobyname_r_proto" in
14092 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
14093 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
14095 case "$getprotobyname_r_proto" in
14096 ''|0) d_getprotobyname_r=undef
14097 getprotobyname_r_proto=0
14098 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
14099 * ) case "$getprotobyname_r_proto" in
14100 REENTRANT_PROTO*) ;;
14101 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
14103 echo "Prototype: $try" ;;
14106 *) case "$usethreads" in
14107 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
14109 d_getprotobyname_r=undef
14110 getprotobyname_r_proto=0
14114 *) getprotobyname_r_proto=0
14118 : see if getprotobynumber_r exists
14119 set getprotobynumber_r d_getprotobynumber_r
14121 case "$d_getprotobynumber_r" in
14123 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14124 case "$d_getprotobynumber_r_proto:$usethreads" in
14125 ":define") d_getprotobynumber_r_proto=define
14126 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
14130 case "$d_getprotobynumber_r_proto" in
14132 case "$getprotobynumber_r_proto" in
14133 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
14134 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
14136 case "$getprotobynumber_r_proto" in
14137 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
14138 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
14140 case "$getprotobynumber_r_proto" in
14141 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
14142 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
14144 case "$getprotobynumber_r_proto" in
14145 ''|0) d_getprotobynumber_r=undef
14146 getprotobynumber_r_proto=0
14147 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
14148 * ) case "$getprotobynumber_r_proto" in
14149 REENTRANT_PROTO*) ;;
14150 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
14152 echo "Prototype: $try" ;;
14155 *) case "$usethreads" in
14156 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
14158 d_getprotobynumber_r=undef
14159 getprotobynumber_r_proto=0
14163 *) getprotobynumber_r_proto=0
14167 : see if getprotoent_r exists
14168 set getprotoent_r d_getprotoent_r
14170 case "$d_getprotoent_r" in
14172 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14173 case "$d_getprotoent_r_proto:$usethreads" in
14174 ":define") d_getprotoent_r_proto=define
14175 set d_getprotoent_r_proto getprotoent_r $hdrs
14179 case "$d_getprotoent_r_proto" in
14181 case "$getprotoent_r_proto" in
14182 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
14183 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
14185 case "$getprotoent_r_proto" in
14186 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
14187 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SBI ;;
14189 case "$getprotoent_r_proto" in
14190 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
14191 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=S_SBI ;;
14193 case "$getprotoent_r_proto" in
14194 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
14195 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SD ;;
14197 case "$getprotoent_r_proto" in
14198 ''|0) d_getprotoent_r=undef
14199 getprotoent_r_proto=0
14200 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
14201 * ) case "$getprotoent_r_proto" in
14202 REENTRANT_PROTO*) ;;
14203 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
14205 echo "Prototype: $try" ;;
14208 *) case "$usethreads" in
14209 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
14211 d_getprotoent_r=undef
14212 getprotoent_r_proto=0
14216 *) getprotoent_r_proto=0
14220 : see if prototypes for various getprotoxxx netdb.h functions are available
14222 set d_getprotoprotos getprotoent $i_netdb netdb.h
14225 : see if getprpwnam exists
14226 set getprpwnam d_getprpwnam
14229 : see if getpwent exists
14230 set getpwent d_getpwent
14233 : see if getpwent_r exists
14234 set getpwent_r d_getpwent_r
14236 case "$d_getpwent_r" in
14238 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14239 case "$d_getpwent_r_proto:$usethreads" in
14240 ":define") d_getpwent_r_proto=define
14241 set d_getpwent_r_proto getpwent_r $hdrs
14245 case "$d_getpwent_r_proto" in
14247 case "$getpwent_r_proto" in
14248 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
14249 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBWR ;;
14251 case "$getpwent_r_proto" in
14252 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
14253 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBIR ;;
14255 case "$getpwent_r_proto" in
14256 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
14257 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=S_SBW ;;
14259 case "$getpwent_r_proto" in
14260 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
14261 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=S_SBI ;;
14263 case "$getpwent_r_proto" in
14264 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
14265 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBI ;;
14267 case "$getpwent_r_proto" in
14268 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
14269 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBIH ;;
14271 case "$getpwent_r_proto" in
14272 ''|0) d_getpwent_r=undef
14274 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
14275 * ) case "$getpwent_r_proto" in
14276 REENTRANT_PROTO*) ;;
14277 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
14279 echo "Prototype: $try" ;;
14282 *) case "$usethreads" in
14283 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
14290 *) getpwent_r_proto=0
14294 : see if getpwnam_r exists
14295 set getpwnam_r d_getpwnam_r
14297 case "$d_getpwnam_r" in
14299 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14300 case "$d_getpwnam_r_proto:$usethreads" in
14301 ":define") d_getpwnam_r_proto=define
14302 set d_getpwnam_r_proto getpwnam_r $hdrs
14306 case "$d_getpwnam_r_proto" in
14308 case "$getpwnam_r_proto" in
14309 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
14310 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
14312 case "$getpwnam_r_proto" in
14313 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
14314 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
14316 case "$getpwnam_r_proto" in
14317 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
14318 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
14320 case "$getpwnam_r_proto" in
14321 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
14322 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
14324 case "$getpwnam_r_proto" in
14325 ''|0) d_getpwnam_r=undef
14327 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
14328 * ) case "$getpwnam_r_proto" in
14329 REENTRANT_PROTO*) ;;
14330 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
14332 echo "Prototype: $try" ;;
14335 *) case "$usethreads" in
14336 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
14343 *) getpwnam_r_proto=0
14347 : see if getpwuid_r exists
14348 set getpwuid_r d_getpwuid_r
14350 case "$d_getpwuid_r" in
14352 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14353 case "$d_getpwuid_r_proto:$usethreads" in
14354 ":define") d_getpwuid_r_proto=define
14355 set d_getpwuid_r_proto getpwuid_r $hdrs
14359 case "$d_getpwuid_r_proto" in
14361 case "$getpwuid_r_proto" in
14362 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
14363 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
14365 case "$getpwuid_r_proto" in
14366 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
14367 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
14369 case "$getpwuid_r_proto" in
14370 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
14371 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
14373 case "$getpwuid_r_proto" in
14374 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
14375 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
14377 case "$getpwuid_r_proto" in
14378 ''|0) d_getpwuid_r=undef
14380 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
14381 * ) case "$getpwuid_r_proto" in
14382 REENTRANT_PROTO*) ;;
14383 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
14385 echo "Prototype: $try" ;;
14388 *) case "$usethreads" in
14389 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
14396 *) getpwuid_r_proto=0
14400 : Optional checks for getsbyname and getsbyport
14402 : see if getservbyname exists
14403 set getservbyname d_getsbyname
14406 : see if getservbyport exists
14407 set getservbyport d_getsbyport
14410 : see if getservent exists
14411 set getservent d_getsent
14414 : see if getservbyname_r exists
14415 set getservbyname_r d_getservbyname_r
14417 case "$d_getservbyname_r" in
14419 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14420 case "$d_getservbyname_r_proto:$usethreads" in
14421 ":define") d_getservbyname_r_proto=define
14422 set d_getservbyname_r_proto getservbyname_r $hdrs
14426 case "$d_getservbyname_r_proto" in
14428 case "$getservbyname_r_proto" in
14429 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
14430 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
14432 case "$getservbyname_r_proto" in
14433 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
14434 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
14436 case "$getservbyname_r_proto" in
14437 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
14438 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
14440 case "$getservbyname_r_proto" in
14441 ''|0) d_getservbyname_r=undef
14442 getservbyname_r_proto=0
14443 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
14444 * ) case "$getservbyname_r_proto" in
14445 REENTRANT_PROTO*) ;;
14446 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
14448 echo "Prototype: $try" ;;
14451 *) case "$usethreads" in
14452 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
14454 d_getservbyname_r=undef
14455 getservbyname_r_proto=0
14459 *) getservbyname_r_proto=0
14463 : see if getservbyport_r exists
14464 set getservbyport_r d_getservbyport_r
14466 case "$d_getservbyport_r" in
14468 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14469 case "$d_getservbyport_r_proto:$usethreads" in
14470 ":define") d_getservbyport_r_proto=define
14471 set d_getservbyport_r_proto getservbyport_r $hdrs
14475 case "$d_getservbyport_r_proto" in
14477 case "$getservbyport_r_proto" in
14478 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
14479 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
14481 case "$getservbyport_r_proto" in
14482 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
14483 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
14485 case "$getservbyport_r_proto" in
14486 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
14487 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
14489 case "$getservbyport_r_proto" in
14490 ''|0) d_getservbyport_r=undef
14491 getservbyport_r_proto=0
14492 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
14493 * ) case "$getservbyport_r_proto" in
14494 REENTRANT_PROTO*) ;;
14495 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
14497 echo "Prototype: $try" ;;
14500 *) case "$usethreads" in
14501 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
14503 d_getservbyport_r=undef
14504 getservbyport_r_proto=0
14508 *) getservbyport_r_proto=0
14512 : see if getservent_r exists
14513 set getservent_r d_getservent_r
14515 case "$d_getservent_r" in
14517 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14518 case "$d_getservent_r_proto:$usethreads" in
14519 ":define") d_getservent_r_proto=define
14520 set d_getservent_r_proto getservent_r $hdrs
14524 case "$d_getservent_r_proto" in
14526 case "$getservent_r_proto" in
14527 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
14528 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SBWR ;;
14530 case "$getservent_r_proto" in
14531 ''|0) try='int getservent_r(struct servent*, char*, int);'
14532 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SBI ;;
14534 case "$getservent_r_proto" in
14535 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
14536 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=S_SBI ;;
14538 case "$getservent_r_proto" in
14539 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
14540 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SD ;;
14542 case "$getservent_r_proto" in
14543 ''|0) d_getservent_r=undef
14544 getservent_r_proto=0
14545 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
14546 * ) case "$getservent_r_proto" in
14547 REENTRANT_PROTO*) ;;
14548 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
14550 echo "Prototype: $try" ;;
14553 *) case "$usethreads" in
14554 define) echo "getservent_r has no prototype, not using it." >&4 ;;
14556 d_getservent_r=undef
14557 getservent_r_proto=0
14561 *) getservent_r_proto=0
14565 : see if prototypes for various getservxxx netdb.h functions are available
14567 set d_getservprotos getservent $i_netdb netdb.h
14570 : see if getspnam exists
14571 set getspnam d_getspnam
14574 : see if this is a shadow.h system
14575 set shadow.h i_shadow
14578 : see if getspnam_r exists
14579 set getspnam_r d_getspnam_r
14581 case "$d_getspnam_r" in
14583 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
14584 case "$d_getspnam_r_proto:$usethreads" in
14585 ":define") d_getspnam_r_proto=define
14586 set d_getspnam_r_proto getspnam_r $hdrs
14590 case "$d_getspnam_r_proto" in
14592 case "$getspnam_r_proto" in
14593 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
14594 ./protochk "$extern_C $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
14596 case "$getspnam_r_proto" in
14597 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
14598 ./protochk "$extern_C $try" $hdrs && getspnam_r_proto=S_CSBI ;;
14600 case "$getspnam_r_proto" in
14601 ''|0) d_getspnam_r=undef
14603 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
14604 * ) case "$getspnam_r_proto" in
14605 REENTRANT_PROTO*) ;;
14606 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
14608 echo "Prototype: $try" ;;
14611 *) case "$usethreads" in
14612 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
14619 *) getspnam_r_proto=0
14623 : see if gettimeofday or ftime exists
14624 set gettimeofday d_gettimeod
14626 case "$d_gettimeod" in
14632 val="$undef"; set d_ftime; eval $setvar
14635 case "$d_gettimeod$d_ftime" in
14638 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
14642 : see if gmtime_r exists
14643 set gmtime_r d_gmtime_r
14645 case "$d_gmtime_r" in
14647 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
14648 case "$d_gmtime_r_proto:$usethreads" in
14649 ":define") d_gmtime_r_proto=define
14650 set d_gmtime_r_proto gmtime_r $hdrs
14654 case "$d_gmtime_r_proto" in
14656 case "$gmtime_r_proto" in
14657 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
14658 ./protochk "$extern_C $try" $hdrs && gmtime_r_proto=S_TS ;;
14660 case "$gmtime_r_proto" in
14661 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
14662 ./protochk "$extern_C $try" $hdrs && gmtime_r_proto=I_TS ;;
14664 case "$gmtime_r_proto" in
14665 ''|0) d_gmtime_r=undef
14667 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
14668 * ) case "$gmtime_r_proto" in
14669 REENTRANT_PROTO*) ;;
14670 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
14672 echo "Prototype: $try" ;;
14675 *) case "$usethreads" in
14676 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
14683 *) gmtime_r_proto=0
14687 : see if hasmntopt exists
14688 set hasmntopt d_hasmntopt
14691 : see if this is a netinet/in.h or sys/in.h system
14692 set netinet/in.h i_niin sys/in.h i_sysin
14695 : see if arpa/inet.h has to be included
14696 set arpa/inet.h i_arpainet
14699 : see if htonl --and friends-- exists
14704 : Maybe they are macros.
14707 $cat >htonl.c <<EOM
14709 #include <sys/types.h>
14710 #$i_niin I_NETINET_IN
14712 #$i_arpainet I_ARPA_INET
14713 #ifdef I_NETINET_IN
14714 #include <netinet/in.h>
14717 #include <sys/in.h>
14720 #include <arpa/inet.h>
14723 printf("Defined as a macro.");
14726 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
14727 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
14729 echo "But it seems to be defined as a macro." >&4
14737 : see if ilogbl exists
14738 set ilogbl d_ilogbl
14743 if set index val -f; eval $csym; $val; then
14744 if set strchr val -f d_strchr; eval $csym; $val; then
14745 if $contains strchr "$strings" >/dev/null 2>&1 ; then
14748 echo "strchr() found." >&4
14752 echo "index() found." >&4
14757 echo "index() found." >&4
14760 if set strchr val -f d_strchr; eval $csym; $val; then
14763 echo "strchr() found." >&4
14765 echo "No index() or strchr() found!" >&4
14770 set d_strchr; eval $setvar
14772 set d_index; eval $setvar
14774 : check whether inet_aton exists
14775 set inet_aton d_inetaton
14780 $cat >isascii.c <<EOCP
14783 #$i_stdlib I_STDLIB
14785 #include <stdlib.h>
14796 if eval $compile; then
14797 echo "isascii() found." >&4
14800 echo "isascii() NOT found." >&4
14807 : see if isfinite exists
14808 set isfinite d_isfinite
14811 : see if isinf exists
14815 : see if isnan exists
14819 : see if isnanl exists
14820 set isnanl d_isnanl
14823 : see if killpg exists
14824 set killpg d_killpg
14827 : see if lchown exists
14829 $cat > try.c <<'EOCP'
14830 /* System header to define __stub macros and hopefully few prototypes,
14831 which can conflict with char lchown(); below. */
14832 #include <assert.h>
14833 /* Override any gcc2 internal prototype to avoid an error. */
14834 /* We use char because int might match the return type of a gcc2
14835 builtin and then its argument prototype would still apply. */
14838 /* The GNU C library defines this for functions which it implements
14839 to always fail with ENOSYS. Some functions are actually named
14840 something starting with __ and the normal name is an alias. */
14841 #if defined (__stub_lchown) || defined (__stub___lchown)
14849 if eval $compile; then
14850 $echo "lchown() found." >&4
14853 $echo "lchown() NOT found." >&4
14859 : See if number of significant digits in a double precision number is known
14861 $cat >ldbl_dig.c <<EOM
14862 #$i_limits I_LIMITS
14865 #include <limits.h>
14871 printf("Contains LDBL_DIG");
14874 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
14875 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
14876 echo "LDBL_DIG found." >&4
14879 echo "LDBL_DIG NOT found." >&4
14886 : see if this is a math.h system
14890 : check to see if math.h defines _LIB_VERSION
14891 d_libm_lib_version="$undef"
14895 echo "Checking to see if your libm supports _LIB_VERSION..." >&4
14897 #include <unistd.h>
14899 int main (int argc, char *argv[])
14901 printf ("%d\n", _LIB_VERSION);
14906 if eval $compile; then
14908 echo "Yes, it does ($foo)" >&4
14909 d_libm_lib_version="$define"
14911 echo "No, it does not (probably harmless)" >&4
14918 : see if link exists
14922 : see if localtime_r exists
14923 set localtime_r d_localtime_r
14925 case "$d_localtime_r" in
14927 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
14928 case "$d_localtime_r_proto:$usethreads" in
14929 ":define") d_localtime_r_proto=define
14930 set d_localtime_r_proto localtime_r $hdrs
14934 case "$d_localtime_r_proto" in
14936 case "$localtime_r_proto" in
14937 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
14938 ./protochk "$extern_C $try" $hdrs && localtime_r_proto=S_TS ;;
14940 case "$localtime_r_proto" in
14941 ''|0) try='int localtime_r(const time_t*, struct tm*);'
14942 ./protochk "$extern_C $try" $hdrs && localtime_r_proto=I_TS ;;
14944 case "$localtime_r_proto" in
14945 ''|0) d_localtime_r=undef
14946 localtime_r_proto=0
14947 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
14948 * ) case "$localtime_r_proto" in
14949 REENTRANT_PROTO*) ;;
14950 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
14952 echo "Prototype: $try" ;;
14955 *) case "$usethreads" in
14956 define) echo "localtime_r has no prototype, not using it." >&4 ;;
14958 d_localtime_r=undef
14959 localtime_r_proto=0
14963 *) localtime_r_proto=0
14967 : see if localtime_r calls tzset
14968 case "$localtime_r_proto" in
14971 /* Does our libc's localtime_r call tzset ?
14972 * return 0 if so, 1 otherwise.
14974 #$i_systypes I_SYS_TYPES
14975 #$i_unistd I_UNISTD
14977 #$i_stdlib I_STDLIB
14978 #$i_string I_STRING
14979 #$i_malloc I_MALLOC
14981 # include <sys/types.h>
14984 # include <unistd.h>
14990 #include <stdlib.h>
14993 # include <string.h>
14995 # include <strings.h>
14998 # include <malloc.h>
15002 time_t t = time(0L);
15003 char w_tz[]="TZ" "=GMT+5",
15004 e_tz[]="TZ" "=GMT-5",
15005 *tz_e = (char*)malloc(16),
15006 *tz_w = (char*)malloc(16);
15007 struct tm tm_e, tm_w;
15008 memset(&tm_e,'\0',sizeof(struct tm));
15009 memset(&tm_w,'\0',sizeof(struct tm));
15014 localtime_r(&t, &tm_e);
15017 localtime_r(&t, &tm_w);
15019 if( memcmp(&tm_e, &tm_w, sizeof(struct tm)) == 0 )
15025 if eval $compile; then
15026 if $run ./try; then
15027 d_localtime_r_needs_tzset=undef;
15029 d_localtime_r_needs_tzset=define;
15032 d_localtime_r_needs_tzset=undef;
15036 d_localtime_r_needs_tzset=undef;
15041 : see if localeconv exists
15042 set localeconv d_locconv
15045 : see if lockf exists
15049 : see if prototype for lseek is available
15051 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
15054 : see if lstat exists
15058 : see if madvise exists
15059 set madvise d_madvise
15062 : see if malloc_size exists
15063 set malloc_size d_malloc_size
15066 : see if malloc_size_good exists
15067 set malloc_good_size d_malloc_good_size
15070 : see if mblen exists
15074 : see if mbstowcs exists
15075 set mbstowcs d_mbstowcs
15078 : see if mbtowc exists
15079 set mbtowc d_mbtowc
15082 : see if memchr exists
15083 set memchr d_memchr
15086 : see if memcmp exists
15087 set memcmp d_memcmp
15090 : see if memcpy exists
15091 set memcpy d_memcpy
15094 : see if memmove exists
15095 set memmove d_memmove
15098 : see if memset exists
15099 set memset d_memset
15102 : see if mkdir exists
15106 : see if mkdtemp exists
15107 set mkdtemp d_mkdtemp
15110 : see if mkfifo exists
15111 set mkfifo d_mkfifo
15114 : see if mkstemp exists
15115 set mkstemp d_mkstemp
15118 : see if mkstemps exists
15119 set mkstemps d_mkstemps
15122 : see if mktime exists
15123 set mktime d_mktime
15126 : see if this is a sys/mman.h system
15127 set sys/mman.h i_sysmman
15130 : see if mmap exists
15133 : see what shmat returns
15134 : default to something harmless
15136 case "$i_sysmman$d_mmap" in
15138 $cat >mmap.c <<'END'
15139 #include <sys/mman.h>
15142 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
15147 echo "and it returns ($mmaptype)." >&4
15153 : see if sqrtl exists
15157 : see if scalbnl exists
15158 set scalbnl d_scalbnl
15161 : see if modfl exists
15165 : see if prototype for modfl is available
15167 set d_modflproto modfl $i_math math.h
15170 d_modfl_pow32_bug="$undef"
15172 case "$d_longdbl$d_modfl" in
15175 Checking to see whether your modfl() is okay for large values...
15181 if $test "X$d_modflproto" != "X$define"; then
15182 $cat >>try.c <<EOCP
15183 /* Sigh. many current glibcs provide the function, but do not prototype it. */
15184 long double modfl (long double, long double *);
15187 $cat >>try.c <<EOCP
15189 long double nv = 4294967303.15;
15195 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
15199 case "$osname:$gccversion" in
15200 aix:) saveccflags="$ccflags"
15201 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
15204 if eval $compile; then
15207 *" 4294967303.150000 1.150000 4294967302.000000")
15208 echo >&4 "Your modfl() is broken for large values."
15209 d_modfl_pow32_bug="$define"
15211 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
15215 *" 4294967303.150000 0.150000 4294967303.000000")
15216 echo >&4 "Your modfl() seems okay for large values."
15218 *) echo >&4 "I don't understand your modfl() at all."
15224 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
15227 case "$osname:$gccversion" in
15228 aix:) ccflags="$saveccflags" ;; # restore
15233 if $test "$uselongdouble" = "$define"; then
15235 if $test "$d_sqrtl" != "$define"; then
15236 message="$message sqrtl"
15238 if $test "$d_modfl" != "$define"; then
15239 if $test "$d_aintl:$d_copysignl" = "$define:$define"; then
15240 echo "You have both aintl and copysignl, so I can emulate modfl."
15242 message="$message modfl"
15245 if $test "$d_frexpl" != "$define"; then
15246 if $test "$d_ilogbl:$d_scalbnl" = "$define:$define"; then
15247 echo "You have both ilogbl and scalbnl, so I can emulate frexpl."
15249 message="$message frexpl"
15253 if $test "$message" != ""; then
15256 *** You requested the use of long doubles but you do not seem to have
15257 *** the following mathematical functions needed for long double support:
15259 *** Please rerun Configure without -Duselongdouble and/or -Dusemorebits.
15260 *** Cannot continue, aborting.
15268 : see if mprotect exists
15269 set mprotect d_mprotect
15272 : see if msgctl exists
15273 set msgctl d_msgctl
15276 : see if msgget exists
15277 set msgget d_msgget
15280 : see if msgsnd exists
15281 set msgsnd d_msgsnd
15284 : see if msgrcv exists
15285 set msgrcv d_msgrcv
15288 : see how much of the 'msg*(2)' library is present.
15291 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
15292 *"$undef"*) h_msg=false;;
15296 case "`ipcs 2>&1`" in
15297 "SVID messages"*"not configured"*)
15298 echo "Your $osname does not have the msg*(2) configured." >&4
15301 set msgctl d_msgctl
15303 set msgget d_msgget
15305 set msgsnd d_msgsnd
15307 set msgrcv d_msgrcv
15313 : we could also check for sys/ipc.h ...
15314 if $h_msg && $test `./findhdr sys/msg.h`; then
15315 echo "You have the full msg*(2) library." >&4
15318 echo "You don't have the full msg*(2) library." >&4
15324 : Check for msghdr_s
15326 echo "Checking to see if your system supports struct msghdr..." >&4
15327 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
15329 case "$d_msghdr_s" in
15330 "$define") echo "Yes, it does." ;;
15331 *) echo "No, it doesn't." ;;
15335 : see if msync exists
15339 : see if munmap exists
15340 set munmap d_munmap
15343 : see if nice exists
15347 : see if this is a langinfo.h system
15348 set langinfo.h i_langinfo
15351 : see if nl_langinfo exists
15352 set nl_langinfo d_nl_langinfo
15355 : check for volatile keyword
15357 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
15358 $cat >try.c <<'EOCP'
15361 typedef struct _goo_struct goo_struct;
15362 goo_struct * volatile goo = ((goo_struct *)0);
15363 struct _goo_struct {
15368 typedef unsigned short foo_t;
15369 char *volatile foo;
15371 volatile foo_t blech;
15375 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
15377 echo "Yup, it does."
15380 echo "Nope, it doesn't."
15386 : Check basic sizes
15388 $echo "Choosing the C types to be used for Perl's internal types..." >&4
15390 case "$use64bitint:$d_quad:$quadtype" in
15393 uvtype="$uquadtype"
15398 uvtype="unsigned long"
15404 case "$uselongdouble:$d_longdbl" in
15406 nvtype="long double"
15407 nvsize=$longdblsize
15414 $echo "(IV will be "$ivtype", $ivsize bytes)"
15415 $echo "(UV will be "$uvtype", $uvsize bytes)"
15416 $echo "(NV will be "$nvtype", $nvsize bytes)"
15419 #$i_inttypes I_INTTYPES
15421 #include <inttypes.h>
15426 int8_t i = INT8_MAX;
15427 uint8_t u = UINT8_MAX;
15428 printf("int8_t\n");
15431 int16_t i = INT16_MAX;
15432 uint16_t i = UINT16_MAX;
15433 printf("int16_t\n");
15436 int32_t i = INT32_MAX;
15437 uint32_t u = UINT32_MAX;
15438 printf("int32_t\n");
15443 i8type="signed char"
15444 u8type="unsigned char"
15449 '') case "$shortsize" in
15451 u16type="unsigned short"
15459 '') set try -DINT16
15460 if eval $compile; then
15461 case "`$run ./try`" in
15473 '') if $test $shortsize -ge 2; then
15475 u16type="unsigned short"
15483 '') case "$longsize" in
15485 u32type="unsigned long"
15489 *) case "$intsize" in
15491 u32type="unsigned int"
15501 '') set try -DINT32
15502 if eval $compile; then
15503 case "`$run ./try`" in
15515 '') if $test $intsize -ge 4; then
15517 u32type="unsigned int"
15525 '') case "$d_quad:$quadtype" in
15527 i64type="$quadtype"
15528 u64type="$uquadtype"
15536 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
15537 : volatile so that the compiler has to store it out to memory.
15538 if test X"$d_volatile" = X"$define"; then
15543 #$i_stdlib I_STDLIB
15545 #include <stdlib.h>
15547 #include <sys/types.h>
15548 #include <signal.h>
15550 $volatile int bletched = 0;
15551 $signal_t blech(int s) { bletched = 1; }
15556 int n = 8 * $uvsize;
15559 signal(SIGFPE, blech);
15562 for (i = 0; i < n; i++) {
15563 u = u << 1 | ($uvtype)1;
15565 if (($uvtype)d != u)
15569 d = ($nvtype)(u - 1);
15570 if (($uvtype)d != (u - 1))
15577 printf("%d\n", ((i == n) ? -n : i));
15583 d_nv_preserves_uv="$undef"
15584 if eval $compile; then
15585 nv_preserves_uv_bits="`$run ./try`"
15587 case "$nv_preserves_uv_bits" in
15589 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
15590 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
15591 d_nv_preserves_uv="$define"
15593 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
15594 d_nv_preserves_uv="$undef" ;;
15595 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
15596 nv_preserves_uv_bits="0" ;;
15600 $echo "Checking to find the largest integer value your NVs can hold..." >&4
15601 : volatile so that the compiler has to store it out to memory.
15602 if test X"$d_volatile" = X"$define"; then
15608 typedef $nvtype NV;
15615 while(count < 256) {
15616 $volatile NV up = value + 1.0;
15617 $volatile NV negated = -value;
15618 $volatile NV down = negated - 1.0;
15619 $volatile NV got_up = up - value;
15620 int up_good = got_up == 1.0;
15621 int got_down = down - negated;
15622 int down_good = got_down == -1.0;
15624 if (down_good != up_good) {
15626 "Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n",
15627 up_good, (double) got_up, down_good, (double) got_down,
15628 count, (double) value);
15635 fputs("256.0", stdout);
15638 fputs("2.0", stdout);
15644 fputs("*", stdout);
15650 fprintf(stderr, "Cannot overflow integer range, even at 2**%d (%.20f)\n",
15651 count, (double) value);
15657 nv_overflows_integers_at='0'
15658 if eval $compile; then
15664 The largest integer your NVs can preserve is equal to $xxx
15666 nv_overflows_integers_at="$xxx"
15669 Cannot determine the largest integer value your NVs can hold, unexpected output
15676 Cannot determine the largest integer value your NVs can hold
15683 $echo "Checking whether NV 0.0 is all bits zero in memory..." >&4
15684 : volatile so that the compiler has to store it out to memory.
15685 if test X"$d_volatile" = X"$define"; then
15690 #$i_stdlib I_STDLIB
15692 #include <stdlib.h>
15694 #$i_string I_STRING
15696 # include <string.h>
15698 # include <strings.h>
15700 #include <sys/types.h>
15701 #include <signal.h>
15703 $volatile int bletched = 0;
15704 $signal_t blech(int s) { bletched = 1; }
15707 int checkit($nvtype d, char *where) {
15708 unsigned char *p = (char *)&d;
15709 unsigned char *end = p + sizeof(d);
15719 printf("No - %s: 0x", where);
15721 printf ("%02X", *p++);
15726 int main(int argc, char **argv) {
15729 fail += checkit(d, "0.0");
15731 /* The compiler shouldn't be assuming that bletched is 0 */
15734 fail += checkit(d, "bleched");
15737 signal(SIGFPE, blech);
15740 /* Paranoia - the compiler should have no way of knowing that ANSI says
15741 that argv[argc] will always be NULL. Actually, if it did assume this it
15742 would be buggy, as this is C and main() can be called from elsewhere in
15744 d = argv[argc] ? 1 : 0;
15747 printf("Odd argv[argc]=%p, d=%g\n", argv[argc], d);
15750 fail += checkit(d, "ternary");
15752 memset(&d, sizeof(d), argv[argc] ? 1 : 0);
15755 printf("No - memset doesn't give 0.0\n");
15756 /* This might just blow up: */
15757 printf("(gives %g)\n", d);
15763 printf("No - something bleched\n");
15768 printf("No - %d fail(s)\n", fail);
15777 d_nv_zero_is_allbits_zero="$undef"
15778 if eval $compile; then
15784 0.0 is represented as all bits zero in memory
15786 d_nv_zero_is_allbits_zero="$define"
15789 0.0 is not represented as all bits zero in memory
15791 d_nv_zero_is_allbits_zero="$undef"
15796 0.0 is not represented as all bits zero in memory
15798 d_nv_zero_is_allbits_zero="$undef"
15804 : check for off64_t
15806 echo "Checking to see if you have off64_t..." >&4
15808 #include <sys/types.h>
15809 #include <unistd.h>
15810 int main() { off64_t x = 7; }
15813 if eval $compile; then
15815 echo "You have off64_t."
15818 echo "You do not have off64_t."
15819 case "$lseeksize" in
15820 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
15827 : how to create joinable pthreads
15828 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
15830 echo "Checking what constant to use for creating joinable pthreads..." >&4
15831 $cat >try.c <<'EOCP'
15832 #include <pthread.h>
15834 int detachstate = JOINABLE;
15837 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
15838 if eval $compile; then
15839 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
15840 val="$undef" # Yes, undef.
15841 set d_old_pthread_create_joinable
15844 set old_pthread_create_joinable
15847 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
15848 if eval $compile; then
15849 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
15851 set d_old_pthread_create_joinable
15853 val=PTHREAD_CREATE_UNDETACHED
15854 set old_pthread_create_joinable
15857 set try -DJOINABLE=__UNDETACHED
15858 if eval $compile; then
15859 echo "You seem to use __UNDETACHED." >&4
15861 set d_old_pthread_create_joinable
15864 set old_pthread_create_joinable
15867 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
15869 set d_old_pthread_create_joinable
15872 set old_pthread_create_joinable
15879 d_old_pthread_create_joinable="$undef"
15880 old_pthread_create_joinable=""
15883 : see if pause exists
15887 : see if poll exists
15891 : see if readlink exists
15892 set readlink d_readlink
15895 : Check if exe is symlink to abs path of executing program
15899 case "$d_readlink" in
15901 if $issymlink /proc/self/exe ; then
15902 $ls -l /proc/self/exe > reflect
15903 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
15904 echo "You have Linux-like /proc/self/exe."
15905 procselfexe='"/proc/self/exe"'
15909 if $issymlink /proc/curproc/file ; then
15910 $ls -l /proc/curproc/file > reflect
15911 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
15912 echo "You have BSD-like /proc/curproc/file."
15913 procselfexe='"/proc/curproc/file"'
15923 : backward compatibility for d_hvfork
15924 if test X$d_hvfork != X; then
15925 d_vfork="$d_hvfork"
15928 : see if there is a vfork
15933 d_pseudofork=$undef
15935 : Ok, but do we want to use it. vfork is reportedly unreliable in
15936 : perl on Solaris 2.x, and probably elsewhere.
15940 case "$usevfork" in
15946 Perl can only use a vfork() that doesn't suffer from strict
15947 restrictions on calling functions or modifying global data in
15948 the child. For example, glibc-2.1 contains such a vfork()
15949 that is unsuitable. If your system provides a proper fork()
15950 call, chances are that you do NOT want perl to use vfork().
15953 rp="Do you still want to use vfork()?"
15958 echo "Ok, we won't use vfork()."
15967 $define) usevfork='true';;
15968 *) usevfork='false';;
15971 : see whether the pthread_atfork exists
15973 #include <pthread.h>
15976 #ifdef PTHREAD_ATFORK
15977 pthread_atfork(NULL,NULL,NULL);
15982 : see if pthread_atfork exists
15983 set try -DPTHREAD_ATFORK
15984 if eval $compile; then
15989 case "$usethreads" in
15992 $define) echo 'pthread_atfork found.' >&4 ;;
15993 *) echo 'pthread_atfork NOT found.' >&4 ;;
15996 set d_pthread_atfork
15999 : see if pthread_attr_setscope exists
16000 set pthread_attr_setscope d_pthread_attr_setscope
16003 : see whether the various POSIXish _yields exist
16005 #include <pthread.h>
16011 #ifdef PTHREAD_YIELD
16014 #ifdef PTHREAD_YIELD_NULL
16015 pthread_yield(NULL);
16021 : see if sched_yield exists
16022 set try -DSCHED_YIELD
16023 if eval $compile; then
16025 sched_yield='sched_yield()'
16029 case "$usethreads" in
16032 $define) echo 'sched_yield() found.' >&4 ;;
16033 *) echo 'sched_yield() NOT found.' >&4 ;;
16039 : see if pthread_yield exists
16040 set try -DPTHREAD_YIELD
16041 if eval $compile; then
16043 case "$sched_yield" in
16044 '') sched_yield='pthread_yield()' ;;
16047 set try -DPTHREAD_YIELD_NULL
16048 if eval $compile; then
16050 case "$sched_yield" in
16051 '') sched_yield='pthread_yield(NULL)' ;;
16057 case "$usethreads" in
16060 $define) echo 'pthread_yield() found.' >&4 ;;
16061 *) echo 'pthread_yield() NOT found.' >&4 ;;
16065 set d_pthread_yield
16067 case "$sched_yield" in
16068 '') sched_yield=undef ;;
16072 : see if random_r exists
16073 set random_r d_random_r
16075 case "$d_random_r" in
16077 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
16078 case "$d_random_r_proto:$usethreads" in
16079 ":define") d_random_r_proto=define
16080 set d_random_r_proto random_r $hdrs
16084 case "$d_random_r_proto" in
16086 case "$random_r_proto" in
16087 ''|0) try='int random_r(int*, struct random_data*);'
16088 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_iS ;;
16090 case "$random_r_proto" in
16091 ''|0) try='int random_r(long*, struct random_data*);'
16092 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_lS ;;
16094 case "$random_r_proto" in
16095 ''|0) try='int random_r(struct random_data*, int32_t*);'
16096 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_St ;;
16098 case "$random_r_proto" in
16099 ''|0) d_random_r=undef
16101 echo "Disabling random_r, cannot determine prototype." >&4 ;;
16102 * ) case "$random_r_proto" in
16103 REENTRANT_PROTO*) ;;
16104 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
16106 echo "Prototype: $try" ;;
16109 *) case "$usethreads" in
16110 define) echo "random_r has no prototype, not using it." >&4 ;;
16117 *) random_r_proto=0
16121 : see if readdir and friends exist
16122 set readdir d_readdir
16124 set seekdir d_seekdir
16126 set telldir d_telldir
16128 set rewinddir d_rewinddir
16131 : see if readdir64_r exists
16132 set readdir64_r d_readdir64_r
16134 case "$d_readdir64_r" in
16136 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
16137 case "$d_readdir64_r_proto:$usethreads" in
16138 ":define") d_readdir64_r_proto=define
16139 set d_readdir64_r_proto readdir64_r $hdrs
16143 case "$d_readdir64_r_proto" in
16145 case "$readdir64_r_proto" in
16146 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
16147 ./protochk "$extern_C $try" $hdrs && readdir64_r_proto=I_TSR ;;
16149 case "$readdir64_r_proto" in
16150 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
16151 ./protochk "$extern_C $try" $hdrs && readdir64_r_proto=I_TS ;;
16153 case "$readdir64_r_proto" in
16154 ''|0) d_readdir64_r=undef
16155 readdir64_r_proto=0
16156 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
16157 * ) case "$readdir64_r_proto" in
16158 REENTRANT_PROTO*) ;;
16159 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
16161 echo "Prototype: $try" ;;
16164 *) case "$usethreads" in
16165 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
16167 d_readdir64_r=undef
16168 readdir64_r_proto=0
16172 *) readdir64_r_proto=0
16176 : see if readdir_r exists
16177 set readdir_r d_readdir_r
16179 case "$d_readdir_r" in
16181 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
16182 case "$d_readdir_r_proto:$usethreads" in
16183 ":define") d_readdir_r_proto=define
16184 set d_readdir_r_proto readdir_r $hdrs
16188 case "$d_readdir_r_proto" in
16190 case "$readdir_r_proto" in
16191 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
16192 ./protochk "$extern_C $try" $hdrs && readdir_r_proto=I_TSR ;;
16194 case "$readdir_r_proto" in
16195 ''|0) try='int readdir_r(DIR*, struct dirent*);'
16196 ./protochk "$extern_C $try" $hdrs && readdir_r_proto=I_TS ;;
16198 case "$readdir_r_proto" in
16199 ''|0) d_readdir_r=undef
16201 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
16202 * ) case "$readdir_r_proto" in
16203 REENTRANT_PROTO*) ;;
16204 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
16206 echo "Prototype: $try" ;;
16209 *) case "$usethreads" in
16210 define) echo "readdir_r has no prototype, not using it." >&4 ;;
16217 *) readdir_r_proto=0
16221 : see if readv exists
16225 : see if recvmsg exists
16226 set recvmsg d_recvmsg
16229 : see if rename exists
16230 set rename d_rename
16233 : see if rmdir exists
16237 : see if memory.h is available.
16242 : See if it conflicts with string.h
16248 $cppstdin $cppflags $cppminus < $strings > mem.h
16249 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
16251 echo "We won't be including <memory.h>."
16261 : can bcopy handle overlapping blocks?
16264 case "$d_memmove" in
16265 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
16266 *) case "$d_bcopy" in
16268 echo "Checking to see if bcopy() can do overlapping copies..." >&4
16270 #$i_memory I_MEMORY
16271 #$i_stdlib I_STDLIB
16272 #$i_string I_STRING
16273 #$i_unistd I_UNISTD
16275 $cat >>try.c <<'EOCP'
16278 # include <memory.h>
16281 # include <stdlib.h>
16284 # include <string.h>
16286 # include <strings.h>
16289 # include <unistd.h> /* Needed for NetBSD */
16293 char buf[128], abc[128];
16299 /* Copy "abcde..." string to char abc[] so that gcc doesn't
16300 try to store the string in read-only memory. */
16301 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
16303 for (align = 7; align >= 0; align--) {
16304 for (len = 36; len; len--) {
16306 bcopy(abc, b, len);
16307 for (off = 1; off <= len; off++) {
16308 bcopy(b, b+off, len);
16309 bcopy(b+off, b, len);
16310 if (bcmp(b, abc, len))
16319 if eval $compile_ok; then
16320 if $run ./try 2>/dev/null; then
16321 echo "Yes, it can."
16324 echo "It can't, sorry."
16327 echo "(I can't compile the test program, so we'll assume not...)"
16337 : can memcpy handle overlapping blocks?
16340 case "$d_memmove" in
16341 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
16342 *) case "$d_memcpy" in
16344 echo "Checking to see if memcpy() can do overlapping copies..." >&4
16346 #$i_memory I_MEMORY
16347 #$i_stdlib I_STDLIB
16348 #$i_string I_STRING
16349 #$i_unistd I_UNISTD
16351 $cat >>try.c <<'EOCP'
16354 # include <memory.h>
16357 # include <stdlib.h>
16360 # include <string.h>
16362 # include <strings.h>
16365 # include <unistd.h> /* Needed for NetBSD */
16369 char buf[128], abc[128];
16375 /* Copy "abcde..." string to char abc[] so that gcc doesn't
16376 try to store the string in read-only memory. */
16377 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
16379 for (align = 7; align >= 0; align--) {
16380 for (len = 36; len; len--) {
16382 memcpy(b, abc, len);
16383 for (off = 1; off <= len; off++) {
16384 memcpy(b+off, b, len);
16385 memcpy(b, b+off, len);
16386 if (memcmp(b, abc, len))
16395 if eval $compile_ok; then
16396 if $run ./try 2>/dev/null; then
16397 echo "Yes, it can."
16400 echo "It can't, sorry."
16403 echo "(I can't compile the test program, so we'll assume not...)"
16413 : can memcmp be trusted to compare relative magnitude?
16415 case "$d_memcmp" in
16418 echo "Checking if your memcmp() can compare relative magnitude..." >&4
16420 #$i_memory I_MEMORY
16421 #$i_stdlib I_STDLIB
16422 #$i_string I_STRING
16423 #$i_unistd I_UNISTD
16425 $cat >>try.c <<'EOCP'
16428 # include <memory.h>
16431 # include <stdlib.h>
16434 # include <string.h>
16436 # include <strings.h>
16439 # include <unistd.h> /* Needed for NetBSD */
16445 if ((a < b) && memcmp(&a, &b, 1) < 0)
16451 if eval $compile_ok; then
16452 if $run ./try 2>/dev/null; then
16453 echo "Yes, it can."
16456 echo "No, it can't (it uses signed chars)."
16459 echo "(I can't compile the test program, so we'll assume not...)"
16467 : see if prototype for sbrk is available
16469 set d_sbrkproto sbrk $i_unistd unistd.h
16472 : see if select exists
16473 set select d_select
16476 : see if semctl exists
16477 set semctl d_semctl
16480 : see if semget exists
16481 set semget d_semget
16484 : see if semop exists
16488 : see how much of the 'sem*(2)' library is present.
16491 case "$d_semctl$d_semget$d_semop" in
16492 *"$undef"*) h_sem=false;;
16496 case "`ipcs 2>&1`" in
16497 "SVID messages"*"not configured"*)
16498 echo "Your $osname does not have the sem*(2) configured." >&4
16501 set semctl d_semctl
16503 set semget d_semget
16511 : we could also check for sys/ipc.h ...
16512 if $h_sem && $test `./findhdr sys/sem.h`; then
16513 echo "You have the full sem*(2) library." >&4
16516 echo "You don't have the full sem*(2) library." >&4
16522 : see whether sys/sem.h defines union semun
16524 $cat > try.c <<'END'
16525 #include <sys/types.h>
16526 #include <sys/ipc.h>
16527 #include <sys/sem.h>
16528 int main () { union semun semun; semun.buf = 0; }
16531 if eval $compile; then
16532 echo "You have union semun in <sys/sem.h>." >&4
16535 echo "You do not have union semun in <sys/sem.h>." >&4
16542 : see how to do semctl IPC_STAT
16546 $cat > tryh.h <<END
16549 # define S_IRUSR S_IREAD
16550 # define S_IWUSR S_IWRITE
16551 # define S_IXUSR S_IEXEC
16553 # define S_IRUSR 0400
16554 # define S_IWUSR 0200
16555 # define S_IXUSR 0100
16557 # define S_IRGRP (S_IRUSR>>3)
16558 # define S_IWGRP (S_IWUSR>>3)
16559 # define S_IXGRP (S_IXUSR>>3)
16560 # define S_IROTH (S_IRUSR>>6)
16561 # define S_IWOTH (S_IWUSR>>6)
16562 # define S_IXOTH (S_IXUSR>>6)
16565 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
16566 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
16567 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
16570 : see whether semctl IPC_STAT can use union semun
16571 case "$d_semctl_semun" in
16575 #include <sys/types.h>
16576 #include <sys/ipc.h>
16577 #include <sys/sem.h>
16578 #include <sys/stat.h>
16585 #$d_union_semun HAS_UNION_SEMUN
16588 #ifndef HAS_UNION_SEMUN
16591 struct semid_ds *buf;
16592 unsigned short *array;
16598 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
16599 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
16601 struct semid_ds argbuf;
16604 st = semctl(sem, 0, IPC_STAT, arg);
16608 # endif /* IPC_STAT */
16609 printf("semctl IPC_STAT failed: errno = %d\n", errno);
16611 if (semctl(sem, 0, IPC_RMID, arg) != 0)
16612 # endif /* IPC_RMID */
16613 printf("semctl IPC_RMID failed: errno = %d\n", errno);
16615 #endif /* IPC_PRIVATE && ... */
16616 printf("semget failed: errno = %d\n", errno);
16621 if eval $compile; then
16624 semun) val="$define" ;;
16632 case "$d_semctl_semun" in
16634 echo "You can use union semun for semctl IPC_STAT." >&4
16637 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
16642 : see whether semctl IPC_STAT can use struct semid_ds pointer
16643 case "$d_semctl_semid_ds" in
16646 $cat > try.c <<'END'
16647 #include <sys/types.h>
16648 #include <sys/ipc.h>
16649 #include <sys/sem.h>
16650 #include <sys/stat.h>
16658 struct semid_ds arg;
16661 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
16662 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
16665 st = semctl(sem, 0, IPC_STAT, &arg);
16667 printf("semid_ds\n");
16669 # endif /* IPC_STAT */
16670 printf("semctl IPC_STAT failed: errno = %d\n", errno);
16672 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
16673 # endif /* IPC_RMID */
16674 printf("semctl IPC_RMID failed: errno = %d\n", errno);
16676 #endif /* IPC_PRIVATE && ... */
16677 printf("semget failed: errno = %d\n", errno);
16683 if eval $compile; then
16686 semid_ds) val="$define" ;;
16690 set d_semctl_semid_ds
16694 case "$d_semctl_semid_ds" in
16696 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
16698 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
16704 # We do not have the full sem*(2) library, so assume we can not
16710 set d_semctl_semid_ds
16716 : see if sendmsg exists
16717 set sendmsg d_sendmsg
16720 : see if setegid exists
16721 set setegid d_setegid
16724 : see if seteuid exists
16725 set seteuid d_seteuid
16728 : see if setgrent exists
16729 set setgrent d_setgrent
16732 : see if setgrent_r exists
16733 set setgrent_r d_setgrent_r
16735 case "$d_setgrent_r" in
16737 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
16738 case "$d_setgrent_r_proto:$usethreads" in
16739 ":define") d_setgrent_r_proto=define
16740 set d_setgrent_r_proto setgrent_r $hdrs
16744 case "$d_setgrent_r_proto" in
16746 case "$setgrent_r_proto" in
16747 ''|0) try='int setgrent_r(FILE**);'
16748 ./protochk "$extern_C $try" $hdrs && setgrent_r_proto=I_H ;;
16750 case "$setgrent_r_proto" in
16751 ''|0) try='void setgrent_r(FILE**);'
16752 ./protochk "$extern_C $try" $hdrs && setgrent_r_proto=V_H ;;
16754 case "$setgrent_r_proto" in
16755 ''|0) d_setgrent_r=undef
16757 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
16758 * ) case "$setgrent_r_proto" in
16759 REENTRANT_PROTO*) ;;
16760 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
16762 echo "Prototype: $try" ;;
16765 *) case "$usethreads" in
16766 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
16773 *) setgrent_r_proto=0
16777 : see if sethostent exists
16778 set sethostent d_sethent
16781 : see if sethostent_r exists
16782 set sethostent_r d_sethostent_r
16784 case "$d_sethostent_r" in
16786 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16787 case "$d_sethostent_r_proto:$usethreads" in
16788 ":define") d_sethostent_r_proto=define
16789 set d_sethostent_r_proto sethostent_r $hdrs
16793 case "$d_sethostent_r_proto" in
16795 case "$sethostent_r_proto" in
16796 ''|0) try='int sethostent_r(int, struct hostent_data*);'
16797 ./protochk "$extern_C $try" $hdrs && sethostent_r_proto=I_ID ;;
16799 case "$sethostent_r_proto" in
16800 ''|0) try='void sethostent_r(int, struct hostent_data*);'
16801 ./protochk "$extern_C $try" $hdrs && sethostent_r_proto=V_ID ;;
16803 case "$sethostent_r_proto" in
16804 ''|0) d_sethostent_r=undef
16805 sethostent_r_proto=0
16806 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
16807 * ) case "$sethostent_r_proto" in
16808 REENTRANT_PROTO*) ;;
16809 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
16811 echo "Prototype: $try" ;;
16814 *) case "$usethreads" in
16815 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
16817 d_sethostent_r=undef
16818 sethostent_r_proto=0
16822 *) sethostent_r_proto=0
16826 : see if setitimer exists
16827 set setitimer d_setitimer
16830 : see if setlinebuf exists
16831 set setlinebuf d_setlinebuf
16834 : see if setlocale exists
16835 set setlocale d_setlocale
16838 : see if locale.h is available
16839 set locale.h i_locale
16842 : see if setlocale_r exists
16843 set setlocale_r d_setlocale_r
16845 case "$d_setlocale_r" in
16847 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
16848 case "$d_setlocale_r_proto:$usethreads" in
16849 ":define") d_setlocale_r_proto=define
16850 set d_setlocale_r_proto setlocale_r $hdrs
16854 case "$d_setlocale_r_proto" in
16856 case "$setlocale_r_proto" in
16857 ''|0) try='int setlocale_r(int, const char*, char*, int);'
16858 ./protochk "$extern_C $try" $hdrs && setlocale_r_proto=I_ICBI ;;
16860 case "$setlocale_r_proto" in
16861 ''|0) d_setlocale_r=undef
16862 setlocale_r_proto=0
16863 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
16864 * ) case "$setlocale_r_proto" in
16865 REENTRANT_PROTO*) ;;
16866 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
16868 echo "Prototype: $try" ;;
16871 *) case "$usethreads" in
16872 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
16874 d_setlocale_r=undef
16875 setlocale_r_proto=0
16879 *) setlocale_r_proto=0
16883 : see if setnetent exists
16884 set setnetent d_setnent
16887 : see if setnetent_r exists
16888 set setnetent_r d_setnetent_r
16890 case "$d_setnetent_r" in
16892 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16893 case "$d_setnetent_r_proto:$usethreads" in
16894 ":define") d_setnetent_r_proto=define
16895 set d_setnetent_r_proto setnetent_r $hdrs
16899 case "$d_setnetent_r_proto" in
16901 case "$setnetent_r_proto" in
16902 ''|0) try='int setnetent_r(int, struct netent_data*);'
16903 ./protochk "$extern_C $try" $hdrs && setnetent_r_proto=I_ID ;;
16905 case "$setnetent_r_proto" in
16906 ''|0) try='void setnetent_r(int, struct netent_data*);'
16907 ./protochk "$extern_C $try" $hdrs && setnetent_r_proto=V_ID ;;
16909 case "$setnetent_r_proto" in
16910 ''|0) d_setnetent_r=undef
16911 setnetent_r_proto=0
16912 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
16913 * ) case "$setnetent_r_proto" in
16914 REENTRANT_PROTO*) ;;
16915 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
16917 echo "Prototype: $try" ;;
16920 *) case "$usethreads" in
16921 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
16923 d_setnetent_r=undef
16924 setnetent_r_proto=0
16928 *) setnetent_r_proto=0
16932 : see if setprotoent exists
16933 set setprotoent d_setpent
16936 : see if setpgid exists
16937 set setpgid d_setpgid
16940 : see if setpgrp2 exists
16941 set setpgrp2 d_setpgrp2
16944 : see if setpriority exists
16945 set setpriority d_setprior
16948 : see if setproctitle exists
16949 set setproctitle d_setproctitle
16952 : see if setprotoent_r exists
16953 set setprotoent_r d_setprotoent_r
16955 case "$d_setprotoent_r" in
16957 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16958 case "$d_setprotoent_r_proto:$usethreads" in
16959 ":define") d_setprotoent_r_proto=define
16960 set d_setprotoent_r_proto setprotoent_r $hdrs
16964 case "$d_setprotoent_r_proto" in
16966 case "$setprotoent_r_proto" in
16967 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
16968 ./protochk "$extern_C $try" $hdrs && setprotoent_r_proto=I_ID ;;
16970 case "$setprotoent_r_proto" in
16971 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
16972 ./protochk "$extern_C $try" $hdrs && setprotoent_r_proto=V_ID ;;
16974 case "$setprotoent_r_proto" in
16975 ''|0) d_setprotoent_r=undef
16976 setprotoent_r_proto=0
16977 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
16978 * ) case "$setprotoent_r_proto" in
16979 REENTRANT_PROTO*) ;;
16980 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
16982 echo "Prototype: $try" ;;
16985 *) case "$usethreads" in
16986 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
16988 d_setprotoent_r=undef
16989 setprotoent_r_proto=0
16993 *) setprotoent_r_proto=0
16997 : see if setpwent exists
16998 set setpwent d_setpwent
17001 : see if setpwent_r exists
17002 set setpwent_r d_setpwent_r
17004 case "$d_setpwent_r" in
17006 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
17007 case "$d_setpwent_r_proto:$usethreads" in
17008 ":define") d_setpwent_r_proto=define
17009 set d_setpwent_r_proto setpwent_r $hdrs
17013 case "$d_setpwent_r_proto" in
17015 case "$setpwent_r_proto" in
17016 ''|0) try='int setpwent_r(FILE**);'
17017 ./protochk "$extern_C $try" $hdrs && setpwent_r_proto=I_H ;;
17019 case "$setpwent_r_proto" in
17020 ''|0) try='void setpwent_r(FILE**);'
17021 ./protochk "$extern_C $try" $hdrs && setpwent_r_proto=V_H ;;
17023 case "$setpwent_r_proto" in
17024 ''|0) d_setpwent_r=undef
17026 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
17027 * ) case "$setpwent_r_proto" in
17028 REENTRANT_PROTO*) ;;
17029 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
17031 echo "Prototype: $try" ;;
17034 *) case "$usethreads" in
17035 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
17042 *) setpwent_r_proto=0
17046 : see if setregid exists
17047 set setregid d_setregid
17049 set setresgid d_setresgid
17052 : see if setreuid exists
17053 set setreuid d_setreuid
17055 set setresuid d_setresuid
17058 : see if setrgid exists
17059 set setrgid d_setrgid
17062 : see if setruid exists
17063 set setruid d_setruid
17066 : see if setservent exists
17067 set setservent d_setsent
17070 : see if setservent_r exists
17071 set setservent_r d_setservent_r
17073 case "$d_setservent_r" in
17075 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
17076 case "$d_setservent_r_proto:$usethreads" in
17077 ":define") d_setservent_r_proto=define
17078 set d_setservent_r_proto setservent_r $hdrs
17082 case "$d_setservent_r_proto" in
17084 case "$setservent_r_proto" in
17085 ''|0) try='int setservent_r(int, struct servent_data*);'
17086 ./protochk "$extern_C $try" $hdrs && setservent_r_proto=I_ID ;;
17088 case "$setservent_r_proto" in
17089 ''|0) try='void setservent_r(int, struct servent_data*);'
17090 ./protochk "$extern_C $try" $hdrs && setservent_r_proto=V_ID ;;
17092 case "$setservent_r_proto" in
17093 ''|0) d_setservent_r=undef
17094 setservent_r_proto=0
17095 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
17096 * ) case "$setservent_r_proto" in
17097 REENTRANT_PROTO*) ;;
17098 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
17100 echo "Prototype: $try" ;;
17103 *) case "$usethreads" in
17104 define) echo "setservent_r has no prototype, not using it." >&4 ;;
17106 d_setservent_r=undef
17107 setservent_r_proto=0
17111 *) setservent_r_proto=0
17115 : see if setsid exists
17116 set setsid d_setsid
17119 : see if setvbuf exists
17120 set setvbuf d_setvbuf
17123 : see if sfio.h is available
17127 : see if sfio library is available
17138 : Ok, but do we want to use it.
17142 true|$define|[yY]*) dflt='y';;
17145 echo "$package can use the sfio library, but it is experimental."
17146 case "$useperlio" in
17148 echo "For sfio also the PerlIO abstraction layer is needed."
17149 echo "Earlier you said you wouldn't want that."
17152 rp="You seem to have sfio available, do you want to try using it?"
17155 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
17156 useperlio="$define"
17159 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
17164 *) case "$usesfio" in
17165 true|$define|[yY]*)
17166 echo "Sorry, cannot find sfio on this machine." >&4
17167 echo "Ignoring your setting of usesfio=$usesfio." >&4
17176 $define) usesfio='true';;
17177 *) usesfio='false';;
17181 *) : Remove sfio from list of libraries to use
17184 echo "Removing unneeded -lsfio from library list" >&4
17185 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
17188 echo "libs = $libs" >&4
17195 : see if shmctl exists
17196 set shmctl d_shmctl
17199 : see if shmget exists
17200 set shmget d_shmget
17203 : see if shmat exists
17206 : see what shmat returns
17209 $cat >shmat.c <<'END'
17210 #include <sys/shm.h>
17213 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
17218 echo "and it returns ($shmattype)." >&4
17219 : see if a prototype for shmat is available
17220 xxx=`./findhdr sys/shm.h`
17221 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
17222 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
17233 set d_shmatprototype
17236 : see if shmdt exists
17240 : see how much of the 'shm*(2)' library is present.
17243 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
17244 *"$undef"*) h_shm=false;;
17248 case "`ipcs 2>&1`" in
17249 "SVID shared memory"*"not configured"*)
17250 echo "Your $osname does not have the shm*(2) configured." >&4
17253 set shmctl d_shmctl
17255 set shmget d_shmget
17265 : we could also check for sys/ipc.h ...
17266 if $h_shm && $test `./findhdr sys/shm.h`; then
17267 echo "You have the full shm*(2) library." >&4
17270 echo "You don't have the full shm*(2) library." >&4
17276 : see if we have sigaction
17278 if set sigaction val -f d_sigaction; eval $csym; $val; then
17279 echo 'sigaction() found.' >&4
17282 #include <sys/types.h>
17283 #include <signal.h>
17284 #$i_stdlib I_STDLIB
17286 #include <stdlib.h>
17290 struct sigaction act, oact;
17292 oact.sa_handler = 0;
17293 /* so that act and oact are used */
17294 exit(act.sa_flags == 0 && oact.sa_handler == 0);
17298 if eval $compile_ok; then
17301 echo "But you don't seem to have a useable struct sigaction." >&4
17305 echo 'sigaction NOT found.' >&4
17308 set d_sigaction; eval $setvar
17311 : see if this is a sunmath.h system
17312 set sunmath.h i_sunmath
17315 : see if signbit exists
17316 $echo $n "Checking to see if you have signbit() available to work on $nvtype... $c" >&4
17319 #$i_sunmath I_SUNMATH
17323 #ifdef I_SUNMATH /* Solaris special math library */
17324 # include <sunmath.h>
17327 int main(int argc, char **argv)
17331 if ((signbit(x) == 0) && (signbit(y) != 0))
17339 if eval $compile; then
17340 if $run ./try; then
17344 $echo "Signbit seems to be available, but doesn't work as I expected."
17345 $echo "I won't use it." >&4
17356 : see if sigprocmask exists
17357 set sigprocmask d_sigprocmask
17360 : see if sigsetjmp exists
17362 case "$d_sigsetjmp" in
17365 #include <setjmp.h>
17366 #$i_stdlib I_STDLIB
17368 #include <stdlib.h>
17374 if (sigsetjmp(env,1))
17377 siglongjmp(env, 1);
17382 if eval $compile; then
17383 if $run ./try >/dev/null 2>&1; then
17384 echo "POSIX sigsetjmp found." >&4
17388 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
17394 echo "sigsetjmp not found." >&4
17398 *) val="$d_sigsetjmp"
17399 case "$d_sigsetjmp" in
17400 $define) echo "POSIX sigsetjmp found." >&4;;
17401 $undef) echo "sigsetjmp not found." >&4;;
17409 : see if snprintf exists
17410 set snprintf d_snprintf
17413 : see if vsnprintf exists
17414 set vsnprintf d_vsnprintf
17417 case "$d_snprintf-$d_vsnprintf" in
17420 Checking whether your snprintf() and vsnprintf() work okay...
17422 $cat >try.c <<'EOCP'
17423 /* v?snprintf testing logic courtesy of Russ Allbery.
17424 * According to C99:
17425 * - if the buffer is too short it still must be \0-terminated
17426 * - if the buffer is too short the potentially required length
17427 * must be returned and not -1
17428 * - if the buffer is NULL the potentially required length
17429 * must be returned and not -1 or core dump
17432 #include <stdarg.h>
17436 int test (char *format, ...)
17441 va_start (args, format);
17442 count = vsnprintf (buf, sizeof buf, format, args);
17449 return ((test ("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0'
17450 && snprintf (NULL, 0, "%s", "abcd") == 4) ? 0 : 1);
17454 if eval $compile; then
17457 0) echo "Your snprintf() and vsnprintf() seem to be working okay." ;;
17459 Your snprintf() and snprintf() don't seem to be working okay.
17461 d_snprintf="$undef"
17462 d_vsnprintf="$undef"
17466 echo "(I can't seem to compile the test program--assuming they don't)"
17467 d_snprintf="$undef"
17468 d_vsnprintf="$undef"
17474 : see if sockatmark exists
17475 set sockatmark d_sockatmark
17478 : see if prototype for sockatmark is available
17480 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
17483 : see if socks5_init exists
17484 set socks5_init d_socks5_init
17487 : see if sprintf returns the length of the string in the buffer as per ANSI
17488 $echo "Checking whether sprintf returns the length of the string..." >&4
17491 #$i_stdlib I_STDLIB
17493 #include <stdlib.h>
17495 #$i_string I_STRING
17497 # include <string.h>
17499 # include <strings.h>
17508 int check (size_t expect, int test) {
17509 size_t got = strlen(buffer);
17513 printf("expected %ld, got %ld in test %d '%s'\n", (long) expect, (long) got,
17518 int main(int argc, char **argv) {
17521 check(sprintf(buffer, ""), ++test);
17522 check(sprintf(buffer, "%s %s", "perl", "rules"), ++test);
17523 check(sprintf(buffer, "I like %g", atan2(0,-1)), ++test);
17530 if eval $compile; then
17534 sprintf returns the length of the string (as ANSI says it should)
17536 d_sprintf_returns_strlen="$define"
17539 sprintf does not return the length of the string (how old is this system?)
17541 d_sprintf_returns_strlen="$undef"
17545 echo "(I can't seem to compile the test program--assuming it doesn't)" >&4
17546 d_sprintf_returns_strlen="$undef"
17550 : see if srand48_r exists
17551 set srand48_r d_srand48_r
17553 case "$d_srand48_r" in
17555 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
17556 case "$d_srand48_r_proto:$usethreads" in
17557 ":define") d_srand48_r_proto=define
17558 set d_srand48_r_proto srand48_r $hdrs
17562 case "$d_srand48_r_proto" in
17564 case "$srand48_r_proto" in
17565 ''|0) try='int srand48_r(long, struct drand48_data*);'
17566 ./protochk "$extern_C $try" $hdrs && srand48_r_proto=I_LS ;;
17568 case "$srand48_r_proto" in
17569 ''|0) d_srand48_r=undef
17571 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
17572 * ) case "$srand48_r_proto" in
17573 REENTRANT_PROTO*) ;;
17574 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
17576 echo "Prototype: $try" ;;
17579 *) case "$usethreads" in
17580 define) echo "srand48_r has no prototype, not using it." >&4 ;;
17587 *) srand48_r_proto=0
17591 : see if srandom_r exists
17592 set srandom_r d_srandom_r
17594 case "$d_srandom_r" in
17596 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
17597 case "$d_srandom_r_proto:$usethreads" in
17598 ":define") d_srandom_r_proto=define
17599 set d_srandom_r_proto srandom_r $hdrs
17603 case "$d_srandom_r_proto" in
17605 case "$srandom_r_proto" in
17606 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
17607 ./protochk "$extern_C $try" $hdrs && srandom_r_proto=I_TS ;;
17609 case "$srandom_r_proto" in
17610 ''|0) d_srandom_r=undef
17612 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
17613 * ) case "$srandom_r_proto" in
17614 REENTRANT_PROTO*) ;;
17615 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
17617 echo "Prototype: $try" ;;
17620 *) case "$usethreads" in
17621 define) echo "srandom_r has no prototype, not using it." >&4 ;;
17628 *) srandom_r_proto=0
17632 : see if prototype for setresgid is available
17634 set d_sresgproto setresgid $i_unistd unistd.h
17637 : see if prototype for setresuid is available
17639 set d_sresuproto setresuid $i_unistd unistd.h
17642 : see if sys/stat.h is available
17643 set sys/stat.h i_sysstat
17646 : see if stat knows about block sizes
17648 echo "Checking to see if your struct stat has st_blocks field..." >&4
17649 set d_statblks stat st_blocks $i_sysstat sys/stat.h
17652 : see if this is a sys/vfs.h system
17653 set sys/vfs.h i_sysvfs
17656 : see if this is a sys/statfs.h system
17657 set sys/statfs.h i_sysstatfs
17660 : Check for statfs_s
17662 echo "Checking to see if your system supports struct statfs..." >&4
17663 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
17665 case "$d_statfs_s" in
17666 "$define") echo "Yes, it does." ;;
17667 *) echo "No, it doesn't." ;;
17671 : see if struct statfs knows about f_flags
17672 case "$d_statfs_s" in
17675 echo "Checking to see if your struct statfs has f_flags field..." >&4
17676 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
17680 set d_statfs_f_flags
17684 case "$d_statfs_f_flags" in
17685 "$define") echo "Yes, it does." ;;
17686 *) echo "No, it doesn't." ;;
17689 : Check stream access
17691 Checking how to access stdio streams by file descriptor number...
17693 case "$stdio_stream_array" in
17694 '') $cat >try.c <<EOCP
17697 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
17701 for s in _iob __iob __sF
17703 set try -DSTDIO_STREAM_ARRAY=$s
17704 if eval $compile; then
17705 case "`$run ./try`" in
17706 yes) stdio_stream_array=$s; break ;;
17712 case "$stdio_stream_array" in
17714 I can't figure out how to access stdio streams by file descriptor number.
17716 d_stdio_stream_array="$undef"
17719 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
17721 d_stdio_stream_array="$define"
17725 : see if strcoll exists
17726 set strcoll d_strcoll
17729 : check for structure copying
17731 echo "Checking to see if your C compiler can copy structs..." >&4
17732 $cat >try.c <<'EOCP'
17742 if $cc -c try.c >/dev/null 2>&1 ; then
17744 echo "Yup, it can."
17747 echo "Nope, it can't."
17753 : see if strerror and/or sys_errlist[] exist
17755 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
17756 if set strerror val -f d_strerror; eval $csym; $val; then
17757 echo 'strerror() found.' >&4
17758 d_strerror="$define"
17759 d_strerrm='strerror(e)'
17760 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
17761 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
17762 d_syserrlst="$define"
17764 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
17765 d_syserrlst="$undef"
17767 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
17768 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
17769 echo 'strerror() found in string header.' >&4
17770 d_strerror="$define"
17771 d_strerrm='strerror(e)'
17772 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
17773 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
17774 d_syserrlst="$define"
17776 echo "(You don't appear to have any sys_errlist[], how can this be?)"
17777 d_syserrlst="$undef"
17779 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
17780 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
17781 d_strerror="$undef"
17782 d_syserrlst="$define"
17783 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
17785 echo 'strerror() and sys_errlist[] NOT found.' >&4
17786 d_strerror="$undef"
17787 d_syserrlst="$undef"
17788 d_strerrm='"unknown"'
17792 : see if strerror_r exists
17793 set strerror_r d_strerror_r
17795 case "$d_strerror_r" in
17797 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
17798 case "$d_strerror_r_proto:$usethreads" in
17799 ":define") d_strerror_r_proto=define
17800 set d_strerror_r_proto strerror_r $hdrs
17804 case "$d_strerror_r_proto" in
17806 case "$strerror_r_proto" in
17807 ''|0) try='int strerror_r(int, char*, size_t);'
17808 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=I_IBW ;;
17810 case "$strerror_r_proto" in
17811 ''|0) try='int strerror_r(int, char*, int);'
17812 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=I_IBI ;;
17814 case "$strerror_r_proto" in
17815 ''|0) try='char* strerror_r(int, char*, size_t);'
17816 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=B_IBW ;;
17818 case "$strerror_r_proto" in
17819 ''|0) d_strerror_r=undef
17821 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
17822 * ) case "$strerror_r_proto" in
17823 REENTRANT_PROTO*) ;;
17824 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
17826 echo "Prototype: $try" ;;
17829 *) case "$usethreads" in
17830 define) echo "strerror_r has no prototype, not using it." >&4 ;;
17837 *) strerror_r_proto=0
17841 : see if strftime exists
17842 set strftime d_strftime
17845 : see if strlcat exists
17846 set strlcat d_strlcat
17849 : see if strlcpy exists
17850 set strlcpy d_strlcpy
17853 : see if strtod exists
17854 set strtod d_strtod
17857 : see if strtol exists
17858 set strtol d_strtol
17861 : see if strtold exists
17862 set strtold d_strtold
17865 : see if strtoll exists
17866 set strtoll d_strtoll
17869 case "$d_longlong-$d_strtoll" in
17872 Checking whether your strtoll() works okay...
17874 $cat >try.c <<'EOCP'
17877 #define strtoll __strtoll
17880 #define strtoll _strtoll
17883 extern long long int strtoll(char *s, char **, int);
17884 static int bad = 0;
17885 int check(char *s, long long ell, int een) {
17888 gll = strtoll(s, 0, 10);
17889 if (!((gll == ell) && (errno == een)))
17893 check(" 1", 1LL, 0);
17894 check(" 0", 0LL, 0);
17895 check("-1", -1LL, 0);
17896 check("-9223372036854775808", -9223372036854775808LL, 0);
17897 check("-9223372036854775808", -9223372036854775808LL, 0);
17898 check(" 9223372036854775807", 9223372036854775807LL, 0);
17899 check("-9223372036854775808", -9223372036854775808LL, 0);
17900 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
17901 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
17907 if eval $compile; then
17910 ok) echo "Your strtoll() seems to be working okay." ;;
17912 Your strtoll() doesn't seem to be working okay.
17918 echo "(I can't seem to compile the test program--assuming it doesn't)"
17924 : see if strtoq exists
17925 set strtoq d_strtoq
17928 : see if strtoul exists
17929 set strtoul d_strtoul
17932 case "$d_strtoul" in
17935 Checking whether your strtoul() works okay...
17937 $cat >try.c <<'EOCP'
17940 extern unsigned long int strtoul(char *s, char **, int);
17941 static int bad = 0;
17942 void check(char *s, unsigned long eul, int een) {
17945 gul = strtoul(s, 0, 10);
17946 if (!((gul == eul) && (errno == een)))
17950 check(" 1", 1L, 0);
17951 check(" 0", 0L, 0);
17953 case "$longsize" in
17955 $cat >>try.c <<'EOCP'
17956 check("18446744073709551615", 18446744073709551615UL, 0);
17957 check("18446744073709551616", 18446744073709551615UL, ERANGE);
17958 #if 0 /* strtoul() for /^-/ strings is undefined. */
17959 check("-1", 18446744073709551615UL, 0);
17960 check("-18446744073709551614", 2, 0);
17961 check("-18446744073709551615", 1, 0);
17962 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
17963 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
17968 $cat >>try.c <<'EOCP'
17969 check("4294967295", 4294967295UL, 0);
17970 check("4294967296", 4294967295UL, ERANGE);
17971 #if 0 /* strtoul() for /^-/ strings is undefined. */
17972 check("-1", 4294967295UL, 0);
17973 check("-4294967294", 2, 0);
17974 check("-4294967295", 1, 0);
17975 check("-4294967296", 4294967295UL, ERANGE);
17976 check("-4294967297", 4294967295UL, ERANGE);
17981 : Should we write these tests to be more portable by sprintf-ing
17982 : ~0 and then manipulating that char string as input for strtol?
17985 $cat >>try.c <<'EOCP'
17992 if eval $compile; then
17993 case "`$run ./try`" in
17994 ok) echo "Your strtoul() seems to be working okay." ;;
17996 Your strtoul() doesn't seem to be working okay.
18002 echo "(I can't seem to compile the test program--assuming it doesn't)"
18008 : see if strtoull exists
18009 set strtoull d_strtoull
18012 case "$d_longlong-$d_strtoull" in
18015 Checking whether your strtoull() works okay...
18017 $cat >try.c <<'EOCP'
18020 #define strtoull __strtoull
18023 extern unsigned long long int strtoull(char *s, char **, int);
18024 static int bad = 0;
18025 int check(char *s, long long eull, int een) {
18028 gull = strtoull(s, 0, 10);
18029 if (!((gull == eull) && (errno == een)))
18033 check(" 1", 1LL, 0);
18034 check(" 0", 0LL, 0);
18035 check("18446744073709551615", 18446744073709551615ULL, 0);
18036 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
18037 #if 0 /* strtoull() for /^-/ strings is undefined. */
18038 check("-1", 18446744073709551615ULL, 0);
18039 check("-18446744073709551614", 2LL, 0);
18040 check("-18446744073709551615", 1LL, 0);
18041 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
18042 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
18049 if eval $compile; then
18050 case "`$run ./try`" in
18051 ok) echo "Your strtoull() seems to be working okay." ;;
18053 Your strtoull() doesn't seem to be working okay.
18055 d_strtoull="$undef"
18059 echo "(I can't seem to compile the test program--assuming it doesn't)"
18060 d_strtoull="$undef"
18065 : see if strtouq exists
18066 set strtouq d_strtouq
18069 case "$d_strtouq" in
18072 Checking whether your strtouq() works okay...
18074 $cat >try.c <<'EOCP'
18077 extern unsigned long long int strtouq(char *s, char **, int);
18078 static int bad = 0;
18079 void check(char *s, unsigned long long eull, int een) {
18080 unsigned long long gull;
18082 gull = strtouq(s, 0, 10);
18083 if (!((gull == eull) && (errno == een)))
18087 check(" 1", 1LL, 0);
18088 check(" 0", 0LL, 0);
18089 check("18446744073709551615", 18446744073709551615ULL, 0);
18090 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
18091 #if 0 /* strtouq() for /^-/ strings is undefined. */
18092 check("-1", 18446744073709551615ULL, 0);
18093 check("-18446744073709551614", 2LL, 0);
18094 check("-18446744073709551615", 1LL, 0);
18095 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
18096 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
18104 if eval $compile; then
18105 case "`$run ./try`" in
18106 ok) echo "Your strtouq() seems to be working okay." ;;
18108 Your strtouq() doesn't seem to be working okay.
18114 echo "(I can't seem to compile the test program--assuming it doesn't)"
18120 : see if strxfrm exists
18121 set strxfrm d_strxfrm
18124 : see if symlink exists
18125 set symlink d_symlink
18128 : see if syscall exists
18129 set syscall d_syscall
18132 : see if prototype for syscall is available
18134 set d_syscallproto syscall $i_unistd unistd.h
18137 : see if sysconf exists
18138 set sysconf d_sysconf
18141 : see if system exists
18142 set system d_system
18145 : see if tcgetpgrp exists
18146 set tcgetpgrp d_tcgetpgrp
18149 : see if tcsetpgrp exists
18150 set tcsetpgrp d_tcsetpgrp
18153 : see if prototype for telldir is available
18155 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
18158 : see if time exists
18160 if test "X$d_time" = X -o X"$timetype" = X; then
18161 if set time val -f d_time; eval $csym; $val; then
18162 echo 'time() found.' >&4
18164 rp="What is the type returned by time() on this system?"
18165 set time_t timetype long stdio.h sys/types.h
18168 echo 'time() not found, hope that will do.' >&4
18176 : see if timegm exists
18177 set timegm d_timegm
18180 : see if this is a sys/times.h system
18181 set sys/times.h i_systimes
18184 : see if times exists
18186 if set times val -f d_times; eval $csym; $val; then
18187 echo 'times() found.' >&4
18190 case "$i_systimes" in
18191 "$define") inc='sys/times.h';;
18193 rp="What is the type returned by times() on this system?"
18194 set clock_t clocktype long stdio.h sys/types.h $inc
18197 echo 'times() NOT found, hope that will do.' >&4
18202 : see if tmpnam_r exists
18203 set tmpnam_r d_tmpnam_r
18205 case "$d_tmpnam_r" in
18207 hdrs="$i_systypes sys/types.h define stdio.h "
18208 case "$d_tmpnam_r_proto:$usethreads" in
18209 ":define") d_tmpnam_r_proto=define
18210 set d_tmpnam_r_proto tmpnam_r $hdrs
18214 case "$d_tmpnam_r_proto" in
18216 case "$tmpnam_r_proto" in
18217 ''|0) try='char* tmpnam_r(char*);'
18218 ./protochk "$extern_C $try" $hdrs && tmpnam_r_proto=B_B ;;
18220 case "$tmpnam_r_proto" in
18221 ''|0) d_tmpnam_r=undef
18223 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
18224 * ) case "$tmpnam_r_proto" in
18225 REENTRANT_PROTO*) ;;
18226 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
18228 echo "Prototype: $try" ;;
18231 *) case "$usethreads" in
18232 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
18239 *) tmpnam_r_proto=0
18243 : see if truncate exists
18244 set truncate d_truncate
18247 : see if ttyname_r exists
18248 set ttyname_r d_ttyname_r
18250 case "$d_ttyname_r" in
18252 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
18253 case "$d_ttyname_r_proto:$usethreads" in
18254 ":define") d_ttyname_r_proto=define
18255 set d_ttyname_r_proto ttyname_r $hdrs
18259 case "$d_ttyname_r_proto" in
18261 case "$ttyname_r_proto" in
18262 ''|0) try='int ttyname_r(int, char*, size_t);'
18263 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=I_IBW ;;
18265 case "$ttyname_r_proto" in
18266 ''|0) try='int ttyname_r(int, char*, int);'
18267 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=I_IBI ;;
18269 case "$ttyname_r_proto" in
18270 ''|0) try='char* ttyname_r(int, char*, int);'
18271 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=B_IBI ;;
18273 case "$ttyname_r_proto" in
18274 ''|0) d_ttyname_r=undef
18276 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
18277 * ) case "$ttyname_r_proto" in
18278 REENTRANT_PROTO*) ;;
18279 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
18281 echo "Prototype: $try" ;;
18284 *) case "$usethreads" in
18285 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
18292 *) ttyname_r_proto=0
18296 : see if tzname[] exists
18298 if set tzname val -a d_tzname; eval $csym; $val; then
18300 echo 'tzname[] found.' >&4
18303 echo 'tzname[] NOT found.' >&4
18308 : Check if is a multiplatform env
18310 next|rhapsody|darwin) multiarch="$define" ;;
18312 case "$multiarch" in
18313 ''|[nN]*) multiarch="$undef" ;;
18316 : check for ordering of bytes in a UV
18318 case "$usecrosscompile$multiarch" in
18321 You seem to be either cross-compiling or doing a multiarchitecture build,
18322 skipping the byteorder check.
18328 case "$byteorder" in
18331 In the following, larger digits indicate more significance. A big-endian
18332 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
18333 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
18334 machines may have weird orders like 3412. A Cray will report 87654321,
18335 an Alpha will report 12345678. If the test program works the default is
18337 I'm now running the test program...
18341 #$i_stdlib I_STDLIB
18343 #include <stdlib.h>
18345 #include <sys/types.h>
18346 typedef $uvtype UV;
18356 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
18358 u.l = (UV)0x04030201;
18359 for (i = 0; i < $uvsize; i++)
18360 printf("%c", u.c[i]+'0');
18367 if eval $compile && $run ./try > /dev/null; then
18370 [1-4][1-4][1-4][1-4]|12345678|87654321)
18371 echo "(The test program ran ok.)"
18372 echo "byteorder=$dflt"
18375 ????|????????) echo "(The test program ran ok.)" ;;
18376 *) echo "(The test program didn't run right for some reason.)" ;;
18381 (I can't seem to compile the test program. Guessing big-endian...)
18384 case "$xxx_prompt" in
18386 rp="What is the order of bytes in $uvtype?"
18399 : Checking 32bit aligndness
18402 Checking to see whether you can access character data unalignedly...
18404 case "$d_u32align" in
18405 '') $cat >try.c <<EOCP
18407 #$i_stdlib I_STDLIB
18409 #include <stdlib.h>
18411 #define U32 $u32type
18412 #define BYTEORDER 0x$byteorder
18414 #include <signal.h>
18416 $signal_t bletch(int s) { exit(4); }
18419 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
18424 if (sizeof(U32) != 4) {
18425 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
18432 signal(SIGBUS, bletch);
18444 for (i = 0; i < 4; i++) {
18445 up = (U32*)(buf + i);
18446 if (! ((*up == 1 << (8*i)) || /* big-endian */
18447 (*up == 1 << (8*(3-i))) /* little-endian */
18451 printf("read failed (%x)\n", *up);
18457 for (i = 0; i < 4; i++) {
18458 up = (U32*)(buf + i);
18460 if (*up != 0xBeef) {
18461 printf("write failed (%x)\n", *up);
18475 if eval $compile_ok; then
18476 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
18477 $run ./try 2>&1 >/dev/null
18480 You can access character data pretty unalignedly.
18482 d_u32align="$undef"
18485 It seems that you must access character data in an aligned manner.
18487 d_u32align="$define"
18491 rp='Can you access character data at unaligned addresses?'
18495 [yY]*) d_u32align="$undef" ;;
18496 *) d_u32align="$define" ;;
18503 : see if ualarm exists
18504 set ualarm d_ualarm
18507 : see if umask exists
18511 : see if unordered exists
18512 set unordered d_unordered
18515 : see if unsetenv exists
18516 set unsetenv d_unsetenv
18519 : see if usleep exists
18520 set usleep d_usleep
18523 : see if prototype for usleep is available
18525 set d_usleepproto usleep $i_unistd unistd.h
18528 : see if ustat exists
18532 : see if closedir exists
18533 set closedir d_closedir
18536 case "$d_closedir" in
18539 echo "Checking whether closedir() returns a status..." >&4
18541 #$i_dirent I_DIRENT /**/
18542 #$i_sysdir I_SYS_DIR /**/
18543 #$i_sysndir I_SYS_NDIR /**/
18544 #$i_systypes I_SYS_TYPES /**/
18546 #if defined(I_SYS_TYPES)
18547 #include <sys/types.h>
18549 #if defined(I_DIRENT)
18550 #include <dirent.h>
18551 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
18552 #include <sys/dir.h>
18556 #include <sys/ndir.h>
18560 #include <ndir.h> /* may be wrong in the future */
18562 #include <sys/dir.h>
18567 int main() { return closedir(opendir(".")); }
18570 if eval $compile_ok; then
18571 if $run ./try > /dev/null 2>&1 ; then
18572 echo "Yes, it does."
18575 echo "No, it doesn't."
18579 echo "(I can't seem to compile the test program--assuming it doesn't)"
18587 set d_void_closedir
18591 : see if there is a wait4
18595 : see if waitpid exists
18596 set waitpid d_waitpid
18599 : see if wcstombs exists
18600 set wcstombs d_wcstombs
18603 : see if wctomb exists
18604 set wctomb d_wctomb
18607 : see if writev exists
18608 set writev d_writev
18611 : preserve RCS keywords in files with variable substitution, grrr
18616 Revision='$Revision'
18618 : check for alignment requirements
18620 case "$usecrosscompile$multiarch" in
18623 You seem to be either cross-compiling or doing a multiarchitecture build,
18624 skipping the memory alignment check.
18627 case "$alignbytes" in
18628 '') alignbytes=8 ;;
18632 case "$alignbytes" in
18633 '') echo "Checking alignment constraints..." >&4
18634 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
18635 $cat >try.c <<'EOCP'
18636 typedef long double NV;
18639 $cat >try.c <<'EOCP'
18643 $cat >>try.c <<'EOCP'
18651 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
18656 if eval $compile_ok; then
18660 echo "(I can't seem to compile the test program...)"
18663 *) dflt="$alignbytes"
18666 rp="Doubles must be aligned on a how-many-byte boundary?"
18674 : set the base revision
18677 : how do we concatenate cpp tokens here?
18679 echo "Checking to see how your cpp does stuff like concatenate tokens..." >&4
18680 $cat >cpp_stuff.c <<'EOCP'
18681 #define RCAT(a,b)a/**/b
18682 #define ACAT(a,b)a ## b
18686 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
18687 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
18688 echo "Oh! Smells like ANSI's been here." >&4
18689 echo "We can catify or stringify, separately or together!"
18691 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
18692 echo "Ah, yes! The good old days!" >&4
18693 echo "However, in the good old days we don't know how to stringify and"
18694 echo "catify at the same time."
18698 Hmm, I don't seem to be able to concatenate tokens with your cpp.
18699 You're going to have to edit the values of CAT[2-5] in config.h...
18701 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
18705 : see if this is a db.h system
18711 : Check db version.
18713 echo "Checking Berkeley DB version ..." >&4
18719 #include <sys/types.h>
18721 #$i_stdlib I_STDLIB
18723 #include <stdlib.h>
18726 int main(int argc, char *argv[])
18728 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
18729 int Major, Minor, Patch ;
18730 unsigned long Version ;
18731 (void)db_version(&Major, &Minor, &Patch) ;
18733 printf("%d %d %d %d %d %d\n",
18734 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
18735 Major, Minor, Patch);
18738 printf("You have Berkeley DB Version 2 or greater.\n");
18740 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
18741 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
18742 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
18743 Major, Minor, Patch) ;
18745 /* check that db.h & libdb are compatible */
18746 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
18747 printf("db.h and libdb are incompatible.\n") ;
18751 printf("db.h and libdb are compatible.\n") ;
18753 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
18754 + DB_VERSION_PATCH ;
18756 /* needs to be >= 2.3.4 */
18757 if (Version < 2003004) {
18758 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
18759 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
18765 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
18770 printf("You have Berkeley DB Version 1.\n");
18771 exit(0); /* DB version < 2: the coast is clear. */
18773 exit(1); /* <db.h> not Berkeley DB? */
18779 if eval $compile_ok && $run ./try; then
18780 echo 'Looks OK.' >&4
18782 db_version_major=$1
18783 db_version_minor=$2
18784 db_version_patch=$3
18786 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
18790 : Remove db from list of libraries to use
18791 echo "Removing unusable -ldb from library list" >&4
18792 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
18795 echo "libs = $libs" >&4
18805 : Check the return type needed for hash
18807 echo "Checking return type needed for hash for Berkeley DB ..." >&4
18813 #include <sys/types.h>
18816 #ifndef DB_VERSION_MAJOR
18817 u_int32_t hash_cb (ptr, size)
18825 info.hash = hash_cb;
18829 if $cc $ccflags -c try.c >try.out 2>&1 ; then
18830 if $contains warning try.out >>/dev/null 2>&1 ; then
18833 db_hashtype='u_int32_t'
18836 : XXX Maybe we should just give up here.
18837 db_hashtype=u_int32_t
18839 echo "Help: I can't seem to compile the db test program." >&4
18840 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
18843 echo "Your version of Berkeley DB uses $db_hashtype for hash."
18845 *) db_hashtype=u_int32_t
18850 : Check the return type needed for prefix
18852 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
18858 #include <sys/types.h>
18861 #ifndef DB_VERSION_MAJOR
18862 size_t prefix_cb (key1, key2)
18870 info.prefix = prefix_cb;
18874 if $cc $ccflags -c try.c >try.out 2>&1 ; then
18875 if $contains warning try.out >>/dev/null 2>&1 ; then
18876 db_prefixtype='int'
18878 db_prefixtype='size_t'
18881 db_prefixtype='size_t'
18882 : XXX Maybe we should just give up here.
18884 echo "Help: I can't seem to compile the db test program." >&4
18885 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
18888 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
18890 *) db_prefixtype='size_t'
18894 : How can we generate normalized random numbers ?
18896 echo "Looking for a random number function..." >&4
18897 case "$randfunc" in
18899 if set drand48 val -f; eval $csym; $val; then
18901 echo "Good, found drand48()." >&4
18902 elif set random val -f; eval $csym; $val; then
18904 echo "OK, found random()." >&4
18907 echo "Yick, looks like I have to use rand()." >&4
18918 *-Dmy_rand=*|*-Dmy_srand=*)
18919 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
18920 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
18921 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
18922 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
18926 while $test "$cont"; do
18927 rp="Use which function to generate random numbers?"
18929 if $test "$ans" = "$dflt"; then
18935 if set $ans val -f; eval $csym; $val; then
18939 rp="I cannot find function $ans. Use that name anyway?"
18948 case "$randfunc" in
18950 drand01="drand48()"
18956 case "$randbits" in
18958 echo "Checking to see how many bits your $randfunc() function produces..." >&4
18960 #$i_unistd I_UNISTD
18961 #$i_stdlib I_STDLIB
18964 # include <unistd.h>
18967 # include <stdlib.h>
18972 register unsigned long tmp;
18973 register unsigned long max = 0L;
18975 for (i = 1000; i; i--) {
18976 tmp = (unsigned long) $randfunc();
18977 if (tmp > max) max = tmp;
18979 for (i = 0; max; i++)
18985 if eval $compile_ok; then
18989 echo "(I can't seem to compile the test program...)"
18996 rp="How many bits does your $randfunc() function produce?"
19000 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
19001 seedfunc="s$randfunc"
19002 randseedtype=unsigned
19006 rp="How many bits does your $randfunc() function produce?"
19009 seedfunc="s$randfunc"
19010 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
19011 if set $seedfunc val -f; eval $csym; $val; then
19012 echo "(Using $seedfunc() to seed random generator)"
19014 echo "(Warning: no $seedfunc() to seed random generator)"
19017 randseedtype=unsigned
19024 : Determine if this is an EBCDIC system
19026 echo "Determining whether or not we are on an EBCDIC system..." >&4
19027 $cat >try.c <<'EOM'
19030 if ('M'==0xd4) return 0;
19037 if eval $compile_ok; then
19038 if $run ./try; then
19039 echo "You seem to speak EBCDIC." >&4
19042 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
19045 echo "I'm unable to compile the test program." >&4
19046 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
19052 : Check how to flush
19055 Checking how to flush all pending stdio output...
19057 # I only know how to find the first 32 possibly open files on SunOS.
19058 # See also hints/sunos_4_1.sh and util.c --AD
19060 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
19062 $cat >>try.c <<EOCP
19064 #$i_stdlib I_STDLIB
19066 #include <stdlib.h>
19068 #$i_unistd I_UNISTD
19070 # include <unistd.h>
19072 #$d_sysconf HAS_SYSCONF
19073 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
19074 #ifdef HAS_STDIO_STREAM_ARRAY
19075 # define STDIO_STREAM_ARRAY $stdio_stream_array
19080 p = fopen("try.out", "w");
19084 # ifdef TRY_FPRINTF
19088 #ifdef TRY_FFLUSH_NULL
19091 #ifdef TRY_FFLUSH_ALL
19093 long open_max = -1;
19094 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
19095 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
19097 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
19098 open_max = sysconf(_SC_OPEN_MAX);
19101 open_max = FOPEN_MAX;
19104 open_max = OPEN_MAX;
19113 # ifdef HAS_STDIO_STREAM_ARRAY
19114 if (open_max > 0) {
19116 for (i = 0; i < open_max; i++)
19117 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
19118 STDIO_STREAM_ARRAY[i]._file < open_max &&
19119 STDIO_STREAM_ARRAY[i]._flag)
19120 fflush(&STDIO_STREAM_ARRAY[i]);
19128 : first we have to find out how _not_ to flush
19130 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
19132 set try -DTRY_FPUTC
19133 if eval $compile; then
19134 $run ./try 2>/dev/null
19137 if $test ! -s try.out -a "X$code" = X42; then
19143 set try -DTRY_FPRINTF
19144 if eval $compile; then
19145 $run ./try 2>/dev/null
19148 if $test ! -s try.out -a "X$code" = X42; then
19149 output=-DTRY_FPRINTF
19155 : check for fflush NULL behaviour
19156 case "$fflushNULL" in
19157 '') set try -DTRY_FFLUSH_NULL $output
19158 if eval $compile; then
19159 $run ./try 2>/dev/null
19162 if $test -s try.out -a "X$code" = X42; then
19163 fflushNULL="`$cat try.out`"
19165 if $test "X$code" != X42; then
19167 (If this test failed, don't worry, we'll try another method shortly.)
19172 $rm -f core try.core core.try.*
19173 case "$fflushNULL" in
19175 Your fflush(NULL) works okay for output streams.
19176 Let's see if it clobbers input pipes...
19178 # As of mid-March 2000 all versions of Solaris appear to have a stdio
19179 # bug that improperly flushes the input end of pipes. So we avoid the
19180 # autoflush on fork/system/exec support for now. :-(
19181 $cat >tryp.c <<EOCP
19184 main(int argc, char **argv)
19190 while ((i = getc(stdin)) != -1
19191 && (*bp++ = i) != '\n'
19192 && bp < &buf[1024])
19195 fprintf(stdout, "%s", buf);
19203 fflushNULL="$define"
19205 if eval $compile; then
19207 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
19208 if cmp tryp.c tryp.out >/dev/null 2>&1; then
19210 fflush(NULL) seems to behave okay with input streams.
19212 fflushNULL="$define"
19215 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
19217 fflushNULL="$undef"
19220 $rm -f core tryp.c tryp.core core.tryp.*
19223 Your fflush(NULL) isn't working (contrary to ANSI C).
19225 fflushNULL="$undef"
19228 Cannot figure out whether your fflush(NULL) works or not.
19229 I'm assuming it doesn't (contrary to ANSI C).
19231 fflushNULL="$undef"
19235 $define|true|[yY]*)
19236 fflushNULL="$define"
19239 fflushNULL="$undef"
19242 : check explicit looping only if NULL did not work, and if the pipe
19243 : bug does not show up on an explicit flush too
19244 case "$fflushNULL" in
19246 $cat >tryp.c <<EOCP
19249 main(int argc, char **argv)
19255 while ((i = getc(stdin)) != -1
19256 && (*bp++ = i) != '\n'
19257 && bp < &buf[1024])
19260 fprintf(stdout, "%s", buf);
19269 if eval $compile; then
19271 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
19272 if cmp tryp.c tryp.out >/dev/null 2>&1; then
19274 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
19276 : now check for fflushall behaviour
19277 case "$fflushall" in
19278 '') set try -DTRY_FFLUSH_ALL $output
19279 if eval $compile; then
19281 (Now testing the other method--but note that this also may fail.)
19283 $run ./try 2>/dev/null
19286 if $test -s try.out -a "X$code" = X42; then
19287 fflushall="`$cat try.out`"
19291 case "$fflushall" in
19293 Whew. Flushing explicitly all the stdio streams works.
19295 fflushall="$define"
19298 Sigh. Flushing explicitly all the stdio streams doesn't work.
19303 Cannot figure out whether flushing stdio streams explicitly works or not.
19304 I'm assuming it doesn't.
19310 "$define"|true|[yY]*)
19311 fflushall="$define"
19319 All is futile. Even fflush(stdin) clobbers input pipes!
19326 $rm -f core tryp.c tryp.core core.tryp.*
19328 *) fflushall="$undef"
19332 case "$fflushNULL$fflushall" in
19335 OK, I give up. I cannot figure out how to flush pending stdio output.
19336 We won't be flushing handles at all before fork/exec/popen.
19342 : Store the full pathname to the ar program for use in the C program
19343 : Respect a hint or command line value for full_ar.
19348 : Store the full pathname to the sed program for use in the C program
19351 : see what type gids are declared as in the kernel
19353 echo "Looking for the type for group ids returned by getgid()."
19354 set gid_t gidtype xxx stdio.h sys/types.h
19358 xxx=`./findhdr sys/user.h`
19359 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
19361 unsigned) dflt="$1 $2" ;;
19365 *) dflt="$gidtype";;
19368 gid_t) echo "gid_t found." ;;
19369 *) rp="What is the type for group ids returned by getgid()?"
19375 : Check the size of GID
19378 *_t) zzz="$gidtype" ;;
19381 echo "Checking the size of $zzz..." >&4
19383 #include <sys/types.h>
19385 #$i_stdlib I_STDLIB
19387 #include <stdlib.h>
19390 printf("%d\n", (int)sizeof($gidtype));
19395 if eval $compile_ok; then
19399 echo "(I can't execute the test program--guessing $gidsize.)" >&4
19402 echo "Your $zzz is $gidsize bytes long."
19407 echo "(I can't compile the test program--guessing $gidsize.)" >&4
19411 : Check if GID is signed
19414 *_t) zzz="$gidtype" ;;
19417 echo "Checking the sign of $zzz..." >&4
19419 #include <sys/types.h>
19430 if eval $compile; then
19434 echo "(I can't execute the test program--guessing unsigned.)" >&4
19438 1) echo "Your $zzz is unsigned." ;;
19439 -1) echo "Your $zzz is signed." ;;
19445 echo "(I can't compile the test program--guessing unsigned.)" >&4
19449 : Check 64bit sizes
19452 if $test X"$quadtype" != X; then
19454 echo "Checking how to print 64-bit integers..." >&4
19456 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
19457 $cat >try.c <<'EOCP'
19458 #include <sys/types.h>
19461 int q = 12345678901;
19462 printf("%ld\n", q);
19466 if eval $compile; then
19470 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
19471 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
19472 echo "We will use %d."
19478 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
19479 $cat >try.c <<'EOCP'
19480 #include <sys/types.h>
19483 long q = 12345678901;
19484 printf("%ld\n", q);
19488 if eval $compile; then
19492 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
19493 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
19494 echo "We will use %ld."
19500 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
19501 $cat >try.c <<'EOCP'
19502 #include <sys/types.h>
19503 #include <inttypes.h>
19506 int64_t q = 12345678901;
19507 printf("%" PRId64 "\n", q);
19511 if eval $compile; then
19515 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
19516 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
19517 echo "We will use the C9X style."
19523 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
19525 #include <sys/types.h>
19528 $quadtype q = 12345678901;
19529 printf("%Ld\n", q);
19533 if eval $compile; then
19537 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
19538 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
19539 echo "We will use %Ld."
19545 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
19546 $cat >try.c <<'EOCP'
19547 #include <sys/types.h>
19550 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
19551 printf("%lld\n", q);
19555 if eval $compile; then
19559 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
19560 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
19561 echo "We will use the %lld style."
19567 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
19569 #include <sys/types.h>
19572 $quadtype q = 12345678901;
19573 printf("%qd\n", q);
19577 if eval $compile; then
19581 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
19582 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
19583 echo "We will use %qd."
19589 if $test X"$sPRId64" = X; then
19590 echo "Cannot figure out how to print 64-bit integers." >&4
19597 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
19598 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
19600 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
19601 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
19605 : Check format strings for internal types
19607 $echo "Checking the format strings to be used for Perl's internal types..." >&4
19609 if $test X"$ivsize" = X8; then
19610 ivdformat="$sPRId64"
19611 uvuformat="$sPRIu64"
19612 uvoformat="$sPRIo64"
19613 uvxformat="$sPRIx64"
19614 uvXUformat="$sPRIXU64"
19616 if $test X"$ivsize" = X"$longsize"; then
19623 if $test X"$ivsize" = X"$intsize"; then
19631 if $test X"$ivsize" = X"$shortsize"; then
19642 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
19643 nveformat="$sPRIeldbl"
19644 nvfformat="$sPRIfldbl"
19645 nvgformat="$sPRIgldbl"
19646 nvEUformat="$sPRIEUldbl"
19647 nvFUformat="$sPRIFUldbl"
19648 nvGUformat="$sPRIGUldbl"
19658 case "$ivdformat" in
19659 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
19664 : Check format string for GID
19667 $echo "Checking the format string to be used for gids..." >&4
19670 -1) if $test X"$gidsize" = X"$ivsize"; then
19671 gidformat="$ivdformat"
19673 if $test X"$gidsize" = X"$longsize"; then
19676 if $test X"$gidsize" = X"$intsize"; then
19679 if $test X"$gidsize" = X"$shortsize"; then
19686 *) if $test X"$gidsize" = X"$uvsize"; then
19687 gidformat="$uvuformat"
19689 if $test X"$gidsize" = X"$longsize"; then
19692 if $test X"$gidsize" = X"$intsize"; then
19695 if $test X"$gidsize" = X"$shortsize"; then
19704 : see if getgroups exists
19705 set getgroups d_getgrps
19708 : see if setgroups exists
19709 set setgroups d_setgrps
19712 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
19714 case "$d_getgrps$d_setgrps" in
19716 case "$groupstype" in
19717 '') dflt="$gidtype" ;;
19718 *) dflt="$groupstype" ;;
19721 What type of pointer is the second argument to getgroups() and setgroups()?
19722 Usually this is the same as group ids, $gidtype, but not always.
19725 rp='What type pointer is the second argument to getgroups() and setgroups()?'
19729 *) groupstype="$gidtype";;
19732 : MAD = Misc Attribute Definition
19734 if $test $patchlevel -lt 9; then
19735 : MAD is not available in 5.8.x or earlier.
19739 $define|true|[yY]*) dflt='y' ;;
19744 Would you like to build with Misc Attribute Decoration? This is development
19745 work leading to a Perl 5 to Perl 6 convertor, which imposes a space and speed
19746 overhead on the interpreter.
19748 If this doesn't make any sense to you, just accept the default '$dflt'.
19750 rp='Build Perl with MAD?'
19755 madlyh='madly.h madly.act madly.tab'
19757 madlyobj="madly$_o" ;;
19766 : check whether make sets MAKE
19768 echo "Checking if your $make program sets \$(MAKE)..." >&4
19769 case "$make_set_make" in
19771 $sed 's/^X //' > testmake.mak << 'EOF'
19773 X @echo 'maketemp="$(MAKE)"'
19775 case "`$make -f testmake.mak 2>/dev/null`" in
19776 *maketemp=*) make_set_make='#' ;;
19777 *) make_set_make="MAKE=$make" ;;
19779 $rm -f testmake.mak
19782 case "$make_set_make" in
19783 '#') echo "Yup, it does.";;
19784 *) echo "Nope, it doesn't.";;
19787 : see what type is used for mode_t
19788 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
19789 set mode_t modetype int stdio.h sys/types.h
19792 : see if we need va_copy
19794 case "$i_stdarg" in
19797 #include <stdarg.h>
19799 #$i_stdlib I_STDLIB
19801 #include <stdlib.h>
19803 #include <signal.h>
19806 ivfprintf(FILE *f, const char *fmt, va_list *valp)
19808 return vfprintf(f, fmt, *valp);
19812 myvfprintf(FILE *f, const char *fmt, va_list val)
19814 return ivfprintf(f, fmt, &val);
19818 myprintf(char *fmt, ...)
19821 va_start(val, fmt);
19822 return myvfprintf(stdout, fmt, val);
19826 main(int ac, char **av)
19828 signal(SIGSEGV, exit);
19830 myprintf("%s%cs all right, then\n", "that", '\'');
19835 if eval $compile && $run ./try 2>&1 >/dev/null; then
19836 case "`$run ./try`" in
19837 "that's all right, then")
19843 yes) echo "It seems that you don't need va_copy()." >&4
19844 need_va_copy="$undef"
19846 *) echo "It seems that va_copy() or similar will be needed." >&4
19847 need_va_copy="$define"
19852 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
19856 : see what type is used for size_t
19857 rp="What is the type used for the length parameter for string functions?"
19858 set size_t sizetype 'unsigned int' stdio.h sys/types.h
19861 : check for type of arguments to gethostbyaddr.
19862 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
19863 case "$d_gethbyaddr" in
19867 Checking to see what type of arguments are accepted by gethostbyaddr().
19869 hdrs="$define sys/types.h
19870 $d_socket sys/socket.h
19871 $i_niin netinet/in.h
19873 $i_unistd unistd.h"
19874 : The first arg can 'char *' or 'void *'
19875 : The second arg is some of integral type
19876 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
19877 for yyy in size_t long int; do
19878 case "$netdb_host_type" in
19879 '') try="$extern_C struct hostent *gethostbyaddr($xxx, $yyy, int);"
19880 if ./protochk "$try" $hdrs; then
19881 echo "Your system accepts $xxx for the first arg."
19882 echo "...and $yyy for the second arg."
19883 netdb_host_type="$xxx"
19884 netdb_hlen_type="$yyy"
19890 : In case none of those worked, prompt the user.
19891 case "$netdb_host_type" in
19892 '') rp='What is the type for the 1st argument to gethostbyaddr?'
19895 netdb_host_type=$ans
19896 rp='What is the type for the 2nd argument to gethostbyaddr?'
19899 netdb_hlen_type=$ans
19903 *) : no gethostbyaddr, so pick harmless defaults
19904 netdb_host_type='char *'
19905 netdb_hlen_type="$sizetype"
19908 # Remove the "const" if needed. -- but then we'll have a
19910 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
19913 : check for type of argument to gethostbyname.
19914 if test "X$netdb_name_type" = X ; then
19915 case "$d_gethbyname" in
19919 Checking to see what type of argument is accepted by gethostbyname().
19921 hdrs="$define sys/types.h
19922 $d_socket sys/socket.h
19923 $i_niin netinet/in.h
19925 $i_unistd unistd.h"
19926 for xxx in "const char *" "char *"; do
19927 case "$netdb_name_type" in
19928 '') try="$extern_C struct hostent *gethostbyname($xxx);"
19929 if ./protochk "$try" $hdrs; then
19930 echo "Your system accepts $xxx."
19931 netdb_name_type="$xxx"
19936 : In case none of those worked, prompt the user.
19937 case "$netdb_name_type" in
19938 '') rp='What is the type for the 1st argument to gethostbyname?'
19941 netdb_name_type=$ans
19945 *) : no gethostbyname, so pick harmless default
19946 netdb_name_type='char *'
19951 : check for type of 1st argument to getnetbyaddr.
19952 if test "X$netdb_net_type" = X ; then
19953 case "$d_getnbyaddr" in
19957 Checking to see what type of 1st argument is accepted by getnetbyaddr().
19959 hdrs="$define sys/types.h
19960 $d_socket sys/socket.h
19961 $i_niin netinet/in.h
19963 $i_unistd unistd.h"
19964 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
19965 case "$netdb_net_type" in
19966 '') try="$extern_C struct netent *getnetbyaddr($xxx, int);"
19967 if ./protochk "$try" $hdrs; then
19968 echo "Your system accepts $xxx."
19969 netdb_net_type="$xxx"
19974 : In case none of those worked, prompt the user.
19975 case "$netdb_net_type" in
19976 '') rp='What is the type for the 1st argument to getnetbyaddr?'
19979 netdb_net_type=$ans
19983 *) : no getnetbyaddr, so pick harmless default
19984 netdb_net_type='long'
19988 : locate the preferred pager for this system
19995 [a-zA-Z]:/*) dflt=$pg;;
19999 [a-zA-Z]:/*) dflt=$more;;
20003 [a-zA-Z]:/*) dflt=$less;;
20006 '') dflt=/usr/ucb/more;;
20014 rp='What pager is used on your system?'
20018 : see what type pids are declared as in the kernel
20019 rp="What is the type of process ids on this system?"
20020 set pid_t pidtype int stdio.h sys/types.h
20023 : see if ar generates random libraries by itself
20025 echo "Checking how to generate random libraries on your machine..." >&4
20026 echo 'int bar1() { return bar2(); }' > bar1.c
20027 echo 'int bar2() { return 2; }' > bar2.c
20029 #$i_stdlib I_STDLIB
20031 #include <stdlib.h>
20033 int main() { printf("%d\n", bar1()); exit(0); }
20035 $cc $ccflags -c bar1.c >/dev/null 2>&1
20036 $cc $ccflags -c bar2.c >/dev/null 2>&1
20037 $cc $ccflags -c foo.c >/dev/null 2>&1
20038 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
20039 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
20040 $run ./foobar >/dev/null 2>&1; then
20041 echo "$ar appears to generate random libraries itself."
20043 if [ "X$ranlib" = "X" ]; then
20046 elif $ar s bar$_a >/dev/null 2>&1 &&
20047 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
20048 $run ./foobar >/dev/null 2>&1; then
20049 echo "a table of contents needs to be added with '$ar s'."
20052 elif $ar ts bar$_a >/dev/null 2>&1 &&
20053 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
20054 $run ./foobar >/dev/null 2>&1; then
20055 echo "a table of contents needs to be added with '$ar ts'."
20062 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
20063 $test -f $ranlib || ranlib=''
20066 if $test -n "$ranlib"; then
20067 echo "your system has '$ranlib'; we'll use that."
20070 echo "your system doesn't seem to support random libraries"
20071 echo "so we'll use lorder and tsort to order the libraries."
20078 : see if this is a values.h system
20079 set values.h i_values
20082 : Check the max offset that gmtime and localtime accept
20083 echo "Checking max offsets that gmtime () accepts"
20086 define) yyy="#include <values.h>" ;;
20090 case "$sGMTIME_min/$sGMTIME_max" in
20093 #include <sys/types.h>
20102 void gm_check (time_t t, int min_year, int max_year)
20105 if ( tmp == NULL ||
20106 /* Check tm_year overflow */
20107 tmp->tm_year < min_year || tmp->tm_year > max_year)
20118 gm_check (MAXLONG, 69, 0x7fffffff);
20120 if (tmp == NULL || tmp->tm_year < 0) {
20121 for (i = 63; i >= 0; i--) {
20122 time_t x = pt | ((time_t)1 << i);
20123 if (x < 0 || x < pt) continue;
20124 gm_check (x, 69, 0x7fffffff);
20127 printf ("sGMTIME_max=%ld\n", pt);
20136 gm_check (MINLONG, -1900, 70);
20139 for (i = 36; i >= 0; i--) {
20140 time_t x = pt - ((time_t)1 << i);
20141 if (x > 0) continue;
20142 gm_check (x, -1900, 70);
20145 printf ("sGMTIME_min=%ld\n", pt);
20149 int main (int argc, char *argv[])
20151 fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t));
20158 if eval $compile; then
20161 echo "Cannot determine sGMTIME_max and sGMTIME_min." >&4
20167 echo "Checking max offsets that localtime () accepts"
20169 case "$sLOCALTIME_min/$sLOCALTIME_max" in
20172 #include <sys/types.h>
20181 void local_check (time_t t, int min_year, int max_year)
20183 if (sizeof (time_t) > 4 && t > 0x7ffffffffffff000LL)
20186 tmp = localtime (&t);
20187 if ( tmp == NULL ||
20188 /* Check tm_year overflow */
20189 tmp->tm_year < min_year || tmp->tm_year > max_year)
20193 } /* local_check */
20200 local_check (MAXLONG, 69, 0x7fffffff);
20202 if (tmp == NULL || tmp->tm_year < 0) {
20203 for (i = 63; i >= 0; i--) {
20204 time_t x = pt | ((time_t)1 << i);
20205 if (x < 0 || x < pt) continue;
20206 local_check (x, 69, 0x7fffffff);
20209 printf ("sLOCALTIME_max=%ld\n", pt);
20218 local_check (MINLONG, -1900, 70);
20221 for (i = 36; i >= 0; i--) {
20222 time_t x = pt - ((time_t)1 << i);
20223 if (x > 0) continue;
20224 local_check (x, -1900, 70);
20227 printf ("sLOCALTIME_min=%ld\n", pt);
20231 int main (int argc, char *argv[])
20239 if eval $compile; then
20242 echo "Cannot determine sLOCALTIME_max and sLOCALTIME_min." >&4
20248 : check for type of arguments to select.
20249 case "$selecttype" in
20250 '') case "$d_select" in
20254 Checking to see what type of arguments are accepted by select().
20256 hdrs="$define sys/types.h
20257 $i_systime sys/time.h
20258 $i_sysselct sys/select.h
20259 $d_socket sys/socket.h"
20260 : The first arg can be int, unsigned, or size_t
20261 : The last arg may or may not be 'const'
20263 : void pointer has been seen but using that
20264 : breaks the selectminbits test
20265 for xxx in 'fd_set *' 'int *'; do
20266 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
20267 for tmo in 'struct timeval *' 'const struct timeval *'; do
20269 '') try="$extern_C select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
20270 if ./protochk "$try" $hdrs; then
20271 echo "Your system accepts $xxx."
20280 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
20281 case "$d_fd_set" in
20282 $define) dflt="fd_set *" ;;
20291 *) : no select, so pick a harmless default
20298 : check for the select 'width'
20299 case "$selectminbits" in
20300 '') safebits=`expr $ptrsize \* 8`
20301 case "$d_select" in
20305 Checking to see on how many bits at a time your select() operates...
20308 #include <sys/types.h>
20310 #$i_systime I_SYS_TIME
20311 #$i_systimek I_SYS_TIME_KERNEL
20316 # ifdef I_SYS_TIME_KERNEL
20319 # include <sys/time.h>
20320 # ifdef I_SYS_TIME_KERNEL
20324 #$i_sysselct I_SYS_SELECT
20325 #ifdef I_SYS_SELECT
20326 #include <sys/select.h>
20328 #$d_socket HAS_SOCKET
20330 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
20333 #$i_stdlib I_STDLIB
20335 #include <stdlib.h>
20338 #define S sizeof(*(b))
20340 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
20341 #define NBITS (NBYTES * 8)
20343 char *s = (char *)malloc(NBYTES);
20352 fp = fopen("try.c", "r");
20358 b = ($selecttype)s;
20359 for (i = 0; i < NBITS; i++)
20363 select(fd + 1, b, 0, 0, &t);
20364 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
20366 printf("%d\n", i + 1);
20371 if eval $compile_ok; then
20372 selectminbits=`$run ./try`
20373 case "$selectminbits" in
20375 Cannot figure out on how many bits at a time your select() operates.
20376 I'll play safe and guess it is $safebits bits.
20378 selectminbits=$safebits
20379 bits="$safebits bits"
20382 *) bits="$selectminbits bits" ;;
20384 echo "Your select() operates on $bits at a time." >&4
20386 rp='What is the minimum number of bits your select() operates on?'
20387 case "$byteorder" in
20388 12345678) dflt=64 ;;
20394 selectminbits="$val"
20398 *) : no select, so pick a harmless default
20399 selectminbits=$safebits
20405 : Trace out the files included by signal.h, then look for SIGxxx names.
20406 if [ "X$fieldn" = X ]; then
20407 : Just make some guesses. We check them later.
20408 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
20410 xxx=`echo '#include <signal.h>' |
20411 $cppstdin $cppminus $cppflags 2>/dev/null |
20412 $grep '^[ ]*#.*include' |
20413 $awk "{print \\$$fieldn}" | $sed 's!"!!g' |\
20414 $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
20417 for xx in $xxx /dev/null ; do
20418 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
20420 case "$xxxfiles" in
20421 '') xxxfiles=`./findhdr signal.h` ;;
20424 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
20425 print substr($2, 4, 20)
20427 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
20428 print substr($3, 4, 20)
20430 : Append some common names just in case the awk scan failed.
20431 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
20432 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
20433 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
20434 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
20435 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
20437 : generate a few handy files for later
20438 $cat > signal.c <<EOCP
20439 #include <sys/types.h>
20440 #include <signal.h>
20441 #$i_stdlib I_STDLIB
20443 #include <stdlib.h>
20448 /* Strange style to avoid deeply-nested #if/#else/#endif */
20451 # define NSIG (_NSIG)
20457 # define NSIG (SIGMAX+1)
20463 # define NSIG (SIG_MAX+1)
20469 # define NSIG (_SIG_MAX+1)
20475 # define NSIG (MAXSIG+1)
20481 # define NSIG (MAX_SIG+1)
20486 # ifdef SIGARRAYSIZE
20487 # define NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */
20493 # define NSIG (_sys_nsig) /* Solaris 2.5 */
20497 /* Default to some arbitrary number that's big enough to get most
20498 of the common signals.
20504 printf("NSIG %d\n", NSIG);
20510 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
20512 printf "#ifdef SIG"; printf $1; printf "\n"
20513 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
20514 printf $1; printf ");\n"
20518 printf "#endif /* JUST_NSIG */\n";
20519 printf "exit(0);\n}\n";
20522 $cat >signal.awk <<'EOP'
20523 BEGIN { ndups = 0 }
20524 $1 ~ /^NSIG$/ { nsig = $2 }
20525 ($1 !~ /^NSIG$/) && (NF == 2) && ($2 ~ /^[0-9][0-9]*$/) {
20526 if ($2 > maxsig) { maxsig = $2 }
20527 if (sig_name[$2]) {
20528 dup_name[ndups] = $1
20529 dup_num[ndups] = $2
20541 printf("NSIG %d\n", nsig);
20542 for (n = 1; n < nsig; n++) {
20544 printf("%s %d\n", sig_name[n], sig_num[n])
20547 printf("NUM%d %d\n", n, n)
20550 for (n = 0; n < ndups; n++) {
20551 printf("%s %d\n", dup_name[n], dup_num[n])
20555 $cat >signal_cmd <<EOS
20557 if $test -s signal.lst; then
20558 echo "Using your existing signal.lst file"
20563 $cat >>signal_cmd <<'EOS'
20566 if eval $compile_ok; then
20567 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) |\
20568 $uniq | $awk -f signal.awk >signal.lst
20570 echo "(I can't seem be able to compile the whole test program)" >&4
20571 echo "(I'll try it in little pieces.)" >&4
20572 set signal -DJUST_NSIG
20573 if eval $compile_ok; then
20574 $run ./signal$_exe > signal.nsg
20577 echo "I can't seem to figure out how many signals you have." >&4
20578 echo "Guessing 50." >&4
20579 echo 'NSIG 50' > signal.nsg
20581 : Now look at all the signal names, one at a time.
20582 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
20583 $cat > signal.c <<EOCP
20584 #include <sys/types.h>
20585 #include <signal.h>
20588 printf("$xx %d\n", SIG${xx});
20593 if eval $compile; then
20594 echo "SIG${xx} found."
20595 $run ./signal$_exe >> signal.ls1
20597 echo "SIG${xx} NOT found."
20600 if $test -s signal.ls1; then
20601 $cat signal.nsg signal.ls1 |
20602 $sort -n | $uniq | $awk -f signal.awk >signal.lst
20606 if $test -s signal.lst; then
20609 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
20610 echo 'kill -l' >signal
20611 set X `csh -f <signal`
20615 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
20617 echo $@ | $tr ' ' $trnl | \
20618 $awk '{ printf "%s %d\n", $1, ++s; }
20619 END { printf "NSIG %d\n", ++s }' >signal.lst
20621 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
20623 chmod a+x signal_cmd
20624 $eunicefix signal_cmd
20626 : generate list of signal names
20628 case "$sig_name_init" in
20630 *) case "$sig_num_init" in
20631 ''|*,*) doinit=yes ;;
20636 echo "Generating a list of signal names and numbers..." >&4
20638 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
20639 sig_name=`$awk 'BEGIN { printf "ZERO " }
20640 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
20641 sig_num=`$awk 'BEGIN { printf "0 " }
20642 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
20643 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
20644 !/^NSIG/ { printf "\"%s\", ", $1 }
20645 END { printf "0\n" }' signal.lst`
20646 sig_num_init=`$awk 'BEGIN { printf "0, " }
20647 !/^NSIG/ { printf "%d, ", $2}
20648 END { printf "0\n"}' signal.lst`
20651 echo "The following $sig_count signals are available:"
20653 echo $sig_name | $awk \
20654 'BEGIN { linelen = 0 }
20656 for (i = 1; i <= NF; i++) {
20657 name = "SIG" $i " "
20658 linelen = linelen + length(name)
20659 if (linelen > 70) {
20661 linelen = length(name)
20667 sig_size=`echo $sig_name | awk '{print NF}'`
20668 $rm -f signal signal.c signal.awk signal.lst signal_cmd
20670 : Check size of size
20672 case "$sizetype" in
20673 *_t) zzz="$sizetype" ;;
20674 *) zzz="filesize" ;;
20676 echo "Checking the size of $zzz..." >&4
20678 #include <sys/types.h>
20680 #$i_stdlib I_STDLIB
20682 #include <stdlib.h>
20685 printf("%d\n", (int)sizeof($sizetype));
20690 if eval $compile_ok; then
20694 echo "(I can't execute the test program--guessing $sizesize.)" >&4
20697 echo "Your $zzz size is $sizesize bytes."
20702 echo "(I can't compile the test program--guessing $sizesize.)" >&4
20706 : check for socklen_t
20708 echo "Checking to see if you have socklen_t..." >&4
20710 #include <sys/types.h>
20711 #$d_socket HAS_SOCKET
20713 #include <sys/socket.h>
20715 int main() { socklen_t x = 16; }
20718 if eval $compile; then
20720 echo "You have socklen_t."
20723 echo "You do not have socklen_t."
20724 case "$sizetype" in
20725 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
20732 : see if this is a socks.h system
20733 set socks.h i_socks
20736 : check for type of the size argument to socket calls
20737 case "$d_socket" in
20741 Checking to see what type is the last argument of accept().
20744 case "$d_socklen_t" in
20745 "$define") yyy="$yyy socklen_t"
20747 yyy="$yyy $sizetype int long unsigned"
20748 for xxx in $yyy; do
20749 case "$socksizetype" in
20750 '') try="$extern_C int accept(int, struct sockaddr *, $xxx *);"
20751 case "$usesocks" in
20753 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
20754 echo "Your system accepts '$xxx *' for the last argument of accept()."
20755 socksizetype="$xxx"
20758 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
20759 echo "Your system accepts '$xxx *' for the last argument of accept()."
20760 socksizetype="$xxx"
20767 : In case none of those worked, prompt the user.
20768 case "$socksizetype" in
20769 '') rp='What is the type for socket address structure sizes?'
20776 *) : no sockets, so pick relatively harmless default
20781 : see what type is used for signed size_t
20782 set ssize_t ssizetype int stdio.h sys/types.h
20787 #$i_stdlib I_STDLIB
20789 #include <stdlib.h>
20791 #include <sys/types.h>
20792 #define Size_t $sizetype
20793 #define SSize_t $dflt
20796 if (sizeof(Size_t) == sizeof(SSize_t))
20798 else if (sizeof(Size_t) == sizeof(int))
20807 if eval $compile_ok && $run ./try > /dev/null; then
20808 ssizetype=`$run ./try`
20809 echo "I'll be using $ssizetype for functions returning a byte count." >&4
20812 Help! I can't compile and run the ssize_t test program: please enlighten me!
20813 (This is probably a misconfiguration in your system or libraries, and
20814 you really ought to fix it. Still, I'll try anyway.)
20816 I need a type that is the same size as $sizetype, but is guaranteed to
20817 be signed. Common values are ssize_t, int and long.
20820 rp="What signed type is the same size as $sizetype?"
20826 : see what type of char stdio uses.
20828 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
20829 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
20830 echo "Your stdio uses unsigned chars." >&4
20831 stdchar="unsigned char"
20833 echo "Your stdio uses signed chars." >&4
20838 : see what type uids are declared as in the kernel
20840 echo "Looking for the type for user ids returned by getuid()."
20841 set uid_t uidtype xxx stdio.h sys/types.h
20845 xxx=`./findhdr sys/user.h`
20846 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
20848 unsigned) dflt="$1 $2" ;;
20852 *) dflt="$uidtype";;
20855 uid_t) echo "uid_t found." ;;
20856 *) rp="What is the type for user ids returned by getuid()?"
20862 : Check size of UID
20865 *_t) zzz="$uidtype" ;;
20868 echo "Checking the size of $zzz..." >&4
20870 #include <sys/types.h>
20872 #$i_stdlib I_STDLIB
20874 #include <stdlib.h>
20877 printf("%d\n", (int)sizeof($uidtype));
20882 if eval $compile_ok; then
20886 echo "(I can't execute the test program--guessing $uidsize.)" >&4
20889 echo "Your $zzz is $uidsize bytes long."
20894 echo "(I can't compile the test program--guessing $uidsize.)" >&4
20897 : Check if UID is signed
20900 *_t) zzz="$uidtype" ;;
20903 echo "Checking the sign of $zzz..." >&4
20905 #include <sys/types.h>
20916 if eval $compile; then
20920 echo "(I can't execute the test program--guessing unsigned.)" >&4
20924 1) echo "Your $zzz is unsigned." ;;
20925 -1) echo "Your $zzz is signed." ;;
20931 echo "(I can't compile the test program--guessing unsigned.)" >&4
20935 : Check format string for UID
20937 $echo "Checking the format string to be used for uids..." >&4
20940 -1) if $test X"$uidsize" = X"$ivsize"; then
20941 uidformat="$ivdformat"
20943 if $test X"$uidsize" = X"$longsize"; then
20946 if $test X"$uidsize" = X"$intsize"; then
20949 if $test X"$uidsize" = X"$shortsize"; then
20956 *) if $test X"$uidsize" = X"$uvsize"; then
20957 uidformat="$uvuformat"
20959 if $test X"$uidsize" = X"$longsize"; then
20962 if $test X"$uidsize" = X"$intsize"; then
20965 if $test X"$uidsize" = X"$shortsize"; then
20974 : Check if site customization support was requested
20975 case "$usesitecustomize" in
20976 $define|true|[Yy]*)
20977 usesitecustomize="$define"
20980 usesitecustomize="$undef"
20984 : determine compiler compiler
20993 if $test -f "$byacc$_exe"; then
20995 comp="byacc or $comp"
20997 if $test -f "$bison$_exe"; then
20998 comp="$comp or bison -y"
21000 rp="Which compiler compiler ($comp) shall I use?"
21009 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
21015 : see if this is a assert.h system
21016 set assert.h i_assert
21019 : see if this is a fp.h system
21023 : see if this is a fp_class.h system
21024 set fp_class.h i_fp_class
21027 : see if gdbm.h is available
21032 : see if gdbm_open exists
21033 set gdbm_open d_gdbm_open
21035 case "$d_gdbm_open" in
21038 echo "We won't be including <gdbm.h>"
21047 : see if ndbm.h is available
21050 : Compatibility location for RedHat 7.1
21051 set gdbm/ndbm.h i_gdbmndbm
21053 : Compatibility location for Debian 4.0
21054 set gdbm-ndbm.h i_gdbm_ndbm
21057 if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then
21058 : see if dbm_open exists
21059 set dbm_open d_dbm_open
21061 case "$d_dbm_open" in
21064 i_gdbmndbm="$undef"
21065 i_gdbm_ndbm="$undef"
21066 echo "We won't be including <ndbm.h>"
21076 : see if this is a ieeefp.h system
21077 case "$i_ieeefp" in
21078 '' ) set ieeefp.h i_ieeefp
21083 : see if this is a libutil.h system
21084 set libutil.h i_libutil
21087 : see if mach cthreads are available
21088 if test "X$usethreads" = "X$define"; then
21089 set mach/cthreads.h i_machcthr
21092 i_machcthr="$undef"
21095 : see if this is a mntent.h system
21096 set mntent.h i_mntent
21099 : see if net/errno.h is available
21101 set net/errno.h val
21104 : Unfortunately, it causes problems on some systems. Arrgh.
21107 cat > try.c <<'EOM'
21110 #include <net/errno.h>
21116 if $cc $ccflags -c try.c >/dev/null 2>&1; then
21117 echo "We'll be including <net/errno.h>." >&4
21119 echo "We won't be including <net/errno.h>." >&4
21128 : see if netinet/tcp.h is available
21129 set netinet/tcp.h i_netinettcp
21132 : see if this is a poll.h system
21136 : see if this is a prot.h system
21140 : Preprocessor symbols
21142 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
21143 $cat <<'EOSH' > Cppsym.know
21144 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
21145 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
21146 alliant alpha am29000 AM29000 AMD64 amd64 amiga AMIGAOS AMIX
21147 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
21148 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
21149 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
21150 bull c cadmus clipper CMU COFF COMPILER_VERSION
21151 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
21152 CYGWIN DECC DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
21153 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
21154 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
21156 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
21157 H3050R H3050RX hbullx20 hcx host_mips
21158 hp200 hp300 hp700 HP700 hp800 hp9000
21159 hp9000s200 hp9000s300 hp9000s400 hp9000s500
21160 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
21161 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
21162 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
21163 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
21164 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
21165 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
21166 LIBCATAMOUNT Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
21167 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
21168 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
21169 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
21170 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
21171 MATH_HAS_NO_SIDE_EFFECTS
21172 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
21173 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
21174 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
21175 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
21176 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
21177 NetBSD news1500 news1700 news1800 news1900 news3700
21178 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
21179 ns32016 ns32332 ns32k nsc32000
21180 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
21181 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
21182 pc532 pdp11 PGC PIC plexus PORTAR posix
21183 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
21184 POSIX_C_SOURCE POSIX_SOURCE POWER
21185 PROTOTYPES PWB pyr QNX QK_USER R3000 REENTRANT RES Rhapsody RISC6000
21186 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
21187 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
21188 sony sony_news sonyrisc sparc sparclite spectrum
21189 stardent stdc STDC_EXT stratos sun sun3 sun386
21190 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
21191 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
21192 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
21193 sysV68 sysV88 Tek4132 Tek4300 titan
21194 TM3200 TM5400 TM5600
21195 tower tower32 tower32_200 tower32_600 tower32_700
21196 tower32_800 tower32_850 tss
21197 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
21198 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
21199 unix UNIX95 UNIX99 unixpc unos
21200 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
21201 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
21202 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
21204 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms x86_64 xenix Xenix286
21205 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
21206 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
21209 # Maybe put other stuff here too.
21210 cat <<EOSH >>Cppsym.know
21213 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
21214 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
21215 $cat Cppsym.know > Cppsym.c
21216 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
21217 $rm -f Cppsym.a Cppsym.b Cppsym.c
21218 cat <<EOSH > Cppsym
21220 if $test \$# -gt 0; then
21221 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
21222 if $test -s Cppsym.got; then
21229 $tr " " "$trnl" | ./Cppsym.try
21235 cat <<EOSH > Cppsym.try
21237 cat <<'EOCP' > try.c
21240 #define STRINGIFY(a) "a"
21242 #if cpp_stuff == 42
21243 #define StGiFy(a) #a
21244 #define STRINGIFY(a) StGiFy(a)
21246 #if $cpp_stuff != 1 && $cpp_stuff != 42
21247 # include "Bletch: How does this C preprocessor stringify macros?"
21253 cat <<'EOSH' >> Cppsym.try
21255 printf "#ifdef %s\nprintf(\"%s=%%s\\n\", STRINGIFY(%s));\n#endif\n", $1, $1, $1
21256 printf "#ifdef _%s\nprintf(\"_%s=%%s\\n\", STRINGIFY(_%s));\n#endif\n", $1, $1, $1
21257 printf "#ifdef __%s\nprintf(\"__%s=%%s\\n\", STRINGIFY(__%s));\n#endif\n", $1, $1, $1
21258 printf "#ifdef __%s__\nprintf(\"__%s__=%%s\\n\", STRINGIFY(__%s__));\n#endif\n", $1, $1, $1
21260 echo 'return 0;}' >> try.c
21262 cat <<EOSH >> Cppsym.try
21264 case "$osname-$gccversion" in
21265 irix-) ccflags="\$ccflags -woff 1178" ;;
21266 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
21268 $cc -o try -Dcpp_stuff=$cpp_stuff $optimize \$ccflags $ldflags try.c $libs && $run ./try | $sed 's/ /\\\\ /g'
21270 chmod +x Cppsym.try
21271 $eunicefix Cppsym.try
21272 ./Cppsym < Cppsym.know > Cppsym.true
21273 : Add in any linux cpp "predefined macros":
21274 case "$osname::$gccversion" in
21277 rm -f $tHdrH'.h' $tHdrH
21279 if cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
21280 sed 's/#define[\ \ ]*//;s/[\ \ ].*$//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
21281 if [ -s $tHdrH'_cppsym.real' ]; then
21282 cat $tHdrH'_cppsym.real' Cppsym.know | sort | uniq | ./Cppsym | sort | uniq > Cppsym.true
21285 rm -f $tHdrH'.h' $tHdrH'_cppsym.h' $tHdrH'_cppsym.real'
21288 : now check the C compiler for additional symbols
21289 postprocess_cc_v=''
21291 aix) postprocess_cc_v="|$tr , ' '" ;;
21298 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
21301 -D*) echo "\$i" | $sed 's/^-D//';;
21302 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
21307 postprocess_cc_v=''
21310 ./ccsym > ccsym1.raw
21311 if $test -s ccsym1.raw; then
21312 $sort ccsym1.raw | $uniq >ccsym.raw
21314 mv ccsym1.raw ccsym.raw
21317 $awk '/\=/ { print $0; next }
21318 { print $0"=1" }' ccsym.raw >ccsym.list
21319 $comm -13 Cppsym.true ccsym.list >ccsym.own
21320 $comm -12 Cppsym.true ccsym.list >ccsym.com
21321 $comm -23 Cppsym.true ccsym.list >ccsym.cpp
21323 if $test -z ccsym.raw; then
21324 echo "Your C compiler doesn't seem to define any symbols!" >&4
21326 echo "However, your C preprocessor defines the following symbols:"
21329 cppsymbols=`$cat Cppsym.true`
21330 cppsymbols=`echo $cppsymbols`
21331 cppccsymbols="$cppsymbols"
21333 if $test -s ccsym.com; then
21334 echo "Your C compiler and pre-processor define these symbols:"
21335 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
21338 cppccsymbols=`$cat ccsym.com`
21339 cppccsymbols=`echo $cppccsymbols`
21340 $test "$silent" || sleep 1
21342 if $test -s ccsym.cpp; then
21343 $test "$also" && echo " "
21344 echo "Your C pre-processor ${also}defines the following symbols:"
21345 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
21347 cppsymbols=`$cat ccsym.cpp`
21348 cppsymbols=`echo $cppsymbols`
21349 $test "$silent" || sleep 1
21351 if $test -s ccsym.own; then
21352 $test "$also" && echo " "
21353 echo "Your C compiler ${also}defines the following cpp symbols:"
21354 $sed -e 's/\(..*\)=1/\1/' ccsym.own
21355 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
21356 ccsymbols=`$cat ccsym.own`
21357 ccsymbols=`echo $ccsymbols`
21358 $test "$silent" || sleep 1
21362 : see if this is a termio system
21366 if $test `./findhdr termios.h`; then
21367 set tcsetattr i_termios
21373 "$define") echo "You have POSIX termios.h... good!" >&4;;
21374 *) if ./Cppsym pyr; then
21375 case "`/bin/universe`" in
21376 ucb) if $test `./findhdr sgtty.h`; then
21378 echo "<sgtty.h> found." >&4
21380 echo "System is pyramid with BSD universe."
21381 ./warn "<sgtty.h> not found--you could have problems."
21383 *) if $test `./findhdr termio.h`; then
21385 echo "<termio.h> found." >&4
21387 echo "System is pyramid with USG universe."
21388 ./warn "<termio.h> not found--you could have problems."
21392 if $test `./findhdr termio.h`; then
21393 echo "<termio.h> found." >&4
21395 elif $test `./findhdr sgtty.h`; then
21396 echo "<sgtty.h> found." >&4
21399 ./warn "Neither <termio.h> nor <sgtty.h> found--cross fingers!"
21402 if $test `./findhdr sgtty.h`; then
21403 echo "<sgtty.h> found." >&4
21405 elif $test `./findhdr termio.h`; then
21406 echo "<termio.h> found." >&4
21409 ./warn "Neither <sgtty.h> nor <termio.h> found--cross fingers!"
21413 set i_termio; eval $setvar
21414 val=$val2; set i_sgtty; eval $setvar
21415 val=$val3; set i_termios; eval $setvar
21417 : see if stddef is available
21418 set stddef.h i_stddef
21421 : see if sys/access.h is available
21422 set sys/access.h i_sysaccess
21425 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
21426 set sys/filio.h i_sysfilio
21429 if $test `./findhdr sys/ioctl.h`; then
21431 echo '<sys/ioctl.h> found.' >&4
21434 if $test $i_sysfilio = "$define"; then
21435 echo '<sys/ioctl.h> NOT found.' >&4
21437 $test $i_sgtty = "$define" && xxx="sgtty.h"
21438 $test $i_termio = "$define" && xxx="termio.h"
21439 $test $i_termios = "$define" && xxx="termios.h"
21440 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
21446 : see if socket ioctl defs are in sys/sockio.h
21448 xxx=`./findhdr sys/sockio.h`
21449 if $test "$xxx"; then
21450 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
21452 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
21455 echo "No socket ioctls found in <sys/sockio.h>." >&4
21460 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
21466 : see if this is a syslog.h system
21467 set syslog.h i_syslog
21470 : see if this is a sys/mode.h system
21471 set sys/mode.h i_sysmode
21474 : see if there is a sys/poll.h file
21475 set sys/poll.h i_syspoll
21478 : see if sys/resource.h has to be included
21479 set sys/resource.h i_sysresrc
21482 : see if sys/security.h is available
21483 set sys/security.h i_syssecrt
21486 : see if this is a sys/statvfs.h system
21487 set sys/statvfs.h i_sysstatvfs
21490 : see if this is a sys/un.h system
21491 set sys/un.h i_sysun
21494 : see if this is a sys/utsname.h system
21495 set sys/utsname.h i_sysutsname
21498 : see if this is a syswait system
21499 set sys/wait.h i_syswait
21502 : see if this is a ustat.h system
21503 set ustat.h i_ustat
21506 : see if this is an utime system
21507 set utime.h i_utime
21510 : see if this is a vfork system
21513 set vfork.h i_vfork
21523 echo "Looking for extensions..." >&4
21524 : If we are using the old config.sh, known_extensions may contain
21525 : old or inaccurate or duplicate values.
21526 known_extensions=''
21527 nonxs_extensions=''
21528 : We do not use find because it might not be available.
21529 : We do not just use MANIFEST because the user may have dropped
21530 : some additional extensions into the source tree and expect them
21533 : Function to recursively find available extensions, ignoring DynaLoader
21534 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
21538 DynaLoader|dynaload) ;;
21540 if $test -f $xxx/$xxx.xs -o -f $xxx/$xxx.c; then
21541 known_extensions="$known_extensions $1$xxx";
21542 elif $test -f $xxx/Makefile.PL; then
21543 nonxs_extensions="$nonxs_extensions $1$xxx";
21545 if $test -d $xxx -a $# -lt 10; then
21548 eval $find_extensions;
21560 eval $find_extensions
21561 # Special case: Add in modules that nest beyond the first level.
21562 # Currently threads/shared and Hash/Util/FieldHash, since they are
21563 # not picked up by the recursive find above (and adding in general
21564 # recursive finding breaks SDBM_File/sdbm).
21565 # A.D. 20011025 (SDBM), ajgough 20071008 (FieldHash)
21566 known_extensions="$known_extensions threads/shared Hash/Util/FieldHash"
21567 set X $known_extensions
21569 known_extensions="$*"
21570 set X $nonxs_extensions
21572 nonxs_extensions="$*"
21575 : Now see which are supported on this system.
21577 for xxx in $known_extensions ; do
21581 $define) avail_ext="$avail_ext $xxx" ;;
21584 GDBM_File|gdbm_fil)
21586 $define) avail_ext="$avail_ext $xxx" ;;
21589 I18N/Langinfo|i18n_lan)
21590 case "$i_langinfo$d_nl_langinfo" in
21591 $define$define) avail_ext="$avail_ext $xxx" ;;
21595 : XXX Do we need a useipcsysv variable here
21596 case "${d_msg}${d_sem}${d_shm}" in
21597 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
21600 NDBM_File|ndbm_fil)
21603 case "$osname-$use64bitint" in
21606 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
21609 *) avail_ext="$avail_ext $xxx" ;;
21614 ODBM_File|odbm_fil)
21615 case "${i_dbm}${i_rpcsvcdbm}" in
21617 case "$d_cplusplus" in
21618 define) ;; # delete as a function name will not work
21619 *) case "$osname-$use64bitint" in
21622 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
21625 *) avail_ext="$avail_ext $xxx" ;;
21633 case "$useopcode" in
21634 true|define|y) avail_ext="$avail_ext $xxx" ;;
21638 case "$useposix" in
21639 true|define|y) avail_ext="$avail_ext $xxx" ;;
21643 case "$d_socket" in
21646 beos) ;; # not unless BONE
21647 *) avail_ext="$avail_ext $xxx" ;;
21652 Sys/Syslog|sys/syslog)
21653 : XXX syslog requires socket
21654 case "$d_socket" in
21655 true|$define|y) avail_ext="$avail_ext $xxx" ;;
21659 case "$usethreads" in
21661 case "$use5005threads" in
21662 $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;;
21666 threads|threads/shared)
21667 # threads and threads::shared are special cases.
21668 # To stop people from asking "Perl 5.8.0 was supposed
21669 # to have this new fancy threads implementation but my
21670 # perl doesn't have it" and from people trying to
21671 # (re)install the threads module using CPAN.pm and
21672 # CPAN.pm then offering to reinstall Perl 5.8.0,
21673 # the threads.pm and threads/shared.pm will always be
21674 # there, croaking informatively ("you need to rebuild
21675 # all of Perl with threads, sorry") when threads haven't
21676 # been compiled in.
21678 avail_ext="$avail_ext $xxx"
21682 cygwin) avail_ext="$avail_ext $xxx" ;;
21685 XS/APItest|xs/apitest)
21686 # This is just for testing. Skip it unless we have dynamic loading.
21689 $define) avail_ext="$avail_ext $xxx" ;;
21692 XS/Typemap|xs/typemap)
21693 # This is just for testing. Skip it unless we have dynamic loading.
21695 $define) avail_ext="$avail_ext $xxx" ;;
21698 *) avail_ext="$avail_ext $xxx"
21707 case "$onlyextensions" in
21709 *) keepextensions=''
21710 echo "You have requested that only certains extensions be included..." >&4
21711 for i in $onlyextensions; do
21712 case " $avail_ext " in
21714 echo "Keeping extension $i."
21715 keepextensions="$keepextensions $i"
21717 *) echo "Ignoring extension $i." ;;
21720 avail_ext="$keepextensions"
21724 case "$noextensions" in
21726 *) keepextensions=''
21727 echo "You have requested that certain extensions be ignored..." >&4
21728 for i in $avail_ext; do
21729 case " $noextensions " in
21730 *" $i "*) echo "Ignoring extension $i." ;;
21731 *) echo "Keeping extension $i.";
21732 keepextensions="$keepextensions $i"
21736 avail_ext="$keepextensions"
21740 : Now see which nonxs extensions are supported on this system.
21741 : For now assume all are.
21743 for xxx in $nonxs_extensions ; do
21745 *) nonxs_ext="$nonxs_ext $xxx"
21757 A number of extensions are supplied with $package. You may choose to
21758 compile these extensions for dynamic loading (the default), compile
21759 them into the $package executable (static loading), or not include
21760 them at all. Answer "none" to include no extensions.
21761 Note that DynaLoader is always built and need not be mentioned here.
21764 case "$dynamic_ext" in
21766 : Exclude those listed in static_ext
21768 for xxx in $avail_ext; do
21769 case " $static_ext " in
21771 *) dflt="$dflt $xxx" ;;
21778 *) dflt="$dynamic_ext"
21779 # Perhaps we are reusing an old out-of-date config.sh.
21782 if test X"$dynamic_ext" != X"$avail_ext"; then
21784 NOTICE: Your previous config.sh list may be incorrect.
21785 The extensions now available to you are
21787 but the default list from your previous config.sh is
21799 rp="What extensions do you wish to load dynamically?"
21802 none) dynamic_ext=' ' ;;
21803 *) dynamic_ext="$ans" ;;
21806 case "$static_ext" in
21808 : Exclude those already listed in dynamic linking
21810 for xxx in $avail_ext; do
21811 case " $dynamic_ext " in
21813 *) dflt="$dflt $xxx" ;;
21820 *) dflt="$static_ext"
21827 rp="What extensions do you wish to load statically?"
21830 none) static_ext=' ' ;;
21831 *) static_ext="$ans" ;;
21836 A number of extensions are supplied with $package. Answer "none"
21837 to include no extensions.
21838 Note that DynaLoader is always built and need not be mentioned here.
21841 case "$static_ext" in
21842 '') dflt="$avail_ext" ;;
21843 *) dflt="$static_ext"
21844 # Perhaps we are reusing an old out-of-date config.sh.
21847 if test X"$static_ext" != X"$avail_ext"; then
21849 NOTICE: Your previous config.sh list may be incorrect.
21850 The extensions now available to you are
21852 but the default list from your previous config.sh is
21861 : Exclude those that are not xs extensions
21865 rp="What extensions do you wish to include?"
21868 none) static_ext=' ' ;;
21869 *) static_ext="$ans" ;;
21874 # Encode is a special case. If we are building Encode as a static
21875 # extension, we need to explicitly list its subextensions as well.
21876 # For other nested extensions, this is handled automatically by
21877 # the appropriate Makefile.PL.
21878 case " $static_ext " in
21879 *" Encode "*) # Add the subextensions of Encode
21881 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
21882 static_ext="$static_ext Encode/$xxx"
21888 set X $dynamic_ext $static_ext $nonxs_ext
21892 # Sanity check: We require an extension suitable for use with
21893 # AnyDBM_File, as well as Fcntl and IO. (Failure to have these
21894 # should show up as failures in the test suite, but it's helpful to
21895 # catch them now.) The 'extensions' list is normally sorted
21896 # alphabetically, so we need to accept either
21897 # DB_File ... Fcntl ... IO ....
21898 # or something like
21899 # Fcntl ... NDBM_File ... IO ....
21900 case " $extensions" in
21901 *"_File "*" Fcntl "*" IO "*) ;; # DB_File
21902 *" Fcntl "*"_File "*" IO "*) ;; # GDBM_File
21903 *" Fcntl "*" IO "*"_File "*) ;; # NDBM_File
21904 *) echo "WARNING: Extensions DB_File or *DBM_File, Fcntl, and IO not configured." >&4
21905 echo "WARNING: The Perl you are building will be quite crippled." >& 4
21909 : Remove libraries needed only for extensions
21910 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
21911 : The exception is SunOS 4.x, which needs them.
21912 case "${osname}X${osvers}" in
21916 *) case "$usedl" in
21917 $define|true|[yY]*)
21918 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
21922 *) perllibs="$libs"
21928 : Remove build directory name from cppstdin so it can be used from
21929 : either the present location or the final installed location.
21931 : Get out of the UU directory to get correct path name.
21933 case "$cppstdin" in
21935 echo "Stripping down cppstdin path name"
21941 : end of configuration questions
21943 echo "End of configuration questions."
21946 : back to where it started
21947 if test -d ../UU; then
21951 : configuration may be unconditionally patched via a 'config.arch' file
21952 if $test -f config.arch; then
21953 echo "I see a config.arch file, loading it." >&4
21957 : configuration may be patched via a 'config.over' file
21958 if $test -f config.over; then
21961 rp='I see a config.over file. Do you wish to load it?'
21964 n*) echo "OK, I'll ignore it.";;
21966 echo "Configuration override changes have been loaded."
21971 : in case they want portability, strip down executable paths
21972 case "$d_portable" in
21975 echo "Stripping down executable paths..." >&4
21976 for file in $loclist $trylist; do
21978 eval $file=`basename $temp`
21983 : create config.sh file
21985 echo "Creating config.sh..." >&4
21986 $spitshell <<EOT >config.sh
21989 # This file was produced by running the Configure script. It holds all the
21990 # definitions figured out by Configure. Should you modify one of these values,
21991 # do not forget to propagate your changes by running "Configure -der". You may
21992 # instead choose to run each of the .SH files by yourself, or "Configure -S".
21995 # Package name : $package
21996 # Source directory : $src
21997 # Configuration time: $cf_time
21998 # Configured by : $cf_by
21999 # Target system : $myuname
22002 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
22003 $spitshell <<EOT >>config.sh
22012 Revision='$Revision'
22020 alignbytes='$alignbytes'
22021 ansi2knr='$ansi2knr'
22022 aphostname='$aphostname'
22023 api_revision='$api_revision'
22024 api_subversion='$api_subversion'
22025 api_version='$api_version'
22026 api_versionstring='$api_versionstring'
22029 archlibexp='$archlibexp'
22030 archname64='$archname64'
22031 archname='$archname'
22032 archobjs='$archobjs'
22033 asctime_r_proto='$asctime_r_proto'
22041 byteorder='$byteorder'
22043 castflags='$castflags'
22046 cccdlflags='$cccdlflags'
22047 ccdlflags='$ccdlflags'
22049 ccflags_uselargefiles='$ccflags_uselargefiles'
22051 ccsymbols='$ccsymbols'
22052 ccversion='$ccversion'
22054 cf_email='$cf_email'
22059 clocktype='$clocktype'
22061 compress='$compress'
22062 contains='$contains'
22066 cpp_stuff='$cpp_stuff'
22067 cppccsymbols='$cppccsymbols'
22068 cppflags='$cppflags'
22070 cppminus='$cppminus'
22072 cppstdin='$cppstdin'
22073 cppsymbols='$cppsymbols'
22074 crypt_r_proto='$crypt_r_proto'
22075 cryptlib='$cryptlib'
22077 ctermid_r_proto='$ctermid_r_proto'
22078 ctime_r_proto='$ctime_r_proto'
22079 d_Gconvert='$d_Gconvert'
22080 d_PRIEUldbl='$d_PRIEUldbl'
22081 d_PRIFUldbl='$d_PRIFUldbl'
22082 d_PRIGUldbl='$d_PRIGUldbl'
22083 d_PRIXU64='$d_PRIXU64'
22084 d_PRId64='$d_PRId64'
22085 d_PRIeldbl='$d_PRIeldbl'
22086 d_PRIfldbl='$d_PRIfldbl'
22087 d_PRIgldbl='$d_PRIgldbl'
22088 d_PRIi64='$d_PRIi64'
22089 d_PRIo64='$d_PRIo64'
22090 d_PRIu64='$d_PRIu64'
22091 d_PRIx64='$d_PRIx64'
22092 d_SCNfldbl='$d_SCNfldbl'
22093 d__fwalk='$d__fwalk'
22094 d_access='$d_access'
22095 d_accessx='$d_accessx'
22098 d_archlib='$d_archlib'
22099 d_asctime64='$d_asctime64'
22100 d_asctime_r='$d_asctime_r'
22103 d_attribute_format='$d_attribute_format'
22104 d_attribute_malloc='$d_attribute_malloc'
22105 d_attribute_nonnull='$d_attribute_nonnull'
22106 d_attribute_noreturn='$d_attribute_noreturn'
22107 d_attribute_pure='$d_attribute_pure'
22108 d_attribute_unused='$d_attribute_unused'
22109 d_attribute_warn_unused_result='$d_attribute_warn_unused_result'
22113 d_bsdgetpgrp='$d_bsdgetpgrp'
22114 d_bsdsetpgrp='$d_bsdsetpgrp'
22115 d_builtin_choose_expr='$d_builtin_choose_expr'
22116 d_builtin_expect='$d_builtin_expect'
22118 d_c99_variadic_macros='$d_c99_variadic_macros'
22119 d_casti32='$d_casti32'
22120 d_castneg='$d_castneg'
22121 d_charvspr='$d_charvspr'
22123 d_chroot='$d_chroot'
22124 d_chsize='$d_chsize'
22126 d_clearenv='$d_clearenv'
22127 d_closedir='$d_closedir'
22128 d_cmsghdr_s='$d_cmsghdr_s'
22130 d_copysignl='$d_copysignl'
22131 d_cplusplus='$d_cplusplus'
22133 d_crypt_r='$d_crypt_r'
22135 d_ctermid='$d_ctermid'
22136 d_ctermid_r='$d_ctermid_r'
22137 d_ctime64='$d_ctime64'
22138 d_ctime_r='$d_ctime_r'
22139 d_cuserid='$d_cuserid'
22140 d_dbl_dig='$d_dbl_dig'
22141 d_dbminitproto='$d_dbminitproto'
22142 d_difftime64='$d_difftime64'
22143 d_difftime='$d_difftime'
22144 d_dir_dd_fd='$d_dir_dd_fd'
22146 d_dirnamlen='$d_dirnamlen'
22147 d_dlerror='$d_dlerror'
22148 d_dlopen='$d_dlopen'
22149 d_dlsymun='$d_dlsymun'
22150 d_dosuid='$d_dosuid'
22151 d_drand48_r='$d_drand48_r'
22152 d_drand48proto='$d_drand48proto'
22154 d_eaccess='$d_eaccess'
22155 d_endgrent='$d_endgrent'
22156 d_endgrent_r='$d_endgrent_r'
22157 d_endhent='$d_endhent'
22158 d_endhostent_r='$d_endhostent_r'
22159 d_endnent='$d_endnent'
22160 d_endnetent_r='$d_endnetent_r'
22161 d_endpent='$d_endpent'
22162 d_endprotoent_r='$d_endprotoent_r'
22163 d_endpwent='$d_endpwent'
22164 d_endpwent_r='$d_endpwent_r'
22165 d_endsent='$d_endsent'
22166 d_endservent_r='$d_endservent_r'
22167 d_eofnblk='$d_eofnblk'
22168 d_eunice='$d_eunice'
22169 d_faststdio='$d_faststdio'
22170 d_fchdir='$d_fchdir'
22171 d_fchmod='$d_fchmod'
22172 d_fchown='$d_fchown'
22174 d_fcntl_can_lock='$d_fcntl_can_lock'
22175 d_fd_macros='$d_fd_macros'
22176 d_fd_set='$d_fd_set'
22177 d_fds_bits='$d_fds_bits'
22178 d_fgetpos='$d_fgetpos'
22179 d_finite='$d_finite'
22180 d_finitel='$d_finitel'
22181 d_flexfnam='$d_flexfnam'
22183 d_flockproto='$d_flockproto'
22185 d_fp_class='$d_fp_class'
22186 d_fpathconf='$d_fpathconf'
22187 d_fpclass='$d_fpclass'
22188 d_fpclassify='$d_fpclassify'
22189 d_fpclassl='$d_fpclassl'
22190 d_fpos64_t='$d_fpos64_t'
22191 d_frexpl='$d_frexpl'
22192 d_fs_data_s='$d_fs_data_s'
22193 d_fseeko='$d_fseeko'
22194 d_fsetpos='$d_fsetpos'
22195 d_fstatfs='$d_fstatfs'
22196 d_fstatvfs='$d_fstatvfs'
22198 d_ftello='$d_ftello'
22200 d_futimes='$d_futimes'
22201 d_getcwd='$d_getcwd'
22202 d_getespwnam='$d_getespwnam'
22203 d_getfsstat='$d_getfsstat'
22204 d_getgrent='$d_getgrent'
22205 d_getgrent_r='$d_getgrent_r'
22206 d_getgrgid_r='$d_getgrgid_r'
22207 d_getgrnam_r='$d_getgrnam_r'
22208 d_getgrps='$d_getgrps'
22209 d_gethbyaddr='$d_gethbyaddr'
22210 d_gethbyname='$d_gethbyname'
22211 d_gethent='$d_gethent'
22212 d_gethname='$d_gethname'
22213 d_gethostbyaddr_r='$d_gethostbyaddr_r'
22214 d_gethostbyname_r='$d_gethostbyname_r'
22215 d_gethostent_r='$d_gethostent_r'
22216 d_gethostprotos='$d_gethostprotos'
22217 d_getitimer='$d_getitimer'
22218 d_getlogin='$d_getlogin'
22219 d_getlogin_r='$d_getlogin_r'
22220 d_getmnt='$d_getmnt'
22221 d_getmntent='$d_getmntent'
22222 d_getnbyaddr='$d_getnbyaddr'
22223 d_getnbyname='$d_getnbyname'
22224 d_getnent='$d_getnent'
22225 d_getnetbyaddr_r='$d_getnetbyaddr_r'
22226 d_getnetbyname_r='$d_getnetbyname_r'
22227 d_getnetent_r='$d_getnetent_r'
22228 d_getnetprotos='$d_getnetprotos'
22229 d_getpagsz='$d_getpagsz'
22230 d_getpbyname='$d_getpbyname'
22231 d_getpbynumber='$d_getpbynumber'
22232 d_getpent='$d_getpent'
22233 d_getpgid='$d_getpgid'
22234 d_getpgrp2='$d_getpgrp2'
22235 d_getpgrp='$d_getpgrp'
22236 d_getppid='$d_getppid'
22237 d_getprior='$d_getprior'
22238 d_getprotobyname_r='$d_getprotobyname_r'
22239 d_getprotobynumber_r='$d_getprotobynumber_r'
22240 d_getprotoent_r='$d_getprotoent_r'
22241 d_getprotoprotos='$d_getprotoprotos'
22242 d_getprpwnam='$d_getprpwnam'
22243 d_getpwent='$d_getpwent'
22244 d_getpwent_r='$d_getpwent_r'
22245 d_getpwnam_r='$d_getpwnam_r'
22246 d_getpwuid_r='$d_getpwuid_r'
22247 d_getsbyname='$d_getsbyname'
22248 d_getsbyport='$d_getsbyport'
22249 d_getsent='$d_getsent'
22250 d_getservbyname_r='$d_getservbyname_r'
22251 d_getservbyport_r='$d_getservbyport_r'
22252 d_getservent_r='$d_getservent_r'
22253 d_getservprotos='$d_getservprotos'
22254 d_getspnam='$d_getspnam'
22255 d_getspnam_r='$d_getspnam_r'
22256 d_gettimeod='$d_gettimeod'
22257 d_gmtime64='$d_gmtime64'
22258 d_gmtime_r='$d_gmtime_r'
22259 d_gnulibc='$d_gnulibc'
22260 d_grpasswd='$d_grpasswd'
22261 d_hasmntopt='$d_hasmntopt'
22263 d_ilogbl='$d_ilogbl'
22264 d_inc_version_list='$d_inc_version_list'
22266 d_inetaton='$d_inetaton'
22267 d_int64_t='$d_int64_t'
22268 d_isascii='$d_isascii'
22269 d_isfinite='$d_isfinite'
22272 d_isnanl='$d_isnanl'
22273 d_killpg='$d_killpg'
22274 d_lchown='$d_lchown'
22275 d_ldbl_dig='$d_ldbl_dig'
22276 d_libm_lib_version='$d_libm_lib_version'
22278 d_localtime64='$d_localtime64'
22279 d_localtime_r='$d_localtime_r'
22280 d_localtime_r_needs_tzset='$d_localtime_r_needs_tzset'
22281 d_locconv='$d_locconv'
22283 d_longdbl='$d_longdbl'
22284 d_longlong='$d_longlong'
22285 d_lseekproto='$d_lseekproto'
22287 d_madvise='$d_madvise'
22288 d_malloc_good_size='$d_malloc_good_size'
22289 d_malloc_size='$d_malloc_size'
22291 d_mbstowcs='$d_mbstowcs'
22292 d_mbtowc='$d_mbtowc'
22293 d_memchr='$d_memchr'
22294 d_memcmp='$d_memcmp'
22295 d_memcpy='$d_memcpy'
22296 d_memmove='$d_memmove'
22297 d_memset='$d_memset'
22299 d_mkdtemp='$d_mkdtemp'
22300 d_mkfifo='$d_mkfifo'
22301 d_mkstemp='$d_mkstemp'
22302 d_mkstemps='$d_mkstemps'
22303 d_mktime64='$d_mktime64'
22304 d_mktime='$d_mktime'
22307 d_modfl_pow32_bug='$d_modfl_pow32_bug'
22308 d_modflproto='$d_modflproto'
22309 d_mprotect='$d_mprotect'
22311 d_msg_ctrunc='$d_msg_ctrunc'
22312 d_msg_dontroute='$d_msg_dontroute'
22313 d_msg_oob='$d_msg_oob'
22314 d_msg_peek='$d_msg_peek'
22315 d_msg_proxy='$d_msg_proxy'
22316 d_msgctl='$d_msgctl'
22317 d_msgget='$d_msgget'
22318 d_msghdr_s='$d_msghdr_s'
22319 d_msgrcv='$d_msgrcv'
22320 d_msgsnd='$d_msgsnd'
22322 d_munmap='$d_munmap'
22323 d_mymalloc='$d_mymalloc'
22326 d_nl_langinfo='$d_nl_langinfo'
22327 d_nv_preserves_uv='$d_nv_preserves_uv'
22328 d_nv_zero_is_allbits_zero='$d_nv_zero_is_allbits_zero'
22329 d_off64_t='$d_off64_t'
22330 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
22331 d_oldpthreads='$d_oldpthreads'
22332 d_oldsock='$d_oldsock'
22334 d_pathconf='$d_pathconf'
22336 d_perl_otherlibdirs='$d_perl_otherlibdirs'
22337 d_phostname='$d_phostname'
22340 d_portable='$d_portable'
22341 d_printf_format_null='$d_printf_format_null'
22342 d_procselfexe='$d_procselfexe'
22343 d_pseudofork='$d_pseudofork'
22344 d_pthread_atfork='$d_pthread_atfork'
22345 d_pthread_attr_setscope='$d_pthread_attr_setscope'
22346 d_pthread_yield='$d_pthread_yield'
22348 d_pwchange='$d_pwchange'
22349 d_pwclass='$d_pwclass'
22350 d_pwcomment='$d_pwcomment'
22351 d_pwexpire='$d_pwexpire'
22352 d_pwgecos='$d_pwgecos'
22353 d_pwpasswd='$d_pwpasswd'
22354 d_pwquota='$d_pwquota'
22357 d_random_r='$d_random_r'
22358 d_readdir64_r='$d_readdir64_r'
22359 d_readdir='$d_readdir'
22360 d_readdir_r='$d_readdir_r'
22361 d_readlink='$d_readlink'
22363 d_recvmsg='$d_recvmsg'
22364 d_rename='$d_rename'
22365 d_rewinddir='$d_rewinddir'
22367 d_safebcpy='$d_safebcpy'
22368 d_safemcpy='$d_safemcpy'
22369 d_sanemcmp='$d_sanemcmp'
22370 d_sbrkproto='$d_sbrkproto'
22371 d_scalbnl='$d_scalbnl'
22372 d_sched_yield='$d_sched_yield'
22373 d_scm_rights='$d_scm_rights'
22374 d_seekdir='$d_seekdir'
22375 d_select='$d_select'
22377 d_semctl='$d_semctl'
22378 d_semctl_semid_ds='$d_semctl_semid_ds'
22379 d_semctl_semun='$d_semctl_semun'
22380 d_semget='$d_semget'
22382 d_sendmsg='$d_sendmsg'
22383 d_setegid='$d_setegid'
22384 d_seteuid='$d_seteuid'
22385 d_setgrent='$d_setgrent'
22386 d_setgrent_r='$d_setgrent_r'
22387 d_setgrps='$d_setgrps'
22388 d_sethent='$d_sethent'
22389 d_sethostent_r='$d_sethostent_r'
22390 d_setitimer='$d_setitimer'
22391 d_setlinebuf='$d_setlinebuf'
22392 d_setlocale='$d_setlocale'
22393 d_setlocale_r='$d_setlocale_r'
22394 d_setnent='$d_setnent'
22395 d_setnetent_r='$d_setnetent_r'
22396 d_setpent='$d_setpent'
22397 d_setpgid='$d_setpgid'
22398 d_setpgrp2='$d_setpgrp2'
22399 d_setpgrp='$d_setpgrp'
22400 d_setprior='$d_setprior'
22401 d_setproctitle='$d_setproctitle'
22402 d_setprotoent_r='$d_setprotoent_r'
22403 d_setpwent='$d_setpwent'
22404 d_setpwent_r='$d_setpwent_r'
22405 d_setregid='$d_setregid'
22406 d_setresgid='$d_setresgid'
22407 d_setresuid='$d_setresuid'
22408 d_setreuid='$d_setreuid'
22409 d_setrgid='$d_setrgid'
22410 d_setruid='$d_setruid'
22411 d_setsent='$d_setsent'
22412 d_setservent_r='$d_setservent_r'
22413 d_setsid='$d_setsid'
22414 d_setvbuf='$d_setvbuf'
22418 d_shmatprototype='$d_shmatprototype'
22419 d_shmctl='$d_shmctl'
22421 d_shmget='$d_shmget'
22422 d_sigaction='$d_sigaction'
22423 d_signbit='$d_signbit'
22424 d_sigprocmask='$d_sigprocmask'
22425 d_sigsetjmp='$d_sigsetjmp'
22426 d_sitearch='$d_sitearch'
22427 d_snprintf='$d_snprintf'
22428 d_sockatmark='$d_sockatmark'
22429 d_sockatmarkproto='$d_sockatmarkproto'
22430 d_socket='$d_socket'
22431 d_socklen_t='$d_socklen_t'
22432 d_sockpair='$d_sockpair'
22433 d_socks5_init='$d_socks5_init'
22434 d_sprintf_returns_strlen='$d_sprintf_returns_strlen'
22436 d_srand48_r='$d_srand48_r'
22437 d_srandom_r='$d_srandom_r'
22438 d_sresgproto='$d_sresgproto'
22439 d_sresuproto='$d_sresuproto'
22440 d_statblks='$d_statblks'
22441 d_statfs_f_flags='$d_statfs_f_flags'
22442 d_statfs_s='$d_statfs_s'
22443 d_statvfs='$d_statvfs'
22444 d_stdio_cnt_lval='$d_stdio_cnt_lval'
22445 d_stdio_ptr_lval='$d_stdio_ptr_lval'
22446 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
22447 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
22448 d_stdio_stream_array='$d_stdio_stream_array'
22449 d_stdiobase='$d_stdiobase'
22450 d_stdstdio='$d_stdstdio'
22451 d_strchr='$d_strchr'
22452 d_strcoll='$d_strcoll'
22453 d_strctcpy='$d_strctcpy'
22454 d_strerrm='$d_strerrm'
22455 d_strerror='$d_strerror'
22456 d_strerror_r='$d_strerror_r'
22457 d_strftime='$d_strftime'
22458 d_strlcat='$d_strlcat'
22459 d_strlcpy='$d_strlcpy'
22460 d_strtod='$d_strtod'
22461 d_strtol='$d_strtol'
22462 d_strtold='$d_strtold'
22463 d_strtoll='$d_strtoll'
22464 d_strtoq='$d_strtoq'
22465 d_strtoul='$d_strtoul'
22466 d_strtoull='$d_strtoull'
22467 d_strtouq='$d_strtouq'
22468 d_strxfrm='$d_strxfrm'
22469 d_suidsafe='$d_suidsafe'
22470 d_symlink='$d_symlink'
22471 d_syscall='$d_syscall'
22472 d_syscallproto='$d_syscallproto'
22473 d_sysconf='$d_sysconf'
22474 d_sysernlst='$d_sysernlst'
22475 d_syserrlst='$d_syserrlst'
22476 d_system='$d_system'
22477 d_tcgetpgrp='$d_tcgetpgrp'
22478 d_tcsetpgrp='$d_tcsetpgrp'
22479 d_telldir='$d_telldir'
22480 d_telldirproto='$d_telldirproto'
22482 d_timegm='$d_timegm'
22484 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
22485 d_tm_tm_zone='$d_tm_tm_zone'
22486 d_tmpnam_r='$d_tmpnam_r'
22487 d_truncate='$d_truncate'
22488 d_ttyname_r='$d_ttyname_r'
22489 d_tzname='$d_tzname'
22490 d_u32align='$d_u32align'
22491 d_ualarm='$d_ualarm'
22494 d_union_semun='$d_union_semun'
22495 d_unordered='$d_unordered'
22496 d_unsetenv='$d_unsetenv'
22497 d_usleep='$d_usleep'
22498 d_usleepproto='$d_usleepproto'
22500 d_vendorarch='$d_vendorarch'
22501 d_vendorbin='$d_vendorbin'
22502 d_vendorlib='$d_vendorlib'
22503 d_vendorscript='$d_vendorscript'
22505 d_void_closedir='$d_void_closedir'
22506 d_voidsig='$d_voidsig'
22507 d_voidtty='$d_voidtty'
22508 d_volatile='$d_volatile'
22509 d_vprintf='$d_vprintf'
22510 d_vsnprintf='$d_vsnprintf'
22512 d_waitpid='$d_waitpid'
22513 d_wcstombs='$d_wcstombs'
22514 d_wctomb='$d_wctomb'
22515 d_writev='$d_writev'
22518 db_hashtype='$db_hashtype'
22519 db_prefixtype='$db_prefixtype'
22520 db_version_major='$db_version_major'
22521 db_version_minor='$db_version_minor'
22522 db_version_patch='$db_version_patch'
22523 defvoidused='$defvoidused'
22524 direntrytype='$direntrytype'
22527 doublesize='$doublesize'
22529 drand48_r_proto='$drand48_r_proto'
22531 dynamic_ext='$dynamic_ext'
22537 endgrent_r_proto='$endgrent_r_proto'
22538 endhostent_r_proto='$endhostent_r_proto'
22539 endnetent_r_proto='$endnetent_r_proto'
22540 endprotoent_r_proto='$endprotoent_r_proto'
22541 endpwent_r_proto='$endpwent_r_proto'
22542 endservent_r_proto='$endservent_r_proto'
22543 eunicefix='$eunicefix'
22546 extensions='$extensions'
22547 extern_C='$extern_C'
22549 fflushNULL='$fflushNULL'
22550 fflushall='$fflushall'
22552 firstmakefile='$firstmakefile'
22554 fpossize='$fpossize'
22555 fpostype='$fpostype'
22556 freetype='$freetype'
22559 full_csh='$full_csh'
22560 full_sed='$full_sed'
22561 gccansipedantic='$gccansipedantic'
22562 gccosandvers='$gccosandvers'
22563 gccversion='$gccversion'
22564 getgrent_r_proto='$getgrent_r_proto'
22565 getgrgid_r_proto='$getgrgid_r_proto'
22566 getgrnam_r_proto='$getgrnam_r_proto'
22567 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
22568 gethostbyname_r_proto='$gethostbyname_r_proto'
22569 gethostent_r_proto='$gethostent_r_proto'
22570 getlogin_r_proto='$getlogin_r_proto'
22571 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
22572 getnetbyname_r_proto='$getnetbyname_r_proto'
22573 getnetent_r_proto='$getnetent_r_proto'
22574 getprotobyname_r_proto='$getprotobyname_r_proto'
22575 getprotobynumber_r_proto='$getprotobynumber_r_proto'
22576 getprotoent_r_proto='$getprotoent_r_proto'
22577 getpwent_r_proto='$getpwent_r_proto'
22578 getpwnam_r_proto='$getpwnam_r_proto'
22579 getpwuid_r_proto='$getpwuid_r_proto'
22580 getservbyname_r_proto='$getservbyname_r_proto'
22581 getservbyport_r_proto='$getservbyport_r_proto'
22582 getservent_r_proto='$getservent_r_proto'
22583 getspnam_r_proto='$getspnam_r_proto'
22584 gidformat='$gidformat'
22590 gmtime_r_proto='$gmtime_r_proto'
22591 gnulibc_version='$gnulibc_version'
22593 groupcat='$groupcat'
22594 groupstype='$groupstype'
22597 h_sysfile='$h_sysfile'
22600 html1dir='$html1dir'
22601 html1direxp='$html1direxp'
22602 html3dir='$html3dir'
22603 html3direxp='$html3direxp'
22612 i_arpainet='$i_arpainet'
22613 i_assert='$i_assert'
22614 i_bsdioctl='$i_bsdioctl'
22618 i_dirent='$i_dirent'
22624 i_fp_class='$i_fp_class'
22626 i_gdbm_ndbm='$i_gdbm_ndbm'
22627 i_gdbmndbm='$i_gdbmndbm'
22629 i_ieeefp='$i_ieeefp'
22630 i_inttypes='$i_inttypes'
22631 i_langinfo='$i_langinfo'
22632 i_libutil='$i_libutil'
22633 i_limits='$i_limits'
22634 i_locale='$i_locale'
22635 i_machcthr='$i_machcthr'
22636 i_malloc='$i_malloc'
22637 i_mallocmalloc='$i_mallocmalloc'
22639 i_memory='$i_memory'
22640 i_mntent='$i_mntent'
22643 i_neterrno='$i_neterrno'
22644 i_netinettcp='$i_netinettcp'
22648 i_pthread='$i_pthread'
22650 i_rpcsvcdbm='$i_rpcsvcdbm'
22653 i_shadow='$i_shadow'
22655 i_stdarg='$i_stdarg'
22656 i_stddef='$i_stddef'
22657 i_stdlib='$i_stdlib'
22658 i_string='$i_string'
22659 i_sunmath='$i_sunmath'
22660 i_sysaccess='$i_sysaccess'
22661 i_sysdir='$i_sysdir'
22662 i_sysfile='$i_sysfile'
22663 i_sysfilio='$i_sysfilio'
22665 i_sysioctl='$i_sysioctl'
22666 i_syslog='$i_syslog'
22667 i_sysmman='$i_sysmman'
22668 i_sysmode='$i_sysmode'
22669 i_sysmount='$i_sysmount'
22670 i_sysndir='$i_sysndir'
22671 i_sysparam='$i_sysparam'
22672 i_syspoll='$i_syspoll'
22673 i_sysresrc='$i_sysresrc'
22674 i_syssecrt='$i_syssecrt'
22675 i_sysselct='$i_sysselct'
22676 i_syssockio='$i_syssockio'
22677 i_sysstat='$i_sysstat'
22678 i_sysstatfs='$i_sysstatfs'
22679 i_sysstatvfs='$i_sysstatvfs'
22680 i_systime='$i_systime'
22681 i_systimek='$i_systimek'
22682 i_systimes='$i_systimes'
22683 i_systypes='$i_systypes'
22684 i_sysuio='$i_sysuio'
22686 i_sysutsname='$i_sysutsname'
22687 i_sysvfs='$i_sysvfs'
22688 i_syswait='$i_syswait'
22689 i_termio='$i_termio'
22690 i_termios='$i_termios'
22692 i_unistd='$i_unistd'
22695 i_values='$i_values'
22696 i_varargs='$i_varargs'
22697 i_varhdr='$i_varhdr'
22699 ignore_versioned_solibs='$ignore_versioned_solibs'
22700 inc_version_list='$inc_version_list'
22701 inc_version_list_init='$inc_version_list_init'
22704 initialinstalllocation='$initialinstalllocation'
22705 installarchlib='$installarchlib'
22706 installbin='$installbin'
22707 installhtml1dir='$installhtml1dir'
22708 installhtml3dir='$installhtml3dir'
22709 installman1dir='$installman1dir'
22710 installman3dir='$installman3dir'
22711 installprefix='$installprefix'
22712 installprefixexp='$installprefixexp'
22713 installprivlib='$installprivlib'
22714 installscript='$installscript'
22715 installsitearch='$installsitearch'
22716 installsitebin='$installsitebin'
22717 installsitehtml1dir='$installsitehtml1dir'
22718 installsitehtml3dir='$installsitehtml3dir'
22719 installsitelib='$installsitelib'
22720 installsiteman1dir='$installsiteman1dir'
22721 installsiteman3dir='$installsiteman3dir'
22722 installsitescript='$installsitescript'
22723 installstyle='$installstyle'
22724 installusrbinperl='$installusrbinperl'
22725 installvendorarch='$installvendorarch'
22726 installvendorbin='$installvendorbin'
22727 installvendorhtml1dir='$installvendorhtml1dir'
22728 installvendorhtml3dir='$installvendorhtml3dir'
22729 installvendorlib='$installvendorlib'
22730 installvendorman1dir='$installvendorman1dir'
22731 installvendorman3dir='$installvendorman3dir'
22732 installvendorscript='$installvendorscript'
22734 issymlink='$issymlink'
22735 ivdformat='$ivdformat'
22738 known_extensions='$known_extensions'
22741 lddlflags='$lddlflags'
22743 ldflags_uselargefiles='$ldflags_uselargefiles'
22744 ldlibpthname='$ldlibpthname'
22751 libsdirs='$libsdirs'
22752 libsfiles='$libsfiles'
22753 libsfound='$libsfound'
22754 libspath='$libspath'
22755 libswanted='$libswanted'
22756 libswanted_uselargefiles='$libswanted_uselargefiles'
22762 localtime_r_proto='$localtime_r_proto'
22763 locincpth='$locincpth'
22764 loclibpth='$loclibpth'
22765 longdblsize='$longdblsize'
22766 longlongsize='$longlongsize'
22767 longsize='$longsize'
22771 lseeksize='$lseeksize'
22772 lseektype='$lseektype'
22775 madlyobj='$madlyobj'
22776 madlysrc='$madlysrc'
22780 make_set_make='$make_set_make'
22781 mallocobj='$mallocobj'
22782 mallocsrc='$mallocsrc'
22783 malloctype='$malloctype'
22785 man1direxp='$man1direxp'
22788 man3direxp='$man3direxp'
22790 mips_type='$mips_type'
22791 mistrustnm='$mistrustnm'
22793 mmaptype='$mmaptype'
22794 modetype='$modetype'
22796 multiarch='$multiarch'
22798 myarchname='$myarchname'
22799 mydomain='$mydomain'
22800 myhostname='$myhostname'
22803 need_va_copy='$need_va_copy'
22804 netdb_hlen_type='$netdb_hlen_type'
22805 netdb_host_type='$netdb_host_type'
22806 netdb_name_type='$netdb_name_type'
22807 netdb_net_type='$netdb_net_type'
22810 nm_so_opt='$nm_so_opt'
22811 nonxs_ext='$nonxs_ext'
22813 nvEUformat='$nvEUformat'
22814 nvFUformat='$nvFUformat'
22815 nvGUformat='$nvGUformat'
22816 nv_overflows_integers_at='$nv_overflows_integers_at'
22817 nv_preserves_uv_bits='$nv_preserves_uv_bits'
22818 nveformat='$nveformat'
22819 nvfformat='$nvfformat'
22820 nvgformat='$nvgformat'
22823 o_nonblock='$o_nonblock'
22825 old_pthread_create_joinable='$old_pthread_create_joinable'
22826 optimize='$optimize'
22827 orderlib='$orderlib'
22830 otherlibdirs='$otherlibdirs'
22834 patchlevel='$patchlevel'
22835 path_sep='$path_sep'
22838 perl_patchlevel='$perl_patchlevel'
22839 perladmin='$perladmin'
22840 perllibs='$perllibs'
22841 perlpath='$perlpath'
22843 phostname='$phostname'
22849 prefixexp='$prefixexp'
22851 privlibexp='$privlibexp'
22852 procselfexe='$procselfexe'
22853 prototype='$prototype'
22855 quadkind='$quadkind'
22856 quadtype='$quadtype'
22857 randbits='$randbits'
22858 randfunc='$randfunc'
22859 random_r_proto='$random_r_proto'
22860 randseedtype='$randseedtype'
22862 rd_nodata='$rd_nodata'
22863 readdir64_r_proto='$readdir64_r_proto'
22864 readdir_r_proto='$readdir_r_proto'
22865 revision='$revision'
22871 sGMTIME_max='$sGMTIME_max'
22872 sGMTIME_min='$sGMTIME_min'
22873 sLOCALTIME_max='$sLOCALTIME_max'
22874 sLOCALTIME_min='$sLOCALTIME_min'
22875 sPRIEUldbl='$sPRIEUldbl'
22876 sPRIFUldbl='$sPRIFUldbl'
22877 sPRIGUldbl='$sPRIGUldbl'
22878 sPRIXU64='$sPRIXU64'
22880 sPRIeldbl='$sPRIeldbl'
22881 sPRIfldbl='$sPRIfldbl'
22882 sPRIgldbl='$sPRIgldbl'
22887 sSCNfldbl='$sSCNfldbl'
22888 sched_yield='$sched_yield'
22889 scriptdir='$scriptdir'
22890 scriptdirexp='$scriptdirexp'
22892 seedfunc='$seedfunc'
22893 selectminbits='$selectminbits'
22894 selecttype='$selecttype'
22895 sendmail='$sendmail'
22896 setgrent_r_proto='$setgrent_r_proto'
22897 sethostent_r_proto='$sethostent_r_proto'
22898 setlocale_r_proto='$setlocale_r_proto'
22899 setnetent_r_proto='$setnetent_r_proto'
22900 setprotoent_r_proto='$setprotoent_r_proto'
22901 setpwent_r_proto='$setpwent_r_proto'
22902 setservent_r_proto='$setservent_r_proto'
22905 sharpbang='$sharpbang'
22906 shmattype='$shmattype'
22907 shortsize='$shortsize'
22910 sig_count='$sig_count'
22911 sig_name='$sig_name'
22912 sig_name_init='$sig_name_init'
22914 sig_num_init='$sig_num_init'
22915 sig_size='$sig_size'
22916 signal_t='$signal_t'
22917 sitearch='$sitearch'
22918 sitearchexp='$sitearchexp'
22920 sitebinexp='$sitebinexp'
22921 sitehtml1dir='$sitehtml1dir'
22922 sitehtml1direxp='$sitehtml1direxp'
22923 sitehtml3dir='$sitehtml3dir'
22924 sitehtml3direxp='$sitehtml3direxp'
22926 sitelib_stem='$sitelib_stem'
22927 sitelibexp='$sitelibexp'
22928 siteman1dir='$siteman1dir'
22929 siteman1direxp='$siteman1direxp'
22930 siteman3dir='$siteman3dir'
22931 siteman3direxp='$siteman3direxp'
22932 siteprefix='$siteprefix'
22933 siteprefixexp='$siteprefixexp'
22934 sitescript='$sitescript'
22935 sitescriptexp='$sitescriptexp'
22936 sizesize='$sizesize'
22937 sizetype='$sizetype'
22941 sockethdr='$sockethdr'
22942 socketlib='$socketlib'
22943 socksizetype='$socksizetype'
22945 spackage='$spackage'
22946 spitshell='$spitshell'
22947 srand48_r_proto='$srand48_r_proto'
22948 srandom_r_proto='$srandom_r_proto'
22950 ssizetype='$ssizetype'
22951 startperl='$startperl'
22953 static_ext='$static_ext'
22955 stdio_base='$stdio_base'
22956 stdio_bufsiz='$stdio_bufsiz'
22957 stdio_cnt='$stdio_cnt'
22958 stdio_filbuf='$stdio_filbuf'
22959 stdio_ptr='$stdio_ptr'
22960 stdio_stream_array='$stdio_stream_array'
22961 strerror_r_proto='$strerror_r_proto'
22964 subversion='$subversion'
22968 targetarch='$targetarch'
22972 timeincl='$timeincl'
22973 timetype='$timetype'
22974 tmpnam_r_proto='$tmpnam_r_proto'
22980 ttyname_r_proto='$ttyname_r_proto'
22989 uidformat='$uidformat'
22995 uquadtype='$uquadtype'
22996 use5005threads='$use5005threads'
22997 use64bitall='$use64bitall'
22998 use64bitint='$use64bitint'
22999 usecrosscompile='$usecrosscompile'
23001 usedtrace='$usedtrace'
23002 usefaststdio='$usefaststdio'
23003 useithreads='$useithreads'
23004 uselargefiles='$uselargefiles'
23005 uselongdouble='$uselongdouble'
23006 usemallocwrap='$usemallocwrap'
23007 usemorebits='$usemorebits'
23008 usemultiplicity='$usemultiplicity'
23009 usemymalloc='$usemymalloc'
23011 useopcode='$useopcode'
23012 useperlio='$useperlio'
23013 useposix='$useposix'
23014 usereentrant='$usereentrant'
23015 userelocatableinc='$userelocatableinc'
23017 useshrplib='$useshrplib'
23018 usesitecustomize='$usesitecustomize'
23019 usesocks='$usesocks'
23020 usethreads='$usethreads'
23021 usevendorprefix='$usevendorprefix'
23022 usevfork='$usevfork'
23025 uvXUformat='$uvXUformat'
23026 uvoformat='$uvoformat'
23029 uvuformat='$uvuformat'
23030 uvxformat='$uvxformat'
23031 vendorarch='$vendorarch'
23032 vendorarchexp='$vendorarchexp'
23033 vendorbin='$vendorbin'
23034 vendorbinexp='$vendorbinexp'
23035 vendorhtml1dir='$vendorhtml1dir'
23036 vendorhtml1direxp='$vendorhtml1direxp'
23037 vendorhtml3dir='$vendorhtml3dir'
23038 vendorhtml3direxp='$vendorhtml3direxp'
23039 vendorlib='$vendorlib'
23040 vendorlib_stem='$vendorlib_stem'
23041 vendorlibexp='$vendorlibexp'
23042 vendorman1dir='$vendorman1dir'
23043 vendorman1direxp='$vendorman1direxp'
23044 vendorman3dir='$vendorman3dir'
23045 vendorman3direxp='$vendorman3direxp'
23046 vendorprefix='$vendorprefix'
23047 vendorprefixexp='$vendorprefixexp'
23048 vendorscript='$vendorscript'
23049 vendorscriptexp='$vendorscriptexp'
23051 version_patchlevel_string='$version_patchlevel_string'
23052 versiononly='$versiononly'
23054 voidflags='$voidflags'
23057 yaccflags='$yaccflags'
23062 : Add in command line options if available
23063 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
23065 : add special variables
23066 $test -f $src/patchlevel.h && \
23067 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
23068 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
23069 echo "PERL_CONFIG_SH=true" >>config.sh
23071 : propagate old symbols
23072 if $test -f UU/config.sh; then
23073 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
23074 $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \
23075 config.sh config.sh UU/oldconfig.sh |\
23076 $sort | $uniq -u >UU/oldsyms
23077 set X `cat UU/oldsyms`
23083 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
23085 echo ": Variables propagated from previous config.sh file." >>config.sh
23086 for sym in `cat UU/oldsyms`; do
23087 echo " Propagating $hint variable "'$'"$sym..."
23088 eval 'tmp="$'"${sym}"'"'
23090 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
23096 : Finish up by extracting the .SH files
23100 echo "Extraction done."
23110 If you'd like to make any changes to the config.sh file before I begin
23111 to configure things, do it as a shell escape now (e.g. !vi config.sh).
23114 rp="Press return or use a shell escape to edit config.sh:"
23119 *) : in case they cannot read
23120 sh 1>&4 -c "$ans";;
23125 : if this fails, just run all the .SH files by hand
23134 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
23141 Now you need to generate make dependencies by running "$make depend".
23142 You might prefer to run it in background: "$make depend > makedepend.out &"
23143 It can take a while, so you might not want to run it right now.
23148 rp="Run $make depend now?"
23152 $make depend && echo "Now you must run '$make'."
23155 echo "You must run '$make depend' then '$make'."
23158 elif test -f [Mm]akefile; then
23160 echo "Now you must run a $make."
23162 echo "Configure done."
23165 if $test -f Policy.sh; then
23168 If you compile $package on a different machine or from a different object
23169 directory, copy the Policy.sh file from this object directory to the
23170 new one before you run Configure -- this will help you with most of
23171 the policy defaults.
23175 if $test -f config.msg; then
23176 echo "Hmm. I also noted the following information while running:"
23178 $cat config.msg >&4
23181 $rm -f kit*isdone ark*isdone