3 # If these # comments don't work, trim them. Don't worry about any other
4 # shell scripts, Configure will trim # comments from them for you.
6 # (If you are trying to port this package to a machine without sh,
7 # I would suggest you have a look at the prototypical config_h.SH file
8 # and edit it to reflect your system. Some packages may include samples
9 # of config.h for certain machines, so you might look for one of those.)
11 # Yes, you may rip this off to use in other distribution packages. This
12 # script belongs to the public domain and cannot be copyrighted.
14 # (Note: this Configure script was generated automatically. Rather than
15 # working with this copy of Configure, you may wish to get metaconfig.
16 # The dist-3.0 package (which contains metaconfig) was posted in
17 # comp.sources.misc and is available on CPAN under authors/id/RAM so
18 # you may fetch it yourself from your nearest archive site.)
21 # Though this script was generated by metaconfig, it is OK to send
22 # patches against it. It's up to the Configure pumpkin to backport
23 # the patch to the metaunits if it is accepted.
24 # See Porting/pumpkin.pod for more information on metaconfig.
27 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
29 # Generated on Tue Nov 21 16:13:46 CET 2006 [metaconfig 3.0 PL70]
30 # (with additional metaconfig patches by perlbug@perl.org)
35 SCO csh still thinks true is false. Write to SCO today and tell them that next
36 year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
38 (Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
39 we'd have to do is go in and swap the && and || tokens, wherever they are.)
41 [End of diatribe. We now return you to your regularly scheduled programming...]
45 OOPS! You naughty creature! You didn't run Configure with sh!
46 I will attempt to remedy the situation by running sh for you...
50 true || exec sh $0 $argv:q
52 (exit $?0) || cat c2$$
53 (exit $?0) || exec sh $0 $argv:q
56 if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
59 *** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do
60 *** Configure that well. (Plan 9 is close to UNIX but not close enough.)
61 *** Please read the README.plan9 for further instructions.
62 *** Cannot continue, aborting.
68 if test ! -c /dev/null ; then
71 *** I'm sorry, but /dev/null appears to be a file rather than a device.
72 *** Please consult your operating sytem's notes for making a device
74 *** Cannot continue, aborting.
80 : compute my invocation name
84 me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
89 : Proper separator for the PATH environment variable
91 : On OS/2 this directory should exist if this is not floppy only system :-]
92 if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then
93 if test -n "$OS2_SHELL"; then
95 PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
96 OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
98 elif test -n "$DJGPP"; then
99 case "X${MACHTYPE:-nonesuchmach}" in
106 : Proper PATH setting
107 paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
108 paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
109 paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
110 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
111 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
112 paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
113 paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
114 paths="$paths /sbin /usr/sbin /usr/libexec"
115 paths="$paths /system/gnu_library/bin"
119 case "$p_$PATH$p_" in
121 *) test -d $p && PATH=$PATH$p_$p ;;
128 : shall we be using ksh?
134 if (PATH=.; alias -x) >/dev/null 2>&1; then
137 if test -f /hp-ux -a -f /bin/ksh; then
138 needksh='to avoid sh bug in "here document" expansion'
140 if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
141 if test X`/usr/bin/uname -v` = X4; then
142 avoidksh="to avoid AIX 4's /bin/sh"
146 if test -f /osf_boot -a -f /usr/sbin/setld; then
147 if test X`/usr/bin/uname -s` = XOSF1; then
148 avoidksh="to avoid Digital UNIX' ksh"
150 unset BIN_SH # if this is 'xpg4' sh will start up ksh
153 case "$inksh/$needksh" in
160 case "$inksh/$avoidksh" in
166 case "$inksh/$needksh-$avoidksh-" in
169 (I see you are using the Korn shell. Some ksh's blow up on $me,
170 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
177 echo "(Feeding myself to $newsh $reason.)"
179 Configure|*/Configure) exec $newsh $0 "$@";;
180 *) exec $newsh Configure "$@";;
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='.' ;;
195 : Configure runs within the UU subdirectory
196 test -d UU || mkdir UU
334 initialinstalllocation=''
362 d_attribute_format=''
363 d_attribute_malloc=''
364 d_attribute_nonnull=''
365 d_attribute_noreturn=''
367 d_attribute_unused=''
368 d_attribute_warn_unused_result=''
369 d_printf_format_null=''
372 d_builtin_choose_expr=''
375 d_c99_variadic_macros=''
422 endhostent_r_proto=''
428 endprotoent_r_proto=''
434 endservent_r_proto=''
486 gethostbyaddr_r_proto=''
488 gethostbyname_r_proto=''
490 gethostent_r_proto=''
502 getnetbyaddr_r_proto=''
504 getnetbyname_r_proto=''
518 d_getprotobyname_r=''
519 getprotobyname_r_proto=''
520 d_getprotobynumber_r=''
521 getprotobynumber_r_proto=''
523 getprotoent_r_proto=''
535 getservbyname_r_proto=''
537 getservbyport_r_proto=''
539 getservent_r_proto=''
563 d_libm_lib_version=''
566 d_localtime_r_needs_tzset=''
577 d_malloc_good_size=''
619 d_old_pthread_create_joinable=''
620 old_pthread_create_joinable=''
622 d_pthread_attr_setscope=''
661 sethostent_r_proto=''
678 setprotoent_r_proto=''
690 setservent_r_proto=''
723 d_sprintf_returns_strlen=''
738 d_stdio_ptr_lval_nochange_cnt=''
739 d_stdio_ptr_lval_sets_cnt=''
942 d_inc_version_list=''
944 inc_version_list_init=''
963 ignore_versioned_solibs=''
1027 d_perl_otherlibdirs=''
1035 api_versionstring=''
1041 version_patchlevel_string=''
1045 d_nv_preserves_uv=''
1046 d_nv_zero_is_allbits_zero=''
1057 nv_preserves_uv_bits=''
1129 installsitehtml1dir=''
1132 installsitehtml3dir=''
1139 installsiteman1dir=''
1142 installsiteman3dir=''
1147 installsitescript=''
1162 d_stdio_stream_array=''
1163 stdio_stream_array=''
1174 ccflags_uselargefiles=''
1175 ldflags_uselargefiles=''
1176 libswanted_uselargefiles=''
1196 installvendorarch=''
1203 installvendorhtml1dir=''
1205 vendorhtml1direxp=''
1206 installvendorhtml3dir=''
1208 vendorhtml3direxp=''
1214 installvendorman1dir=''
1217 installvendorman3dir=''
1224 installvendorscript=''
1236 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1239 : We must find out about Eunice early
1241 if test -f /etc/unixtovms; then
1242 eunicefix=/etc/unixtovms
1244 if test -f /etc/unixtovms.exe; then
1245 eunicefix=/etc/unixtovms.exe
1248 : Set executable suffix now -- needed before hints available
1249 if test -f "/libs/version.library"; then
1252 elif test -f "/system/gnu_library/bin/ar.pm"; then
1255 elif test -n "$DJGPP"; then
1258 elif test -d c:/. -o -n "$is_os2" ; then
1267 : set useposix=false in your hint file to disable the POSIX extension.
1269 : set useopcode=false in your hint file to disable the Opcode extension.
1271 : Trailing extension. Override this in a hint file, if needed.
1272 : Extra object files, if any, needed on this platform.
1275 : Possible local include directories to search.
1276 : Set locincpth to "" in a hint file to defeat local include searches.
1277 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1278 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1280 : no include file wanted by default
1283 : Enable -DEBUGGING and -DDEBUGGING from the command line
1289 : change the next line if compiling for Xenix/286 on Xenix/386
1290 xlibpth='/usr/lib/386 /lib/386'
1291 : Possible local library directories to search.
1292 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1293 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1295 : general looking path for locating libraries
1296 glibpth="/lib /usr/lib $xlibpth"
1297 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1298 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1299 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1301 : Private path used by Configure to find libraries. Its value
1302 : is prepended to libpth. This variable takes care of special
1303 : machines, like the mips. Usually, it should be empty.
1306 : default library list
1308 : some systems want to use only the non-versioned libso:s
1309 ignore_versioned_solibs=''
1314 ccflags_uselargefiles=''
1315 ldflags_uselargefiles=''
1316 libswanted_uselargefiles=''
1317 : set usemultiplicity on the Configure command line to enable multiplicity.
1318 : set usesocks on the Configure command line to enable socks.
1319 : set usethreads on the Configure command line to enable threads.
1320 usereentrant='undef'
1321 : full support for void wanted by default
1324 : List of libraries we want.
1325 : If anyone needs extra -lxxx, put those in a hint file.
1326 libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun"
1327 libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
1328 : We probably want to search /usr/shlib before most other libraries.
1329 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1330 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1331 glibpth="/usr/shlib $glibpth"
1332 : Do not use vfork unless overridden by a hint file.
1335 : Find the basic shell for Bourne shell scripts
1339 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1342 if test -f "$xxx"; then
1345 : Build up a list and do a single loop so we can 'break' out.
1346 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1347 for xxx in sh bash ksh pdksh ash; do
1349 try="$try ${p}/${xxx}"
1353 if test -f "$xxx"; then
1356 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1359 elif test -f "$xxx.exe"; then
1370 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1372 Usually it's in /bin/sh. How did you even get this far?
1373 Please contact me (Perl Maintainers) at perlbug@perl.org and
1374 we'll try to straighten this all out.
1380 : see if sh knows # comments
1381 if `$sh -c '#' >/dev/null 2>&1`; then
1385 test -f $xcat$_exe || xcat=/usr/bin/cat
1386 if test ! -f $xcat$_exe; then
1387 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1388 if test -f $p/cat$_exe; then
1393 if test ! -f $xcat$_exe; then
1394 echo "Can't find cat anywhere!"
1398 echo "#!$xcat" >sharp
1402 if test -s today; then
1405 echo "#! $xcat" > sharp
1409 if test -s today; then
1417 echo "Your $sh doesn't grok # comments--I will strip them later on."
1420 echo "exec grep -v '^[ ]*#'" >spitshell
1422 $eunicefix spitshell
1423 spitshell=`pwd`/spitshell
1425 echo "I presume that if # doesn't work, #! won't work either!"
1430 : figure out how to guarantee sh startup
1432 '') startsh=${sharpbang}${sh} ;;
1444 : echo "Yup, it does."
1446 echo "Hmm... '$startsh' does not guarantee sh startup..."
1447 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1452 : Save command line options in file UU/cmdline.opt for later use in
1453 : generating config.sh.
1454 cat > cmdline.opt <<EOSH
1455 # Configure command line arguments.
1464 cat >>cmdline.opt <<EOSH
1465 config_arg$argn='$arg'
1467 # Extreme backslashitis: replace each ' by '"'"'
1468 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1471 arg_exp=`cat cmdl.opt`
1472 args_exp="$args_exp$args_sep'$arg_exp'"
1473 argn=`expr $argn + 1`
1476 # args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
1477 # used by ./hints/os2.sh
1480 : produce awk script to parse command line options
1481 cat >options.awk <<'EOF'
1483 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1485 len = length(optstr);
1486 for (i = 1; i <= len; i++) {
1487 c = substr(optstr, i, 1);
1488 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1499 if (substr(str, 1, 1) != "-") {
1500 printf("'%s'\n", str);
1504 for (i = 2; i <= len; i++) {
1505 c = substr(str, i, 1);
1507 printf("-%s\n", substr(str, i));
1513 printf("'%s'\n", substr(str, i + 1));
1526 : process the command line options
1527 set X `for arg in "$@"; do echo "X$arg"; done |
1528 sed -e s/X// | awk -f options.awk`
1533 : set up default values
1543 rm -f optdef.sh posthint.sh
1544 cat >optdef.sh <<EOS
1550 while test $# -gt 0; do
1552 -d) shift; fastread=yes;;
1553 -e) shift; alldone=cont;;
1557 if test -r "$1"; then
1560 echo "$me: cannot read config file $1." >&2
1565 -h) shift; error=true;;
1566 -r) shift; reuseval=true;;
1567 -s) shift; silent=true; realsilent=true;;
1568 -E) shift; alldone=exit;;
1569 -K) shift; knowitall=true;;
1570 -O) shift; override=true;;
1571 -S) shift; silent=true; extractsh=true;;
1576 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1577 echo "$me: ignoring -D $1" >&2
1580 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1581 *) echo "$1='define'" >> optdef.sh;;
1588 *=) echo "$1" >> optdef.sh;;
1590 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1591 echo "$me: ignoring -U $1" >&2
1593 *) echo "$1='undef'" >> optdef.sh;;
1604 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
1608 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
1609 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1615 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1616 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1617 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1618 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1619 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1620 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
1626 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1628 echo "$yyy=''" >> posthint.sh ;;
1633 echo "$yyy='$zzz'" >> posthint.sh ;;
1635 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1637 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1642 echo "$yyy=$zzz" >> posthint.sh ;;
1643 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1647 -V) echo "$me generated by metaconfig 3.0 PL70." >&2
1650 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1658 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1659 [-U symbol] [-U symbol=] [-A command:symbol...]
1660 -d : use defaults for all answers.
1661 -e : go on without questioning past the production of config.sh.
1662 -f : specify an alternate default configuration file.
1663 -h : print this help message and exit (with an error status).
1664 -r : reuse C symbols value if possible (skips costly nm extraction).
1665 -s : silent mode, only echoes questions and essential information.
1666 -D : define symbol to have some value:
1667 -D symbol symbol gets the value 'define'
1668 -D symbol=value symbol gets the value 'value'
1669 -E : stop at the end of questions, after having produced config.sh.
1670 -K : do not use unless you know what you are doing.
1671 -O : let -D and -U override definitions from loaded configuration file.
1672 -S : perform variable substitutions on all .SH files (can mix with -f)
1673 -U : undefine symbol:
1674 -U symbol symbol gets the value 'undef'
1675 -U symbol= symbol gets completely empty
1676 -A : manipulate symbol after the platform specific hints have been applied:
1677 -A symbol=value append " "value to symbol
1678 -A append:symbol=value append value to symbol
1679 -A define:symbol=value define symbol to have value
1680 -A clear:symbol define symbol to be ''
1681 -A define:symbol define symbol to be 'define'
1682 -A eval:symbol=value define symbol to be eval of value
1683 -A prepend:symbol=value prepend value to symbol
1684 -A undef:symbol define symbol to be 'undef'
1685 -A undef:symbol= define symbol to be ''
1686 -V : print version number and exit (with a zero status).
1693 case "$fastread$alldone" in
1696 case "$extractsh" in
1699 if test ! -t 0; then
1700 echo "Say 'sh Configure', not 'sh <Configure'"
1710 true) exec 1>/dev/null;;
1713 : run the defines and the undefines, if any, but leave the file out there...
1716 : create the posthint manipulation script and leave the file out there...
1721 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1722 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1723 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1724 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1725 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1728 : Some greps do not return status, grrr.
1729 echo "grimblepritz" >grimble
1730 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1732 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1738 : the following should work in any shell
1742 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1743 cat >contains <<'EOSS'
1744 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1749 : Find the path to the source tree
1752 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1756 *) src=`cd ../$src && pwd` ;;
1769 if test -f $rsrc/Configure && \
1770 $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
1772 : found it, so we are ok.
1775 for src in . .. ../.. ../../.. ../../../..; do
1776 if test -f ../$src/Configure && \
1777 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1788 Sorry, I can't seem to locate the source dir for $package. Please start
1789 Configure with an explicit path -- i.e. /some/path/Configure.
1797 echo "Sources for $package found in \"$src\"." >&4
1801 : script used to extract .SH files with variable substitutions
1802 cat >extract <<'EOS'
1804 echo "Doing variable substitutions on .SH files..."
1805 if test -f MANIFEST; then
1806 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1808 echo "(Looking for .SH files under the source directory.)"
1809 set x `(cd "$src"; find . -name "*.SH" -print)`
1813 0) set x `(cd "$src"; echo *.SH)`; shift;;
1815 if test ! -f "$src/$1"; then
1821 while test $name; do
1822 if test ! -d "$name"; then
1823 create="$name $create";
1824 name=`echo $name | sed -e "s|^[^/]*$||"`;
1825 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1830 for file in $create; do
1839 dir=`expr X$file : 'X\(.*\)/'`
1840 file=`expr X$file : 'X.*/\(.*\)'`
1841 (cd "$dir" && . ./$file)
1851 dir=`expr X$file : 'X\(.*\)/'`
1852 file=`expr X$file : 'X.*/\(.*\)'`
1853 (set x $dir; shift; eval $mkdir_p)
1854 sh <"$src/$dir/$file"
1863 if test -f "$src/config_h.SH"; then
1864 if test ! -f config.h; then
1865 : oops, they left it out of MANIFEST, probably, so do it anyway.
1866 . "$src/config_h.SH"
1871 : extract files and exit if asked to do so
1872 case "$extractsh" in
1874 case "$realsilent" in
1878 case "$config_sh" in
1879 '') config_sh='config.sh';;
1882 echo "Fetching answers from $config_sh..."
1885 test "$override" && . ./optdef.sh
1889 echo "Extraction done."
1894 : Eunice requires " " instead of "", can you believe it
1897 echo "Beginning of configuration questions for $package."
1899 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1901 : first determine how to suppress newline on echo command
1903 echo "Checking echo to see how to suppress newlines..."
1904 (echo "hi there\c" ; echo " ") >.echotmp
1905 if $contains c .echotmp >/dev/null 2>&1 ; then
1916 echo $n "The star should be here-->$c"
1920 : Now test for existence of everything in MANIFEST
1922 if test -f "$rsrc/MANIFEST"; then
1923 echo "First let's make sure your kit is complete. Checking..." >&4
1924 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50)
1927 for filelist in x??; do
1928 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing")
1930 if test -s missing; then
1934 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1936 You have the option of continuing the configuration process, despite the
1937 distinct possibility that your kit is damaged, by typing 'y'es. If you
1938 do, don't blame me if something goes wrong. I advise you to type 'n'o
1939 and contact the author (perlbug@perl.org).
1942 echo $n "Continue? [n] $c" >&4
1946 echo "Continuing..." >&4
1950 echo "ABORTING..." >&4
1955 echo "Looks good..."
1958 echo "There is no MANIFEST file. I hope your kit is complete !"
1963 : Find the appropriate value for a newline for tr
1964 if test -n "$DJGPP"; then
1967 if test X"$trnl" = X; then
1968 case "`echo foo|tr '\n' x 2>/dev/null`" in
1972 if test X"$trnl" = X; then
1973 case "`echo foo|tr '\012' x 2>/dev/null`" in
1974 foox) trnl='\012' ;;
1977 if test X"$trnl" = X; then
1978 case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
1979 fooxy) trnl='\n\r' ;;
1982 if test X"$trnl" = X; then
1985 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1991 : compute the number of columns on the terminal for proper question formatting
1996 : set up the echo used in my read
1997 myecho="case \"\$xxxm\" in
1998 '') echo $n \"\$rp $c\" >&4;;
2000 '') echo $n \"[\$xxxm] $c\";;
2002 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
2004 echo $n \"[\$xxxm] $c\" >&4
2006 echo $n \"\$rp [\$xxxm] $c\" >&4
2012 : now set up to do reads with possible shell escape and default assignment
2018 case "\$fastread" in
2019 yes) case "\$dflt" in
2022 case "\$silent-\$rp" in
2027 *) case "\$silent" in
2028 true) case "\$rp" in
2033 while expr "X\$ans" : "X!" >/dev/null; do
2037 aok=''; eval "ans=\\"\$answ\\"" && aok=y
2045 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
2054 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
2059 echo "(OK, I'll run with -d after this question.)" >&4
2062 echo "*** Sorry, \$1 not supported yet." >&4
2072 echo "*** Substitution done -- please confirm."
2074 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
2079 echo "*** Error -- try again."
2086 case "\$ans\$xxxm\$nostick" in
2098 : create .config dir to save info across Configure sessions
2099 test -d ../.config || mkdir ../.config
2100 cat >../.config/README <<EOF
2101 This directory created by Configure to save information that should
2102 persist across sessions for $package.
2104 You may safely delete it if you wish.
2107 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
2109 $define|true|[yY]*) ;;
2110 *) case "$xversion" in
2113 *** WHOA THERE!!! ***
2115 This is an UNSTABLE DEVELOPMENT release.
2116 The version of this $package distribution is $xversion, that is, odd,
2117 (as opposed to even) and that signifies a development release.
2118 If you want a maintenance release, you want an even-numbered version.
2120 Do ***NOT*** install this into production use.
2121 Data corruption and crashes are possible.
2123 It is most seriously suggested that you do not continue any further
2124 unless you want to help in developing and debugging Perl.
2126 If you *still* want to build perl, you can answer 'y' now,
2127 or pass -Dusedevel to Configure.
2130 rp='Do you really want to continue?'
2134 [yY]) echo >&4 "Okay, continuing."
2135 usedevel="$define" ;;
2136 *) echo >&4 "Okay, bye."
2146 case "$versiononly" in
2147 '') versiononly="$define" ;;
2149 case "$installusrbinperl" in
2150 '') installusrbinperl="$undef" ;;
2155 : general instructions
2158 user=`(logname) 2>/dev/null`
2160 '') user=`whoami 2>&1`;;
2162 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2165 rp='Would you like to see the instructions?'
2176 This installation shell script will examine your system and ask you questions
2177 to determine how the perl5 package should be installed. If you get
2178 stuck on a question, you may use a ! shell escape to start a subshell or
2179 execute a command. Many of the questions will have default answers in square
2180 brackets; typing carriage return will give you the default.
2182 On some of the questions which ask for file or directory names you are allowed
2183 to use the ~name construct to specify the login directory belonging to "name",
2184 even if you don't have a shell which knows about that. Questions where this is
2185 allowed will be marked "(~name ok)".
2189 dflt='Type carriage return to continue'
2193 The prompter used in this script allows you to use shell variables and
2194 backticks in your answers. You may use $1, $2, etc... to refer to the words
2195 in the default answer, as if the default line was a set of arguments given to a
2196 script shell. This means you may also use $* to repeat the whole default line,
2197 so you do not have to re-type everything to add something to the default.
2199 Everytime there is a substitution, you will have to confirm. If there is an
2200 error (e.g. an unmatched backtick), the default answer will remain unchanged
2201 and you will be prompted again.
2203 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2204 the questions and use the computed defaults (or the previous answers if there
2205 was already a config.sh file). Type 'Configure -h' for a list of options.
2206 You may also start interactively and then answer '& -d' at any prompt to turn
2207 on the non-interactive behaviour for the remainder of the execution.
2213 Much effort has been expended to ensure that this shell script will run on any
2214 Unix system. If despite that it blows up on yours, your best bet is to edit
2215 Configure and run it again. If you can't run Configure for some reason,
2216 you'll have to generate a config.sh file by hand. Whatever problems you
2217 have, let me (perlbug@perl.org) know how I blew it.
2219 This installation script affects things in two ways:
2221 1) it may do direct variable substitutions on some of the files included
2223 2) it builds a config.h file for inclusion in C programs. You may edit
2224 any of these files as the need arises after running this script.
2226 If you make a mistake on a question, there is no easy way to back up to it
2227 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2228 files. Configure will offer to let you do this before it runs the SH files.
2231 dflt='Type carriage return to continue'
2233 case "$firsttime" in
2234 true) echo $user >>../.config/instruct;;
2238 : find out where common programs are
2240 echo "Locating common programs..." >&4
2253 if test -d \$dir/\$thing; then
2259 for thisthing in \$dir/\$thing; do
2260 : just loop through to pick last item
2262 if test -f \$thisthing; then
2265 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2268 elif test -f \$dir/\$thing.exe; then
2269 if test -n "$DJGPP"; then
2270 echo \$dir/\$thing.exe
2271 elif test "$eunicefix" != ":"; then
2272 : on Eunice apparently
2326 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2327 pth="$pth /lib /usr/lib"
2328 for file in $loclist; do
2332 if test -f "$xxx"; then
2335 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2336 xxx=`./loc $file $file $pth`
2339 '') xxx=`./loc $file $file $pth`;;
2340 *) xxx=`./loc $xxx $xxx $pth`;;
2342 eval $file=$xxx$_exe
2346 echo $file is in $xxx.
2349 echo $file is in $xxx.
2352 echo "I don't know where '$file' is, and my life depends on it." >&4
2353 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2359 echo "Don't worry if any of the following aren't found..."
2361 for file in $trylist; do
2365 if test -f "$xxx"; then
2368 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2369 xxx=`./loc $file $file $pth`
2372 '') xxx=`./loc $file $file $pth`;;
2373 *) xxx=`./loc $xxx $xxx $pth`;;
2375 eval $file=$xxx$_exe
2379 echo $file is in $xxx.
2382 echo $file is in $xxx.
2385 echo "I don't see $file out there, $say."
2392 echo "Substituting grep for egrep."
2399 echo "Substituting cp for ln."
2408 echo "I can't find make or gmake, and my life depends on it." >&4
2409 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2417 *) # We can't have osname yet.
2418 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2419 # Assume that gmake, if found, is definitely GNU make
2420 # and prefer it over the system make.
2421 echo "Substituting gmake for make."
2429 echo "Hopefully test is built into your sh."
2432 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2433 echo "Using the test built into your sh."
2441 echo "Hopefully echo is built into your sh."
2446 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2447 $echo $n "hi there$c" >foo1
2448 echo $n "hi there$c" >foo2
2449 if cmp foo1 foo2 >/dev/null 2>&1; then
2450 echo "They are compatible. In fact, they may be identical."
2457 They are not compatible! You are probably running ksh on a non-USG system.
2458 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2459 have echo built in and we may have to run some Bourne shell scripts. That
2460 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2463 $echo $n "The star should be here-->$c"
2473 cat <<'EOSC' >>trygcc
2478 int main(int argc, char *argv[]) {
2482 if $cc -o try $ccflags $ldflags try.c; then
2485 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2491 case "`$cc -v -c try.c 2>&1`" in
2494 if $test X"$trygcc" = Xyes; then
2495 if gcc -o try -c try.c; then
2497 echo "You seem to have a working gcc, though." >&4
2498 rp="Would you like to use it?"
2500 if $test -f myread; then
2503 if $test -f UU/myread; then
2506 echo "Cannot find myread, sorry. Aborting." >&2
2511 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2512 if $test -f usethreads.cbu; then
2515 *** However, any setting of the C compiler flags (e.g. for thread support)
2516 *** has been lost. It may be necessary to pass -Dcc=gcc to Configure
2517 *** (together with e.g. -Dusethreads).
2533 cat <<'EOSC' >>checkcc
2538 int main(int argc, char *argv[]) {
2542 if $cc -o try $ccflags $ldflags try.c; then
2545 if $test X"$despair" = Xyes; then
2546 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2549 You need to find a working C compiler.
2550 Either (purchase and) install the C compiler supplied by your OS vendor,
2551 or for a free C compiler try http://gcc.gnu.org/
2552 I cannot continue any further, aborting.
2561 : determine whether symbolic links are supported
2564 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2565 echo "Symbolic links are supported." >&4
2568 echo "Symbolic links are NOT supported." >&4
2573 : determine whether symbolic links are supported
2577 echo "Checking how to test for symbolic links..." >&4
2579 if $test "X$issymlink" = X; then
2581 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2582 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2584 if test $? = 0; then
2587 echo "Your builtin 'test -h' may be broken." >&4
2590 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2593 if test -f "$p/$test"; then
2602 echo "Trying external '$test -h'." >&4
2603 issymlink="$test -h"
2604 if $test ! -h sym >/dev/null 2>&1; then
2605 echo "External '$test -h' is broken, too." >&4
2613 if $test "X$issymlink" = X; then
2614 if $test -L sym 2>/dev/null; then
2615 issymlink="$test -L"
2616 echo "The builtin '$test -L' worked." >&4
2619 if $test "X$issymlink" != X; then
2620 echo "You can test for symbolic links with '$issymlink'." >&4
2622 echo "I do not know how you can test for symbolic links." >&4
2626 *) echo "No symbolic links, so not testing for their testing..." >&4
2632 case "$mksymlinks" in
2635 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2638 *) case "$lns:$issymlink" in
2639 *"ln"*" -s:"*"test -"?)
2640 echo "Creating the symbolic links..." >&4
2641 echo "(First creating the subdirectories...)" >&4
2643 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2645 test -z "$directory" && break
2649 if test ! -d t/base; then
2650 echo "Failed to create the subdirectories. Aborting." >&4
2653 echo "(Then creating the symlinks...)" >&4
2654 awk '{print $1}' $src/MANIFEST | while true; do
2656 test -z "$filename" && break
2657 if test -f $filename; then
2658 if $issymlink $filename; then
2662 if test -f $filename; then
2663 echo "$filename already exists, not symlinking."
2665 ln -s $src/$filename $filename
2669 if test ! -f t/base/lex.t; then
2670 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2675 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2684 case "$usecrosscompile" in
2686 $echo "Cross-compiling..."
2689 *-*-gcc) # A cross-compiling gcc, probably.
2690 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2692 # leave out ld, choosing it is more complex
2694 ranlib=$targetarch-ranlib
2695 $echo 'extern int foo;' > try.c
2696 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2698 if $test $# -gt 0; then
2700 incpth="`$echo $incpth|$sed 's/^ //'`"
2701 echo "Guessing incpth '$incpth'." >&4
2703 j="`$echo $i|$sed 's,/include$,/lib,'`"
2704 if $test -d $j; then
2708 libpth="`$echo $libpth|$sed 's/^ //'`"
2709 echo "Guessing libpth '$libpth'." >&4
2714 case "$targetarch" in
2715 '') echo "Targetarch not defined." >&4; croak=y ;;
2716 *) echo "Using targetarch $targetarch." >&4 ;;
2719 '') echo "Incpth not defined." >&4; croak=y ;;
2720 *) echo "Using incpth '$incpth'." >&4 ;;
2723 '') echo "Libpth not defined." >&4; croak=y ;;
2724 *) echo "Using libpth '$libpth'." >&4 ;;
2727 '') for i in $incpth; do
2728 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2730 echo "Guessing usrinc $usrinc." >&4
2735 '') echo "Usrinc not defined." >&4; croak=y ;;
2738 *) echo "Using usrinc $usrinc." >&4 ;;
2740 case "$targethost" in
2741 '') echo "Targethost not defined." >&4; croak=y ;;
2742 *) echo "Using targethost $targethost." >&4
2747 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2750 /*) run=$src/Cross/run
2751 targetmkdir=$src/Cross/mkdir
2753 from=$src/Cross/from
2755 *) pwd=`$test -f ../Configure & cd ..; pwd`
2757 targetmkdir=$pwd/Cross/mkdir
2759 from=$pwd/Cross/from
2762 case "$targetrun" in
2763 '') targetrun=ssh ;;
2768 case "$targetfrom" in
2769 '') targetfrom=scp ;;
2773 from=$from-$targetfrom
2774 case "$targetdir" in
2776 echo "Guessing targetdir $targetdir." >&4
2779 case "$targetuser" in
2781 echo "Guessing targetuser $targetuser." >&4
2784 case "$targetfrom" in
2788 case "$targetrun" in
2800 '') cwd=$targetdir ;;
2804 if $test ! -f \$exe.xok; then
2808 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2811 *) echo "Unknown targetrun '$targetrun'" >&4
2815 case "$targetmkdir" in
2817 cat >$targetmkdir <<EOF
2819 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2821 $chmod a+rx $targetmkdir
2823 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2835 $targetmkdir \`dirname \$f\`
2836 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2839 $targetmkdir $targetdir/\`dirname \$f\`
2840 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2853 $mkdir -p $targetdir/\`dirname \$f\`
2854 $cp \$f $targetdir/\$f || exit 1
2857 $targetmkdir $targetdir/\`dirname \$f\`
2858 $cp \$f $targetdir/\$f || exit 1
2865 *) echo "Unknown targetto '$targetto'" >&4
2869 case "$targetfrom" in
2876 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2881 cp) cat >$from <<EOF
2886 cp $targetdir/\$f . || exit 1
2891 *) echo "Unknown targetfrom '$targetfrom'" >&4
2895 if $test ! -f $run; then
2896 echo "Target 'run' script '$run' not found." >&4
2900 if $test ! -f $to; then
2901 echo "Target 'to' script '$to' not found." >&4
2905 if $test ! -f $from; then
2906 echo "Target 'from' script '$from' not found." >&4
2910 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2914 Using '$run' for remote execution,
2915 and '$from' and '$to'
2916 for remote file transfer.
2922 usecrosscompile='undef'
2927 : see whether [:lower:] and [:upper:] are supported character classes
2929 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2931 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2935 *) # There is a discontinuity in EBCDIC between 'R' and 'S'
2936 # (0xd9 and 0xe2), therefore that is a nice testing point.
2937 if test "X$up" = X -o "X$low" = X; then
2938 case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in
2944 if test "X$up" = X -o "X$low" = X; then
2945 case "`echo RS | $tr R-S r-s 2>/dev/null`" in
2951 if test "X$up" = X -o "X$low" = X; then
2952 case "`echo RS | od -x 2>/dev/null`" in
2954 echo "Hey, this might be EBCDIC." >&4
2955 if test "X$up" = X -o "X$low" = X; then
2956 case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2957 rs) up='[A-IJ-RS-Z]'
2962 if test "X$up" = X -o "X$low" = X; then
2963 case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2973 case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in
2975 echo "Using $up and $low to convert case." >&4
2978 echo "I don't know how to translate letters from upper to lower case." >&4
2979 echo "Your tr is not acting any way I know of." >&4
2983 : set up the translation script tr, must be called with ./tr of course
2987 '[A-Z][a-z]') exec $tr '$up' '$low';;
2988 '[a-z][A-Z]') exec $tr '$low' '$up';;
2995 : Try to determine whether config.sh was made on this system
2996 case "$config_sh" in
2998 myuname=`$uname -a 2>/dev/null`
2999 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
3000 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
3001 # because the A-Z/a-z are not consecutive.
3002 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
3003 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
3004 newmyuname="$myuname"
3006 case "$knowitall" in
3008 if test -f ../config.sh; then
3009 if $contains myuname= ../config.sh >/dev/null 2>&1; then
3010 eval "`grep myuname= ../config.sh`"
3012 if test "X$myuname" = "X$newmyuname"; then
3020 : Get old answers from old config file if Configure was run on the
3021 : same system, otherwise use the hints.
3024 if test -f config.sh; then
3026 rp="I see a config.sh file. Shall I use it to set the defaults?"
3029 n*|N*) echo "OK, I'll ignore it."
3030 mv config.sh config.sh.old
3031 myuname="$newmyuname"
3033 *) echo "Fetching default answers from your old config.sh file..." >&4
3041 : Older versions did not always set $sh. Catch re-use of such
3051 if test ! -f config.sh; then
3054 First time through, eh? I have some defaults handy for some systems
3055 that need some extra help getting the Configure answers right:
3058 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
3060 : Half the following guesses are probably wrong... If you have better
3061 : tests or hints, please send them to perlbug@perl.org
3062 : The metaconfig authors would also appreciate a copy...
3063 $test -f /irix && osname=irix
3064 $test -f /xenix && osname=sco_xenix
3065 $test -f /dynix && osname=dynix
3066 $test -f /dnix && osname=dnix
3067 $test -f /lynx.os && osname=lynxos
3068 $test -f /unicos && osname=unicos && osvers=`$uname -r`
3069 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
3070 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
3071 $test -f /bin/mips && /bin/mips && osname=mips
3072 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
3073 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
3074 $test -d /usr/apollo/bin && osname=apollo
3075 $test -f /etc/saf/_sactab && osname=svr4
3076 $test -d /usr/include/minix && osname=minix
3077 $test -f /system/gnu_library/bin/ar.pm && osname=vos
3078 if $test -d /MachTen -o -d /MachTen_Folder; then
3080 if $test -x /sbin/version; then
3081 osvers=`/sbin/version | $awk '{print $2}' |
3082 $sed -e 's/[A-Za-z]$//'`
3083 elif $test -x /usr/etc/version; then
3084 osvers=`/usr/etc/version | $awk '{print $2}' |
3085 $sed -e 's/[A-Za-z]$//'`
3091 $test -f /sys/posix.dll &&
3092 $test -f /usr/bin/what &&
3093 set X `/usr/bin/what /sys/posix.dll` &&
3094 $test "$3" = UWIN &&
3098 if $test -f $uname; then
3106 umips) osname=umips ;;
3109 [23]100) osname=mips ;;
3110 next*) osname=next ;;
3112 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
3113 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
3116 elif $test -f /etc/kconfig; then
3118 if test "$lns" = "$ln -s"; then
3120 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3122 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3129 if test -n "$DJGPP"; then
3138 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3140 # oslevel can fail with:
3141 # oslevel: Unable to acquire lock.
3142 *not\ found) osvers="$4"."$3" ;;
3143 '<3240'|'<>3240') osvers=3.2.0 ;;
3144 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3145 '=3250'|'>3250') osvers=3.2.5 ;;
3149 bsd386) osname=bsd386
3152 cygwin*) osname=cygwin
3155 *dc.osx) osname=dcosx
3161 domainos) osname=apollo
3167 dragonfly) osname=dragonfly
3170 dynixptx*) osname=dynixptx
3171 osvers=`echo "$4"|sed 's/^v//'`
3173 freebsd) osname=freebsd
3175 genix) osname=genix ;;
3179 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3195 netbsd*) osname=netbsd
3198 news-os) osvers="$3"
3200 4*) osname=newsos4 ;;
3204 next*) osname=next ;;
3205 nonstop-ux) osname=nonstopux ;;
3206 openbsd) osname=openbsd
3212 POSIX-BC | posix-bc ) osname=posix-bc
3215 powerux | power_ux | powermax_os | powermaxos | \
3216 powerunix | power_unix) osname=powerux
3222 solaris) osname=solaris
3224 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3231 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3235 titanos) osname=titanos
3244 ultrix) osname=ultrix
3247 osf1|mls+) case "$5" in
3250 osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3253 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3256 hp*) osname=hp_osf1 ;;
3257 mips) osname=mips_osf1 ;;
3260 # UnixWare 7.1.2 is known as Open UNIX 8
3261 openunix|unixware) osname=svr5
3269 $2) case "$osname" in
3273 : svr4.x or possibly later
3283 if test -f /stand/boot ; then
3284 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3285 if test -n "$INITPROG" -a -f "$INITPROG"; then
3286 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3287 if test -n "$isesix"; then
3295 *) if test -f /etc/systemid; then
3297 set `echo $3 | $sed 's/\./ /g'` $4
3298 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3300 elif $test -f $src/hints/sco_$1_$2.sh; then
3302 elif $test -f $src/hints/sco_$1.sh; then
3307 '') : Still unknown. Probably a generic Sys V.
3316 *) case "$osname" in
3317 '') : Still unknown. Probably a generic BSD.
3325 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3326 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3327 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3330 $rm -f UU/kernel.what
3331 elif test -d c:/. -o -n "$is_os2" ; then
3338 case "$targetarch" in
3341 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3346 : Now look for a hint file osname_osvers, unless one has been
3347 : specified already.
3350 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3351 : Also try without trailing minor version numbers.
3352 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3353 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3354 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3355 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3358 *) case "$osvers" in
3361 *) if $test -f $src/hints/$file.sh ; then
3363 elif $test -f $src/hints/$xfile.sh ; then
3365 elif $test -f $src/hints/$xxfile.sh ; then
3367 elif $test -f $src/hints/$xxxfile.sh ; then
3369 elif $test -f $src/hints/$xxxxfile.sh ; then
3371 elif $test -f "$src/hints/${osname}.sh" ; then
3380 if $test -f Policy.sh ; then
3383 none) dflt="Policy" ;;
3384 *) dflt="Policy $dflt" ;;
3389 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3393 if $test -f Policy.sh ; then
3396 There's also a Policy hint file available, which should make the
3397 site-specific (policy) questions easier to answer.
3404 You may give one or more space-separated answers, or "none" if appropriate.
3405 If you have a handcrafted Policy.sh file or a Policy.sh file generated by a
3406 previous run of Configure, you may specify it as well as or instead of
3407 OS-specific hints. If hints are provided for your OS, you should use them:
3408 although Perl can probably be built without hints on many platforms, using
3409 hints often improve performance and may enable features that Configure can't
3410 set up on its own. If there are no hints that match your OS, specify "none";
3411 DO NOT give a wrong version or a wrong OS.
3415 rp="Which of these apply, if any?"
3418 for file in $tans; do
3419 if $test X$file = XPolicy -a -f Policy.sh; then
3421 $cat Policy.sh >> UU/config.sh
3422 elif $test -f $src/hints/$file.sh; then
3423 . $src/hints/$file.sh
3424 $cat $src/hints/$file.sh >> UU/config.sh
3425 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3428 : Give one chance to correct a possible typo.
3429 echo "$file.sh does not exist"
3431 rp="hint to use instead?"
3433 for file in $ans; do
3434 if $test -f "$src/hints/$file.sh"; then
3435 . $src/hints/$file.sh
3436 $cat $src/hints/$file.sh >> UU/config.sh
3437 elif $test X$ans = X -o X$ans = Xnone ; then
3440 echo "$file.sh does not exist -- ignored."
3447 : Remember our hint file for later.
3448 if $test -f "$src/hints/$file.sh" ; then
3458 echo "Fetching default answers from $config_sh..." >&4
3462 cp $config_sh config.sh 2>/dev/null
3472 test "$override" && . ./optdef.sh
3474 : Restore computed paths
3475 for file in $loclist $trylist; do
3476 eval $file="\$_$file"
3481 Configure uses the operating system name and version to set some defaults.
3482 The default value is probably right if the name rings a bell. Otherwise,
3483 since spelling matters for me, either accept the default or answer "none"
3490 ''|' '|none) dflt=none ;;
3491 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3494 *) dflt="$osname" ;;
3496 rp="Operating system name?"
3500 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3506 ''|' '|none) dflt=none ;;
3507 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3508 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3510 ''|' ') dflt=none ;;
3515 *) dflt="$osvers" ;;
3517 rp="Operating system version?"
3527 : who configured the system
3528 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3531 cf_by=`(logname) 2>/dev/null`
3534 cf_by=`(whoami) 2>/dev/null`
3536 "") cf_by=unknown ;;
3541 : decide how portable to be. Allow command line overrides.
3542 case "$d_portable" in
3544 *) d_portable="$define" ;;
3547 : set up shell script to do ~ expansion
3553 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3556 if $test -f /bin/csh; then
3557 /bin/csh -f -c "glob \$1"
3562 name=\`$expr x\$1 : '..\([^/]*\)'\`
3563 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3564 if $test ! -d "\$dir"; then
3566 echo "\$me: can't locate home directory for: \$name" >&2
3571 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3587 : now set up to get a file name
3591 cat <<'EOSC' >>getfile
3607 : getfile will accept an answer from the comma-separated list
3608 : enclosed in parentheses even if it does not meet other criteria.
3609 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3610 fn=`echo $fn | sed 's/(.*)//'`
3616 loc_file=`expr $fn : '.*:\(.*\)'`
3617 fn=`expr $fn : '\(.*\):.*'`
3625 */*) fullpath=true;;
3634 *e*) exp_file=true;;
3637 *p*) nopath_ok=true;;
3642 *d*) type='Directory';;
3643 *l*) type='Locate';;
3648 Locate) what='File';;
3653 case "$d_portable" in
3661 while test "$type"; do
3666 true) rp="$rp (~name ok)";;
3669 if test -f UU/getfile.ok && \
3670 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3689 value=`UU/filexp $ans`
3692 if test "$ans" != "$value"; then
3693 echo "(That expands to $value on this system.)"
3707 /*) value="$ansexp" ;;
3708 [a-zA-Z]:/*) value="$ansexp" ;;
3713 echo "I shall only accept a full path name, as in /bin/ls." >&4
3714 echo "Use a ! shell escape if you wish to check pathnames." >&4
3717 echo "Please give a full path name, starting with slash." >&4
3720 echo "Note that using ~name is ok provided it expands well." >&4
3733 for fp in $gfpth; do
3734 if test "X$fp" = X.; then
3739 if test -f "$pf"; then
3741 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
3743 echo "($value is not a plain file, but that's ok.)"
3746 if test X"$type" = X; then
3753 for fp in $gfpth; do
3754 if test "X$fp" = X.; then
3759 direxp="$fp/$ansexp"
3761 if test -d "$direxp"; then
3769 if test -d "$ansexp"; then
3770 echo "(Looking for $loc_file in directory $value.)"
3771 value="$value/$loc_file"
3772 ansexp="$ansexp/$loc_file"
3774 if test -f "$ansexp"; then
3777 case "$nopath_ok" in
3778 true) case "$value" in
3780 *) echo "Assuming $value will be in people's path."
3796 if test "$fastread" = yes; then
3801 rp="$what $value doesn't exist. Use that name anyway?"
3820 test "X$gfpthkeep" != Xy && gfpth=""
3823 : determine root of directory hierarchy where package will be installed.
3826 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
3829 dflt=`echo "$prefix" | sed 's/.$//'`
3837 By default, $package will be installed in $dflt/bin, manual pages
3838 under $dflt/man, etc..., i.e. with $dflt as prefix for all
3839 installation directories. Typically this is something like /usr/local.
3840 If you wish to have binaries under /usr/bin but other parts of the
3841 installation under /usr/local, that's ok: you will be prompted
3842 separately for each of the installation directories, the prefix being
3843 only used to set the defaults.
3847 rp='Installation prefix to use?'
3855 *) oldprefix="$prefix";;
3864 *) afsroot=$afsroot ;;
3870 $define|true) afs=true ;;
3871 $undef|false) afs=false ;;
3872 *) if test -d $afsroot; then
3880 echo "AFS may be running... I'll be extra cautious then..." >&4
3882 echo "AFS does not seem to be running..." >&4
3885 : determine installation prefix for where package is to be installed.
3889 Since you are running AFS, I need to distinguish the directory in which
3890 files will reside from the directory in which they are installed (and from
3891 which they are presumably copied to the former directory by occult means).
3894 case "$installprefix" in
3895 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
3896 *) dflt="$installprefix";;
3901 In some special cases, particularly when building $package for distribution,
3902 it is convenient to distinguish the directory in which files should be
3903 installed from the directory ($prefix) in which they will
3904 eventually reside. For most users, these two directories are the same.
3907 case "$installprefix" in
3909 *) dflt=$installprefix;;
3913 rp='What installation prefix should I use for installing files?'
3915 installprefix="$ans"
3916 installprefixexp="$ansexp"
3918 : Perform the prefixexp/installprefixexp correction if necessary
3919 cat <<EOS >installprefix
3922 cat <<'EOSC' >>installprefix
3923 : Change installation prefix, if necessary.
3924 if $test X"$prefix" != X"$installprefix"; then
3925 eval "install${prefixvar}=\`echo \$${prefixvar}exp | sed \"s#^\$prefixexp#\$installprefixexp#\"\`"
3927 eval "install${prefixvar}=\"\$${prefixvar}exp\""
3930 chmod +x installprefix
3931 $eunicefix installprefix
3933 : Set variables such as privlib and privlibexp from the output of ./getfile
3934 : performing the prefixexp/installprefixexp correction if necessary.
3935 cat <<EOS >setprefixvar
3938 cat <<'EOSC' >>setprefixvar
3939 eval "${prefixvar}=\"\$ans\""
3940 eval "${prefixvar}exp=\"\$ansexp\""
3943 chmod +x setprefixvar
3944 $eunicefix setprefixvar
3946 : set up the script used to warn in case of inconsistency
3955 '') echo "The $hint value for \$$var on this machine was \"$was\"!" >&4
3957 *) echo "Hmm. Based on the hints in hints/$hintfile.sh, " >&4
3958 echo "the $hint value for \$$var on this machine was \"$was\"!" >&4
3963 echo "*** WHOA THERE!!! ***" >&4
3964 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
3967 rp=" Keep the $hint value?"
3970 y) td=$was; tu=$was;;
3974 : function used to set $1 to $val
3975 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
3977 $define$undef) . ./whoa; eval "$var=\$td";;
3978 $undef$define) . ./whoa; eval "$var=\$tu";;
3979 *) eval "$var=$val";;
3983 $define|true|[yY]*) dflt='y';;
3988 Perl can be built to use the SOCKS proxy protocol library. To do so,
3989 Configure must be run with -Dusesocks. If you use SOCKS you also need
3990 to use the PerlIO abstraction layer, this will be implicitly selected.
3992 If this doesn't make any sense to you, just accept the default '$dflt'.
3994 rp='Build Perl for SOCKS?'
3997 y|Y) val="$define" ;;
4004 $define|true|[yY]*) useperlio="$define";;
4007 case "$useperlio" in
4008 $define|true|[yY]*|'') dflt='y';;
4013 Previous version of $package used the standard IO mechanisms as
4014 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
4015 alternate IO mechanisms via the PerlIO abstraction layer, but the
4016 stdio mechanism is still available if needed. The abstraction layer
4017 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
4018 Using PerlIO with sfio may cause problems with some extension modules.
4020 If this doesn't make any sense to you, just accept the default '$dflt'.
4022 rp='Use the PerlIO abstraction layer?'
4029 echo "Ok, doing things the stdio way."
4038 case "$useperlio" in
4039 $define|true|[yY]*) ;;
4042 You are using the SOCKS proxy protocol library which means that you
4043 should also use the PerlIO layer. You may be headed for trouble.
4052 : get the patchlevel
4054 echo "Getting the current patchlevel..." >&4
4055 if $test -r $rsrc/patchlevel.h;then
4056 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
4057 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
4058 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4059 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
4060 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
4061 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4062 perl_patchlevel=`egrep 'define PERL_PATCHNUM [0-9][0-9]|,"MAINT[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
4071 $echo "(You do not have patchlevel.h. Eek.)"
4073 if $test -r $rsrc/.patch ; then
4074 if $test "X$perl_patchlevel" = "X" || $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
4075 perl_patchlevel=`cat $rsrc/.patch`
4078 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
4079 version_patchlevel_string="version $patchlevel subversion $subversion"
4080 case "$perl_patchlevel" in
4082 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
4085 $echo "(You have $package $version_patchlevel_string.)"
4089 : XXX Should be a Configure test for double-dots in filenames.
4090 version=`echo $revision $patchlevel $subversion | \
4091 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
4092 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4093 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
4096 version=`echo $revision $patchlevel $subversion | \
4097 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
4098 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4099 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
4102 : Special case the 5.005_xx maintenance series, which used 5.005
4103 : without any subversion label as a subdirectory in $sitelib
4104 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
4105 api_versionstring='5.005'
4108 case "$usethreads" in
4109 $define|true|[yY]*) dflt='y';;
4110 *) # Catch case where user specified ithreads or 5005threads but
4111 # forgot -Dusethreads (A.D. 4/2002)
4112 case "$useithreads$use5005threads" in
4114 case "$useperlio" in
4115 "$define") dflt='y' ;;
4125 Perl can be built to take advantage of threads on some systems.
4126 To do so, Configure can be run with -Dusethreads.
4128 Note that Perl built with threading support runs slightly slower
4129 and uses more memory than plain Perl. The current implementation
4130 is believed to be stable, but it is fairly new, and so should be
4131 treated with caution.
4133 If this doesn't make any sense to you, just accept the default '$dflt'.
4135 rp='Build a threading Perl?'
4138 y|Y) val="$define" ;;
4144 if $test $patchlevel -lt 9; then
4145 case "$usethreads" in
4149 Since release 5.6, Perl has had two different threading implementations,
4150 the newer interpreter-based version (ithreads) with one interpreter per
4151 thread, and the older 5.005 version (5005threads).
4152 The 5005threads version is effectively unmaintained and will probably be
4153 removed in Perl 5.10, so there should be no need to build a Perl using it
4154 unless needed for backwards compatibility with some existing 5.005threads
4158 : Default to ithreads unless overridden on command line or with
4161 case "$use5005threads" in
4162 $define|true|[yY]*) dflt='n';;
4164 case "$useithreads" in
4165 $undef|false|[nN]*) dflt='n';;
4167 rp='Use the newer interpreter-based ithreads?'
4170 y|Y) val="$define" ;;
4175 : Now set use5005threads to the opposite value.
4176 case "$useithreads" in
4177 $define) val="$undef" ;;
4184 useithreads="$undef"
4185 use5005threads="$undef"
4189 case "$useithreads$use5005threads" in
4193 You cannot have both the ithreads and the 5.005 threads enabled
4194 at the same time. Disabling the 5.005 threads since they are
4195 much less stable than the ithreads.
4198 use5005threads="$undef"
4203 : perl-5.9.x and later
4205 use5005threads="$undef"
4206 case "$usethreads" in
4208 : Default to ithreads unless overridden on command line or with
4211 case "$useithreads" in
4212 $undef|false|[nN]*) dflt='n';;
4214 rp='Use the newer interpreter-based ithreads?'
4217 y|Y) val="$define" ;;
4224 useithreads="$undef"
4230 if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then
4233 *** To build with ithreads you must also use the PerlIO layer.
4234 *** Cannot continue, aborting.
4240 case "$d_oldpthreads" in
4241 '') : Configure tests would be welcome here. For now, assume undef.
4243 *) val="$d_oldpthreads" ;;
4249 : Look for a hint-file generated 'call-back-unit'. If the
4250 : user has specified that a threading perl is to be built,
4251 : we may need to set or change some other defaults.
4252 if $test -f usethreads.cbu; then
4253 echo "Your platform has some specific hints regarding threaded builds, using them..."
4256 case "$usethreads" in
4257 "$define"|true|[yY]*)
4259 (Your platform does not have any specific hints for threaded builds.
4260 Assuming POSIX threads, then.)
4268 Perl can be built so that multiple Perl interpreters can coexist
4269 within the same Perl executable.
4272 case "$useithreads" in
4275 This multiple interpreter support is required for interpreter-based threads.
4279 *) case "$usemultiplicity" in
4280 $define|true|[yY]*) dflt='y';;
4284 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
4285 rp='Build Perl for multiplicity?'
4288 y|Y) val="$define" ;;
4297 case "$usemorebits" in
4298 "$define"|true|[yY]*)
4299 use64bitint="$define"
4300 uselongdouble="$define"
4301 usemorebits="$define"
4303 *) usemorebits="$undef"
4307 : make some quick guesses about what we are up against
4309 $echo $n "Hmm... $c"
4319 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
4320 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
4322 echo "Looks kind of like an OSF/1 system, but we'll see..."
4324 elif test `echo abc | $tr a-z A-Z` = Abc ; then
4325 xxx=`./loc addbib blurfl $pth`
4326 if $test -f $xxx; then
4327 echo "Looks kind of like a USG system with BSD features, but we'll see..."
4331 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
4332 echo "Looks kind of like an extended USG system, but we'll see..."
4334 echo "Looks kind of like a USG system, but we'll see..."
4338 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
4339 echo "Looks kind of like a BSD system, but we'll see..."
4343 echo "Looks kind of like a Version 7 system, but we'll see..."
4346 case "$eunicefix" in
4349 There is, however, a strange, musty smell in the air that reminds me of
4350 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
4354 : it so happens the Eunice I know will not run shell scripts in Unix format
4358 echo "Congratulations. You aren't running Eunice."
4362 : Detect OS2. The p_ variable is set above in the Head.U unit.
4363 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
4364 : semicolon as a patch separator
4369 I have the feeling something is not exactly right, however...don't tell me...
4370 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
4371 (Or you may be running DOS with DJGPP.)
4376 if test -f /xenix; then
4377 echo "Actually, this looks more like a XENIX system..."
4382 echo "It's not Xenix..."
4387 if test -f /venix; then
4388 echo "Actually, this looks more like a VENIX system..."
4395 echo "Nor is it Venix..."
4398 chmod +x bsd usg v7 osf1 eunice xenix venix os2
4399 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
4406 rp="Use which C compiler?"
4410 : See if they have not cc but they do have gcc
4412 : Look for a hint-file generated 'call-back-unit'. Now that the
4413 : user has specified the compiler, we may need to set or change some
4415 if $test -f cc.cbu; then
4421 echo "Checking for GNU cc in disguise and/or its version number..." >&4
4425 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
4427 printf("%s\n", __VERSION__);
4429 printf("%s\n", "1");
4435 if $cc -o try $ccflags $ldflags try.c; then
4436 gccversion=`$run ./try`
4437 case "$gccversion" in
4438 '') echo "You are not using GNU cc." ;;
4439 *) echo "You are using GNU cc $gccversion."
4445 echo "*** WHOA THERE!!! ***" >&4
4446 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
4447 case "$knowitall" in
4449 echo " You'd better start hunting for one and let me know about it." >&4
4455 case "$gccversion" in
4456 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
4458 case "$gccversion" in
4459 '') gccosandvers='' ;;
4460 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
4461 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
4463 case "$gccosandvers" in
4464 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
4465 $osname$osvers) ;; # looking good
4466 $osname*) cat <<EOM >&4
4468 *** WHOA THERE!!! ***
4470 Your gcc has not been compiled for the exact release of
4471 your operating system ($gccosandvers versus $osname$osvers).
4473 In general it is a good idea to keep gcc synchronized with
4474 the operating system because otherwise serious problems
4475 may ensue when trying to compile software, like Perl.
4477 I'm trying to be optimistic here, though, and will continue.
4478 If later during the configuration and build icky compilation
4479 problems appear (headerfile conflicts being the most common
4480 manifestation), I suggest reinstalling the gcc to match
4481 your operating system release.
4485 *) gccosandvers='' ;; # failed to parse, better be silent
4493 # gcc 3.* complain about adding -Idirectories that they already know about,
4494 # so we will take those off from locincpth.
4495 case "$gccversion" in
4497 echo "main(){}">try.c
4498 for incdir in $locincpth; do
4499 warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
4500 grep '^c[cp]p*[01]: warning: changing search order '`
4501 if test "X$warn" != X; then
4502 locincpth=`echo " $locincpth " | sed "s! $incdir ! !"`
4508 : What should the include directory be ?
4510 $echo $n "Hmm... $c"
4514 if $test -f /bin/mips && /bin/mips; then
4515 echo "Looks like a MIPS system..."
4516 $cat >usr.c <<'EOCP'
4517 #ifdef SYSTYPE_BSD43
4521 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4522 dflt='/bsd43/usr/include'
4526 mips_type='System V'
4528 $rm -f usr.c usr.out
4529 echo "and you're compiling with the $mips_type compiler and libraries."
4533 echo "Doesn't look like a MIPS system."
4543 case "$xxx_prompt" in
4546 rp='Where are the include files you want to use?'
4554 : see how we invoke the C preprocessor
4556 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4557 cat <<'EOT' >testcpp.c
4563 if test ! -f cppstdin; then
4564 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4565 # AIX cc -E doesn't show the absolute headerfile
4566 # locations but we'll cheat by using the -M flag.
4567 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
4569 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4572 echo "Keeping your $hint cppstdin wrapper."
4575 wrapper=`pwd`/cppstdin
4579 if $test "X$cppstdin" != "X" && \
4580 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4581 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4583 echo "You used to use $cppstdin $cppminus so we'll use that again."
4585 '') echo "But let's see if we can live without a wrapper..." ;;
4587 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4588 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4590 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4593 echo "(However, $cpprun $cpplast does not work, let's see...)"
4601 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4608 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4609 $cc -E <testcpp.c >testcpp.out 2>&1; \
4610 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4611 echo "Yup, it does."
4614 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4615 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4616 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4617 echo "Yup, it does."
4620 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4621 $cc -P <testcpp.c >testcpp.out 2>&1; \
4622 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4623 echo "Yipee, that works!"
4626 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4627 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4628 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4629 echo "At long last!"
4632 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4633 $cpp <testcpp.c >testcpp.out 2>&1; \
4634 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4638 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4639 $cpp - <testcpp.c >testcpp.out 2>&1; \
4640 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4641 echo "Hooray, it works! I was beginning to wonder."
4644 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4645 $wrapper <testcpp.c >testcpp.out 2>&1; \
4646 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4652 rp="No dice. I can't find a C preprocessor. Name one:"
4656 $x_cpp <testcpp.c >testcpp.out 2>&1
4657 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4658 echo "OK, that will do." >&4
4660 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4675 echo "Perhaps can we force $cc -E using a wrapper..."
4676 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4677 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4683 echo "Nope, we'll have to live without it..."
4697 "$wrapper"|'cppstdin') ;;
4698 *) $rm -f $wrapper;;
4700 $rm -f testcpp.c testcpp.out
4702 : Set private lib path
4705 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4710 '') dlist="$loclibpth $plibpth $glibpth";;
4711 *) dlist="$libpth";;
4714 : Now check and see which directories actually exist, avoiding duplicates
4718 if $test -d $xxx; then
4721 *) libpth="$libpth $xxx";;
4727 Some systems have incompatible or broken versions of libraries. Among
4728 the directories listed in the question below, please remove any you
4729 know not to be holding relevant libraries, and add any that are needed.
4730 Say "none" for none.
4741 rp="Directories to use for library searches?"
4748 : compute shared library extension
4751 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4761 On some systems, shared libraries may be available. Answer 'none' if
4762 you want to suppress searching of shared libraries for the remainder
4763 of this configuration.
4766 rp='What is the file extension used for shared libraries?'
4770 : Define several unixisms.
4771 : Hints files or command line option can be used to override them.
4772 : The convoluted testing is in case hints files set either the old
4775 '') case "$exe_ext" in
4777 *) _exe="$exe_ext" ;;
4782 '') case "$lib_ext" in
4789 '') case "$obj_ext" in
4796 '') case "$path_sep" in
4807 : Which makefile gets called first. This is used by make depend.
4808 case "$firstmakefile" in
4809 '') firstmakefile='makefile';;
4813 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
4816 case "$uselongdouble" in
4817 $define|true|[yY]*) dflt='y';;
4822 Perl can be built to take advantage of long doubles which
4823 (if available) may give more accuracy and range for floating point numbers.
4825 If this doesn't make any sense to you, just accept the default '$dflt'.
4827 rp='Try to use long doubles if available?'
4830 y|Y) val="$define" ;;
4836 case "$uselongdouble" in
4837 true|[yY]*) uselongdouble="$define" ;;
4840 : Look for a hint-file generated 'call-back-unit'. If the
4841 : user has specified that long doubles should be used,
4842 : we may need to set or change some other defaults.
4843 if $test -f uselongdouble.cbu; then
4844 echo "Your platform has some specific hints regarding long doubles, using them..."
4845 . ./uselongdouble.cbu
4847 case "$uselongdouble" in
4850 (Your platform does not have any specific hints for long doubles.)
4856 : Looking for optional libraries
4858 echo "Checking for optional libraries..." >&4
4863 case "$libswanted" in
4864 '') libswanted='c_s';;
4867 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4873 for thisdir in $libpth $xlibpth; do
4874 test -d $thisdir && libspath="$libspath $thisdir"
4876 for thislib in $libswanted; do
4877 for thisdir in $libspath; do
4879 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4880 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4881 $test -f "$xxx" && eval $libscheck
4882 $test -f "$xxx" && libstyle=shared
4884 if test ! -f "$xxx"; then
4885 xxx=$thisdir/lib$thislib.$so
4886 $test -f "$xxx" && eval $libscheck
4887 $test -f "$xxx" && libstyle=shared
4889 if test ! -f "$xxx"; then
4890 xxx=$thisdir/lib$thislib$_a
4891 $test -f "$xxx" && eval $libscheck
4892 $test -f "$xxx" && libstyle=static
4894 if test ! -f "$xxx"; then
4895 xxx=$thisdir/$thislib$_a
4896 $test -f "$xxx" && eval $libscheck
4897 $test -f "$xxx" && libstyle=static
4899 if test ! -f "$xxx"; then
4900 xxx=$thisdir/lib${thislib}_s$_a
4901 $test -f "$xxx" && eval $libscheck
4902 $test -f "$xxx" && libstyle=static
4903 $test -f "$xxx" && thislib=${thislib}_s
4905 if test ! -f "$xxx"; then
4906 xxx=$thisdir/Slib$thislib$_a
4907 $test -f "$xxx" && eval $libscheck
4908 $test -f "$xxx" && libstyle=static
4910 if $test -f "$xxx"; then
4912 shared) echo "Found -l$thislib (shared)." ;;
4913 static) echo "Found -l$thislib." ;;
4914 *) echo "Found -l$thislib ($libstyle)." ;;
4918 *) dflt="$dflt -l$thislib"
4919 libsfound="$libsfound $xxx"
4921 libsfiles="$libsfiles $yyy"
4922 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4923 case " $libsdirs " in
4925 *) libsdirs="$libsdirs $yyy" ;;
4932 if $test ! -f "$xxx"; then
4933 echo "No -l$thislib."
4944 ' '|'') dflt='none';;
4949 In order to compile $package on your machine, a number of libraries
4950 are usually needed. Include any other special libraries here as well.
4951 Say "none" for none. The default list is almost always right.
4955 rp="What libraries to use?"
4962 : determine optimization, if desired, or use for debug flag also
4964 ' '|$undef) dflt='none';;
4966 *) dflt="$optimize";;
4970 By default, $package compiles with the -O flag to use the optimizer.
4971 Alternately, you might want to use the symbolic debugger, which uses
4972 the -g flag (on traditional Unix systems). Either flag can be
4973 specified here. To use neither flag, specify the word "none".
4976 rp="What optimizer/debugger flag should be used?"
4980 'none') optimize=" ";;
4983 : Check what DEBUGGING is required from the command line
4984 : -DEBUGGING or -DDEBUGGING or
4985 : -DEBUGGING=both = -g + -DDEBUGGING
4986 : -DEBUGGING=-g or -Doptimize=-g = -g
4987 : -DEBUGGING=none or -UDEBUGGING =
4988 : -DEBUGGING=old or -DEBUGGING=default = ? $optimize
4991 *) DEBUGGING=$EBUGGING ;;
4994 case "$DEBUGGING" in
4998 *) optimize="$optimize -g" ;;
5002 *-g*) set `echo "X $optimize " | sed 's/ -g / /'`
5010 case "$DEBUGGING" in
5011 both|$define) dflt='-DDEBUGGING'
5014 : We will not override a previous value, but we might want to
5015 : augment a hint file
5017 default|recommended)
5018 case "$gccversion" in
5019 1*) dflt="$dflt -fpcc-struct-return" ;;
5021 case "$optimize:$DEBUGGING" in
5022 *-g*:old) dflt="$dflt -DDEBUGGING";;
5024 case "$gccversion" in
5025 2*) if test -d /etc/conf/kconfig.d &&
5026 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
5028 # Interactive Systems (ISC) POSIX mode.
5033 case "$gccversion" in
5037 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
5038 echo 'int main(void) { return 0; }' > gcctest.c
5039 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
5040 echo "Yes, it does." 2>&1
5043 echo "Leaving current flags $ccflags alone." 2>&1
5045 *) dflt="$dflt -fno-strict-aliasing" ;;
5048 echo "Nope, it doesn't, but that's ok." 2>&1
5052 # For gcc, adding -pipe speeds up compilations for some, but apparently
5053 # some assemblers can't read from stdin. (It also slows down compilations
5054 # in other cases, but those are apparently rarer these days.) AD 5/2004.
5055 case "$gccversion" in
5057 echo "Checking if your compiler accepts -pipe" 2>&1
5058 echo 'int main(void) { return 0; }' > gcctest.c
5059 if $cc -pipe -o gcctest gcctest.c; then
5060 echo "Yes, it does." 2>&1
5063 echo "Leaving current flags $ccflags alone." 2>&1
5065 *) dflt="$dflt -pipe" ;;
5068 echo "Nope, it doesn't, but that's ok." 2>&1
5075 case "$mips_type" in
5076 *BSD*|'') inclwanted="$locincpth $usrinc";;
5077 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
5079 for thisincl in $inclwanted; do
5080 if $test -d $thisincl; then
5081 if $test x$thisincl != x$usrinc; then
5083 *" -I$thisincl "*);;
5084 *) dflt="$dflt -I$thisincl ";;
5090 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
5092 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
5100 *) dflt="$dflt -D$2";;
5104 set signal.h LANGUAGE_C; eval $inctest
5108 ccflags="$ccflags -DSOCKS"
5113 default|recommended) dflt="$ccflags $dflt" ;;
5114 *) dflt="$ccflags";;
5123 Your C compiler may want other flags. For this question you should include
5124 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
5125 but you should NOT include libraries or ld flags like -lwhatever. If you
5126 want $package to honor its debug switch, you should include -DDEBUGGING here.
5127 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
5129 To use no flags, specify the word "none".
5135 rp="Any additional cc flags?"
5142 : the following weeds options from ccflags that are of no interest to cpp
5144 '') cppflags="$ccflags" ;;
5145 *) cppflags="$cppflags $ccflags" ;;
5147 case "$gccversion" in
5148 1*) cppflags="$cppflags -D__GNUC__"
5150 case "$mips_type" in
5152 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
5158 echo "Let me guess what the preprocessor flags are..." >&4
5172 *) ftry="$previous $flag";;
5174 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
5175 >cpp1.out 2>/dev/null && \
5176 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
5177 >cpp2.out 2>/dev/null && \
5178 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
5179 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
5181 cppflags="$cppflags $ftry"
5191 *-*) echo "They appear to be: $cppflags";;
5193 $rm -f cpp.c cpp?.out
5197 : flags used in final linking phase
5199 '') if ./venix; then
5205 *-posix*) dflt="$dflt -posix" ;;
5208 *) dflt="$ldflags";;
5211 : Try to guess additional flags to pick up local libraries.
5212 for thislibdir in $libpth; do
5213 case " $loclibpth " in
5216 *"-L$thislibdir "*) ;;
5217 *) dflt="$dflt -L$thislibdir" ;;
5229 Your C linker may need flags. For this question you should
5230 include -L/whatever and any other flags used by the C linker, but you
5231 should NOT include libraries like -lwhatever.
5233 Make sure you include the appropriate -L/path flags if your C linker
5234 does not normally search all of the directories you specified above,
5237 To use no flags, specify the word "none".
5241 rp="Any additional ld flags (NOT including libraries)?"
5247 rmlist="$rmlist pdp11"
5251 echo "Checking your choice of C compiler and flags for coherency..." >&4
5252 $cat > try.c <<'EOF'
5254 int main() { printf("Ok\n"); return(0); }
5256 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
5258 $cat >try.msg <<'EOM'
5259 I've tried to compile and run the following simple program:
5262 $cat try.c >> try.msg
5264 $cat >> try.msg <<EOM
5271 and I got the following output:
5275 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
5276 if $sh -c "$run ./try" >>try.msg 2>&1; then
5280 *) echo 'The program compiled OK, but produced no output.' >> try.msg
5283 cat >> try.msg <<'EOQS'
5284 If $libs contains -lsfio, and sfio is mis-configured, then it
5285 sometimes (apparently) runs and exits with a 0 status, but with no
5286 output! It may have to do with sfio's use of _exit vs. exit.
5289 rp="You have a big problem. Shall I abort Configure"
5296 echo "The program compiled OK, but exited with status $?." >>try.msg
5297 rp="You have a problem. Shall I abort Configure"
5301 echo "I can't compile the test program." >>try.msg
5302 rp="You have a BIG problem. Shall I abort Configure"
5308 case "$knowitall" in
5310 echo "(The supplied flags or libraries might be incorrect.)"
5318 *) echo "Ok. Stopping Configure." >&4
5323 n) echo "OK, that should do.";;
5325 $rm -f try try.* core
5327 : define a shorthand compile call
5331 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
5332 : define a shorthand compile call for compilations that should be ok.
5336 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
5338 : determine filename position in cpp output
5340 echo "Computing filename position in cpp output for #include directives..." >&4
5342 vos) testaccess=-e ;;
5345 echo '#include <stdio.h>' > foo.c
5348 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5349 $grep '^[ ]*#.*stdio\.h' | \
5350 while read cline; do
5353 while $test \$# -gt 0; do
5354 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5359 pos=\`expr \$pos + 1\`
5371 *) pos="${fieldn}th";;
5373 echo "Your cpp writes the filename in the $pos field of the line."
5376 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
5377 os2) cppfilter="sed -e 's|\\\\\\\\|/|g' |" ;; # path component separator is \
5380 : locate header file
5385 for usrincdir in $usrinc
5387 if test -f \$usrincdir/\$wanted; then
5388 echo "\$usrincdir/\$wanted"
5392 awkprg='{ print \$$fieldn }'
5393 echo "#include <\$wanted>" > foo\$\$.c
5394 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5395 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5396 while read cline; do
5397 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5399 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5400 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5405 # status = 0: grep returned 0 lines, case statement not executed
5406 # status = 1: headerfile found
5407 # status = 2: while loop executed, no headerfile found
5411 if test \$status -eq 1; then
5418 : define an alternate in-header-list? function
5419 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5420 cont=true; xxf="echo \"<\$1> found.\" >&4";
5421 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5422 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5424 case $# in 4) instead=instead;; *) instead="at last";; esac;
5425 while $test "$cont"; do
5427 var=$2; eval "was=\$$2";
5428 if $test "$xxx" && $test -r "$xxx";
5430 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5433 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5434 set $yyy; shift; shift; yyy=$@;
5435 case $# in 0) cont="";;
5436 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5437 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5438 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5439 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5443 do set $yyy; var=$2; eval "was=\$$2";
5444 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5445 set $yyy; shift; shift; yyy=$@;
5448 : see if stdlib is available
5449 set stdlib.h i_stdlib
5452 : check for lengths of integral types
5456 echo "Checking to see how big your integers are..." >&4
5465 printf("intsize=%d;\n", (int)sizeof(int));
5466 printf("longsize=%d;\n", (int)sizeof(long));
5467 printf("shortsize=%d;\n", (int)sizeof(short));
5472 if eval $compile_ok && $run ./try > /dev/null; then
5474 echo "Your integers are $intsize bytes long."
5475 echo "Your long integers are $longsize bytes long."
5476 echo "Your short integers are $shortsize bytes long."
5480 Help! I can't compile and run the intsize test program: please enlighten me!
5481 (This is probably a misconfiguration in your system or libraries, and
5482 you really ought to fix it. Still, I'll try anyway.)
5486 rp="What is the size of an integer (in bytes)?"
5490 rp="What is the size of a long integer (in bytes)?"
5494 rp="What is the size of a short integer (in bytes)?"
5502 : check for long long
5504 echo "Checking to see if you have long long..." >&4
5505 echo 'int main() { long long x = 7; return 0; }' > try.c
5507 if eval $compile; then
5509 echo "You have long long."
5512 echo "You do not have long long."
5518 : check for length of long long
5519 case "${d_longlong}${longlongsize}" in
5522 echo "Checking to see how big your long longs are..." >&4
5523 $cat >try.c <<'EOCP'
5527 printf("%d\n", (int)sizeof(long long));
5532 if eval $compile_ok; then
5533 longlongsize=`$run ./try`
5534 echo "Your long longs are $longlongsize bytes long."
5538 echo "(I can't seem to compile the test program. Guessing...)"
5539 rp="What is the size of a long long (in bytes)?"
5543 if $test "X$longsize" = "X$longlongsize"; then
5544 echo "(That isn't any different from an ordinary long.)"
5550 : see if inttypes.h is available
5551 : we want a real compile instead of Inhdr because some systems
5552 : have an inttypes.h which includes non-existent headers
5555 #include <inttypes.h>
5557 static int32_t foo32 = 0x12345678;
5561 if eval $compile; then
5562 echo "<inttypes.h> found." >&4
5565 echo "<inttypes.h> NOT found." >&4
5574 echo "Checking to see if you have int64_t..." >&4
5576 #include <sys/types.h>
5577 #$i_inttypes I_INTTYPES
5579 #include <inttypes.h>
5581 int main() { int64_t x = 7; }
5584 if eval $compile; then
5586 echo "You have int64_t."
5589 echo "You do not have int64_t."
5597 echo "Checking which 64-bit integer type we could use..." >&4
5603 val='"unsigned int"'
5608 *) case "$longsize" in
5612 val='"unsigned long"'
5617 *) case "$d_longlong:$longlongsize" in
5622 val='"unsigned long long"'
5627 *) case "$d_int64_t" in
5646 '') echo "Alas, no 64-bit integer types in sight." >&4
5649 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5655 case "$uselonglong" in
5656 "$define"|true|[yY]*)
5659 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5661 use64bitint="$define"
5664 case "$use64bits" in
5665 "$define"|true|[yY]*)
5668 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5670 use64bitint="$define"
5673 case "$use64bitints" in
5674 "$define"|true|[yY]*)
5677 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5679 use64bitint="$define"
5682 case "$use64bitsint" in
5683 "$define"|true|[yY]*)
5686 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5688 use64bitint="$define"
5691 case "$uselonglongs" in
5692 "$define"|true|[yY]*)
5695 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5697 use64bitint="$define"
5700 case "$use64bitsall" in
5701 "$define"|true|[yY]*)
5704 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5706 use64bitall="$define"
5711 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5713 case "$use64bitall" in
5714 "$define"|true|[yY]*) use64bitint="$define" ;;
5720 You have natively 64-bit long integers.
5724 *) case "$use64bitint" in
5725 "$define"|true|[yY]*) dflt='y';;
5734 Perl can be built to take advantage of 64-bit integer types
5735 on some systems. To do so, Configure can be run with -Duse64bitint.
5736 Choosing this option will most probably introduce binary incompatibilities.
5738 If this doesn't make any sense to you, just accept the default '$dflt'.
5739 (The default has been chosen based on your configuration.)
5741 rp='Try to use 64-bit integers, if available?'
5744 [yY]*) val="$define" ;;
5752 case "$use64bitall" in
5753 "$define"|true|[yY]*) dflt='y' ;;
5754 *) case "$longsize" in
5762 You may also choose to try maximal 64-bitness. It means using as much
5763 64-bitness as possible on the platform. This in turn means even more
5764 binary incompatibilities. On the other hand, your platform may not
5765 have any more 64-bitness available than what you already have chosen.
5767 If this doesn't make any sense to you, just accept the default '$dflt'.
5768 (The default has been chosen based on your configuration.)
5770 rp='Try to use maximal 64-bit support, if available?'
5773 [yY]*) val="$define" ;;
5778 case "$use64bitall" in
5780 case "$use64bitint" in
5784 Since you have chosen a maximally 64-bit build, I'm also turning on
5785 the use of 64-bit integers.
5787 use64bitint="$define" ;;
5792 : Look for a hint-file generated 'call-back-unit'. If the
5793 : user has specified that a 64-bit perl is to be built,
5794 : we may need to set or change some other defaults.
5795 if $test -f use64bitint.cbu; then
5796 echo "Your platform has some specific hints regarding 64-bit integers, using them..."
5799 case "$use64bitint" in
5800 "$define"|true|[yY]*)
5802 4) case "$archname64" in
5803 '') archname64=64int ;;
5810 : Look for a hint-file generated 'call-back-unit'. If the
5811 : user has specified that a maximally 64-bit perl is to be built,
5812 : we may need to set or change some other defaults.
5813 if $test -f use64bitall.cbu; then
5814 echo "Your platform has some specific hints regarding 64-bit builds, using them..."
5817 case "$use64bitall" in
5818 "$define"|true|[yY]*)
5820 4) case "$archname64" in
5821 ''|64int) archname64=64all ;;
5828 case "$d_quad:$use64bitint" in
5832 *** You have chosen to use 64-bit integers,
5833 *** but none can be found.
5834 *** Please rerun Configure without -Duse64bitint and/or -Dusemorebits.
5835 *** Cannot continue, aborting.
5842 : check for length of double
5844 case "$doublesize" in
5846 echo "Checking to see how big your double precision numbers are..." >&4
5855 printf("%d\n", (int)sizeof(double));
5860 if eval $compile_ok; then
5861 doublesize=`$run ./try`
5862 echo "Your double is $doublesize bytes long."
5865 echo "(I can't seem to compile the test program. Guessing...)"
5866 rp="What is the size of a double precision number (in bytes)?"
5874 : check for long doubles
5876 echo "Checking to see if you have long double..." >&4
5877 echo 'int main() { long double x = 7.0; }' > try.c
5879 if eval $compile; then
5881 echo "You have long double."
5884 echo "You do not have long double."
5890 : check for length of long double
5891 case "${d_longdbl}${longdblsize}" in
5894 echo "Checking to see how big your long doubles are..." >&4
5895 $cat >try.c <<'EOCP'
5899 printf("%d\n", sizeof(long double));
5904 if eval $compile; then
5905 longdblsize=`$run ./try`
5906 echo "Your long doubles are $longdblsize bytes long."
5910 echo "(I can't seem to compile the test program. Guessing...)" >&4
5911 rp="What is the size of a long double (in bytes)?"
5915 if $test "X$doublesize" = "X$longdblsize"; then
5916 echo "That isn't any different from an ordinary double."
5917 echo "I'll keep your setting anyway, but you may see some"
5918 echo "harmless compilation warnings."
5924 : determine the architecture name
5926 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
5927 tarch=`arch`"-$osname"
5928 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
5929 if uname -m > tmparch 2>&1 ; then
5930 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
5931 -e 's/$/'"-$osname/" tmparch`
5939 case "$myarchname" in
5942 echo "(Your architecture name used to be $myarchname.)"
5946 case "$targetarch" in
5948 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
5953 *) dflt="$archname";;
5955 rp='What is your architecture name'
5958 case "$usethreads" in
5960 echo "Threads selected." >&4
5962 *-thread*) echo "...and architecture name already has -thread." >&4
5964 *) archname="$archname-thread"
5965 echo "...setting architecture name to $archname." >&4
5970 case "$usemultiplicity" in
5972 echo "Multiplicity selected." >&4
5974 *-multi*) echo "...and architecture name already has -multi." >&4
5976 *) archname="$archname-multi"
5977 echo "...setting architecture name to $archname." >&4
5982 case "$use64bitint$use64bitall" in
5984 case "$archname64" in
5986 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
5989 case "$use64bitint" in
5990 "$define") echo "64 bit integers selected." >&4 ;;
5992 case "$use64bitall" in
5993 "$define") echo "Maximal 64 bitness selected." >&4 ;;
5996 *-$archname64*) echo "...and architecture name already has $archname64." >&4
5998 *) archname="$archname-$archname64"
5999 echo "...setting architecture name to $archname." >&4
6005 case "$uselongdouble" in
6007 echo "Long doubles selected." >&4
6008 case "$longdblsize" in
6010 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
6014 *-ld*) echo "...and architecture name already has -ld." >&4
6016 *) archname="$archname-ld"
6017 echo "...setting architecture name to $archname." >&4
6024 case "$useperlio" in
6026 echo "Perlio selected." >&4
6029 echo "Perlio not selected, using stdio." >&4
6031 *-stdio*) echo "...and architecture name already has -stdio." >&4
6033 *) archname="$archname-stdio"
6034 echo "...setting architecture name to $archname." >&4
6039 if $test -f archname.cbu; then
6040 echo "Your platform has some specific hints for architecture name, using them..."
6044 : set the prefixit variable, to compute a suitable default value
6045 prefixit='case "$3" in
6047 case "$oldprefix" in
6048 "") eval "$1=\"\$$2\"";;
6055 ""|" ") eval "$1=\"\$$2\"";;
6061 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
6063 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
6064 /*-$oldprefix/*|\~*-$oldprefix/*)
6065 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
6066 *) eval "$1=\"\$$2\"";;
6070 : determine installation style
6071 : For now, try to deduce it from prefix unless it is already set.
6072 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
6073 case "$installstyle" in
6074 '') case "$prefix" in
6075 *perl*) dflt='lib';;
6076 *) dflt='lib/perl5' ;;
6079 *) dflt="$installstyle" ;;
6081 : Probably not worth prompting for this since we prompt for all
6082 : the directories individually, and the prompt would be too long and
6086 : determine where public executables go
6091 rp='Pathname where the public executables will reside?'
6093 if $test "X$ansexp" != "X$binexp"; then
6097 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
6098 : XXX If this is fixed, also fix the "start perl" hunk below, which relies on
6099 : this via initialinstalllocation
6102 case "$userelocatableinc" in
6103 $define|true|[yY]*) dflt='y' ;;
6108 Would you like to build Perl so that the installation is relocatable, so that
6109 library paths in @INC are determined relative to the path of the perl binary?
6110 This is not advised for system Perl installs, or if you need to run setid
6111 scripts or scripts under taint mode.
6113 If this doesn't make any sense to you, just accept the default '$dflt'.
6115 rp='Use relocatable @INC?'
6118 y|Y) val="$define" ;;
6121 set userelocatableinc
6124 initialinstalllocation="$binexp"
6125 : Default prefix is now "up one level from where the binaries are"
6126 case "$userelocatableinc" in
6132 installprefixexp=".../.."
6136 : determine where private library files go
6137 : Usual default is /usr/local/lib/perl5/$version.
6138 : Also allow things like /opt/perl/lib/$version, since
6139 : /opt/perl/lib/perl5... would be redundant.
6140 : The default "style" setting is made in installstyle.U
6141 case "$installstyle" in
6142 *lib/perl5*) set dflt privlib lib/$package/$version ;;
6143 *) set dflt privlib lib/$version ;;
6148 There are some auxiliary files for $package that need to be put into a
6149 private library directory that is accessible by everyone.
6154 rp='Pathname where the private library files will reside?'
6159 : set the prefixup variable, to restore leading tilda escape
6160 prefixup='case "$prefixexp" in
6162 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
6165 : determine where public architecture dependent libraries go
6168 : privlib default is /usr/local/lib/$package/$version
6169 : archlib default is /usr/local/lib/$package/$version/$archname
6170 : privlib may have an optional trailing /share.
6171 tdflt=`echo $privlib | $sed 's,/share$,,'`
6172 tdflt=$tdflt/$archname
6181 $spackage contains architecture-dependent library files. If you are
6182 sharing libraries in a heterogeneous environment, you might store
6183 these files in a separate location. Otherwise, you can just include
6184 them with the rest of the public library files.
6189 rp='Where do you want to put the public architecture-dependent libraries?'
6193 if $test X"$archlib" = X"$privlib"; then
6199 : see if setuid scripts can be secure
6202 Some kernels have a bug that prevents setuid #! scripts from being
6203 secure. Some sites have disabled setuid #! scripts because of this.
6205 First let's decide if your kernel supports secure setuid #! scripts.
6206 (If setuid #! scripts would be secure but have been disabled anyway,
6207 don't say that they are secure if asked.)
6212 if $test -d /dev/fd; then
6213 echo "#!$ls" >reflect
6214 chmod +x,u+s reflect
6215 ./reflect >flect 2>&1
6216 if $contains "/dev/fd" flect >/dev/null; then
6217 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6221 If you are not sure if they are secure, I can check but I'll need a
6222 username and password different from the one you are using right now.
6223 If you don't have such a username or don't want me to test, simply
6227 rp='Other username to test security of setuid scripts with?'
6232 case "$d_suidsafe" in
6233 '') echo "I'll assume setuid scripts are *not* secure." >&4
6236 echo "Well, the $hint value is *not* secure." >&4
6238 *) echo "Well, the $hint value *is* secure." >&4
6243 $rm -f reflect flect
6244 echo "#!$ls" >reflect
6245 chmod +x,u+s reflect
6248 echo '"su" will (probably) prompt you for '"$ans's password."
6249 su $ans -c './reflect >flect'
6250 if $contains "/dev/fd" flect >/dev/null; then
6251 echo "Okay, it looks like setuid scripts are secure." >&4
6254 echo "I don't think setuid scripts are secure." >&4
6259 rp='Does your kernel have *secure* setuid scripts?'
6262 [yY]*) val="$define";;
6267 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6268 echo "(That's for file descriptors, not floppy disks.)"
6274 $rm -f reflect flect
6276 : now see if they want to do setuid emulation
6279 case "$d_suidsafe" in
6282 echo "No need to emulate SUID scripts since they are secure here." >&4
6286 Some systems have disabled setuid scripts, especially systems where
6287 setuid scripts cannot be secure. On systems where setuid scripts have
6288 been disabled, the setuid/setgid bits on scripts are currently
6289 useless. It is possible for $package to detect those bits and emulate
6290 setuid/setgid in a secure fashion. This emulation will only work if
6291 setuid scripts have been disabled in your kernel.
6295 "$define") dflt=y ;;
6298 rp="Do you want to do setuid/setgid emulation?"
6301 [yY]*) val="$define";;
6309 : Find perl5.005 or later.
6310 echo "Looking for a previously installed perl5.005 or later... "
6312 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
6313 : Check if this perl is recent and can load a simple module
6314 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6317 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6327 '') echo "None found. That's ok.";;
6328 *) echo "Using $perl5." ;;
6333 After $package is installed, you may wish to install various
6334 add-on modules and utilities. Typically, these add-ons will
6335 be installed under $prefix with the rest
6336 of this package. However, you may wish to install such add-ons
6337 elsewhere under a different prefix.
6339 If you do not wish to put everything under a single prefix, that's
6340 ok. You will be prompted for the individual locations; this siteprefix
6341 is only used to suggest the defaults.
6343 The default should be fine for most people.
6347 rp='Installation prefix to use for add-on modules and utilities?'
6348 : XXX Here might be another good place for an installstyle setting.
6349 case "$siteprefix" in
6351 *) dflt=$siteprefix ;;
6354 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6356 case "$siteprefix" in
6360 *) oldsiteprefix="$prefix";;
6365 siteprefixexp="$ansexp"
6367 : determine where site specific libraries go.
6368 : Usual default is /usr/local/lib/perl5/site_perl/$version
6369 : The default "style" setting is made in installstyle.U
6370 : XXX No longer works with Prefixit stuff.
6371 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6373 '') case "$installstyle" in
6374 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6375 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6383 The installation process will create a directory for
6384 site-specific extensions and modules. Most users find it convenient
6385 to place all site-specific files in this directory rather than in the
6386 main distribution directory.
6390 rp='Pathname for the site-specific library files?'
6394 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
6396 : Determine list of previous versions to include in @INC
6397 $cat > getverlist <<EOPL
6400 \$api_versionstring = "$api_versionstring";
6401 \$version = "$version";
6402 \$stem = "$sitelib_stem";
6403 \$archname = "$archname";
6405 $cat >> getverlist <<'EOPL'
6406 # The list found is store twice for each entry: the original name, and
6407 # the binary broken down version as pack "sss", so sorting is easy and
6408 # unambiguous. This will work for all versions that have a maximum of
6409 # three digit groups, separate by '.'s or '_'s. Names are extended with
6410 # ".0.0" to ensure at least three elements for the pack.
6411 # -- H.Merijn Brand (m)'06 23-10-2006
6413 # Can't have leading @ because metaconfig interprets it as a command!
6414 ;@inc_version_list=();
6415 # XXX Redo to do opendir/readdir?
6418 ;@candidates = map {
6419 [ $_, pack "sss", split m/[._]/, "$_.0.0" ] } glob("5.*");
6425 ($pversion, $aversion, $vsn5005) = map {
6426 pack "sss", split m/[._]/, "$_.0.0" } $version, $api_versionstring, "5.005";
6427 foreach $d (@candidates) {
6428 if ($d->[1] lt $pversion) {
6429 if ($d->[1] ge $aversion) {
6430 unshift(@inc_version_list, grep { -d } $d->[0]."/$archname", $d->[0]);
6432 elsif ($d->[1] ge $vsn5005) {
6433 unshift(@inc_version_list, grep { -d } $d->[0]);
6437 # Skip newer version. I.e. don't look in
6438 # 5.7.0 if we're installing 5.6.1.
6442 if (@inc_version_list) {
6443 print join(' ', @inc_version_list);
6446 # Blank space to preserve value for next Configure run.
6451 case "$inc_version_list" in
6452 '') if test -x "$perl5$exe_ext"; then
6453 dflt=`$perl5 getverlist`
6458 $undef) dflt='none' ;;
6459 *) eval dflt=\"$inc_version_list\" ;;
6462 ''|' ') dflt=none ;;
6469 In order to ease the process of upgrading, this version of perl
6470 can be configured to use modules built and installed with earlier
6471 versions of perl that were installed under $prefix. Specify here
6472 the list of earlier versions that this version of perl should check.
6473 If Configure detected no earlier versions of perl installed under
6474 $prefix, then the list will be empty. Answer 'none' to tell perl
6475 to not search earlier versions.
6477 The default should almost always be sensible, so if you're not sure,
6478 just accept the default.
6481 rp='List of earlier versions to include in @INC?'
6484 [Nn]one|''|' '|$undef) inc_version_list=' ' ;;
6485 *) inc_version_list="$ans" ;;
6487 case "$inc_version_list" in
6489 inc_version_list_init='0'
6490 d_inc_version_list="$undef"
6492 *) inc_version_list_init=`echo $inc_version_list |
6493 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
6494 d_inc_version_list="$define"
6499 : see if this is a malloc.h system
6500 : we want a real compile instead of Inhdr because some systems have a
6501 : malloc.h that just gives a compile error saying to use stdlib.h instead
6506 int main () { return 0; }
6509 if eval $compile; then
6510 echo "<malloc.h> found." >&4
6513 echo "<malloc.h> NOT found." >&4
6520 : check for void type
6522 echo "Checking to see how well your C compiler groks the void type..." >&4
6523 case "$voidflags" in
6535 extern void moo(); /* function returning void */
6536 void (*goo)(); /* ptr to func returning void */
6538 void *hue; /* generic ptr */
6551 int main() { sub(); }
6553 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
6554 voidflags=$defvoidused
6555 echo "Good. It appears to support void to the level $package wants.">&4
6556 if $contains warning .out >/dev/null 2>&1; then
6557 echo "However, you might get some warnings that look like this:"
6561 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
6562 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
6563 echo "It supports 1..."
6564 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
6565 echo "It also supports 2..."
6566 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
6568 echo "And it supports 4 but not 8 definitely."
6570 echo "It doesn't support 4..."
6571 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
6573 echo "But it supports 8."
6576 echo "Neither does it support 8."
6580 echo "It does not support 2..."
6581 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
6583 echo "But it supports 4 and 8."
6585 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
6587 echo "And it supports 4 but has not heard about 8."
6589 echo "However it supports 8 but not 4."
6594 echo "There is no support at all for void."
6599 case "$voidflags" in
6602 Support flag bits are:
6603 1: basic void declarations.
6604 2: arrays of pointers to functions returning void.
6605 4: operations between pointers to and addresses of void functions.
6606 8: generic void pointers.
6609 rp="Your void support flags add up to what?"
6616 : check for length of pointer
6620 echo "Checking to see how big your pointers are..." >&4
6621 if test "$voidflags" -gt 7; then
6622 echo '#define VOID_PTR char *' > try.c
6624 echo '#define VOID_PTR void *' > try.c
6634 printf("%d\n", (int)sizeof(VOID_PTR));
6639 if eval $compile_ok; then
6640 ptrsize=`$run ./try`
6641 echo "Your pointers are $ptrsize bytes long."
6644 echo "(I can't seem to compile the test program. Guessing...)" >&4
6645 rp="What is the size of a pointer (in bytes)?"
6652 case "$use64bitall" in
6653 "$define"|true|[yY]*)
6657 *** You have chosen a maximally 64-bit build,
6658 *** but your pointers are only 4 bytes wide.
6659 *** Please rerun Configure without -Duse64bitall.
6664 *** Since you have quads, you could possibly try with -Duse64bitint.
6669 *** Cannot continue, aborting.
6680 : determine whether to use malloc wrapping
6682 case "$usemallocwrap" in
6683 [yY]*|true|$define) dflt='y' ;;
6684 [nN]*|false|$undef) dflt='n' ;;
6685 *) case "$usedevel" in
6686 [yY]*|true|$define) dflt='y' ;;
6691 rp="Do you wish to wrap malloc calls to protect against potential overflows?"
6693 usemallocwrap="$ans"
6696 usemallocwrap="$define" ;;
6698 usemallocwrap="$undef" ;;
6701 : determine which malloc to compile in
6703 case "$usemymalloc" in
6704 [yY]*|true|$define) dflt='y' ;;
6705 [nN]*|false|$undef) dflt='n' ;;
6706 *) case "$ptrsize" in
6712 rp="Do you wish to attempt to use the malloc that comes with $package?"
6718 mallocsrc='malloc.c'
6719 mallocobj="malloc$_o"
6720 d_mymalloc="$define"
6723 : Remove malloc from list of libraries to use
6724 echo "Removing unneeded -lmalloc from library list" >&4
6725 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6728 echo "libs = $libs" >&4
6740 : compute the return types of malloc and free
6742 $cat >malloc.c <<END
6746 #include <sys/types.h>
6760 case "$malloctype" in
6762 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6769 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6773 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6780 echo "Your system uses $freetype free(), it would seem." >&4
6782 : determine where site specific architecture-dependent libraries go.
6783 : sitelib default is /usr/local/lib/perl5/site_perl/$version
6784 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
6785 : sitelib may have an optional trailing /share.
6787 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
6788 dflt="$dflt/$archname"
6793 set sitearch sitearch none
6797 The installation process will also create a directory for
6798 architecture-dependent site-specific extensions and modules.
6802 rp='Pathname for the site-specific architecture-dependent library files?'
6806 if $test X"$sitearch" = X"$sitelib"; then
6809 d_sitearch="$define"
6814 The installation process will also create a directory for
6815 vendor-supplied add-ons. Vendors who supply perl with their system
6816 may find it convenient to place all vendor-supplied files in this
6817 directory rather than in the main distribution directory. This will
6818 ease upgrades between binary-compatible maintenance versions of perl.
6820 Of course you may also use these directories in whatever way you see
6821 fit. For example, you might use them to access modules shared over a
6822 company-wide network.
6824 The default answer should be fine for most people.
6825 This causes further questions about vendor add-ons to be skipped
6826 and no vendor-specific directories will be configured for perl.
6829 rp='Do you want to configure vendor-specific add-on directories?'
6830 case "$usevendorprefix" in
6831 define|true|[yY]*) dflt=y ;;
6832 *) : User may have set vendorprefix directly on Configure command line.
6833 case "$vendorprefix" in
6842 rp='Installation prefix to use for vendor-supplied add-ons?'
6843 case "$vendorprefix" in
6845 *) dflt=$vendorprefix ;;
6848 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6850 case "$vendorprefix" in
6854 *) oldvendorprefix="$prefix";;
6858 usevendorprefix="$define"
6860 vendorprefixexp="$ansexp"
6862 *) usevendorprefix="$undef"
6868 case "$vendorprefix" in
6869 '') d_vendorlib="$undef"
6873 *) d_vendorlib="$define"
6874 : determine where vendor-supplied modules go.
6875 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
6876 case "$vendorlib" in
6878 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6879 case "$installstyle" in
6880 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
6881 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
6884 *) dflt="$vendorlib"
6888 rp='Pathname for the vendor-supplied library files?'
6891 vendorlibexp="$ansexp"
6894 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
6898 case "$vendorprefix" in
6899 '') d_vendorarch="$undef"
6903 *) d_vendorarch="$define"
6904 : determine where vendor-supplied architecture-dependent libraries go.
6905 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
6906 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
6907 : vendorlib may have an optional trailing /share.
6908 case "$vendorarch" in
6909 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
6910 dflt="$dflt/$archname"
6912 *) dflt="$vendorarch" ;;
6915 rp='Pathname for vendor-supplied architecture-dependent files?'
6918 vendorarchexp="$ansexp"
6921 prefixvar=vendorarch
6924 : Final catch-all directories to search
6927 Lastly, you can have perl look in other directories for extensions and
6928 modules in addition to those already specified.
6929 These directories will be searched after
6933 test X"$vendorlib" != "X" && echo ' ' $vendorlib
6934 test X"$vendorarch" != "X" && echo ' ' $vendorarch
6936 case "$otherlibdirs" in
6937 ''|' ') dflt='none' ;;
6938 *) dflt="$otherlibdirs" ;;
6941 Enter a colon-separated set of extra paths to include in perl's @INC
6942 search path, or enter 'none' for no extra paths.
6946 rp='Colon-separated list of additional directories for perl to search?'
6949 ' '|''|none) otherlibdirs=' ' ;;
6950 *) otherlibdirs="$ans" ;;
6952 case "$otherlibdirs" in
6956 set d_perl_otherlibdirs
6959 : Cruising for prototypes
6961 echo "Checking out function prototypes..." >&4
6962 $cat >prototype.c <<EOCP
6967 int main(int argc, char *argv[]) {
6970 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
6971 echo "Your C compiler appears to support function prototypes."
6974 echo "Your C compiler doesn't seem to understand function prototypes."
6981 case "$prototype" in
6983 *) ansi2knr='ansi2knr'
6988 This version of $package can only be compiled by a compiler that
6989 understands function prototypes. Unfortunately, your C compiler
6991 doesn't seem to understand them. Sorry about that.
6993 If GNU cc is available for your system, perhaps you could try that instead.
6995 Eventually, we hope to support building Perl with pre-ANSI compilers.
6996 If you would like to help in that effort, please contact <perlbug@perl.org>.
6998 Aborting Configure now.
7010 Perl can be built with extra modules or bundles of modules which
7011 will be fetched from the CPAN and installed alongside Perl.
7013 Notice that you will need access to the CPAN; either via the Internet,
7014 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
7015 be asked later to configure the CPAN.pm module which will in turn do
7016 the installation of the rest of the extra modules or bundles.)
7018 Notice also that if the modules require any external software such as
7019 libraries and headers (the libz library and the zlib.h header for the
7020 Compress::Zlib module, for example) you MUST have any such software
7021 already installed, this configuration process will NOT install such
7024 If this doesn't make any sense to you, just accept the default '$dflt'.
7026 rp='Install any extra modules (y or n)?'
7032 Please list any extra modules or bundles to be installed from CPAN,
7033 with spaces between the names. The names can be in any format the
7034 'install' command of CPAN.pm will understand. (Answer 'none',
7035 without the quotes, to install no extra modules or bundles.)
7045 $rm -f ../extras.lst
7047 *) echo "(Saving the list of extras for later...)"
7048 echo "$extras" > ../extras.lst
7056 : determine where html pages for programs go
7057 set html1dir html1dir none
7061 If you wish to install html files for programs in $spackage, indicate
7062 the appropriate directory here. To skip installing html files,
7066 ''|none|$undef|' ') dflt=none ;;
7067 *) dflt=$html1dir ;;
7070 rp="Directory for the main $spackage html pages?"
7074 : Use ' ' for none so value is preserved next time through Configure
7075 $test X"$html1dir" = "X" && html1dir=' '
7077 : determine where html pages for libraries and modules go
7078 set html3dir html3dir none
7082 If you wish to install html files for modules associated with $spackage,
7083 indicate the appropriate directory here. To skip installing html files,
7086 : There is no obvious default. If they have specified html1dir, then
7087 : try to key off that, possibly changing .../html1 into .../html3.
7089 '') html3dir=`echo "$html1dir" | $sed 's/1$/3$/'` ;;
7090 *) dflt=$html3dir ;;
7093 rp="Directory for the $spackage module html pages?"
7097 : Use ' ' for none so value is preserved next time through Configure
7098 $test X"$html3dir" = "X" && html3dir=' '
7100 : determine whether to install perl also as /usr/bin/perl
7103 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
7105 Many scripts expect perl to be installed as /usr/bin/perl.
7107 If you want to, I can install the perl you are about to compile
7108 as /usr/bin/perl (in addition to $bin/perl).
7110 if test -f /usr/bin/perl; then
7113 However, please note that because you already have a /usr/bin/perl,
7114 overwriting that with a new Perl would very probably cause problems.
7115 Therefore I'm assuming you don't want to do that (unless you insist).
7118 case "$installusrbinperl" in
7119 "$define"|[yY]*) dflt='y';;
7125 Since you don't have a /usr/bin/perl I'm assuming creating one is okay.
7128 case "$installusrbinperl" in
7129 "$undef"|[nN]*) dflt='n';;
7133 rp="Do you want to install perl as /usr/bin/perl?"
7136 [yY]*) val="$define";;
7142 set installusrbinperl
7146 echo "Checking for GNU C Library..." >&4
7148 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
7149 alone are insufficient to distinguish different versions, such as
7150 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
7151 libc version 2.1.0. A. Dougherty, June 3, 2002.
7157 # ifdef __GLIBC_MINOR__
7158 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 && !defined(__cplusplus)
7159 # include <gnu/libc-version.h>
7160 printf("%s\n", gnu_get_libc_version());
7162 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
7165 printf("%d\n", __GLIBC__);
7174 if eval $compile_ok && $run ./try > glibc.ver; then
7176 gnulibc_version=`$cat glibc.ver`
7177 echo "You are using the GNU C Library version $gnulibc_version"
7181 echo "You are not using the GNU C Library"
7183 $rm -f try try.* glibc.ver
7187 : see if nm is to be used to determine whether a symbol is defined or not
7191 case "$d_gnulibc" in
7194 echo "nm probably won't work on the GNU C Library." >&4
7200 if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
7202 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
7203 echo "'nm' won't be sufficient on this sytem." >&4
7209 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
7210 if $test $dflt -gt 20; then
7220 true|$define) dflt=y;;
7227 I can use $nm to extract the symbols from your C libraries. This
7228 is a time consuming task which may generate huge output on the disk (up
7229 to 3 megabytes) but that should make the symbols extraction faster. The
7230 alternative is to skip the 'nm' extraction part and to compile a small
7231 test program instead to determine whether each symbol is present. If
7232 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
7233 this may be the best solution.
7235 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
7238 rp="Shall I use $nm to extract C symbols from the libraries?"
7241 [Nn]*) usenm=false;;
7250 : nm options which may be necessary
7252 '') if $test -f /mach_boot; then
7254 elif $test -d /usr/ccs/lib; then
7255 nm_opt='-p' # Solaris (and SunOS?)
7256 elif $test -f /dgux; then
7258 elif $test -f /lib64/rld; then
7259 nm_opt='-p' # 64-bit Irix
7265 : nm options which may be necessary for shared libraries but illegal
7266 : for archive libraries. Thank you, Linux.
7267 case "$nm_so_opt" in
7268 '') case "$myuname" in
7270 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
7271 nm_so_opt='--dynamic'
7280 : get list of predefined functions in a handy place
7285 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
7291 *) for thislib in $libs; do
7294 : Handle C library specially below.
7297 thislib=`echo $thislib | $sed -e 's/^-l//'`
7298 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
7300 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
7302 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
7304 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
7306 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
7308 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
7310 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
7315 libnames="$libnames $try"
7317 *) libnames="$libnames $thislib" ;;
7326 for xxx in $libpth; do
7327 $test -r $1 || set $xxx/libc.$so
7328 : The messy sed command sorts on library version numbers.
7330 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
7331 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
7333 s/[0-9][0-9]*/0000&/g
7334 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
7337 $sort | $sed -e 's/^.* //'`
7340 $test -r $1 || set /usr/ccs/lib/libc.$so
7341 $test -r $1 || set /lib/libsys_s$_a
7347 if $test -r "$1"; then
7348 echo "Your (shared) C library seems to be in $1."
7350 elif $test -r /lib/libc && $test -r /lib/clib; then
7351 echo "Your C library seems to be in both /lib/clib and /lib/libc."
7353 libc='/lib/clib /lib/libc'
7354 if $test -r /lib/syslib; then
7355 echo "(Your math library is in /lib/syslib.)"
7356 libc="$libc /lib/syslib"
7358 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
7359 echo "Your C library seems to be in $libc, as you said before."
7360 elif $test -r $incpath/usr/lib/libc$_a; then
7361 libc=$incpath/usr/lib/libc$_a;
7362 echo "Your C library seems to be in $libc. That's fine."
7363 elif $test -r /lib/libc$_a; then
7365 echo "Your C library seems to be in $libc. You're normal."
7367 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
7369 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
7370 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
7371 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
7373 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
7375 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
7378 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
7380 if $test -r "$tans"; then
7381 echo "Your C library seems to be in $tans, of all places."
7387 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
7391 If the guess above is wrong (which it might be if you're using a strange
7392 compiler, or your machine supports multiple models), you can override it here.
7397 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
7399 I can't seem to find your C library. I've looked in the following places:
7402 $sed 's/^/ /' libpath
7405 None of these seems to contain your C library. I need to get its name...
7410 rp='Where is your C library?'
7415 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
7416 set X `cat libnames`
7419 case $# in 1) xxx=file; esac
7420 echo "Extracting names from the following $xxx for later perusal:" >&4
7422 $sed 's/^/ /' libnames >&4
7424 $echo $n "This may take a while...$c" >&4
7428 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
7429 *) $nm $nm_opt $file 2>/dev/null;;
7434 $grep fprintf libc.tmp > libc.ptf
7435 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
7436 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
7438 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *//p'";\
7440 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7442 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
7444 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7446 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
7448 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7450 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
7452 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7454 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
7456 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7458 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
7460 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7462 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
7463 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
7465 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7467 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
7469 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7471 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
7473 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7475 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
7477 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7479 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
7481 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7483 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
7485 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7487 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
7489 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7491 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
7493 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7496 $nm -p $* 2>/dev/null >libc.tmp
7497 $grep fprintf libc.tmp > libc.ptf
7498 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
7499 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
7505 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
7507 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
7508 for thisname in $libnames $libc; do
7509 $ar t $thisname >>libc.tmp
7511 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
7513 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
7514 # Repeat libc to extract forwarders to DLL entries too
7515 for thisname in $libnames $libc; do
7516 $ar tv $thisname >>libc.tmp
7517 # Revision 50 of EMX has bug in $ar.
7518 # it will not extract forwarders to DLL entries
7519 # Use emximp which will extract exactly them.
7520 emximp -o tmp.imp $thisname \
7522 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
7523 < tmp.imp >>libc.tmp
7526 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
7529 echo "$ar didn't seem to work right." >&4
7530 echo "Maybe this is a Cray...trying bld instead..." >&4
7531 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
7533 for thisname in $libnames; do
7535 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
7536 $ar t $thisname >>libc.tmp
7540 echo "That didn't work either. Giving up." >&4
7550 echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4
7551 dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list
7553 *) if $test -f /lib/syscalls.exp; then
7555 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
7556 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list
7562 $rm -f libnames libpath
7564 : see if dld is available
7568 : is a C symbol defined?
7571 -v) tf=libc.tmp; tdc="";;
7572 -a) tf=libc.tmp; tdc="[]";;
7573 *) tlook="^$1\$"; tf=libc.list; tdc="()";;
7576 case "$reuseval-$4" in
7578 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
7583 if $test "$runnm" = true; then
7584 if $contains $tlook $tf >/dev/null 2>&1; then
7586 elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
7587 echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
7588 $cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true;
7589 $test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; };
7590 $rm -f try$_exe try.c core core.* try.core;
7593 echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
7594 $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
7595 $rm -f try$_exe try.c;
7600 $define) tval=true;;
7607 : define an is-in-libc? function
7608 inlibc='echo " "; td=$define; tu=$undef;
7609 sym=$1; var=$2; eval "was=\$$2";
7611 case "$reuseval$was" in
7621 echo "$sym() found." >&4;
7622 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
7624 echo "$sym() NOT found." >&4;
7625 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
7629 $define) echo "$sym() found." >&4;;
7630 *) echo "$sym() NOT found." >&4;;
7636 echo "Checking for C++..." >&4
7650 if eval $compile_ok && $run ./try >cplusplus$$; then
7651 val=`$cat cplusplus$$`
7652 echo "You are using a C++ compiler."
7655 echo "You are not using a C++ compiler."
7657 $rm -f try try.* cplusplus$$
7661 : see if dlopen exists
7663 xxx_ccflags="$ccflags"
7665 : with g++ one needs -shared to get is-in-libc to work for dlopen
7666 case "$gccversion" in
7668 *) case "$d_cplusplus" in
7669 "$define") ccflags="$ccflags -shared" ;;
7676 ccflags="$xxx_ccflags"
7678 : see if this is a unistd.h system
7679 set unistd.h i_unistd
7682 : determine which dynamic loading, if any, to compile in
7684 dldir="ext/DynaLoader"
7697 $define) dflt='y' ;;
7700 $define) dflt='y' ;;
7702 : Does a dl_xxx.xs file exist for this operating system
7703 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7706 rp="Do you wish to use dynamic loading?"
7713 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7714 dflt="$dldir/dl_${osname}.xs"
7715 elif $test "$d_dlopen" = "$define" ; then
7716 dflt="$dldir/dl_dlopen.xs"
7717 elif $test "$i_dld" = "$define" ; then
7718 dflt="$dldir/dl_dld.xs"
7723 *) dflt="$dldir/$dlsrc"
7726 echo "The following dynamic loading files are available:"
7727 : Can not go over to $dldir because getfile has path hard-coded in.
7728 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7729 rp="Source file to use for dynamic loading"
7735 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7739 Some systems may require passing special flags to $cc -c to
7740 compile modules that will be used to create a shared library.
7741 To use no flags, say "none".
7744 case "$cccdlflags" in
7745 '') case "$gccversion" in
7746 '') case "$osname" in
7748 next) dflt='none' ;;
7749 irix*) dflt='-KPIC' ;;
7750 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7751 sunos) dflt='-pic' ;;
7755 *) case "$osname" in
7756 darwin) dflt='none' ;;
7757 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7762 *) dflt="$cccdlflags" ;;
7764 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7767 none) cccdlflags=' ' ;;
7768 *) cccdlflags="$ans" ;;
7773 Some systems use ld to create libraries that can be dynamically loaded,
7774 while other systems (such as those using ELF) use $cc.
7778 '') $cat >try.c <<EOM
7779 /* Test for whether ELF binaries are produced */
7791 int i = open("a.out",O_RDONLY);
7794 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7795 exit(0); /* succeed (yes, it's ELF) */
7800 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7802 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7806 echo "I'll use ld to build dynamic libraries."
7815 rp="What command should be used to create dynamic libraries?"
7821 Some systems may require passing special flags to $ld to create a
7822 library that can be dynamically loaded. If your ld flags include
7823 -L/other/path options to locate libraries outside your loader's normal
7824 search path, you may need to specify those -L options here as well. To
7825 use no flags, say "none".
7828 case "$lddlflags" in
7829 '') case "$osname" in
7830 beos) dflt='-nostart' ;;
7832 case "$gccversion" in
7833 '') dflt="$dflt +vnocompatwarnings" ;;
7836 linux|irix*|gnu*) dflt='-shared' ;;
7837 next) dflt='none' ;;
7838 solaris) dflt='-G' ;;
7839 sunos) dflt='-assert nodefinitions' ;;
7840 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
7844 *) dflt="$lddlflags" ;;
7847 : Try to guess additional flags to pick up local libraries.
7848 : Be careful not to append to a plain 'none'
7852 for thisflag in $ldflags; do
7857 *) dflt="$dflt $thisflag" ;;
7864 ''|' ') dflt='none' ;;
7867 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
7870 none) lddlflags=' ' ;;
7871 *) lddlflags="$ans" ;;
7876 Some systems may require passing special flags to $cc to indicate that
7877 the resulting executable will use dynamic linking. To use no flags,
7881 case "$ccdlflags" in
7882 '') case "$osname" in
7883 linux|hpux|gnu*) dflt='-Wl,-E' ;;
7884 next|sunos) dflt='none' ;;
7888 *) dflt="$ccdlflags" ;;
7890 rp="Any special flags to pass to $cc to use dynamic linking?"
7893 none) ccdlflags=' ' ;;
7894 *) ccdlflags="$ans" ;;
7908 # No dynamic loading being used, so don't bother even to prompt.
7911 *) case "$useshrplib" in
7912 '') case "$osname" in
7913 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
7915 also='Building a shared libperl is required for dynamic loading to work on your system.'
7920 also='Building a shared libperl is needed for MAB support.'
7938 The perl executable is normally obtained by linking perlmain.c with
7939 libperl${_a}, any static extensions (usually just DynaLoader), and
7940 any other libraries needed on this system (such as -lm, etc.). Since
7941 your system supports dynamic loading, it is probably possible to build
7942 a shared libperl.$so. If you will have more than one executable linked
7943 to libperl.$so, this will significantly reduce the size of each
7944 executable, but it may have a noticeable effect on performance. The
7945 default is probably sensible for your system.
7949 rp="Build a shared libperl.$so (y/n)"
7953 useshrplib='true' ;;
7954 *) useshrplib='false' ;;
7959 case "$useshrplib" in
7963 # Figure out a good name for libperl.so. Since it gets stored in
7964 # a version-specific architecture-dependent library, the version
7965 # number isn't really that important, except for making cc/ld happy.
7967 # A name such as libperl.so.3.1
7968 majmin="libperl.$so.$patchlevel.$subversion"
7969 # A name such as libperl.so.301
7970 majonly=`echo $patchlevel $subversion |
7971 $awk '{printf "%d%02d", $1, $2}'`
7972 majonly=libperl.$so.$majonly
7973 # I'd prefer to keep the os-specific stuff here to a minimum, and
7974 # rely on figuring it out from the naming of libc.
7975 case "${osname}${osvers}" in
7978 # XXX How handle the --version stuff for MAB?
7980 linux*|gnu*) # ld won't link with a bare -lperl otherwise.
7983 cygwin*) # ld links against an importlib
7984 dflt=libperl$lib_ext
7986 *) # Try to guess based on whether libc has major.minor.
7988 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
7989 *libc.$so.[0-9]*) dflt=$majonly ;;
7990 *) dflt=libperl.$so ;;
8000 I need to select a good name for the shared libperl. If your system uses
8001 library names with major and minor numbers, then you might want something
8002 like $majmin. Alternatively, if your system uses a single version
8003 number for shared libraries, then you might want to use $majonly.
8004 Or, your system might be quite happy with a simple libperl.$so.
8006 Since the shared libperl will get installed into a version-specific
8007 architecture-dependent directory, the version number of the shared perl
8008 library probably isn't important, so the default should be o.k.
8011 rp='What name do you want to give to the shared libperl?'
8014 echo "Ok, I'll use $libperl"
8017 libperl="libperl${_a}"
8021 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
8025 WARNING: Use of the shrpdir variable for the installation location of
8026 the shared $libperl is not supported. It was never documented and
8027 will not work in this version. Let me (perlbug@perl.org)
8028 know of any problems this may cause.
8034 But your current setting of $shrpdir is
8035 the default anyway, so it's harmless.
8040 Further, your current attempted setting of $shrpdir
8041 conflicts with the value of $archlibexp/CORE
8042 that installperl will use.
8049 # How will the perl executable find the installed shared $libperl?
8050 # Add $xxx to ccdlflags.
8051 # If we can't figure out a command-line option, use $shrpenv to
8052 # set env LD_RUN_PATH. The main perl makefile uses this.
8053 shrpdir=$archlibexp/CORE
8056 if "$useshrplib"; then
8059 # We'll set it in Makefile.SH...
8064 freebsd|netbsd|openbsd|interix|dragonfly)
8065 xxx="-Wl,-R$shrpdir"
8067 bsdos|linux|irix*|dec_osf|gnu*)
8068 xxx="-Wl,-rpath,$shrpdir"
8071 # next doesn't like the default...
8074 # beos doesn't like the default, either.
8077 # hpux doesn't like the default, either.
8078 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
8081 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
8087 # Only add $xxx if it isn't already in ccdlflags.
8088 case " $ccdlflags " in
8090 *) ccdlflags="$ccdlflags $xxx"
8093 Adding $xxx to the flags
8094 passed to $ld so that the perl executable will find the
8095 installed shared $libperl.
8103 # Fix ccdlflags in AIX for building external extensions.
8104 # (For building Perl itself bare -bE:perl.exp is needed,
8105 # Makefile.SH takes care of this.)
8107 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
8109 # Respect a hint or command-line value.
8111 '') shrpenv="$tmp_shrpenv" ;;
8113 case "$ldlibpthname" in
8114 '') ldlibpthname=LD_LIBRARY_PATH ;;
8115 none) ldlibpthname='' ;;
8118 : determine where manual pages are on this system
8122 syspath='/usr/share/man/man1 /usr/man/man1'
8123 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
8124 syspath="$syspath /usr/man/u_man/man1"
8125 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
8126 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
8127 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
8128 sysman=`./loc . /usr/man/man1 $syspath`
8131 if $test -d "$sysman"; then
8132 echo "System manual is in $sysman." >&4
8134 echo "Could not find manual pages in source form." >&4
8137 : determine where manual pages go
8138 set man1dir man1dir none
8142 $spackage has manual pages available in source form.
8146 echo "However, you don't have nroff, so they're probably useless to you."
8148 '') man1dir="none";;
8151 echo "If you don't want the manual sources installed, answer 'none'."
8156 lookpath="$prefixexp/share/man/man1"
8157 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
8158 lookpath="$lookpath $prefixexp/man/p_man/man1"
8159 lookpath="$lookpath $prefixexp/man/u_man/man1"
8160 lookpath="$lookpath $prefixexp/man/man.1"
8162 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
8163 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
8173 rp="Where do the main $spackage manual pages (source) go?"
8175 if $test "X$man1direxp" != "X$ansexp"; then
8186 : What suffix to use on installed man pages
8193 rp="What suffix should be used for the main $spackage man pages?"
8195 '') case "$man1dir" in
8209 *) dflt="$man1ext";;
8216 : see if we can have long filenames
8218 first=123456789abcdef
8220 if (echo hi >$first) 2>/dev/null; then
8221 if $test -f 123456789abcde; then
8222 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
8225 echo 'You can have filenames longer than 14 characters.'>&4
8230 You can't have filenames longer than 14 chars.
8231 You can't even think about them!
8237 $rm -rf 123456789abcde*
8239 : determine where library module manual pages go
8240 set man3dir man3dir none
8244 $spackage has manual pages for many of the library modules.
8250 However, you don't have nroff, so they're probably useless to you.
8253 '') man3dir="none";;
8257 case "$d_flexfnam" in
8260 However, your system can't handle the long file names like File::Basename.3.
8263 '') man3dir="none";;
8267 echo "If you don't want the manual sources installed, answer 'none'."
8268 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
8270 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
8271 if $test -d "$privlib/man/man3"; then
8274 WARNING: Previous versions of perl installed man3 pages into
8275 $privlib/man/man3. This version will suggest a
8276 new default of $dflt.
8280 rp='Do you wish to preserve the old behavior?(y/n)'
8283 y*) dflt="$privlib/man/man3" ;;
8288 *) dflt="$man3dir" ;;
8295 rp="Where do the $package library man pages (source) go?"
8305 : What suffix to use on installed man pages
8311 rp="What suffix should be used for the $package library man pages?"
8313 '') case "$man3dir" in
8327 *) dflt="$man3ext";;
8334 : see if we have to deal with yellow pages, now NIS.
8335 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8336 if $test -f /usr/etc/nibindd; then
8338 echo "I'm fairly confident you're on a NeXT."
8340 rp='Do you get the hosts file via NetInfo?'
8349 y*) hostcat='nidump hosts .';;
8350 *) case "$hostcat" in
8351 nidump*) hostcat='';;
8361 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8369 rp='Are you getting the hosts file via yellow pages?'
8372 y*) hostcat='ypcat hosts';;
8373 *) hostcat='cat /etc/hosts';;
8379 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8382 '') test -f /etc/group && groupcat='cat /etc/group';;
8385 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8388 : now get the host name
8390 echo "Figuring out host name..." >&4
8391 case "$myhostname" in
8393 echo 'Maybe "hostname" will work...'
8394 if tans=`sh -c hostname 2>&1` ; then
8402 if $test "$cont"; then
8404 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8405 if tans=`cat /etc/systemid 2>&1` ; then
8407 phostname='cat /etc/systemid'
8408 echo "Whadyaknow. Xenix always was a bit strange..."
8411 elif $test -r /etc/systemid; then
8412 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8415 if $test "$cont"; then
8416 echo 'No, maybe "uuname -l" will work...'
8417 if tans=`sh -c 'uuname -l' 2>&1` ; then
8419 phostname='uuname -l'
8421 echo 'Strange. Maybe "uname -n" will work...'
8422 if tans=`sh -c 'uname -n' 2>&1` ; then
8424 phostname='uname -n'
8426 echo 'Oh well, maybe I can mine it out of whoami.h...'
8427 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8428 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8429 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8431 case "$myhostname" in
8432 '') echo "Does this machine have an identity crisis or something?"
8435 echo "Well, you said $myhostname before..."
8436 phostname='echo $myhostname';;
8442 case "$myhostname" in
8443 '') myhostname=noname ;;
8445 : you do not want to know about this
8450 if $test "$myhostname" ; then
8452 rp='Your host name appears to be "'$myhostname'".'" Right?"
8460 : bad guess or no guess
8461 while $test "X$myhostname" = X ; do
8463 rp="Please type the (one word) name of your host:"
8468 : translate upper to lower if necessary
8469 case "$myhostname" in
8471 echo "(Normalizing case in your host name)"
8472 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8476 case "$myhostname" in
8478 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8479 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8480 echo "(Trimming domain name from host name--host name is now $myhostname)"
8482 *) case "$mydomain" in
8485 test "X$hostcat" = "Xypcat hosts" &&
8486 ypmatch "$myhostname" hosts 2>/dev/null |\
8487 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8490 test "X$hostcat" != "X" &&
8491 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8492 /[ ]$myhostname[ . ]/p" > hosts
8495 if $test -f hosts; then
8496 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8497 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8498 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8499 hosts | $sort | $uniq | \
8500 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8501 case `$echo X$dflt` in
8502 X*\ *) echo "(Several hosts in the database matched hostname)"
8505 X.) echo "(You do not have fully-qualified names in the hosts database)"
8509 echo "(I cannot locate a hosts database anywhere)"
8514 tans=`./loc resolv.conf X /etc /usr/etc`
8515 if $test -f "$tans"; then
8516 echo "(Attempting domain name extraction from $tans)"
8517 dflt=.`$sed -n -e 's/ / /g' \
8518 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8519 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8521 .) dflt=.`$sed -n -e 's/ / /g' \
8522 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8523 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
8530 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8531 dflt=.`sh -c domainname 2>/dev/null`
8534 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8538 case "$dflt$osname" in
8539 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8540 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8544 .) echo "(Lost all hope -- silly guess then)"
8550 *) dflt="$mydomain";;
8554 rp="What is your domain name?"
8564 : translate upper to lower if necessary
8567 echo "(Normalizing case in your domain name)"
8568 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8572 : a little sanity check here
8573 case "$phostname" in
8576 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8577 $myhostname$mydomain|$myhostname) ;;
8579 case "$phostname" in
8581 echo "(That doesn't agree with your whoami.h file, by the way.)"
8584 echo "(That doesn't agree with your $phostname command, by the way.)"
8594 I need to get your e-mail address in Internet format if possible, i.e.
8595 something like user@host.domain. Please answer accurately since I have
8596 no easy means to double check it. The default value provided below
8597 is most probably close to reality but may not be valid from outside
8598 your organization...
8602 while test "$cont"; do
8604 '') dflt="$cf_by@$myhostname$mydomain";;
8605 *) dflt="$cf_email";;
8607 rp='What is your e-mail address?'
8613 rp='Address does not look like an Internet one. Use it anyway?'
8629 If you or somebody else will be maintaining perl at your site, please
8630 fill in the correct e-mail address here so that they may be contacted
8631 if necessary. Currently, the "perlbug" program included with perl
8632 will send mail to this address in addition to perlbug@perl.org. You may
8633 enter "none" for no administrator.
8636 case "$perladmin" in
8637 '') dflt="$cf_email";;
8638 *) dflt="$perladmin";;
8640 rp='Perl administrator e-mail address'
8644 : determine whether to only install version-specific parts.
8647 Do you want to install only the version-specific parts of the perl
8648 distribution? Usually you do *not* want to do this.
8650 case "$versiononly" in
8651 "$define"|[Yy]*|true) dflt='y' ;;
8654 rp="Do you want to install only the version-specific parts of perl?"
8657 [yY]*) val="$define";;
8663 case "$versiononly" in
8664 "$define") inc_version_list=''
8665 inc_version_list_init=0
8669 : figure out how to guarantee perl startup
8670 : XXX Note that this currently takes advantage of the bug that binexp ignores
8671 : the Configure -Dinstallprefix setting, which in turn means that under
8672 : relocatable @INC, initialinstalllocation is what binexp started as.
8673 case "$startperl" in
8675 case "$sharpbang" in
8679 I can use the #! construct to start perl on your system. This will
8680 make startup of perl scripts faster, but may cause problems if you
8681 want to share those scripts and perl is not in a standard place
8682 ($initialinstalllocation/perl) on all your platforms. The alternative
8683 is to force a shell by starting the script with a single ':' character.
8686 case "$versiononly" in
8687 "$define") dflt="$initialinstalllocation/perl$version";;
8688 *) dflt="$initialinstalllocation/perl";;
8690 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8693 none) startperl=": # use perl";;
8694 *) startperl="#!$ans"
8695 if $test 30 -lt `echo "$ans" | wc -c`; then
8698 WARNING: Some systems limit the #! command to 32 characters.
8699 If you experience difficulty running Perl scripts with #!, try
8700 installing Perl in a directory with a shorter pathname.
8706 *) startperl=": # use perl"
8711 echo "I'll use $startperl to start perl scripts."
8713 : figure best path for perl in scripts
8716 case "$versiononly" in
8717 "$define") perlpath="$initialinstalllocation/perl$version";;
8718 *) perlpath="$initialinstalllocation/perl";;
8720 case "$startperl" in
8725 I will use the "eval 'exec'" idiom to start Perl on your system.
8726 I can use the full path of your Perl binary for this purpose, but
8727 doing so may cause problems if you want to share those scripts and
8728 Perl is not always in a standard place ($initialinstalllocation/perl).
8731 dflt="$initialinstalllocation/perl"
8732 rp="What path shall I use in \"eval 'exec'\"?"
8739 case "$startperl" in
8741 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8744 : determine where public executable scripts go
8745 set scriptdir scriptdir
8747 case "$scriptdir" in
8750 : guess some guesses
8751 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8752 $test -d /usr/share/bin && dflt=/usr/share/bin
8753 $test -d /usr/local/script && dflt=/usr/local/script
8754 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8755 $test -d $prefixexp/script && dflt=$prefixexp/script
8759 *) dflt="$scriptdir"
8764 Some installations have a separate directory just for executable scripts so
8765 that they can mount it across multiple architectures but keep the scripts in
8766 one spot. You might, for example, have a subdirectory of /usr/share for this.
8767 Or you might just lump your scripts in with all your other executables.
8771 rp='Where do you keep publicly executable scripts?'
8773 if $test "X$ansexp" != "X$scriptdirexp"; then
8779 : A little fix up for an irregularly named variable.
8780 installscript="$installscriptdir"
8782 : determine where add-on public executables go
8784 '') dflt=$siteprefix/bin ;;
8788 rp='Pathname where the add-on public executables should be installed?'
8793 : determine where add-on html pages go
8794 : There is no standard location, so try to copy the previously-selected
8795 : directory structure for the core html pages.
8796 case "$sitehtml1dir" in
8797 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$siteprefix#"` ;;
8798 *) dflt=$sitehtml1dir ;;
8801 ''|' ') dflt=none ;;
8804 rp='Pathname where the site-specific html pages should be installed?'
8806 prefixvar=sitehtml1dir
8809 : determine where add-on library html pages go
8810 : There is no standard location, so try to copy the previously-selected
8811 : directory structure for the core html pages.
8812 case "$sitehtml3dir" in
8813 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$siteprefix#"` ;;
8814 *) dflt=$sitehtml3dir ;;
8817 ''|' ') dflt=none ;;
8820 rp='Pathname where the site-specific library html pages should be installed?'
8822 prefixvar=sitehtml3dir
8825 : determine where add-on manual pages go
8826 case "$siteman1dir" in
8827 '') dflt=`echo $man1dir | $sed "s#^$prefix#$siteprefix#"` ;;
8828 *) dflt=$siteman1dir ;;
8831 ''|' ') dflt=none ;;
8834 rp='Pathname where the site-specific manual pages should be installed?'
8836 prefixvar=siteman1dir
8839 : determine where add-on library man pages go
8840 case "$siteman3dir" in
8841 '') dflt=`echo $man3dir | $sed "s#^$prefix#$siteprefix#"` ;;
8842 *) dflt=$siteman3dir ;;
8845 ''|' ') dflt=none ;;
8848 rp='Pathname where the site-specific library manual pages should be installed?'
8850 prefixvar=siteman3dir
8853 : determine where add-on public executable scripts go
8854 case "$sitescript" in
8855 '') dflt=$siteprefix/script
8856 $test -d $dflt || dflt=$sitebin ;;
8857 *) dflt="$sitescript" ;;
8860 rp='Pathname where add-on public executable scripts should be installed?'
8862 prefixvar=sitescript
8865 case "$usefaststdio" in
8866 $define|true|[yY]*|'')
8867 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
8877 Perl can be built to use 'fast stdio', which means using the stdio
8878 library but also directly manipulating the stdio buffers to enable
8879 faster I/O. Using stdio is better for backward compatibility (especially
8880 for Perl extensions), but on the other hand since Perl 5.8 the 'perlio'
8881 interface has been preferred instead of stdio.
8883 If this doesn't make any sense to you, just accept the default '$dflt'.
8885 rp='Use the "fast stdio" if available?'
8888 y|Y) val="$define" ;;
8895 : define an is-a-typedef? function
8896 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8898 "") inclist="sys/types.h";;
8900 eval "varval=\$$var";
8904 for inc in $inclist; do
8905 echo "#include <$inc>" >>temp.c;
8907 echo "#ifdef $type" >> temp.c;
8908 echo "printf(\"We have $type\");" >> temp.c;
8909 echo "#endif" >> temp.c;
8910 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8911 if $contains $type temp.E >/dev/null 2>&1; then
8917 *) eval "$var=\$varval";;
8920 : define an is-a-typedef? function that prompts if the type is not available.
8921 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
8923 "") inclist="sys/types.h";;
8925 eval "varval=\$$var";
8929 for inc in $inclist; do
8930 echo "#include <$inc>" >>temp.c;
8932 echo "#ifdef $type" >> temp.c;
8933 echo "printf(\"We have $type\");" >> temp.c;
8934 echo "#endif" >> temp.c;
8935 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
8937 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
8938 if $contains $type temp.E >/dev/null 2>&1; then
8939 echo "$type found." >&4;
8942 echo "$type NOT found." >&4;
8948 *) eval "$var=\$varval";;
8951 : see what type lseek is declared as in the kernel
8952 rp="What is the type used for lseek's offset on this system?"
8953 set off_t lseektype long stdio.h sys/types.h
8957 echo "Checking to see how big your file offsets are..." >&4
8959 #include <sys/types.h>
8963 printf("%d\n", (int)sizeof($lseektype));
8968 if eval $compile_ok; then
8969 lseeksize=`$run ./try`
8970 echo "Your file offsets are $lseeksize bytes long."
8974 echo "(I can't seem to compile the test program. Guessing...)"
8975 rp="What is the size of your file offsets (in bytes)?"
8981 : see what type file positions are declared as in the library
8982 rp="What is the type for file position used by fsetpos()?"
8983 set fpos_t fpostype long stdio.h sys/types.h
8988 *_t) zzz="$fpostype" ;;
8991 echo "Checking the size of $zzz..." >&4
8993 #include <sys/types.h>
9000 printf("%d\n", (int)sizeof($fpostype));
9005 if eval $compile_ok; then
9009 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9012 echo "Your $zzz is $fpossize bytes long."
9018 echo "(I can't compile the test program. Guessing...)" >&4
9019 rp="What is the size of your file positions (in bytes)?"
9024 # Backward compatibility (uselfs is deprecated).
9026 "$define"|true|[yY]*)
9029 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
9031 uselargefiles="$define"
9035 case "$lseeksize:$fpossize" in
9038 You can have files larger than 2 gigabytes.
9041 *) case "$uselargefiles" in
9042 "$undef"|false|[nN]*) dflt='n' ;;
9047 Perl can be built to understand large files (files larger than 2 gigabytes)
9048 on some systems. To do so, Configure can be run with -Duselargefiles.
9050 If this doesn't make any sense to you, just accept the default '$dflt'.
9052 rp='Try to understand large files, if available?'
9055 y|Y) val="$define" ;;
9062 : Look for a hint-file generated 'call-back-unit'. If the
9063 : user has specified that a large files perl is to be built,
9064 : we may need to set or change some other defaults.
9065 if $test -f uselargefiles.cbu; then
9066 echo "Your platform has some specific hints regarding large file builds, using them..."
9067 . ./uselargefiles.cbu
9069 case "$uselargefiles" in
9071 if $test -f uselargefiles.cbu; then
9073 echo "Rechecking to see how big your file offsets are..." >&4
9075 #include <sys/types.h>
9079 printf("%d\n", (int)sizeof($lseektype));
9084 if eval $compile_ok; then
9085 lseeksize=`$run ./try`
9086 $echo "Your file offsets are now $lseeksize bytes long."
9090 echo "(I can't seem to compile the test program. Guessing...)"
9091 rp="What is the size of your file offsets (in bytes)?"
9096 *_t) zzz="$fpostype" ;;
9099 $echo $n "Rechecking the size of $zzz...$c" >&4
9101 #include <sys/types.h>
9108 printf("%d\n", (int)sizeof($fpostype));
9113 if eval $compile_ok; then
9118 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9121 echo " $fpossize bytes." >&4
9127 echo "(I can't compile the test program. Guessing...)" >&4
9128 rp="What is the size of your file positions (in bytes)?"
9137 case "$vendorprefix" in
9138 '') d_vendorbin="$undef"
9142 *) d_vendorbin="$define"
9143 : determine where vendor-supplied executables go.
9144 case "$vendorbin" in
9145 '') dflt=$vendorprefix/bin ;;
9146 *) dflt="$vendorbin" ;;
9149 rp='Pathname for the vendor-supplied executables directory?'
9152 vendorbinexp="$ansexp"
9158 case "$vendorprefix" in
9159 '') vendorhtml1dir=''
9160 vendorhtml1direxp=''
9162 *) : determine where vendor-supplied html pages go.
9163 : There is no standard location, so try to copy the previously-selected
9164 : directory structure for the core html pages.
9165 : XXX Better default suggestions would be welcome.
9166 case "$vendorhtml1dir" in
9167 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9168 *) dflt=$vendorhtml1dir ;;
9171 ''|' ') dflt=none ;;
9174 rp='Pathname for the vendor-supplied html pages?'
9176 vendorhtml1dir="$ans"
9177 vendorhtml1direxp="$ansexp"
9180 : Use ' ' for none so value is preserved next time through Configure
9181 $test X"$vendorhtml1dir" = "X" && vendorhtml1dir=' '
9182 prefixvar=vendorhtml1dir
9185 case "$vendorprefix" in
9186 '') vendorhtml3dir=''
9187 vendorhtml3direxp=''
9189 *) : determine where vendor-supplied module html pages go.
9190 : There is no standard location, so try to copy the previously-selected
9191 : directory structure for the core html pages.
9192 : XXX Better default suggestions would be welcome.
9193 case "$vendorhtml3dir" in
9194 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9195 *) dflt=$vendorhtml3dir ;;
9198 ''|' ') dflt=none ;;
9201 rp='Pathname for the vendor-supplied html pages?'
9203 vendorhtml3dir="$ans"
9204 vendorhtml3direxp="$ansexp"
9207 : Use ' ' for none so value is preserved next time through Configure
9208 $test X"$vendorhtml3dir" = "X" && vendorhtml3dir=' '
9209 prefixvar=vendorhtml3dir
9212 case "$vendorprefix" in
9213 '') vendorman1dir=''
9216 *) : determine where vendor-supplied manual pages go.
9217 case "$vendorman1dir" in
9218 '') dflt=`echo "$man1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9219 *) dflt=$vendorman1dir ;;
9222 ''|' ') dflt=none ;;
9225 rp='Pathname for the vendor-supplied manual section 1 pages?'
9227 vendorman1dir="$ans"
9228 vendorman1direxp="$ansexp"
9231 : Use ' ' for none so value is preserved next time through Configure
9232 $test X"$vendorman1dir" = "X" && vendorman1dir=' '
9233 prefixvar=vendorman1dir
9236 case "$vendorprefix" in
9237 '') vendorman3dir=''
9240 *) : determine where vendor-supplied module manual pages go.
9241 case "$vendorman3dir" in
9242 '') dflt=`echo "$man3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9243 *) dflt=$vendorman3dir ;;
9246 ''|' ') dflt=none ;;
9249 rp='Pathname for the vendor-supplied manual section 3 pages?'
9251 vendorman3dir="$ans"
9252 vendorman3direxp="$ansexp"
9255 : Use ' ' for none so value is preserved next time through Configure
9256 $test X"$vendorman3dir" = "X" && vendorman3dir=' '
9257 prefixvar=vendorman3dir
9260 case "$vendorprefix" in
9261 '') d_vendorscript="$undef"
9265 *) d_vendorscript="$define"
9266 : determine where vendor-supplied scripts go.
9267 case "$vendorscript" in
9268 '') dflt=$vendorprefix/script
9269 $test -d $dflt || dflt=$vendorbin ;;
9270 *) dflt="$vendorscript" ;;
9274 The installation process will create a directory for
9275 vendor-supplied scripts.
9279 rp='Pathname for the vendor-supplied scripts directory?'
9282 vendorscriptexp="$ansexp"
9285 prefixvar=vendorscript
9288 : see if qgcvt exists
9294 if $test X"$d_longdbl" = X"$define"; then
9296 echo "Checking how to print long doubles..." >&4
9298 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
9299 $cat >try.c <<'EOCP'
9300 #include <sys/types.h>
9304 printf("%.3f\n", d);
9308 if eval $compile; then
9312 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
9313 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
9314 echo "We will use %f."
9320 if $test X"$sPRIfldbl" = X; then
9321 $cat >try.c <<'EOCP'
9322 #include <sys/types.h>
9325 long double d = 123.456;
9326 printf("%.3Lf\n", d);
9330 if eval $compile; then
9334 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
9335 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
9336 echo "We will use %Lf."
9342 if $test X"$sPRIfldbl" = X; then
9343 $cat >try.c <<'EOCP'
9344 #include <sys/types.h>
9347 long double d = 123.456;
9348 printf("%.3llf\n", d);
9352 if eval $compile; then
9356 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
9357 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
9358 echo "We will use %llf."
9364 if $test X"$sPRIfldbl" = X; then
9365 $cat >try.c <<'EOCP'
9366 #include <sys/types.h>
9369 long double d = 123.456;
9370 printf("%.3lf\n", d);
9374 if eval $compile; then
9378 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
9379 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
9380 echo "We will use %lf."
9386 if $test X"$sPRIfldbl" = X; then
9387 echo "Cannot figure out how to print long doubles." >&4
9389 sSCNfldbl=$sPRIfldbl # expect consistency
9396 case "$sPRIfldbl" in
9397 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
9398 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
9399 d_SCNfldbl="$undef";
9401 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
9402 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
9403 d_SCNfldbl="$define";
9407 : Check how to convert floats to strings.
9409 if test "X$d_Gconvert" = X; then
9412 echo "Checking for an efficient way to convert floats to strings."
9414 case "$uselongdouble" in
9415 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
9417 case "$d_longdbl" in
9418 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
9420 case "$d_PRIgldbl" in
9421 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
9425 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
9426 char *myname = "gconvert";
9429 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
9430 char *myname = "gcvt";
9433 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
9434 char *myname = "qgcvt";
9435 #define DOUBLETYPE long double
9438 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
9440 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
9442 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
9445 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
9447 char *myname = "sprintf";
9451 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
9452 #define DOUBLETYPE long double
9454 #define DOUBLETYPE double
9460 #define I_STDLIB $i_stdlib
9466 checkit(expect, got)
9470 if (strcmp(expect, got)) {
9471 printf("%s oddity: Expected %s, got %s\n",
9472 myname, expect, got);
9482 /* This must be 1st test on (which?) platform */
9483 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
9484 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
9485 checkit("0.1", buf);
9487 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
9488 checkit("0.01", buf);
9490 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
9491 checkit("0.001", buf);
9493 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
9494 checkit("0.0001", buf);
9496 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
9497 if (strlen(buf) > 5)
9498 checkit("9e-005", buf); /* for Microsoft ?? */
9500 checkit("9e-05", buf);
9502 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
9505 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
9506 checkit("1.1", buf);
9508 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
9509 checkit("1.01", buf);
9511 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
9512 checkit("1.001", buf);
9514 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
9515 checkit("1.0001", buf);
9517 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
9518 checkit("1.00001", buf);
9520 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
9521 checkit("1.000001", buf);
9523 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
9526 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
9529 /* Some Linux gcvt's give 1.e+5 here. */
9530 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
9531 checkit("100000", buf);
9533 /* Some Linux gcvt's give -1.e+5 here. */
9534 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
9535 checkit("-100000", buf);
9537 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
9538 checkit("123.456", buf);
9540 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
9541 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
9542 /* 34 should be enough to scare even long double
9543 * places into using the e notation. */
9544 if (strlen(buf) > 5)
9545 checkit("1e+034", buf); /* for Microsoft */
9547 checkit("1e+34", buf);
9549 /* For Perl, if you add additional tests here, also add them to
9550 * t/base/num.t for benefit of platforms not using Configure or
9551 * overriding d_Gconvert */
9556 : first add preferred functions to our list
9558 for xxx_convert in $gconvert_preference; do
9559 case $xxx_convert in
9560 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
9561 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
9564 : then add any others
9565 for xxx_convert in gconvert gcvt sprintf; do
9568 *) xxx_list="$xxx_list $xxx_convert" ;;
9572 case "$d_longdbl$uselongdouble" in
9574 : again, add prefered functions to our list first
9576 for xxx_convert in $gconvert_ld_preference; do
9577 case $xxx_convert in
9578 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9579 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
9582 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
9583 for xxx_convert in qgcvt sprintf $xxx_list; do
9584 case "$xxx_ld_list" in
9585 $xxx_convert*|*" $xxx_convert"*) ;;
9586 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9589 : if sprintf cannot do long doubles, move it to the end
9590 if test "$d_PRIgldbl" != "$define"; then
9591 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
9593 : if no qgcvt, remove it
9594 if test "$d_qgcvt" != "$define"; then
9595 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
9598 xxx_list="$xxx_ld_list"
9602 for xxx_convert in $xxx_list; do
9603 echo "Trying $xxx_convert..."
9605 set try -DTRY_$xxx_convert
9606 if eval $compile; then
9607 echo "$xxx_convert() found." >&4
9609 echo "I'll use $xxx_convert to convert floats into a string." >&4
9612 echo "...But $xxx_convert didn't work as I expected."
9616 echo "$xxx_convert NOT found." >&4
9620 if test X$xxx_convert = X; then
9621 echo "*** WHOA THERE!!! ***" >&4
9622 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
9626 case "$xxx_convert" in
9627 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
9628 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
9629 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
9630 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
9631 "$define$define$define")
9632 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9633 "$define$define$undef")
9634 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9635 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9642 : see if _fwalk exists
9646 : Initialize h_fcntl
9649 : Initialize h_sysfile
9652 : access call always available on UNIX
9656 : locate the flags for 'access()'
9660 $cat >access.c <<EOCP
9661 #include <sys/types.h>
9666 #include <sys/file.h>
9679 : check sys/file.h first, no particular reason here
9680 if $test `./findhdr sys/file.h` && \
9681 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9683 echo "<sys/file.h> defines the *_OK access constants." >&4
9684 elif $test `./findhdr fcntl.h` && \
9685 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9687 echo "<fcntl.h> defines the *_OK access constants." >&4
9688 elif $test `./findhdr unistd.h` && \
9689 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9690 echo "<unistd.h> defines the *_OK access constants." >&4
9692 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9698 : see if accessx exists
9699 set accessx d_accessx
9702 : see if aintl exists
9706 : see if alarm exists
9710 : see if POSIX threads are available
9711 set pthread.h i_pthread
9714 : define a fucntion to check prototypes
9715 $cat > protochk <<EOSH
9718 optimize="$optimize"
9720 prototype="$prototype"
9723 usethreads=$usethreads
9724 i_pthread=$i_pthread
9725 pthread_h_first=$pthread_h_first
9728 $cat >> protochk <<'EOSH'
9733 while test $# -ge 2; do
9735 $define) echo "#include <$2>" >> try.c ;;
9736 literal) echo "$2" >> try.c ;;
9738 # Extra magic for the benefit of systems that need pthread.h
9739 # to be included early to correctly detect threadsafe functions.
9740 # Such functions must guarantee themselves, though, that the usethreads
9741 # and i_pthread have been defined, before calling protochk.
9742 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
9743 echo "#include <pthread.h>" >> try.c
9748 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
9749 cat >> try.c <<'EOCP'
9750 #ifdef CAN_PROTOTYPE
9751 #define _(args) args
9756 echo "$foo" >> try.c
9757 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
9758 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
9766 hasproto='varname=$1; func=$2; shift; shift;
9767 while $test $# -ge 2; do
9769 $define) echo "#include <$2>";;
9773 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
9774 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
9775 echo "$func() prototype found.";
9778 echo "$func() prototype NOT found.";
9783 $rm -f try.c tryout.c'
9785 : see if sys/types.h has to be included
9786 set sys/types.h i_systypes
9789 : see if sys/select.h has to be included
9790 set sys/select.h i_sysselct
9793 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9794 while $test $# -ge 2; do
9796 $define) echo "#include <$2>";;
9800 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9802 if eval $compile; then
9811 : see if we should include time.h, sys/time.h, or both
9813 if test "X$timeincl" = X; then
9814 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9815 $echo $n "I'm now running the test program...$c"
9817 #include <sys/types.h>
9822 #ifdef SYSTIMEKERNEL
9825 #include <sys/time.h>
9828 #include <sys/select.h>
9841 struct timezone tzp;
9843 if (foo.tm_sec == foo.tm_sec)
9846 if (bar.tv_sec == bar.tv_sec)
9853 for s_timezone in '-DS_TIMEZONE' ''; do
9855 for s_timeval in '-DS_TIMEVAL' ''; do
9856 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9857 for i_time in '' '-DI_TIME'; do
9858 for i_systime in '-DI_SYSTIME' ''; do
9861 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9862 if eval $compile; then
9863 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9867 $echo $n "Succeeded with $flags$c"
9879 *SYSTIMEKERNEL*) i_systimek="$define"
9880 timeincl=`./findhdr sys/time.h`
9881 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9882 *) i_systimek="$undef";;
9885 *I_TIME*) i_time="$define"
9886 timeincl=`./findhdr time.h`" $timeincl"
9887 echo "We'll include <time.h>." >&4;;
9888 *) i_time="$undef";;
9891 *I_SYSTIME*) i_systime="$define"
9892 timeincl=`./findhdr sys/time.h`" $timeincl"
9893 echo "We'll include <sys/time.h>." >&4;;
9894 *) i_systime="$undef";;
9898 : see if struct tm knows about tm_zone
9899 case "$i_systime$i_time" in
9902 echo "Checking to see if your struct tm has tm_zone field..." >&4
9903 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
9911 case "$d_tm_tm_zone" in
9912 "$define") echo "Yes, it does." ;;
9913 *) echo "No, it doesn't." ;;
9915 : see if struct tm knows about tm_gmtoff
9916 case "$i_systime$i_time" in
9919 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
9920 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
9928 case "$d_tm_tm_gmtoff" in
9929 "$define") echo "Yes, it does." ;;
9930 *) echo "No, it doesn't." ;;
9933 : see if asctime_r exists
9934 set asctime_r d_asctime_r
9936 case "$d_asctime_r" in
9938 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
9939 case "$d_asctime_r_proto:$usethreads" in
9940 ":define") d_asctime_r_proto=define
9941 set d_asctime_r_proto asctime_r $hdrs
9945 case "$d_asctime_r_proto" in
9947 case "$asctime_r_proto" in
9948 ''|0) try='char* asctime_r(const struct tm*, char*);'
9949 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;;
9951 case "$asctime_r_proto" in
9952 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
9953 ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;;
9955 case "$asctime_r_proto" in
9956 ''|0) try='int asctime_r(const struct tm*, char*);'
9957 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;;
9959 case "$asctime_r_proto" in
9960 ''|0) try='int asctime_r(const struct tm*, char*, int);'
9961 ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;;
9963 case "$asctime_r_proto" in
9964 ''|0) d_asctime_r=undef
9966 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
9967 * ) case "$asctime_r_proto" in
9968 REENTRANT_PROTO*) ;;
9969 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
9971 echo "Prototype: $try" ;;
9974 *) case "$usethreads" in
9975 define) echo "asctime_r has no prototype, not using it." >&4 ;;
9982 *) asctime_r_proto=0
9986 : see if atolf exists
9990 : see if atoll exists
9994 : Look for GCC-style attribute format
9995 case "$d_attribute_format" in
9998 echo "Checking whether your compiler can handle __attribute__((format)) ..." >&4
9999 $cat >attrib.c <<'EOCP'
10001 void my_special_printf(char* pat,...) __attribute__((__format__(__printf__,1,2)));
10003 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10004 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10005 echo "Your C compiler doesn't support __attribute__((format))."
10008 echo "Your C compiler supports __attribute__((format))."
10012 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10016 *) val="$d_attribute_format" ;;
10018 set d_attribute_format
10022 : Look for GCC-style attribute format with null format allowed
10023 case "$d_printf_format_null" in
10024 '') case "$d_attribute_format" in
10027 echo "Checking whether your compiler allows __printf__ format to be null ..." >&4
10028 $cat >attrib.c <<EOCP
10030 #$i_stdlib I_STDLIB
10032 #include <stdlib.h>
10034 int null_printf (char* pat,...) __attribute__((__format__(__printf__,1,2)));
10035 int null_printf (char* pat,...) { return (int)pat; }
10036 int main () { exit(null_printf(NULL)); }
10038 if $cc $ccflags -o attrib attrib.c >attrib.out 2>&1 ; then
10039 : run the executable in case it produces a run-time warning
10040 if $run ./attrib >>attrib.out 2>&1; then
10041 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10042 echo "Your C compiler doesn't allow __printf__ format to be null."
10045 echo "Your C compiler allows __printf__ format to be null."
10049 echo "Your C compiler executable failed with __printf__ format null."
10053 echo "Your C compiler fails with __printf__ format null."
10060 *) val="$d_printf_format_null" ;;
10062 set d_printf_format_null
10066 : Look for GCC-style attribute malloc
10067 case "$d_attribute_malloc" in
10070 echo "Checking whether your compiler can handle __attribute__((malloc)) ..." >&4
10071 $cat >attrib.c <<'EOCP'
10073 char *go_get_some_memory( int how_many_bytes ) __attribute__((malloc));
10075 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10076 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10077 echo "Your C compiler doesn't support __attribute__((malloc))."
10080 echo "Your C compiler supports __attribute__((malloc))."
10084 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10088 *) val="$d_attribute_malloc" ;;
10090 set d_attribute_malloc
10094 : Look for GCC-style attribute nonnull
10095 case "$d_attribute_nonnull" in
10098 echo "Checking whether your compiler can handle __attribute__((nonnull(1))) ..." >&4
10099 $cat >attrib.c <<'EOCP'
10101 void do_something (char *some_pointer,...) __attribute__((nonnull(1)));
10103 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10104 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10105 echo "Your C compiler doesn't support __attribute__((nonnull))."
10108 echo "Your C compiler supports __attribute__((nonnull))."
10112 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10116 *) val="$d_attribute_nonnull" ;;
10118 set d_attribute_nonnull
10122 : Look for GCC-style attribute noreturn
10123 case "$d_attribute_noreturn" in
10126 echo "Checking whether your compiler can handle __attribute__((noreturn)) ..." >&4
10127 $cat >attrib.c <<'EOCP'
10129 void fall_over_dead( void ) __attribute__((noreturn));
10131 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10132 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10133 echo "Your C compiler doesn't support __attribute__((noreturn))."
10136 echo "Your C compiler supports __attribute__((noreturn))."
10140 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10144 *) val="$d_attribute_noreturn" ;;
10146 set d_attribute_noreturn
10150 : Look for GCC-style attribute pure
10151 case "$d_attribute_pure" in
10154 echo "Checking whether your compiler can handle __attribute__((pure)) ..." >&4
10155 $cat >attrib.c <<'EOCP'
10157 int square( int n ) __attribute__((pure));
10159 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10160 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10161 echo "Your C compiler doesn't support __attribute__((pure))."
10164 echo "Your C compiler supports __attribute__((pure))."
10168 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10172 *) val="$d_attribute_pure" ;;
10174 set d_attribute_pure
10178 : Look for GCC-style attribute unused
10179 case "$d_attribute_unused" in
10182 echo "Checking whether your compiler can handle __attribute__((unused)) ..." >&4
10183 $cat >attrib.c <<'EOCP'
10185 int do_something( int dummy __attribute__((unused)), int n );
10187 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10188 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10189 echo "Your C compiler doesn't support __attribute__((unused))."
10192 echo "Your C compiler supports __attribute__((unused))."
10196 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10200 *) val="$d_attribute_unused" ;;
10202 set d_attribute_unused
10206 : Look for GCC-style attribute warn_unused_result
10207 case "$d_attribute_warn_unused_result" in
10210 echo "Checking whether your compiler can handle __attribute__((warn_unused_result)) ..." >&4
10211 $cat >attrib.c <<'EOCP'
10213 int I_will_not_be_ignored(void) __attribute__((warn_unused_result));
10215 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10216 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10217 echo "Your C compiler doesn't support __attribute__((warn_unused_result))."
10220 echo "Your C compiler supports __attribute__((warn_unused_result))."
10224 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10228 *) val="$d_attribute_warn_unused_result" ;;
10230 set d_attribute_warn_unused_result
10234 : see if bcmp exists
10238 : see if bcopy exists
10242 : see if getpgrp exists
10243 set getpgrp d_getpgrp
10246 case "$d_getpgrp" in
10249 echo "Checking to see which flavor of getpgrp is in use..."
10251 #$i_unistd I_UNISTD
10252 #include <sys/types.h>
10254 # include <unistd.h>
10256 #$i_stdlib I_STDLIB
10258 #include <stdlib.h>
10262 if (getuid() == 0) {
10263 printf("(I see you are running Configure as super-user...)\n");
10266 #ifdef TRY_BSD_PGRP
10267 if (getpgrp(1) == 0)
10276 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10277 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
10279 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10280 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
10283 echo "I can't seem to compile and run the test program."
10285 xxx="a USG one, i.e. you use getpgrp()."
10287 # SVR4 systems can appear rather BSD-ish.
10288 case "$i_unistd" in
10290 xxx="a BSD one, i.e. you use getpgrp(pid)."
10294 xxx="probably a USG one, i.e. you use getpgrp()."
10299 echo "Assuming your getpgrp is $xxx" >&4
10308 : see if setpgrp exists
10309 set setpgrp d_setpgrp
10312 case "$d_setpgrp" in
10315 echo "Checking to see which flavor of setpgrp is in use..."
10317 #$i_unistd I_UNISTD
10318 #include <sys/types.h>
10320 # include <unistd.h>
10322 #$i_stdlib I_STDLIB
10324 #include <stdlib.h>
10328 if (getuid() == 0) {
10329 printf("(I see you are running Configure as super-user...)\n");
10332 #ifdef TRY_BSD_PGRP
10333 if (-1 == setpgrp(1, 1))
10336 if (setpgrp() != -1)
10342 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10343 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
10345 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10346 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
10349 echo "(I can't seem to compile and run the test program.)"
10351 xxx="a USG one, i.e. you use setpgrp()."
10353 # SVR4 systems can appear rather BSD-ish.
10354 case "$i_unistd" in
10356 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
10360 xxx="probably a USG one, i.e. you use setpgrp()."
10365 echo "Assuming your setpgrp is $xxx" >&4
10373 : Look for GCC-style __builtin_choose_expr
10374 case "$d_builtin_choose_expr" in
10377 echo "Checking whether your compiler can handle __builtin_choose_expr ..." >&4
10378 $cat >try.c <<'EOCP'
10379 #include <assert.h>
10380 #include <stdlib.h>
10383 #define SYRINX(x) __builtin_choose_expr( x, (1056*2), (103*50) )
10386 assert( SYRINX(1) == 2112 );
10387 assert( SYRINX(1) != 5150 );
10388 assert( SYRINX(0) == 5150 );
10389 assert( SYRINX(0) != 2112 );
10390 puts( "All good!" );
10396 if eval $compile; then
10397 echo "Your C compiler supports __builtin_choose_expr."
10400 echo "Your C compiler doesn't seem to understand __builtin_choose_expr."
10404 *) val="$d_builtin_choose_expr" ;;
10407 set d_builtin_choose_expr
10409 $rm -f try.* try core core.try.*
10411 : Look for GCC-style __builtin_expect
10412 case "$d_builtin_expect" in
10415 echo "Checking whether your compiler can handle __builtin_expect ..." >&4
10416 $cat >builtin.c <<'EOCP'
10419 if ( __builtin_expect(n, 0) ) n = 1;
10423 if eval $compile; then
10424 echo "Your C compiler supports __builtin_choose_expr."
10427 echo "Your C compiler doesn't seem to understand __builtin_choose_expr."
10431 *) val="$d_builtin_expect" ;;
10434 set d_builtin_expect
10436 $rm -f try.* try core core.try.*
10438 : see if bzero exists
10442 : see if stdarg is available
10444 if $test `./findhdr stdarg.h`; then
10445 echo "<stdarg.h> found." >&4
10448 echo "<stdarg.h> NOT found." >&4
10452 : see if varags is available
10454 if $test `./findhdr varargs.h`; then
10455 echo "<varargs.h> found." >&4
10457 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
10460 : set up the varargs testing programs
10461 $cat > varargs.c <<EOP
10463 #include <stdarg.h>
10466 #include <varargs.h>
10470 int f(char *p, ...)
10484 p = va_arg(ap, char *);
10490 $cat > varargs <<EOP
10492 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
10501 : now check which varargs header should be included
10506 if `./varargs I_STDARG`; then
10508 elif `./varargs I_VARARGS`; then
10513 if `./varargs I_VARARGS`; then
10520 echo "I could not find the definition for va_dcl... You have problems..." >&4
10521 val="$undef"; set i_stdarg; eval $setvar
10522 val="$undef"; set i_varargs; eval $setvar
10527 case "$i_varhdr" in
10529 val="$define"; set i_stdarg; eval $setvar
10530 val="$undef"; set i_varargs; eval $setvar
10533 val="$undef"; set i_stdarg; eval $setvar
10534 val="$define"; set i_varargs; eval $setvar
10537 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
10541 : see if the Compiler supports C99 variadic macros
10542 case "$i_stdarg$i_stdlib" in
10544 echo "You have <stdarg.h> and <stdlib.h>, so checking for C99 variadic macros." >&4
10547 #include <stdarg.h>
10549 #define foo(buffer, format, ...) sprintf(buffer, format, __VA_ARGS__)
10553 foo(buf, "%d %g %.*s", 123, 456.0, (int)3, "789fail");
10559 if eval $compile && $run ./try 2>&1 >/dev/null; then
10560 case "`$run ./try`" in
10562 echo "You have C99 variadic macros." >&4
10563 d_c99_variadic_macros="$define"
10566 echo "You don't have functional C99 variadic macros." >&4
10567 d_c99_variadic_macros="$undef"
10571 echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4
10572 d_c99_variadic_macros="$undef"
10574 $rm -f try.* try core core.try.*
10577 echo "You don't have <stdarg.h> and <stdlib.h>, so not checking for C99 variadic macros." >&4
10578 d_c99_variadic_macros="$undef"
10582 : see if signal is declared as pointer to function returning int or void
10584 xxx=`./findhdr signal.h`
10585 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
10586 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
10587 echo "You have int (*signal())() instead of void." >&4
10589 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
10590 echo "You have void (*signal())()." >&4
10592 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
10593 echo "You have int (*signal())() instead of void." >&4
10595 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
10596 echo "You have void (*signal())()." >&4
10599 case "$d_voidsig" in
10601 echo "I can't determine whether signal handler returns void or int..." >&4
10603 rp="What type does your signal handler return?"
10606 v*) val="$define";;
10610 echo "As you already told me, signal handler returns void." >&4
10613 *) echo "As you already told me, signal handler returns int." >&4
10620 case "$d_voidsig" in
10621 "$define") signal_t="void";;
10622 *) signal_t="int";;
10626 : check for ability to cast large floats to 32-bit ints.
10628 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
10629 if $test "$intsize" -ge 4; then
10636 #$i_stdlib I_STDLIB
10638 #include <stdlib.h>
10640 #include <sys/types.h>
10641 #include <signal.h>
10642 $signal_t blech(int s) { exit(3); }
10649 signal(SIGFPE, blech);
10651 /* Don't let compiler optimize the test away. Store the number
10652 in a writable string for gcc to pass to sscanf under HP/UX.
10654 sprintf(str, "2147483647");
10655 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
10659 /* x86 processors will probably give 0x8000 0000, which is a
10660 sign change. We don't want that. We want to mimic SPARC
10661 behavior here, which is to preserve the sign and give
10664 if (i32 != ($xxx) f)
10670 if eval $compile_ok; then
10674 echo "(I can't seem to compile the test program--assuming it can't)"
10679 echo "Yup, it can."
10682 echo "Nope, it can't."
10689 : check for ability to cast negative floats to unsigned
10691 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
10694 #$i_stdlib I_STDLIB
10696 #include <stdlib.h>
10698 #include <sys/types.h>
10699 #include <signal.h>
10700 $signal_t blech(int s) { exit(7); }
10701 $signal_t blech_in_list(int s) { exit(4); }
10702 unsigned long dummy_long(unsigned long p) { return p; }
10703 unsigned int dummy_int(unsigned int p) { return p; }
10704 unsigned short dummy_short(unsigned short p) { return p; }
10708 unsigned long along;
10710 unsigned short ashort;
10714 /* Frustrate gcc-2.7.2's optimizer which failed this test with
10715 a direct f = -123. assignment. gcc-2.8.0 reportedly
10716 optimized the whole file away
10718 /* Store the number in a writable string for gcc to pass to
10719 sscanf under HP/UX.
10721 sprintf(str, "-123");
10722 sscanf(str, "%lf", &f); /* f = -123.; */
10724 signal(SIGFPE, blech);
10725 along = (unsigned long)f;
10726 aint = (unsigned int)f;
10727 ashort = (unsigned short)f;
10728 if (along != (unsigned long)-123)
10730 if (aint != (unsigned int)-123)
10732 if (ashort != (unsigned short)-123)
10734 sprintf(str, "1073741824.");
10735 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
10738 along = (unsigned long)f;
10739 if (along != 0x80000000)
10743 along = (unsigned long)f;
10744 if (along != 0x7fffffff)
10748 along = (unsigned long)f;
10749 if (along != 0x80000001)
10753 signal(SIGFPE, blech_in_list);
10754 sprintf(str, "123.");
10755 sscanf(str, "%lf", &f); /* f = 123.; */
10756 along = dummy_long((unsigned long)f);
10757 aint = dummy_int((unsigned int)f);
10758 ashort = dummy_short((unsigned short)f);
10759 if (along != (unsigned long)123)
10761 if (aint != (unsigned int)123)
10763 if (ashort != (unsigned short)123)
10770 if eval $compile_ok; then
10774 echo "(I can't seem to compile the test program--assuming it can't)"
10777 case "$castflags" in
10779 echo "Yup, it can."
10782 echo "Nope, it can't."
10789 : see if vprintf exists
10791 if set vprintf val -f d_vprintf; eval $csym; $val; then
10792 echo 'vprintf() found.' >&4
10795 #include <varargs.h>
10796 #$i_stdlib I_STDLIB
10798 #include <stdlib.h>
10801 int main() { xxx("foo"); }
10810 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
10814 if eval $compile && $run ./try; then
10815 echo "Your vsprintf() returns (int)." >&4
10818 echo "Your vsprintf() returns (char*)." >&4
10822 echo 'vprintf() NOT found.' >&4
10833 : see if chown exists
10837 : see if chroot exists
10838 set chroot d_chroot
10841 : see if chsize exists
10842 set chsize d_chsize
10845 : see if class exists
10849 : see if clearenv exists
10850 set clearenv d_clearenv
10853 hasstruct='varname=$1; struct=$2; shift; shift;
10854 while $test $# -ge 2; do
10856 $define) echo "#include <$2>";;
10860 echo "int main () { struct $struct foo; }" >> try.c;
10862 if eval $compile; then
10869 $rm -f try.c try.o'
10873 : see whether socket exists
10875 $echo $n "Hmm... $c" >&4
10876 if set socket val -f d_socket; eval $csym; $val; then
10877 echo "Looks like you have Berkeley networking support." >&4
10879 if set setsockopt val -f; eval $csym; $val; then
10882 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
10883 d_oldsock="$define"
10886 if $contains socklib libc.list >/dev/null 2>&1; then
10887 echo "Looks like you have Berkeley networking support." >&4
10889 : we will have to assume that it supports the 4.2 BSD interface
10892 echo "You don't have Berkeley networking in libc$_a..." >&4
10893 if test "X$d_socket" = "X$define"; then
10894 echo "...but you seem to believe that you have sockets." >&4
10896 for net in net socket
10898 if test -f /usr/lib/lib$net$_a; then
10899 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
10900 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
10901 if $contains socket libc.list >/dev/null 2>&1; then
10906 echo "...but the Wollongong group seems to have hacked it in." >&4
10907 sockethdr="-I/usr/netinclude"
10910 echo "Found Berkeley sockets interface in lib$net." >&4
10911 if $contains setsockopt libc.list >/dev/null 2>&1; then
10914 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
10915 d_oldsock="$define"
10921 if test "X$d_socket" != "X$define"; then
10922 echo "or anywhere else I see." >&4
10930 : see if socketpair exists
10931 set socketpair d_sockpair
10936 echo "Checking the availability of certain socket constants..." >&4
10937 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
10938 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
10940 #include <sys/types.h>
10941 #include <sys/socket.h>
10947 set try; if eval $compile; then
10950 set d_${enum}; eval $setvar
10954 : see if this is a sys/uio.h system
10955 set sys/uio.h i_sysuio
10960 echo "Checking to see if your system supports struct cmsghdr..." >&4
10961 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
10963 case "$d_cmsghdr_s" in
10964 "$define") echo "Yes, it does." ;;
10965 *) echo "No, it doesn't." ;;
10969 : check for const keyword
10971 echo 'Checking to see if your C compiler knows about "const"...' >&4
10972 $cat >const.c <<'EOCP'
10973 typedef struct spug { int drokk; } spug;
10977 const spug y = { 0 };
10980 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
10982 echo "Yup, it does."
10985 echo "Nope, it doesn't."
10990 : see if copysignl exists
10991 set copysignl d_copysignl
10994 : see if crypt exists
10999 $define) cryptlib='' ;;
11000 *) if set crypt val -f d_crypt; eval $csym; $val; then
11001 echo 'crypt() found.' >&4
11005 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
11006 if $test -z "$cryptlib"; then
11007 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
11011 if $test -z "$cryptlib"; then
11012 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
11016 if $test -z "$cryptlib"; then
11017 cryptlib=`./loc libcrypt$_a "" $libpth`
11021 if $test -z "$cryptlib"; then
11022 echo 'crypt() NOT found.' >&4
11033 : see if this is a crypt.h system
11034 set crypt.h i_crypt
11037 : see if crypt_r exists
11038 set crypt_r d_crypt_r
11040 case "$d_crypt_r" in
11042 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
11043 case "$d_crypt_r_proto:$usethreads" in
11044 ":define") d_crypt_r_proto=define
11045 set d_crypt_r_proto crypt_r $hdrs
11049 case "$d_crypt_r_proto" in
11051 case "$crypt_r_proto" in
11052 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
11053 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCS ;;
11055 case "$crypt_r_proto" in
11056 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
11057 ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCD ;;
11059 case "$crypt_r_proto" in
11060 ''|0) d_crypt_r=undef
11062 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
11063 * ) case "$crypt_r_proto" in
11064 REENTRANT_PROTO*) ;;
11065 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
11067 echo "Prototype: $try" ;;
11070 *) case "$usethreads" in
11071 define) echo "crypt_r has no prototype, not using it." >&4 ;;
11082 : get csh whereabouts
11084 'csh') val="$undef" ;;
11085 *) val="$define" ;;
11089 : Respect a hint or command line value for full_csh.
11090 case "$full_csh" in
11091 '') full_csh=$csh ;;
11094 : see if ctermid exists
11095 set ctermid d_ctermid
11098 : see if ctermid_r exists
11099 set ctermid_r d_ctermid_r
11101 case "$d_ctermid_r" in
11103 hdrs="$i_systypes sys/types.h define stdio.h "
11104 case "$d_ctermid_r_proto:$usethreads" in
11105 ":define") d_ctermid_r_proto=define
11106 set d_ctermid_r_proto ctermid_r $hdrs
11110 case "$d_ctermid_r_proto" in
11112 case "$ctermid_r_proto" in
11113 ''|0) try='char* ctermid_r(char*);'
11114 ./protochk "extern $try" $hdrs && ctermid_r_proto=B_B ;;
11116 case "$ctermid_r_proto" in
11117 ''|0) d_ctermid_r=undef
11119 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
11120 * ) case "$ctermid_r_proto" in
11121 REENTRANT_PROTO*) ;;
11122 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
11124 echo "Prototype: $try" ;;
11127 *) case "$usethreads" in
11128 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
11135 *) ctermid_r_proto=0
11139 : see if ctime_r exists
11140 set ctime_r d_ctime_r
11142 case "$d_ctime_r" in
11144 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
11145 case "$d_ctime_r_proto:$usethreads" in
11146 ":define") d_ctime_r_proto=define
11147 set d_ctime_r_proto ctime_r $hdrs
11151 case "$d_ctime_r_proto" in
11153 case "$ctime_r_proto" in
11154 ''|0) try='char* ctime_r(const time_t*, char*);'
11155 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;;
11157 case "$ctime_r_proto" in
11158 ''|0) try='char* ctime_r(const time_t*, char*, int);'
11159 ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;;
11161 case "$ctime_r_proto" in
11162 ''|0) try='int ctime_r(const time_t*, char*);'
11163 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;;
11165 case "$ctime_r_proto" in
11166 ''|0) try='int ctime_r(const time_t*, char*, int);'
11167 ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;;
11169 case "$ctime_r_proto" in
11170 ''|0) d_ctime_r=undef
11172 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
11173 * ) case "$ctime_r_proto" in
11174 REENTRANT_PROTO*) ;;
11175 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
11177 echo "Prototype: $try" ;;
11180 *) case "$usethreads" in
11181 define) echo "ctime_r has no prototype, not using it." >&4 ;;
11192 : see if cuserid exists
11193 set cuserid d_cuserid
11196 : see if this is a limits.h system
11197 set limits.h i_limits
11200 : see if this is a float.h system
11201 set float.h i_float
11204 : See if number of significant digits in a double precision number is known
11206 $cat >dbl_dig.c <<EOM
11207 #$i_limits I_LIMITS
11210 #include <limits.h>
11216 printf("Contains DBL_DIG");
11219 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
11220 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
11221 echo "DBL_DIG found." >&4
11224 echo "DBL_DIG NOT found." >&4
11231 : see if dbm.h is available
11232 : see if dbmclose exists
11233 set dbmclose d_dbmclose
11236 case "$d_dbmclose" in
11246 *) set rpcsvc/dbm.h i_rpcsvcdbm
11251 *) echo "We won't be including <dbm.h>"
11261 : see if prototype for dbminit is available
11263 set d_dbminitproto dbminit $i_dbm dbm.h
11266 : see if difftime exists
11267 set difftime d_difftime
11270 : see if this is a dirent system
11272 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
11274 echo "<dirent.h> found." >&4
11277 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
11278 echo "<sys/dir.h> found." >&4
11281 xinc=`./findhdr sys/ndir.h`
11283 echo "<dirent.h> NOT found." >&4
11288 : Look for type of directory structure.
11290 $cppstdin $cppflags $cppminus < "$xinc" > try.c
11292 case "$direntrytype" in
11294 case "$i_dirent" in
11295 $define) guess1='struct dirent' ;;
11296 *) guess1='struct direct' ;;
11299 *) guess1="$direntrytype"
11304 'struct dirent') guess2='struct direct' ;;
11305 *) guess2='struct dirent' ;;
11308 if $contains "$guess1" try.c >/dev/null 2>&1; then
11309 direntrytype="$guess1"
11310 echo "Your directory entries are $direntrytype." >&4
11311 elif $contains "$guess2" try.c >/dev/null 2>&1; then
11312 direntrytype="$guess2"
11313 echo "Your directory entries seem to be $direntrytype." >&4
11315 echo "I don't recognize your system's directory entries." >&4
11316 rp="What type is used for directory entries on this system?"
11319 direntrytype="$ans"
11324 : see if the directory entry stores field length
11326 $cppstdin $cppflags $cppminus < "$xinc" > try.c
11327 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
11328 echo "Good, your directory entry keeps length information in d_namlen." >&4
11331 echo "Your directory entry does not know about the d_namlen field." >&4
11338 : Look for DIR.dd_fd
11339 case "$i_dirent" in
11341 echo "Checking to see if DIR has a dd_fd member variable" >&4
11343 #$i_stdlib I_STDLIB
11345 #include <stdlib.h>
11347 #include <dirent.h>
11357 if eval $compile; then
11358 echo "Yes, it does."
11361 echo "No, it does not."
11366 echo "You don't have a <dirent.h>, so not checking for dd_fd." >&4
11374 : see if this is an sysdir system
11375 set sys/dir.h i_sysdir
11378 : see if this is an sysndir system
11379 set sys/ndir.h i_sysndir
11384 $cat >dirfd.c <<EOM
11386 #$i_stdlib I_STDLIB
11388 #include <stdlib.h>
11390 #$i_dirent I_DIRENT /**/
11391 #$i_sysdir I_SYS_DIR /**/
11392 #$i_sysndir I_SYS_NDIR /**/
11393 #$i_systypes I_SYS_TYPES /**/
11394 #if defined(I_SYS_TYPES)
11395 #include <sys/types.h>
11397 #if defined(I_DIRENT)
11398 #include <dirent.h>
11399 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
11400 #include <sys/dir.h>
11404 #include <sys/ndir.h>
11408 #include <ndir.h> /* may be wrong in the future */
11410 #include <sys/dir.h>
11416 DIR *dirp = opendir(".");
11417 if (dirfd(dirp) >= 0)
11425 if eval $compile; then
11429 $define) echo "dirfd() found." >&4 ;;
11430 *) echo "dirfd() NOT found." >&4 ;;
11436 : see if dlerror exists
11439 set dlerror d_dlerror
11443 : see if dlfcn is available
11444 set dlfcn.h i_dlfcn
11451 On a few systems, the dynamically loaded modules that perl generates and uses
11452 will need a different extension than shared libs. The default will probably
11458 *) dflt="$dlext" ;;
11460 rp='What is the extension of dynamically loaded modules'
11469 : Check if dlsym need a leading underscore
11475 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
11476 $cat >dyna.c <<'EOM'
11483 #$i_stdlib I_STDLIB
11485 #include <stdlib.h>
11489 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
11491 #include <sys/types.h>
11496 extern int fred() ;
11505 int mode = RTLD_LAZY ;
11507 handle = dlopen("./dyna.$dlext", mode) ;
11508 if (handle == NULL) {
11513 symbol = dlsym(handle, "fred") ;
11514 if (symbol == NULL) {
11515 /* try putting a leading underscore */
11516 symbol = dlsym(handle, "_fred") ;
11517 if (symbol == NULL) {
11530 : Call the object file tmp-dyna.o in case dlext=o.
11531 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
11532 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
11533 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
11534 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
11537 1) echo "Test program failed using dlopen." >&4
11538 echo "Perhaps you should not use dynamic loading." >&4;;
11539 2) echo "Test program failed using dlsym." >&4
11540 echo "Perhaps you should not use dynamic loading." >&4;;
11541 3) echo "dlsym needs a leading underscore" >&4
11543 4) echo "dlsym doesn't need a leading underscore." >&4;;
11546 echo "I can't compile and run the test program." >&4
11547 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
11552 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
11557 : see if drand48_r exists
11558 set drand48_r d_drand48_r
11560 case "$d_drand48_r" in
11562 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
11563 case "$d_drand48_r_proto:$usethreads" in
11564 ":define") d_drand48_r_proto=define
11565 set d_drand48_r_proto drand48_r $hdrs
11569 case "$d_drand48_r_proto" in
11571 case "$drand48_r_proto" in
11572 ''|0) try='int drand48_r(struct drand48_data*, double*);'
11573 ./protochk "extern $try" $hdrs && drand48_r_proto=I_ST ;;
11575 case "$drand48_r_proto" in
11576 ''|0) d_drand48_r=undef
11578 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
11579 * ) case "$drand48_r_proto" in
11580 REENTRANT_PROTO*) ;;
11581 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
11583 echo "Prototype: $try" ;;
11586 *) case "$usethreads" in
11587 define) echo "drand48_r has no prototype, not using it." >&4 ;;
11594 *) drand48_r_proto=0
11598 : see if prototype for drand48 is available
11600 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
11603 : see if dup2 exists
11607 : see if eaccess exists
11608 set eaccess d_eaccess
11611 : see if endgrent exists
11612 set endgrent d_endgrent
11615 : see if this is an grp system
11621 xxx=`./findhdr grp.h`
11622 $cppstdin $cppflags $cppminus < $xxx >$$.h
11624 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
11636 set d_grpasswd; eval $setvar
11640 : see if endgrent_r exists
11641 set endgrent_r d_endgrent_r
11643 case "$d_endgrent_r" in
11645 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11646 case "$d_endgrent_r_proto:$usethreads" in
11647 ":define") d_endgrent_r_proto=define
11648 set d_endgrent_r_proto endgrent_r $hdrs
11652 case "$d_endgrent_r_proto" in
11654 case "$endgrent_r_proto" in
11655 ''|0) try='int endgrent_r(FILE**);'
11656 ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;;
11658 case "$endgrent_r_proto" in
11659 ''|0) try='void endgrent_r(FILE**);'
11660 ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;;
11662 case "$endgrent_r_proto" in
11663 ''|0) d_endgrent_r=undef
11665 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
11666 * ) case "$endgrent_r_proto" in
11667 REENTRANT_PROTO*) ;;
11668 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
11670 echo "Prototype: $try" ;;
11673 *) case "$usethreads" in
11674 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
11681 *) endgrent_r_proto=0
11685 : see if endhostent exists
11686 set endhostent d_endhent
11689 : see if this is a netdb.h system
11690 set netdb.h i_netdb
11693 : see if endhostent_r exists
11694 set endhostent_r d_endhostent_r
11696 case "$d_endhostent_r" in
11698 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11699 case "$d_endhostent_r_proto:$usethreads" in
11700 ":define") d_endhostent_r_proto=define
11701 set d_endhostent_r_proto endhostent_r $hdrs
11705 case "$d_endhostent_r_proto" in
11707 case "$endhostent_r_proto" in
11708 ''|0) try='int endhostent_r(struct hostent_data*);'
11709 ./protochk "extern $try" $hdrs && endhostent_r_proto=I_D ;;
11711 case "$endhostent_r_proto" in
11712 ''|0) try='void endhostent_r(struct hostent_data*);'
11713 ./protochk "extern $try" $hdrs && endhostent_r_proto=V_D ;;
11715 case "$endhostent_r_proto" in
11716 ''|0) d_endhostent_r=undef
11717 endhostent_r_proto=0
11718 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
11719 * ) case "$endhostent_r_proto" in
11720 REENTRANT_PROTO*) ;;
11721 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
11723 echo "Prototype: $try" ;;
11726 *) case "$usethreads" in
11727 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
11729 d_endhostent_r=undef
11730 endhostent_r_proto=0
11734 *) endhostent_r_proto=0
11738 : see if endnetent exists
11739 set endnetent d_endnent
11742 : see if endnetent_r exists
11743 set endnetent_r d_endnetent_r
11745 case "$d_endnetent_r" in
11747 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11748 case "$d_endnetent_r_proto:$usethreads" in
11749 ":define") d_endnetent_r_proto=define
11750 set d_endnetent_r_proto endnetent_r $hdrs
11754 case "$d_endnetent_r_proto" in
11756 case "$endnetent_r_proto" in
11757 ''|0) try='int endnetent_r(struct netent_data*);'
11758 ./protochk "extern $try" $hdrs && endnetent_r_proto=I_D ;;
11760 case "$endnetent_r_proto" in
11761 ''|0) try='void endnetent_r(struct netent_data*);'
11762 ./protochk "extern $try" $hdrs && endnetent_r_proto=V_D ;;
11764 case "$endnetent_r_proto" in
11765 ''|0) d_endnetent_r=undef
11766 endnetent_r_proto=0
11767 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
11768 * ) case "$endnetent_r_proto" in
11769 REENTRANT_PROTO*) ;;
11770 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
11772 echo "Prototype: $try" ;;
11775 *) case "$usethreads" in
11776 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
11778 d_endnetent_r=undef
11779 endnetent_r_proto=0
11783 *) endnetent_r_proto=0
11787 : see if endprotoent exists
11788 set endprotoent d_endpent
11791 : see if endprotoent_r exists
11792 set endprotoent_r d_endprotoent_r
11794 case "$d_endprotoent_r" in
11796 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11797 case "$d_endprotoent_r_proto:$usethreads" in
11798 ":define") d_endprotoent_r_proto=define
11799 set d_endprotoent_r_proto endprotoent_r $hdrs
11803 case "$d_endprotoent_r_proto" in
11805 case "$endprotoent_r_proto" in
11806 ''|0) try='int endprotoent_r(struct protoent_data*);'
11807 ./protochk "extern $try" $hdrs && endprotoent_r_proto=I_D ;;
11809 case "$endprotoent_r_proto" in
11810 ''|0) try='void endprotoent_r(struct protoent_data*);'
11811 ./protochk "extern $try" $hdrs && endprotoent_r_proto=V_D ;;
11813 case "$endprotoent_r_proto" in
11814 ''|0) d_endprotoent_r=undef
11815 endprotoent_r_proto=0
11816 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
11817 * ) case "$endprotoent_r_proto" in
11818 REENTRANT_PROTO*) ;;
11819 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
11821 echo "Prototype: $try" ;;
11824 *) case "$usethreads" in
11825 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
11827 d_endprotoent_r=undef
11828 endprotoent_r_proto=0
11832 *) endprotoent_r_proto=0
11836 : see if endpwent exists
11837 set endpwent d_endpwent
11840 : see if this is a pwd.h system
11846 xxx=`./findhdr pwd.h`
11847 $cppstdin $cppflags $cppminus < $xxx >$$.h
11849 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
11857 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
11865 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
11873 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
11881 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
11889 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
11897 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
11905 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
11917 set d_pwquota; eval $setvar
11918 set d_pwage; eval $setvar
11919 set d_pwchange; eval $setvar
11920 set d_pwclass; eval $setvar
11921 set d_pwexpire; eval $setvar
11922 set d_pwcomment; eval $setvar
11923 set d_pwgecos; eval $setvar
11924 set d_pwpasswd; eval $setvar
11928 : see if endpwent_r exists
11929 set endpwent_r d_endpwent_r
11931 case "$d_endpwent_r" in
11933 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
11934 case "$d_endpwent_r_proto:$usethreads" in
11935 ":define") d_endpwent_r_proto=define
11936 set d_endpwent_r_proto endpwent_r $hdrs
11940 case "$d_endpwent_r_proto" in
11942 case "$endpwent_r_proto" in
11943 ''|0) try='int endpwent_r(FILE**);'
11944 ./protochk "extern $try" $hdrs && endpwent_r_proto=I_H ;;
11946 case "$endpwent_r_proto" in
11947 ''|0) try='void endpwent_r(FILE**);'
11948 ./protochk "extern $try" $hdrs && endpwent_r_proto=V_H ;;
11950 case "$endpwent_r_proto" in
11951 ''|0) d_endpwent_r=undef
11953 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
11954 * ) case "$endpwent_r_proto" in
11955 REENTRANT_PROTO*) ;;
11956 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
11958 echo "Prototype: $try" ;;
11961 *) case "$usethreads" in
11962 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
11969 *) endpwent_r_proto=0
11973 : see if endservent exists
11974 set endservent d_endsent
11977 : see if endservent_r exists
11978 set endservent_r d_endservent_r
11980 case "$d_endservent_r" in
11982 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
11983 case "$d_endservent_r_proto:$usethreads" in
11984 ":define") d_endservent_r_proto=define
11985 set d_endservent_r_proto endservent_r $hdrs
11989 case "$d_endservent_r_proto" in
11991 case "$endservent_r_proto" in
11992 ''|0) try='int endservent_r(struct servent_data*);'
11993 ./protochk "extern $try" $hdrs && endservent_r_proto=I_D ;;
11995 case "$endservent_r_proto" in
11996 ''|0) try='void endservent_r(struct servent_data*);'
11997 ./protochk "extern $try" $hdrs && endservent_r_proto=V_D ;;
11999 case "$endservent_r_proto" in
12000 ''|0) d_endservent_r=undef
12001 endservent_r_proto=0
12002 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
12003 * ) case "$endservent_r_proto" in
12004 REENTRANT_PROTO*) ;;
12005 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
12007 echo "Prototype: $try" ;;
12010 *) case "$usethreads" in
12011 define) echo "endservent_r has no prototype, not using it." >&4 ;;
12013 d_endservent_r=undef
12014 endservent_r_proto=0
12018 *) endservent_r_proto=0
12022 : Locate the flags for 'open()'
12025 #include <sys/types.h>
12030 #include <sys/file.h>
12032 #$i_stdlib I_STDLIB
12034 #include <stdlib.h>
12045 : check sys/file.h first to get FREAD on Sun
12046 if $test `./findhdr sys/file.h` && \
12047 set try -DI_SYS_FILE && eval $compile; then
12049 echo "<sys/file.h> defines the O_* constants..." >&4
12050 if $run ./try; then
12051 echo "and you have the 3 argument form of open()." >&4
12054 echo "but not the 3 argument form of open(). Oh, well." >&4
12057 elif $test `./findhdr fcntl.h` && \
12058 set try -DI_FCNTL && eval $compile; then
12060 echo "<fcntl.h> defines the O_* constants..." >&4
12061 if $run ./try; then
12062 echo "and you have the 3 argument form of open()." >&4
12065 echo "but not the 3 argument form of open(). Oh, well." >&4
12070 echo "I can't find the O_* constant definitions! You got problems." >&4
12076 : see which of string.h or strings.h is needed
12078 strings=`./findhdr string.h`
12079 if $test "$strings" && $test -r "$strings"; then
12080 echo "Using <string.h> instead of <strings.h>." >&4
12084 strings=`./findhdr strings.h`
12085 if $test "$strings" && $test -r "$strings"; then
12086 echo "Using <strings.h> instead of <string.h>." >&4
12088 echo "No string header found -- You'll surely have problems." >&4
12093 case "$i_string" in
12094 "$undef") strings=`./findhdr strings.h`;;
12095 *) strings=`./findhdr string.h`;;
12098 : see if this is a sys/file.h system
12103 : do we need to include sys/file.h ?
12107 if $h_sysfile; then
12109 echo "We'll be including <sys/file.h>." >&4
12112 echo "We won't be including <sys/file.h>." >&4
12122 : see if fcntl.h is there
12127 : see if we can include fcntl.h
12133 echo "We'll be including <fcntl.h>." >&4
12136 if $h_sysfile; then
12137 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
12139 echo "We won't be including <fcntl.h>." >&4
12151 : check for non-blocking I/O stuff
12152 case "$h_sysfile" in
12153 true) echo "#include <sys/file.h>" > head.c;;
12156 true) echo "#include <fcntl.h>" > head.c;;
12157 *) echo "#include <sys/fcntl.h>" > head.c;;
12162 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
12163 case "$o_nonblock" in
12165 $cat head.c > try.c
12166 $cat >>try.c <<EOCP
12168 #$i_stdlib I_STDLIB
12170 #include <stdlib.h>
12178 printf("O_NONBLOCK\n");
12182 printf("O_NDELAY\n");
12186 printf("FNDELAY\n");
12193 if eval $compile_ok; then
12194 o_nonblock=`$run ./try`
12195 case "$o_nonblock" in
12196 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
12197 *) echo "Seems like we can use $o_nonblock.";;
12200 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
12203 *) echo "Using $hint value $o_nonblock.";;
12205 $rm -f try try.* .out core
12208 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
12211 $cat head.c > try.c
12212 $cat >>try.c <<EOCP
12214 #include <sys/types.h>
12215 #include <signal.h>
12217 #$i_stdlib I_STDLIB
12219 #include <stdlib.h>
12225 #define MY_O_NONBLOCK $o_nonblock
12226 #ifndef errno /* XXX need better Configure test */
12229 #$i_unistd I_UNISTD
12231 #include <unistd.h>
12233 #$i_string I_STRING
12235 #include <string.h>
12237 #include <strings.h>
12239 $signal_t blech(int x) { exit(3); }
12241 $cat >> try.c <<'EOCP'
12249 pipe(pd); /* Down: child -> parent */
12250 pipe(pu); /* Up: parent -> child */
12253 close(pd[1]); /* Parent reads from pd[0] */
12254 close(pu[0]); /* Parent writes (blocking) to pu[1] */
12256 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
12261 signal(SIGALRM, blech);
12263 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
12265 sprintf(string, "%d\n", ret);
12266 write(2, string, strlen(string));
12269 if (errno == EAGAIN) {
12270 printf("EAGAIN\n");
12275 if (errno == EWOULDBLOCK)
12276 printf("EWOULDBLOCK\n");
12279 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
12280 sleep(2); /* Give it time to close our pipe */
12282 ret = read(pd[0], buf, 1); /* Should read EOF */
12284 sprintf(string, "%d\n", ret);
12285 write(4, string, strlen(string));
12289 close(pd[0]); /* We write to pd[1] */
12290 close(pu[1]); /* We read from pu[0] */
12291 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
12292 close(pd[1]); /* Pipe pd is now fully closed! */
12293 exit(0); /* Bye bye, thank you for playing! */
12297 if eval $compile_ok; then
12298 echo "$startsh" >mtry
12299 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
12301 ./mtry >/dev/null 2>&1
12303 0) eagain=`$cat try.out`;;
12304 1) echo "Could not perform non-blocking setting!";;
12305 2) echo "I did a successful read() for something that was not there!";;
12306 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
12307 4) echo "Could not find F_SETFL!";;
12308 *) echo "Something terribly wrong happened during testing.";;
12310 rd_nodata=`$cat try.ret`
12311 echo "A read() system call with no data present returns $rd_nodata."
12312 case "$rd_nodata" in
12315 echo "(That's peculiar, fixing that to be -1.)"
12321 echo "Forcing errno EAGAIN on read() with no data available."
12325 echo "Your read() sets errno to $eagain when no data is available."
12328 status=`$cat try.err`
12330 0) echo "And it correctly returns 0 to signal EOF.";;
12331 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
12332 *) echo "However, your read() returns '$status' on EOF??";;
12335 if test "$status" = "$rd_nodata"; then
12336 echo "WARNING: you can't distinguish between EOF and no data!"
12340 echo "I can't compile the test program--assuming errno EAGAIN will do."
12347 echo "Using $hint value $eagain."
12348 echo "Your read() returns $rd_nodata when no data is present."
12349 case "$d_eofnblk" in
12350 "$define") echo "And you can see EOF because read() returns 0.";;
12351 "$undef") echo "But you can't see EOF status from read() returned value.";;
12353 echo "(Assuming you can't see EOF status from read anyway.)"
12359 $rm -f try try.* .out core head.c mtry
12361 : see if _ptr and _cnt from stdio act std
12364 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
12365 echo "(Looks like you have stdio.h from BSD.)"
12366 case "$stdio_ptr" in
12367 '') stdio_ptr='((fp)->_p)'
12370 *) ptr_lval=$d_stdio_ptr_lval;;
12372 case "$stdio_cnt" in
12373 '') stdio_cnt='((fp)->_r)'
12376 *) cnt_lval=$d_stdio_cnt_lval;;
12378 case "$stdio_base" in
12379 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
12381 case "$stdio_bufsiz" in
12382 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
12384 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
12385 echo "(Looks like you have stdio.h from Linux.)"
12386 case "$stdio_ptr" in
12387 '') stdio_ptr='((fp)->_IO_read_ptr)'
12390 *) ptr_lval=$d_stdio_ptr_lval;;
12392 case "$stdio_cnt" in
12393 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
12396 *) cnt_lval=$d_stdio_cnt_lval;;
12398 case "$stdio_base" in
12399 '') stdio_base='((fp)->_IO_read_base)';;
12401 case "$stdio_bufsiz" in
12402 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
12405 case "$stdio_ptr" in
12406 '') stdio_ptr='((fp)->_ptr)'
12409 *) ptr_lval=$d_stdio_ptr_lval;;
12411 case "$stdio_cnt" in
12412 '') stdio_cnt='((fp)->_cnt)'
12415 *) cnt_lval=$d_stdio_cnt_lval;;
12417 case "$stdio_base" in
12418 '') stdio_base='((fp)->_base)';;
12420 case "$stdio_bufsiz" in
12421 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
12425 : test whether _ptr and _cnt really work
12426 echo "Checking how std your stdio is..." >&4
12429 #$i_stdlib I_STDLIB
12431 #include <stdlib.h>
12433 #define FILE_ptr(fp) $stdio_ptr
12434 #define FILE_cnt(fp) $stdio_cnt
12436 FILE *fp = fopen("try.c", "r");
12439 18 <= FILE_cnt(fp) &&
12440 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
12448 if eval $compile && $to try.c; then
12449 if $run ./try; then
12450 echo "Your stdio acts pretty std."
12453 echo "Your stdio isn't very std."
12456 echo "Your stdio doesn't appear very std."
12460 # glibc 2.2.90 and above apparently change stdio streams so Perl's
12461 # direct buffer manipulation no longer works. The Configure tests
12462 # should be changed to correctly detect this, but until then,
12463 # the following check should at least let perl compile and run.
12464 # (This quick fix should be updated before 5.8.1.)
12465 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
12466 # A. Dougherty, June 3, 2002.
12467 case "$d_gnulibc" in
12469 case "$gnulibc_version" in
12473 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
12482 : Can _ptr be used as an lvalue?
12483 case "$d_stdstdio$ptr_lval" in
12484 $define$define) val=$define ;;
12487 set d_stdio_ptr_lval
12490 : Can _cnt be used as an lvalue?
12491 case "$d_stdstdio$cnt_lval" in
12492 $define$define) val=$define ;;
12495 set d_stdio_cnt_lval
12499 : test whether setting _ptr sets _cnt as a side effect
12500 d_stdio_ptr_lval_sets_cnt="$undef"
12501 d_stdio_ptr_lval_nochange_cnt="$undef"
12502 case "$d_stdio_ptr_lval$d_stdstdio" in
12504 echo "Checking to see what happens if we set the stdio ptr..." >&4
12507 /* Can we scream? */
12508 /* Eat dust sed :-) */
12509 /* In the buffer space, no one can hear you scream. */
12510 #$i_stdlib I_STDLIB
12512 #include <stdlib.h>
12514 #define FILE_ptr(fp) $stdio_ptr
12515 #define FILE_cnt(fp) $stdio_cnt
12516 #include <sys/types.h>
12518 FILE *fp = fopen("try.c", "r");
12523 puts("Fail even to read");
12526 c = getc(fp); /* Read away the first # */
12528 puts("Fail even to read");
12532 18 <= FILE_cnt(fp) &&
12533 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
12535 puts("Fail even to read");
12538 ptr = (char*) FILE_ptr(fp);
12539 cnt = (size_t)FILE_cnt(fp);
12541 FILE_ptr(fp) += 42;
12543 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
12544 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
12547 if (FILE_cnt(fp) <= 20) {
12548 printf ("Fail (<20 chars to test)");
12551 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
12552 puts("Fail compare");
12555 if (cnt == FILE_cnt(fp)) {
12556 puts("Pass_unchanged");
12559 if (FILE_cnt(fp) == (cnt - 42)) {
12560 puts("Pass_changed");
12563 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
12569 if eval $compile && $to try.c; then
12570 case `$run ./try` in
12572 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
12573 d_stdio_ptr_lval_sets_cnt="$define" ;;
12575 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
12576 d_stdio_ptr_lval_nochange_cnt="$define" ;;
12578 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
12580 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
12583 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
12589 : see if _base is also standard
12591 case "$d_stdstdio" in
12595 #$i_stdlib I_STDLIB
12597 #include <stdlib.h>
12599 #define FILE_base(fp) $stdio_base
12600 #define FILE_bufsiz(fp) $stdio_bufsiz
12602 FILE *fp = fopen("try.c", "r");
12605 19 <= FILE_bufsiz(fp) &&
12606 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
12613 if eval $compile && $to try.c; then
12614 if $run ./try; then
12615 echo "And its _base field acts std."
12618 echo "But its _base field isn't std."
12621 echo "However, it seems to be lacking the _base field."
12629 : see if fast_stdio exists
12631 case "$d_stdstdio:$d_stdio_ptr_lval" in
12633 case "$d_stdio_cnt_lval$d_stdio_ptr_lval_sets_cnt" in
12635 echo "You seem to have 'fast stdio' to directly manipulate the stdio buffers." >& 4
12646 : see if fchdir exists
12647 set fchdir d_fchdir
12650 : see if fchmod exists
12651 set fchmod d_fchmod
12654 : see if fchown exists
12655 set fchown d_fchown
12658 : see if this is an fcntl system
12663 : See if fcntl-based locking works.
12665 #$i_stdlib I_STDLIB
12667 #include <stdlib.h>
12669 #include <unistd.h>
12671 #include <signal.h>
12672 $signal_t blech(int x) { exit(3); }
12674 #if defined(F_SETLK) && defined(F_SETLKW)
12675 struct flock flock;
12677 fd = open("try.c", O_RDONLY);
12678 flock.l_type = F_RDLCK;
12679 flock.l_whence = SEEK_SET;
12680 flock.l_start = flock.l_len = 0;
12681 signal(SIGALRM, blech);
12683 retval = fcntl(fd, F_SETLK, &flock);
12685 (retval < 0 ? exit(2) : exit(0));
12691 echo "Checking if fcntl-based file locking works... "
12695 if eval $compile_ok; then
12696 if $run ./try; then
12697 echo "Yes, it seems to work."
12700 echo "Nope, it didn't work."
12705 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
12706 *** This is (almost) impossible.
12707 *** If your NFS lock daemons are not feeling well, something like
12708 *** this may happen, please investigate. Cannot continue, aborting.
12716 echo "I'm unable to compile the test program, so I'll assume not."
12721 echo "Nope, since you don't even have fcntl()."
12724 set d_fcntl_can_lock
12729 : check for fd_set items
12732 Checking to see how well your C compiler handles fd_set and friends ...
12735 #$i_stdlib I_STDLIB
12737 #include <stdlib.h>
12739 #$i_systime I_SYS_TIME
12740 #$i_sysselct I_SYS_SELECT
12741 #$d_socket HAS_SOCKET
12742 #include <sys/types.h>
12744 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
12747 #include <sys/time.h>
12749 #ifdef I_SYS_SELECT
12750 #include <sys/select.h>
12759 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
12767 if eval $compile; then
12768 d_fds_bits="$define"
12770 echo "Well, your system knows about the normal fd_set typedef..." >&4
12771 if $run ./try; then
12772 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
12773 d_fd_macros="$define"
12776 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
12778 d_fd_macros="$undef"
12782 Hmm, your compiler has some difficulty with fd_set. Checking further...
12785 if eval $compile; then
12786 d_fds_bits="$undef"
12788 echo "Well, your system has some sort of fd_set available..." >&4
12789 if $run ./try; then
12790 echo "and you have the normal fd_set macros." >&4
12791 d_fd_macros="$define"
12794 but not the normal fd_set macros! Gross! More work for me...
12796 d_fd_macros="$undef"
12799 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
12801 d_fds_bits="$undef"
12802 d_fd_macros="$undef"
12807 : see if fgetpos exists
12808 set fgetpos d_fgetpos
12811 : see if finite exists
12812 set finite d_finite
12815 : see if finitel exists
12816 set finitel d_finitel
12819 : see if flock exists
12823 : see if prototype for flock is available
12825 set d_flockproto flock $i_sysfile sys/file.h
12828 : see if fork exists
12832 : see if fp_class exists
12833 set fp_class d_fp_class
12836 : see if pathconf exists
12837 set pathconf d_pathconf
12840 : see if fpathconf exists
12841 set fpathconf d_fpathconf
12844 : see if fpclass exists
12845 set fpclass d_fpclass
12848 : see if fpclassify exists
12849 set fpclassify d_fpclassify
12852 : see if fpclassl exists
12853 set fpclassl d_fpclassl
12857 : check for fpos64_t
12859 echo "Checking to see if you have fpos64_t..." >&4
12862 int main() { fpos64_t x = 7; }
12865 if eval $compile; then
12867 echo "You have fpos64_t."
12870 echo "You do not have fpos64_t."
12871 case "$fpossize" in
12872 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
12879 : see if frexpl exists
12880 set frexpl d_frexpl
12883 : see if this is a sys/param system
12884 set sys/param.h i_sysparam
12887 : see if this is a sys/mount.h system
12888 set sys/mount.h i_sysmount
12893 echo "Checking to see if your system supports struct fs_data..." >&4
12894 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
12896 case "$d_fs_data_s" in
12897 "$define") echo "Yes, it does." ;;
12898 *) echo "No, it doesn't." ;;
12901 : see if fseeko exists
12902 set fseeko d_fseeko
12904 case "$longsize" in
12905 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
12908 : see if fsetpos exists
12909 set fsetpos d_fsetpos
12913 : see if fstatfs exists
12914 set fstatfs d_fstatfs
12918 : see if statvfs exists
12919 set statvfs d_statvfs
12922 : see if fstatvfs exists
12923 set fstatvfs d_fstatvfs
12927 : see if fsync exists
12931 : see if ftello exists
12932 set ftello d_ftello
12934 case "$longsize" in
12935 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
12939 : check for a working futimes
12941 echo "Checking for a working futimes()" >&4
12944 #include <sys/time.h>
12951 fd = open ("try.c", O_RDWR);
12952 if (-1 == fd) exit (1);
12953 rv = futimes (fd, NULL);
12954 exit (rv == -1 ? errno : 0);
12958 if eval $compile; then
12962 0) echo "Yes, it does" >&4
12963 d_futimes="$define"
12965 *) echo "No, it has futimes, but it isn't working ($rc) (probably harmless)\n" >&4
12969 echo "No, it does not (probably harmless)\n" >&4
12971 $rm -f try.* try core core.try.*
12973 : see if getcwd exists
12974 set getcwd d_getcwd
12977 : see if getespwnam exists
12978 set getespwnam d_getespwnam
12982 : see if getfsstat exists
12983 set getfsstat d_getfsstat
12986 : see if getgrent exists
12987 set getgrent d_getgrent
12990 : see if getgrent_r exists
12991 set getgrent_r d_getgrent_r
12993 case "$d_getgrent_r" in
12995 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
12996 case "$d_getgrent_r_proto:$usethreads" in
12997 ":define") d_getgrent_r_proto=define
12998 set d_getgrent_r_proto getgrent_r $hdrs
13002 case "$d_getgrent_r_proto" in
13004 case "$getgrent_r_proto" in
13005 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
13006 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBWR ;;
13008 case "$getgrent_r_proto" in
13009 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
13010 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIR ;;
13012 case "$getgrent_r_proto" in
13013 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
13014 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBW ;;
13016 case "$getgrent_r_proto" in
13017 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
13018 ./protochk "extern $try" $hdrs && getgrent_r_proto=S_SBI ;;
13020 case "$getgrent_r_proto" in
13021 ''|0) try='int getgrent_r(struct group*, char*, int);'
13022 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBI ;;
13024 case "$getgrent_r_proto" in
13025 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
13026 ./protochk "extern $try" $hdrs && getgrent_r_proto=I_SBIH ;;
13028 case "$getgrent_r_proto" in
13029 ''|0) d_getgrent_r=undef
13031 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
13032 * ) case "$getgrent_r_proto" in
13033 REENTRANT_PROTO*) ;;
13034 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
13036 echo "Prototype: $try" ;;
13039 *) case "$usethreads" in
13040 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
13047 *) getgrent_r_proto=0
13051 : see if getgrgid_r exists
13052 set getgrgid_r d_getgrgid_r
13054 case "$d_getgrgid_r" in
13056 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
13057 case "$d_getgrgid_r_proto:$usethreads" in
13058 ":define") d_getgrgid_r_proto=define
13059 set d_getgrgid_r_proto getgrgid_r $hdrs
13063 case "$d_getgrgid_r_proto" in
13065 case "$getgrgid_r_proto" in
13066 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
13067 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
13069 case "$getgrgid_r_proto" in
13070 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
13071 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
13073 case "$getgrgid_r_proto" in
13074 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
13075 ./protochk "extern $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
13077 case "$getgrgid_r_proto" in
13078 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
13079 ./protochk "extern $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
13081 case "$getgrgid_r_proto" in
13082 ''|0) d_getgrgid_r=undef
13084 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
13085 * ) case "$getgrgid_r_proto" in
13086 REENTRANT_PROTO*) ;;
13087 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
13089 echo "Prototype: $try" ;;
13092 *) case "$usethreads" in
13093 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
13100 *) getgrgid_r_proto=0
13104 : see if getgrnam_r exists
13105 set getgrnam_r d_getgrnam_r
13107 case "$d_getgrnam_r" in
13109 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
13110 case "$d_getgrnam_r_proto:$usethreads" in
13111 ":define") d_getgrnam_r_proto=define
13112 set d_getgrnam_r_proto getgrnam_r $hdrs
13116 case "$d_getgrnam_r_proto" in
13118 case "$getgrnam_r_proto" in
13119 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
13120 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
13122 case "$getgrnam_r_proto" in
13123 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
13124 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
13126 case "$getgrnam_r_proto" in
13127 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
13128 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CBI ;;
13130 case "$getgrnam_r_proto" in
13131 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
13132 ./protochk "extern $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
13134 case "$getgrnam_r_proto" in
13135 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
13136 ./protochk "extern $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
13138 case "$getgrnam_r_proto" in
13139 ''|0) d_getgrnam_r=undef
13141 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
13142 * ) case "$getgrnam_r_proto" in
13143 REENTRANT_PROTO*) ;;
13144 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
13146 echo "Prototype: $try" ;;
13149 *) case "$usethreads" in
13150 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
13157 *) getgrnam_r_proto=0
13161 : see if gethostbyaddr exists
13162 set gethostbyaddr d_gethbyaddr
13165 : see if gethostbyname exists
13166 set gethostbyname d_gethbyname
13169 : see if gethostent exists
13170 set gethostent d_gethent
13173 : see how we will look up host name
13176 if set gethostname val -f d_gethname; eval $csym; $val; then
13177 echo 'gethostname() found.' >&4
13178 d_gethname="$define"
13181 if set uname val -f d_uname; eval $csym; $val; then
13184 uname() was found, but you're running xenix, and older versions of xenix
13185 have a broken uname(). If you don't really know whether your xenix is old
13186 enough to have a broken system call, use the default answer.
13191 "$define") dflt=n;;
13193 rp='Is your uname() broken?'
13196 n*) d_uname="$define"; call=uname;;
13199 echo 'uname() found.' >&4
13206 case "$d_gethname" in
13207 '') d_gethname="$undef";;
13210 '') d_uname="$undef";;
13212 case "$d_uname$d_gethname" in
13217 Every now and then someone has a $call() that lies about the hostname
13218 but can't be fixed for political or economic reasons. If you wish, I can
13219 pretend $call() isn't there and maybe compute hostname at run-time
13220 thanks to the '$phostname' command.
13223 rp="Shall I ignore $call() from now on?"
13226 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
13229 case "$phostname" in
13230 '') aphostname='';;
13231 *) case "$aphostname" in
13233 *) set X $phostname
13237 file=`./loc $file $file $pth`
13238 aphostname=`echo $file $*`
13243 case "$d_uname$d_gethname" in
13246 case "$phostname" in
13248 echo "There will be no way for $package to get your hostname." >&4;;
13250 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
13254 case "$d_phostname" in
13255 '') d_phostname="$undef";;
13258 : see if gethostbyaddr_r exists
13259 set gethostbyaddr_r d_gethostbyaddr_r
13261 case "$d_gethostbyaddr_r" in
13263 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13264 case "$d_gethostbyaddr_r_proto:$usethreads" in
13265 ":define") d_gethostbyaddr_r_proto=define
13266 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
13270 case "$d_gethostbyaddr_r_proto" in
13272 case "$gethostbyaddr_r_proto" in
13273 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
13274 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
13276 case "$gethostbyaddr_r_proto" in
13277 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
13278 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
13280 case "$gethostbyaddr_r_proto" in
13281 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
13282 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
13284 case "$gethostbyaddr_r_proto" in
13285 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
13286 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
13288 case "$gethostbyaddr_r_proto" in
13289 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
13290 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
13292 case "$gethostbyaddr_r_proto" in
13293 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
13294 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
13296 case "$gethostbyaddr_r_proto" in
13297 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
13298 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
13300 case "$gethostbyaddr_r_proto" in
13301 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
13302 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
13304 case "$gethostbyaddr_r_proto" in
13305 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
13306 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
13308 case "$gethostbyaddr_r_proto" in
13309 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
13310 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
13312 case "$gethostbyaddr_r_proto" in
13313 ''|0) try='int gethostbyaddr_r(const void*, socklen_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
13314 ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_TsISBWRE ;;
13316 case "$gethostbyaddr_r_proto" in
13317 ''|0) d_gethostbyaddr_r=undef
13318 gethostbyaddr_r_proto=0
13319 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
13320 * ) case "$gethostbyaddr_r_proto" in
13321 REENTRANT_PROTO*) ;;
13322 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
13324 echo "Prototype: $try" ;;
13327 *) case "$usethreads" in
13328 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
13330 d_gethostbyaddr_r=undef
13331 gethostbyaddr_r_proto=0
13335 *) gethostbyaddr_r_proto=0
13339 : see if gethostbyname_r exists
13340 set gethostbyname_r d_gethostbyname_r
13342 case "$d_gethostbyname_r" in
13344 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13345 case "$d_gethostbyname_r_proto:$usethreads" in
13346 ":define") d_gethostbyname_r_proto=define
13347 set d_gethostbyname_r_proto gethostbyname_r $hdrs
13351 case "$d_gethostbyname_r_proto" in
13353 case "$gethostbyname_r_proto" in
13354 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
13355 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
13357 case "$gethostbyname_r_proto" in
13358 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
13359 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
13361 case "$gethostbyname_r_proto" in
13362 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
13363 ./protochk "extern $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
13365 case "$gethostbyname_r_proto" in
13366 ''|0) d_gethostbyname_r=undef
13367 gethostbyname_r_proto=0
13368 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
13369 * ) case "$gethostbyname_r_proto" in
13370 REENTRANT_PROTO*) ;;
13371 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
13373 echo "Prototype: $try" ;;
13376 *) case "$usethreads" in
13377 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
13379 d_gethostbyname_r=undef
13380 gethostbyname_r_proto=0
13384 *) gethostbyname_r_proto=0
13388 : see if gethostent_r exists
13389 set gethostent_r d_gethostent_r
13391 case "$d_gethostent_r" in
13393 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13394 case "$d_gethostent_r_proto:$usethreads" in
13395 ":define") d_gethostent_r_proto=define
13396 set d_gethostent_r_proto gethostent_r $hdrs
13400 case "$d_gethostent_r_proto" in
13402 case "$gethostent_r_proto" in
13403 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
13404 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
13406 case "$gethostent_r_proto" in
13407 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
13408 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBIE ;;
13410 case "$gethostent_r_proto" in
13411 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
13412 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBIE ;;
13414 case "$gethostent_r_proto" in
13415 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
13416 ./protochk "extern $try" $hdrs && gethostent_r_proto=S_SBI ;;
13418 case "$gethostent_r_proto" in
13419 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
13420 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SBI ;;
13422 case "$gethostent_r_proto" in
13423 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
13424 ./protochk "extern $try" $hdrs && gethostent_r_proto=I_SD ;;
13426 case "$gethostent_r_proto" in
13427 ''|0) d_gethostent_r=undef
13428 gethostent_r_proto=0
13429 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
13430 * ) case "$gethostent_r_proto" in
13431 REENTRANT_PROTO*) ;;
13432 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
13434 echo "Prototype: $try" ;;
13437 *) case "$usethreads" in
13438 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
13440 d_gethostent_r=undef
13441 gethostent_r_proto=0
13445 *) gethostent_r_proto=0
13449 : see if prototypes for various gethostxxx netdb.h functions are available
13451 set d_gethostprotos gethostent $i_netdb netdb.h
13454 : see if getitimer exists
13455 set getitimer d_getitimer
13458 : see if getlogin exists
13459 set getlogin d_getlogin
13462 : see if getlogin_r exists
13463 set getlogin_r d_getlogin_r
13465 case "$d_getlogin_r" in
13467 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
13468 case "$d_getlogin_r_proto:$usethreads" in
13469 ":define") d_getlogin_r_proto=define
13470 set d_getlogin_r_proto getlogin_r $hdrs
13474 case "$d_getlogin_r_proto" in
13476 case "$getlogin_r_proto" in
13477 ''|0) try='int getlogin_r(char*, size_t);'
13478 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BW ;;
13480 case "$getlogin_r_proto" in
13481 ''|0) try='int getlogin_r(char*, int);'
13482 ./protochk "extern $try" $hdrs && getlogin_r_proto=I_BI ;;
13484 case "$getlogin_r_proto" in
13485 ''|0) try='char* getlogin_r(char*, size_t);'
13486 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BW ;;
13488 case "$getlogin_r_proto" in
13489 ''|0) try='char* getlogin_r(char*, int);'
13490 ./protochk "extern $try" $hdrs && getlogin_r_proto=B_BI ;;
13492 case "$getlogin_r_proto" in
13493 ''|0) d_getlogin_r=undef
13495 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
13496 * ) case "$getlogin_r_proto" in
13497 REENTRANT_PROTO*) ;;
13498 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
13500 echo "Prototype: $try" ;;
13503 *) case "$usethreads" in
13504 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
13511 *) getlogin_r_proto=0
13515 : see if getmnt exists
13516 set getmnt d_getmnt
13519 : see if getmntent exists
13520 set getmntent d_getmntent
13523 : see if getnetbyaddr exists
13524 set getnetbyaddr d_getnbyaddr
13527 : see if getnetbyname exists
13528 set getnetbyname d_getnbyname
13531 : see if getnetent exists
13532 set getnetent d_getnent
13535 : see if getnetbyaddr_r exists
13536 set getnetbyaddr_r d_getnetbyaddr_r
13538 case "$d_getnetbyaddr_r" in
13540 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13541 case "$d_getnetbyaddr_r_proto:$usethreads" in
13542 ":define") d_getnetbyaddr_r_proto=define
13543 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
13547 case "$d_getnetbyaddr_r_proto" in
13549 case "$getnetbyaddr_r_proto" in
13550 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
13551 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
13553 case "$getnetbyaddr_r_proto" in
13554 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
13555 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
13557 case "$getnetbyaddr_r_proto" in
13558 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
13559 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
13561 case "$getnetbyaddr_r_proto" in
13562 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
13563 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
13565 case "$getnetbyaddr_r_proto" in
13566 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
13567 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
13569 case "$getnetbyaddr_r_proto" in
13570 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
13571 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
13573 case "$getnetbyaddr_r_proto" in
13574 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
13575 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
13577 case "$getnetbyaddr_r_proto" in
13578 ''|0) try='int getnetbyaddr_r(uint32_t, int, struct netent*, char*, size_t, struct netent**, int*);'
13579 ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_uISBWRE ;;
13581 case "$getnetbyaddr_r_proto" in
13582 ''|0) d_getnetbyaddr_r=undef
13583 getnetbyaddr_r_proto=0
13584 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
13585 * ) case "$getnetbyaddr_r_proto" in
13586 REENTRANT_PROTO*) ;;
13587 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
13589 echo "Prototype: $try" ;;
13592 *) case "$usethreads" in
13593 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
13595 d_getnetbyaddr_r=undef
13596 getnetbyaddr_r_proto=0
13600 *) getnetbyaddr_r_proto=0
13604 : see if getnetbyname_r exists
13605 set getnetbyname_r d_getnetbyname_r
13607 case "$d_getnetbyname_r" in
13609 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13610 case "$d_getnetbyname_r_proto:$usethreads" in
13611 ":define") d_getnetbyname_r_proto=define
13612 set d_getnetbyname_r_proto getnetbyname_r $hdrs
13616 case "$d_getnetbyname_r_proto" in
13618 case "$getnetbyname_r_proto" in
13619 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
13620 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
13622 case "$getnetbyname_r_proto" in
13623 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
13624 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
13626 case "$getnetbyname_r_proto" in
13627 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
13628 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
13630 case "$getnetbyname_r_proto" in
13631 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
13632 ./protochk "extern $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
13634 case "$getnetbyname_r_proto" in
13635 ''|0) d_getnetbyname_r=undef
13636 getnetbyname_r_proto=0
13637 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
13638 * ) case "$getnetbyname_r_proto" in
13639 REENTRANT_PROTO*) ;;
13640 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
13642 echo "Prototype: $try" ;;
13645 *) case "$usethreads" in
13646 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
13648 d_getnetbyname_r=undef
13649 getnetbyname_r_proto=0
13653 *) getnetbyname_r_proto=0
13657 : see if getnetent_r exists
13658 set getnetent_r d_getnetent_r
13660 case "$d_getnetent_r" in
13662 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13663 case "$d_getnetent_r_proto:$usethreads" in
13664 ":define") d_getnetent_r_proto=define
13665 set d_getnetent_r_proto getnetent_r $hdrs
13669 case "$d_getnetent_r_proto" in
13671 case "$getnetent_r_proto" in
13672 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
13673 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
13675 case "$getnetent_r_proto" in
13676 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
13677 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBIE ;;
13679 case "$getnetent_r_proto" in
13680 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
13681 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBIE ;;
13683 case "$getnetent_r_proto" in
13684 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
13685 ./protochk "extern $try" $hdrs && getnetent_r_proto=S_SBI ;;
13687 case "$getnetent_r_proto" in
13688 ''|0) try='int getnetent_r(struct netent*, char*, int);'
13689 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SBI ;;
13691 case "$getnetent_r_proto" in
13692 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
13693 ./protochk "extern $try" $hdrs && getnetent_r_proto=I_SD ;;
13695 case "$getnetent_r_proto" in
13696 ''|0) d_getnetent_r=undef
13697 getnetent_r_proto=0
13698 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
13699 * ) case "$getnetent_r_proto" in
13700 REENTRANT_PROTO*) ;;
13701 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
13703 echo "Prototype: $try" ;;
13706 *) case "$usethreads" in
13707 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
13709 d_getnetent_r=undef
13710 getnetent_r_proto=0
13714 *) getnetent_r_proto=0
13718 : see if prototypes for various getnetxxx netdb.h functions are available
13720 set d_getnetprotos getnetent $i_netdb netdb.h
13723 : see if getpagesize exists
13724 set getpagesize d_getpagsz
13728 : see if getprotobyname exists
13729 set getprotobyname d_getpbyname
13732 : see if getprotobynumber exists
13733 set getprotobynumber d_getpbynumber
13736 : see if getprotoent exists
13737 set getprotoent d_getpent
13740 : see if getpgid exists
13741 set getpgid d_getpgid
13744 : see if getpgrp2 exists
13745 set getpgrp2 d_getpgrp2
13748 : see if getppid exists
13749 set getppid d_getppid
13752 : see if getpriority exists
13753 set getpriority d_getprior
13756 : see if getprotobyname_r exists
13757 set getprotobyname_r d_getprotobyname_r
13759 case "$d_getprotobyname_r" in
13761 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13762 case "$d_getprotobyname_r_proto:$usethreads" in
13763 ":define") d_getprotobyname_r_proto=define
13764 set d_getprotobyname_r_proto getprotobyname_r $hdrs
13768 case "$d_getprotobyname_r_proto" in
13770 case "$getprotobyname_r_proto" in
13771 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
13772 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
13774 case "$getprotobyname_r_proto" in
13775 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
13776 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
13778 case "$getprotobyname_r_proto" in
13779 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
13780 ./protochk "extern $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
13782 case "$getprotobyname_r_proto" in
13783 ''|0) d_getprotobyname_r=undef
13784 getprotobyname_r_proto=0
13785 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
13786 * ) case "$getprotobyname_r_proto" in
13787 REENTRANT_PROTO*) ;;
13788 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
13790 echo "Prototype: $try" ;;
13793 *) case "$usethreads" in
13794 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
13796 d_getprotobyname_r=undef
13797 getprotobyname_r_proto=0
13801 *) getprotobyname_r_proto=0
13805 : see if getprotobynumber_r exists
13806 set getprotobynumber_r d_getprotobynumber_r
13808 case "$d_getprotobynumber_r" in
13810 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13811 case "$d_getprotobynumber_r_proto:$usethreads" in
13812 ":define") d_getprotobynumber_r_proto=define
13813 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
13817 case "$d_getprotobynumber_r_proto" in
13819 case "$getprotobynumber_r_proto" in
13820 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
13821 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
13823 case "$getprotobynumber_r_proto" in
13824 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
13825 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
13827 case "$getprotobynumber_r_proto" in
13828 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
13829 ./protochk "extern $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
13831 case "$getprotobynumber_r_proto" in
13832 ''|0) d_getprotobynumber_r=undef
13833 getprotobynumber_r_proto=0
13834 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
13835 * ) case "$getprotobynumber_r_proto" in
13836 REENTRANT_PROTO*) ;;
13837 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
13839 echo "Prototype: $try" ;;
13842 *) case "$usethreads" in
13843 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
13845 d_getprotobynumber_r=undef
13846 getprotobynumber_r_proto=0
13850 *) getprotobynumber_r_proto=0
13854 : see if getprotoent_r exists
13855 set getprotoent_r d_getprotoent_r
13857 case "$d_getprotoent_r" in
13859 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13860 case "$d_getprotoent_r_proto:$usethreads" in
13861 ":define") d_getprotoent_r_proto=define
13862 set d_getprotoent_r_proto getprotoent_r $hdrs
13866 case "$d_getprotoent_r_proto" in
13868 case "$getprotoent_r_proto" in
13869 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
13870 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
13872 case "$getprotoent_r_proto" in
13873 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
13874 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SBI ;;
13876 case "$getprotoent_r_proto" in
13877 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
13878 ./protochk "extern $try" $hdrs && getprotoent_r_proto=S_SBI ;;
13880 case "$getprotoent_r_proto" in
13881 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
13882 ./protochk "extern $try" $hdrs && getprotoent_r_proto=I_SD ;;
13884 case "$getprotoent_r_proto" in
13885 ''|0) d_getprotoent_r=undef
13886 getprotoent_r_proto=0
13887 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
13888 * ) case "$getprotoent_r_proto" in
13889 REENTRANT_PROTO*) ;;
13890 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
13892 echo "Prototype: $try" ;;
13895 *) case "$usethreads" in
13896 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
13898 d_getprotoent_r=undef
13899 getprotoent_r_proto=0
13903 *) getprotoent_r_proto=0
13907 : see if prototypes for various getprotoxxx netdb.h functions are available
13909 set d_getprotoprotos getprotoent $i_netdb netdb.h
13912 : see if getprpwnam exists
13913 set getprpwnam d_getprpwnam
13916 : see if getpwent exists
13917 set getpwent d_getpwent
13920 : see if getpwent_r exists
13921 set getpwent_r d_getpwent_r
13923 case "$d_getpwent_r" in
13925 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
13926 case "$d_getpwent_r_proto:$usethreads" in
13927 ":define") d_getpwent_r_proto=define
13928 set d_getpwent_r_proto getpwent_r $hdrs
13932 case "$d_getpwent_r_proto" in
13934 case "$getpwent_r_proto" in
13935 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
13936 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBWR ;;
13938 case "$getpwent_r_proto" in
13939 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
13940 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIR ;;
13942 case "$getpwent_r_proto" in
13943 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
13944 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBW ;;
13946 case "$getpwent_r_proto" in
13947 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
13948 ./protochk "extern $try" $hdrs && getpwent_r_proto=S_SBI ;;
13950 case "$getpwent_r_proto" in
13951 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
13952 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBI ;;
13954 case "$getpwent_r_proto" in
13955 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
13956 ./protochk "extern $try" $hdrs && getpwent_r_proto=I_SBIH ;;
13958 case "$getpwent_r_proto" in
13959 ''|0) d_getpwent_r=undef
13961 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
13962 * ) case "$getpwent_r_proto" in
13963 REENTRANT_PROTO*) ;;
13964 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
13966 echo "Prototype: $try" ;;
13969 *) case "$usethreads" in
13970 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
13977 *) getpwent_r_proto=0
13981 : see if getpwnam_r exists
13982 set getpwnam_r d_getpwnam_r
13984 case "$d_getpwnam_r" in
13986 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
13987 case "$d_getpwnam_r_proto:$usethreads" in
13988 ":define") d_getpwnam_r_proto=define
13989 set d_getpwnam_r_proto getpwnam_r $hdrs
13993 case "$d_getpwnam_r_proto" in
13995 case "$getpwnam_r_proto" in
13996 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
13997 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
13999 case "$getpwnam_r_proto" in
14000 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
14001 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
14003 case "$getpwnam_r_proto" in
14004 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
14005 ./protochk "extern $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
14007 case "$getpwnam_r_proto" in
14008 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
14009 ./protochk "extern $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
14011 case "$getpwnam_r_proto" in
14012 ''|0) d_getpwnam_r=undef
14014 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
14015 * ) case "$getpwnam_r_proto" in
14016 REENTRANT_PROTO*) ;;
14017 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
14019 echo "Prototype: $try" ;;
14022 *) case "$usethreads" in
14023 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
14030 *) getpwnam_r_proto=0
14034 : see if getpwuid_r exists
14035 set getpwuid_r d_getpwuid_r
14037 case "$d_getpwuid_r" in
14039 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14040 case "$d_getpwuid_r_proto:$usethreads" in
14041 ":define") d_getpwuid_r_proto=define
14042 set d_getpwuid_r_proto getpwuid_r $hdrs
14046 case "$d_getpwuid_r_proto" in
14048 case "$getpwuid_r_proto" in
14049 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
14050 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
14052 case "$getpwuid_r_proto" in
14053 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
14054 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
14056 case "$getpwuid_r_proto" in
14057 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
14058 ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
14060 case "$getpwuid_r_proto" in
14061 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
14062 ./protochk "extern $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
14064 case "$getpwuid_r_proto" in
14065 ''|0) d_getpwuid_r=undef
14067 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
14068 * ) case "$getpwuid_r_proto" in
14069 REENTRANT_PROTO*) ;;
14070 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
14072 echo "Prototype: $try" ;;
14075 *) case "$usethreads" in
14076 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
14083 *) getpwuid_r_proto=0
14088 : see if getservbyname exists
14089 set getservbyname d_getsbyname
14092 : see if getservbyport exists
14093 set getservbyport d_getsbyport
14096 : see if getservent exists
14097 set getservent d_getsent
14100 : see if getservbyname_r exists
14101 set getservbyname_r d_getservbyname_r
14103 case "$d_getservbyname_r" in
14105 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14106 case "$d_getservbyname_r_proto:$usethreads" in
14107 ":define") d_getservbyname_r_proto=define
14108 set d_getservbyname_r_proto getservbyname_r $hdrs
14112 case "$d_getservbyname_r_proto" in
14114 case "$getservbyname_r_proto" in
14115 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
14116 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
14118 case "$getservbyname_r_proto" in
14119 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
14120 ./protochk "extern $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
14122 case "$getservbyname_r_proto" in
14123 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
14124 ./protochk "extern $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
14126 case "$getservbyname_r_proto" in
14127 ''|0) d_getservbyname_r=undef
14128 getservbyname_r_proto=0
14129 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
14130 * ) case "$getservbyname_r_proto" in
14131 REENTRANT_PROTO*) ;;
14132 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
14134 echo "Prototype: $try" ;;
14137 *) case "$usethreads" in
14138 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
14140 d_getservbyname_r=undef
14141 getservbyname_r_proto=0
14145 *) getservbyname_r_proto=0
14149 : see if getservbyport_r exists
14150 set getservbyport_r d_getservbyport_r
14152 case "$d_getservbyport_r" in
14154 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14155 case "$d_getservbyport_r_proto:$usethreads" in
14156 ":define") d_getservbyport_r_proto=define
14157 set d_getservbyport_r_proto getservbyport_r $hdrs
14161 case "$d_getservbyport_r_proto" in
14163 case "$getservbyport_r_proto" in
14164 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
14165 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
14167 case "$getservbyport_r_proto" in
14168 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
14169 ./protochk "extern $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
14171 case "$getservbyport_r_proto" in
14172 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
14173 ./protochk "extern $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
14175 case "$getservbyport_r_proto" in
14176 ''|0) d_getservbyport_r=undef
14177 getservbyport_r_proto=0
14178 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
14179 * ) case "$getservbyport_r_proto" in
14180 REENTRANT_PROTO*) ;;
14181 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
14183 echo "Prototype: $try" ;;
14186 *) case "$usethreads" in
14187 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
14189 d_getservbyport_r=undef
14190 getservbyport_r_proto=0
14194 *) getservbyport_r_proto=0
14198 : see if getservent_r exists
14199 set getservent_r d_getservent_r
14201 case "$d_getservent_r" in
14203 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14204 case "$d_getservent_r_proto:$usethreads" in
14205 ":define") d_getservent_r_proto=define
14206 set d_getservent_r_proto getservent_r $hdrs
14210 case "$d_getservent_r_proto" in
14212 case "$getservent_r_proto" in
14213 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
14214 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBWR ;;
14216 case "$getservent_r_proto" in
14217 ''|0) try='int getservent_r(struct servent*, char*, int);'
14218 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SBI ;;
14220 case "$getservent_r_proto" in
14221 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
14222 ./protochk "extern $try" $hdrs && getservent_r_proto=S_SBI ;;
14224 case "$getservent_r_proto" in
14225 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
14226 ./protochk "extern $try" $hdrs && getservent_r_proto=I_SD ;;
14228 case "$getservent_r_proto" in
14229 ''|0) d_getservent_r=undef
14230 getservent_r_proto=0
14231 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
14232 * ) case "$getservent_r_proto" in
14233 REENTRANT_PROTO*) ;;
14234 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
14236 echo "Prototype: $try" ;;
14239 *) case "$usethreads" in
14240 define) echo "getservent_r has no prototype, not using it." >&4 ;;
14242 d_getservent_r=undef
14243 getservent_r_proto=0
14247 *) getservent_r_proto=0
14251 : see if prototypes for various getservxxx netdb.h functions are available
14253 set d_getservprotos getservent $i_netdb netdb.h
14256 : see if getspnam exists
14257 set getspnam d_getspnam
14260 : see if this is a shadow.h system
14261 set shadow.h i_shadow
14264 : see if getspnam_r exists
14265 set getspnam_r d_getspnam_r
14267 case "$d_getspnam_r" in
14269 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
14270 case "$d_getspnam_r_proto:$usethreads" in
14271 ":define") d_getspnam_r_proto=define
14272 set d_getspnam_r_proto getspnam_r $hdrs
14276 case "$d_getspnam_r_proto" in
14278 case "$getspnam_r_proto" in
14279 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
14280 ./protochk "extern $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
14282 case "$getspnam_r_proto" in
14283 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
14284 ./protochk "extern $try" $hdrs && getspnam_r_proto=S_CSBI ;;
14286 case "$getspnam_r_proto" in
14287 ''|0) d_getspnam_r=undef
14289 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
14290 * ) case "$getspnam_r_proto" in
14291 REENTRANT_PROTO*) ;;
14292 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
14294 echo "Prototype: $try" ;;
14297 *) case "$usethreads" in
14298 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
14305 *) getspnam_r_proto=0
14309 : see if gettimeofday or ftime exists
14310 set gettimeofday d_gettimeod
14312 case "$d_gettimeod" in
14318 val="$undef"; set d_ftime; eval $setvar
14321 case "$d_gettimeod$d_ftime" in
14324 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
14328 : see if gmtime_r exists
14329 set gmtime_r d_gmtime_r
14331 case "$d_gmtime_r" in
14333 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
14334 case "$d_gmtime_r_proto:$usethreads" in
14335 ":define") d_gmtime_r_proto=define
14336 set d_gmtime_r_proto gmtime_r $hdrs
14340 case "$d_gmtime_r_proto" in
14342 case "$gmtime_r_proto" in
14343 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
14344 ./protochk "extern $try" $hdrs && gmtime_r_proto=S_TS ;;
14346 case "$gmtime_r_proto" in
14347 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
14348 ./protochk "extern $try" $hdrs && gmtime_r_proto=I_TS ;;
14350 case "$gmtime_r_proto" in
14351 ''|0) d_gmtime_r=undef
14353 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
14354 * ) case "$gmtime_r_proto" in
14355 REENTRANT_PROTO*) ;;
14356 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
14358 echo "Prototype: $try" ;;
14361 *) case "$usethreads" in
14362 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
14369 *) gmtime_r_proto=0
14373 : see if hasmntopt exists
14374 set hasmntopt d_hasmntopt
14377 : see if this is a netinet/in.h or sys/in.h system
14378 set netinet/in.h i_niin sys/in.h i_sysin
14381 : see if arpa/inet.h has to be included
14382 set arpa/inet.h i_arpainet
14385 : see if htonl --and friends-- exists
14390 : Maybe they are macros.
14393 $cat >htonl.c <<EOM
14395 #include <sys/types.h>
14396 #$i_niin I_NETINET_IN
14398 #$i_arpainet I_ARPA_INET
14399 #ifdef I_NETINET_IN
14400 #include <netinet/in.h>
14403 #include <sys/in.h>
14406 #include <arpa/inet.h>
14409 printf("Defined as a macro.");
14412 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
14413 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
14415 echo "But it seems to be defined as a macro." >&4
14423 : see if ilogbl exists
14424 set ilogbl d_ilogbl
14429 if set index val -f; eval $csym; $val; then
14430 if set strchr val -f d_strchr; eval $csym; $val; then
14431 if $contains strchr "$strings" >/dev/null 2>&1 ; then
14434 echo "strchr() found." >&4
14438 echo "index() found." >&4
14443 echo "index() found." >&4
14446 if set strchr val -f d_strchr; eval $csym; $val; then
14449 echo "strchr() found." >&4
14451 echo "No index() or strchr() found!" >&4
14456 set d_strchr; eval $setvar
14458 set d_index; eval $setvar
14460 : check whether inet_aton exists
14461 set inet_aton d_inetaton
14466 $cat >isascii.c <<EOCP
14469 #$i_stdlib I_STDLIB
14471 #include <stdlib.h>
14482 if eval $compile; then
14483 echo "isascii() found." >&4
14486 echo "isascii() NOT found." >&4
14493 : see if isfinite exists
14494 set isfinite d_isfinite
14497 : see if isinf exists
14501 : see if isnan exists
14505 : see if isnanl exists
14506 set isnanl d_isnanl
14509 : see if killpg exists
14510 set killpg d_killpg
14513 : see if lchown exists
14515 $cat > try.c <<'EOCP'
14516 /* System header to define __stub macros and hopefully few prototypes,
14517 which can conflict with char lchown(); below. */
14518 #include <assert.h>
14519 /* Override any gcc2 internal prototype to avoid an error. */
14520 /* We use char because int might match the return type of a gcc2
14521 builtin and then its argument prototype would still apply. */
14524 /* The GNU C library defines this for functions which it implements
14525 to always fail with ENOSYS. Some functions are actually named
14526 something starting with __ and the normal name is an alias. */
14527 #if defined (__stub_lchown) || defined (__stub___lchown)
14535 if eval $compile; then
14536 $echo "lchown() found." >&4
14539 $echo "lchown() NOT found." >&4
14545 : See if number of significant digits in a double precision number is known
14547 $cat >ldbl_dig.c <<EOM
14548 #$i_limits I_LIMITS
14551 #include <limits.h>
14557 printf("Contains LDBL_DIG");
14560 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
14561 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
14562 echo "LDBL_DIG found." >&4
14565 echo "LDBL_DIG NOT found." >&4
14572 : see if this is a math.h system
14576 d_libm_lib_version="$undef"
14579 : check to see if math.h defines _LIB_VERSION
14581 echo "Checking to see if your libm supports _LIB_VERSION..." >&4
14583 #include <unistd.h>
14585 int main (int argc, char *argv[])
14587 printf ("%d\n", _LIB_VERSION);
14592 if eval $compile; then
14594 echo "Yes, it does ($foo)" >&4
14595 d_libm_lib_version="$define"
14597 echo "No, it does not (probably harmless)\n" >&4
14599 $rm -f try.* try core core.try.*
14604 : see if link exists
14608 : see if localtime_r exists
14609 set localtime_r d_localtime_r
14611 case "$d_localtime_r" in
14613 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
14614 case "$d_localtime_r_proto:$usethreads" in
14615 ":define") d_localtime_r_proto=define
14616 set d_localtime_r_proto localtime_r $hdrs
14620 case "$d_localtime_r_proto" in
14622 case "$localtime_r_proto" in
14623 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
14624 ./protochk "extern $try" $hdrs && localtime_r_proto=S_TS ;;
14626 case "$localtime_r_proto" in
14627 ''|0) try='int localtime_r(const time_t*, struct tm*);'
14628 ./protochk "extern $try" $hdrs && localtime_r_proto=I_TS ;;
14630 case "$localtime_r_proto" in
14631 ''|0) d_localtime_r=undef
14632 localtime_r_proto=0
14633 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
14634 * ) case "$localtime_r_proto" in
14635 REENTRANT_PROTO*) ;;
14636 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
14638 echo "Prototype: $try" ;;
14641 *) case "$usethreads" in
14642 define) echo "localtime_r has no prototype, not using it." >&4 ;;
14644 d_localtime_r=undef
14645 localtime_r_proto=0
14649 *) localtime_r_proto=0
14653 : see if localtime_r calls tzset
14654 case "$localtime_r_proto" in
14657 /* Does our libc's localtime_r call tzset ?
14658 * return 0 if so, 1 otherwise.
14660 #include <sys/types.h>
14661 #include <unistd.h>
14663 #include <string.h>
14664 #include <malloc.h>
14667 time_t t = time(0L);
14668 char w_tz[]="TZ" "=GMT+5",
14669 e_tz[]="TZ" "=GMT-5",
14670 *tz_e = (char*)malloc(16),
14671 *tz_w = (char*)malloc(16);
14672 struct tm tm_e, tm_w;
14673 memset(&tm_e,'\0',sizeof(struct tm));
14674 memset(&tm_w,'\0',sizeof(struct tm));
14679 localtime_r(&t, &tm_e);
14682 localtime_r(&t, &tm_w);
14684 if( memcmp(&tm_e, &tm_w, sizeof(struct tm)) == 0 )
14690 if eval $compile; then
14692 d_localtime_r_needs_tzset=undef;
14694 d_localtime_r_needs_tzset=define;
14697 d_localtime_r_needs_tzset=undef;
14701 d_localtime_r_needs_tzset=undef;
14704 $rm -f try try.* core
14706 : see if localeconv exists
14707 set localeconv d_locconv
14710 : see if lockf exists
14714 : see if prototype for lseek is available
14716 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
14719 : see if lstat exists
14723 : see if madvise exists
14724 set madvise d_madvise
14727 : see if malloc_size exists
14728 set malloc_size d_malloc_size
14731 : see if malloc_size_good exists
14732 set malloc_good_size d_malloc_good_size
14735 : see if mblen exists
14739 : see if mbstowcs exists
14740 set mbstowcs d_mbstowcs
14743 : see if mbtowc exists
14744 set mbtowc d_mbtowc
14747 : see if memchr exists
14748 set memchr d_memchr
14751 : see if memcmp exists
14752 set memcmp d_memcmp
14755 : see if memcpy exists
14756 set memcpy d_memcpy
14759 : see if memmove exists
14760 set memmove d_memmove
14763 : see if memset exists
14764 set memset d_memset
14767 : see if mkdir exists
14771 : see if mkdtemp exists
14772 set mkdtemp d_mkdtemp
14775 : see if mkfifo exists
14776 set mkfifo d_mkfifo
14779 : see if mkstemp exists
14780 set mkstemp d_mkstemp
14783 : see if mkstemps exists
14784 set mkstemps d_mkstemps
14787 : see if mktime exists
14788 set mktime d_mktime
14791 : see if this is a sys/mman.h system
14792 set sys/mman.h i_sysmman
14795 : see if mmap exists
14798 : see what shmat returns
14799 : default to something harmless
14801 case "$i_sysmman$d_mmap" in
14803 $cat >mmap.c <<'END'
14804 #include <sys/mman.h>
14807 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
14812 echo "and it returns ($mmaptype)." >&4
14818 : see if sqrtl exists
14822 : see if scalbnl exists
14823 set scalbnl d_scalbnl
14826 : see if modfl exists
14830 : see if prototype for modfl is available
14832 set d_modflproto modfl $i_math math.h
14835 d_modfl_pow32_bug="$undef"
14837 case "$d_longdbl$d_modfl" in
14840 Checking to see whether your modfl() is okay for large values...
14846 if $test "X$d_modflproto" != "X$define"; then
14847 $cat >>try.c <<EOCP
14848 /* Sigh. many current glibcs provide the function, but do not prototype it. */
14849 long double modfl (long double, long double *);
14852 $cat >>try.c <<EOCP
14854 long double nv = 4294967303.15;
14860 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
14864 case "$osname:$gccversion" in
14865 aix:) saveccflags="$ccflags"
14866 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
14869 if eval $compile; then
14872 *" 4294967303.150000 1.150000 4294967302.000000")
14873 echo >&4 "Your modfl() is broken for large values."
14874 d_modfl_pow32_bug="$define"
14876 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
14880 *" 4294967303.150000 0.150000 4294967303.000000")
14881 echo >&4 "Your modfl() seems okay for large values."
14883 *) echo >&4 "I don't understand your modfl() at all."
14887 $rm -f try.* try core core.try.*
14889 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
14892 case "$osname:$gccversion" in
14893 aix:) ccflags="$saveccflags" ;; # restore
14898 if $test "$uselongdouble" = "$define"; then
14900 if $test "$d_sqrtl" != "$define"; then
14901 message="$message sqrtl"
14903 if $test "$d_modfl" != "$define"; then
14904 if $test "$d_aintl:$d_copysignl" = "$define:$define"; then
14905 echo "You have both aintl and copysignl, so I can emulate modfl."
14907 message="$message modfl"
14910 if $test "$d_frexpl" != "$define"; then
14911 if $test "$d_ilogbl:$d_scalbnl" = "$define:$define"; then
14912 echo "You have both ilogbl and scalbnl, so I can emulate frexpl."
14914 message="$message frexpl"
14918 if $test "$message" != ""; then
14921 *** You requested the use of long doubles but you do not seem to have
14922 *** the following mathematical functions needed for long double support:
14924 *** Please rerun Configure without -Duselongdouble and/or -Dusemorebits.
14925 *** Cannot continue, aborting.
14933 : see if mprotect exists
14934 set mprotect d_mprotect
14937 : see if msgctl exists
14938 set msgctl d_msgctl
14941 : see if msgget exists
14942 set msgget d_msgget
14945 : see if msgsnd exists
14946 set msgsnd d_msgsnd
14949 : see if msgrcv exists
14950 set msgrcv d_msgrcv
14953 : see how much of the 'msg*(2)' library is present.
14956 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
14957 *"$undef"*) h_msg=false;;
14961 case "`ipcs 2>&1`" in
14962 "SVID messages"*"not configured"*)
14963 echo "Your $osname does not have the msg*(2) configured." >&4
14966 set msgctl d_msgctl
14968 set msgget d_msgget
14970 set msgsnd d_msgsnd
14972 set msgrcv d_msgrcv
14978 : we could also check for sys/ipc.h ...
14979 if $h_msg && $test `./findhdr sys/msg.h`; then
14980 echo "You have the full msg*(2) library." >&4
14983 echo "You don't have the full msg*(2) library." >&4
14991 echo "Checking to see if your system supports struct msghdr..." >&4
14992 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
14994 case "$d_msghdr_s" in
14995 "$define") echo "Yes, it does." ;;
14996 *) echo "No, it doesn't." ;;
15000 : see if msync exists
15004 : see if munmap exists
15005 set munmap d_munmap
15008 : see if nice exists
15012 : see if this is a langinfo.h system
15013 set langinfo.h i_langinfo
15016 : see if nl_langinfo exists
15017 set nl_langinfo d_nl_langinfo
15020 : check for length of character
15022 case "$charsize" in
15024 echo "Checking to see how big your characters are (hey, you never know)..." >&4
15027 #$i_stdlib I_STDLIB
15029 #include <stdlib.h>
15033 printf("%d\n", (int)sizeof(char));
15038 if eval $compile_ok; then
15042 echo "(I can't seem to compile the test program. Guessing...)"
15049 rp="What is the size of a character (in bytes)?"
15054 : check for volatile keyword
15056 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
15057 $cat >try.c <<'EOCP'
15060 typedef struct _goo_struct goo_struct;
15061 goo_struct * volatile goo = ((goo_struct *)0);
15062 struct _goo_struct {
15067 typedef unsigned short foo_t;
15068 char *volatile foo;
15070 volatile foo_t blech;
15074 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
15076 echo "Yup, it does."
15079 echo "Nope, it doesn't."
15087 $echo "Choosing the C types to be used for Perl's internal types..." >&4
15089 case "$use64bitint:$d_quad:$quadtype" in
15092 uvtype="$uquadtype"
15097 uvtype="unsigned long"
15103 case "$uselongdouble:$d_longdbl" in
15105 nvtype="long double"
15106 nvsize=$longdblsize
15113 $echo "(IV will be "$ivtype", $ivsize bytes)"
15114 $echo "(UV will be "$uvtype", $uvsize bytes)"
15115 $echo "(NV will be "$nvtype", $nvsize bytes)"
15118 #$i_inttypes I_INTTYPES
15120 #include <inttypes.h>
15125 int8_t i = INT8_MAX;
15126 uint8_t u = UINT8_MAX;
15127 printf("int8_t\n");
15130 int16_t i = INT16_MAX;
15131 uint16_t i = UINT16_MAX;
15132 printf("int16_t\n");
15135 int32_t i = INT32_MAX;
15136 uint32_t u = UINT32_MAX;
15137 printf("int32_t\n");
15143 '') case "$charsize" in
15145 u8type="unsigned char"
15154 if eval $compile; then
15155 case "`$run ./try`" in
15156 int8_t) i8type=int8_t
15166 '') if $test $charsize -ge 1; then
15168 u8type="unsigned char"
15176 '') case "$shortsize" in
15178 u16type="unsigned short"
15186 '') set try -DINT16
15187 if eval $compile; then
15188 case "`$run ./try`" in
15200 '') if $test $shortsize -ge 2; then
15202 u16type="unsigned short"
15210 '') case "$longsize" in
15212 u32type="unsigned long"
15216 *) case "$intsize" in
15218 u32type="unsigned int"
15228 '') set try -DINT32
15229 if eval $compile; then
15230 case "`$run ./try`" in
15242 '') if $test $intsize -ge 4; then
15244 u32type="unsigned int"
15252 '') case "$d_quad:$quadtype" in
15254 i64type="$quadtype"
15255 u64type="$uquadtype"
15263 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
15264 : volatile so that the compiler has to store it out to memory.
15265 if test X"$d_volatile" = X"$define"; then
15270 #$i_stdlib I_STDLIB
15272 #include <stdlib.h>
15274 #include <sys/types.h>
15275 #include <signal.h>
15277 $volatile int bletched = 0;
15278 $signal_t blech(int s) { bletched = 1; }
15283 int n = 8 * $uvsize;
15286 signal(SIGFPE, blech);
15289 for (i = 0; i < n; i++) {
15290 u = u << 1 | ($uvtype)1;
15292 if (($uvtype)d != u)
15296 d = ($nvtype)(u - 1);
15297 if (($uvtype)d != (u - 1))
15305 printf("%d\n", ((i == n) ? -n : i));
15311 d_nv_preserves_uv="$undef"
15312 if eval $compile; then
15313 nv_preserves_uv_bits="`$run ./try`"
15315 case "$nv_preserves_uv_bits" in
15317 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
15318 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
15319 d_nv_preserves_uv="$define"
15321 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
15322 d_nv_preserves_uv="$undef" ;;
15323 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
15324 nv_preserves_uv_bits="$undef" ;;
15329 $echo "Checking whether NV 0.0 is all bits zero in memory..." >&4
15330 : volatile so that the compiler has to store it out to memory.
15331 if test X"$d_volatile" = X"$define"; then
15336 #$i_stdlib I_STDLIB
15338 #include <stdlib.h>
15340 #$i_string I_STRING
15342 # include <string.h>
15344 # include <strings.h>
15346 #include <sys/types.h>
15347 #include <signal.h>
15349 $volatile int bletched = 0;
15350 $signal_t blech(int s) { bletched = 1; }
15353 int checkit($nvtype d, char *where) {
15354 unsigned char *p = (char *)&d;
15355 unsigned char *end = p + sizeof(d);
15365 printf("No - %s: 0x", where);
15367 printf ("%02X", *p++);
15372 int main(int argc, char **argv) {
15375 fail += checkit(d, "0.0");
15377 /* The compiler shouldn't be assuming that bletched is 0 */
15380 fail += checkit(d, "bleched");
15383 signal(SIGFPE, blech);
15386 /* Paranoia - the compiler should have no way of knowing that ANSI says
15387 that argv[argc] will always be NULL. Actually, if it did assume this it
15388 would be buggy, as this is C and main() can be called from elsewhere in
15390 d = argv[argc] ? 1 : 0;
15393 printf("Odd argv[argc]=%p, d=%g\n", argv[argc], d);
15396 fail += checkit(d, "ternary");
15398 memset(&d, sizeof(d), argv[argc] ? 1 : 0);
15401 printf("No - memset doesn't give 0.0\n");
15402 /* This might just blow up: */
15403 printf("(gives %g)\n", d);
15409 printf("No - something bleched\n");
15414 printf("No - %d fail(s)\n", fail);
15423 d_nv_zero_is_allbits_zero="$undef"
15424 if eval $compile; then
15430 0.0 is represented as all bits zero in memory
15432 d_nv_zero_is_allbits_zero="$define"
15435 0.0 is not represented as all bits zero in memory
15437 d_nv_zero_is_allbits_zero="$undef"
15442 0.0 is not represented as all bits zero in memory
15444 d_nv_zero_is_allbits_zero="$undef"
15452 : check for off64_t
15454 echo "Checking to see if you have off64_t..." >&4
15456 #include <sys/types.h>
15457 #include <unistd.h>
15458 int main() { off64_t x = 7; }
15461 if eval $compile; then
15463 echo "You have off64_t."
15466 echo "You do not have off64_t."
15467 case "$lseeksize" in
15468 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
15475 : how to create joinable pthreads
15476 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
15478 echo "Checking what constant to use for creating joinable pthreads..." >&4
15479 $cat >try.c <<'EOCP'
15480 #include <pthread.h>
15482 int detachstate = JOINABLE;
15485 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
15486 if eval $compile; then
15487 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
15488 val="$undef" # Yes, undef.
15489 set d_old_pthread_create_joinable
15492 set old_pthread_create_joinable
15495 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
15496 if eval $compile; then
15497 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
15499 set d_old_pthread_create_joinable
15501 val=PTHREAD_CREATE_UNDETACHED
15502 set old_pthread_create_joinable
15505 set try -DJOINABLE=__UNDETACHED
15506 if eval $compile; then
15507 echo "You seem to use __UNDETACHED." >&4
15509 set d_old_pthread_create_joinable
15512 set old_pthread_create_joinable
15515 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
15517 set d_old_pthread_create_joinable
15520 set old_pthread_create_joinable
15527 d_old_pthread_create_joinable="$undef"
15528 old_pthread_create_joinable=""
15531 : see if pause exists
15535 : see if pipe exists
15539 : see if poll exists
15543 : see if readlink exists
15544 set readlink d_readlink
15550 case "$d_readlink" in
15552 if $issymlink /proc/self/exe ; then
15553 $ls -l /proc/self/exe > reflect
15554 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
15555 echo "You have Linux-like /proc/self/exe."
15556 procselfexe='"/proc/self/exe"'
15560 if $issymlink /proc/curproc/file ; then
15561 $ls -l /proc/curproc/file > reflect
15562 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
15563 echo "You have BSD-like /proc/curproc/file."
15564 procselfexe='"/proc/curproc/file"'
15574 : see whether the pthread_atfork exists
15576 #include <pthread.h>
15579 #ifdef PTHREAD_ATFORK
15580 pthread_atfork(NULL,NULL,NULL);
15585 : see if pthread_atfork exists
15586 set try -DPTHREAD_ATFORK
15587 if eval $compile; then
15592 case "$usethreads" in
15595 $define) echo 'pthread_atfork found.' >&4 ;;
15596 *) echo 'pthread_atfork NOT found.' >&4 ;;
15599 set d_pthread_atfork
15602 : see if pthread_attr_setscope exists
15603 set pthread_attr_setscope d_pthread_attr_setscope
15607 : see whether the various POSIXish _yields exist
15609 #include <pthread.h>
15615 #ifdef PTHREAD_YIELD
15618 #ifdef PTHREAD_YIELD_NULL
15619 pthread_yield(NULL);
15625 : see if sched_yield exists
15626 set try -DSCHED_YIELD
15627 if eval $compile; then
15629 sched_yield='sched_yield()'
15633 case "$usethreads" in
15636 $define) echo 'sched_yield() found.' >&4 ;;
15637 *) echo 'sched_yield() NOT found.' >&4 ;;
15643 : see if pthread_yield exists
15644 set try -DPTHREAD_YIELD
15645 if eval $compile; then
15647 case "$sched_yield" in
15648 '') sched_yield='pthread_yield()' ;;
15651 set try -DPTHREAD_YIELD_NULL
15652 if eval $compile; then
15654 case "$sched_yield" in
15655 '') sched_yield='pthread_yield(NULL)' ;;
15661 case "$usethreads" in
15664 $define) echo 'pthread_yield() found.' >&4 ;;
15665 *) echo 'pthread_yield() NOT found.' >&4 ;;
15669 set d_pthread_yield
15672 case "$sched_yield" in
15673 '') sched_yield=undef ;;
15678 : see if random_r exists
15679 set random_r d_random_r
15681 case "$d_random_r" in
15683 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
15684 case "$d_random_r_proto:$usethreads" in
15685 ":define") d_random_r_proto=define
15686 set d_random_r_proto random_r $hdrs
15690 case "$d_random_r_proto" in
15692 case "$random_r_proto" in
15693 ''|0) try='int random_r(int*, struct random_data*);'
15694 ./protochk "extern $try" $hdrs && random_r_proto=I_iS ;;
15696 case "$random_r_proto" in
15697 ''|0) try='int random_r(long*, struct random_data*);'
15698 ./protochk "extern $try" $hdrs && random_r_proto=I_lS ;;
15700 case "$random_r_proto" in
15701 ''|0) try='int random_r(struct random_data*, int32_t*);'
15702 ./protochk "extern $try" $hdrs && random_r_proto=I_St ;;
15704 case "$random_r_proto" in
15705 ''|0) d_random_r=undef
15707 echo "Disabling random_r, cannot determine prototype." >&4 ;;
15708 * ) case "$random_r_proto" in
15709 REENTRANT_PROTO*) ;;
15710 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
15712 echo "Prototype: $try" ;;
15715 *) case "$usethreads" in
15716 define) echo "random_r has no prototype, not using it." >&4 ;;
15723 *) random_r_proto=0
15727 : see if readdir and friends exist
15728 set readdir d_readdir
15730 set seekdir d_seekdir
15732 set telldir d_telldir
15734 set rewinddir d_rewinddir
15737 : see if readdir64_r exists
15738 set readdir64_r d_readdir64_r
15740 case "$d_readdir64_r" in
15742 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
15743 case "$d_readdir64_r_proto:$usethreads" in
15744 ":define") d_readdir64_r_proto=define
15745 set d_readdir64_r_proto readdir64_r $hdrs
15749 case "$d_readdir64_r_proto" in
15751 case "$readdir64_r_proto" in
15752 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
15753 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TSR ;;
15755 case "$readdir64_r_proto" in
15756 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
15757 ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TS ;;
15759 case "$readdir64_r_proto" in
15760 ''|0) d_readdir64_r=undef
15761 readdir64_r_proto=0
15762 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
15763 * ) case "$readdir64_r_proto" in
15764 REENTRANT_PROTO*) ;;
15765 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
15767 echo "Prototype: $try" ;;
15770 *) case "$usethreads" in
15771 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
15773 d_readdir64_r=undef
15774 readdir64_r_proto=0
15778 *) readdir64_r_proto=0
15782 : see if readdir_r exists
15783 set readdir_r d_readdir_r
15785 case "$d_readdir_r" in
15787 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
15788 case "$d_readdir_r_proto:$usethreads" in
15789 ":define") d_readdir_r_proto=define
15790 set d_readdir_r_proto readdir_r $hdrs
15794 case "$d_readdir_r_proto" in
15796 case "$readdir_r_proto" in
15797 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
15798 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TSR ;;
15800 case "$readdir_r_proto" in
15801 ''|0) try='int readdir_r(DIR*, struct dirent*);'
15802 ./protochk "extern $try" $hdrs && readdir_r_proto=I_TS ;;
15804 case "$readdir_r_proto" in
15805 ''|0) d_readdir_r=undef
15807 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
15808 * ) case "$readdir_r_proto" in
15809 REENTRANT_PROTO*) ;;
15810 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
15812 echo "Prototype: $try" ;;
15815 *) case "$usethreads" in
15816 define) echo "readdir_r has no prototype, not using it." >&4 ;;
15823 *) readdir_r_proto=0
15827 : see if readv exists
15831 : see if recvmsg exists
15832 set recvmsg d_recvmsg
15835 : see if rename exists
15836 set rename d_rename
15839 : see if rmdir exists
15843 : see if memory.h is available.
15848 : See if it conflicts with string.h
15854 $cppstdin $cppflags $cppminus < $strings > mem.h
15855 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
15857 echo "We won't be including <memory.h>."
15867 : can bcopy handle overlapping blocks?
15870 case "$d_memmove" in
15871 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
15872 *) case "$d_bcopy" in
15874 echo "Checking to see if bcopy() can do overlapping copies..." >&4
15876 #$i_memory I_MEMORY
15877 #$i_stdlib I_STDLIB
15878 #$i_string I_STRING
15879 #$i_unistd I_UNISTD
15881 $cat >>try.c <<'EOCP'
15884 # include <memory.h>
15887 # include <stdlib.h>
15890 # include <string.h>
15892 # include <strings.h>
15895 # include <unistd.h> /* Needed for NetBSD */
15899 char buf[128], abc[128];
15905 /* Copy "abcde..." string to char abc[] so that gcc doesn't
15906 try to store the string in read-only memory. */
15907 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
15909 for (align = 7; align >= 0; align--) {
15910 for (len = 36; len; len--) {
15912 bcopy(abc, b, len);
15913 for (off = 1; off <= len; off++) {
15914 bcopy(b, b+off, len);
15915 bcopy(b+off, b, len);
15916 if (bcmp(b, abc, len))
15925 if eval $compile_ok; then
15926 if ./try 2>/dev/null; then
15927 echo "Yes, it can."
15930 echo "It can't, sorry."
15933 echo "(I can't compile the test program, so we'll assume not...)"
15937 $rm -f try.* try core
15943 : can memcpy handle overlapping blocks?
15946 case "$d_memmove" in
15947 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
15948 *) case "$d_memcpy" in
15950 echo "Checking to see if memcpy() can do overlapping copies..." >&4
15952 #$i_memory I_MEMORY
15953 #$i_stdlib I_STDLIB
15954 #$i_string I_STRING
15955 #$i_unistd I_UNISTD
15957 $cat >>try.c <<'EOCP'
15960 # include <memory.h>
15963 # include <stdlib.h>
15966 # include <string.h>
15968 # include <strings.h>
15971 # include <unistd.h> /* Needed for NetBSD */
15975 char buf[128], abc[128];
15981 /* Copy "abcde..." string to char abc[] so that gcc doesn't
15982 try to store the string in read-only memory. */
15983 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
15985 for (align = 7; align >= 0; align--) {
15986 for (len = 36; len; len--) {
15988 memcpy(b, abc, len);
15989 for (off = 1; off <= len; off++) {
15990 memcpy(b+off, b, len);
15991 memcpy(b, b+off, len);
15992 if (memcmp(b, abc, len))
16001 if eval $compile_ok; then
16002 if ./try 2>/dev/null; then
16003 echo "Yes, it can."
16006 echo "It can't, sorry."
16009 echo "(I can't compile the test program, so we'll assume not...)"
16013 $rm -f try.* try core
16019 : can memcmp be trusted to compare relative magnitude?
16021 case "$d_memcmp" in
16024 echo "Checking if your memcmp() can compare relative magnitude..." >&4
16026 #$i_memory I_MEMORY
16027 #$i_stdlib I_STDLIB
16028 #$i_string I_STRING
16029 #$i_unistd I_UNISTD
16031 $cat >>try.c <<'EOCP'
16034 # include <memory.h>
16037 # include <stdlib.h>
16040 # include <string.h>
16042 # include <strings.h>
16045 # include <unistd.h> /* Needed for NetBSD */
16051 if ((a < b) && memcmp(&a, &b, 1) < 0)
16057 if eval $compile_ok; then
16058 if $run ./try 2>/dev/null; then
16059 echo "Yes, it can."
16062 echo "No, it can't (it uses signed chars)."
16065 echo "(I can't compile the test program, so we'll assume not...)"
16069 $rm -f try.* try core
16073 : see if prototype for sbrk is available
16075 set d_sbrkproto sbrk $i_unistd unistd.h
16078 : see if select exists
16079 set select d_select
16082 : see if semctl exists
16083 set semctl d_semctl
16086 : see if semget exists
16087 set semget d_semget
16090 : see if semop exists
16094 : see how much of the 'sem*(2)' library is present.
16097 case "$d_semctl$d_semget$d_semop" in
16098 *"$undef"*) h_sem=false;;
16102 case "`ipcs 2>&1`" in
16103 "SVID messages"*"not configured"*)
16104 echo "Your $osname does not have the sem*(2) configured." >&4
16107 set semctl d_semctl
16109 set semget d_semget
16117 : we could also check for sys/ipc.h ...
16118 if $h_sem && $test `./findhdr sys/sem.h`; then
16119 echo "You have the full sem*(2) library." >&4
16122 echo "You don't have the full sem*(2) library." >&4
16128 : see whether sys/sem.h defines union semun
16130 $cat > try.c <<'END'
16131 #include <sys/types.h>
16132 #include <sys/ipc.h>
16133 #include <sys/sem.h>
16134 int main () { union semun semun; semun.buf = 0; }
16137 if eval $compile; then
16138 echo "You have union semun in <sys/sem.h>." >&4
16141 echo "You do not have union semun in <sys/sem.h>." >&4
16148 : see how to do semctl IPC_STAT
16155 # define S_IRUSR S_IREAD
16156 # define S_IWUSR S_IWRITE
16157 # define S_IXUSR S_IEXEC
16159 # define S_IRUSR 0400
16160 # define S_IWUSR 0200
16161 # define S_IXUSR 0100
16163 # define S_IRGRP (S_IRUSR>>3)
16164 # define S_IWGRP (S_IWUSR>>3)
16165 # define S_IXGRP (S_IXUSR>>3)
16166 # define S_IROTH (S_IRUSR>>6)
16167 # define S_IWOTH (S_IWUSR>>6)
16168 # define S_IXOTH (S_IXUSR>>6)
16171 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
16172 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
16173 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
16176 : see whether semctl IPC_STAT can use union semun
16177 case "$d_semctl_semun" in
16181 #include <sys/types.h>
16182 #include <sys/ipc.h>
16183 #include <sys/sem.h>
16184 #include <sys/stat.h>
16191 #$d_union_semun HAS_UNION_SEMUN
16194 #ifndef HAS_UNION_SEMUN
16197 struct semid_ds *buf;
16198 unsigned short *array;
16204 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
16205 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
16207 struct semid_ds argbuf;
16210 st = semctl(sem, 0, IPC_STAT, arg);
16214 # endif /* IPC_STAT */
16215 printf("semctl IPC_STAT failed: errno = %d\n", errno);
16217 if (semctl(sem, 0, IPC_RMID, arg) != 0)
16218 # endif /* IPC_RMID */
16219 printf("semctl IPC_RMID failed: errno = %d\n", errno);
16221 #endif /* IPC_PRIVATE && ... */
16222 printf("semget failed: errno = %d\n", errno);
16227 if eval $compile; then
16230 semun) val="$define" ;;
16238 case "$d_semctl_semun" in
16240 echo "You can use union semun for semctl IPC_STAT." >&4
16243 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
16248 : see whether semctl IPC_STAT can use struct semid_ds pointer
16249 case "$d_semctl_semid_ds" in
16252 $cat > try.c <<'END'
16253 #include <sys/types.h>
16254 #include <sys/ipc.h>
16255 #include <sys/sem.h>
16256 #include <sys/stat.h>
16264 struct semid_ds arg;
16267 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
16268 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
16271 st = semctl(sem, 0, IPC_STAT, &arg);
16273 printf("semid_ds\n");
16275 # endif /* IPC_STAT */
16276 printf("semctl IPC_STAT failed: errno = %d\n", errno);
16278 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
16279 # endif /* IPC_RMID */
16280 printf("semctl IPC_RMID failed: errno = %d\n", errno);
16282 #endif /* IPC_PRIVATE && ... */
16283 printf("semget failed: errno = %d\n", errno);
16289 if eval $compile; then
16292 semid_ds) val="$define" ;;
16296 set d_semctl_semid_ds
16300 case "$d_semctl_semid_ds" in
16302 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
16304 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
16311 # We do not have the full sem*(2) library, so assume we can not
16317 set d_semctl_semid_ds
16322 : see if sendmsg exists
16323 set sendmsg d_sendmsg
16326 : see if setegid exists
16327 set setegid d_setegid
16330 : see if seteuid exists
16331 set seteuid d_seteuid
16334 : see if setgrent exists
16335 set setgrent d_setgrent
16338 : see if setgrent_r exists
16339 set setgrent_r d_setgrent_r
16341 case "$d_setgrent_r" in
16343 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
16344 case "$d_setgrent_r_proto:$usethreads" in
16345 ":define") d_setgrent_r_proto=define
16346 set d_setgrent_r_proto setgrent_r $hdrs
16350 case "$d_setgrent_r_proto" in
16352 case "$setgrent_r_proto" in
16353 ''|0) try='int setgrent_r(FILE**);'
16354 ./protochk "extern $try" $hdrs && setgrent_r_proto=I_H ;;
16356 case "$setgrent_r_proto" in
16357 ''|0) try='void setgrent_r(FILE**);'
16358 ./protochk "extern $try" $hdrs && setgrent_r_proto=V_H ;;
16360 case "$setgrent_r_proto" in
16361 ''|0) d_setgrent_r=undef
16363 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
16364 * ) case "$setgrent_r_proto" in
16365 REENTRANT_PROTO*) ;;
16366 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
16368 echo "Prototype: $try" ;;
16371 *) case "$usethreads" in
16372 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
16379 *) setgrent_r_proto=0
16383 : see if sethostent exists
16384 set sethostent d_sethent
16387 : see if sethostent_r exists
16388 set sethostent_r d_sethostent_r
16390 case "$d_sethostent_r" in
16392 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16393 case "$d_sethostent_r_proto:$usethreads" in
16394 ":define") d_sethostent_r_proto=define
16395 set d_sethostent_r_proto sethostent_r $hdrs
16399 case "$d_sethostent_r_proto" in
16401 case "$sethostent_r_proto" in
16402 ''|0) try='int sethostent_r(int, struct hostent_data*);'
16403 ./protochk "extern $try" $hdrs && sethostent_r_proto=I_ID ;;
16405 case "$sethostent_r_proto" in
16406 ''|0) try='void sethostent_r(int, struct hostent_data*);'
16407 ./protochk "extern $try" $hdrs && sethostent_r_proto=V_ID ;;
16409 case "$sethostent_r_proto" in
16410 ''|0) d_sethostent_r=undef
16411 sethostent_r_proto=0
16412 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
16413 * ) case "$sethostent_r_proto" in
16414 REENTRANT_PROTO*) ;;
16415 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
16417 echo "Prototype: $try" ;;
16420 *) case "$usethreads" in
16421 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
16423 d_sethostent_r=undef
16424 sethostent_r_proto=0
16428 *) sethostent_r_proto=0
16432 : see if setitimer exists
16433 set setitimer d_setitimer
16436 : see if setlinebuf exists
16437 set setlinebuf d_setlinebuf
16440 : see if setlocale exists
16441 set setlocale d_setlocale
16444 : see if locale.h is available
16445 set locale.h i_locale
16448 : see if setlocale_r exists
16449 set setlocale_r d_setlocale_r
16451 case "$d_setlocale_r" in
16453 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
16454 case "$d_setlocale_r_proto:$usethreads" in
16455 ":define") d_setlocale_r_proto=define
16456 set d_setlocale_r_proto setlocale_r $hdrs
16460 case "$d_setlocale_r_proto" in
16462 case "$setlocale_r_proto" in
16463 ''|0) try='int setlocale_r(int, const char*, char*, int);'
16464 ./protochk "extern $try" $hdrs && setlocale_r_proto=I_ICBI ;;
16466 case "$setlocale_r_proto" in
16467 ''|0) d_setlocale_r=undef
16468 setlocale_r_proto=0
16469 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
16470 * ) case "$setlocale_r_proto" in
16471 REENTRANT_PROTO*) ;;
16472 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
16474 echo "Prototype: $try" ;;
16477 *) case "$usethreads" in
16478 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
16480 d_setlocale_r=undef
16481 setlocale_r_proto=0
16485 *) setlocale_r_proto=0
16489 : see if setnetent exists
16490 set setnetent d_setnent
16493 : see if setnetent_r exists
16494 set setnetent_r d_setnetent_r
16496 case "$d_setnetent_r" in
16498 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16499 case "$d_setnetent_r_proto:$usethreads" in
16500 ":define") d_setnetent_r_proto=define
16501 set d_setnetent_r_proto setnetent_r $hdrs
16505 case "$d_setnetent_r_proto" in
16507 case "$setnetent_r_proto" in
16508 ''|0) try='int setnetent_r(int, struct netent_data*);'
16509 ./protochk "extern $try" $hdrs && setnetent_r_proto=I_ID ;;
16511 case "$setnetent_r_proto" in
16512 ''|0) try='void setnetent_r(int, struct netent_data*);'
16513 ./protochk "extern $try" $hdrs && setnetent_r_proto=V_ID ;;
16515 case "$setnetent_r_proto" in
16516 ''|0) d_setnetent_r=undef
16517 setnetent_r_proto=0
16518 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
16519 * ) case "$setnetent_r_proto" in
16520 REENTRANT_PROTO*) ;;
16521 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
16523 echo "Prototype: $try" ;;
16526 *) case "$usethreads" in
16527 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
16529 d_setnetent_r=undef
16530 setnetent_r_proto=0
16534 *) setnetent_r_proto=0
16538 : see if setprotoent exists
16539 set setprotoent d_setpent
16542 : see if setpgid exists
16543 set setpgid d_setpgid
16546 : see if setpgrp2 exists
16547 set setpgrp2 d_setpgrp2
16550 : see if setpriority exists
16551 set setpriority d_setprior
16554 : see if setproctitle exists
16555 set setproctitle d_setproctitle
16558 : see if setprotoent_r exists
16559 set setprotoent_r d_setprotoent_r
16561 case "$d_setprotoent_r" in
16563 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16564 case "$d_setprotoent_r_proto:$usethreads" in
16565 ":define") d_setprotoent_r_proto=define
16566 set d_setprotoent_r_proto setprotoent_r $hdrs
16570 case "$d_setprotoent_r_proto" in
16572 case "$setprotoent_r_proto" in
16573 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
16574 ./protochk "extern $try" $hdrs && setprotoent_r_proto=I_ID ;;
16576 case "$setprotoent_r_proto" in
16577 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
16578 ./protochk "extern $try" $hdrs && setprotoent_r_proto=V_ID ;;
16580 case "$setprotoent_r_proto" in
16581 ''|0) d_setprotoent_r=undef
16582 setprotoent_r_proto=0
16583 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
16584 * ) case "$setprotoent_r_proto" in
16585 REENTRANT_PROTO*) ;;
16586 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
16588 echo "Prototype: $try" ;;
16591 *) case "$usethreads" in
16592 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
16594 d_setprotoent_r=undef
16595 setprotoent_r_proto=0
16599 *) setprotoent_r_proto=0
16603 : see if setpwent exists
16604 set setpwent d_setpwent
16607 : see if setpwent_r exists
16608 set setpwent_r d_setpwent_r
16610 case "$d_setpwent_r" in
16612 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
16613 case "$d_setpwent_r_proto:$usethreads" in
16614 ":define") d_setpwent_r_proto=define
16615 set d_setpwent_r_proto setpwent_r $hdrs
16619 case "$d_setpwent_r_proto" in
16621 case "$setpwent_r_proto" in
16622 ''|0) try='int setpwent_r(FILE**);'
16623 ./protochk "extern $try" $hdrs && setpwent_r_proto=I_H ;;
16625 case "$setpwent_r_proto" in
16626 ''|0) try='void setpwent_r(FILE**);'
16627 ./protochk "extern $try" $hdrs && setpwent_r_proto=V_H ;;
16629 case "$setpwent_r_proto" in
16630 ''|0) d_setpwent_r=undef
16632 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
16633 * ) case "$setpwent_r_proto" in
16634 REENTRANT_PROTO*) ;;
16635 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
16637 echo "Prototype: $try" ;;
16640 *) case "$usethreads" in
16641 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
16648 *) setpwent_r_proto=0
16652 : see if setregid exists
16653 set setregid d_setregid
16655 set setresgid d_setresgid
16658 : see if setreuid exists
16659 set setreuid d_setreuid
16661 set setresuid d_setresuid
16664 : see if setrgid exists
16665 set setrgid d_setrgid
16668 : see if setruid exists
16669 set setruid d_setruid
16672 : see if setservent exists
16673 set setservent d_setsent
16676 : see if setservent_r exists
16677 set setservent_r d_setservent_r
16679 case "$d_setservent_r" in
16681 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16682 case "$d_setservent_r_proto:$usethreads" in
16683 ":define") d_setservent_r_proto=define
16684 set d_setservent_r_proto setservent_r $hdrs
16688 case "$d_setservent_r_proto" in
16690 case "$setservent_r_proto" in
16691 ''|0) try='int setservent_r(int, struct servent_data*);'
16692 ./protochk "extern $try" $hdrs && setservent_r_proto=I_ID ;;
16694 case "$setservent_r_proto" in
16695 ''|0) try='void setservent_r(int, struct servent_data*);'
16696 ./protochk "extern $try" $hdrs && setservent_r_proto=V_ID ;;
16698 case "$setservent_r_proto" in
16699 ''|0) d_setservent_r=undef
16700 setservent_r_proto=0
16701 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
16702 * ) case "$setservent_r_proto" in
16703 REENTRANT_PROTO*) ;;
16704 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
16706 echo "Prototype: $try" ;;
16709 *) case "$usethreads" in
16710 define) echo "setservent_r has no prototype, not using it." >&4 ;;
16712 d_setservent_r=undef
16713 setservent_r_proto=0
16717 *) setservent_r_proto=0
16721 : see if setsid exists
16722 set setsid d_setsid
16725 : see if setvbuf exists
16726 set setvbuf d_setvbuf
16729 : see if sfio.h is available
16734 : see if sfio library is available
16745 : Ok, but do we want to use it.
16749 true|$define|[yY]*) dflt='y';;
16752 echo "$package can use the sfio library, but it is experimental."
16753 case "$useperlio" in
16755 echo "For sfio also the PerlIO abstraction layer is needed."
16756 echo "Earlier you said you wouldn't want that."
16759 rp="You seem to have sfio available, do you want to try using it?"
16762 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
16763 useperlio="$define"
16766 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
16771 *) case "$usesfio" in
16772 true|$define|[yY]*)
16773 echo "Sorry, cannot find sfio on this machine." >&4
16774 echo "Ignoring your setting of usesfio=$usesfio." >&4
16783 $define) usesfio='true';;
16784 *) usesfio='false';;
16788 *) : Remove sfio from list of libraries to use
16791 echo "Removing unneeded -lsfio from library list" >&4
16792 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
16795 echo "libs = $libs" >&4
16802 : see if shmctl exists
16803 set shmctl d_shmctl
16806 : see if shmget exists
16807 set shmget d_shmget
16810 : see if shmat exists
16813 : see what shmat returns
16816 $cat >shmat.c <<'END'
16817 #include <sys/shm.h>
16820 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
16825 echo "and it returns ($shmattype)." >&4
16826 : see if a prototype for shmat is available
16827 xxx=`./findhdr sys/shm.h`
16828 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
16829 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
16840 set d_shmatprototype
16843 : see if shmdt exists
16847 : see how much of the 'shm*(2)' library is present.
16850 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
16851 *"$undef"*) h_shm=false;;
16855 case "`ipcs 2>&1`" in
16856 "SVID shared memory"*"not configured"*)
16857 echo "Your $osname does not have the shm*(2) configured." >&4
16860 set shmctl d_shmctl
16862 set shmget d_shmget
16872 : we could also check for sys/ipc.h ...
16873 if $h_shm && $test `./findhdr sys/shm.h`; then
16874 echo "You have the full shm*(2) library." >&4
16877 echo "You don't have the full shm*(2) library." >&4
16884 : see if we have sigaction
16885 if set sigaction val -f d_sigaction; eval $csym; $val; then
16886 echo 'sigaction() found.' >&4
16889 #include <sys/types.h>
16890 #include <signal.h>
16891 #$i_stdlib I_STDLIB
16893 #include <stdlib.h>
16897 struct sigaction act, oact;
16899 oact.sa_handler = 0;
16900 /* so that act and oact are used */
16901 exit(act.sa_flags == 0 && oact.sa_handler == 0);
16905 if eval $compile_ok; then
16908 echo "But you don't seem to have a useable struct sigaction." >&4
16912 echo 'sigaction NOT found.' >&4
16915 set d_sigaction; eval $setvar
16916 $rm -f try try$_o try.c
16918 : see if sigprocmask exists
16919 set sigprocmask d_sigprocmask
16922 : see if sigsetjmp exists
16924 case "$d_sigsetjmp" in
16927 #include <setjmp.h>
16928 #$i_stdlib I_STDLIB
16930 #include <stdlib.h>
16936 if (sigsetjmp(env,1))
16939 siglongjmp(env, 1);
16944 if eval $compile; then
16945 if $run ./try >/dev/null 2>&1; then
16946 echo "POSIX sigsetjmp found." >&4
16950 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
16956 echo "sigsetjmp not found." >&4
16960 *) val="$d_sigsetjmp"
16961 case "$d_sigsetjmp" in
16962 $define) echo "POSIX sigsetjmp found." >&4;;
16963 $undef) echo "sigsetjmp not found." >&4;;
16971 : see if snprintf exists
16972 set snprintf d_snprintf
16975 : see if vsnprintf exists
16976 set vsnprintf d_vsnprintf
16979 case "$d_snprintf-$d_vsnprintf" in
16982 Checking whether your snprintf() and vsnprintf() work okay...
16984 $cat >try.c <<'EOCP'
16985 /* v?snprintf testing logic courtesy of Russ Allbery.
16986 * According to C99:
16987 * - if the buffer is too short it still must be \0-terminated
16988 * - if the buffer is too short the potentially required length
16989 * must be returned and not -1
16990 * - if the buffer is NULL the potentially required length
16991 * must be returned and not -1 or core dump
16994 #include <stdarg.h>
16998 int test (char *format, ...)
17003 va_start (args, format);
17004 count = vsnprintf (buf, sizeof buf, format, args);
17011 return ((test ("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0'
17012 && snprintf (NULL, 0, "%s", "abcd") == 4) ? 0 : 1);
17016 if eval $compile; then
17019 0) echo "Your snprintf() and vsnprintf() seem to be working okay." ;;
17021 Your snprintf() and snprintf() don't seem to be working okay.
17023 d_snprintf="$undef"
17024 d_vsnprintf="$undef"
17028 echo "(I can't seem to compile the test program--assuming they don't)"
17029 d_snprintf="$undef"
17030 d_vsnprintf="$undef"
17032 $rm -f try.* try core core.try.*
17036 : see if sockatmark exists
17037 set sockatmark d_sockatmark
17040 : see if prototype for sockatmark is available
17042 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
17045 : see if socks5_init exists
17046 set socks5_init d_socks5_init
17049 : see if sprintf returns the length of the string in the buffer as per ANSI
17050 $echo "Checking whether sprintf returns the length of the string..." >&4
17053 #$i_stdlib I_STDLIB
17055 #include <stdlib.h>
17057 #$i_string I_STRING
17059 # include <string.h>
17061 # include <strings.h>
17070 int check (size_t expect, int test) {
17071 size_t got = strlen(buffer);
17075 printf("expected %ld, got %ld in test %d '%s'\n", (long) expect, (long) got,
17080 int main(int argc, char **argv) {
17083 check(sprintf(buffer, ""), ++test);
17084 check(sprintf(buffer, "%s %s", "perl", "rules"), ++test);
17085 check(sprintf(buffer, "I like %g", atan2(0,-1)), ++test);
17092 d_sprintf_returns_strlen="$undef"
17093 if eval $compile; then
17097 sprintf returns the length of the string (as ANSI says it should)
17099 d_sprintf_returns_strlen="$define"
17102 sprintf does not return the length of the string (how old is this system?)
17104 d_sprintf_returns_strlen="$undef"
17111 : see if srand48_r exists
17112 set srand48_r d_srand48_r
17114 case "$d_srand48_r" in
17116 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
17117 case "$d_srand48_r_proto:$usethreads" in
17118 ":define") d_srand48_r_proto=define
17119 set d_srand48_r_proto srand48_r $hdrs
17123 case "$d_srand48_r_proto" in
17125 case "$srand48_r_proto" in
17126 ''|0) try='int srand48_r(long, struct drand48_data*);'
17127 ./protochk "extern $try" $hdrs && srand48_r_proto=I_LS ;;
17129 case "$srand48_r_proto" in
17130 ''|0) d_srand48_r=undef
17132 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
17133 * ) case "$srand48_r_proto" in
17134 REENTRANT_PROTO*) ;;
17135 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
17137 echo "Prototype: $try" ;;
17140 *) case "$usethreads" in
17141 define) echo "srand48_r has no prototype, not using it." >&4 ;;
17148 *) srand48_r_proto=0
17152 : see if srandom_r exists
17153 set srandom_r d_srandom_r
17155 case "$d_srandom_r" in
17157 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
17158 case "$d_srandom_r_proto:$usethreads" in
17159 ":define") d_srandom_r_proto=define
17160 set d_srandom_r_proto srandom_r $hdrs
17164 case "$d_srandom_r_proto" in
17166 case "$srandom_r_proto" in
17167 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
17168 ./protochk "extern $try" $hdrs && srandom_r_proto=I_TS ;;
17170 case "$srandom_r_proto" in
17171 ''|0) d_srandom_r=undef
17173 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
17174 * ) case "$srandom_r_proto" in
17175 REENTRANT_PROTO*) ;;
17176 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
17178 echo "Prototype: $try" ;;
17181 *) case "$usethreads" in
17182 define) echo "srandom_r has no prototype, not using it." >&4 ;;
17189 *) srandom_r_proto=0
17193 : see if prototype for setresgid is available
17195 set d_sresgproto setresgid $i_unistd unistd.h
17198 : see if prototype for setresuid is available
17200 set d_sresuproto setresuid $i_unistd unistd.h
17203 : see if sys/stat.h is available
17204 set sys/stat.h i_sysstat
17208 : see if stat knows about block sizes
17210 echo "Checking to see if your struct stat has st_blocks field..." >&4
17211 set d_statblks stat st_blocks $i_sysstat sys/stat.h
17215 : see if this is a sys/vfs.h system
17216 set sys/vfs.h i_sysvfs
17220 : see if this is a sys/statfs.h system
17221 set sys/statfs.h i_sysstatfs
17226 echo "Checking to see if your system supports struct statfs..." >&4
17227 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
17229 case "$d_statfs_s" in
17230 "$define") echo "Yes, it does." ;;
17231 *) echo "No, it doesn't." ;;
17236 : see if struct statfs knows about f_flags
17237 case "$d_statfs_s" in
17240 echo "Checking to see if your struct statfs has f_flags field..." >&4
17241 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
17245 set d_statfs_f_flags
17249 case "$d_statfs_f_flags" in
17250 "$define") echo "Yes, it does." ;;
17251 *) echo "No, it doesn't." ;;
17255 Checking how to access stdio streams by file descriptor number...
17257 case "$stdio_stream_array" in
17258 '') $cat >try.c <<EOCP
17261 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
17265 for s in _iob __iob __sF
17267 set try -DSTDIO_STREAM_ARRAY=$s
17268 if eval $compile; then
17269 case "`$run ./try`" in
17270 yes) stdio_stream_array=$s; break ;;
17274 $rm -f try.* try$exe_ext
17276 case "$stdio_stream_array" in
17278 I can't figure out how to access stdio streams by file descriptor number.
17280 d_stdio_stream_array="$undef"
17283 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
17285 d_stdio_stream_array="$define"
17289 : see if strcoll exists
17290 set strcoll d_strcoll
17293 : check for structure copying
17295 echo "Checking to see if your C compiler can copy structs..." >&4
17296 $cat >try.c <<'EOCP'
17306 if $cc -c try.c >/dev/null 2>&1 ; then
17308 echo "Yup, it can."
17311 echo "Nope, it can't."
17317 : see if strerror and/or sys_errlist[] exist
17319 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
17320 if set strerror val -f d_strerror; eval $csym; $val; then
17321 echo 'strerror() found.' >&4
17322 d_strerror="$define"
17323 d_strerrm='strerror(e)'
17324 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
17325 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
17326 d_syserrlst="$define"
17328 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
17329 d_syserrlst="$undef"
17331 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
17332 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
17333 echo 'strerror() found in string header.' >&4
17334 d_strerror="$define"
17335 d_strerrm='strerror(e)'
17336 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
17337 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
17338 d_syserrlst="$define"
17340 echo "(You don't appear to have any sys_errlist[], how can this be?)"
17341 d_syserrlst="$undef"
17343 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
17344 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
17345 d_strerror="$undef"
17346 d_syserrlst="$define"
17347 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
17349 echo 'strerror() and sys_errlist[] NOT found.' >&4
17350 d_strerror="$undef"
17351 d_syserrlst="$undef"
17352 d_strerrm='"unknown"'
17356 : see if strerror_r exists
17357 set strerror_r d_strerror_r
17359 case "$d_strerror_r" in
17361 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
17362 case "$d_strerror_r_proto:$usethreads" in
17363 ":define") d_strerror_r_proto=define
17364 set d_strerror_r_proto strerror_r $hdrs
17368 case "$d_strerror_r_proto" in
17370 case "$strerror_r_proto" in
17371 ''|0) try='int strerror_r(int, char*, size_t);'
17372 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;;
17374 case "$strerror_r_proto" in
17375 ''|0) try='int strerror_r(int, char*, int);'
17376 ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;;
17378 case "$strerror_r_proto" in
17379 ''|0) try='char* strerror_r(int, char*, size_t);'
17380 ./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;;
17382 case "$strerror_r_proto" in
17383 ''|0) d_strerror_r=undef
17385 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
17386 * ) case "$strerror_r_proto" in
17387 REENTRANT_PROTO*) ;;
17388 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
17390 echo "Prototype: $try" ;;
17393 *) case "$usethreads" in
17394 define) echo "strerror_r has no prototype, not using it." >&4 ;;
17401 *) strerror_r_proto=0
17405 : see if strftime exists
17406 set strftime d_strftime
17409 : see if strlcat exists
17410 set strlcat d_strlcat
17413 : see if strlcpy exists
17414 set strlcpy d_strlcpy
17417 : see if strtod exists
17418 set strtod d_strtod
17421 : see if strtol exists
17422 set strtol d_strtol
17425 : see if strtold exists
17426 set strtold d_strtold
17429 : see if strtoll exists
17430 set strtoll d_strtoll
17433 case "$d_longlong-$d_strtoll" in
17436 Checking whether your strtoll() works okay...
17438 $cat >try.c <<'EOCP'
17441 #define strtoll __strtoll
17444 #define strtoll _strtoll
17447 extern long long int strtoll(char *s, char **, int);
17448 static int bad = 0;
17449 int check(char *s, long long ell, int een) {
17452 gll = strtoll(s, 0, 10);
17453 if (!((gll == ell) && (errno == een)))
17457 check(" 1", 1LL, 0);
17458 check(" 0", 0LL, 0);
17459 check("-1", -1LL, 0);
17460 check("-9223372036854775808", -9223372036854775808LL, 0);
17461 check("-9223372036854775808", -9223372036854775808LL, 0);
17462 check(" 9223372036854775807", 9223372036854775807LL, 0);
17463 check("-9223372036854775808", -9223372036854775808LL, 0);
17464 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
17465 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
17471 if eval $compile; then
17474 ok) echo "Your strtoll() seems to be working okay." ;;
17476 Your strtoll() doesn't seem to be working okay.
17482 echo "(I can't seem to compile the test program--assuming it doesn't)"
17488 : see if strtoq exists
17489 set strtoq d_strtoq
17492 : see if strtoul exists
17493 set strtoul d_strtoul
17496 case "$d_strtoul" in
17499 Checking whether your strtoul() works okay...
17501 $cat >try.c <<'EOCP'
17504 extern unsigned long int strtoul(char *s, char **, int);
17505 static int bad = 0;
17506 void check(char *s, unsigned long eul, int een) {
17509 gul = strtoul(s, 0, 10);
17510 if (!((gul == eul) && (errno == een)))
17514 check(" 1", 1L, 0);
17515 check(" 0", 0L, 0);
17517 case "$longsize" in
17519 $cat >>try.c <<'EOCP'
17520 check("18446744073709551615", 18446744073709551615UL, 0);
17521 check("18446744073709551616", 18446744073709551615UL, ERANGE);
17522 #if 0 /* strtoul() for /^-/ strings is undefined. */
17523 check("-1", 18446744073709551615UL, 0);
17524 check("-18446744073709551614", 2, 0);
17525 check("-18446744073709551615", 1, 0);
17526 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
17527 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
17532 $cat >>try.c <<'EOCP'
17533 check("4294967295", 4294967295UL, 0);
17534 check("4294967296", 4294967295UL, ERANGE);
17535 #if 0 /* strtoul() for /^-/ strings is undefined. */
17536 check("-1", 4294967295UL, 0);
17537 check("-4294967294", 2, 0);
17538 check("-4294967295", 1, 0);
17539 check("-4294967296", 4294967295UL, ERANGE);
17540 check("-4294967297", 4294967295UL, ERANGE);
17545 : Should we write these tests to be more portable by sprintf-ing
17546 : ~0 and then manipulating that char string as input for strtol?
17549 $cat >>try.c <<'EOCP'
17556 if eval $compile; then
17557 case "`$run ./try`" in
17558 ok) echo "Your strtoul() seems to be working okay." ;;
17560 Your strtoul() doesn't seem to be working okay.
17569 : see if strtoull exists
17570 set strtoull d_strtoull
17573 case "$d_longlong-$d_strtoull" in
17576 Checking whether your strtoull() works okay...
17578 $cat >try.c <<'EOCP'
17581 #define strtoull __strtoull
17584 extern unsigned long long int strtoull(char *s, char **, int);
17585 static int bad = 0;
17586 int check(char *s, long long eull, int een) {
17589 gull = strtoull(s, 0, 10);
17590 if (!((gull == eull) && (errno == een)))
17594 check(" 1", 1LL, 0);
17595 check(" 0", 0LL, 0);
17596 check("18446744073709551615", 18446744073709551615ULL, 0);
17597 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
17598 #if 0 /* strtoull() for /^-/ strings is undefined. */
17599 check("-1", 18446744073709551615ULL, 0);
17600 check("-18446744073709551614", 2LL, 0);
17601 check("-18446744073709551615", 1LL, 0);
17602 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
17603 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
17610 if eval $compile; then
17611 case "`$run ./try`" in
17612 ok) echo "Your strtoull() seems to be working okay." ;;
17614 Your strtoull() doesn't seem to be working okay.
17616 d_strtoull="$undef"
17623 : see if strtouq exists
17624 set strtouq d_strtouq
17627 case "$d_strtouq" in
17630 Checking whether your strtouq() works okay...
17632 $cat >try.c <<'EOCP'
17635 extern unsigned long long int strtouq(char *s, char **, int);
17636 static int bad = 0;
17637 void check(char *s, unsigned long long eull, int een) {
17638 unsigned long long gull;
17640 gull = strtouq(s, 0, 10);
17641 if (!((gull == eull) && (errno == een)))
17645 check(" 1", 1LL, 0);
17646 check(" 0", 0LL, 0);
17647 check("18446744073709551615", 18446744073709551615ULL, 0);
17648 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
17649 #if 0 /* strtouq() for /^-/ strings is undefined. */
17650 check("-1", 18446744073709551615ULL, 0);
17651 check("-18446744073709551614", 2LL, 0);
17652 check("-18446744073709551615", 1LL, 0);
17653 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
17654 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
17662 if eval $compile; then
17663 case "`$run ./try`" in
17664 ok) echo "Your strtouq() seems to be working okay." ;;
17666 Your strtouq() doesn't seem to be working okay.
17675 : see if strxfrm exists
17676 set strxfrm d_strxfrm
17679 : see if symlink exists
17680 set symlink d_symlink
17683 : see if syscall exists
17684 set syscall d_syscall
17687 : see if prototype for syscall is available
17689 set d_syscallproto syscall $i_unistd unistd.h
17692 : see if sysconf exists
17693 set sysconf d_sysconf
17696 : see if system exists
17697 set system d_system
17700 : see if tcgetpgrp exists
17701 set tcgetpgrp d_tcgetpgrp
17704 : see if tcsetpgrp exists
17705 set tcsetpgrp d_tcsetpgrp
17708 : see if prototype for telldir is available
17710 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
17713 : see if time exists
17715 if test "X$d_time" = X -o X"$timetype" = X; then
17716 if set time val -f d_time; eval $csym; $val; then
17717 echo 'time() found.' >&4
17719 rp="What is the type returned by time() on this system?"
17720 set time_t timetype long stdio.h sys/types.h
17723 echo 'time() not found, hope that will do.' >&4
17731 : see if this is a sys/times.h system
17732 set sys/times.h i_systimes
17735 : see if times exists
17737 if set times val -f d_times; eval $csym; $val; then
17738 echo 'times() found.' >&4
17741 case "$i_systimes" in
17742 "$define") inc='sys/times.h';;
17744 rp="What is the type returned by times() on this system?"
17745 set clock_t clocktype long stdio.h sys/types.h $inc
17748 echo 'times() NOT found, hope that will do.' >&4
17753 : see if tmpnam_r exists
17754 set tmpnam_r d_tmpnam_r
17756 case "$d_tmpnam_r" in
17758 hdrs="$i_systypes sys/types.h define stdio.h "
17759 case "$d_tmpnam_r_proto:$usethreads" in
17760 ":define") d_tmpnam_r_proto=define
17761 set d_tmpnam_r_proto tmpnam_r $hdrs
17765 case "$d_tmpnam_r_proto" in
17767 case "$tmpnam_r_proto" in
17768 ''|0) try='char* tmpnam_r(char*);'
17769 ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;;
17771 case "$tmpnam_r_proto" in
17772 ''|0) d_tmpnam_r=undef
17774 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
17775 * ) case "$tmpnam_r_proto" in
17776 REENTRANT_PROTO*) ;;
17777 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
17779 echo "Prototype: $try" ;;
17782 *) case "$usethreads" in
17783 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
17790 *) tmpnam_r_proto=0
17794 : see if truncate exists
17795 set truncate d_truncate
17798 : see if ttyname_r exists
17799 set ttyname_r d_ttyname_r
17801 case "$d_ttyname_r" in
17803 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
17804 case "$d_ttyname_r_proto:$usethreads" in
17805 ":define") d_ttyname_r_proto=define
17806 set d_ttyname_r_proto ttyname_r $hdrs
17810 case "$d_ttyname_r_proto" in
17812 case "$ttyname_r_proto" in
17813 ''|0) try='int ttyname_r(int, char*, size_t);'
17814 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;;
17816 case "$ttyname_r_proto" in
17817 ''|0) try='int ttyname_r(int, char*, int);'
17818 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;;
17820 case "$ttyname_r_proto" in
17821 ''|0) try='char* ttyname_r(int, char*, int);'
17822 ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;;
17824 case "$ttyname_r_proto" in
17825 ''|0) d_ttyname_r=undef
17827 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
17828 * ) case "$ttyname_r_proto" in
17829 REENTRANT_PROTO*) ;;
17830 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
17832 echo "Prototype: $try" ;;
17835 *) case "$usethreads" in
17836 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
17843 *) ttyname_r_proto=0
17847 : see if tzname[] exists
17849 if set tzname val -a d_tzname; eval $csym; $val; then
17851 echo 'tzname[] found.' >&4
17854 echo 'tzname[] NOT found.' >&4
17860 next|rhapsody|darwin) multiarch="$define" ;;
17862 case "$multiarch" in
17863 ''|[nN]*) multiarch="$undef" ;;
17866 : check for ordering of bytes in a UV
17868 case "$usecrosscompile$multiarch" in
17871 You seem to be either cross-compiling or doing a multiarchitecture build,
17872 skipping the byteorder check.
17878 case "$byteorder" in
17881 In the following, larger digits indicate more significance. A big-endian
17882 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
17883 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
17884 machines may have weird orders like 3412. A Cray will report 87654321,
17885 an Alpha will report 12345678. If the test program works the default is
17887 I'm now running the test program...
17891 #$i_stdlib I_STDLIB
17893 #include <stdlib.h>
17895 #include <sys/types.h>
17896 typedef $uvtype UV;
17906 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
17908 u.l = (UV)0x04030201;
17909 for (i = 0; i < $uvsize; i++)
17910 printf("%c", u.c[i]+'0');
17917 if eval $compile && ./try > /dev/null; then
17920 [1-4][1-4][1-4][1-4]|12345678|87654321)
17921 echo "(The test program ran ok.)"
17922 echo "byteorder=$dflt"
17925 ????|????????) echo "(The test program ran ok.)" ;;
17926 *) echo "(The test program didn't run right for some reason.)" ;;
17931 (I can't seem to compile the test program. Guessing big-endian...)
17934 case "$xxx_prompt" in
17936 rp="What is the order of bytes in $uvtype?"
17952 Checking to see whether you can access character data unalignedly...
17954 case "$d_u32align" in
17955 '') $cat >try.c <<EOCP
17957 #$i_stdlib I_STDLIB
17959 #include <stdlib.h>
17961 #define U32 $u32type
17962 #define BYTEORDER 0x$byteorder
17964 #include <signal.h>
17966 $signal_t bletch(int s) { exit(4); }
17969 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
17974 if (sizeof(U32) != 4) {
17975 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
17982 signal(SIGBUS, bletch);
17994 for (i = 0; i < 4; i++) {
17995 up = (U32*)(buf + i);
17996 if (! ((*up == 1 << (8*i)) || /* big-endian */
17997 (*up == 1 << (8*(3-i))) /* little-endian */
18001 printf("read failed (%x)\n", *up);
18007 for (i = 0; i < 4; i++) {
18008 up = (U32*)(buf + i);
18010 if (*up != 0xBeef) {
18011 printf("write failed (%x)\n", *up);
18025 if eval $compile_ok; then
18026 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
18027 $run ./try 2>&1 >/dev/null
18030 You can access character data pretty unalignedly.
18032 d_u32align="$undef"
18035 It seems that you must access character data in an aligned manner.
18037 d_u32align="$define"
18041 rp='Can you access character data at unaligned addresses?'
18045 [yY]*) d_u32align="$undef" ;;
18046 *) d_u32align="$define" ;;
18049 $rm -f core core.try.* try.core
18053 : see if ualarm exists
18054 set ualarm d_ualarm
18057 : see if umask exists
18061 : see if unordered exists
18062 set unordered d_unordered
18065 : see if unsetenv exists
18066 set unsetenv d_unsetenv
18069 : see if usleep exists
18070 set usleep d_usleep
18073 : see if prototype for usleep is available
18075 set d_usleepproto usleep $i_unistd unistd.h
18078 : see if ustat exists
18082 : backward compatibility for d_hvfork
18083 if test X$d_hvfork != X; then
18084 d_vfork="$d_hvfork"
18087 : see if there is a vfork
18092 : Ok, but do we want to use it. vfork is reportedly unreliable in
18093 : perl on Solaris 2.x, and probably elsewhere.
18097 case "$usevfork" in
18103 Perl can only use a vfork() that doesn't suffer from strict
18104 restrictions on calling functions or modifying global data in
18105 the child. For example, glibc-2.1 contains such a vfork()
18106 that is unsuitable. If your system provides a proper fork()
18107 call, chances are that you do NOT want perl to use vfork().
18110 rp="Do you still want to use vfork()?"
18115 echo "Ok, we won't use vfork()."
18124 $define) usevfork='true';;
18125 *) usevfork='false';;
18128 : see if closedir exists
18129 set closedir d_closedir
18132 case "$d_closedir" in
18135 echo "Checking whether closedir() returns a status..." >&4
18137 #$i_dirent I_DIRENT /**/
18138 #$i_sysdir I_SYS_DIR /**/
18139 #$i_sysndir I_SYS_NDIR /**/
18140 #$i_systypes I_SYS_TYPES /**/
18142 #if defined(I_SYS_TYPES)
18143 #include <sys/types.h>
18145 #if defined(I_DIRENT)
18146 #include <dirent.h>
18147 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
18148 #include <sys/dir.h>
18152 #include <sys/ndir.h>
18156 #include <ndir.h> /* may be wrong in the future */
18158 #include <sys/dir.h>
18163 int main() { return closedir(opendir(".")); }
18166 if eval $compile_ok; then
18167 if $run ./try > /dev/null 2>&1 ; then
18168 echo "Yes, it does."
18171 echo "No, it doesn't."
18175 echo "(I can't seem to compile the test program--assuming it doesn't)"
18183 set d_void_closedir
18186 : see if there is a wait4
18190 : see if waitpid exists
18191 set waitpid d_waitpid
18194 : see if wcstombs exists
18195 set wcstombs d_wcstombs
18198 : see if wctomb exists
18199 set wctomb d_wctomb
18202 : see if writev exists
18203 set writev d_writev
18206 : preserve RCS keywords in files with variable substitution, grrr
18211 Revision='$Revision'
18213 : check for alignment requirements
18215 case "$usecrosscompile$multiarch" in
18218 You seem to be either cross-compiling or doing a multiarchitecture build,
18219 skipping the memory alignment check.
18222 case "$alignbytes" in
18223 '') alignbytes=8 ;;
18227 case "$alignbytes" in
18228 '') echo "Checking alignment constraints..." >&4
18229 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
18230 $cat >try.c <<'EOCP'
18231 typedef long double NV;
18234 $cat >try.c <<'EOCP'
18238 $cat >>try.c <<'EOCP'
18246 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
18251 if eval $compile_ok; then
18255 echo "(I can't seem to compile the test program...)"
18258 *) dflt="$alignbytes"
18261 rp="Doubles must be aligned on a how-many-byte boundary?"
18269 : set the base revision
18272 : how do we concatenate cpp tokens here?
18274 echo "Checking to see how your cpp does stuff like concatenate tokens..." >&4
18275 $cat >cpp_stuff.c <<'EOCP'
18276 #define RCAT(a,b)a/**/b
18277 #define ACAT(a,b)a ## b
18281 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
18282 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
18283 echo "Oh! Smells like ANSI's been here." >&4
18284 echo "We can catify or stringify, separately or together!"
18286 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
18287 echo "Ah, yes! The good old days!" >&4
18288 echo "However, in the good old days we don't know how to stringify and"
18289 echo "catify at the same time."
18293 Hmm, I don't seem to be able to concatenate tokens with your cpp.
18294 You're going to have to edit the values of CAT[2-5] in config.h...
18296 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
18300 : see if this is a db.h system
18306 : Check db version.
18308 echo "Checking Berkeley DB version ..." >&4
18314 #include <sys/types.h>
18316 #$i_stdlib I_STDLIB
18318 #include <stdlib.h>
18321 int main(int argc, char *argv[])
18323 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
18324 int Major, Minor, Patch ;
18325 unsigned long Version ;
18326 (void)db_version(&Major, &Minor, &Patch) ;
18328 printf("%d %d %d %d %d %d\n",
18329 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
18330 Major, Minor, Patch);
18333 printf("You have Berkeley DB Version 2 or greater.\n");
18335 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
18336 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
18337 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
18338 Major, Minor, Patch) ;
18340 /* check that db.h & libdb are compatible */
18341 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
18342 printf("db.h and libdb are incompatible.\n") ;
18346 printf("db.h and libdb are compatible.\n") ;
18348 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
18349 + DB_VERSION_PATCH ;
18351 /* needs to be >= 2.3.4 */
18352 if (Version < 2003004) {
18353 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
18354 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
18360 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
18365 printf("You have Berkeley DB Version 1.\n");
18366 exit(0); /* DB version < 2: the coast is clear. */
18368 exit(1); /* <db.h> not Berkeley DB? */
18374 if eval $compile_ok && $run ./try; then
18375 echo 'Looks OK.' >&4
18377 db_version_major=$1
18378 db_version_minor=$2
18379 db_version_patch=$3
18381 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
18385 : Remove db from list of libraries to use
18386 echo "Removing unusable -ldb from library list" >&4
18387 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
18390 echo "libs = $libs" >&4
18400 : Check the return type needed for hash
18402 echo "Checking return type needed for hash for Berkeley DB ..." >&4
18408 #include <sys/types.h>
18411 #ifndef DB_VERSION_MAJOR
18412 u_int32_t hash_cb (ptr, size)
18420 info.hash = hash_cb;
18424 if $cc $ccflags -c try.c >try.out 2>&1 ; then
18425 if $contains warning try.out >>/dev/null 2>&1 ; then
18428 db_hashtype='u_int32_t'
18431 : XXX Maybe we should just give up here.
18432 db_hashtype=u_int32_t
18434 echo "Help: I can't seem to compile the db test program." >&4
18435 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
18438 echo "Your version of Berkeley DB uses $db_hashtype for hash."
18440 *) db_hashtype=u_int32_t
18445 : Check the return type needed for prefix
18447 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
18453 #include <sys/types.h>
18456 #ifndef DB_VERSION_MAJOR
18457 size_t prefix_cb (key1, key2)
18465 info.prefix = prefix_cb;
18469 if $cc $ccflags -c try.c >try.out 2>&1 ; then
18470 if $contains warning try.out >>/dev/null 2>&1 ; then
18471 db_prefixtype='int'
18473 db_prefixtype='size_t'
18476 db_prefixtype='size_t'
18477 : XXX Maybe we should just give up here.
18479 echo "Help: I can't seem to compile the db test program." >&4
18480 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
18483 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
18485 *) db_prefixtype='size_t'
18490 : How can we generate normalized random numbers ?
18492 echo "Looking for a random number function..." >&4
18493 case "$randfunc" in
18495 if set drand48 val -f; eval $csym; $val; then
18497 echo "Good, found drand48()." >&4
18498 elif set random val -f; eval $csym; $val; then
18500 echo "OK, found random()." >&4
18503 echo "Yick, looks like I have to use rand()." >&4
18514 *-Dmy_rand=*|*-Dmy_srand=*)
18515 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
18516 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
18517 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
18518 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
18522 while $test "$cont"; do
18523 rp="Use which function to generate random numbers?"
18525 if $test "$ans" = "$dflt"; then
18531 if set $ans val -f; eval $csym; $val; then
18535 rp="I cannot find function $ans. Use that name anyway?"
18544 case "$randfunc" in
18546 drand01="drand48()"
18552 case "$randbits" in
18554 echo "Checking to see how many bits your $randfunc() function produces..." >&4
18556 #$i_unistd I_UNISTD
18557 #$i_stdlib I_STDLIB
18560 # include <unistd.h>
18563 # include <stdlib.h>
18568 register unsigned long tmp;
18569 register unsigned long max = 0L;
18571 for (i = 1000; i; i--) {
18572 tmp = (unsigned long) $randfunc();
18573 if (tmp > max) max = tmp;
18575 for (i = 0; max; i++)
18581 if eval $compile_ok; then
18585 echo "(I can't seem to compile the test program...)"
18592 rp="How many bits does your $randfunc() function produce?"
18596 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
18597 seedfunc="s$randfunc"
18598 randseedtype=unsigned
18602 rp="How many bits does your $randfunc() function produce?"
18605 seedfunc="s$randfunc"
18606 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
18607 if set $seedfunc val -f; eval $csym; $val; then
18608 echo "(Using $seedfunc() to seed random generator)"
18610 echo "(Warning: no $seedfunc() to seed random generator)"
18613 randseedtype=unsigned
18621 echo "Determining whether or not we are on an EBCDIC system..." >&4
18622 $cat >try.c <<'EOM'
18625 if ('M'==0xd4) return 0;
18632 if eval $compile_ok; then
18633 if $run ./try; then
18634 echo "You seem to speak EBCDIC." >&4
18637 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
18640 echo "I'm unable to compile the test program." >&4
18641 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
18649 Checking how to flush all pending stdio output...
18651 # I only know how to find the first 32 possibly open files on SunOS.
18652 # See also hints/sunos_4_1.sh and util.c --AD
18654 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
18656 $cat >>try.c <<EOCP
18658 #$i_stdlib I_STDLIB
18660 #include <stdlib.h>
18662 #$i_unistd I_UNISTD
18664 # include <unistd.h>
18666 #$d_sysconf HAS_SYSCONF
18667 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
18668 #ifdef HAS_STDIO_STREAM_ARRAY
18669 # define STDIO_STREAM_ARRAY $stdio_stream_array
18674 p = fopen("try.out", "w");
18678 # ifdef TRY_FPRINTF
18682 #ifdef TRY_FFLUSH_NULL
18685 #ifdef TRY_FFLUSH_ALL
18687 long open_max = -1;
18688 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
18689 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
18691 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
18692 open_max = sysconf(_SC_OPEN_MAX);
18695 open_max = FOPEN_MAX;
18698 open_max = OPEN_MAX;
18707 # ifdef HAS_STDIO_STREAM_ARRAY
18708 if (open_max > 0) {
18710 for (i = 0; i < open_max; i++)
18711 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
18712 STDIO_STREAM_ARRAY[i]._file < open_max &&
18713 STDIO_STREAM_ARRAY[i]._flag)
18714 fflush(&STDIO_STREAM_ARRAY[i]);
18722 : first we have to find out how _not_ to flush
18724 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
18726 set try -DTRY_FPUTC
18727 if eval $compile; then
18728 $run ./try 2>/dev/null
18731 if $test ! -s try.out -a "X$code" = X42; then
18737 set try -DTRY_FPRINTF
18738 if eval $compile; then
18739 $run ./try 2>/dev/null
18742 if $test ! -s try.out -a "X$code" = X42; then
18743 output=-DTRY_FPRINTF
18749 : check for fflush NULL behaviour
18750 case "$fflushNULL" in
18751 '') set try -DTRY_FFLUSH_NULL $output
18752 if eval $compile; then
18753 $run ./try 2>/dev/null
18756 if $test -s try.out -a "X$code" = X42; then
18757 fflushNULL="`$cat try.out`"
18759 if $test "X$code" != X42; then
18761 (If this test failed, don't worry, we'll try another method shortly.)
18766 $rm -f core try.core core.try.*
18767 case "$fflushNULL" in
18769 Your fflush(NULL) works okay for output streams.
18770 Let's see if it clobbers input pipes...
18772 # As of mid-March 2000 all versions of Solaris appear to have a stdio
18773 # bug that improperly flushes the input end of pipes. So we avoid the
18774 # autoflush on fork/system/exec support for now. :-(
18775 $cat >tryp.c <<EOCP
18778 main(int argc, char **argv)
18784 while ((i = getc(stdin)) != -1
18785 && (*bp++ = i) != '\n'
18786 && bp < &buf[1024])
18789 fprintf(stdout, "%s", buf);
18797 fflushNULL="$define"
18799 if eval $compile; then
18801 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
18802 if cmp tryp.c tryp.out >/dev/null 2>&1; then
18804 fflush(NULL) seems to behave okay with input streams.
18806 fflushNULL="$define"
18809 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
18811 fflushNULL="$undef"
18814 $rm -f core tryp.c tryp.core core.tryp.*
18817 Your fflush(NULL) isn't working (contrary to ANSI C).
18819 fflushNULL="$undef"
18822 Cannot figure out whether your fflush(NULL) works or not.
18823 I'm assuming it doesn't (contrary to ANSI C).
18825 fflushNULL="$undef"
18829 $define|true|[yY]*)
18830 fflushNULL="$define"
18833 fflushNULL="$undef"
18836 : check explicit looping only if NULL did not work, and if the pipe
18837 : bug does not show up on an explicit flush too
18838 case "$fflushNULL" in
18840 $cat >tryp.c <<EOCP
18843 main(int argc, char **argv)
18849 while ((i = getc(stdin)) != -1
18850 && (*bp++ = i) != '\n'
18851 && bp < &buf[1024])
18854 fprintf(stdout, "%s", buf);
18863 if eval $compile; then
18865 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
18866 if cmp tryp.c tryp.out >/dev/null 2>&1; then
18868 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
18870 : now check for fflushall behaviour
18871 case "$fflushall" in
18872 '') set try -DTRY_FFLUSH_ALL $output
18873 if eval $compile; then
18875 (Now testing the other method--but note that this also may fail.)
18877 $run ./try 2>/dev/null
18880 if $test -s try.out -a "X$code" = X42; then
18881 fflushall="`$cat try.out`"
18884 $rm -f core try.core core.try.*
18885 case "$fflushall" in
18887 Whew. Flushing explicitly all the stdio streams works.
18889 fflushall="$define"
18892 Sigh. Flushing explicitly all the stdio streams doesn't work.
18897 Cannot figure out whether flushing stdio streams explicitly works or not.
18898 I'm assuming it doesn't.
18904 "$define"|true|[yY]*)
18905 fflushall="$define"
18913 All is futile. Even fflush(stdin) clobbers input pipes!
18920 $rm -f core tryp.c tryp.core core.tryp.*
18922 *) fflushall="$undef"
18926 case "$fflushNULL$fflushall" in
18929 OK, I give up. I cannot figure out how to flush pending stdio output.
18930 We won't be flushing handles at all before fork/exec/popen.
18934 $rm -f try.* try$exe_ext
18936 : Store the full pathname to the ar program for use in the C program
18937 : Respect a hint or command line value for full_ar.
18942 : Store the full pathname to the sed program for use in the C program
18945 : see what type gids are declared as in the kernel
18947 echo "Looking for the type for group ids returned by getgid()."
18948 set gid_t gidtype xxx stdio.h sys/types.h
18952 xxx=`./findhdr sys/user.h`
18953 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
18955 unsigned) dflt="$1 $2" ;;
18959 *) dflt="$gidtype";;
18962 gid_t) echo "gid_t found." ;;
18963 *) rp="What is the type for group ids returned by getgid()?"
18971 *_t) zzz="$gidtype" ;;
18974 echo "Checking the size of $zzz..." >&4
18976 #include <sys/types.h>
18978 #$i_stdlib I_STDLIB
18980 #include <stdlib.h>
18983 printf("%d\n", (int)sizeof($gidtype));
18988 if eval $compile_ok; then
18992 echo "(I can't execute the test program--guessing $gidsize.)" >&4
18995 echo "Your $zzz is $gidsize bytes long."
19000 echo "(I can't compile the test program--guessing $gidsize.)" >&4
19006 *_t) zzz="$gidtype" ;;
19009 echo "Checking the sign of $zzz..." >&4
19011 #include <sys/types.h>
19022 if eval $compile; then
19026 echo "(I can't execute the test program--guessing unsigned.)" >&4
19030 1) echo "Your $zzz is unsigned." ;;
19031 -1) echo "Your $zzz is signed." ;;
19037 echo "(I can't compile the test program--guessing unsigned.)" >&4
19043 if $test X"$quadtype" != X; then
19045 echo "Checking how to print 64-bit integers..." >&4
19047 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
19048 $cat >try.c <<'EOCP'
19049 #include <sys/types.h>
19052 int q = 12345678901;
19053 printf("%ld\n", q);
19057 if eval $compile; then
19061 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
19062 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
19063 echo "We will use %d."
19069 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
19070 $cat >try.c <<'EOCP'
19071 #include <sys/types.h>
19074 long q = 12345678901;
19075 printf("%ld\n", q);
19079 if eval $compile; then
19083 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
19084 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
19085 echo "We will use %ld."
19091 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
19092 $cat >try.c <<'EOCP'
19093 #include <sys/types.h>
19094 #include <inttypes.h>
19097 int64_t q = 12345678901;
19098 printf("%" PRId64 "\n", q);
19102 if eval $compile; then
19106 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
19107 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
19108 echo "We will use the C9X style."
19114 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
19116 #include <sys/types.h>
19119 $quadtype q = 12345678901;
19120 printf("%Ld\n", q);
19124 if eval $compile; then
19128 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
19129 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
19130 echo "We will use %Ld."
19136 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
19137 $cat >try.c <<'EOCP'
19138 #include <sys/types.h>
19141 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
19142 printf("%lld\n", q);
19146 if eval $compile; then
19150 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
19151 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
19152 echo "We will use the %lld style."
19158 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
19160 #include <sys/types.h>
19163 $quadtype q = 12345678901;
19164 printf("%qd\n", q);
19168 if eval $compile; then
19172 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
19173 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
19174 echo "We will use %qd."
19180 if $test X"$sPRId64" = X; then
19181 echo "Cannot figure out how to print 64-bit integers." >&4
19189 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
19190 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
19192 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
19193 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
19199 $echo "Checking the format strings to be used for Perl's internal types..." >&4
19201 if $test X"$ivsize" = X8; then
19202 ivdformat="$sPRId64"
19203 uvuformat="$sPRIu64"
19204 uvoformat="$sPRIo64"
19205 uvxformat="$sPRIx64"
19206 uvXUformat="$sPRIXU64"
19208 if $test X"$ivsize" = X"$longsize"; then
19215 if $test X"$ivsize" = X"$intsize"; then
19223 if $test X"$ivsize" = X"$shortsize"; then
19234 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
19235 nveformat="$sPRIeldbl"
19236 nvfformat="$sPRIfldbl"
19237 nvgformat="$sPRIgldbl"
19238 nvEUformat="$sPRIEUldbl"
19239 nvFUformat="$sPRIFUldbl"
19240 nvGUformat="$sPRIGUldbl"
19250 case "$ivdformat" in
19251 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
19258 $echo "Checking the format string to be used for gids..." >&4
19261 -1) if $test X"$gidsize" = X"$ivsize"; then
19262 gidformat="$ivdformat"
19264 if $test X"$gidsize" = X"$longsize"; then
19267 if $test X"$gidsize" = X"$intsize"; then
19270 if $test X"$gidsize" = X"$shortsize"; then
19277 *) if $test X"$gidsize" = X"$uvsize"; then
19278 gidformat="$uvuformat"
19280 if $test X"$gidsize" = X"$longsize"; then
19283 if $test X"$gidsize" = X"$intsize"; then
19286 if $test X"$gidsize" = X"$shortsize"; then
19295 : see if getgroups exists
19296 set getgroups d_getgrps
19299 : see if setgroups exists
19300 set setgroups d_setgrps
19304 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
19306 case "$d_getgrps$d_setgrps" in
19308 case "$groupstype" in
19309 '') dflt="$gidtype" ;;
19310 *) dflt="$groupstype" ;;
19313 What type of pointer is the second argument to getgroups() and setgroups()?
19314 Usually this is the same as group ids, $gidtype, but not always.
19317 rp='What type pointer is the second argument to getgroups() and setgroups()?'
19321 *) groupstype="$gidtype";;
19325 if $test $patchlevel -lt 9; then
19326 : MAD is not available in 5.8.x or earlier.
19330 $define|true|[yY]*) dflt='y' ;;
19335 Would you like to build with Misc Attribute Decoration? This is development
19336 work leading to a Perl 5 to Perl 6 convertor, which imposes a space and speed
19337 overhead on the interpreter.
19339 If this doesn't make any sense to you, just accept the default '$dflt'.
19341 rp='Build Perl with MAD?'
19346 madlyh='madly.h madly.act madly.tab'
19348 madlyobj="madly$_o" ;;
19358 echo "Checking if your $make program sets \$(MAKE)..." >&4
19359 case "$make_set_make" in
19361 $sed 's/^X //' > testmake.mak << 'EOF'
19363 X @echo 'maketemp="$(MAKE)"'
19365 case "`$make -f testmake.mak 2>/dev/null`" in
19366 *maketemp=*) make_set_make='#' ;;
19367 *) make_set_make="MAKE=$make" ;;
19369 $rm -f testmake.mak
19372 case "$make_set_make" in
19373 '#') echo "Yup, it does.";;
19374 *) echo "Nope, it doesn't.";;
19377 : see what type is used for mode_t
19378 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
19379 set mode_t modetype int stdio.h sys/types.h
19382 : see if we need va_copy
19384 case "$i_stdarg" in
19387 #include <stdarg.h>
19389 #$i_stdlib I_STDLIB
19391 #include <stdlib.h>
19393 #include <signal.h>
19396 ivfprintf(FILE *f, const char *fmt, va_list *valp)
19398 return vfprintf(f, fmt, *valp);
19402 myvfprintf(FILE *f, const char *fmt, va_list val)
19404 return ivfprintf(f, fmt, &val);
19408 myprintf(char *fmt, ...)
19411 va_start(val, fmt);
19412 return myvfprintf(stdout, fmt, val);
19416 main(int ac, char **av)
19418 signal(SIGSEGV, exit);
19420 myprintf("%s%cs all right, then\n", "that", '\'');
19425 if eval $compile && $run ./try 2>&1 >/dev/null; then
19426 case "`$run ./try`" in
19427 "that's all right, then")
19433 yes) echo "It seems that you don't need va_copy()." >&4
19434 need_va_copy="$undef"
19436 *) echo "It seems that va_copy() or similar will be needed." >&4
19437 need_va_copy="$define"
19440 $rm -f try.* core core.* *.core *.core.*
19442 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
19446 : see what type is used for size_t
19447 rp="What is the type used for the length parameter for string functions?"
19448 set size_t sizetype 'unsigned int' stdio.h sys/types.h
19451 : check for type of arguments to gethostbyaddr.
19452 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
19453 case "$d_gethbyaddr" in
19457 Checking to see what type of arguments are accepted by gethostbyaddr().
19459 hdrs="$define sys/types.h
19460 $d_socket sys/socket.h
19461 $i_niin netinet/in.h
19463 $i_unistd unistd.h"
19464 : The first arg can 'char *' or 'void *'
19465 : The second arg is some of integral type
19466 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
19467 for yyy in size_t long int; do
19468 case "$netdb_host_type" in
19469 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
19470 if ./protochk "$try" $hdrs; then
19471 echo "Your system accepts $xxx for the first arg."
19472 echo "...and $yyy for the second arg."
19473 netdb_host_type="$xxx"
19474 netdb_hlen_type="$yyy"
19480 : In case none of those worked, prompt the user.
19481 case "$netdb_host_type" in
19482 '') rp='What is the type for the 1st argument to gethostbyaddr?'
19485 netdb_host_type=$ans
19486 rp='What is the type for the 2nd argument to gethostbyaddr?'
19489 netdb_hlen_type=$ans
19493 *) : no gethostbyaddr, so pick harmless defaults
19494 netdb_host_type='char *'
19495 netdb_hlen_type="$sizetype"
19498 # Remove the "const" if needed. -- but then we'll have a
19500 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
19503 : check for type of argument to gethostbyname.
19504 if test "X$netdb_name_type" = X ; then
19505 case "$d_gethbyname" in
19509 Checking to see what type of argument is accepted by gethostbyname().
19511 hdrs="$define sys/types.h
19512 $d_socket sys/socket.h
19513 $i_niin netinet/in.h
19515 $i_unistd unistd.h"
19516 for xxx in "const char *" "char *"; do
19517 case "$netdb_name_type" in
19518 '') try="extern struct hostent *gethostbyname($xxx);"
19519 if ./protochk "$try" $hdrs; then
19520 echo "Your system accepts $xxx."
19521 netdb_name_type="$xxx"
19526 : In case none of those worked, prompt the user.
19527 case "$netdb_name_type" in
19528 '') rp='What is the type for the 1st argument to gethostbyname?'
19531 netdb_name_type=$ans
19535 *) : no gethostbyname, so pick harmless default
19536 netdb_name_type='char *'
19541 : check for type of 1st argument to getnetbyaddr.
19542 if test "X$netdb_net_type" = X ; then
19543 case "$d_getnbyaddr" in
19547 Checking to see what type of 1st argument is accepted by getnetbyaddr().
19549 hdrs="$define sys/types.h
19550 $d_socket sys/socket.h
19551 $i_niin netinet/in.h
19553 $i_unistd unistd.h"
19554 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
19555 case "$netdb_net_type" in
19556 '') try="extern struct netent *getnetbyaddr($xxx, int);"
19557 if ./protochk "$try" $hdrs; then
19558 echo "Your system accepts $xxx."
19559 netdb_net_type="$xxx"
19564 : In case none of those worked, prompt the user.
19565 case "$netdb_net_type" in
19566 '') rp='What is the type for the 1st argument to getnetbyaddr?'
19569 netdb_net_type=$ans
19573 *) : no getnetbyaddr, so pick harmless default
19574 netdb_net_type='long'
19578 : locate the preferred pager for this system
19585 [a-zA-Z]:/*) dflt=$pg;;
19589 [a-zA-Z]:/*) dflt=$more;;
19593 [a-zA-Z]:/*) dflt=$less;;
19596 '') dflt=/usr/ucb/more;;
19600 : Instruct ./getfile to trust the hinted or previous pager value,
19601 : even if it does not begin with a slash. For example, on os2,
19602 : pager might be cmd /c more. See comments in UU/getfile.
19607 rp='What pager is used on your system?'
19611 : see what type pids are declared as in the kernel
19612 rp="What is the type of process ids on this system?"
19613 set pid_t pidtype int stdio.h sys/types.h
19616 : see if ar generates random libraries by itself
19618 echo "Checking how to generate random libraries on your machine..." >&4
19619 echo 'int bar1() { return bar2(); }' > bar1.c
19620 echo 'int bar2() { return 2; }' > bar2.c
19622 #$i_stdlib I_STDLIB
19624 #include <stdlib.h>
19626 int main() { printf("%d\n", bar1()); exit(0); }
19628 $cc $ccflags -c bar1.c >/dev/null 2>&1
19629 $cc $ccflags -c bar2.c >/dev/null 2>&1
19630 $cc $ccflags -c foo.c >/dev/null 2>&1
19631 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
19632 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
19633 $run ./foobar >/dev/null 2>&1; then
19634 echo "$ar appears to generate random libraries itself."
19636 if [ "X$ranlib" = "X" ]; then
19639 elif $ar s bar$_a >/dev/null 2>&1 &&
19640 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
19641 $run ./foobar >/dev/null 2>&1; then
19642 echo "a table of contents needs to be added with '$ar s'."
19645 elif $ar ts bar$_a >/dev/null 2>&1 &&
19646 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
19647 $run ./foobar >/dev/null 2>&1; then
19648 echo "a table of contents needs to be added with '$ar ts'."
19655 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
19656 $test -f $ranlib || ranlib=''
19659 if $test -n "$ranlib"; then
19660 echo "your system has '$ranlib'; we'll use that."
19663 echo "your system doesn't seem to support random libraries"
19664 echo "so we'll use lorder and tsort to order the libraries."
19671 : check for type of arguments to select.
19672 case "$selecttype" in
19673 '') case "$d_select" in
19677 Checking to see what type of arguments are accepted by select().
19679 hdrs="$define sys/types.h
19680 $i_systime sys/time.h
19681 $i_sysselct sys/select.h
19682 $d_socket sys/socket.h"
19683 : The first arg can be int, unsigned, or size_t
19684 : The last arg may or may not be 'const'
19686 : void pointer has been seen but using that
19687 : breaks the selectminbits test
19688 for xxx in 'fd_set *' 'int *'; do
19689 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
19690 for tmo in 'struct timeval *' 'const struct timeval *'; do
19692 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
19693 if ./protochk "$try" $hdrs; then
19694 echo "Your system accepts $xxx."
19703 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
19704 case "$d_fd_set" in
19705 $define) dflt="fd_set *" ;;
19714 *) : no select, so pick a harmless default
19721 : check for the select 'width'
19722 case "$selectminbits" in
19723 '') safebits=`expr $ptrsize \* 8`
19724 case "$d_select" in
19728 Checking to see on how many bits at a time your select() operates...
19731 #include <sys/types.h>
19733 #$i_systime I_SYS_TIME
19734 #$i_systimek I_SYS_TIME_KERNEL
19739 # ifdef I_SYS_TIME_KERNEL
19742 # include <sys/time.h>
19743 # ifdef I_SYS_TIME_KERNEL
19747 #$i_sysselct I_SYS_SELECT
19748 #ifdef I_SYS_SELECT
19749 #include <sys/select.h>
19751 #$d_socket HAS_SOCKET
19753 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
19756 #$i_stdlib I_STDLIB
19758 #include <stdlib.h>
19761 #define S sizeof(*(b))
19763 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
19764 #define NBITS (NBYTES * 8)
19766 char *s = (char *)malloc(NBYTES);
19775 fp = fopen("try.c", "r");
19781 b = ($selecttype)s;
19782 for (i = 0; i < NBITS; i++)
19786 select(fd + 1, b, 0, 0, &t);
19787 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
19789 printf("%d\n", i + 1);
19794 if eval $compile_ok; then
19795 selectminbits=`$run ./try`
19796 case "$selectminbits" in
19798 Cannot figure out on how many bits at a time your select() operates.
19799 I'll play safe and guess it is $safebits bits.
19801 selectminbits=$safebits
19802 bits="$safebits bits"
19805 *) bits="$selectminbits bits" ;;
19807 echo "Your select() operates on $bits at a time." >&4
19809 rp='What is the minimum number of bits your select() operates on?'
19810 case "$byteorder" in
19811 12345678) dflt=64 ;;
19817 selectminbits="$val"
19821 *) : no select, so pick a harmless default
19822 selectminbits=$safebits
19828 : Trace out the files included by signal.h, then look for SIGxxx names.
19829 : Remove SIGARRAYSIZE used by HPUX.
19830 : Remove SIGSTKSIZE used by Linux.
19831 : Remove SIGSTKSZ used by Posix.
19832 : Remove SIGTYP void lines used by OS2.
19833 : Some cpps, like os390, dont give the file name anywhere
19834 if [ "X$fieldn" = X ]; then
19835 : Just make some guesses. We check them later.
19836 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
19838 xxx=`echo '#include <signal.h>' |
19839 $cppstdin $cppminus $cppflags 2>/dev/null |
19840 $grep '^[ ]*#.*include' |
19841 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
19843 : Check this list of files to be sure we have parsed the cpp output ok.
19844 : This will also avoid potentially non-existent files, such
19847 for xx in $xxx /dev/null ; do
19848 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
19850 : If we have found no files, at least try signal.h
19851 case "$xxxfiles" in
19852 '') xxxfiles=`./findhdr signal.h` ;;
19855 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
19856 print substr($2, 4, 20)
19858 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
19859 print substr($3, 4, 20)
19861 : Append some common names just in case the awk scan failed.
19862 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
19863 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
19864 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
19865 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
19866 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
19868 : generate a few handy files for later
19869 $cat > signal.c <<EOCP
19870 #include <sys/types.h>
19871 #include <signal.h>
19872 #$i_stdlib I_STDLIB
19874 #include <stdlib.h>
19879 /* Strange style to avoid deeply-nested #if/#else/#endif */
19882 # define NSIG (_NSIG)
19888 # define NSIG (SIGMAX+1)
19894 # define NSIG (SIG_MAX+1)
19900 # define NSIG (_SIG_MAX+1)
19906 # define NSIG (MAXSIG+1)
19912 # define NSIG (MAX_SIG+1)
19917 # ifdef SIGARRAYSIZE
19918 # define NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */
19924 # define NSIG (_sys_nsig) /* Solaris 2.5 */
19928 /* Default to some arbitrary number that's big enough to get most
19929 of the common signals.
19935 printf("NSIG %d\n", NSIG);
19941 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
19943 printf "#ifdef SIG"; printf $1; printf "\n"
19944 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
19945 printf $1; printf ");\n"
19949 printf "#endif /* JUST_NSIG */\n";
19950 printf "exit(0);\n}\n";
19953 $cat >signal.awk <<'EOP'
19954 BEGIN { ndups = 0 }
19955 $1 ~ /^NSIG$/ { nsig = $2 }
19956 ($1 !~ /^NSIG$/) && (NF == 2) && ($2 ~ /^[0-9][0-9]*$/) {
19957 if ($2 > maxsig) { maxsig = $2 }
19958 if (sig_name[$2]) {
19959 dup_name[ndups] = $1
19960 dup_num[ndups] = $2
19972 printf("NSIG %d\n", nsig);
19973 for (n = 1; n < nsig; n++) {
19975 printf("%s %d\n", sig_name[n], sig_num[n])
19978 printf("NUM%d %d\n", n, n)
19981 for (n = 0; n < ndups; n++) {
19982 printf("%s %d\n", dup_name[n], dup_num[n])
19986 $cat >signal_cmd <<EOS
19988 if $test -s signal.lst; then
19989 echo "Using your existing signal.lst file"
19994 $cat >>signal_cmd <<'EOS'
19997 if eval $compile_ok; then
19998 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst
20000 echo "(I can't seem be able to compile the whole test program)" >&4
20001 echo "(I'll try it in little pieces.)" >&4
20002 set signal -DJUST_NSIG
20003 if eval $compile_ok; then
20004 $run ./signal$_exe > signal.nsg
20007 echo "I can't seem to figure out how many signals you have." >&4
20008 echo "Guessing 50." >&4
20009 echo 'NSIG 50' > signal.nsg
20011 : Now look at all the signal names, one at a time.
20012 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
20013 $cat > signal.c <<EOCP
20014 #include <sys/types.h>
20015 #include <signal.h>
20018 printf("$xx %d\n", SIG${xx});
20023 if eval $compile; then
20024 echo "SIG${xx} found."
20025 $run ./signal$_exe >> signal.ls1
20027 echo "SIG${xx} NOT found."
20030 if $test -s signal.ls1; then
20031 $cat signal.nsg signal.ls1 |
20032 $sort -n | $uniq | $awk -f signal.awk >signal.lst
20036 if $test -s signal.lst; then
20039 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
20040 echo 'kill -l' >signal
20041 set X `csh -f <signal`
20045 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
20047 echo $@ | $tr ' ' $trnl | \
20048 $awk '{ printf "%s %d\n", $1, ++s; }
20049 END { printf "NSIG %d\n", ++s }' >signal.lst
20051 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
20053 chmod a+x signal_cmd
20054 $eunicefix signal_cmd
20056 : generate list of signal names
20058 case "$sig_name_init" in
20060 *) case "$sig_num_init" in
20061 ''|*,*) doinit=yes ;;
20066 echo "Generating a list of signal names and numbers..." >&4
20068 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
20069 sig_name=`$awk 'BEGIN { printf "ZERO " }
20070 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
20071 sig_num=`$awk 'BEGIN { printf "0 " }
20072 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
20073 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
20074 !/^NSIG/ { printf "\"%s\", ", $1 }
20075 END { printf "0\n" }' signal.lst`
20076 sig_num_init=`$awk 'BEGIN { printf "0, " }
20077 !/^NSIG/ { printf "%d, ", $2}
20078 END { printf "0\n"}' signal.lst`
20081 echo "The following $sig_count signals are available:"
20083 echo $sig_name | $awk \
20084 'BEGIN { linelen = 0 }
20086 for (i = 1; i <= NF; i++) {
20087 name = "SIG" $i " "
20088 linelen = linelen + length(name)
20089 if (linelen > 70) {
20091 linelen = length(name)
20097 sig_size=`echo $sig_name | awk '{print NF}'`
20098 $rm -f signal signal.c signal.awk signal.lst signal_cmd
20101 case "$sizetype" in
20102 *_t) zzz="$sizetype" ;;
20103 *) zzz="filesize" ;;
20105 echo "Checking the size of $zzz..." >&4
20107 #include <sys/types.h>
20109 #$i_stdlib I_STDLIB
20111 #include <stdlib.h>
20114 printf("%d\n", (int)sizeof($sizetype));
20119 if eval $compile_ok; then
20123 echo "(I can't execute the test program--guessing $sizesize.)" >&4
20126 echo "Your $zzz size is $sizesize bytes."
20131 echo "(I can't compile the test program--guessing $sizesize.)" >&4
20135 : check for socklen_t
20137 echo "Checking to see if you have socklen_t..." >&4
20139 #include <sys/types.h>
20140 #$d_socket HAS_SOCKET
20142 #include <sys/socket.h>
20144 int main() { socklen_t x = 16; }
20147 if eval $compile; then
20149 echo "You have socklen_t."
20152 echo "You do not have socklen_t."
20153 case "$sizetype" in
20154 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
20161 : see if this is a socks.h system
20162 set socks.h i_socks
20165 : check for type of the size argument to socket calls
20166 case "$d_socket" in
20170 Checking to see what type is the last argument of accept().
20173 case "$d_socklen_t" in
20174 "$define") yyy="$yyy socklen_t"
20176 yyy="$yyy $sizetype int long unsigned"
20177 for xxx in $yyy; do
20178 case "$socksizetype" in
20179 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
20180 case "$usesocks" in
20182 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
20183 echo "Your system accepts '$xxx *' for the last argument of accept()."
20184 socksizetype="$xxx"
20187 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
20188 echo "Your system accepts '$xxx *' for the last argument of accept()."
20189 socksizetype="$xxx"
20196 : In case none of those worked, prompt the user.
20197 case "$socksizetype" in
20198 '') rp='What is the type for socket address structure sizes?'
20205 *) : no sockets, so pick relatively harmless default
20210 : see what type is used for signed size_t
20211 set ssize_t ssizetype int stdio.h sys/types.h
20216 #$i_stdlib I_STDLIB
20218 #include <stdlib.h>
20220 #include <sys/types.h>
20221 #define Size_t $sizetype
20222 #define SSize_t $dflt
20225 if (sizeof(Size_t) == sizeof(SSize_t))
20227 else if (sizeof(Size_t) == sizeof(int))
20236 if eval $compile_ok && $run ./try > /dev/null; then
20237 ssizetype=`$run ./try`
20238 echo "I'll be using $ssizetype for functions returning a byte count." >&4
20241 Help! I can't compile and run the ssize_t test program: please enlighten me!
20242 (This is probably a misconfiguration in your system or libraries, and
20243 you really ought to fix it. Still, I'll try anyway.)
20245 I need a type that is the same size as $sizetype, but is guaranteed to
20246 be signed. Common values are ssize_t, int and long.
20249 rp="What signed type is the same size as $sizetype?"
20255 : see what type of char stdio uses.
20257 echo '#include <stdio.h>' > stdio.c
20258 $cppstdin $cppminus < stdio.c > stdioh
20259 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
20260 echo "Your stdio uses unsigned chars." >&4
20261 stdchar="unsigned char"
20263 echo "Your stdio uses signed chars." >&4
20266 $rm -f stdio.* stdioh
20268 : see what type uids are declared as in the kernel
20270 echo "Looking for the type for user ids returned by getuid()."
20271 set uid_t uidtype xxx stdio.h sys/types.h
20275 xxx=`./findhdr sys/user.h`
20276 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
20278 unsigned) dflt="$1 $2" ;;
20282 *) dflt="$uidtype";;
20285 uid_t) echo "uid_t found." ;;
20286 *) rp="What is the type for user ids returned by getuid()?"
20294 *_t) zzz="$uidtype" ;;
20297 echo "Checking the size of $zzz..." >&4
20299 #include <sys/types.h>
20301 #$i_stdlib I_STDLIB
20303 #include <stdlib.h>
20306 printf("%d\n", (int)sizeof($uidtype));
20311 if eval $compile_ok; then
20315 echo "(I can't execute the test program--guessing $uidsize.)" >&4
20318 echo "Your $zzz is $uidsize bytes long."
20323 echo "(I can't compile the test program--guessing $uidsize.)" >&4
20328 *_t) zzz="$uidtype" ;;
20331 echo "Checking the sign of $zzz..." >&4
20333 #include <sys/types.h>
20344 if eval $compile; then
20348 echo "(I can't execute the test program--guessing unsigned.)" >&4
20352 1) echo "Your $zzz is unsigned." ;;
20353 -1) echo "Your $zzz is signed." ;;
20359 echo "(I can't compile the test program--guessing unsigned.)" >&4
20365 $echo "Checking the format string to be used for uids..." >&4
20368 -1) if $test X"$uidsize" = X"$ivsize"; then
20369 uidformat="$ivdformat"
20371 if $test X"$uidsize" = X"$longsize"; then
20374 if $test X"$uidsize" = X"$intsize"; then
20377 if $test X"$uidsize" = X"$shortsize"; then
20384 *) if $test X"$uidsize" = X"$uvsize"; then
20385 uidformat="$uvuformat"
20387 if $test X"$uidsize" = X"$longsize"; then
20390 if $test X"$uidsize" = X"$intsize"; then
20393 if $test X"$uidsize" = X"$shortsize"; then
20403 case "$usesitecustomize" in
20404 $define|true|[Yy]*)
20405 usesitecustomize="$define"
20408 usesitecustomize="$undef"
20412 : determine compiler compiler
20421 if $test -f "$byacc$_exe"; then
20423 comp="byacc or $comp"
20425 if $test -f "$bison$_exe"; then
20426 comp="$comp or bison -y"
20428 rp="Which compiler compiler ($comp) shall I use?"
20437 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
20443 : see if this is a fp.h system
20447 : see if this is a fp_class.h system
20448 set fp_class.h i_fp_class
20451 : see if gdbm.h is available
20456 : see if gdbm_open exists
20457 set gdbm_open d_gdbm_open
20459 case "$d_gdbm_open" in
20462 echo "We won't be including <gdbm.h>"
20471 : see if this is a ieeefp.h system
20472 case "$i_ieeefp" in
20473 '' ) set ieeefp.h i_ieeefp
20478 : see if this is a libutil.h system
20479 set libutil.h i_libutil
20482 : see if mach cthreads are available
20483 if test "X$usethreads" = "X$define"; then
20484 set mach/cthreads.h i_machcthr
20487 i_machcthr="$undef"
20492 : see if this is a mntent.h system
20493 set mntent.h i_mntent
20496 : see if ndbm.h is available
20502 # Some Linux distributions such as RedHat 7.1 put the
20503 # ndbm.h header in /usr/include/gdbm/ndbm.h.
20504 if $test -f /usr/include/gdbm/ndbm.h; then
20505 echo '<gdbm/ndbm.h> found.'
20506 ccflags="$ccflags -I/usr/include/gdbm"
20507 cppflags="$cppflags -I/usr/include/gdbm"
20515 : see if dbm_open exists
20516 set dbm_open d_dbm_open
20518 case "$d_dbm_open" in
20521 echo "We won't be including <ndbm.h>"
20530 : see if net/errno.h is available
20532 set net/errno.h val
20535 : Unfortunately, it causes problems on some systems. Arrgh.
20538 cat > try.c <<'EOM'
20541 #include <net/errno.h>
20547 if $cc $ccflags -c try.c >/dev/null 2>&1; then
20548 echo "We'll be including <net/errno.h>." >&4
20550 echo "We won't be including <net/errno.h>." >&4
20559 : see if netinet/tcp.h is available
20560 set netinet/tcp.h i_netinettcp
20563 : see if this is a poll.h system
20567 : see if this is a prot.h system
20572 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
20573 $cat <<'EOSH' > Cppsym.know
20574 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
20575 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
20576 alliant alpha am29000 AM29000 AMD64 amd64 amiga AMIGAOS AMIX
20577 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
20578 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
20579 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
20580 bull c cadmus clipper CMU COFF COMPILER_VERSION
20581 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
20582 CYGWIN DECC DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
20583 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
20584 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
20586 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
20587 H3050R H3050RX hbullx20 hcx host_mips
20588 hp200 hp300 hp700 HP700 hp800 hp9000
20589 hp9000s200 hp9000s300 hp9000s400 hp9000s500
20590 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
20591 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
20592 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
20593 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
20594 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
20595 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
20596 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
20597 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
20598 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
20599 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
20600 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
20601 MATH_HAS_NO_SIDE_EFFECTS
20602 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
20603 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
20604 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
20605 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
20606 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
20607 NetBSD news1500 news1700 news1800 news1900 news3700
20608 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
20609 ns32016 ns32332 ns32k nsc32000
20610 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
20611 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
20612 pc532 pdp11 PGC PIC plexus PORTAR posix
20613 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
20614 POSIX_C_SOURCE POSIX_SOURCE POWER
20615 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
20616 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
20617 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
20618 sony sony_news sonyrisc sparc sparclite spectrum
20619 stardent stdc STDC_EXT stratos sun sun3 sun386
20620 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
20621 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
20622 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
20623 sysV68 sysV88 Tek4132 Tek4300 titan
20624 TM3200 TM5400 TM5600
20625 tower tower32 tower32_200 tower32_600 tower32_700
20626 tower32_800 tower32_850 tss
20627 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
20628 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
20629 unix UNIX95 UNIX99 unixpc unos
20630 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
20631 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
20632 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
20634 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms x86_64 xenix Xenix286
20635 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
20636 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
20639 # Maybe put other stuff here too.
20640 cat <<EOSH >>Cppsym.know
20643 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
20644 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
20645 $cat Cppsym.know > Cppsym.c
20646 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
20647 $rm -f Cppsym.a Cppsym.b Cppsym.c
20648 cat <<EOSH > Cppsym
20650 if $test \$# -gt 0; then
20651 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
20652 if $test -s Cppsym.got; then
20659 $tr " " "$trnl" | ./Cppsym.try
20665 cat <<EOSH > Cppsym.try
20667 cat <<'EOCP' > try.c
20670 #define STRINGIFY(a) "a"
20672 #if cpp_stuff == 42
20673 #define StGiFy(a) #a
20674 #define STRINGIFY(a) StGiFy(a)
20676 #if $cpp_stuff != 1 && $cpp_stuff != 42
20677 # include "Bletch: How does this C preprocessor stringify macros?"
20683 cat <<'EOSH' >> Cppsym.try
20685 printf "#ifdef %s\nprintf(\"%s=%%s\\n\", STRINGIFY(%s));\n#endif\n", $1, $1, $1
20686 printf "#ifdef _%s\nprintf(\"_%s=%%s\\n\", STRINGIFY(_%s));\n#endif\n", $1, $1, $1
20687 printf "#ifdef __%s\nprintf(\"__%s=%%s\\n\", STRINGIFY(__%s));\n#endif\n", $1, $1, $1
20688 printf "#ifdef __%s__\nprintf(\"__%s__=%%s\\n\", STRINGIFY(__%s__));\n#endif\n", $1, $1, $1
20690 echo 'return 0;}' >> try.c
20692 cat <<EOSH >> Cppsym.try
20694 case "$osname-$gccversion" in
20695 irix-) ccflags="\$ccflags -woff 1178" ;;
20696 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
20698 $cc -o try -Dcpp_stuff=$cpp_stuff $optimize \$ccflags $ldflags try.c $libs && $run ./try | $sed 's/ /\\\\ /g'
20700 chmod +x Cppsym.try
20701 $eunicefix Cppsym.try
20702 ./Cppsym < Cppsym.know > Cppsym.true
20703 : Add in any linux cpp "predefined macros":
20704 case "$osname::$gccversion" in
20707 rm -f $tHdrH'.h' $tHdrH
20709 if cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
20710 sed 's/#define[\ \ ]*//;s/[\ \ ].*$//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
20711 if [ -s $tHdrH'_cppsym.real' ]; then
20712 cat $tHdrH'_cppsym.real' Cppsym.know | sort | uniq | ./Cppsym | sort | uniq > Cppsym.true
20715 rm -f $tHdrH'.h' $tHdrH'_cppsym.h' $tHdrH'_cppsym.real'
20718 : now check the C compiler for additional symbols
20719 postprocess_cc_v=''
20721 aix) postprocess_cc_v="|$tr , ' '" ;;
20728 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
20731 -D*) echo "\$i" | $sed 's/^-D//';;
20732 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
20737 postprocess_cc_v=''
20740 ./ccsym > ccsym1.raw
20741 if $test -s ccsym1.raw; then
20742 $sort ccsym1.raw | $uniq >ccsym.raw
20744 mv ccsym1.raw ccsym.raw
20747 $awk '/\=/ { print $0; next }
20748 { print $0"=1" }' ccsym.raw >ccsym.list
20749 $comm -13 Cppsym.true ccsym.list >ccsym.own
20750 $comm -12 Cppsym.true ccsym.list >ccsym.com
20751 $comm -23 Cppsym.true ccsym.list >ccsym.cpp
20753 if $test -z ccsym.raw; then
20754 echo "Your C compiler doesn't seem to define any symbols!" >&4
20756 echo "However, your C preprocessor defines the following symbols:"
20759 cppsymbols=`$cat Cppsym.true`
20760 cppsymbols=`echo $cppsymbols`
20761 cppccsymbols="$cppsymbols"
20763 if $test -s ccsym.com; then
20764 echo "Your C compiler and pre-processor define these symbols:"
20765 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
20768 cppccsymbols=`$cat ccsym.com`
20769 cppccsymbols=`echo $cppccsymbols`
20770 $test "$silent" || sleep 1
20772 if $test -s ccsym.cpp; then
20773 $test "$also" && echo " "
20774 echo "Your C pre-processor ${also}defines the following symbols:"
20775 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
20777 cppsymbols=`$cat ccsym.cpp`
20778 cppsymbols=`echo $cppsymbols`
20779 $test "$silent" || sleep 1
20781 if $test -s ccsym.own; then
20782 $test "$also" && echo " "
20783 echo "Your C compiler ${also}defines the following cpp symbols:"
20784 $sed -e 's/\(..*\)=1/\1/' ccsym.own
20785 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
20786 ccsymbols=`$cat ccsym.own`
20787 ccsymbols=`echo $ccsymbols`
20788 $test "$silent" || sleep 1
20792 : see if this is a termio system
20796 if $test `./findhdr termios.h`; then
20797 set tcsetattr i_termios
20803 "$define") echo "You have POSIX termios.h... good!" >&4;;
20804 *) if ./Cppsym pyr; then
20805 case "`/bin/universe`" in
20806 ucb) if $test `./findhdr sgtty.h`; then
20808 echo "<sgtty.h> found." >&4
20810 echo "System is pyramid with BSD universe."
20811 echo "<sgtty.h> not found--you could have problems." >&4
20813 *) if $test `./findhdr termio.h`; then
20815 echo "<termio.h> found." >&4
20817 echo "System is pyramid with USG universe."
20818 echo "<termio.h> not found--you could have problems." >&4
20822 if $test `./findhdr termio.h`; then
20823 echo "<termio.h> found." >&4
20825 elif $test `./findhdr sgtty.h`; then
20826 echo "<sgtty.h> found." >&4
20829 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
20832 if $test `./findhdr sgtty.h`; then
20833 echo "<sgtty.h> found." >&4
20835 elif $test `./findhdr termio.h`; then
20836 echo "<termio.h> found." >&4
20839 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
20843 set i_termio; eval $setvar
20844 val=$val2; set i_sgtty; eval $setvar
20845 val=$val3; set i_termios; eval $setvar
20847 : see if stddef is available
20848 set stddef.h i_stddef
20851 : see if this is a sunmath.h system
20852 set sunmath.h i_sunmath
20855 : see if sys/access.h is available
20856 set sys/access.h i_sysaccess
20859 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
20860 set sys/filio.h i_sysfilio
20863 if $test `./findhdr sys/ioctl.h`; then
20865 echo '<sys/ioctl.h> found.' >&4
20868 if $test $i_sysfilio = "$define"; then
20869 echo '<sys/ioctl.h> NOT found.' >&4
20871 $test $i_sgtty = "$define" && xxx="sgtty.h"
20872 $test $i_termio = "$define" && xxx="termio.h"
20873 $test $i_termios = "$define" && xxx="termios.h"
20874 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
20880 : see if socket ioctl defs are in sys/sockio.h
20882 xxx=`./findhdr sys/sockio.h`
20883 if $test "$xxx"; then
20884 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
20886 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
20889 echo "No socket ioctls found in <sys/sockio.h>." >&4
20894 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
20901 : see if this is a syslog.h system
20902 set syslog.h i_syslog
20906 : see if this is a sys/mode.h system
20907 set sys/mode.h i_sysmode
20910 : see if sys/resource.h has to be included
20911 set sys/resource.h i_sysresrc
20914 : see if sys/security.h is available
20915 set sys/security.h i_syssecrt
20918 : see if this is a sys/statvfs.h system
20919 set sys/statvfs.h i_sysstatvfs
20922 : see if this is a sys/un.h system
20923 set sys/un.h i_sysun
20927 : see if this is a sys/utsname.h system
20928 set sys/utsname.h i_sysutsname
20931 : see if this is a syswait system
20932 set sys/wait.h i_syswait
20935 : see if this is a ustat.h system
20936 set ustat.h i_ustat
20939 : see if this is an utime system
20940 set utime.h i_utime
20943 : see if this is a values.h system
20944 set values.h i_values
20947 : see if this is a vfork system
20950 set vfork.h i_vfork
20959 echo "Looking for extensions..." >&4
20960 : If we are using the old config.sh, known_extensions may contain
20961 : old or inaccurate or duplicate values.
20962 known_extensions=''
20963 nonxs_extensions=''
20964 : We do not use find because it might not be available.
20965 : We do not just use MANIFEST because the user may have dropped
20966 : some additional extensions into the source tree and expect them
20969 : Function to recursively find available extensions, ignoring DynaLoader
20970 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
20974 DynaLoader|dynaload) ;;
20976 if $test -f $xxx/$xxx.xs; then
20977 known_extensions="$known_extensions $1$xxx";
20978 elif $test -f $xxx/Makefile.PL; then
20979 nonxs_extensions="$nonxs_extensions $1$xxx";
20981 if $test -d $xxx -a $# -lt 10; then
20984 eval $find_extensions;
20996 eval $find_extensions
20997 # Special case: Add in threads/shared since it is not picked up by the
20998 # recursive find above (and adding in general recursive finding breaks
20999 # SDBM_File/sdbm). A.D. 10/25/2001.
21000 known_extensions="$known_extensions threads/shared"
21001 set X $nonxs_extensions
21003 nonxs_extensions="$*"
21004 set X $known_extensions
21006 known_extensions="$*"
21009 : Now see which are supported on this system.
21011 for xxx in $known_extensions ; do
21015 $define) avail_ext="$avail_ext $xxx" ;;
21018 GDBM_File|gdbm_fil)
21020 $define) avail_ext="$avail_ext $xxx" ;;
21023 I18N/Langinfo|i18n_lan)
21024 case "$i_langinfo$d_nl_langinfo" in
21025 $define$define) avail_ext="$avail_ext $xxx" ;;
21028 NDBM_File|ndbm_fil)
21031 case "$osname-$use64bitint" in
21034 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
21037 *) avail_ext="$avail_ext $xxx" ;;
21042 ODBM_File|odbm_fil)
21043 case "${i_dbm}${i_rpcsvcdbm}" in
21045 case "$osname-$use64bitint" in
21048 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
21051 *) avail_ext="$avail_ext $xxx" ;;
21057 case "$useposix" in
21058 true|define|y) avail_ext="$avail_ext $xxx" ;;
21062 case "$useopcode" in
21063 true|define|y) avail_ext="$avail_ext $xxx" ;;
21067 case "$d_socket" in
21070 beos) ;; # not unless BONE
21071 *) avail_ext="$avail_ext $xxx" ;;
21076 Sys/Syslog|sys/syslog)
21077 : XXX syslog requires socket
21078 case "$d_socket" in
21079 true|$define|y) avail_ext="$avail_ext $xxx" ;;
21083 case "$usethreads" in
21085 case "$useithreads" in
21086 $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
21090 XS/APItest|xs/apitest)
21091 # This is just for testing. Skip it unless we have dynamic loading.
21094 $define) avail_ext="$avail_ext $xxx" ;;
21097 XS/Typemap|xs/typemap)
21098 # This is just for testing. Skip it unless we have dynamic loading.
21100 $define) avail_ext="$avail_ext $xxx" ;;
21103 threads|threads/shared)
21104 # threads and threads::shared are special cases.
21105 # To stop people from asking "Perl 5.8.0 was supposed
21106 # to have this new fancy threads implementation but my
21107 # perl doesn't have it" and from people trying to
21108 # (re)install the threads module using CPAN.pm and
21109 # CPAN.pm then offering to reinstall Perl 5.8.0,
21110 # the threads.pm and threads/shared.pm will always be
21111 # there, croaking informatively ("you need to rebuild
21112 # all of Perl with threads, sorry") when threads haven't
21113 # been compiled in.
21115 avail_ext="$avail_ext $xxx"
21118 : XXX Do we need a useipcsysv variable here
21119 case "${d_msg}${d_sem}${d_shm}" in
21120 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
21123 *) avail_ext="$avail_ext $xxx"
21132 case "$onlyextensions" in
21134 *) keepextensions=''
21135 echo "You have requested that only certains extensions be included..." >&4
21136 for i in $onlyextensions; do
21137 case " $avail_ext " in
21139 echo "Keeping extension $i."
21140 keepextensions="$keepextensions $i"
21142 *) echo "Ignoring extension $i." ;;
21145 avail_ext="$keepextensions"
21149 case "$noextensions" in
21151 *) keepextensions=''
21152 echo "You have requested that certain extensions be ignored..." >&4
21153 for i in $avail_ext; do
21154 case " $noextensions " in
21155 *" $i "*) echo "Ignoring extension $i." ;;
21156 *) echo "Keeping extension $i.";
21157 keepextensions="$keepextensions $i"
21161 avail_ext="$keepextensions"
21165 : Now see which nonxs extensions are supported on this system.
21166 : For now assume all are.
21168 for xxx in $nonxs_extensions ; do
21170 *) nonxs_ext="$nonxs_ext $xxx"
21182 A number of extensions are supplied with $package. You may choose to
21183 compile these extensions for dynamic loading (the default), compile
21184 them into the $package executable (static loading), or not include
21185 them at all. Answer "none" to include no extensions.
21186 Note that DynaLoader is always built and need not be mentioned here.
21189 case "$dynamic_ext" in
21191 : Exclude those listed in static_ext
21193 for xxx in $avail_ext; do
21194 case " $static_ext " in
21196 *) dflt="$dflt $xxx" ;;
21203 *) dflt="$dynamic_ext"
21204 # Perhaps we are reusing an old out-of-date config.sh.
21207 if test X"$dynamic_ext" != X"$avail_ext"; then
21209 NOTICE: Your previous config.sh list may be incorrect.
21210 The extensions now available to you are
21212 but the default list from your previous config.sh is
21224 rp="What extensions do you wish to load dynamically?"
21227 none) dynamic_ext=' ' ;;
21228 *) dynamic_ext="$ans" ;;
21231 case "$static_ext" in
21233 : Exclude those already listed in dynamic linking
21235 for xxx in $avail_ext; do
21236 case " $dynamic_ext " in
21238 *) dflt="$dflt $xxx" ;;
21245 *) dflt="$static_ext"
21252 rp="What extensions do you wish to load statically?"
21255 none) static_ext=' ' ;;
21256 *) static_ext="$ans" ;;
21261 A number of extensions are supplied with $package. Answer "none"
21262 to include no extensions.
21263 Note that DynaLoader is always built and need not be mentioned here.
21266 case "$static_ext" in
21267 '') dflt="$avail_ext" ;;
21268 *) dflt="$static_ext"
21269 # Perhaps we are reusing an old out-of-date config.sh.
21272 if test X"$static_ext" != X"$avail_ext"; then
21274 NOTICE: Your previous config.sh list may be incorrect.
21275 The extensions now available to you are
21277 but the default list from your previous config.sh is
21286 : Exclude those that are not xs extensions
21290 rp="What extensions do you wish to include?"
21293 none) static_ext=' ' ;;
21294 *) static_ext="$ans" ;;
21299 # Encode is a special case. If we are building Encode as a static
21300 # extension, we need to explicitly list its subextensions as well.
21301 # For other nested extensions, this is handled automatically by
21302 # the appropriate Makefile.PL.
21303 case " $static_ext " in
21304 *" Encode "*) # Add the subextensions of Encode
21306 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
21307 static_ext="$static_ext Encode/$xxx"
21313 set X $dynamic_ext $static_ext $nonxs_ext
21317 # Sanity check: We require an extension suitable for use with
21318 # AnyDBM_File, as well as Fcntl and IO. (Failure to have these
21319 # should show up as failures in the test suite, but it's helpful to
21320 # catch them now.) The 'extensions' list is normally sorted
21321 # alphabetically, so we need to accept either
21322 # DB_File ... Fcntl ... IO ....
21323 # or something like
21324 # Fcntl ... NDBM_File ... IO ....
21325 case " $extensions" in
21326 *"_File "*" Fcntl "*" IO "*) ;; # DB_File
21327 *" Fcntl "*"_File "*" IO "*) ;; # GDBM_File
21328 *" Fcntl "*" IO "*"_File "*) ;; # NDBM_File
21329 *) echo "WARNING: Extensions DB_File or *DBM_File, Fcntl, and IO not configured." >&4
21330 echo "WARNING: The Perl you are building will be quite crippled." >& 4
21334 : Remove libraries needed only for extensions
21335 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
21336 : The exception is SunOS 4.x, which needs them.
21337 case "${osname}X${osvers}" in
21341 *) case "$usedl" in
21342 $define|true|[yY]*)
21343 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
21347 *) perllibs="$libs"
21353 : Remove build directory name from cppstdin so it can be used from
21354 : either the present location or the final installed location.
21356 : Get out of the UU directory to get correct path name.
21358 case "$cppstdin" in
21360 echo "Stripping down cppstdin path name"
21366 : end of configuration questions
21368 echo "End of configuration questions."
21371 : back to where it started
21372 if test -d ../UU; then
21376 : configuration may be patched via a 'config.arch' file
21377 if $test -f config.arch; then
21378 echo "I see a config.arch file, loading it."
21382 : configuration may be patched via a 'config.over' file
21383 if $test -f config.over; then
21386 rp='I see a config.over file. Do you wish to load it?'
21389 n*) echo "OK, I'll ignore it.";;
21391 echo "Configuration override changes have been loaded."
21396 : in case they want portability, strip down executable paths
21397 case "$d_portable" in
21400 echo "Stripping down executable paths..." >&4
21401 for file in $loclist $trylist; do
21403 eval $file=`basename $temp`
21408 : create config.sh file
21410 echo "Creating config.sh..." >&4
21411 $spitshell <<EOT >config.sh
21414 # This file was produced by running the Configure script. It holds all the
21415 # definitions figured out by Configure. Should you modify one of these values,
21416 # do not forget to propagate your changes by running "Configure -der". You may
21417 # instead choose to run each of the .SH files by yourself, or "Configure -S".
21420 # Package name : $package
21421 # Source directory : $src
21422 # Configuration time: $cf_time
21423 # Configured by : $cf_by
21424 # Target system : $myuname
21434 Revision='$Revision'
21442 alignbytes='$alignbytes'
21443 ansi2knr='$ansi2knr'
21444 aphostname='$aphostname'
21445 api_revision='$api_revision'
21446 api_subversion='$api_subversion'
21447 api_version='$api_version'
21448 api_versionstring='$api_versionstring'
21451 archlibexp='$archlibexp'
21452 archname64='$archname64'
21453 archname='$archname'
21454 archobjs='$archobjs'
21455 asctime_r_proto='$asctime_r_proto'
21463 byteorder='$byteorder'
21465 castflags='$castflags'
21468 cccdlflags='$cccdlflags'
21469 ccdlflags='$ccdlflags'
21471 ccflags_uselargefiles='$ccflags_uselargefiles'
21473 ccsymbols='$ccsymbols'
21474 ccversion='$ccversion'
21476 cf_email='$cf_email'
21478 charsize='$charsize'
21482 clocktype='$clocktype'
21484 compress='$compress'
21485 contains='$contains'
21489 cpp_stuff='$cpp_stuff'
21490 cppccsymbols='$cppccsymbols'
21491 cppflags='$cppflags'
21493 cppminus='$cppminus'
21495 cppstdin='$cppstdin'
21496 cppsymbols='$cppsymbols'
21497 crypt_r_proto='$crypt_r_proto'
21498 cryptlib='$cryptlib'
21500 ctermid_r_proto='$ctermid_r_proto'
21501 ctime_r_proto='$ctime_r_proto'
21502 d_Gconvert='$d_Gconvert'
21503 d_PRIEUldbl='$d_PRIEUldbl'
21504 d_PRIFUldbl='$d_PRIFUldbl'
21505 d_PRIGUldbl='$d_PRIGUldbl'
21506 d_PRIXU64='$d_PRIXU64'
21507 d_PRId64='$d_PRId64'
21508 d_PRIeldbl='$d_PRIeldbl'
21509 d_PRIfldbl='$d_PRIfldbl'
21510 d_PRIgldbl='$d_PRIgldbl'
21511 d_PRIi64='$d_PRIi64'
21512 d_PRIo64='$d_PRIo64'
21513 d_PRIu64='$d_PRIu64'
21514 d_PRIx64='$d_PRIx64'
21515 d_SCNfldbl='$d_SCNfldbl'
21516 d__fwalk='$d__fwalk'
21517 d_access='$d_access'
21518 d_accessx='$d_accessx'
21521 d_archlib='$d_archlib'
21522 d_asctime_r='$d_asctime_r'
21525 d_attribute_format='$d_attribute_format'
21526 d_attribute_malloc='$d_attribute_malloc'
21527 d_attribute_nonnull='$d_attribute_nonnull'
21528 d_attribute_noreturn='$d_attribute_noreturn'
21529 d_attribute_pure='$d_attribute_pure'
21530 d_attribute_unused='$d_attribute_unused'
21531 d_attribute_warn_unused_result='$d_attribute_warn_unused_result'
21535 d_bsdgetpgrp='$d_bsdgetpgrp'
21536 d_bsdsetpgrp='$d_bsdsetpgrp'
21537 d_builtin_choose_expr='$d_builtin_choose_expr'
21538 d_builtin_expect='$d_builtin_expect'
21540 d_c99_variadic_macros='$d_c99_variadic_macros'
21541 d_casti32='$d_casti32'
21542 d_castneg='$d_castneg'
21543 d_charvspr='$d_charvspr'
21545 d_chroot='$d_chroot'
21546 d_chsize='$d_chsize'
21548 d_clearenv='$d_clearenv'
21549 d_closedir='$d_closedir'
21550 d_cmsghdr_s='$d_cmsghdr_s'
21552 d_copysignl='$d_copysignl'
21553 d_cplusplus='$d_cplusplus'
21555 d_crypt_r='$d_crypt_r'
21557 d_ctermid='$d_ctermid'
21558 d_ctermid_r='$d_ctermid_r'
21559 d_ctime_r='$d_ctime_r'
21560 d_cuserid='$d_cuserid'
21561 d_dbl_dig='$d_dbl_dig'
21562 d_dbminitproto='$d_dbminitproto'
21563 d_difftime='$d_difftime'
21564 d_dir_dd_fd='$d_dir_dd_fd'
21566 d_dirnamlen='$d_dirnamlen'
21567 d_dlerror='$d_dlerror'
21568 d_dlopen='$d_dlopen'
21569 d_dlsymun='$d_dlsymun'
21570 d_dosuid='$d_dosuid'
21571 d_drand48_r='$d_drand48_r'
21572 d_drand48proto='$d_drand48proto'
21574 d_eaccess='$d_eaccess'
21575 d_endgrent='$d_endgrent'
21576 d_endgrent_r='$d_endgrent_r'
21577 d_endhent='$d_endhent'
21578 d_endhostent_r='$d_endhostent_r'
21579 d_endnent='$d_endnent'
21580 d_endnetent_r='$d_endnetent_r'
21581 d_endpent='$d_endpent'
21582 d_endprotoent_r='$d_endprotoent_r'
21583 d_endpwent='$d_endpwent'
21584 d_endpwent_r='$d_endpwent_r'
21585 d_endsent='$d_endsent'
21586 d_endservent_r='$d_endservent_r'
21587 d_eofnblk='$d_eofnblk'
21588 d_eunice='$d_eunice'
21589 d_faststdio='$d_faststdio'
21590 d_fchdir='$d_fchdir'
21591 d_fchmod='$d_fchmod'
21592 d_fchown='$d_fchown'
21594 d_fcntl_can_lock='$d_fcntl_can_lock'
21595 d_fd_macros='$d_fd_macros'
21596 d_fd_set='$d_fd_set'
21597 d_fds_bits='$d_fds_bits'
21598 d_fgetpos='$d_fgetpos'
21599 d_finite='$d_finite'
21600 d_finitel='$d_finitel'
21601 d_flexfnam='$d_flexfnam'
21603 d_flockproto='$d_flockproto'
21605 d_fp_class='$d_fp_class'
21606 d_fpathconf='$d_fpathconf'
21607 d_fpclass='$d_fpclass'
21608 d_fpclassify='$d_fpclassify'
21609 d_fpclassl='$d_fpclassl'
21610 d_fpos64_t='$d_fpos64_t'
21611 d_frexpl='$d_frexpl'
21612 d_fs_data_s='$d_fs_data_s'
21613 d_fseeko='$d_fseeko'
21614 d_fsetpos='$d_fsetpos'
21615 d_fstatfs='$d_fstatfs'
21616 d_fstatvfs='$d_fstatvfs'
21618 d_ftello='$d_ftello'
21620 d_futimes='$d_futimes'
21621 d_getcwd='$d_getcwd'
21622 d_getespwnam='$d_getespwnam'
21623 d_getfsstat='$d_getfsstat'
21624 d_getgrent='$d_getgrent'
21625 d_getgrent_r='$d_getgrent_r'
21626 d_getgrgid_r='$d_getgrgid_r'
21627 d_getgrnam_r='$d_getgrnam_r'
21628 d_getgrps='$d_getgrps'
21629 d_gethbyaddr='$d_gethbyaddr'
21630 d_gethbyname='$d_gethbyname'
21631 d_gethent='$d_gethent'
21632 d_gethname='$d_gethname'
21633 d_gethostbyaddr_r='$d_gethostbyaddr_r'
21634 d_gethostbyname_r='$d_gethostbyname_r'
21635 d_gethostent_r='$d_gethostent_r'
21636 d_gethostprotos='$d_gethostprotos'
21637 d_getitimer='$d_getitimer'
21638 d_getlogin='$d_getlogin'
21639 d_getlogin_r='$d_getlogin_r'
21640 d_getmnt='$d_getmnt'
21641 d_getmntent='$d_getmntent'
21642 d_getnbyaddr='$d_getnbyaddr'
21643 d_getnbyname='$d_getnbyname'
21644 d_getnent='$d_getnent'
21645 d_getnetbyaddr_r='$d_getnetbyaddr_r'
21646 d_getnetbyname_r='$d_getnetbyname_r'
21647 d_getnetent_r='$d_getnetent_r'
21648 d_getnetprotos='$d_getnetprotos'
21649 d_getpagsz='$d_getpagsz'
21650 d_getpbyname='$d_getpbyname'
21651 d_getpbynumber='$d_getpbynumber'
21652 d_getpent='$d_getpent'
21653 d_getpgid='$d_getpgid'
21654 d_getpgrp2='$d_getpgrp2'
21655 d_getpgrp='$d_getpgrp'
21656 d_getppid='$d_getppid'
21657 d_getprior='$d_getprior'
21658 d_getprotobyname_r='$d_getprotobyname_r'
21659 d_getprotobynumber_r='$d_getprotobynumber_r'
21660 d_getprotoent_r='$d_getprotoent_r'
21661 d_getprotoprotos='$d_getprotoprotos'
21662 d_getprpwnam='$d_getprpwnam'
21663 d_getpwent='$d_getpwent'
21664 d_getpwent_r='$d_getpwent_r'
21665 d_getpwnam_r='$d_getpwnam_r'
21666 d_getpwuid_r='$d_getpwuid_r'
21667 d_getsbyname='$d_getsbyname'
21668 d_getsbyport='$d_getsbyport'
21669 d_getsent='$d_getsent'
21670 d_getservbyname_r='$d_getservbyname_r'
21671 d_getservbyport_r='$d_getservbyport_r'
21672 d_getservent_r='$d_getservent_r'
21673 d_getservprotos='$d_getservprotos'
21674 d_getspnam='$d_getspnam'
21675 d_getspnam_r='$d_getspnam_r'
21676 d_gettimeod='$d_gettimeod'
21677 d_gmtime_r='$d_gmtime_r'
21678 d_gnulibc='$d_gnulibc'
21679 d_grpasswd='$d_grpasswd'
21680 d_hasmntopt='$d_hasmntopt'
21682 d_ilogbl='$d_ilogbl'
21683 d_inc_version_list='$d_inc_version_list'
21685 d_inetaton='$d_inetaton'
21686 d_int64_t='$d_int64_t'
21687 d_isascii='$d_isascii'
21688 d_isfinite='$d_isfinite'
21691 d_isnanl='$d_isnanl'
21692 d_killpg='$d_killpg'
21693 d_lchown='$d_lchown'
21694 d_ldbl_dig='$d_ldbl_dig'
21695 d_libm_lib_version='$d_libm_lib_version'
21697 d_localtime_r='$d_localtime_r'
21698 d_localtime_r_needs_tzset='$d_localtime_r_needs_tzset'
21699 d_locconv='$d_locconv'
21701 d_longdbl='$d_longdbl'
21702 d_longlong='$d_longlong'
21703 d_lseekproto='$d_lseekproto'
21705 d_madvise='$d_madvise'
21706 d_malloc_good_size='$d_malloc_good_size'
21707 d_malloc_size='$d_malloc_size'
21709 d_mbstowcs='$d_mbstowcs'
21710 d_mbtowc='$d_mbtowc'
21711 d_memchr='$d_memchr'
21712 d_memcmp='$d_memcmp'
21713 d_memcpy='$d_memcpy'
21714 d_memmove='$d_memmove'
21715 d_memset='$d_memset'
21717 d_mkdtemp='$d_mkdtemp'
21718 d_mkfifo='$d_mkfifo'
21719 d_mkstemp='$d_mkstemp'
21720 d_mkstemps='$d_mkstemps'
21721 d_mktime='$d_mktime'
21724 d_modfl_pow32_bug='$d_modfl_pow32_bug'
21725 d_modflproto='$d_modflproto'
21726 d_mprotect='$d_mprotect'
21728 d_msg_ctrunc='$d_msg_ctrunc'
21729 d_msg_dontroute='$d_msg_dontroute'
21730 d_msg_oob='$d_msg_oob'
21731 d_msg_peek='$d_msg_peek'
21732 d_msg_proxy='$d_msg_proxy'
21733 d_msgctl='$d_msgctl'
21734 d_msgget='$d_msgget'
21735 d_msghdr_s='$d_msghdr_s'
21736 d_msgrcv='$d_msgrcv'
21737 d_msgsnd='$d_msgsnd'
21739 d_munmap='$d_munmap'
21740 d_mymalloc='$d_mymalloc'
21742 d_nl_langinfo='$d_nl_langinfo'
21743 d_nv_preserves_uv='$d_nv_preserves_uv'
21744 d_nv_zero_is_allbits_zero='$d_nv_zero_is_allbits_zero'
21745 d_off64_t='$d_off64_t'
21746 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
21747 d_oldpthreads='$d_oldpthreads'
21748 d_oldsock='$d_oldsock'
21750 d_pathconf='$d_pathconf'
21752 d_perl_otherlibdirs='$d_perl_otherlibdirs'
21753 d_phostname='$d_phostname'
21756 d_portable='$d_portable'
21757 d_printf_format_null='$d_printf_format_null'
21758 d_procselfexe='$d_procselfexe'
21759 d_pthread_atfork='$d_pthread_atfork'
21760 d_pthread_attr_setscope='$d_pthread_attr_setscope'
21761 d_pthread_yield='$d_pthread_yield'
21763 d_pwchange='$d_pwchange'
21764 d_pwclass='$d_pwclass'
21765 d_pwcomment='$d_pwcomment'
21766 d_pwexpire='$d_pwexpire'
21767 d_pwgecos='$d_pwgecos'
21768 d_pwpasswd='$d_pwpasswd'
21769 d_pwquota='$d_pwquota'
21772 d_random_r='$d_random_r'
21773 d_readdir64_r='$d_readdir64_r'
21774 d_readdir='$d_readdir'
21775 d_readdir_r='$d_readdir_r'
21776 d_readlink='$d_readlink'
21778 d_recvmsg='$d_recvmsg'
21779 d_rename='$d_rename'
21780 d_rewinddir='$d_rewinddir'
21782 d_safebcpy='$d_safebcpy'
21783 d_safemcpy='$d_safemcpy'
21784 d_sanemcmp='$d_sanemcmp'
21785 d_sbrkproto='$d_sbrkproto'
21786 d_scalbnl='$d_scalbnl'
21787 d_sched_yield='$d_sched_yield'
21788 d_scm_rights='$d_scm_rights'
21789 d_seekdir='$d_seekdir'
21790 d_select='$d_select'
21792 d_semctl='$d_semctl'
21793 d_semctl_semid_ds='$d_semctl_semid_ds'
21794 d_semctl_semun='$d_semctl_semun'
21795 d_semget='$d_semget'
21797 d_sendmsg='$d_sendmsg'
21798 d_setegid='$d_setegid'
21799 d_seteuid='$d_seteuid'
21800 d_setgrent='$d_setgrent'
21801 d_setgrent_r='$d_setgrent_r'
21802 d_setgrps='$d_setgrps'
21803 d_sethent='$d_sethent'
21804 d_sethostent_r='$d_sethostent_r'
21805 d_setitimer='$d_setitimer'
21806 d_setlinebuf='$d_setlinebuf'
21807 d_setlocale='$d_setlocale'
21808 d_setlocale_r='$d_setlocale_r'
21809 d_setnent='$d_setnent'
21810 d_setnetent_r='$d_setnetent_r'
21811 d_setpent='$d_setpent'
21812 d_setpgid='$d_setpgid'
21813 d_setpgrp2='$d_setpgrp2'
21814 d_setpgrp='$d_setpgrp'
21815 d_setprior='$d_setprior'
21816 d_setproctitle='$d_setproctitle'
21817 d_setprotoent_r='$d_setprotoent_r'
21818 d_setpwent='$d_setpwent'
21819 d_setpwent_r='$d_setpwent_r'
21820 d_setregid='$d_setregid'
21821 d_setresgid='$d_setresgid'
21822 d_setresuid='$d_setresuid'
21823 d_setreuid='$d_setreuid'
21824 d_setrgid='$d_setrgid'
21825 d_setruid='$d_setruid'
21826 d_setsent='$d_setsent'
21827 d_setservent_r='$d_setservent_r'
21828 d_setsid='$d_setsid'
21829 d_setvbuf='$d_setvbuf'
21833 d_shmatprototype='$d_shmatprototype'
21834 d_shmctl='$d_shmctl'
21836 d_shmget='$d_shmget'
21837 d_sigaction='$d_sigaction'
21838 d_sigprocmask='$d_sigprocmask'
21839 d_sigsetjmp='$d_sigsetjmp'
21840 d_sitearch='$d_sitearch'
21841 d_snprintf='$d_snprintf'
21842 d_sockatmark='$d_sockatmark'
21843 d_sockatmarkproto='$d_sockatmarkproto'
21844 d_socket='$d_socket'
21845 d_socklen_t='$d_socklen_t'
21846 d_sockpair='$d_sockpair'
21847 d_socks5_init='$d_socks5_init'
21848 d_sprintf_returns_strlen='$d_sprintf_returns_strlen'
21850 d_srand48_r='$d_srand48_r'
21851 d_srandom_r='$d_srandom_r'
21852 d_sresgproto='$d_sresgproto'
21853 d_sresuproto='$d_sresuproto'
21854 d_statblks='$d_statblks'
21855 d_statfs_f_flags='$d_statfs_f_flags'
21856 d_statfs_s='$d_statfs_s'
21857 d_statvfs='$d_statvfs'
21858 d_stdio_cnt_lval='$d_stdio_cnt_lval'
21859 d_stdio_ptr_lval='$d_stdio_ptr_lval'
21860 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
21861 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
21862 d_stdio_stream_array='$d_stdio_stream_array'
21863 d_stdiobase='$d_stdiobase'
21864 d_stdstdio='$d_stdstdio'
21865 d_strchr='$d_strchr'
21866 d_strcoll='$d_strcoll'
21867 d_strctcpy='$d_strctcpy'
21868 d_strerrm='$d_strerrm'
21869 d_strerror='$d_strerror'
21870 d_strerror_r='$d_strerror_r'
21871 d_strftime='$d_strftime'
21872 d_strlcat='$d_strlcat'
21873 d_strlcpy='$d_strlcpy'
21874 d_strtod='$d_strtod'
21875 d_strtol='$d_strtol'
21876 d_strtold='$d_strtold'
21877 d_strtoll='$d_strtoll'
21878 d_strtoq='$d_strtoq'
21879 d_strtoul='$d_strtoul'
21880 d_strtoull='$d_strtoull'
21881 d_strtouq='$d_strtouq'
21882 d_strxfrm='$d_strxfrm'
21883 d_suidsafe='$d_suidsafe'
21884 d_symlink='$d_symlink'
21885 d_syscall='$d_syscall'
21886 d_syscallproto='$d_syscallproto'
21887 d_sysconf='$d_sysconf'
21888 d_sysernlst='$d_sysernlst'
21889 d_syserrlst='$d_syserrlst'
21890 d_system='$d_system'
21891 d_tcgetpgrp='$d_tcgetpgrp'
21892 d_tcsetpgrp='$d_tcsetpgrp'
21893 d_telldir='$d_telldir'
21894 d_telldirproto='$d_telldirproto'
21897 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
21898 d_tm_tm_zone='$d_tm_tm_zone'
21899 d_tmpnam_r='$d_tmpnam_r'
21900 d_truncate='$d_truncate'
21901 d_ttyname_r='$d_ttyname_r'
21902 d_tzname='$d_tzname'
21903 d_u32align='$d_u32align'
21904 d_ualarm='$d_ualarm'
21907 d_union_semun='$d_union_semun'
21908 d_unordered='$d_unordered'
21909 d_unsetenv='$d_unsetenv'
21910 d_usleep='$d_usleep'
21911 d_usleepproto='$d_usleepproto'
21913 d_vendorarch='$d_vendorarch'
21914 d_vendorbin='$d_vendorbin'
21915 d_vendorlib='$d_vendorlib'
21916 d_vendorscript='$d_vendorscript'
21918 d_void_closedir='$d_void_closedir'
21919 d_voidsig='$d_voidsig'
21920 d_voidtty='$d_voidtty'
21921 d_volatile='$d_volatile'
21922 d_vprintf='$d_vprintf'
21923 d_vsnprintf='$d_vsnprintf'
21925 d_waitpid='$d_waitpid'
21926 d_wcstombs='$d_wcstombs'
21927 d_wctomb='$d_wctomb'
21928 d_writev='$d_writev'
21931 db_hashtype='$db_hashtype'
21932 db_prefixtype='$db_prefixtype'
21933 db_version_major='$db_version_major'
21934 db_version_minor='$db_version_minor'
21935 db_version_patch='$db_version_patch'
21936 defvoidused='$defvoidused'
21937 direntrytype='$direntrytype'
21940 doublesize='$doublesize'
21942 drand48_r_proto='$drand48_r_proto'
21943 dynamic_ext='$dynamic_ext'
21949 endgrent_r_proto='$endgrent_r_proto'
21950 endhostent_r_proto='$endhostent_r_proto'
21951 endnetent_r_proto='$endnetent_r_proto'
21952 endprotoent_r_proto='$endprotoent_r_proto'
21953 endpwent_r_proto='$endpwent_r_proto'
21954 endservent_r_proto='$endservent_r_proto'
21955 eunicefix='$eunicefix'
21958 extensions='$extensions'
21960 fflushNULL='$fflushNULL'
21961 fflushall='$fflushall'
21963 firstmakefile='$firstmakefile'
21965 fpossize='$fpossize'
21966 fpostype='$fpostype'
21967 freetype='$freetype'
21970 full_csh='$full_csh'
21971 full_sed='$full_sed'
21972 gccansipedantic='$gccansipedantic'
21973 gccosandvers='$gccosandvers'
21974 gccversion='$gccversion'
21975 getgrent_r_proto='$getgrent_r_proto'
21976 getgrgid_r_proto='$getgrgid_r_proto'
21977 getgrnam_r_proto='$getgrnam_r_proto'
21978 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
21979 gethostbyname_r_proto='$gethostbyname_r_proto'
21980 gethostent_r_proto='$gethostent_r_proto'
21981 getlogin_r_proto='$getlogin_r_proto'
21982 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
21983 getnetbyname_r_proto='$getnetbyname_r_proto'
21984 getnetent_r_proto='$getnetent_r_proto'
21985 getprotobyname_r_proto='$getprotobyname_r_proto'
21986 getprotobynumber_r_proto='$getprotobynumber_r_proto'
21987 getprotoent_r_proto='$getprotoent_r_proto'
21988 getpwent_r_proto='$getpwent_r_proto'
21989 getpwnam_r_proto='$getpwnam_r_proto'
21990 getpwuid_r_proto='$getpwuid_r_proto'
21991 getservbyname_r_proto='$getservbyname_r_proto'
21992 getservbyport_r_proto='$getservbyport_r_proto'
21993 getservent_r_proto='$getservent_r_proto'
21994 getspnam_r_proto='$getspnam_r_proto'
21995 gidformat='$gidformat'
22001 gmtime_r_proto='$gmtime_r_proto'
22002 gnulibc_version='$gnulibc_version'
22004 groupcat='$groupcat'
22005 groupstype='$groupstype'
22008 h_sysfile='$h_sysfile'
22011 html1dir='$html1dir'
22012 html1direxp='$html1direxp'
22013 html3dir='$html3dir'
22014 html3direxp='$html3direxp'
22023 i_arpainet='$i_arpainet'
22024 i_bsdioctl='$i_bsdioctl'
22028 i_dirent='$i_dirent'
22034 i_fp_class='$i_fp_class'
22037 i_ieeefp='$i_ieeefp'
22038 i_inttypes='$i_inttypes'
22039 i_langinfo='$i_langinfo'
22040 i_libutil='$i_libutil'
22041 i_limits='$i_limits'
22042 i_locale='$i_locale'
22043 i_machcthr='$i_machcthr'
22044 i_malloc='$i_malloc'
22046 i_memory='$i_memory'
22047 i_mntent='$i_mntent'
22050 i_neterrno='$i_neterrno'
22051 i_netinettcp='$i_netinettcp'
22055 i_pthread='$i_pthread'
22057 i_rpcsvcdbm='$i_rpcsvcdbm'
22060 i_shadow='$i_shadow'
22062 i_stdarg='$i_stdarg'
22063 i_stddef='$i_stddef'
22064 i_stdlib='$i_stdlib'
22065 i_string='$i_string'
22066 i_sunmath='$i_sunmath'
22067 i_sysaccess='$i_sysaccess'
22068 i_sysdir='$i_sysdir'
22069 i_sysfile='$i_sysfile'
22070 i_sysfilio='$i_sysfilio'
22072 i_sysioctl='$i_sysioctl'
22073 i_syslog='$i_syslog'
22074 i_sysmman='$i_sysmman'
22075 i_sysmode='$i_sysmode'
22076 i_sysmount='$i_sysmount'
22077 i_sysndir='$i_sysndir'
22078 i_sysparam='$i_sysparam'
22079 i_sysresrc='$i_sysresrc'
22080 i_syssecrt='$i_syssecrt'
22081 i_sysselct='$i_sysselct'
22082 i_syssockio='$i_syssockio'
22083 i_sysstat='$i_sysstat'
22084 i_sysstatfs='$i_sysstatfs'
22085 i_sysstatvfs='$i_sysstatvfs'
22086 i_systime='$i_systime'
22087 i_systimek='$i_systimek'
22088 i_systimes='$i_systimes'
22089 i_systypes='$i_systypes'
22090 i_sysuio='$i_sysuio'
22092 i_sysutsname='$i_sysutsname'
22093 i_sysvfs='$i_sysvfs'
22094 i_syswait='$i_syswait'
22095 i_termio='$i_termio'
22096 i_termios='$i_termios'
22098 i_unistd='$i_unistd'
22101 i_values='$i_values'
22102 i_varargs='$i_varargs'
22103 i_varhdr='$i_varhdr'
22105 ignore_versioned_solibs='$ignore_versioned_solibs'
22106 inc_version_list='$inc_version_list'
22107 inc_version_list_init='$inc_version_list_init'
22110 initialinstalllocation='$initialinstalllocation'
22111 installarchlib='$installarchlib'
22112 installbin='$installbin'
22113 installhtml1dir='$installhtml1dir'
22114 installhtml3dir='$installhtml3dir'
22115 installman1dir='$installman1dir'
22116 installman3dir='$installman3dir'
22117 installprefix='$installprefix'
22118 installprefixexp='$installprefixexp'
22119 installprivlib='$installprivlib'
22120 installscript='$installscript'
22121 installsitearch='$installsitearch'
22122 installsitebin='$installsitebin'
22123 installsitehtml1dir='$installsitehtml1dir'
22124 installsitehtml3dir='$installsitehtml3dir'
22125 installsitelib='$installsitelib'
22126 installsiteman1dir='$installsiteman1dir'
22127 installsiteman3dir='$installsiteman3dir'
22128 installsitescript='$installsitescript'
22129 installstyle='$installstyle'
22130 installusrbinperl='$installusrbinperl'
22131 installvendorarch='$installvendorarch'
22132 installvendorbin='$installvendorbin'
22133 installvendorhtml1dir='$installvendorhtml1dir'
22134 installvendorhtml3dir='$installvendorhtml3dir'
22135 installvendorlib='$installvendorlib'
22136 installvendorman1dir='$installvendorman1dir'
22137 installvendorman3dir='$installvendorman3dir'
22138 installvendorscript='$installvendorscript'
22140 issymlink='$issymlink'
22141 ivdformat='$ivdformat'
22144 known_extensions='$known_extensions'
22147 lddlflags='$lddlflags'
22149 ldflags_uselargefiles='$ldflags_uselargefiles'
22150 ldlibpthname='$ldlibpthname'
22157 libsdirs='$libsdirs'
22158 libsfiles='$libsfiles'
22159 libsfound='$libsfound'
22160 libspath='$libspath'
22161 libswanted='$libswanted'
22162 libswanted_uselargefiles='$libswanted_uselargefiles'
22168 localtime_r_proto='$localtime_r_proto'
22169 locincpth='$locincpth'
22170 loclibpth='$loclibpth'
22171 longdblsize='$longdblsize'
22172 longlongsize='$longlongsize'
22173 longsize='$longsize'
22177 lseeksize='$lseeksize'
22178 lseektype='$lseektype'
22181 madlyobj='$madlyobj'
22182 madlysrc='$madlysrc'
22186 make_set_make='$make_set_make'
22187 mallocobj='$mallocobj'
22188 mallocsrc='$mallocsrc'
22189 malloctype='$malloctype'
22191 man1direxp='$man1direxp'
22194 man3direxp='$man3direxp'
22196 mips_type='$mips_type'
22197 mistrustnm='$mistrustnm'
22199 mmaptype='$mmaptype'
22200 modetype='$modetype'
22202 multiarch='$multiarch'
22204 myarchname='$myarchname'
22205 mydomain='$mydomain'
22206 myhostname='$myhostname'
22209 need_va_copy='$need_va_copy'
22210 netdb_hlen_type='$netdb_hlen_type'
22211 netdb_host_type='$netdb_host_type'
22212 netdb_name_type='$netdb_name_type'
22213 netdb_net_type='$netdb_net_type'
22216 nm_so_opt='$nm_so_opt'
22217 nonxs_ext='$nonxs_ext'
22219 nvEUformat='$nvEUformat'
22220 nvFUformat='$nvFUformat'
22221 nvGUformat='$nvGUformat'
22222 nv_preserves_uv_bits='$nv_preserves_uv_bits'
22223 nveformat='$nveformat'
22224 nvfformat='$nvfformat'
22225 nvgformat='$nvgformat'
22228 o_nonblock='$o_nonblock'
22230 old_pthread_create_joinable='$old_pthread_create_joinable'
22231 optimize='$optimize'
22232 orderlib='$orderlib'
22235 otherlibdirs='$otherlibdirs'
22239 patchlevel='$patchlevel'
22240 path_sep='$path_sep'
22243 perl_patchlevel='$perl_patchlevel'
22244 perladmin='$perladmin'
22245 perllibs='$perllibs'
22246 perlpath='$perlpath'
22248 phostname='$phostname'
22254 prefixexp='$prefixexp'
22256 privlibexp='$privlibexp'
22257 procselfexe='$procselfexe'
22258 prototype='$prototype'
22260 quadkind='$quadkind'
22261 quadtype='$quadtype'
22262 randbits='$randbits'
22263 randfunc='$randfunc'
22264 random_r_proto='$random_r_proto'
22265 randseedtype='$randseedtype'
22267 rd_nodata='$rd_nodata'
22268 readdir64_r_proto='$readdir64_r_proto'
22269 readdir_r_proto='$readdir_r_proto'
22270 revision='$revision'
22275 sPRIEUldbl='$sPRIEUldbl'
22276 sPRIFUldbl='$sPRIFUldbl'
22277 sPRIGUldbl='$sPRIGUldbl'
22278 sPRIXU64='$sPRIXU64'
22280 sPRIeldbl='$sPRIeldbl'
22281 sPRIfldbl='$sPRIfldbl'
22282 sPRIgldbl='$sPRIgldbl'
22287 sSCNfldbl='$sSCNfldbl'
22288 sched_yield='$sched_yield'
22289 scriptdir='$scriptdir'
22290 scriptdirexp='$scriptdirexp'
22292 seedfunc='$seedfunc'
22293 selectminbits='$selectminbits'
22294 selecttype='$selecttype'
22295 sendmail='$sendmail'
22296 setgrent_r_proto='$setgrent_r_proto'
22297 sethostent_r_proto='$sethostent_r_proto'
22298 setlocale_r_proto='$setlocale_r_proto'
22299 setnetent_r_proto='$setnetent_r_proto'
22300 setprotoent_r_proto='$setprotoent_r_proto'
22301 setpwent_r_proto='$setpwent_r_proto'
22302 setservent_r_proto='$setservent_r_proto'
22305 sharpbang='$sharpbang'
22306 shmattype='$shmattype'
22307 shortsize='$shortsize'
22310 sig_count='$sig_count'
22311 sig_name='$sig_name'
22312 sig_name_init='$sig_name_init'
22314 sig_num_init='$sig_num_init'
22315 sig_size='$sig_size'
22316 signal_t='$signal_t'
22317 sitearch='$sitearch'
22318 sitearchexp='$sitearchexp'
22320 sitebinexp='$sitebinexp'
22321 sitehtml1dir='$sitehtml1dir'
22322 sitehtml1direxp='$sitehtml1direxp'
22323 sitehtml3dir='$sitehtml3dir'
22324 sitehtml3direxp='$sitehtml3direxp'
22326 sitelib_stem='$sitelib_stem'
22327 sitelibexp='$sitelibexp'
22328 siteman1dir='$siteman1dir'
22329 siteman1direxp='$siteman1direxp'
22330 siteman3dir='$siteman3dir'
22331 siteman3direxp='$siteman3direxp'
22332 siteprefix='$siteprefix'
22333 siteprefixexp='$siteprefixexp'
22334 sitescript='$sitescript'
22335 sitescriptexp='$sitescriptexp'
22336 sizesize='$sizesize'
22337 sizetype='$sizetype'
22341 sockethdr='$sockethdr'
22342 socketlib='$socketlib'
22343 socksizetype='$socksizetype'
22345 spackage='$spackage'
22346 spitshell='$spitshell'
22347 srand48_r_proto='$srand48_r_proto'
22348 srandom_r_proto='$srandom_r_proto'
22350 ssizetype='$ssizetype'
22351 startperl='$startperl'
22353 static_ext='$static_ext'
22355 stdio_base='$stdio_base'
22356 stdio_bufsiz='$stdio_bufsiz'
22357 stdio_cnt='$stdio_cnt'
22358 stdio_filbuf='$stdio_filbuf'
22359 stdio_ptr='$stdio_ptr'
22360 stdio_stream_array='$stdio_stream_array'
22361 strerror_r_proto='$strerror_r_proto'
22364 subversion='$subversion'
22368 targetarch='$targetarch'
22372 timeincl='$timeincl'
22373 timetype='$timetype'
22374 tmpnam_r_proto='$tmpnam_r_proto'
22380 ttyname_r_proto='$ttyname_r_proto'
22389 uidformat='$uidformat'
22395 uquadtype='$uquadtype'
22396 use5005threads='$use5005threads'
22397 use64bitall='$use64bitall'
22398 use64bitint='$use64bitint'
22399 usecrosscompile='$usecrosscompile'
22401 usefaststdio='$usefaststdio'
22402 useithreads='$useithreads'
22403 uselargefiles='$uselargefiles'
22404 uselongdouble='$uselongdouble'
22405 usemallocwrap='$usemallocwrap'
22406 usemorebits='$usemorebits'
22407 usemultiplicity='$usemultiplicity'
22408 usemymalloc='$usemymalloc'
22410 useopcode='$useopcode'
22411 useperlio='$useperlio'
22412 useposix='$useposix'
22413 usereentrant='$usereentrant'
22414 userelocatableinc='$userelocatableinc'
22416 useshrplib='$useshrplib'
22417 usesitecustomize='$usesitecustomize'
22418 usesocks='$usesocks'
22419 usethreads='$usethreads'
22420 usevendorprefix='$usevendorprefix'
22421 usevfork='$usevfork'
22424 uvXUformat='$uvXUformat'
22425 uvoformat='$uvoformat'
22428 uvuformat='$uvuformat'
22429 uvxformat='$uvxformat'
22430 vendorarch='$vendorarch'
22431 vendorarchexp='$vendorarchexp'
22432 vendorbin='$vendorbin'
22433 vendorbinexp='$vendorbinexp'
22434 vendorhtml1dir='$vendorhtml1dir'
22435 vendorhtml1direxp='$vendorhtml1direxp'
22436 vendorhtml3dir='$vendorhtml3dir'
22437 vendorhtml3direxp='$vendorhtml3direxp'
22438 vendorlib='$vendorlib'
22439 vendorlib_stem='$vendorlib_stem'
22440 vendorlibexp='$vendorlibexp'
22441 vendorman1dir='$vendorman1dir'
22442 vendorman1direxp='$vendorman1direxp'
22443 vendorman3dir='$vendorman3dir'
22444 vendorman3direxp='$vendorman3direxp'
22445 vendorprefix='$vendorprefix'
22446 vendorprefixexp='$vendorprefixexp'
22447 vendorscript='$vendorscript'
22448 vendorscriptexp='$vendorscriptexp'
22450 version_patchlevel_string='$version_patchlevel_string'
22451 versiononly='$versiononly'
22453 voidflags='$voidflags'
22456 yaccflags='$yaccflags'
22461 : Add in command line options if available
22462 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
22464 : add special variables
22465 $test -f $src/patchlevel.h && \
22466 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
22467 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
22468 echo "PERL_CONFIG_SH=true" >>config.sh
22470 : propagate old symbols
22471 if $test -f UU/config.sh; then
22472 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
22473 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
22474 $sort | $uniq -u >UU/oldsyms
22475 set X `cat UU/oldsyms`
22481 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
22483 echo "# Variables propagated from previous config.sh file." >>config.sh
22484 for sym in `cat UU/oldsyms`; do
22485 echo " Propagating $hint variable "'$'"$sym..."
22486 eval 'tmp="$'"${sym}"'"'
22488 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
22494 : Finish up by extracting the .SH files
22498 echo "Extraction done."
22508 If you'd like to make any changes to the config.sh file before I begin
22509 to configure things, do it as a shell escape now (e.g. !vi config.sh).
22512 rp="Press return or use a shell escape to edit config.sh:"
22517 *) : in case they cannot read
22518 sh 1>&4 -c "$ans";;
22523 : if this fails, just run all the .SH files by hand
22532 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
22539 Now you need to generate make dependencies by running "$make depend".
22540 You might prefer to run it in background: "$make depend > makedepend.out &"
22541 It can take a while, so you might not want to run it right now.
22546 rp="Run $make depend now?"
22550 $make depend && echo "Now you must run '$make'."
22553 echo "You must run '$make depend' then '$make'."
22556 elif test -f [Mm]akefile; then
22558 echo "Now you must run a $make."
22560 echo "Configure done."
22563 if $test -f Policy.sh; then
22566 If you compile $package on a different machine or from a different object
22567 directory, copy the Policy.sh file from this object directory to the
22568 new one before you run Configure -- this will help you with most of
22569 the policy defaults.
22573 if $test -f config.msg; then
22574 echo "Hmm. I also noted the following information while running:"
22576 $cat config.msg >&4
22579 $rm -f kit*isdone ark*isdone