3 # If these # comments don't work, trim them. Don't worry about any other
4 # shell scripts, Configure will trim # comments from them for you.
6 # (If you are trying to port this package to a machine without sh,
7 # I would suggest you have a look at the prototypical config_h.SH file
8 # and edit it to reflect your system. Some packages may include samples
9 # of config.h for certain machines, so you might look for one of those.)
11 # Yes, you may rip this off to use in other distribution packages. This
12 # script belongs to the public domain and cannot be copyrighted.
14 # Note: this Configure script was generated automatically. Rather than
15 # working with this copy of Configure, you may wish to get metaconfig.
16 # The dist package (which contains metaconfig) is available via SVN:
17 # svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
20 # Though this script was generated by metaconfig, it is OK to send
21 # patches against it. It's up to the Configure pumpkin to backport
22 # the patch to the metaunits if it is accepted.
23 # See Porting/pumpkin.pod for more information on metaconfig.
26 # $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
28 # Generated on Thu Nov 6 21:06:19 CET 2008 [metaconfig 3.5 PL0]
29 # (with additional metaconfig patches by perlbug@perl.org)
34 SCO csh still thinks true is false. Write to SCO today and tell them that next
35 year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
37 (Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
38 we'd have to do is go in and swap the && and || tokens, wherever they are.)
40 [End of diatribe. We now return you to your regularly scheduled programming...]
44 OOPS! You naughty creature! You didn't run Configure with sh!
45 I will attempt to remedy the situation by running sh for you...
49 true || exec sh $0 $argv:q
51 (exit $?0) || cat c2$$
52 (exit $?0) || exec sh $0 $argv:q
55 if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
58 *** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do
59 *** Configure that well. (Plan 9 is close to UNIX but not close enough.)
60 *** Please read the README.plan9 for further instructions.
61 *** Cannot continue, aborting.
67 if test ! -c /dev/null ; then
70 *** I'm sorry, but /dev/null appears to be a file rather than a device.
71 *** Please consult your operating sytem's notes for making a device
73 *** Cannot continue, aborting.
79 : compute my invocation name
83 me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
88 : Proper separator for the PATH environment variable
90 : On OS/2 this directory should exist if this is not floppy only system ":-]"
91 if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then
92 if test -n "$OS2_SHELL"; then
94 PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
95 OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
97 elif test -n "$DJGPP"; then
98 case "X${MACHTYPE:-nonesuchmach}" in
105 : Proper PATH setting
106 paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
107 paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
108 paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
109 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
110 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
111 paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
112 paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
113 paths="$paths /sbin /usr/sbin /usr/libexec"
114 paths="$paths /system/gnu_library/bin"
118 case "$p_$PATH$p_" in
120 *) test -d $p && PATH=$PATH$p_$p ;;
127 : shall we be using ksh?
133 if (PATH=.; alias -x) >/dev/null 2>&1; then
136 if test -f /hp-ux -a -f /bin/ksh; then
137 needksh='to avoid sh bug in "here document" expansion'
139 if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
140 if test X`/usr/bin/uname -v` = X4; then
141 avoidksh="to avoid AIX 4's /bin/sh"
145 if test -f /osf_boot -a -f /usr/sbin/setld; then
146 if test X`/usr/bin/uname -s` = XOSF1; then
147 avoidksh="to avoid Digital UNIX' ksh"
152 case "$inksh/$needksh" in
159 case "$inksh/$avoidksh" in
165 case "$inksh/$needksh-$avoidksh-" in
168 (I see you are using the Korn shell. Some ksh's blow up on $me,
169 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
176 echo "(Feeding myself to $newsh $reason.)"
178 Configure|*/Configure) exec $newsh $0 "$@";;
179 *) exec $newsh Configure "$@";;
183 test -x "${newsh}" || unset newsh
185 : if needed, set CDPATH to a harmless value that is not chatty
186 : avoid bash 2.02 problems with empty CDPATH.
190 *bash*) CDPATH='.' ;;
196 : Configure runs within the UU subdirectory
197 test -d UU || mkdir UU
336 initialinstalllocation=''
363 d_attribute_format=''
364 d_attribute_malloc=''
365 d_attribute_nonnull=''
366 d_attribute_noreturn=''
368 d_attribute_unused=''
369 d_attribute_warn_unused_result=''
370 d_printf_format_null=''
373 d_builtin_choose_expr=''
376 d_c99_variadic_macros=''
423 endhostent_r_proto=''
429 endprotoent_r_proto=''
435 endservent_r_proto=''
487 gethostbyaddr_r_proto=''
489 gethostbyname_r_proto=''
491 gethostent_r_proto=''
503 getnetbyaddr_r_proto=''
505 getnetbyname_r_proto=''
519 d_getprotobyname_r=''
520 getprotobyname_r_proto=''
521 d_getprotobynumber_r=''
522 getprotobynumber_r_proto=''
524 getprotoent_r_proto=''
536 getservbyname_r_proto=''
538 getservbyport_r_proto=''
540 getservent_r_proto=''
564 d_libm_lib_version=''
567 d_localtime_r_needs_tzset=''
578 d_malloc_good_size=''
620 d_old_pthread_create_joinable=''
621 old_pthread_create_joinable=''
623 d_pthread_attr_setscope=''
662 sethostent_r_proto=''
679 setprotoent_r_proto=''
691 setservent_r_proto=''
725 d_sprintf_returns_strlen=''
740 d_stdio_ptr_lval_nochange_cnt=''
741 d_stdio_ptr_lval_sets_cnt=''
884 d_gdbm_ndbm_h_uses_prototypes=''
885 d_gdbmndbm_h_uses_prototypes=''
887 d_ndbm_h_uses_prototypes=''
961 d_inc_version_list=''
963 inc_version_list_init=''
982 ignore_versioned_solibs=''
1046 d_perl_otherlibdirs=''
1054 api_versionstring=''
1060 version_patchlevel_string=''
1064 d_nv_preserves_uv=''
1065 d_nv_zero_is_allbits_zero=''
1076 nv_overflows_integers_at=''
1077 nv_preserves_uv_bits=''
1149 installsitehtml1dir=''
1152 installsitehtml3dir=''
1159 installsiteman1dir=''
1162 installsiteman3dir=''
1167 installsitescript=''
1182 d_stdio_stream_array=''
1183 stdio_stream_array=''
1200 ccflags_uselargefiles=''
1201 ldflags_uselargefiles=''
1202 libswanted_uselargefiles=''
1222 installvendorarch=''
1229 installvendorhtml1dir=''
1231 vendorhtml1direxp=''
1232 installvendorhtml3dir=''
1234 vendorhtml3direxp=''
1240 installvendorman1dir=''
1243 installvendorman3dir=''
1250 installvendorscript=''
1263 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1266 : We must find out about Eunice early
1268 if test -f /etc/unixtovms; then
1269 eunicefix=/etc/unixtovms
1271 if test -f /etc/unixtovms.exe; then
1272 eunicefix=/etc/unixtovms.exe
1275 : Set executable suffix now -- needed before hints available
1276 if test -f "/libs/version.library"; then
1279 elif test -f "/system/gnu_library/bin/ar.pm"; then
1282 elif test -n "$DJGPP"; then
1285 elif test -d c:/. -o -n "$is_os2" ; then
1292 : Trailing extension. Override this in a hint file, if needed.
1293 : Extra object files, if any, needed on this platform.
1297 : change the next line if compiling for Xenix/286 on Xenix/386
1298 xlibpth='/usr/lib/386 /lib/386'
1299 : Possible local library directories to search.
1300 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1301 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1303 : general looking path for locating libraries
1304 glibpth="/lib /usr/lib $xlibpth"
1305 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1306 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1307 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1308 test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
1310 : Private path used by Configure to find libraries. Its value
1311 : is prepended to libpth. This variable takes care of special
1312 : machines, like the mips. Usually, it should be empty.
1315 : default library list
1317 : some systems want to use only the non-versioned libso:s
1318 ignore_versioned_solibs=''
1319 : set usethreads on the Configure command line to enable threads.
1320 usereentrant='undef'
1321 : full support for void wanted by default
1324 : Possible local include directories to search.
1325 : Set locincpth to "" in a hint file to defeat local include searches.
1326 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1327 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1329 : no include file wanted by default
1332 : Enable -DEBUGGING and -DDEBUGGING from the command line
1339 : set useposix=false in your hint file to disable the POSIX extension.
1341 : set useopcode=false in your hint file to disable the Opcode extension.
1344 ccflags_uselargefiles=''
1345 ldflags_uselargefiles=''
1346 libswanted_uselargefiles=''
1347 : set usemultiplicity on the Configure command line to enable multiplicity.
1348 : set usesocks on the Configure command line to enable socks.
1349 : List of libraries we want.
1350 : If anyone needs extra -lxxx, put those in a hint file.
1351 libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun"
1352 libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
1353 : We probably want to search /usr/shlib before most other libraries.
1354 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1355 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1356 glibpth="/usr/shlib $glibpth"
1357 : Do not use vfork unless overridden by a hint file.
1360 : Find the basic shell for Bourne shell scripts
1364 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1367 if test -f "$xxx"; then
1370 : Build up a list and do a single loop so we can 'break' out.
1371 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1372 for xxx in sh bash ksh pdksh ash; do
1374 try="$try ${p}/${xxx}"
1378 if test -f "$xxx"; then
1381 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1384 elif test -f "$xxx.exe"; then
1395 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1397 Usually it's in /bin/sh. How did you even get this far?
1398 Please contact me (Perl Maintainers) at perlbug@perl.org and
1399 we'll try to straighten this all out.
1405 : see if sh knows # comments
1406 if `$sh -c '#' >/dev/null 2>&1`; then
1410 test -f $xcat$_exe || xcat=/usr/bin/cat
1411 if test ! -f $xcat$_exe; then
1412 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1413 if test -f $p/cat$_exe; then
1418 if test ! -f $xcat$_exe; then
1419 echo "Can't find cat anywhere!"
1423 echo "#!$xcat" >sharp
1426 ./sharp > today 2>/dev/null
1427 if test -s today; then
1430 echo "#! $xcat" > sharp
1433 ./sharp > today 2>/dev/null
1434 if test -s today; then
1442 echo "Your $sh doesn't grok # comments--I will strip them later on."
1445 echo "exec grep -v '^[ ]*#'" >spitshell
1447 $eunicefix spitshell
1448 spitshell=`pwd`/spitshell
1450 echo "I presume that if # doesn't work, #! won't work either!"
1455 : figure out how to guarantee sh startup
1457 '') startsh=${sharpbang}${sh} ;;
1469 : echo "Yup, it does."
1471 echo "Hmm... '$startsh' does not guarantee sh startup..."
1472 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1476 : Save command line options in file UU/cmdline.opt for later use in
1477 : generating config.sh.
1478 cat > cmdline.opt <<EOSH
1479 : Configure command line arguments.
1488 cat >>cmdline.opt <<EOSH
1489 config_arg$argn='$arg'
1491 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1494 arg_exp=`cat cmdl.opt`
1495 args_exp="$args_exp$args_sep'$arg_exp'"
1496 argn=`expr $argn + 1`
1501 : produce awk script to parse command line options
1502 cat >options.awk <<'EOF'
1504 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1506 len = length(optstr);
1507 for (i = 1; i <= len; i++) {
1508 c = substr(optstr, i, 1);
1509 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1520 if (substr(str, 1, 1) != "-") {
1521 printf("'%s'\n", str);
1525 for (i = 2; i <= len; i++) {
1526 c = substr(str, i, 1);
1528 printf("-%s\n", substr(str, i));
1534 printf("'%s'\n", substr(str, i + 1));
1547 : process the command line options
1548 set X `for arg in "$@"; do echo "X$arg"; done |
1549 sed -e s/X// | awk -f options.awk`
1554 : set up default values
1564 rm -f optdef.sh posthint.sh
1565 cat >optdef.sh <<EOS
1571 while test $# -gt 0; do
1573 -d) shift; fastread=yes;;
1574 -e) shift; alldone=cont;;
1578 if test -r "$1"; then
1581 echo "$me: cannot read config file $1." >&2
1587 -h) shift; error=true;;
1588 -r) shift; reuseval=true;;
1589 -s) shift; silent=true; realsilent=true;;
1590 -E) shift; alldone=exit;;
1591 -K) shift; knowitall=true;;
1592 -O) shift; override=true;;
1593 -S) shift; silent=true; extractsh=true;;
1598 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1599 echo "$me: ignoring -D $1" >&2
1602 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1603 *) echo "$1='define'" >> optdef.sh;;
1610 *=) echo "$1" >> optdef.sh;;
1612 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1613 echo "$me: ignoring -U $1" >&2
1615 *) echo "$1='undef'" >> optdef.sh;;
1626 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
1630 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
1631 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1637 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1638 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1639 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1640 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1641 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1642 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
1648 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1650 echo "$yyy=''" >> posthint.sh ;;
1655 echo "$yyy='$zzz'" >> posthint.sh ;;
1657 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1659 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1664 echo "$yyy=$zzz" >> posthint.sh ;;
1665 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1669 -V) echo "$me generated by metaconfig 3.5 PL0." >&2
1672 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1680 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1681 [-U symbol] [-U symbol=] [-A command:symbol...]
1682 -d : use defaults for all answers.
1683 -e : go on without questioning past the production of config.sh.
1684 -f : specify an alternate default configuration file.
1685 -h : print this help message and exit (with an error status).
1686 -r : reuse C symbols value if possible (skips costly nm extraction).
1687 -s : silent mode, only echoes questions and essential information.
1688 -D : define symbol to have some value:
1689 -D symbol symbol gets the value 'define'
1690 -D symbol=value symbol gets the value 'value'
1691 common used examples (see INSTALL for more info):
1692 -Duse64bitint use 64bit integers
1693 -Duse64bitall use 64bit integers and pointers
1694 -Dusethreads use thread support
1695 -Dinc_version_list=none do not include older perl trees in @INC
1696 -DEBUGGING=none DEBUGGING options
1697 -Dcc=gcc choose your compiler
1698 -Dprefix=/opt/perl5 choose your destination
1699 -E : stop at the end of questions, after having produced config.sh.
1700 -K : do not use unless you know what you are doing.
1701 -O : let -D and -U override definitions from loaded configuration file.
1702 -S : perform variable substitutions on all .SH files (can mix with -f)
1703 -U : undefine symbol:
1704 -U symbol symbol gets the value 'undef'
1705 -U symbol= symbol gets completely empty
1707 -A : manipulate symbol after the platform specific hints have been applied:
1708 -A append:symbol=value append value to symbol
1709 -A symbol=value like append:, but with a separating space
1710 -A define:symbol=value define symbol to have value
1711 -A clear:symbol define symbol to be ''
1712 -A define:symbol define symbol to be 'define'
1713 -A eval:symbol=value define symbol to be eval of value
1714 -A prepend:symbol=value prepend value to symbol
1715 -A undef:symbol define symbol to be 'undef'
1716 -A undef:symbol= define symbol to be ''
1717 e.g.: -A prepend:libswanted='cl pthread '
1718 -A ccflags=-DSOME_MACRO
1719 -V : print version number and exit (with a zero status).
1726 case "$fastread$alldone" in
1729 case "$extractsh" in
1732 if test ! -t 0; then
1733 echo "Say 'sh Configure', not 'sh <Configure'"
1743 true) exec 1>/dev/null;;
1746 : run the defines and the undefines, if any, but leave the file out there...
1749 : create the posthint manipulation script and leave the file out there...
1754 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1755 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1756 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1757 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1758 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1761 : Some greps do not return status, grrr.
1762 echo "grimblepritz" >grimble
1763 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1765 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1771 : the following should work in any shell
1775 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1776 cat >contains <<'EOSS'
1777 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1782 : Find the path to the source tree
1785 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1789 *) src=`cd ../$src && pwd` ;;
1802 if test -f $rsrc/Configure && \
1803 $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
1805 : found it, so we are ok.
1808 for src in . .. ../.. ../../.. ../../../..; do
1809 if test -f ../$src/Configure && \
1810 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1821 Sorry, I can't seem to locate the source dir for $package. Please start
1822 Configure with an explicit path -- i.e. /some/path/Configure.
1830 echo "Sources for $package found in \"$src\"." >&4
1834 : script used to extract .SH files with variable substitutions
1835 cat >extract <<'EOS'
1837 echo "Doing variable substitutions on .SH files..."
1838 if test -f MANIFEST; then
1839 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1841 echo "(Looking for .SH files under the source directory.)"
1842 set x `(cd "$src"; find . -name "*.SH" -print)`
1846 0) set x `(cd "$src"; echo *.SH)`; shift;;
1848 if test ! -f "$src/$1"; then
1854 while test $name; do
1855 if test ! -d "$name"; then
1856 create="$name $create";
1857 name=`echo $name | sed -e "s|^[^/]*$||"`;
1858 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1863 for file in $create; do
1872 dir=`expr X$file : 'X\(.*\)/'`
1873 file=`expr X$file : 'X.*/\(.*\)'`
1874 (cd "$dir" && . ./$file)
1884 dir=`expr X$file : 'X\(.*\)/'`
1885 file=`expr X$file : 'X.*/\(.*\)'`
1886 (set x $dir; shift; eval $mkdir_p)
1887 sh <"$src/$dir/$file"
1896 if test -f "$src/config_h.SH"; then
1897 if test ! -f config.h; then
1898 : oops, they left it out of MANIFEST, probably, so do it anyway.
1899 . "$src/config_h.SH"
1904 : extract files and exit if asked to do so
1905 case "$extractsh" in
1907 case "$realsilent" in
1911 case "$config_sh" in
1912 '') config_sh='config.sh';;
1915 echo "Fetching answers from $config_sh..."
1918 test "$override" && . ./optdef.sh
1922 echo "Extraction done."
1927 : Eunice requires " " instead of "", can you believe it
1930 echo "Beginning of configuration questions for $package."
1932 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1934 : first determine how to suppress newline on echo command
1936 echo "Checking echo to see how to suppress newlines..."
1937 (echo "hi there\c" ; echo " ") >.echotmp
1938 if $contains c .echotmp >/dev/null 2>&1 ; then
1949 echo $n "The star should be here-->$c"
1953 : Now test for existence of everything in MANIFEST
1955 if test -f "$rsrc/MANIFEST"; then
1956 echo "First let's make sure your kit is complete. Checking..." >&4
1957 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
1958 (split -l 50 2>/dev/null || split -50)
1961 for filelist in x??; do
1962 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
1963 >/dev/null 2>>"$tmppwd/missing")
1965 if test -s missing; then
1969 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1971 You have the option of continuing the configuration process, despite the
1972 distinct possibility that your kit is damaged, by typing 'y'es. If you
1973 do, don't blame me if something goes wrong. I advise you to type 'n'o
1974 and contact the author (perlbug@perl.org).
1977 echo $n "Continue? [n] $c" >&4
1981 echo "Continuing..." >&4
1985 echo "ABORTING..." >&4
1990 echo "Looks good..."
1993 echo "There is no MANIFEST file. I hope your kit is complete !"
1997 : Find the appropriate value for a newline for tr
1999 if test -n "$DJGPP"; then
2002 if test X"$trnl" = X; then
2003 case "`echo foo|tr '\n' x 2>/dev/null`" in
2007 if test X"$trnl" = X; then
2008 case "`echo foo|tr '\012' x 2>/dev/null`" in
2009 foox) trnl='\012' ;;
2012 if test X"$trnl" = X; then
2013 case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
2014 fooxy) trnl='\n\r' ;;
2017 if test X"$trnl" = X; then
2020 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
2026 : compute the number of columns on the terminal for proper question formatting
2031 : set up the echo used in my read
2032 myecho="case \"\$xxxm\" in
2033 '') echo $n \"\$rp $c\" >&4;;
2035 '') echo $n \"[\$xxxm] $c\";;
2037 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
2039 echo $n \"[\$xxxm] $c\" >&4
2041 echo $n \"\$rp [\$xxxm] $c\" >&4
2047 : now set up to do reads with possible shell escape and default assignment
2053 case "\$fastread" in
2054 yes) case "\$dflt" in
2057 case "\$silent-\$rp" in
2062 *) case "\$silent" in
2063 true) case "\$rp" in
2068 while expr "X\$ans" : "X!" >/dev/null; do
2072 aok=''; eval "ans=\\"\$answ\\"" && aok=y
2080 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
2089 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
2094 echo "(OK, I'll run with -d after this question.)" >&4
2097 echo "*** Sorry, \$1 not supported yet." >&4
2107 echo "*** Substitution done -- please confirm."
2109 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
2114 echo "*** Error -- try again."
2121 case "\$ans\$xxxm\$nostick" in
2133 : create .config dir to save info across Configure sessions
2134 test -d ../.config || mkdir ../.config
2135 cat >../.config/README <<EOF
2136 This directory created by Configure to save information that should
2137 persist across sessions for $package.
2139 You may safely delete it if you wish.
2142 : See if we are using a devel version and want that
2143 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
2145 $define|true|[yY]*) ;;
2146 *) case "$xversion" in
2149 *** WHOA THERE!!! ***
2151 This is an UNSTABLE DEVELOPMENT release.
2152 The version of this $package distribution is $xversion, that is, odd,
2153 (as opposed to even) and that signifies a development release.
2154 If you want a maintenance release, you want an even-numbered version.
2156 Do ***NOT*** install this into production use.
2157 Data corruption and crashes are possible.
2159 It is most seriously suggested that you do not continue any further
2160 unless you want to help in developing and debugging Perl.
2162 If you *still* want to build perl, you can answer 'y' now,
2163 or pass -Dusedevel to Configure.
2166 rp='Do you really want to continue?'
2170 [yY]) echo >&4 "Okay, continuing."
2171 usedevel="$define" ;;
2172 *) echo >&4 "Okay, bye."
2182 case "$versiononly" in
2183 '') versiononly="$define" ;;
2185 case "$installusrbinperl" in
2186 '') installusrbinperl="$undef" ;;
2191 : general instructions
2194 user=`(logname) 2>/dev/null`
2196 '') user=`whoami 2>&1`;;
2198 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2201 rp='Would you like to see the instructions?'
2212 This installation shell script will examine your system and ask you questions
2213 to determine how the perl5 package should be installed. If you get
2214 stuck on a question, you may use a ! shell escape to start a subshell or
2215 execute a command. Many of the questions will have default answers in square
2216 brackets; typing carriage return will give you the default.
2218 On some of the questions which ask for file or directory names you are allowed
2219 to use the ~name construct to specify the login directory belonging to "name",
2220 even if you don't have a shell which knows about that. Questions where this is
2221 allowed will be marked "(~name ok)".
2225 dflt='Type carriage return to continue'
2229 The prompter used in this script allows you to use shell variables and
2230 backticks in your answers. You may use $1, $2, etc... to refer to the words
2231 in the default answer, as if the default line was a set of arguments given to a
2232 script shell. This means you may also use $* to repeat the whole default line,
2233 so you do not have to re-type everything to add something to the default.
2235 Everytime there is a substitution, you will have to confirm. If there is an
2236 error (e.g. an unmatched backtick), the default answer will remain unchanged
2237 and you will be prompted again.
2239 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2240 the questions and use the computed defaults (or the previous answers if there
2241 was already a config.sh file). Type 'Configure -h' for a list of options.
2242 You may also start interactively and then answer '& -d' at any prompt to turn
2243 on the non-interactive behaviour for the remainder of the execution.
2249 Much effort has been expended to ensure that this shell script will run on any
2250 Unix system. If despite that it blows up on yours, your best bet is to edit
2251 Configure and run it again. If you can't run Configure for some reason,
2252 you'll have to generate a config.sh file by hand. Whatever problems you
2253 have, let me (perlbug@perl.org) know how I blew it.
2255 This installation script affects things in two ways:
2257 1) it may do direct variable substitutions on some of the files included
2259 2) it builds a config.h file for inclusion in C programs. You may edit
2260 any of these files as the need arises after running this script.
2262 If you make a mistake on a question, there is no easy way to back up to it
2263 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2264 files. Configure will offer to let you do this before it runs the SH files.
2267 dflt='Type carriage return to continue'
2269 case "$firsttime" in
2270 true) echo $user >>../.config/instruct;;
2274 : find out where common programs are
2276 echo "Locating common programs..." >&4
2289 if test -d \$dir/\$thing; then
2295 for thisthing in \$dir/\$thing; do
2296 : just loop through to pick last item
2298 if test -f \$thisthing; then
2301 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2304 elif test -f \$dir/\$thing.exe; then
2305 if test -n "$DJGPP"; then
2306 echo \$dir/\$thing.exe
2307 elif test "$eunicefix" != ":"; then
2308 : on Eunice apparently
2360 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2361 pth="$pth /lib /usr/lib"
2362 for file in $loclist; do
2366 if test -f "$xxx"; then
2369 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2370 xxx=`./loc $file $file $pth`
2373 '') xxx=`./loc $file $file $pth`;;
2374 *) xxx=`./loc $xxx $xxx $pth`;;
2376 eval $file=$xxx$_exe
2380 echo $file is in $xxx.
2383 echo $file is in $xxx.
2386 echo "I don't know where '$file' is, and my life depends on it." >&4
2387 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2393 echo "Don't worry if any of the following aren't found..."
2395 for file in $trylist; do
2399 if test -f "$xxx"; then
2402 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2403 xxx=`./loc $file $file $pth`
2406 '') xxx=`./loc $file $file $pth`;;
2407 *) xxx=`./loc $xxx $xxx $pth`;;
2409 eval $file=$xxx$_exe
2413 echo $file is in $xxx.
2416 echo $file is in $xxx.
2419 echo "I don't see $file out there, $say."
2426 echo "Substituting grep for egrep."
2433 echo "Substituting cp for ln."
2442 echo "I can't find make or gmake, and my life depends on it." >&4
2443 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2451 *) # We can't have osname yet.
2452 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2453 # Assume that gmake, if found, is definitely GNU make
2454 # and prefer it over the system make.
2455 echo "Substituting gmake for make."
2463 echo "Hopefully test is built into your sh."
2466 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2467 echo "Using the test built into your sh."
2475 echo "Hopefully echo is built into your sh."
2480 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2481 $echo $n "hi there$c" >foo1
2482 echo $n "hi there$c" >foo2
2483 if cmp foo1 foo2 >/dev/null 2>&1; then
2484 echo "They are compatible. In fact, they may be identical."
2491 They are not compatible! You are probably running ksh on a non-USG system.
2492 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2493 have echo built in and we may have to run some Bourne shell scripts. That
2494 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2497 $echo $n "The star should be here-->$c"
2504 # This question was auctioned at YAPC::Europe-2007 in Vienna
2505 # I never promised you could answer it. I only auctioned the question.
2507 The following message is sponsored by
2509 Dresden.pm<--The stars should be here.
2511 Dear Perl user, system administrator or package
2512 maintainer, the Perl community sends greetings to
2513 you. Do you (emblematical) greet back [Y/n]? n
2517 : Check what type of C compiler we use
2521 cat <<'EOSC' >>trygcc
2526 int main(int argc, char *argv[]) {
2530 if $cc -o try $ccflags $ldflags try.c; then
2533 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2539 # Skip this test because it gives a false match on output like:
2540 # ./trygcc: line 23: cc: command not found
2541 # case "`$cc -v -c try.c 2>&1`" in
2542 # *gcc*) trygcc=no ;;
2544 if $test X"$trygcc" = Xyes; then
2545 if gcc -o try -c try.c; then
2547 echo "You seem to have a working gcc, though." >&4
2548 # Switching compilers may undo the work of hints files.
2549 # The most common problem is -D_REENTRANT for threads.
2550 # This heuristic catches that case, but gets false positives
2551 # if -Dusethreads was not actually specified. Better to
2552 # bail out here with a useful message than fail
2553 # mysteriously later. Should we perhaps just try to
2554 # re-invoke Configure -Dcc=gcc config_args ?
2555 if $test -f usethreads.cbu; then
2558 *** However, any setting of the C compiler flags (e.g. for thread support)
2559 *** will be lost. It may be necessary for you to restart Configure and
2560 *** add -Dcc=gcc to your Configure command line.
2563 rp="Would you like to go ahead and try gcc anyway?"
2566 rp="Would you like to use it?"
2569 if $test -f myread; then
2572 if $test -f UU/myread; then
2575 echo "Cannot find myread, sorry. Aborting." >&2
2580 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2593 cat <<'EOSC' >>checkcc
2598 int main(int argc, char *argv[]) {
2602 if $cc -o try $ccflags $ldflags try.c; then
2605 if $test X"$despair" = Xyes; then
2606 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2609 You need to find a working C compiler.
2610 Either (purchase and) install the C compiler supplied by your OS vendor,
2611 or for a free C compiler try http://gcc.gnu.org/
2612 I cannot continue any further, aborting.
2621 : determine whether symbolic links are supported
2624 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2625 echo "Symbolic links are supported." >&4
2628 echo "Symbolic links are NOT supported." >&4
2633 : determine whether symbolic links are supported
2637 echo "Checking how to test for symbolic links..." >&4
2639 if $test "X$issymlink" = X; then
2641 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2642 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2644 if test $? = 0; then
2647 echo "Your builtin 'test -h' may be broken." >&4
2650 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2653 if test -f "$p/$test"; then
2662 echo "Trying external '$test -h'." >&4
2663 issymlink="$test -h"
2664 if $test ! -h sym >/dev/null 2>&1; then
2665 echo "External '$test -h' is broken, too." >&4
2673 if $test "X$issymlink" = X; then
2674 if $test -L sym 2>/dev/null; then
2675 issymlink="$test -L"
2676 echo "The builtin '$test -L' worked." >&4
2679 if $test "X$issymlink" != X; then
2680 echo "You can test for symbolic links with '$issymlink'." >&4
2682 echo "I do not know how you can test for symbolic links." >&4
2686 *) echo "No symbolic links, so not testing for their testing..." >&4
2691 : Make symlinks util
2692 case "$mksymlinks" in
2695 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2698 *) case "$lns:$issymlink" in
2699 *"ln"*" -s:"*"test -"?)
2700 echo "Creating the symbolic links..." >&4
2701 echo "(First creating the subdirectories...)" >&4
2703 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2705 test -z "$directory" && break
2709 if test ! -d t/base; then
2710 echo "Failed to create the subdirectories. Aborting." >&4
2713 echo "(Then creating the symlinks...)" >&4
2714 awk '{print $1}' $src/MANIFEST | while true; do
2716 test -z "$filename" && break
2717 if test -f $filename; then
2718 if $issymlink $filename; then
2722 if test -f $filename; then
2723 echo "$filename already exists, not symlinking."
2725 ln -s $src/$filename $filename
2729 if test ! -f t/base/lex.t; then
2730 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2735 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2743 : Check for Cross-Compilation
2744 case "$usecrosscompile" in
2746 $echo "Cross-compiling..."
2749 *-*-gcc) # A cross-compiling gcc, probably.
2750 targetarch=`$echo $cc|$sed 's/-gcc$//'`
2752 # leave out ld, choosing it is more complex
2754 ranlib=$targetarch-ranlib
2755 $echo 'extern int foo;' > try.c
2756 set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
2758 if $test $# -gt 0; then
2760 incpth="`$echo $incpth|$sed 's/^ //'`"
2761 echo "Guessing incpth '$incpth'." >&4
2763 j="`$echo $i|$sed 's,/include$,/lib,'`"
2764 if $test -d $j; then
2768 libpth="`$echo $libpth|$sed 's/^ //'`"
2769 echo "Guessing libpth '$libpth'." >&4
2774 case "$targetarch" in
2775 '') echo "Targetarch not defined." >&4; croak=y ;;
2776 *) echo "Using targetarch $targetarch." >&4 ;;
2779 '') echo "Incpth not defined." >&4; croak=y ;;
2780 *) echo "Using incpth '$incpth'." >&4 ;;
2783 '') echo "Libpth not defined." >&4; croak=y ;;
2784 *) echo "Using libpth '$libpth'." >&4 ;;
2787 '') for i in $incpth; do
2788 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
2790 echo "Guessing usrinc $usrinc." >&4
2795 '') echo "Usrinc not defined." >&4; croak=y ;;
2798 *) echo "Using usrinc $usrinc." >&4 ;;
2800 case "$targethost" in
2801 '') echo "Targethost not defined." >&4; croak=y ;;
2802 *) echo "Using targethost $targethost." >&4
2807 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2810 /*) run=$src/Cross/run
2811 targetmkdir=$src/Cross/mkdir
2813 from=$src/Cross/from
2815 *) pwd=`$test -f ../Configure & cd ..; pwd`
2817 targetmkdir=$pwd/Cross/mkdir
2819 from=$pwd/Cross/from
2822 case "$targetrun" in
2823 '') targetrun=ssh ;;
2828 case "$targetfrom" in
2829 '') targetfrom=scp ;;
2833 from=$from-$targetfrom
2834 case "$targetdir" in
2836 echo "Guessing targetdir $targetdir." >&4
2839 case "$targetuser" in
2841 echo "Guessing targetuser $targetuser." >&4
2844 case "$targetfrom" in
2848 case "$targetrun" in
2860 '') cwd=$targetdir ;;
2864 if $test ! -f \$exe.xok; then
2868 $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
2871 *) echo "Unknown targetrun '$targetrun'" >&4
2875 case "$targetmkdir" in
2877 cat >$targetmkdir <<EOF
2879 $targetrun -l $targetuser $targethost "mkdir -p \$@"
2881 $chmod a+rx $targetmkdir
2883 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
2895 $targetmkdir \`dirname \$f\`
2896 $targetto $q \$f $targetuser@$targethost:\$f || exit 1
2899 $targetmkdir $targetdir/\`dirname \$f\`
2900 $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
2913 $mkdir -p $targetdir/\`dirname \$f\`
2914 $cp \$f $targetdir/\$f || exit 1
2917 $targetmkdir $targetdir/\`dirname \$f\`
2918 $cp \$f $targetdir/\$f || exit 1
2925 *) echo "Unknown targetto '$targetto'" >&4
2929 case "$targetfrom" in
2936 $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
2941 cp) cat >$from <<EOF
2946 cp $targetdir/\$f . || exit 1
2951 *) echo "Unknown targetfrom '$targetfrom'" >&4
2955 if $test ! -f $run; then
2956 echo "Target 'run' script '$run' not found." >&4
2960 if $test ! -f $to; then
2961 echo "Target 'to' script '$to' not found." >&4
2965 if $test ! -f $from; then
2966 echo "Target 'from' script '$from' not found." >&4
2970 if $test ! -f $run -o ! -f $to -o ! -f $from; then
2974 Using '$run' for remote execution,
2975 and '$from' and '$to'
2976 for remote file transfer.
2982 usecrosscompile='undef'
2987 : see whether [:lower:] and [:upper:] are supported character classes
2989 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2991 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2995 *) # There is a discontinuity in EBCDIC between 'R' and 'S'
2996 # (0xd9 and 0xe2), therefore that is a nice testing point.
2997 if test "X$up" = X -o "X$low" = X; then
2998 case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in
3004 if test "X$up" = X -o "X$low" = X; then
3005 case "`echo RS | $tr R-S r-s 2>/dev/null`" in
3011 if test "X$up" = X -o "X$low" = X; then
3012 case "`echo RS | od -x 2>/dev/null`" in
3014 echo "Hey, this might be EBCDIC." >&4
3015 if test "X$up" = X -o "X$low" = X; then
3016 case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
3017 rs) up='[A-IJ-RS-Z]'
3022 if test "X$up" = X -o "X$low" = X; then
3023 case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
3033 case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in
3035 echo "Using $up and $low to convert case." >&4
3038 echo "I don't know how to translate letters from upper to lower case." >&4
3039 echo "Your tr is not acting any way I know of." >&4
3043 : set up the translation script tr, must be called with ./tr of course
3047 '[A-Z][a-z]') exec $tr '$up' '$low';;
3048 '[a-z][A-Z]') exec $tr '$low' '$up';;
3055 : Try to determine whether config.sh was made on this system
3056 case "$config_sh" in
3058 myuname=`$uname -a 2>/dev/null`
3059 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
3060 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
3061 # because the A-Z/a-z are not consecutive.
3062 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \
3063 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
3064 newmyuname="$myuname"
3066 case "$knowitall" in
3068 if test -f ../config.sh; then
3069 if $contains myuname= ../config.sh >/dev/null 2>&1; then
3070 eval "`grep myuname= ../config.sh`"
3072 if test "X$myuname" = "X$newmyuname"; then
3080 : Get old answers from old config file if Configure was run on the
3081 : same system, otherwise use the hints.
3084 if test -f config.sh; then
3086 rp="I see a config.sh file. Shall I use it to set the defaults?"
3089 n*|N*) echo "OK, I'll ignore it."
3090 mv config.sh config.sh.old
3091 myuname="$newmyuname"
3093 *) echo "Fetching default answers from your old config.sh file..." >&4
3101 : Older versions did not always set $sh. Catch re-use of such
3111 if test ! -f config.sh; then
3114 First time through, eh? I have some defaults handy for some systems
3115 that need some extra help getting the Configure answers right:
3118 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
3120 : Half the following guesses are probably wrong... If you have better
3121 : tests or hints, please send them to perlbug@perl.org
3122 : The metaconfig authors would also appreciate a copy...
3123 $test -f /irix && osname=irix
3124 $test -f /xenix && osname=sco_xenix
3125 $test -f /dynix && osname=dynix
3126 $test -f /dnix && osname=dnix
3127 $test -f /lynx.os && osname=lynxos
3128 $test -f /unicos && osname=unicos && osvers=`$uname -r`
3129 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
3130 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
3131 $test -f /bin/mips && /bin/mips && osname=mips
3132 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
3133 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
3134 $test -d /usr/apollo/bin && osname=apollo
3135 $test -f /etc/saf/_sactab && osname=svr4
3136 $test -d /usr/include/minix && osname=minix
3137 $test -f /system/gnu_library/bin/ar.pm && osname=vos
3138 if $test -d /MachTen -o -d /MachTen_Folder; then
3140 if $test -x /sbin/version; then
3141 osvers=`/sbin/version | $awk '{print $2}' |
3142 $sed -e 's/[A-Za-z]$//'`
3143 elif $test -x /usr/etc/version; then
3144 osvers=`/usr/etc/version | $awk '{print $2}' |
3145 $sed -e 's/[A-Za-z]$//'`
3151 $test -f /sys/posix.dll &&
3152 $test -f /usr/bin/what &&
3153 set X `/usr/bin/what /sys/posix.dll` &&
3154 $test "$3" = UWIN &&
3158 if $test -f $uname; then
3166 umips) osname=umips ;;
3169 [23]100) osname=mips ;;
3170 next*) osname=next ;;
3172 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
3173 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
3176 elif $test -f /etc/kconfig; then
3178 if test "$lns" = "$ln -s"; then
3180 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3182 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3189 if test -n "$DJGPP"; then
3198 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3200 # oslevel can fail with:
3201 # oslevel: Unable to acquire lock.
3202 *not\ found) osvers="$4"."$3" ;;
3203 '<3240'|'<>3240') osvers=3.2.0 ;;
3204 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3205 '=3250'|'>3250') osvers=3.2.5 ;;
3209 bsd386) osname=bsd386
3212 cygwin*) osname=cygwin
3215 *dc.osx) osname=dcosx
3221 domainos) osname=apollo
3227 dragonfly) osname=dragonfly
3230 dynixptx*) osname=dynixptx
3231 osvers=`echo "$4"|sed 's/^v//'`
3233 freebsd) osname=freebsd
3235 genix) osname=genix ;;
3239 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3255 netbsd*) osname=netbsd
3258 news-os) osvers="$3"
3260 4*) osname=newsos4 ;;
3264 next*) osname=next ;;
3265 nonstop-ux) osname=nonstopux ;;
3266 openbsd) osname=openbsd
3272 POSIX-BC | posix-bc ) osname=posix-bc
3275 powerux | power_ux | powermax_os | powermaxos | \
3276 powerunix | power_unix) osname=powerux
3282 solaris) osname=solaris
3284 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3291 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3295 titanos) osname=titanos
3304 ultrix) osname=ultrix
3307 osf1|mls+) case "$5" in
3310 osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3313 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3316 hp*) osname=hp_osf1 ;;
3317 mips) osname=mips_osf1 ;;
3320 # UnixWare 7.1.2 is known as Open UNIX 8
3321 openunix|unixware) osname=svr5
3329 $2) case "$osname" in
3333 : svr4.x or possibly later
3343 if test -f /stand/boot ; then
3344 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3345 if test -n "$INITPROG" -a -f "$INITPROG"; then
3346 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3347 if test -n "$isesix"; then
3355 *) if test -f /etc/systemid; then
3357 set `echo $3 | $sed 's/\./ /g'` $4
3358 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3360 elif $test -f $src/hints/sco_$1_$2.sh; then
3362 elif $test -f $src/hints/sco_$1.sh; then
3367 '') : Still unknown. Probably a generic Sys V.
3376 *) case "$osname" in
3377 '') : Still unknown. Probably a generic BSD.
3385 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3386 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3387 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3390 $rm -f UU/kernel.what
3391 elif test -d c:/. -o -n "$is_os2" ; then
3398 case "$targetarch" in
3401 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3406 : Now look for a hint file osname_osvers, unless one has been
3407 : specified already.
3410 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3411 : Also try without trailing minor version numbers.
3412 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3413 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3414 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3415 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3418 *) case "$osvers" in
3421 *) if $test -f $src/hints/$file.sh ; then
3423 elif $test -f $src/hints/$xfile.sh ; then
3425 elif $test -f $src/hints/$xxfile.sh ; then
3427 elif $test -f $src/hints/$xxxfile.sh ; then
3429 elif $test -f $src/hints/$xxxxfile.sh ; then
3431 elif $test -f "$src/hints/${osname}.sh" ; then
3440 if $test -f Policy.sh ; then
3443 none) dflt="Policy" ;;
3444 *) dflt="Policy $dflt" ;;
3449 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3453 if $test -f Policy.sh ; then
3456 There's also a Policy hint file available, which should make the
3457 site-specific (policy) questions easier to answer.
3464 You may give one or more space-separated answers, or "none" if appropriate.
3465 If you have a handcrafted Policy.sh file or a Policy.sh file generated by a
3466 previous run of Configure, you may specify it as well as or instead of
3467 OS-specific hints. If hints are provided for your OS, you should use them:
3468 although Perl can probably be built without hints on many platforms, using
3469 hints often improve performance and may enable features that Configure can't
3470 set up on its own. If there are no hints that match your OS, specify "none";
3471 DO NOT give a wrong version or a wrong OS.
3475 rp="Which of these apply, if any?"
3478 for file in $tans; do
3479 if $test X$file = XPolicy -a -f Policy.sh; then
3481 $cat Policy.sh >> UU/config.sh
3482 elif $test -f $src/hints/$file.sh; then
3483 . $src/hints/$file.sh
3484 $cat $src/hints/$file.sh >> UU/config.sh
3485 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3488 : Give one chance to correct a possible typo.
3489 echo "$file.sh does not exist"
3491 rp="hint to use instead?"
3493 for file in $ans; do
3494 if $test -f "$src/hints/$file.sh"; then
3495 . $src/hints/$file.sh
3496 $cat $src/hints/$file.sh >> UU/config.sh
3497 elif $test X$ans = X -o X$ans = Xnone ; then
3500 echo "$file.sh does not exist -- ignored."
3507 : Remember our hint file for later.
3508 if $test -f "$src/hints/$file.sh" ; then
3518 echo "Fetching default answers from $config_sh..." >&4
3522 cp $config_sh config.sh 2>/dev/null
3532 test "$override" && . ./optdef.sh
3534 : Restore computed paths
3535 for file in $loclist $trylist; do
3536 eval $file="\$_$file"
3541 Configure uses the operating system name and version to set some defaults.
3542 The default value is probably right if the name rings a bell. Otherwise,
3543 since spelling matters for me, either accept the default or answer "none"
3550 ''|' '|none) dflt=none ;;
3551 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3554 *) dflt="$osname" ;;
3556 rp="Operating system name?"
3560 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3566 ''|' '|none) dflt=none ;;
3567 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3568 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3570 ''|' ') dflt=none ;;
3575 *) dflt="$osvers" ;;
3577 rp="Operating system version?"
3587 : who configured the system
3588 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3591 cf_by=`(logname) 2>/dev/null`
3594 cf_by=`(whoami) 2>/dev/null`
3596 "") cf_by=unknown ;;
3601 : decide how portable to be. Allow command line overrides.
3602 case "$d_portable" in
3604 *) d_portable="$define" ;;
3607 : set up shell script to do ~ expansion
3613 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3616 if $test -f /bin/csh; then
3617 /bin/csh -f -c "glob \$1"
3622 name=\`$expr x\$1 : '..\([^/]*\)'\`
3623 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3624 if $test ! -d "\$dir"; then
3626 echo "\$me: can't locate home directory for: \$name" >&2
3631 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3647 : now set up to get a file name
3651 cat <<'EOSC' >>getfile
3667 : getfile will accept an answer from the comma-separated list
3668 : enclosed in parentheses even if it does not meet other criteria.
3669 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3670 fn=`echo $fn | sed 's/(.*)//'`
3676 loc_file=`expr $fn : '.*:\(.*\)'`
3677 fn=`expr $fn : '\(.*\):.*'`
3685 */*) fullpath=true;;
3694 *e*) exp_file=true;;
3697 *p*) nopath_ok=true;;
3702 *d*) type='Directory';;
3703 *l*) type='Locate';;
3708 Locate) what='File';;
3713 case "$d_portable" in
3721 while test "$type"; do
3726 true) rp="$rp (~name ok)";;
3729 if test -f UU/getfile.ok && \
3730 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3749 value=`UU/filexp $ans`
3752 if test "$ans" != "$value"; then
3753 echo "(That expands to $value on this system.)"
3767 /*) value="$ansexp" ;;
3768 [a-zA-Z]:/*) value="$ansexp" ;;
3773 echo "I shall only accept a full path name, as in /bin/ls." >&4
3774 echo "Use a ! shell escape if you wish to check pathnames." >&4
3777 echo "Please give a full path name, starting with slash." >&4
3780 echo "Note that using ~name is ok provided it expands well." >&4
3793 for fp in $gfpth; do
3794 if test "X$fp" = X.; then
3799 if test -f "$pf"; then
3801 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
3803 echo "($value is not a plain file, but that's ok.)"
3806 if test X"$type" = X; then
3813 for fp in $gfpth; do
3814 if test "X$fp" = X.; then
3819 direxp="$fp/$ansexp"
3821 if test -d "$direxp"; then
3829 if test -d "$ansexp"; then
3830 echo "(Looking for $loc_file in directory $value.)"
3831 value="$value/$loc_file"
3832 ansexp="$ansexp/$loc_file"
3834 if test -f "$ansexp"; then
3837 case "$nopath_ok" in
3838 true) case "$value" in
3840 *) echo "Assuming $value will be in people's path."
3856 if test "$fastread" = yes; then
3861 rp="$what $value doesn't exist. Use that name anyway?"
3880 test "X$gfpthkeep" != Xy && gfpth=""
3883 : determine root of directory hierarchy where package will be installed.
3886 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
3889 dflt=`echo "$prefix" | sed 's/.$//'`
3897 By default, $package will be installed in $dflt/bin, manual pages
3898 under $dflt/man, etc..., i.e. with $dflt as prefix for all
3899 installation directories. Typically this is something like /usr/local.
3900 If you wish to have binaries under /usr/bin but other parts of the
3901 installation under /usr/local, that's ok: you will be prompted
3902 separately for each of the installation directories, the prefix being
3903 only used to set the defaults.
3907 rp='Installation prefix to use?'
3915 *) oldprefix="$prefix";;
3922 : allow them to override the AFS root
3925 *) afsroot=$afsroot ;;
3931 $define|true) afs=true ;;
3932 $undef|false) afs=false ;;
3933 *) if $test -d $afsroot; then
3941 echo "AFS may be running... I'll be extra cautious then..." >&4
3943 echo "AFS does not seem to be running..." >&4
3946 : determine installation prefix for where package is to be installed.
3950 Since you are running AFS, I need to distinguish the directory in which
3951 files will reside from the directory in which they are installed (and from
3952 which they are presumably copied to the former directory by occult means).
3955 case "$installprefix" in
3956 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
3957 *) dflt="$installprefix";;
3962 In some special cases, particularly when building $package for distribution,
3963 it is convenient to distinguish the directory in which files should be
3964 installed from the directory ($prefix) in which they will
3965 eventually reside. For most users, these two directories are the same.
3968 case "$installprefix" in
3970 *) dflt=$installprefix;;
3974 rp='What installation prefix should I use for installing files?'
3976 installprefix="$ans"
3977 installprefixexp="$ansexp"
3979 : Perform the prefixexp/installprefixexp correction if necessary
3980 cat <<EOS >installprefix
3983 cat <<'EOSC' >>installprefix
3984 : Change installation prefix, if necessary.
3985 if $test X"$prefix" != X"$installprefix"; then
3986 eval "install${prefixvar}=\`echo \$${prefixvar}exp | sed \"s#^\$prefixexp#\$installprefixexp#\"\`"
3988 eval "install${prefixvar}=\"\$${prefixvar}exp\""
3991 chmod +x installprefix
3992 $eunicefix installprefix
3994 : Set variables such as privlib and privlibexp from the output of ./getfile
3995 : performing the prefixexp/installprefixexp correction if necessary.
3996 cat <<EOS >setprefixvar
3999 cat <<'EOSC' >>setprefixvar
4000 eval "${prefixvar}=\"\$ans\""
4001 eval "${prefixvar}exp=\"\$ansexp\""
4004 chmod +x setprefixvar
4005 $eunicefix setprefixvar
4007 : set up the script used to warn in case of inconsistency
4016 '') echo "The $hint value for \$$var on this machine was \"$was\"!" >&4
4018 *) echo "Hmm. Based on the hints in hints/$hintfile.sh, " >&4
4019 echo "the $hint value for \$$var on this machine was \"$was\"!" >&4
4024 echo "*** WHOA THERE!!! ***" >&4
4025 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
4028 rp=" Keep the $hint value?"
4031 y) td=$was; tu=$was;;
4035 : function used to set '$1' to '$val'
4036 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
4038 $define$undef) . ./whoa; eval "$var=\$td";;
4039 $undef$define) . ./whoa; eval "$var=\$tu";;
4040 *) eval "$var=$val";;
4043 : Check is we will use socks
4045 $define|true|[yY]*) dflt='y';;
4050 Perl can be built to use the SOCKS proxy protocol library. To do so,
4051 Configure must be run with -Dusesocks. If you use SOCKS you also need
4052 to use the PerlIO abstraction layer, this will be implicitly selected.
4054 If this doesn't make any sense to you, just accept the default '$dflt'.
4056 rp='Build Perl for SOCKS?'
4059 y|Y) val="$define" ;;
4066 $define|true|[yY]*) useperlio="$define";;
4069 : Check if we want perlio
4070 case "$useperlio" in
4071 $define|true|[yY]*|'') dflt='y';;
4076 Previous version of $package used the standard IO mechanisms as
4077 defined in <stdio.h>. Versions 5.003_02 and later of $package allow
4078 alternate IO mechanisms via the PerlIO abstraction layer, but the
4079 stdio mechanism is still available if needed. The abstraction layer
4080 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
4081 Using PerlIO with sfio may cause problems with some extension modules.
4083 If this doesn't make any sense to you, just accept the default '$dflt'.
4085 rp='Use the PerlIO abstraction layer?'
4092 echo "Ok, doing things the stdio way."
4101 case "$useperlio" in
4102 $define|true|[yY]*) ;;
4105 You are using the SOCKS proxy protocol library which means that you
4106 should also use the PerlIO layer. You may be headed for trouble.
4114 : get the patchlevel
4116 echo "Getting the current patchlevel..." >&4
4117 if $test -r $rsrc/patchlevel.h;then
4118 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
4119 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
4120 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4121 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
4122 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
4123 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4124 perl_patchlevel=`egrep ',"(MAINT|SMOKE)[0-9][0-9]*"' $rsrc/patchlevel.h|tail -1|sed 's/[^0-9]//g'`
4133 $echo "(You do not have patchlevel.h. Eek.)"
4135 if $test -r $rsrc/.patch ; then
4136 if $test "X$perl_patchlevel" = "X" || $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
4137 perl_patchlevel=`cat $rsrc/.patch`
4140 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
4141 version_patchlevel_string="version $patchlevel subversion $subversion"
4142 case "$perl_patchlevel" in
4144 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
4147 $echo "(You have $package $version_patchlevel_string.)"
4151 : XXX Should be a Configure test for double-dots in filenames.
4152 version=`echo $revision $patchlevel $subversion | \
4153 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
4154 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4155 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
4158 version=`echo $revision $patchlevel $subversion | \
4159 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
4160 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4161 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
4164 : Special case the 5.005_xx maintenance series, which used 5.005
4165 : without any subversion label as a subdirectory in $sitelib
4166 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
4167 api_versionstring='5.005'
4170 : Do we want threads support and if so, what type
4171 case "$usethreads" in
4172 $define|true|[yY]*) dflt='y';;
4173 *) # Catch case where user specified ithreads or 5005threads but
4174 # forgot -Dusethreads (A.D. 4/2002)
4175 case "$useithreads$use5005threads" in
4177 case "$useperlio" in
4178 "$define") dflt='y' ;;
4188 Perl can be built to take advantage of threads on some systems.
4189 To do so, Configure can be run with -Dusethreads.
4191 Note that Perl built with threading support runs slightly slower
4192 and uses more memory than plain Perl. The current implementation
4193 is believed to be stable, but it is fairly new, and so should be
4194 treated with caution.
4196 If this doesn't make any sense to you, just accept the default '$dflt'.
4198 rp='Build a threading Perl?'
4201 y|Y) val="$define" ;;
4207 if $test $patchlevel -lt 9; then
4208 case "$usethreads" in
4212 Since release 5.6, Perl has had two different threading implementations,
4213 the newer interpreter-based version (ithreads) with one interpreter per
4214 thread, and the older 5.005 version (5005threads).
4215 The 5005threads version is effectively unmaintained and will probably be
4216 removed in Perl 5.10, so there should be no need to build a Perl using it
4217 unless needed for backwards compatibility with some existing 5.005threads
4221 : Default to ithreads unless overridden on command line or with
4224 case "$use5005threads" in
4225 $define|true|[yY]*) dflt='n';;
4227 case "$useithreads" in
4228 $undef|false|[nN]*) dflt='n';;
4230 rp='Use the newer interpreter-based ithreads?'
4233 y|Y) val="$define" ;;
4238 : Now set use5005threads to the opposite value.
4239 case "$useithreads" in
4240 $define) val="$undef" ;;
4247 useithreads="$undef"
4248 use5005threads="$undef"
4252 case "$useithreads$use5005threads" in
4256 You cannot have both the ithreads and the 5.005 threads enabled
4257 at the same time. Disabling the 5.005 threads since they are
4258 much less stable than the ithreads.
4261 use5005threads="$undef"
4266 : perl-5.9.x and later
4268 if test X"$usethreads" = "X$define"; then
4269 case "$use5005threads" in
4273 5.005 threads has been removed for 5.10. Perl will be built using ithreads.
4280 use5005threads="$undef"
4281 useithreads="$usethreads"
4284 if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then
4287 *** To build with ithreads you must also use the PerlIO layer.
4288 *** Cannot continue, aborting.
4294 case "$d_oldpthreads" in
4295 '') : Configure tests would be welcome here. For now, assume undef.
4297 *) val="$d_oldpthreads" ;;
4303 : Look for a hint-file generated 'call-back-unit'. If the
4304 : user has specified that a threading perl is to be built,
4305 : we may need to set or change some other defaults.
4306 if $test -f usethreads.cbu; then
4307 echo "Your platform has some specific hints regarding threaded builds, using them..."
4310 case "$usethreads" in
4311 "$define"|true|[yY]*)
4313 (Your platform does not have any specific hints for threaded builds.
4314 Assuming POSIX threads, then.)
4320 : Check if multiplicity is required
4323 Perl can be built so that multiple Perl interpreters can coexist
4324 within the same Perl executable.
4327 case "$useithreads" in
4330 This multiple interpreter support is required for interpreter-based threads.
4334 *) case "$usemultiplicity" in
4335 $define|true|[yY]*) dflt='y';;
4339 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
4340 rp='Build Perl for multiplicity?'
4343 y|Y) val="$define" ;;
4351 : Check if morebits is requested
4352 case "$usemorebits" in
4353 "$define"|true|[yY]*)
4354 use64bitint="$define"
4355 uselongdouble="$define"
4356 usemorebits="$define"
4358 *) usemorebits="$undef"
4362 : Determine the C compiler to be used
4368 rp="Use which C compiler?"
4372 : See whether they have no cc but they do have gcc
4374 if $test -f cc.cbu; then
4379 : make some quick guesses about what we are up against
4381 $echo $n "Hmm... $c"
4391 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
4392 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
4394 echo "Looks kind of like an OSF/1 system, but we'll see..."
4396 elif test `echo abc | $tr a-z A-Z` = Abc ; then
4397 xxx=`./loc addbib blurfl $pth`
4398 if $test -f $xxx; then
4399 echo "Looks kind of like a USG system with BSD features, but we'll see..."
4403 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
4404 echo "Looks kind of like an extended USG system, but we'll see..."
4406 echo "Looks kind of like a USG system, but we'll see..."
4410 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
4411 echo "Looks kind of like a BSD system, but we'll see..."
4415 echo "Looks kind of like a Version 7 system, but we'll see..."
4418 case "$eunicefix" in
4421 There is, however, a strange, musty smell in the air that reminds me of
4422 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
4426 : it so happens the Eunice I know will not run shell scripts in Unix format
4430 echo "Congratulations. You aren't running Eunice."
4434 : Detect OS2. The p_ variable is set above in the Head.U unit.
4435 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
4436 : semicolon as a patch separator
4441 I have the feeling something is not exactly right, however...don't tell me...
4442 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
4443 (Or you may be running DOS with DJGPP.)
4448 if test -f /xenix; then
4449 echo "Actually, this looks more like a XENIX system..."
4454 echo "It's not Xenix..."
4459 if test -f /venix; then
4460 echo "Actually, this looks more like a VENIX system..."
4467 echo "Nor is it Venix..."
4470 chmod +x bsd usg v7 osf1 eunice xenix venix os2
4471 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
4474 : Check if we are using GNU gcc and what its version is
4476 echo "Checking for GNU cc in disguise and/or its version number..." >&4
4480 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
4482 printf("%s\n", __VERSION__);
4484 printf("%s\n", "1");
4490 if $cc -o try $ccflags $ldflags try.c; then
4491 gccversion=`$run ./try`
4492 case "$gccversion" in
4493 '') echo "You are not using GNU cc." ;;
4494 *) echo "You are using GNU cc $gccversion."
4500 echo "*** WHOA THERE!!! ***" >&4
4501 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
4502 case "$knowitall" in
4504 echo " You'd better start hunting for one and let me know about it." >&4
4510 case "$gccversion" in
4511 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
4513 case "$gccversion" in
4514 '') gccosandvers='' ;;
4515 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
4516 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
4518 case "$gccosandvers" in
4519 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
4520 $osname$osvers) ;; # looking good
4521 $osname*) cat <<EOM >&4
4523 *** WHOA THERE!!! ***
4525 Your gcc has not been compiled for the exact release of
4526 your operating system ($gccosandvers versus $osname$osvers).
4528 In general it is a good idea to keep gcc synchronized with
4529 the operating system because otherwise serious problems
4530 may ensue when trying to compile software, like Perl.
4532 I'm trying to be optimistic here, though, and will continue.
4533 If later during the configuration and build icky compilation
4534 problems appear (headerfile conflicts being the most common
4535 manifestation), I suggest reinstalling the gcc to match
4536 your operating system release.
4540 *) gccosandvers='' ;; # failed to parse, better be silent
4548 # gcc 3.* complain about adding -Idirectories that they already know about,
4549 # so we will take those off from locincpth.
4550 case "$gccversion" in
4552 echo "main(){}">try.c
4553 for incdir in $locincpth; do
4554 warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
4555 grep '^c[cp]p*[01]: warning: changing search order '`
4556 if test "X$warn" != X; then
4557 locincpth=`echo " $locincpth " | sed "s! $incdir ! !"`
4563 : What should the include directory be ?
4565 $echo $n "Hmm... $c"
4569 if $test -f /bin/mips && /bin/mips; then
4570 echo "Looks like a MIPS system..."
4571 $cat >usr.c <<'EOCP'
4572 #ifdef SYSTYPE_BSD43
4576 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4577 dflt='/bsd43/usr/include'
4581 mips_type='System V'
4583 $rm -f usr.c usr.out
4584 echo "and you're compiling with the $mips_type compiler and libraries."
4588 echo "Doesn't look like a MIPS system."
4598 case "$xxx_prompt" in
4601 rp='Where are the include files you want to use?'
4609 : see how we invoke the C preprocessor
4611 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4612 cat <<'EOT' >testcpp.c
4618 if test ! -f cppstdin; then
4619 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4620 # AIX cc -E doesn't show the absolute headerfile
4621 # locations but we'll cheat by using the -M flag.
4622 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
4624 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4627 echo "Keeping your $hint cppstdin wrapper."
4630 wrapper=`pwd`/cppstdin
4634 if $test "X$cppstdin" != "X" && \
4635 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4636 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4638 echo "You used to use $cppstdin $cppminus so we'll use that again."
4640 '') echo "But let's see if we can live without a wrapper..." ;;
4642 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4643 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4645 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4648 echo "(However, $cpprun $cpplast does not work, let's see...)"
4656 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4663 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4664 $cc -E <testcpp.c >testcpp.out 2>&1; \
4665 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4666 echo "Yup, it does."
4669 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4670 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4671 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4672 echo "Yup, it does."
4675 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4676 $cc -P <testcpp.c >testcpp.out 2>&1; \
4677 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4678 echo "Yipee, that works!"
4681 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4682 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4683 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4684 echo "At long last!"
4687 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4688 $cpp <testcpp.c >testcpp.out 2>&1; \
4689 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4693 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4694 $cpp - <testcpp.c >testcpp.out 2>&1; \
4695 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4696 echo "Hooray, it works! I was beginning to wonder."
4699 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4700 $wrapper <testcpp.c >testcpp.out 2>&1; \
4701 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4707 rp="No dice. I can't find a C preprocessor. Name one:"
4711 $x_cpp <testcpp.c >testcpp.out 2>&1
4712 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4713 echo "OK, that will do." >&4
4715 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4730 echo "Perhaps can we force $cc -E using a wrapper..."
4731 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4732 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4738 echo "Nope, we'll have to live without it..."
4752 "$wrapper"|'cppstdin') ;;
4753 *) $rm -f $wrapper;;
4755 $rm -f testcpp.c testcpp.out
4757 : Set private lib path
4760 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
4765 '') dlist="$loclibpth $plibpth $glibpth";;
4766 *) dlist="$libpth";;
4769 : Now check and see which directories actually exist, avoiding duplicates
4773 if $test -d $xxx; then
4776 *) libpth="$libpth $xxx";;
4782 Some systems have incompatible or broken versions of libraries. Among
4783 the directories listed in the question below, please remove any you
4784 know not to be holding relevant libraries, and add any that are needed.
4785 Say "none" for none.
4796 rp="Directories to use for library searches?"
4803 : compute shared library extension
4806 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
4816 On some systems, shared libraries may be available. Answer 'none' if
4817 you want to suppress searching of shared libraries for the remainder
4818 of this configuration.
4821 rp='What is the file extension used for shared libraries?'
4825 : Define several unixisms.
4826 : Hints files or command line option can be used to override them.
4827 : The convoluted testing is in case hints files set either the old
4830 '') case "$exe_ext" in
4832 *) _exe="$exe_ext" ;;
4837 '') case "$lib_ext" in
4844 '') case "$obj_ext" in
4851 '') case "$path_sep" in
4862 rm_try="$rm -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*"
4864 : Which makefile gets called first. This is used by make depend.
4865 case "$firstmakefile" in
4866 '') firstmakefile='makefile';;
4869 : Check for uselongdouble support
4871 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
4874 case "$uselongdouble" in
4875 $define|true|[yY]*) dflt='y';;
4880 Perl can be built to take advantage of long doubles which
4881 (if available) may give more accuracy and range for floating point numbers.
4883 If this doesn't make any sense to you, just accept the default '$dflt'.
4885 rp='Try to use long doubles if available?'
4888 y|Y) val="$define" ;;
4894 case "$uselongdouble" in
4895 true|[yY]*) uselongdouble="$define" ;;
4898 : Look for a hint-file generated 'call-back-unit'. If the
4899 : user has specified that long doubles should be used,
4900 : we may need to set or change some other defaults.
4901 if $test -f uselongdouble.cbu; then
4902 echo "Your platform has some specific hints regarding long doubles, using them..."
4903 . ./uselongdouble.cbu
4905 case "$uselongdouble" in
4908 (Your platform does not have any specific hints for long doubles.)
4914 : Looking for optional libraries
4916 echo "Checking for optional libraries..." >&4
4921 case "$libswanted" in
4922 '') libswanted='c_s';;
4925 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
4931 for thisdir in $libpth $xlibpth; do
4932 test -d $thisdir && libspath="$libspath $thisdir"
4934 for thislib in $libswanted; do
4935 for thisdir in $libspath; do
4937 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
4938 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
4939 $test -f "$xxx" && eval $libscheck
4940 $test -f "$xxx" && libstyle=shared
4942 if test ! -f "$xxx"; then
4943 xxx=$thisdir/lib$thislib.$so
4944 $test -f "$xxx" && eval $libscheck
4945 $test -f "$xxx" && libstyle=shared
4947 if test ! -f "$xxx"; then
4948 xxx=$thisdir/lib$thislib$_a
4949 $test -f "$xxx" && eval $libscheck
4950 $test -f "$xxx" && libstyle=static
4952 if test ! -f "$xxx"; then
4953 xxx=$thisdir/$thislib$_a
4954 $test -f "$xxx" && eval $libscheck
4955 $test -f "$xxx" && libstyle=static
4957 if test ! -f "$xxx"; then
4958 xxx=$thisdir/lib${thislib}_s$_a
4959 $test -f "$xxx" && eval $libscheck
4960 $test -f "$xxx" && libstyle=static
4961 $test -f "$xxx" && thislib=${thislib}_s
4963 if test ! -f "$xxx"; then
4964 xxx=$thisdir/Slib$thislib$_a
4965 $test -f "$xxx" && eval $libscheck
4966 $test -f "$xxx" && libstyle=static
4968 if $test -f "$xxx"; then
4970 shared) echo "Found -l$thislib (shared)." ;;
4971 static) echo "Found -l$thislib." ;;
4972 *) echo "Found -l$thislib ($libstyle)." ;;
4976 *) dflt="$dflt -l$thislib"
4977 libsfound="$libsfound $xxx"
4979 libsfiles="$libsfiles $yyy"
4980 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
4981 case " $libsdirs " in
4983 *) libsdirs="$libsdirs $yyy" ;;
4990 if $test ! -f "$xxx"; then
4991 echo "No -l$thislib."
5002 ' '|'') dflt='none';;
5007 In order to compile $package on your machine, a number of libraries
5008 are usually needed. Include any other special libraries here as well.
5009 Say "none" for none. The default list is almost always right.
5013 rp="What libraries to use?"
5020 : determine optimization, if desired, or use for debug flag also
5022 ' '|$undef) dflt='none';;
5024 *) dflt="$optimize";;
5028 By default, $package compiles with the -O flag to use the optimizer.
5029 Alternately, you might want to use the symbolic debugger, which uses
5030 the -g flag (on traditional Unix systems). Either flag can be
5031 specified here. To use neither flag, specify the word "none".
5034 rp="What optimizer/debugger flag should be used?"
5038 'none') optimize=" ";;
5041 : Check what DEBUGGING is required from the command line
5042 : -DEBUGGING or -DDEBUGGING or
5043 : -DEBUGGING=both = -g + -DDEBUGGING
5044 : -DEBUGGING=-g or -Doptimize=-g = -g
5045 : -DEBUGGING=none or -UDEBUGGING =
5046 : -DEBUGGING=old or -DEBUGGING=default = ? $optimize
5049 *) DEBUGGING=$EBUGGING ;;
5052 case "$DEBUGGING" in
5056 *) optimize="$optimize -g" ;;
5060 *-g*) set `echo "X $optimize " | sed 's/ -g / /'`
5068 case "$DEBUGGING" in
5069 both|$define) dflt='-DDEBUGGING'
5072 : argument order is deliberate, as the flag will start with - which set could
5073 : think is an option
5074 checkccflag='check=$1; flag=$2; callback=$3;
5076 echo "Checking if your compiler accepts $flag" 2>&1;
5077 echo "int main(void) { return 0; }" > gcctest.c;
5078 if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && ./gcctest; then
5079 echo "Yes, it does." 2>&1;
5080 if $test -s gcctest.out ; then
5081 echo "But your platform does not like it:";
5086 echo "Leaving current flags $ccflags alone." 2>&1
5088 *) dflt="$dflt $flag";
5094 echo "Nope, it does not, but that is ok." 2>&1;
5098 : We will not override a previous value, but we might want to
5099 : augment a hint file
5101 default|recommended)
5102 case "$gccversion" in
5103 1*) dflt="$dflt -fpcc-struct-return" ;;
5105 case "$optimize:$DEBUGGING" in
5106 *-g*:old) dflt="$dflt -DDEBUGGING";;
5108 case "$gccversion" in
5109 2*) if $test -d /etc/conf/kconfig.d &&
5110 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
5112 # Interactive Systems (ISC) POSIX mode.
5117 case "$gccversion" in
5120 ?*) set strict-aliasing -fno-strict-aliasing
5124 # For gcc, adding -pipe speeds up compilations for some, but apparently
5125 # some assemblers can't read from stdin. (It also slows down compilations
5126 # in other cases, but those are apparently rarer these days.) AD 5/2004.
5127 case "$gccversion" in
5133 # on x86_64 (at least) we require an extra library (libssp) in the
5134 # link command line. This library is not named, so I infer that it is
5135 # an implementation detail that may change. Hence the safest approach
5136 # is to add the flag to the flags passed to the compiler at link time,
5137 # as that way the compiler can do the right implementation dependant
5139 case "$gccversion" in
5140 ?*) set stack-protector -fstack-protector
5147 case "$mips_type" in
5148 *BSD*|'') inclwanted="$locincpth $usrinc";;
5149 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
5151 for thisincl in $inclwanted; do
5152 if $test -d $thisincl; then
5153 if $test x$thisincl != x$usrinc; then
5155 *" -I$thisincl "*);;
5156 *) dflt="$dflt -I$thisincl ";;
5162 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
5164 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
5172 *) dflt="$dflt -D$2";;
5176 set signal.h LANGUAGE_C; eval $inctest
5180 ccflags="$ccflags -DSOCKS"
5185 default|recommended) dflt="$ccflags $dflt" ;;
5186 *) dflt="$ccflags";;
5195 Your C compiler may want other flags. For this question you should include
5196 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
5197 but you should NOT include libraries or ld flags like -lwhatever. If you
5198 want $package to honor its debug switch, you should include -DDEBUGGING here.
5199 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
5201 To use no flags, specify the word "none".
5207 rp="Any additional cc flags?"
5214 : the following weeds options from ccflags that are of no interest to cpp
5216 '') cppflags="$ccflags" ;;
5217 *) cppflags="$cppflags $ccflags" ;;
5219 case "$gccversion" in
5220 1*) cppflags="$cppflags -D__GNUC__"
5222 case "$mips_type" in
5224 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
5230 echo "Let me guess what the preprocessor flags are..." >&4
5244 *) ftry="$previous $flag";;
5246 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
5247 >cpp1.out 2>/dev/null && \
5248 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
5249 >cpp2.out 2>/dev/null && \
5250 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
5251 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
5253 cppflags="$cppflags $ftry"
5263 *-*) echo "They appear to be: $cppflags";;
5265 $rm -f cpp.c cpp?.out
5269 : flags used in final linking phase
5271 '') if ./venix; then
5277 *-posix*) dflt="$dflt -posix" ;;
5280 *) dflt="$ldflags";;
5282 # See note above about -fstack-protector
5284 *-fstack-protector*)
5286 *-fstack-protector*) ;; # Don't add it again
5287 *) dflt="$dflt -fstack-protector" ;;
5292 : Try to guess additional flags to pick up local libraries.
5293 for thislibdir in $libpth; do
5294 case " $loclibpth " in
5297 *"-L$thislibdir "*) ;;
5298 *) dflt="$dflt -L$thislibdir" ;;
5310 Your C linker may need flags. For this question you should
5311 include -L/whatever and any other flags used by the C linker, but you
5312 should NOT include libraries like -lwhatever.
5314 Make sure you include the appropriate -L/path flags if your C linker
5315 does not normally search all of the directories you specified above,
5318 To use no flags, specify the word "none".
5322 rp="Any additional ld flags (NOT including libraries)?"
5328 rmlist="$rmlist pdp11"
5332 echo "Checking your choice of C compiler and flags for coherency..." >&4
5333 $cat > try.c <<'EOF'
5335 int main() { printf("Ok\n"); return(0); }
5337 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
5339 $cat >try.msg <<'EOM'
5340 I've tried to compile and run the following simple program:
5343 $cat try.c >> try.msg
5345 $cat >> try.msg <<EOM
5352 and I got the following output:
5356 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
5357 if $sh -c "$run ./try " >>try.msg 2>&1; then
5361 *) echo 'The program compiled OK, but produced no output.' >> try.msg
5364 cat >> try.msg <<'EOQS'
5365 If $libs contains -lsfio, and sfio is mis-configured, then it
5366 sometimes (apparently) runs and exits with a 0 status, but with no
5367 output! It may have to do with sfio's use of _exit vs. exit.
5370 rp="You have a big problem. Shall I abort Configure"
5377 echo "The program compiled OK, but exited with status $?." >>try.msg
5378 rp="You have a problem. Shall I abort Configure"
5382 echo "I can't compile the test program." >>try.msg
5383 rp="You have a BIG problem. Shall I abort Configure"
5389 case "$knowitall" in
5391 echo "(The supplied flags or libraries might be incorrect.)"
5399 *) echo "Ok. Stopping Configure." >&4
5404 n) echo "OK, that should do.";;
5406 $rm_try gcctest gcctest.out
5408 : define a shorthand compile call
5412 case "$usedevel" in $define|true|[yY]*) if $test ! -f "${mc_file}.c"; then
5413 echo "Internal Configure script bug - compiler test file ${mc_file}.c is missing. Please report this to perlbug@perl.org" >&4;
5417 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
5418 : define a shorthand compile call for compilations that should be ok.
5422 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
5424 : determine filename position in cpp output
5426 echo "Computing filename position in cpp output for #include directives..." >&4
5428 vos) testaccess=-e ;;
5431 echo '#include <stdio.h>' > foo.c
5434 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5435 $grep '^[ ]*#.*stdio\.h' | \
5436 while read cline; do
5439 while $test \$# -gt 0; do
5440 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5445 pos=\`expr \$pos + 1\`
5457 *) pos="${fieldn}th";;
5459 echo "Your cpp writes the filename in the $pos field of the line."
5462 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
5463 os2) cppfilter="sed -e 's|\\\\\\\\|/|g' |" ;; # path component separator is \
5466 : locate header file
5471 for usrincdir in $usrinc
5473 if test -f \$usrincdir/\$wanted; then
5474 echo "\$usrincdir/\$wanted"
5478 awkprg='{ print \$$fieldn }'
5479 echo "#include <\$wanted>" > foo\$\$.c
5480 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5481 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5482 while read cline; do
5483 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5485 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5486 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5491 # status = 0: grep returned 0 lines, case statement not executed
5492 # status = 1: headerfile found
5493 # status = 2: while loop executed, no headerfile found
5497 if test \$status -eq 1; then
5504 : define an alternate in-header-list? function
5505 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5506 cont=true; xxf="echo \"<\$1> found.\" >&4";
5507 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5508 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5510 case $# in 4) instead=instead;; *) instead="at last";; esac;
5511 while $test "$cont"; do
5513 var=$2; eval "was=\$$2";
5514 if $test "$xxx" && $test -r "$xxx";
5516 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5519 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5520 set $yyy; shift; shift; yyy=$@;
5521 case $# in 0) cont="";;
5522 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5523 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5524 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5525 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5529 do set $yyy; var=$2; eval "was=\$$2";
5530 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5531 set $yyy; shift; shift; yyy=$@;
5534 : see if stdlib is available
5535 set stdlib.h i_stdlib
5538 : check for lengths of integral types
5542 echo "Checking to see how big your integers are..." >&4
5551 printf("intsize=%d;\n", (int)sizeof(int));
5552 printf("longsize=%d;\n", (int)sizeof(long));
5553 printf("shortsize=%d;\n", (int)sizeof(short));
5558 if eval $compile_ok && $run ./try > /dev/null; then
5560 echo "Your integers are $intsize bytes long."
5561 echo "Your long integers are $longsize bytes long."
5562 echo "Your short integers are $shortsize bytes long."
5566 Help! I can't compile and run the intsize test program: please enlighten me!
5567 (This is probably a misconfiguration in your system or libraries, and
5568 you really ought to fix it. Still, I'll try anyway.)
5572 rp="What is the size of an integer (in bytes)?"
5576 rp="What is the size of a long integer (in bytes)?"
5580 rp="What is the size of a short integer (in bytes)?"
5588 : check for long long
5590 echo "Checking to see if you have long long..." >&4
5591 echo 'int main() { long long x = 7; return 0; }' > try.c
5593 if eval $compile; then
5595 echo "You have long long."
5598 echo "You do not have long long."
5604 : check for length of long long
5605 case "${d_longlong}${longlongsize}" in
5608 echo "Checking to see how big your long longs are..." >&4
5609 $cat >try.c <<'EOCP'
5613 printf("%d\n", (int)sizeof(long long));
5618 if eval $compile_ok; then
5619 longlongsize=`$run ./try`
5620 echo "Your long longs are $longlongsize bytes long."
5624 echo "(I can't seem to compile the test program. Guessing...)"
5625 rp="What is the size of a long long (in bytes)?"
5629 if $test "X$longsize" = "X$longlongsize"; then
5630 echo "(That isn't any different from an ordinary long.)"
5636 : see if inttypes.h is available
5637 : we want a real compile instead of Inhdr because some systems
5638 : have an inttypes.h which includes non-existent headers
5641 #include <inttypes.h>
5643 static int32_t foo32 = 0x12345678;
5647 if eval $compile; then
5648 echo "<inttypes.h> found." >&4
5651 echo "<inttypes.h> NOT found." >&4
5660 echo "Checking to see if you have int64_t..." >&4
5662 #include <sys/types.h>
5663 #$i_inttypes I_INTTYPES
5665 #include <inttypes.h>
5667 int main() { int64_t x = 7; }
5670 if eval $compile; then
5672 echo "You have int64_t."
5675 echo "You do not have int64_t."
5681 : Check if 64bit ints have a quad type
5683 echo "Checking which 64-bit integer type we could use..." >&4
5689 val='"unsigned int"'
5694 *) case "$longsize" in
5698 val='"unsigned long"'
5703 *) case "$d_longlong:$longlongsize" in
5708 val='"unsigned long long"'
5713 *) case "$d_int64_t" in
5732 '') echo "Alas, no 64-bit integer types in sight." >&4
5735 *) echo "We could use '$quadtype' for 64-bit integers." >&4
5740 : Do we want 64bit support
5741 case "$uselonglong" in
5742 "$define"|true|[yY]*)
5745 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
5747 use64bitint="$define"
5750 case "$use64bits" in
5751 "$define"|true|[yY]*)
5754 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
5756 use64bitint="$define"
5759 case "$use64bitints" in
5760 "$define"|true|[yY]*)
5763 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
5765 use64bitint="$define"
5768 case "$use64bitsint" in
5769 "$define"|true|[yY]*)
5772 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
5774 use64bitint="$define"
5777 case "$uselonglongs" in
5778 "$define"|true|[yY]*)
5781 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
5783 use64bitint="$define"
5786 case "$use64bitsall" in
5787 "$define"|true|[yY]*)
5790 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
5792 use64bitall="$define"
5797 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
5799 case "$use64bitall" in
5800 "$define"|true|[yY]*) use64bitint="$define" ;;
5806 You have natively 64-bit long integers.
5810 *) case "$use64bitint" in
5811 "$define"|true|[yY]*) dflt='y';;
5820 Perl can be built to take advantage of 64-bit integer types
5821 on some systems. To do so, Configure can be run with -Duse64bitint.
5822 Choosing this option will most probably introduce binary incompatibilities.
5824 If this doesn't make any sense to you, just accept the default '$dflt'.
5825 (The default has been chosen based on your configuration.)
5827 rp='Try to use 64-bit integers, if available?'
5830 [yY]*) val="$define" ;;
5838 case "$use64bitall" in
5839 "$define"|true|[yY]*) dflt='y' ;;
5840 *) case "$longsize" in
5848 You may also choose to try maximal 64-bitness. It means using as much
5849 64-bitness as possible on the platform. This in turn means even more
5850 binary incompatibilities. On the other hand, your platform may not
5851 have any more 64-bitness available than what you already have chosen.
5853 If this doesn't make any sense to you, just accept the default '$dflt'.
5854 (The default has been chosen based on your configuration.)
5856 rp='Try to use maximal 64-bit support, if available?'
5859 [yY]*) val="$define" ;;
5864 case "$use64bitall" in
5866 case "$use64bitint" in
5870 Since you have chosen a maximally 64-bit build, I'm also turning on
5871 the use of 64-bit integers.
5873 use64bitint="$define" ;;
5878 : Look for a hint-file generated 'call-back-unit'. If the
5879 : user has specified that a 64-bit perl is to be built,
5880 : we may need to set or change some other defaults.
5881 if $test -f use64bitint.cbu; then
5882 echo "Your platform has some specific hints regarding 64-bit integers, using them..."
5885 case "$use64bitint" in
5886 "$define"|true|[yY]*)
5888 4) case "$archname64" in
5889 '') archname64=64int ;;
5896 : Look for a hint-file generated 'call-back-unit'. If the
5897 : user has specified that a maximally 64-bit perl is to be built,
5898 : we may need to set or change some other defaults.
5899 if $test -f use64bitall.cbu; then
5900 echo "Your platform has some specific hints regarding 64-bit builds, using them..."
5903 case "$use64bitall" in
5904 "$define"|true|[yY]*)
5906 4) case "$archname64" in
5907 ''|64int) archname64=64all ;;
5914 case "$d_quad:$use64bitint" in
5918 *** You have chosen to use 64-bit integers,
5919 *** but none can be found.
5920 *** Please rerun Configure without -Duse64bitint and/or -Dusemorebits.
5921 *** Cannot continue, aborting.
5928 : check for length of double
5930 case "$doublesize" in
5932 echo "Checking to see how big your double precision numbers are..." >&4
5941 printf("%d\n", (int)sizeof(double));
5946 if eval $compile_ok; then
5947 doublesize=`$run ./try`
5948 echo "Your double is $doublesize bytes long."
5951 echo "(I can't seem to compile the test program. Guessing...)"
5952 rp="What is the size of a double precision number (in bytes)?"
5960 : check for long doubles
5962 echo "Checking to see if you have long double..." >&4
5963 echo 'int main() { long double x = 7.0; }' > try.c
5965 if eval $compile; then
5967 echo "You have long double."
5970 echo "You do not have long double."
5976 : check for length of long double
5977 case "${d_longdbl}${longdblsize}" in
5980 echo "Checking to see how big your long doubles are..." >&4
5981 $cat >try.c <<'EOCP'
5985 printf("%d\n", sizeof(long double));
5990 if eval $compile; then
5991 longdblsize=`$run ./try`
5992 echo "Your long doubles are $longdblsize bytes long."
5996 echo "(I can't seem to compile the test program. Guessing...)" >&4
5997 rp="What is the size of a long double (in bytes)?"
6001 if $test "X$doublesize" = "X$longdblsize"; then
6002 echo "That isn't any different from an ordinary double."
6003 echo "I'll keep your setting anyway, but you may see some"
6004 echo "harmless compilation warnings."
6010 : determine the architecture name
6012 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
6013 tarch=`arch`"-$osname"
6014 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
6015 if uname -m > tmparch 2>&1 ; then
6016 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
6017 -e 's/$/'"-$osname/" tmparch`
6025 case "$myarchname" in
6028 echo "(Your architecture name used to be $myarchname.)"
6032 case "$targetarch" in
6034 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
6039 *) dflt="$archname";;
6041 rp='What is your architecture name'
6044 case "$usethreads" in
6046 echo "Threads selected." >&4
6048 *-thread*) echo "...and architecture name already has -thread." >&4
6050 *) archname="$archname-thread"
6051 echo "...setting architecture name to $archname." >&4
6056 case "$usemultiplicity" in
6058 echo "Multiplicity selected." >&4
6060 *-multi*) echo "...and architecture name already has -multi." >&4
6062 *) archname="$archname-multi"
6063 echo "...setting architecture name to $archname." >&4
6068 case "$use64bitint$use64bitall" in
6070 case "$archname64" in
6072 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
6075 case "$use64bitint" in
6076 "$define") echo "64 bit integers selected." >&4 ;;
6078 case "$use64bitall" in
6079 "$define") echo "Maximal 64 bitness selected." >&4 ;;
6082 *-$archname64*) echo "...and architecture name already has $archname64." >&4
6084 *) archname="$archname-$archname64"
6085 echo "...setting architecture name to $archname." >&4
6091 case "$uselongdouble" in
6093 echo "Long doubles selected." >&4
6094 case "$longdblsize" in
6096 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
6100 *-ld*) echo "...and architecture name already has -ld." >&4
6102 *) archname="$archname-ld"
6103 echo "...setting architecture name to $archname." >&4
6110 case "$useperlio" in
6112 echo "Perlio selected." >&4
6115 echo "Perlio not selected, using stdio." >&4
6117 *-stdio*) echo "...and architecture name already has -stdio." >&4
6119 *) archname="$archname-stdio"
6120 echo "...setting architecture name to $archname." >&4
6125 if $test -f archname.cbu; then
6126 echo "Your platform has some specific hints for architecture name, using them..."
6130 : set the prefixit variable, to compute a suitable default value
6131 prefixit='case "$3" in
6133 case "$oldprefix" in
6134 "") eval "$1=\"\$$2\"";;
6141 ""|" ") eval "$1=\"\$$2\"";;
6147 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
6149 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
6150 /*-$oldprefix/*|\~*-$oldprefix/*)
6151 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
6152 *) eval "$1=\"\$$2\"";;
6156 : determine installation style
6157 : For now, try to deduce it from prefix unless it is already set.
6158 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
6159 case "$installstyle" in
6160 '') case "$prefix" in
6161 *perl*) dflt='lib';;
6162 *) dflt='lib/perl5' ;;
6165 *) dflt="$installstyle" ;;
6167 : Probably not worth prompting for this since we prompt for all
6168 : the directories individually, and the prompt would be too long and
6172 : determine where public executables go
6177 rp='Pathname where the public executables will reside?'
6179 if $test "X$ansexp" != "X$binexp"; then
6183 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
6184 : XXX If this is fixed, also fix the "start perl" hunk below, which relies on
6185 : this via initialinstalllocation
6188 case "$userelocatableinc" in
6189 $define|true|[yY]*) dflt='y' ;;
6194 Would you like to build Perl so that the installation is relocatable, so that
6195 library paths in @INC are determined relative to the path of the perl binary?
6196 This is not advised for system Perl installs, or if you need to run setid
6197 scripts or scripts under taint mode.
6199 If this doesn't make any sense to you, just accept the default '$dflt'.
6201 rp='Use relocatable @INC?'
6204 y|Y) val="$define" ;;
6207 set userelocatableinc
6210 initialinstalllocation="$binexp"
6211 : Default prefix is now "up one level from where the binaries are"
6212 case "$userelocatableinc" in
6218 installprefixexp=".../.."
6222 : determine where private library files go
6223 : Usual default is /usr/local/lib/perl5/$version.
6224 : Also allow things like /opt/perl/lib/$version, since
6225 : /opt/perl/lib/perl5... would be redundant.
6226 : The default "style" setting is made in installstyle.U
6227 case "$installstyle" in
6228 *lib/perl5*) set dflt privlib lib/$package/$version ;;
6229 *) set dflt privlib lib/$version ;;
6234 There are some auxiliary files for $package that need to be put into a
6235 private library directory that is accessible by everyone.
6240 rp='Pathname where the private library files will reside?'
6245 : set the prefixup variable, to restore leading tilda escape
6246 prefixup='case "$prefixexp" in
6248 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
6251 : determine where public architecture dependent libraries go
6254 : privlib default is /usr/local/lib/$package/$version
6255 : archlib default is /usr/local/lib/$package/$version/$archname
6256 : privlib may have an optional trailing /share.
6257 tdflt=`echo $privlib | $sed 's,/share$,,'`
6258 tdflt=$tdflt/$archname
6267 $spackage contains architecture-dependent library files. If you are
6268 sharing libraries in a heterogeneous environment, you might store
6269 these files in a separate location. Otherwise, you can just include
6270 them with the rest of the public library files.
6275 rp='Where do you want to put the public architecture-dependent libraries?'
6279 if $test X"$archlib" = X"$privlib"; then
6285 : see if setuid scripts can be secure
6288 Some kernels have a bug that prevents setuid #! scripts from being
6289 secure. Some sites have disabled setuid #! scripts because of this.
6291 First let's decide if your kernel supports secure setuid #! scripts.
6292 (If setuid #! scripts would be secure but have been disabled anyway,
6293 don't say that they are secure if asked.)
6298 if $test -d /dev/fd; then
6299 echo "#!$ls" >reflect
6300 chmod +x,u+s reflect
6301 ./reflect >flect 2>&1
6302 if $contains "/dev/fd" flect >/dev/null; then
6303 echo "Congratulations, your kernel has secure setuid scripts!" >&4
6307 If you are not sure if they are secure, I can check but I'll need a
6308 username and password different from the one you are using right now.
6309 If you don't have such a username or don't want me to test, simply
6313 rp='Other username to test security of setuid scripts with?'
6318 case "$d_suidsafe" in
6319 '') echo "I'll assume setuid scripts are *not* secure." >&4
6322 echo "Well, the $hint value is *not* secure." >&4
6324 *) echo "Well, the $hint value *is* secure." >&4
6329 $rm -f reflect flect
6330 echo "#!$ls" >reflect
6331 chmod +x,u+s reflect
6334 echo '"su" will (probably) prompt you for '"$ans's password."
6335 su $ans -c './reflect >flect'
6336 if $contains "/dev/fd" flect >/dev/null; then
6337 echo "Okay, it looks like setuid scripts are secure." >&4
6340 echo "I don't think setuid scripts are secure." >&4
6345 rp='Does your kernel have *secure* setuid scripts?'
6348 [yY]*) val="$define";;
6353 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
6354 echo "(That's for file descriptors, not floppy disks.)"
6360 $rm -f reflect flect
6362 : now see if they want to do setuid emulation
6365 case "$d_suidsafe" in
6368 echo "No need to emulate SUID scripts since they are secure here." >&4
6372 Some systems have disabled setuid scripts, especially systems where
6373 setuid scripts cannot be secure. On systems where setuid scripts have
6374 been disabled, the setuid/setgid bits on scripts are currently
6375 useless. It is possible for $package to detect those bits and emulate
6376 setuid/setgid in a secure fashion. This emulation will only work if
6377 setuid scripts have been disabled in your kernel.
6381 "$define") dflt=y ;;
6384 rp="Do you want to do setuid/setgid emulation?"
6387 [yY]*) val="$define";;
6395 : Find perl5.005 or later.
6396 echo "Looking for a previously installed perl5.005 or later... "
6398 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
6399 : Check if this perl is recent and can load a simple module
6400 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6403 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6413 '') echo "None found. That's ok.";;
6414 *) echo "Using $perl5." ;;
6417 : Set the siteprefix variables
6420 After $package is installed, you may wish to install various
6421 add-on modules and utilities. Typically, these add-ons will
6422 be installed under $prefix with the rest
6423 of this package. However, you may wish to install such add-ons
6424 elsewhere under a different prefix.
6426 If you do not wish to put everything under a single prefix, that's
6427 ok. You will be prompted for the individual locations; this siteprefix
6428 is only used to suggest the defaults.
6430 The default should be fine for most people.
6434 rp='Installation prefix to use for add-on modules and utilities?'
6435 : XXX Here might be another good place for an installstyle setting.
6436 case "$siteprefix" in
6438 *) dflt=$siteprefix ;;
6441 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6443 case "$siteprefix" in
6447 *) oldsiteprefix="$prefix";;
6452 siteprefixexp="$ansexp"
6454 : determine where site specific libraries go.
6455 : Usual default is /usr/local/lib/perl5/site_perl/$version
6456 : The default "style" setting is made in installstyle.U
6457 : XXX No longer works with Prefixit stuff.
6458 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6460 '') case "$installstyle" in
6461 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
6462 *) dflt=$siteprefix/lib/site_$prog/$version ;;
6470 The installation process will create a directory for
6471 site-specific extensions and modules. Most users find it convenient
6472 to place all site-specific files in this directory rather than in the
6473 main distribution directory.
6477 rp='Pathname for the site-specific library files?'
6481 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
6483 : Determine list of previous versions to include in @INC
6484 $cat > getverlist <<EOPL
6487 \$api_versionstring = "$api_versionstring";
6488 \$version = "$version";
6489 \$stem = "$sitelib_stem";
6490 \$archname = "$archname";
6492 $cat >> getverlist <<'EOPL'
6493 # The list found is store twice for each entry: the original name, and
6494 # the binary broken down version as pack "sss", so sorting is easy and
6495 # unambiguous. This will work for all versions that have a maximum of
6496 # three digit groups, separate by '.'s or '_'s. Names are extended with
6497 # ".0.0" to ensure at least three elements for the pack.
6498 # -- H.Merijn Brand (m)'06 23-10-2006
6500 # Can't have leading @ because metaconfig interprets it as a command!
6501 ;@inc_version_list=();
6502 # XXX Redo to do opendir/readdir?
6505 ;@candidates = map {
6506 [ $_, pack "sss", split m/[._]/, "$_.0.0" ] } glob("5.*");
6512 ($pversion, $aversion, $vsn5005) = map {
6513 pack "sss", split m/[._]/, "$_.0.0" } $version, $api_versionstring, "5.005";
6514 foreach $d (@candidates) {
6515 if ($d->[1] lt $pversion) {
6516 if ($d->[1] ge $aversion) {
6517 unshift(@inc_version_list, grep { -d } $d->[0]."/$archname", $d->[0]);
6519 elsif ($d->[1] ge $vsn5005) {
6520 unshift(@inc_version_list, grep { -d } $d->[0]);
6524 # Skip newer version. I.e. don't look in
6525 # 5.7.0 if we're installing 5.6.1.
6529 if (@inc_version_list) {
6530 print join(' ', @inc_version_list);
6533 # Blank space to preserve value for next Configure run.
6538 case "$inc_version_list" in
6539 '') if test -x "$perl5$exe_ext"; then
6540 dflt=`$perl5 getverlist`
6545 $undef) dflt='none' ;;
6546 *) eval dflt=\"$inc_version_list\" ;;
6549 ''|' ') dflt=none ;;
6556 In order to ease the process of upgrading, this version of perl
6557 can be configured to use modules built and installed with earlier
6558 versions of perl that were installed under $prefix. Specify here
6559 the list of earlier versions that this version of perl should check.
6560 If Configure detected no earlier versions of perl installed under
6561 $prefix, then the list will be empty. Answer 'none' to tell perl
6562 to not search earlier versions.
6564 The default should almost always be sensible, so if you're not sure,
6565 just accept the default.
6568 rp='List of earlier versions to include in @INC?'
6571 [Nn]one|''|' '|$undef) inc_version_list=' ' ;;
6572 *) inc_version_list="$ans" ;;
6574 case "$inc_version_list" in
6576 inc_version_list_init='0'
6577 d_inc_version_list="$undef"
6579 *) inc_version_list_init=`echo $inc_version_list |
6580 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
6581 d_inc_version_list="$define"
6586 : see if malloc/malloc.h has to be included
6587 set malloc/malloc.h i_mallocmalloc
6590 : see if this is a malloc.h system
6591 : we want a real compile instead of Inhdr because some systems have a
6592 : malloc.h that just gives a compile error saying to use stdlib.h instead
6597 #$i_mallocmalloc I_MALLOCMALLOC
6598 #ifdef I_MALLOCMALLOC
6599 # include <malloc/malloc.h>
6602 int main () { return 0; }
6605 if eval $compile; then
6606 echo "<malloc.h> found." >&4
6609 echo "<malloc.h> NOT found." >&4
6616 : check for void type
6618 echo "Checking to see how well your C compiler groks the void type..." >&4
6619 case "$voidflags" in
6631 extern void moo(); /* function returning void */
6632 void (*goo)(); /* ptr to func returning void */
6634 void *hue; /* generic ptr */
6647 int main() { sub(); }
6649 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
6650 voidflags=$defvoidused
6651 echo "Good. It appears to support void to the level $package wants.">&4
6652 if $contains warning .out >/dev/null 2>&1; then
6653 echo "However, you might get some warnings that look like this:"
6657 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
6658 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
6659 echo "It supports 1..."
6660 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
6661 echo "It also supports 2..."
6662 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
6664 echo "And it supports 4 but not 8 definitely."
6666 echo "It doesn't support 4..."
6667 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
6669 echo "But it supports 8."
6672 echo "Neither does it support 8."
6676 echo "It does not support 2..."
6677 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
6679 echo "But it supports 4 and 8."
6681 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
6683 echo "And it supports 4 but has not heard about 8."
6685 echo "However it supports 8 but not 4."
6690 echo "There is no support at all for void."
6695 case "$voidflags" in
6698 Support flag bits are:
6699 1: basic void declarations.
6700 2: arrays of pointers to functions returning void.
6701 4: operations between pointers to and addresses of void functions.
6702 8: generic void pointers.
6705 rp="Your void support flags add up to what?"
6712 : check for length of pointer
6716 echo "Checking to see how big your pointers are..." >&4
6717 if test "$voidflags" -gt 7; then
6718 echo '#define VOID_PTR char *' > try.c
6720 echo '#define VOID_PTR void *' > try.c
6730 printf("%d\n", (int)sizeof(VOID_PTR));
6735 if eval $compile_ok; then
6736 ptrsize=`$run ./try`
6737 echo "Your pointers are $ptrsize bytes long."
6740 echo "(I can't seem to compile the test program. Guessing...)" >&4
6741 rp="What is the size of a pointer (in bytes)?"
6748 case "$use64bitall" in
6749 "$define"|true|[yY]*)
6753 *** You have chosen a maximally 64-bit build,
6754 *** but your pointers are only 4 bytes wide.
6755 *** Please rerun Configure without -Duse64bitall.
6760 *** Since you have quads, you could possibly try with -Duse64bitint.
6765 *** Cannot continue, aborting.
6776 : determine whether to use malloc wrapping
6778 case "$usemallocwrap" in
6779 [yY]*|true|$define) dflt='y' ;;
6780 [nN]*|false|$undef) dflt='n' ;;
6781 *) case "$usedevel" in
6782 [yY]*|true|$define) dflt='y' ;;
6787 rp="Do you wish to wrap malloc calls to protect against potential overflows?"
6789 usemallocwrap="$ans"
6792 usemallocwrap="$define" ;;
6794 usemallocwrap="$undef" ;;
6797 : determine which malloc to compile in
6799 case "$usemymalloc" in
6800 [yY]*|true|$define) dflt='y' ;;
6801 [nN]*|false|$undef) dflt='n' ;;
6802 *) case "$ptrsize" in
6808 rp="Do you wish to attempt to use the malloc that comes with $package?"
6814 mallocsrc='malloc.c'
6815 mallocobj="malloc$_o"
6816 d_mymalloc="$define"
6819 : Remove malloc from list of libraries to use
6820 echo "Removing unneeded -lmalloc from library list" >&4
6821 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
6824 echo "libs = $libs" >&4
6836 : compute the return types of malloc and free
6838 $cat >malloc.c <<END
6842 #include <sys/types.h>
6856 case "$malloctype" in
6858 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
6865 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
6869 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
6876 echo "Your system uses $freetype free(), it would seem." >&4
6878 : determine where site specific architecture-dependent libraries go.
6879 : sitelib default is /usr/local/lib/perl5/site_perl/$version
6880 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
6881 : sitelib may have an optional trailing /share.
6883 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
6884 dflt="$dflt/$archname"
6889 set sitearch sitearch none
6893 The installation process will also create a directory for
6894 architecture-dependent site-specific extensions and modules.
6898 rp='Pathname for the site-specific architecture-dependent library files?'
6902 if $test X"$sitearch" = X"$sitelib"; then
6905 d_sitearch="$define"
6908 : Set the vendorprefix variables
6911 The installation process will also create a directory for
6912 vendor-supplied add-ons. Vendors who supply perl with their system
6913 may find it convenient to place all vendor-supplied files in this
6914 directory rather than in the main distribution directory. This will
6915 ease upgrades between binary-compatible maintenance versions of perl.
6917 Of course you may also use these directories in whatever way you see
6918 fit. For example, you might use them to access modules shared over a
6919 company-wide network.
6921 The default answer should be fine for most people.
6922 This causes further questions about vendor add-ons to be skipped
6923 and no vendor-specific directories will be configured for perl.
6926 rp='Do you want to configure vendor-specific add-on directories?'
6927 case "$usevendorprefix" in
6928 define|true|[yY]*) dflt=y ;;
6929 *) : User may have set vendorprefix directly on Configure command line.
6930 case "$vendorprefix" in
6939 rp='Installation prefix to use for vendor-supplied add-ons?'
6940 case "$vendorprefix" in
6942 *) dflt=$vendorprefix ;;
6945 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6947 case "$vendorprefix" in
6951 *) oldvendorprefix="$prefix";;
6955 usevendorprefix="$define"
6957 vendorprefixexp="$ansexp"
6959 *) usevendorprefix="$undef"
6965 : Set the vendorlib variables
6966 case "$vendorprefix" in
6967 '') d_vendorlib="$undef"
6971 *) d_vendorlib="$define"
6972 : determine where vendor-supplied modules go.
6973 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
6974 case "$vendorlib" in
6976 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6977 case "$installstyle" in
6978 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
6979 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
6982 *) dflt="$vendorlib"
6986 rp='Pathname for the vendor-supplied library files?'
6989 vendorlibexp="$ansexp"
6992 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
6996 : Set the vendorarch variables
6997 case "$vendorprefix" in
6998 '') d_vendorarch="$undef"
7002 *) d_vendorarch="$define"
7003 : determine where vendor-supplied architecture-dependent libraries go.
7004 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
7005 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
7006 : vendorlib may have an optional trailing /share.
7007 case "$vendorarch" in
7008 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
7009 dflt="$dflt/$archname"
7011 *) dflt="$vendorarch" ;;
7014 rp='Pathname for vendor-supplied architecture-dependent files?'
7017 vendorarchexp="$ansexp"
7020 prefixvar=vendorarch
7023 : Final catch-all directories to search
7026 Lastly, you can have perl look in other directories for extensions and
7027 modules in addition to those already specified.
7028 These directories will be searched after
7032 test X"$vendorlib" != "X" && echo ' ' $vendorlib
7033 test X"$vendorarch" != "X" && echo ' ' $vendorarch
7035 case "$otherlibdirs" in
7036 ''|' ') dflt='none' ;;
7037 *) dflt="$otherlibdirs" ;;
7040 Enter a colon-separated set of extra paths to include in perl's @INC
7041 search path, or enter 'none' for no extra paths.
7045 rp='Colon-separated list of additional directories for perl to search?'
7048 ' '|''|none) otherlibdirs=' ' ;;
7049 *) otherlibdirs="$ans" ;;
7051 case "$otherlibdirs" in
7055 set d_perl_otherlibdirs
7058 : Cruising for prototypes
7060 echo "Checking out function prototypes..." >&4
7061 $cat >prototype.c <<EOCP
7066 int main(int argc, char *argv[]) {
7069 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
7070 echo "Your C compiler appears to support function prototypes."
7073 echo "Your C compiler doesn't seem to understand function prototypes."
7080 : Check if ansi2knr is required
7081 case "$prototype" in
7083 *) ansi2knr='ansi2knr'
7088 This version of $package can only be compiled by a compiler that
7089 understands function prototypes. Unfortunately, your C compiler
7091 doesn't seem to understand them. Sorry about that.
7093 If GNU cc is available for your system, perhaps you could try that instead.
7095 Eventually, we hope to support building Perl with pre-ANSI compilers.
7096 If you would like to help in that effort, please contact <perlbug@perl.org>.
7098 Aborting Configure now.
7105 dflt_dtrace='/usr/sbin/dtrace'
7108 Perl can be built to support DTrace on platforms that support it.
7109 DTrace is a diagnosis and performance analysis tool from Sun.
7111 If this doesn't make any sense to you, just accept the default '$dflt'.
7115 case "$usedtrace" in
7121 dflt_dtrace=$usedtrace
7128 rp='Support DTrace if available?'
7131 y|Y) val="$define" ;;
7137 test "X$usedtrace" != "X$define" && break
7140 rp='Where is the dtrace executable?'
7149 if $dtrace -h -s ../perldtrace.d \
7150 -o perldtrace.tmp >/dev/null 2>&1 \
7151 && rm -f perldtrace.tmp
7154 echo "Good: your $dtrace knows about the -h flag."
7158 *** $me: Fatal Error: $dtrace doesn't support -h flag
7160 *** Your installed dtrace doesn't support the -h switch to compile a D
7161 *** program into a C header. Can't continue.
7173 *** $me: Fatal Error: $dtrace not found.
7180 echo "*** $dtrace was not found."
7186 : See if we want extra modules installed
7193 Perl can be built with extra modules or bundles of modules which
7194 will be fetched from the CPAN and installed alongside Perl.
7196 Notice that you will need access to the CPAN; either via the Internet,
7197 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
7198 be asked later to configure the CPAN.pm module which will in turn do
7199 the installation of the rest of the extra modules or bundles.)
7201 Notice also that if the modules require any external software such as
7202 libraries and headers (the libz library and the zlib.h header for the
7203 Compress::Zlib module, for example) you MUST have any such software
7204 already installed, this configuration process will NOT install such
7207 If this doesn't make any sense to you, just accept the default '$dflt'.
7209 rp='Install any extra modules (y or n)?'
7215 Please list any extra modules or bundles to be installed from CPAN,
7216 with spaces between the names. The names can be in any format the
7217 'install' command of CPAN.pm will understand. (Answer 'none',
7218 without the quotes, to install no extra modules or bundles.)
7228 $rm -f ../extras.lst
7230 *) echo "(Saving the list of extras for later...)"
7231 echo "$extras" > ../extras.lst
7239 : determine where html pages for programs go
7240 set html1dir html1dir none
7244 If you wish to install html files for programs in $spackage, indicate
7245 the appropriate directory here. To skip installing html files,
7249 ''|none|$undef|' ') dflt=none ;;
7250 *) dflt=$html1dir ;;
7253 rp="Directory for the main $spackage html pages?"
7257 : Use ' ' for none so value is preserved next time through Configure
7258 $test X"$html1dir" = "X" && html1dir=' '
7260 : determine where html pages for libraries and modules go
7261 set html3dir html3dir none
7265 If you wish to install html files for modules associated with $spackage,
7266 indicate the appropriate directory here. To skip installing html files,
7269 : There is no obvious default. If they have specified html1dir, then
7270 : try to key off that, possibly changing .../html1 into .../html3.
7272 '') html3dir=`echo "$html1dir" | $sed 's/1$/3$/'` ;;
7273 *) dflt=$html3dir ;;
7276 rp="Directory for the $spackage module html pages?"
7280 : Use ' ' for none so value is preserved next time through Configure
7281 $test X"$html3dir" = "X" && html3dir=' '
7283 : determine whether to install perl also as /usr/bin/perl
7286 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
7288 Many scripts expect perl to be installed as /usr/bin/perl.
7290 If you want to, I can install the perl you are about to compile
7291 as /usr/bin/perl (in addition to $bin/perl).
7293 if test -f /usr/bin/perl; then
7296 However, please note that because you already have a /usr/bin/perl,
7297 overwriting that with a new Perl would very probably cause problems.
7298 Therefore I'm assuming you don't want to do that (unless you insist).
7301 case "$installusrbinperl" in
7302 "$define"|[yY]*) dflt='y';;
7308 Since you don't have a /usr/bin/perl I'm assuming creating one is okay.
7311 case "$installusrbinperl" in
7312 "$undef"|[nN]*) dflt='n';;
7316 rp="Do you want to install perl as /usr/bin/perl?"
7319 [yY]*) val="$define";;
7325 set installusrbinperl
7328 : Check if we are using the GNU C library
7330 echo "Checking for GNU C Library..." >&4
7332 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
7333 alone are insufficient to distinguish different versions, such as
7334 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
7335 libc version 2.1.0. A. Dougherty, June 3, 2002.
7341 # ifdef __GLIBC_MINOR__
7342 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 && !defined(__cplusplus)
7343 # include <gnu/libc-version.h>
7344 printf("%s\n", gnu_get_libc_version());
7346 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
7349 printf("%d\n", __GLIBC__);
7358 if eval $compile_ok && $run ./try > glibc.ver; then
7360 gnulibc_version=`$cat glibc.ver`
7361 echo "You are using the GNU C Library version $gnulibc_version"
7365 echo "You are not using the GNU C Library"
7371 : see if nm is to be used to determine whether a symbol is defined or not
7375 case "$d_gnulibc" in
7378 echo "nm probably won't work on the GNU C Library." >&4
7384 if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
7386 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
7387 echo "'nm' won't be sufficient on this sytem." >&4
7393 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
7394 if $test $dflt -gt 20; then
7404 true|$define) dflt=y;;
7411 I can use $nm to extract the symbols from your C libraries. This
7412 is a time consuming task which may generate huge output on the disk (up
7413 to 3 megabytes) but that should make the symbols extraction faster. The
7414 alternative is to skip the 'nm' extraction part and to compile a small
7415 test program instead to determine whether each symbol is present. If
7416 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
7417 this may be the best solution.
7419 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
7422 rp="Shall I use $nm to extract C symbols from the libraries?"
7425 [Nn]*) usenm=false;;
7434 : nm options which may be necessary
7436 '') if $test -f /mach_boot; then
7438 elif $test -d /usr/ccs/lib; then
7439 nm_opt='-p' # Solaris (and SunOS?)
7440 elif $test -f /dgux; then
7442 elif $test -f /lib64/rld; then
7443 nm_opt='-p' # 64-bit Irix
7449 : nm options which may be necessary for shared libraries but illegal
7450 : for archive libraries. Thank you, Linux.
7451 case "$nm_so_opt" in
7452 '') case "$myuname" in
7454 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
7455 nm_so_opt='--dynamic'
7462 : Figure out where the libc is located
7465 : get list of predefined functions in a handy place
7470 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
7476 *) for thislib in $libs; do
7479 : Handle C library specially below.
7482 thislib=`echo $thislib | $sed -e 's/^-l//'`
7483 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
7485 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
7487 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
7489 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
7491 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
7493 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
7495 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
7500 libnames="$libnames $try"
7502 *) libnames="$libnames $thislib" ;;
7511 for xxx in $libpth; do
7512 $test -r $1 || set $xxx/libc.$so
7513 : The messy sed command sorts on library version numbers.
7515 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
7516 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
7518 s/[0-9][0-9]*/0000&/g
7519 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
7522 $sort | $sed -e 's/^.* //'`
7525 $test -r $1 || set /usr/ccs/lib/libc.$so
7526 $test -r $1 || set /lib/libsys_s$_a
7532 if $test -r "$1"; then
7533 echo "Your (shared) C library seems to be in $1."
7535 elif $test -r /lib/libc && $test -r /lib/clib; then
7536 echo "Your C library seems to be in both /lib/clib and /lib/libc."
7538 libc='/lib/clib /lib/libc'
7539 if $test -r /lib/syslib; then
7540 echo "(Your math library is in /lib/syslib.)"
7541 libc="$libc /lib/syslib"
7543 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
7544 echo "Your C library seems to be in $libc, as you said before."
7545 elif $test -r $incpath/usr/lib/libc$_a; then
7546 libc=$incpath/usr/lib/libc$_a;
7547 echo "Your C library seems to be in $libc. That's fine."
7548 elif $test -r /lib/libc$_a; then
7550 echo "Your C library seems to be in $libc. You're normal."
7552 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
7554 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
7555 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
7556 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
7558 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
7560 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
7563 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
7565 if $test -r "$tans"; then
7566 echo "Your C library seems to be in $tans, of all places."
7572 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
7576 If the guess above is wrong (which it might be if you're using a strange
7577 compiler, or your machine supports multiple models), you can override it here.
7582 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
7584 I can't seem to find your C library. I've looked in the following places:
7587 $sed 's/^/ /' libpath
7590 None of these seems to contain your C library. I need to get its name...
7595 rp='Where is your C library?'
7600 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
7601 set X `cat libnames`
7604 case $# in 1) xxx=file; esac
7605 echo "Extracting names from the following $xxx for later perusal:" >&4
7607 $sed 's/^/ /' libnames >&4
7609 $echo $n "This may take a while...$c" >&4
7613 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
7614 *) $nm $nm_opt $file 2>/dev/null;;
7619 $grep fprintf libc.tmp > libc.ptf
7620 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
7621 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
7623 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *//p'";\
7625 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7627 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
7629 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7631 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
7633 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7635 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
7637 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7639 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
7641 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7643 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
7645 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7647 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
7648 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
7650 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7652 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
7654 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7656 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
7658 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7660 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
7662 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7664 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
7666 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7668 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
7670 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7672 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
7674 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7676 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
7678 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
7681 $nm -p $* 2>/dev/null >libc.tmp
7682 $grep fprintf libc.tmp > libc.ptf
7683 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
7684 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
7690 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
7692 if $ar t $libc > libc.tmp && \
7693 $contains '^fprintf$' libc.tmp >/dev/null 2>&1
7695 for thisname in $libnames $libc; do
7696 $ar t $thisname >>libc.tmp
7698 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
7700 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
7701 for thisname in $libnames $libc; do
7702 $ar tv $thisname >>libc.tmp
7703 emximp -o tmp.imp $thisname \
7705 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
7706 < tmp.imp >>libc.tmp
7709 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
7712 echo "$ar didn't seem to work right." >&4
7713 echo "Maybe this is a Cray...trying bld instead..." >&4
7715 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list &&
7718 for thisname in $libnames; do
7720 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
7721 $ar t $thisname >>libc.tmp
7725 echo "That didn't work either. Giving up." >&4
7735 echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4
7736 dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list
7738 *) if $test -f /lib/syscalls.exp; then
7740 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
7741 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' \
7742 /lib/syscalls.exp >>libc.list
7748 $rm -f libnames libpath
7750 : see if dld is available
7754 : Check if we are using C++
7756 echo "Checking for C++..." >&4
7757 $cat >try.c <<'EOCP'
7769 if eval $compile_ok && $run ./try; then
7771 echo "You are using a C++ compiler."
7774 echo "You are not using a C++ compiler."
7780 : is a C symbol defined?
7783 -v) tf=libc.tmp; tdc="";;
7784 -a) tf=libc.tmp; tdc="[]";;
7785 *) tlook="^$1\$"; tf=libc.list; tdc="()";;
7787 case "$d_cplusplus" in
7788 $define) extern_C="extern \"C\"" ;;
7789 *) extern_C="extern" ;;
7792 case "$reuseval-$4" in
7794 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
7799 if $test "$runnm" = true; then
7800 if $contains $tlook $tf >/dev/null 2>&1; then
7802 elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
7803 echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
7804 $cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true;
7805 $test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; };
7809 echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
7810 $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
7816 $define) tval=true;;
7823 : define an is-in-libc? function
7824 inlibc='echo " "; td=$define; tu=$undef;
7825 sym=$1; var=$2; eval "was=\$$2";
7827 case "$reuseval$was" in
7837 echo "$sym() found." >&4;
7838 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
7840 echo "$sym() NOT found." >&4;
7841 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
7845 $define) echo "$sym() found." >&4;;
7846 *) echo "$sym() NOT found." >&4;;
7850 : see if dlopen exists
7852 xxx_ccflags="$ccflags"
7854 : with g++ one needs -shared to get is-in-libc to work for dlopen
7855 case "$gccversion" in
7857 *) case "$d_cplusplus" in
7858 "$define") ccflags="$ccflags -shared" ;;
7865 ccflags="$xxx_ccflags"
7867 : see if this is a unistd.h system
7868 set unistd.h i_unistd
7871 : determine which dynamic loading, if any, to compile in
7873 dldir="ext/DynaLoader"
7886 $define) dflt='y' ;;
7889 $define) dflt='y' ;;
7891 : Does a dl_xxx.xs file exist for this operating system
7892 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
7895 rp="Do you wish to use dynamic loading?"
7902 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
7903 dflt="$dldir/dl_${osname}.xs"
7904 elif $test "$d_dlopen" = "$define" ; then
7905 dflt="$dldir/dl_dlopen.xs"
7906 elif $test "$i_dld" = "$define" ; then
7907 dflt="$dldir/dl_dld.xs"
7912 *) dflt="$dldir/$dlsrc"
7915 echo "The following dynamic loading files are available:"
7916 : Can not go over to $dldir because getfile has path hard-coded in.
7917 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
7918 rp="Source file to use for dynamic loading"
7924 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
7928 Some systems may require passing special flags to $cc -c to
7929 compile modules that will be used to create a shared library.
7930 To use no flags, say "none".
7933 case "$cccdlflags" in
7934 '') case "$gccversion" in
7935 '') case "$osname" in
7937 next) dflt='none' ;;
7938 irix*) dflt='-KPIC' ;;
7939 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
7940 sunos) dflt='-pic' ;;
7944 *) case "$osname" in
7945 darwin) dflt='none' ;;
7946 linux*|svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
7951 *) dflt="$cccdlflags" ;;
7953 rp="Any special flags to pass to $cc -c to compile shared library modules?"
7956 none) cccdlflags=' ' ;;
7957 *) cccdlflags="$ans" ;;
7962 Some systems use ld to create libraries that can be dynamically loaded,
7963 while other systems (such as those using ELF) use $cc.
7967 '') $cat >try.c <<EOM
7968 /* Test for whether ELF binaries are produced */
7980 int i = open("a.out",O_RDONLY);
7983 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
7984 exit(0); /* succeed (yes, it's ELF) */
7989 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
7991 You appear to have ELF support. I'll use $cc to build dynamic libraries.
7995 echo "I'll use ld to build dynamic libraries."
8004 rp="What command should be used to create dynamic libraries?"
8010 Some systems may require passing special flags to $ld to create a
8011 library that can be dynamically loaded. If your ld flags include
8012 -L/other/path options to locate libraries outside your loader's normal
8013 search path, you may need to specify those -L options here as well. To
8014 use no flags, say "none".
8017 case "$lddlflags" in
8018 '') case "$osname" in
8019 beos) dflt='-nostart' ;;
8020 haiku) dflt='-shared' ;;
8022 case "$gccversion" in
8023 '') dflt="$dflt +vnocompatwarnings" ;;
8026 linux|irix*|gnu*) dflt="-shared $optimize" ;;
8027 next) dflt='none' ;;
8028 solaris) dflt='-G' ;;
8029 sunos) dflt='-assert nodefinitions' ;;
8030 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
8034 *) dflt="$lddlflags" ;;
8037 : Try to guess additional flags to pick up local libraries.
8038 : Be careful not to append to a plain 'none'
8042 for thisflag in $ldflags; do
8047 *) dflt="$dflt $thisflag" ;;
8054 ''|' ') dflt='none' ;;
8058 *-fstack-protector*)
8060 *-fstack-protector*) ;; # Don't add it again
8061 *) dflt="$dflt -fstack-protector" ;;
8067 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
8070 none) lddlflags=' ' ;;
8071 *) lddlflags="$ans" ;;
8076 Some systems may require passing special flags to $cc to indicate that
8077 the resulting executable will use dynamic linking. To use no flags,
8081 case "$ccdlflags" in
8082 '') case "$osname" in
8083 linux|hpux|gnu*) dflt='-Wl,-E' ;;
8084 next|sunos) dflt='none' ;;
8088 *) dflt="$ccdlflags" ;;
8090 rp="Any special flags to pass to $cc to use dynamic linking?"
8093 none) ccdlflags=' ' ;;
8094 *) ccdlflags="$ans" ;;
8105 : Do we want a shared libperl?
8109 # No dynamic loading being used, so don't bother even to prompt.
8112 *) case "$useshrplib" in
8113 '') case "$osname" in
8114 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|haiku|cygwin*)
8116 also='Building a shared libperl is required for dynamic loading to work on your system.'
8121 also='Building a shared libperl is needed for MAB support.'
8139 The perl executable is normally obtained by linking perlmain.c with
8140 libperl${_a}, any static extensions (usually just DynaLoader), and
8141 any other libraries needed on this system (such as -lm, etc.). Since
8142 your system supports dynamic loading, it is probably possible to build
8143 a shared libperl.$so. If you will have more than one executable linked
8144 to libperl.$so, this will significantly reduce the size of each
8145 executable, but it may have a noticeable effect on performance. The
8146 default is probably sensible for your system.
8150 rp="Build a shared libperl.$so (y/n)"
8154 useshrplib='true' ;;
8155 *) useshrplib='false' ;;
8160 case "$useshrplib" in
8164 # Figure out a good name for libperl.so. Since it gets stored in
8165 # a version-specific architecture-dependent library, the version
8166 # number isn't really that important, except for making cc/ld happy.
8168 # A name such as libperl.so.10.1
8169 majmin="libperl.$so.$patchlevel.$subversion"
8170 # A name such as libperl.so.100
8171 majonly=`echo $patchlevel $subversion |
8172 $awk '{printf "%d%02d", $1, $2}'`
8173 majonly=libperl.$so.$majonly
8174 # I'd prefer to keep the os-specific stuff here to a minimum, and
8175 # rely on figuring it out from the naming of libc.
8176 case "${osname}${osvers}" in
8179 # XXX How handle the --version stuff for MAB?
8181 linux*|gnu*) # ld won't link with a bare -lperl otherwise.
8184 cygwin*) # ld links now against the dll directly
8185 majmin="cygperl5_${patchlevel}_${subversion}.${so}"
8186 majonly=`echo $patchlevel $subversion |
8187 $awk '{printf "%03d%03d", $1, $2}'`
8188 majonly=cygperl5.$majonly.$so
8191 *) # Try to guess based on whether libc has major.minor.
8193 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
8194 *libc.$so.[0-9]*) dflt=$majonly ;;
8195 *) dflt=libperl.$so ;;
8205 I need to select a good name for the shared libperl. If your system uses
8206 library names with major and minor numbers, then you might want something
8207 like $majmin. Alternatively, if your system uses a single version
8208 number for shared libraries, then you might want to use $majonly.
8209 Or, your system might be quite happy with a simple libperl.$so.
8211 Since the shared libperl will get installed into a version-specific
8212 architecture-dependent directory, the version number of the shared perl
8213 library probably isn't important, so the default should be o.k.
8216 rp='What name do you want to give to the shared libperl?'
8219 echo "Ok, I'll use $libperl"
8222 libperl="libperl${_a}"
8226 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
8230 WARNING: Use of the shrpdir variable for the installation location of
8231 the shared $libperl is not supported. It was never documented and
8232 will not work in this version. Let me (perlbug@perl.org)
8233 know of any problems this may cause.
8239 But your current setting of $shrpdir is
8240 the default anyway, so it's harmless.
8245 Further, your current attempted setting of $shrpdir
8246 conflicts with the value of $archlibexp/CORE
8247 that installperl will use.
8254 # How will the perl executable find the installed shared $libperl?
8255 # Add $xxx to ccdlflags.
8256 # If we can't figure out a command-line option, use $shrpenv to
8257 # set env LD_RUN_PATH. The main perl makefile uses this.
8258 shrpdir=$archlibexp/CORE
8261 if "$useshrplib"; then
8264 # We'll set it in Makefile.SH...
8269 freebsd|netbsd|openbsd|interix|dragonfly)
8270 xxx="-Wl,-R$shrpdir"
8272 bsdos|linux|irix*|dec_osf|gnu*)
8273 xxx="-Wl,-rpath,$shrpdir"
8276 # next doesn't like the default...
8279 # beos doesn't like the default, either.
8282 # Haiku doesn't like the default, either.
8285 # hpux doesn't like the default, either.
8286 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
8289 # cygwin needs only ldlibpth
8292 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
8298 # Only add $xxx if it isn't already in ccdlflags.
8299 case " $ccdlflags " in
8301 *) ccdlflags="$ccdlflags $xxx"
8304 Adding $xxx to the flags
8305 passed to $ld so that the perl executable will find the
8306 installed shared $libperl.
8314 # Fix ccdlflags in AIX for building external extensions.
8315 # (For building Perl itself bare -bE:perl.exp is needed,
8316 # Makefile.SH takes care of this.)
8318 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
8320 # Respect a hint or command-line value.
8322 '') shrpenv="$tmp_shrpenv" ;;
8324 case "$ldlibpthname" in
8325 '') ldlibpthname=LD_LIBRARY_PATH ;;
8326 none) ldlibpthname='' ;;
8329 : determine where manual pages are on this system
8333 syspath='/usr/share/man/man1 /usr/man/man1'
8334 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
8335 syspath="$syspath /usr/man/u_man/man1"
8336 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
8337 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
8338 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
8339 sysman=`./loc . /usr/man/man1 $syspath`
8342 if $test -d "$sysman"; then
8343 echo "System manual is in $sysman." >&4
8345 echo "Could not find manual pages in source form." >&4
8348 : determine where manual pages go
8349 set man1dir man1dir none
8353 $spackage has manual pages available in source form.
8357 echo "However, you don't have nroff, so they're probably useless to you."
8359 '') man1dir="none";;
8362 echo "If you don't want the manual sources installed, answer 'none'."
8367 lookpath="$prefixexp/share/man/man1"
8368 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
8369 lookpath="$lookpath $prefixexp/man/p_man/man1"
8370 lookpath="$lookpath $prefixexp/man/u_man/man1"
8371 lookpath="$lookpath $prefixexp/man/man.1"
8373 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
8374 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
8384 rp="Where do the main $spackage manual pages (source) go?"
8386 if $test "X$man1direxp" != "X$ansexp"; then
8397 : What suffix to use on installed man pages
8404 rp="What suffix should be used for the main $spackage man pages?"
8406 '') case "$man1dir" in
8420 *) dflt="$man1ext";;
8427 : see if we can have long filenames
8429 first=123456789abcdef
8431 if (echo hi >$first) 2>/dev/null; then
8432 if $test -f 123456789abcde; then
8433 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
8436 echo 'You can have filenames longer than 14 characters.'>&4
8441 You can't have filenames longer than 14 chars.
8442 You can't even think about them!
8448 $rm -rf 123456789abcde*
8450 : determine where library module manual pages go
8451 set man3dir man3dir none
8455 $spackage has manual pages for many of the library modules.
8461 However, you don't have nroff, so they're probably useless to you.
8464 '') man3dir="none";;
8468 case "$d_flexfnam" in
8471 However, your system can't handle the long file names like File::Basename.3.
8474 '') man3dir="none";;
8478 echo "If you don't want the manual sources installed, answer 'none'."
8479 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
8481 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
8482 if $test -d "$privlib/man/man3"; then
8485 WARNING: Previous versions of perl installed man3 pages into
8486 $privlib/man/man3. This version will suggest a
8487 new default of $dflt.
8491 rp='Do you wish to preserve the old behavior?(y/n)'
8494 y*) dflt="$privlib/man/man3" ;;
8499 *) dflt="$man3dir" ;;
8506 rp="Where do the $package library man pages (source) go?"
8516 : What suffix to use on installed man pages
8522 rp="What suffix should be used for the $package library man pages?"
8524 '') case "$man3dir" in
8538 *) dflt="$man3ext";;
8545 : see if we have to deal with yellow pages, now NIS.
8546 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
8547 if $test -f /usr/etc/nibindd; then
8549 echo "I'm fairly confident you're on a NeXT."
8551 rp='Do you get the hosts file via NetInfo?'
8560 y*) hostcat='nidump hosts .';;
8561 *) case "$hostcat" in
8562 nidump*) hostcat='';;
8572 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
8580 rp='Are you getting the hosts file via yellow pages?'
8583 y*) hostcat='ypcat hosts';;
8584 *) hostcat='cat /etc/hosts';;
8590 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
8593 '') test -f /etc/group && groupcat='cat /etc/group';;
8596 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
8599 : now get the host name
8601 echo "Figuring out host name..." >&4
8602 case "$myhostname" in
8604 echo 'Maybe "hostname" will work...'
8605 if tans=`sh -c hostname 2>&1` ; then
8613 if $test "$cont"; then
8615 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
8616 if tans=`cat /etc/systemid 2>&1` ; then
8618 phostname='cat /etc/systemid'
8619 echo "Whadyaknow. Xenix always was a bit strange..."
8622 elif $test -r /etc/systemid; then
8623 echo "(What is a non-Xenix system doing with /etc/systemid?)"
8626 if $test "$cont"; then
8627 echo 'No, maybe "uuname -l" will work...'
8628 if tans=`sh -c 'uuname -l' 2>&1` ; then
8630 phostname='uuname -l'
8632 echo 'Strange. Maybe "uname -n" will work...'
8633 if tans=`sh -c 'uname -n' 2>&1` ; then
8635 phostname='uname -n'
8637 echo 'Oh well, maybe I can mine it out of whoami.h...'
8638 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
8639 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
8640 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
8642 case "$myhostname" in
8643 '') echo "Does this machine have an identity crisis or something?"
8646 echo "Well, you said $myhostname before..."
8647 phostname='echo $myhostname';;
8653 case "$myhostname" in
8654 '') myhostname=noname ;;
8656 : you do not want to know about this
8661 if $test "$myhostname" ; then
8663 rp='Your host name appears to be "'$myhostname'".'" Right?"
8671 : bad guess or no guess
8672 while $test "X$myhostname" = X ; do
8674 rp="Please type the (one word) name of your host:"
8679 : translate upper to lower if necessary
8680 case "$myhostname" in
8682 echo "(Normalizing case in your host name)"
8683 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
8687 case "$myhostname" in
8689 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
8690 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
8691 echo "(Trimming domain name from host name--host name is now $myhostname)"
8693 *) case "$mydomain" in
8696 test "X$hostcat" = "Xypcat hosts" &&
8697 ypmatch "$myhostname" hosts 2>/dev/null |\
8698 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
8701 test "X$hostcat" != "X" &&
8702 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
8703 /[ ]$myhostname[ . ]/p" > hosts
8706 if $test -f hosts; then
8707 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
8708 END { print sum }" hosts` = x1 || tmp_re="[ ]"
8709 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
8710 hosts | $sort | $uniq | \
8711 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
8712 case `$echo X$dflt` in
8713 X*\ *) echo "(Several hosts in the database matched hostname)"
8716 X.) echo "(You do not have fully-qualified names in the hosts database)"
8720 echo "(I cannot locate a hosts database anywhere)"
8725 tans=`./loc resolv.conf X /etc /usr/etc`
8726 if $test -f "$tans"; then
8727 echo "(Attempting domain name extraction from $tans)"
8728 dflt=.`$sed -n -e 's/ / /g' \
8729 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
8732 .) dflt=.`$sed -n -e 's/ / /g' \
8733 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
8741 .) echo "(No help from resolv.conf either -- attempting clever guess)"
8742 dflt=.`sh -c domainname 2>/dev/null`
8745 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
8749 case "$dflt$osname" in
8750 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
8751 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
8755 .) echo "(Lost all hope -- silly guess then)"
8761 *) dflt="$mydomain";;
8765 rp="What is your domain name?"
8775 : translate upper to lower if necessary
8778 echo "(Normalizing case in your domain name)"
8779 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
8783 : a little sanity check here
8784 case "$phostname" in
8787 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
8788 $myhostname$mydomain|$myhostname) ;;
8790 case "$phostname" in
8792 echo "(That doesn't agree with your whoami.h file, by the way.)"
8795 echo "(That doesn't agree with your $phostname command, by the way.)"
8803 : determine the e-mail address of the user who is running us
8806 I need to get your e-mail address in Internet format if possible, i.e.
8807 something like user@host.domain. Please answer accurately since I have
8808 no easy means to double check it. The default value provided below
8809 is most probably close to reality but may not be valid from outside
8810 your organization...
8814 while test "$cont"; do
8816 '') dflt="$cf_by@$myhostname$mydomain";;
8817 *) dflt="$cf_email";;
8819 rp='What is your e-mail address?'
8825 rp='Address does not look like an Internet one. Use it anyway?'
8839 : Ask e-mail of administrator
8842 If you or somebody else will be maintaining perl at your site, please
8843 fill in the correct e-mail address here so that they may be contacted
8844 if necessary. Currently, the "perlbug" program included with perl
8845 will send mail to this address in addition to perlbug@perl.org. You may
8846 enter "none" for no administrator.
8849 case "$perladmin" in
8850 '') dflt="$cf_email";;
8851 *) dflt="$perladmin";;
8853 rp='Perl administrator e-mail address'
8857 : determine whether to only install version-specific parts.
8860 Do you want to install only the version-specific parts of the perl
8861 distribution? Usually you do *not* want to do this.
8863 case "$versiononly" in
8864 "$define"|[Yy]*|true) dflt='y' ;;
8867 rp="Do you want to install only the version-specific parts of perl?"
8870 [yY]*) val="$define";;
8876 case "$versiononly" in
8877 "$define") inc_version_list=''
8878 inc_version_list_init=0
8882 : figure out how to guarantee perl startup
8883 : XXX Note that this currently takes advantage of the bug that binexp ignores
8884 : the Configure -Dinstallprefix setting, which in turn means that under
8885 : relocatable @INC, initialinstalllocation is what binexp started as.
8886 case "$startperl" in
8888 case "$sharpbang" in
8892 I can use the #! construct to start perl on your system. This will
8893 make startup of perl scripts faster, but may cause problems if you
8894 want to share those scripts and perl is not in a standard place
8895 ($initialinstalllocation/perl) on all your platforms. The alternative
8896 is to force a shell by starting the script with a single ':' character.
8899 case "$versiononly" in
8900 "$define") dflt="$initialinstalllocation/perl$version";;
8901 *) dflt="$initialinstalllocation/perl";;
8903 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
8906 none) startperl=": # use perl";;
8907 *) startperl="#!$ans"
8908 if $test 30 -lt `echo "$ans" | wc -c`; then
8911 WARNING: Some systems limit the #! command to 32 characters.
8912 If you experience difficulty running Perl scripts with #!, try
8913 installing Perl in a directory with a shorter pathname.
8919 *) startperl=": # use perl"
8924 echo "I'll use $startperl to start perl scripts."
8926 : figure best path for perl in scripts
8929 case "$versiononly" in
8930 "$define") perlpath="$initialinstalllocation/perl$version";;
8931 *) perlpath="$initialinstalllocation/perl";;
8933 case "$startperl" in
8938 I will use the "eval 'exec'" idiom to start Perl on your system.
8939 I can use the full path of your Perl binary for this purpose, but
8940 doing so may cause problems if you want to share those scripts and
8941 Perl is not always in a standard place ($initialinstalllocation/perl).
8944 dflt="$initialinstalllocation/perl"
8945 rp="What path shall I use in \"eval 'exec'\"?"
8952 case "$startperl" in
8954 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
8957 : determine where public executable scripts go
8958 set scriptdir scriptdir
8960 case "$scriptdir" in
8963 : guess some guesses
8964 $test -d /usr/share/scripts && dflt=/usr/share/scripts
8965 $test -d /usr/share/bin && dflt=/usr/share/bin
8966 $test -d /usr/local/script && dflt=/usr/local/script
8967 $test -d /usr/local/scripts && dflt=/usr/local/scripts
8968 $test -d $prefixexp/script && dflt=$prefixexp/script
8972 *) dflt="$scriptdir"
8977 Some installations have a separate directory just for executable scripts so
8978 that they can mount it across multiple architectures but keep the scripts in
8979 one spot. You might, for example, have a subdirectory of /usr/share for this.
8980 Or you might just lump your scripts in with all your other executables.
8984 rp='Where do you keep publicly executable scripts?'
8986 if $test "X$ansexp" != "X$scriptdirexp"; then
8992 : A little fix up for an irregularly named variable.
8993 installscript="$installscriptdir"
8995 : determine where add-on public executables go
8997 '') dflt=$siteprefix/bin ;;
9001 rp='Pathname where the add-on public executables should be installed?'
9006 : determine where add-on html pages go
9007 : There is no standard location, so try to copy the previously-selected
9008 : directory structure for the core html pages.
9009 case "$sitehtml1dir" in
9010 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$siteprefix#"` ;;
9011 *) dflt=$sitehtml1dir ;;
9014 ''|' ') dflt=none ;;
9017 rp='Pathname where the site-specific html pages should be installed?'
9019 prefixvar=sitehtml1dir
9022 : determine where add-on library html pages go
9023 : There is no standard location, so try to copy the previously-selected
9024 : directory structure for the core html pages.
9025 case "$sitehtml3dir" in
9026 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$siteprefix#"` ;;
9027 *) dflt=$sitehtml3dir ;;
9030 ''|' ') dflt=none ;;
9033 rp='Pathname where the site-specific library html pages should be installed?'
9035 prefixvar=sitehtml3dir
9038 : determine where add-on manual pages go
9039 case "$siteman1dir" in
9040 '') dflt=`echo $man1dir | $sed "s#^$prefix#$siteprefix#"` ;;
9041 *) dflt=$siteman1dir ;;
9044 ''|' ') dflt=none ;;
9047 rp='Pathname where the site-specific manual pages should be installed?'
9049 prefixvar=siteman1dir
9052 : determine where add-on library man pages go
9053 case "$siteman3dir" in
9054 '') dflt=`echo $man3dir | $sed "s#^$prefix#$siteprefix#"` ;;
9055 *) dflt=$siteman3dir ;;
9058 ''|' ') dflt=none ;;
9061 rp='Pathname where the site-specific library manual pages should be installed?'
9063 prefixvar=siteman3dir
9066 : determine where add-on public executable scripts go
9067 case "$sitescript" in
9068 '') dflt=$siteprefix/script
9069 $test -d $dflt || dflt=$sitebin ;;
9070 *) dflt="$sitescript" ;;
9073 rp='Pathname where add-on public executable scripts should be installed?'
9075 prefixvar=sitescript
9078 : Check if faststdio is requested and available
9079 case "$usefaststdio" in
9080 $define|true|[yY]*|'')
9081 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
9091 Perl can be built to use 'fast stdio', which means using the stdio
9092 library but also directly manipulating the stdio buffers to enable
9093 faster I/O. Using stdio is better for backward compatibility (especially
9094 for Perl extensions), but on the other hand since Perl 5.8 the 'perlio'
9095 interface has been preferred instead of stdio.
9097 If this doesn't make any sense to you, just accept the default '$dflt'.
9099 rp='Use the "fast stdio" if available?'
9102 y|Y) val="$define" ;;
9109 : define an is-a-typedef? function
9110 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
9112 "") inclist="sys/types.h";;
9114 eval "varval=\$$var";
9118 for inc in $inclist; do
9119 echo "#include <$inc>" >>temp.c;
9121 echo "#ifdef $type" >> temp.c;
9122 echo "printf(\"We have $type\");" >> temp.c;
9123 echo "#endif" >> temp.c;
9124 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
9125 if $contains $type temp.E >/dev/null 2>&1; then
9131 *) eval "$var=\$varval";;
9134 : define an is-a-typedef? function that prompts if the type is not available.
9135 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
9137 "") inclist="sys/types.h";;
9139 eval "varval=\$$var";
9143 for inc in $inclist; do
9144 echo "#include <$inc>" >>temp.c;
9146 echo "#ifdef $type" >> temp.c;
9147 echo "printf(\"We have $type\");" >> temp.c;
9148 echo "#endif" >> temp.c;
9149 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
9151 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
9152 if $contains $type temp.E >/dev/null 2>&1; then
9153 echo "$type found." >&4;
9156 echo "$type NOT found." >&4;
9162 *) eval "$var=\$varval";;
9165 : see what type lseek is declared as in the kernel
9166 rp="What is the type used for lseek's offset on this system?"
9167 set off_t lseektype long stdio.h sys/types.h
9171 echo "Checking to see how big your file offsets are..." >&4
9173 #include <sys/types.h>
9177 printf("%d\n", (int)sizeof($lseektype));
9182 if eval $compile_ok; then
9183 lseeksize=`$run ./try`
9184 echo "Your file offsets are $lseeksize bytes long."
9188 echo "(I can't seem to compile the test program. Guessing...)"
9189 rp="What is the size of your file offsets (in bytes)?"
9195 : see what type file positions are declared as in the library
9196 rp="What is the type for file position used by fsetpos()?"
9197 set fpos_t fpostype long stdio.h sys/types.h
9200 : Check size for Fpos_t
9203 *_t) zzz="$fpostype" ;;
9206 echo "Checking the size of $zzz..." >&4
9208 #include <sys/types.h>
9215 printf("%d\n", (int)sizeof($fpostype));
9220 if eval $compile_ok; then
9224 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9227 echo "Your $zzz is $fpossize bytes long."
9233 echo "(I can't compile the test program. Guessing...)" >&4
9234 rp="What is the size of your file positions (in bytes)?"
9239 : Check for large file support
9240 # Backward compatibility (uselfs is deprecated).
9242 "$define"|true|[yY]*)
9245 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
9247 uselargefiles="$define"
9251 case "$lseeksize:$fpossize" in
9254 You can have files larger than 2 gigabytes.
9257 *) case "$uselargefiles" in
9258 "$undef"|false|[nN]*) dflt='n' ;;
9263 Perl can be built to understand large files (files larger than 2 gigabytes)
9264 on some systems. To do so, Configure can be run with -Duselargefiles.
9266 If this doesn't make any sense to you, just accept the default '$dflt'.
9268 rp='Try to understand large files, if available?'
9271 y|Y) val="$define" ;;
9278 : Look for a hint-file generated 'call-back-unit'. If the
9279 : user has specified that a large files perl is to be built,
9280 : we may need to set or change some other defaults.
9281 if $test -f uselargefiles.cbu; then
9282 echo "Your platform has some specific hints regarding large file builds, using them..."
9283 . ./uselargefiles.cbu
9285 case "$uselargefiles" in
9287 if $test -f uselargefiles.cbu; then
9289 echo "Rechecking to see how big your file offsets are..." >&4
9291 #include <sys/types.h>
9295 printf("%d\n", (int)sizeof($lseektype));
9300 if eval $compile_ok; then
9301 lseeksize=`$run ./try`
9302 $echo "Your file offsets are now $lseeksize bytes long."
9306 echo "(I can't seem to compile the test program. Guessing...)"
9307 rp="What is the size of your file offsets (in bytes)?"
9312 *_t) zzz="$fpostype" ;;
9315 $echo $n "Rechecking the size of $zzz...$c" >&4
9317 #include <sys/types.h>
9324 printf("%d\n", (int)sizeof($fpostype));
9329 if eval $compile_ok; then
9334 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9337 echo " $fpossize bytes." >&4
9343 echo "(I can't compile the test program. Guessing...)" >&4
9344 rp="What is the size of your file positions (in bytes)?"
9353 : Set the vendorbin variables
9354 case "$vendorprefix" in
9355 '') d_vendorbin="$undef"
9359 *) d_vendorbin="$define"
9360 : determine where vendor-supplied executables go.
9361 case "$vendorbin" in
9362 '') dflt=$vendorprefix/bin ;;
9363 *) dflt="$vendorbin" ;;
9366 rp='Pathname for the vendor-supplied executables directory?'
9369 vendorbinexp="$ansexp"
9375 : Set the vendorhtml1dir variables
9376 case "$vendorprefix" in
9377 '') vendorhtml1dir=''
9378 vendorhtml1direxp=''
9380 *) : determine where vendor-supplied html pages go.
9381 : There is no standard location, so try to copy the previously-selected
9382 : directory structure for the core html pages.
9383 : XXX Better default suggestions would be welcome.
9384 case "$vendorhtml1dir" in
9385 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9386 *) dflt=$vendorhtml1dir ;;
9389 ''|' ') dflt=none ;;
9392 rp='Pathname for the vendor-supplied html pages?'
9394 vendorhtml1dir="$ans"
9395 vendorhtml1direxp="$ansexp"
9398 : Use ' ' for none so value is preserved next time through Configure
9399 $test X"$vendorhtml1dir" = "X" && vendorhtml1dir=' '
9400 prefixvar=vendorhtml1dir
9403 : Set the vendorhtml3dir variables
9404 case "$vendorprefix" in
9405 '') vendorhtml3dir=''
9406 vendorhtml3direxp=''
9408 *) : determine where vendor-supplied module html pages go.
9409 : There is no standard location, so try to copy the previously-selected
9410 : directory structure for the core html pages.
9411 : XXX Better default suggestions would be welcome.
9412 case "$vendorhtml3dir" in
9413 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9414 *) dflt=$vendorhtml3dir ;;
9417 ''|' ') dflt=none ;;
9420 rp='Pathname for the vendor-supplied html pages?'
9422 vendorhtml3dir="$ans"
9423 vendorhtml3direxp="$ansexp"
9426 : Use ' ' for none so value is preserved next time through Configure
9427 $test X"$vendorhtml3dir" = "X" && vendorhtml3dir=' '
9428 prefixvar=vendorhtml3dir
9431 : Set the vendorman1dir variables
9432 case "$vendorprefix" in
9433 '') vendorman1dir=''
9436 *) : determine where vendor-supplied manual pages go.
9437 case "$vendorman1dir" in
9438 '') dflt=`echo "$man1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9439 *) dflt=$vendorman1dir ;;
9442 ''|' ') dflt=none ;;
9445 rp='Pathname for the vendor-supplied manual section 1 pages?'
9447 vendorman1dir="$ans"
9448 vendorman1direxp="$ansexp"
9451 : Use ' ' for none so value is preserved next time through Configure
9452 $test X"$vendorman1dir" = "X" && vendorman1dir=' '
9453 prefixvar=vendorman1dir
9456 : Set the vendorman3dir variables
9457 case "$vendorprefix" in
9458 '') vendorman3dir=''
9461 *) : determine where vendor-supplied module manual pages go.
9462 case "$vendorman3dir" in
9463 '') dflt=`echo "$man3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9464 *) dflt=$vendorman3dir ;;
9467 ''|' ') dflt=none ;;
9470 rp='Pathname for the vendor-supplied manual section 3 pages?'
9472 vendorman3dir="$ans"
9473 vendorman3direxp="$ansexp"
9476 : Use ' ' for none so value is preserved next time through Configure
9477 $test X"$vendorman3dir" = "X" && vendorman3dir=' '
9478 prefixvar=vendorman3dir
9481 : Set the vendorscript variables
9482 case "$vendorprefix" in
9483 '') d_vendorscript="$undef"
9487 *) d_vendorscript="$define"
9488 : determine where vendor-supplied scripts go.
9489 case "$vendorscript" in
9490 '') dflt=$vendorprefix/script
9491 $test -d $dflt || dflt=$vendorbin ;;
9492 *) dflt="$vendorscript" ;;
9496 The installation process will create a directory for
9497 vendor-supplied scripts.
9501 rp='Pathname for the vendor-supplied scripts directory?'
9504 vendorscriptexp="$ansexp"
9507 prefixvar=vendorscript
9510 : script used to emit important warnings
9513 if test \$# -gt 0; then
9518 echo "*** WARNING:" >&4
9519 sed -e 's/^/*** /' <msg >&4
9521 cat msg >>config.msg
9522 echo " " >>config.msg
9528 : see which of string.h or strings.h is needed
9530 strings=`./findhdr string.h`
9531 if $test "$strings" && $test -r "$strings"; then
9532 echo "Using <string.h> instead of <strings.h>." >&4
9536 strings=`./findhdr strings.h`
9537 if $test "$strings" && $test -r "$strings"; then
9538 echo "Using <strings.h> instead of <string.h>." >&4
9540 ./warn "No string header found -- You'll surely have problems."
9546 "$undef") strings=`./findhdr strings.h`;;
9547 *) strings=`./findhdr string.h`;;
9550 : see if qgcvt exists
9554 : Check print/scan long double stuff
9557 if $test X"$d_longdbl" = X"$define"; then
9559 echo "Checking how to print long doubles..." >&4
9561 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
9562 $cat >try.c <<'EOCP'
9563 #include <sys/types.h>
9567 printf("%.3f\n", d);
9571 if eval $compile; then
9575 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
9576 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
9577 echo "We will use %f."
9583 if $test X"$sPRIfldbl" = X; then
9584 $cat >try.c <<'EOCP'
9585 #include <sys/types.h>
9588 long double d = 123.456;
9589 printf("%.3Lf\n", d);
9593 if eval $compile; then
9597 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
9598 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
9599 echo "We will use %Lf."
9605 if $test X"$sPRIfldbl" = X; then
9606 $cat >try.c <<'EOCP'
9607 #include <sys/types.h>
9610 long double d = 123.456;
9611 printf("%.3llf\n", d);
9615 if eval $compile; then
9619 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
9620 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
9621 echo "We will use %llf."
9627 if $test X"$sPRIfldbl" = X; then
9628 $cat >try.c <<'EOCP'
9629 #include <sys/types.h>
9632 long double d = 123.456;
9633 printf("%.3lf\n", d);
9637 if eval $compile; then
9641 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
9642 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
9643 echo "We will use %lf."
9649 if $test X"$sPRIfldbl" = X; then
9650 echo "Cannot figure out how to print long doubles." >&4
9652 sSCNfldbl=$sPRIfldbl # expect consistency
9659 case "$sPRIfldbl" in
9660 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
9661 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
9662 d_SCNfldbl="$undef";
9664 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
9665 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
9666 d_SCNfldbl="$define";
9670 : Check how to convert floats to strings.
9672 if test "X$d_Gconvert" = X; then
9675 echo "Checking for an efficient way to convert floats to strings."
9677 case "$uselongdouble" in
9678 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
9680 case "$d_longdbl" in
9681 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
9683 case "$d_PRIgldbl" in
9684 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
9688 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
9689 char *myname = "gconvert";
9692 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
9693 char *myname = "gcvt";
9696 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
9697 char *myname = "qgcvt";
9698 #define DOUBLETYPE long double
9701 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
9703 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
9705 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
9708 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
9710 char *myname = "sprintf";
9714 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
9715 #define DOUBLETYPE long double
9717 #define DOUBLETYPE double
9729 # include <string.h>
9731 # include <strings.h>
9734 int checkit(char *expect, char *got)
9736 if (strcmp(expect, got)) {
9737 printf("%s oddity: Expected %s, got %s\n",
9738 myname, expect, got);
9748 /* This must be 1st test on (which?) platform */
9749 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
9750 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
9751 checkit("0.1", buf);
9753 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
9754 checkit("0.01", buf);
9756 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
9757 checkit("0.001", buf);
9759 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
9760 checkit("0.0001", buf);
9762 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
9763 if (strlen(buf) > 5)
9764 checkit("9e-005", buf); /* for Microsoft ?? */
9766 checkit("9e-05", buf);
9768 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
9771 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
9772 checkit("1.1", buf);
9774 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
9775 checkit("1.01", buf);
9777 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
9778 checkit("1.001", buf);
9780 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
9781 checkit("1.0001", buf);
9783 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
9784 checkit("1.00001", buf);
9786 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
9787 checkit("1.000001", buf);
9789 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
9792 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
9795 /* Some Linux gcvt's give 1.e+5 here. */
9796 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
9797 checkit("100000", buf);
9799 /* Some Linux gcvt's give -1.e+5 here. */
9800 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
9801 checkit("-100000", buf);
9803 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
9804 checkit("123.456", buf);
9806 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
9807 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
9808 /* 34 should be enough to scare even long double
9809 * places into using the e notation. */
9810 if (strlen(buf) > 5)
9811 checkit("1e+034", buf); /* for Microsoft */
9813 checkit("1e+34", buf);
9815 /* For Perl, if you add additional tests here, also add them to
9816 * t/base/num.t for benefit of platforms not using Configure or
9817 * overriding d_Gconvert */
9822 : first add preferred functions to our list
9824 for xxx_convert in $gconvert_preference; do
9825 case $xxx_convert in
9826 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
9827 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
9830 : then add any others
9831 for xxx_convert in gconvert gcvt sprintf; do
9834 *) xxx_list="$xxx_list $xxx_convert" ;;
9838 case "$d_longdbl$uselongdouble" in
9840 : again, add prefered functions to our list first
9842 for xxx_convert in $gconvert_ld_preference; do
9843 case $xxx_convert in
9844 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9845 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
9848 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
9849 for xxx_convert in qgcvt sprintf $xxx_list; do
9850 case "$xxx_ld_list" in
9851 $xxx_convert*|*" $xxx_convert"*) ;;
9852 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
9855 : if sprintf cannot do long doubles, move it to the end
9856 if test "$d_PRIgldbl" != "$define"; then
9857 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
9859 : if no qgcvt, remove it
9860 if test "$d_qgcvt" != "$define"; then
9861 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
9864 xxx_list="$xxx_ld_list"
9868 for xxx_convert in $xxx_list; do
9869 echo "Trying $xxx_convert..."
9870 $rm -f try try$_o core
9871 set try -DTRY_$xxx_convert
9872 if eval $compile; then
9873 echo "$xxx_convert() found." >&4
9875 echo "I'll use $xxx_convert to convert floats into a string." >&4
9878 echo "...But $xxx_convert didn't work as I expected."
9882 echo "$xxx_convert NOT found." >&4
9886 if test X$xxx_convert = X; then
9887 echo "*** WHOA THERE!!! ***" >&4
9888 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
9892 case "$xxx_convert" in
9893 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
9894 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
9895 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
9896 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
9897 "$define$define$define")
9898 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
9899 "$define$define$undef")
9900 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
9901 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
9909 : see if _fwalk exists
9913 : Initialize h_fcntl
9916 : Initialize h_sysfile
9919 : access call always available on UNIX
9923 : locate the flags for 'access()'
9927 $cat >access.c <<EOCP
9928 #include <sys/types.h>
9933 #include <sys/file.h>
9946 : check sys/file.h first, no particular reason here
9947 if $test `./findhdr sys/file.h` && \
9948 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
9950 echo "<sys/file.h> defines the *_OK access constants." >&4
9951 elif $test `./findhdr fcntl.h` && \
9952 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
9954 echo "<fcntl.h> defines the *_OK access constants." >&4
9955 elif $test `./findhdr unistd.h` && \
9956 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
9957 echo "<unistd.h> defines the *_OK access constants." >&4
9959 echo "I can't find the four *_OK access constants--I'll use mine." >&4
9965 : see if accessx exists
9966 set accessx d_accessx
9969 : see if aintl exists
9973 : see if alarm exists
9977 : see if 64bit time functions exists
9979 set ctime64 d_ctime64
9982 set localtime64 d_localtime64
9985 set gmtime64 d_gmtime64
9988 set mktime64 d_mktime64
9991 set difftime64 d_difftime64
9994 set asctime64 d_asctime64
9997 : see if POSIX threads are available
9998 set pthread.h i_pthread
10001 : define a fucntion to check prototypes
10002 $cat > protochk <<EOSH
10005 optimize="$optimize"
10007 prototype="$prototype"
10010 usethreads=$usethreads
10011 i_pthread=$i_pthread
10012 pthread_h_first=$pthread_h_first
10015 $cat >> protochk <<'EOSH'
10020 while test $# -ge 2; do
10022 $define) echo "#include <$2>" >> try.c ;;
10023 literal) echo "$2" >> try.c ;;
10025 # Extra magic for the benefit of systems that need pthread.h
10026 # to be included early to correctly detect threadsafe functions.
10027 # Such functions must guarantee themselves, though, that the usethreads
10028 # and i_pthread have been defined, before calling protochk.
10029 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
10030 echo "#include <pthread.h>" >> try.c
10035 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
10036 cat >> try.c <<'EOCP'
10037 #ifdef CAN_PROTOTYPE
10038 #define _(args) args
10043 echo "$foo" >> try.c
10044 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
10045 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
10051 $eunicefix protochk
10053 : Define hasproto macro for Configure internal use
10054 hasproto='varname=$1; func=$2; shift; shift;
10055 while $test $# -ge 2; do
10057 $define) echo "#include <$2>";;
10061 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
10062 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
10063 echo "$func() prototype found.";
10066 echo "$func() prototype NOT found.";
10073 : see if sys/types.h has to be included
10074 set sys/types.h i_systypes
10077 : see if sys/select.h has to be included
10078 set sys/select.h i_sysselct
10081 : Define hasfield macro for Configure internal use
10082 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
10083 while $test $# -ge 2; do
10085 $define) echo "#include <$2>";;
10089 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
10091 if eval $compile; then
10100 : see if we should include time.h, sys/time.h, or both
10102 if test "X$timeincl" = X; then
10103 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
10104 $echo $n "I'm now running the test program...$c"
10106 #include <sys/types.h>
10111 #ifdef SYSTIMEKERNEL
10114 #include <sys/time.h>
10117 #include <sys/select.h>
10119 #$i_stdlib I_STDLIB
10121 #include <stdlib.h>
10127 struct timeval bar;
10130 struct timezone tzp;
10132 if (foo.tm_sec == foo.tm_sec)
10135 if (bar.tv_sec == bar.tv_sec)
10142 for s_timezone in '-DS_TIMEZONE' ''; do
10144 for s_timeval in '-DS_TIMEVAL' ''; do
10145 for i_systimek in '' '-DSYSTIMEKERNEL'; do
10146 for i_time in '' '-DI_TIME'; do
10147 for i_systime in '-DI_SYSTIME' ''; do
10150 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
10151 if eval $compile; then
10152 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
10156 $echo $n "Succeeded with $flags$c"
10168 *SYSTIMEKERNEL*) i_systimek="$define"
10169 timeincl=`./findhdr sys/time.h`
10170 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
10171 *) i_systimek="$undef";;
10174 *I_TIME*) i_time="$define"
10175 timeincl=`./findhdr time.h`" $timeincl"
10176 echo "We'll include <time.h>." >&4;;
10177 *) i_time="$undef";;
10180 *I_SYSTIME*) i_systime="$define"
10181 timeincl=`./findhdr sys/time.h`" $timeincl"
10182 echo "We'll include <sys/time.h>." >&4;;
10183 *) i_systime="$undef";;
10187 : see if struct tm knows about tm_zone
10188 case "$i_systime$i_time" in
10191 echo "Checking to see if your struct tm has tm_zone field..." >&4
10192 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
10200 case "$d_tm_tm_zone" in
10201 "$define") echo "Yes, it does." ;;
10202 *) echo "No, it doesn't." ;;
10204 : see if struct tm knows about tm_gmtoff
10205 case "$i_systime$i_time" in
10208 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
10209 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
10217 case "$d_tm_tm_gmtoff" in
10218 "$define") echo "Yes, it does." ;;
10219 *) echo "No, it doesn't." ;;
10222 : see if asctime_r exists
10223 set asctime_r d_asctime_r
10225 case "$d_asctime_r" in
10227 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
10228 case "$d_asctime_r_proto:$usethreads" in
10229 ":define") d_asctime_r_proto=define
10230 set d_asctime_r_proto asctime_r $hdrs
10234 case "$d_asctime_r_proto" in
10236 case "$asctime_r_proto" in
10237 ''|0) try='char* asctime_r(const struct tm*, char*);'
10238 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SB ;;
10240 case "$asctime_r_proto" in
10241 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
10242 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SBI ;;
10244 case "$asctime_r_proto" in
10245 ''|0) try='int asctime_r(const struct tm*, char*);'
10246 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SB ;;
10248 case "$asctime_r_proto" in
10249 ''|0) try='int asctime_r(const struct tm*, char*, int);'
10250 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SBI ;;
10252 case "$asctime_r_proto" in
10253 ''|0) d_asctime_r=undef
10255 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
10256 * ) case "$asctime_r_proto" in
10257 REENTRANT_PROTO*) ;;
10258 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
10260 echo "Prototype: $try" ;;
10263 *) case "$usethreads" in
10264 define) echo "asctime_r has no prototype, not using it." >&4 ;;
10271 *) asctime_r_proto=0
10275 : see if atolf exists
10279 : see if atoll exists
10283 : Look for GCC-style attribute format
10284 case "$d_attribute_format" in
10287 echo "Checking whether your compiler can handle __attribute__((format)) ..." >&4
10288 $cat >attrib.c <<'EOCP'
10290 void my_special_printf(char* pat,...) __attribute__((__format__(__printf__,1,2)));
10292 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10293 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10294 echo "Your C compiler doesn't support __attribute__((format))."
10297 echo "Your C compiler supports __attribute__((format))."
10301 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10305 *) val="$d_attribute_format" ;;
10307 set d_attribute_format
10311 : Look for GCC-style attribute format with null format allowed
10312 case "$d_printf_format_null" in
10313 '') case "$d_attribute_format" in
10316 echo "Checking whether your compiler allows __printf__ format to be null ..." >&4
10317 $cat >attrib.c <<EOCP
10319 #$i_stdlib I_STDLIB
10321 #include <stdlib.h>
10323 int null_printf (char* pat,...) __attribute__((__format__(__printf__,1,2)));
10324 int null_printf (char* pat,...) { return (int)pat; }
10325 int main () { exit(null_printf(NULL)); }
10327 if $cc $ccflags -o attrib attrib.c >attrib.out 2>&1 ; then
10328 : run the executable in case it produces a run-time warning
10329 if $run ./attrib >>attrib.out 2>&1; then
10330 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10331 echo "Your C compiler doesn't allow __printf__ format to be null."
10334 echo "Your C compiler allows __printf__ format to be null."
10338 echo "Your C compiler executable failed with __printf__ format null."
10342 echo "Your C compiler fails with __printf__ format null."
10349 *) val="$d_printf_format_null" ;;
10351 set d_printf_format_null
10355 : Look for GCC-style attribute malloc
10356 case "$d_attribute_malloc" in
10359 echo "Checking whether your compiler can handle __attribute__((malloc)) ..." >&4
10360 $cat >attrib.c <<'EOCP'
10362 char *go_get_some_memory( int how_many_bytes ) __attribute__((malloc));
10364 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10365 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10366 echo "Your C compiler doesn't support __attribute__((malloc))."
10369 echo "Your C compiler supports __attribute__((malloc))."
10373 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10377 *) val="$d_attribute_malloc" ;;
10379 set d_attribute_malloc
10383 : Look for GCC-style attribute nonnull
10384 case "$d_attribute_nonnull" in
10387 echo "Checking whether your compiler can handle __attribute__((nonnull(1))) ..." >&4
10388 $cat >attrib.c <<'EOCP'
10390 void do_something (char *some_pointer,...) __attribute__((nonnull(1)));
10392 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10393 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10394 echo "Your C compiler doesn't support __attribute__((nonnull))."
10397 echo "Your C compiler supports __attribute__((nonnull))."
10401 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10405 *) val="$d_attribute_nonnull" ;;
10407 set d_attribute_nonnull
10411 : Look for GCC-style attribute noreturn
10412 case "$d_attribute_noreturn" in
10415 echo "Checking whether your compiler can handle __attribute__((noreturn)) ..." >&4
10416 $cat >attrib.c <<'EOCP'
10418 void fall_over_dead( void ) __attribute__((noreturn));
10420 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10421 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10422 echo "Your C compiler doesn't support __attribute__((noreturn))."
10425 echo "Your C compiler supports __attribute__((noreturn))."
10429 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10433 *) val="$d_attribute_noreturn" ;;
10435 set d_attribute_noreturn
10439 : Look for GCC-style attribute pure
10440 case "$d_attribute_pure" in
10443 echo "Checking whether your compiler can handle __attribute__((pure)) ..." >&4
10444 $cat >attrib.c <<'EOCP'
10446 int square( int n ) __attribute__((pure));
10448 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10449 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10450 echo "Your C compiler doesn't support __attribute__((pure))."
10453 echo "Your C compiler supports __attribute__((pure))."
10457 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10461 *) val="$d_attribute_pure" ;;
10463 set d_attribute_pure
10467 : Look for GCC-style attribute unused
10468 case "$d_attribute_unused" in
10471 echo "Checking whether your compiler can handle __attribute__((unused)) ..." >&4
10472 $cat >attrib.c <<'EOCP'
10474 int do_something( int dummy __attribute__((unused)), int n );
10476 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10477 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10478 echo "Your C compiler doesn't support __attribute__((unused))."
10481 echo "Your C compiler supports __attribute__((unused))."
10485 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10489 *) val="$d_attribute_unused" ;;
10491 set d_attribute_unused
10495 : Look for GCC-style attribute warn_unused_result
10496 case "$d_attribute_warn_unused_result" in
10499 echo "Checking whether your compiler can handle __attribute__((warn_unused_result)) ..." >&4
10500 $cat >attrib.c <<'EOCP'
10502 int I_will_not_be_ignored(void) __attribute__((warn_unused_result));
10504 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10505 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10506 echo "Your C compiler doesn't support __attribute__((warn_unused_result))."
10509 echo "Your C compiler supports __attribute__((warn_unused_result))."
10513 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10517 *) val="$d_attribute_warn_unused_result" ;;
10519 set d_attribute_warn_unused_result
10523 : see if bcmp exists
10527 : see if bcopy exists
10531 : see if getpgrp exists
10532 set getpgrp d_getpgrp
10535 case "$d_getpgrp" in
10538 echo "Checking to see which flavor of getpgrp is in use..."
10540 #$i_unistd I_UNISTD
10541 #include <sys/types.h>
10543 # include <unistd.h>
10545 #$i_stdlib I_STDLIB
10547 #include <stdlib.h>
10551 if (getuid() == 0) {
10552 printf("(I see you are running Configure as super-user...)\n");
10555 #ifdef TRY_BSD_PGRP
10556 if (getpgrp(1) == 0)
10565 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10566 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
10568 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10569 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
10572 echo "I can't seem to compile and run the test program."
10574 xxx="a USG one, i.e. you use getpgrp()."
10576 # SVR4 systems can appear rather BSD-ish.
10577 case "$i_unistd" in
10579 xxx="a BSD one, i.e. you use getpgrp(pid)."
10583 xxx="probably a USG one, i.e. you use getpgrp()."
10588 echo "Assuming your getpgrp is $xxx" >&4
10597 : see if setpgrp exists
10598 set setpgrp d_setpgrp
10601 case "$d_setpgrp" in
10604 echo "Checking to see which flavor of setpgrp is in use..."
10606 #$i_unistd I_UNISTD
10607 #include <sys/types.h>
10609 # include <unistd.h>
10611 #$i_stdlib I_STDLIB
10613 #include <stdlib.h>
10617 if (getuid() == 0) {
10618 printf("(I see you are running Configure as super-user...)\n");
10621 #ifdef TRY_BSD_PGRP
10622 if (-1 == setpgrp(1, 1))
10625 if (setpgrp() != -1)
10631 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10632 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
10634 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
10635 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
10638 echo "(I can't seem to compile and run the test program.)"
10640 xxx="a USG one, i.e. you use setpgrp()."
10642 # SVR4 systems can appear rather BSD-ish.
10643 case "$i_unistd" in
10645 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
10649 xxx="probably a USG one, i.e. you use setpgrp()."
10654 echo "Assuming your setpgrp is $xxx" >&4
10663 : Look for GCC-style __builtin_choose_expr
10664 case "$d_builtin_choose_expr" in
10667 echo "Checking whether your compiler can handle __builtin_choose_expr ..." >&4
10668 $cat >try.c <<'EOCP'
10669 #include <assert.h>
10670 #include <stdlib.h>
10673 #define SYRINX(x) __builtin_choose_expr( x, (1056*2), (103*50) )
10676 assert( SYRINX(1) == 2112 );
10677 assert( SYRINX(1) != 5150 );
10678 assert( SYRINX(0) == 5150 );
10679 assert( SYRINX(0) != 2112 );
10680 puts( "All good!" );
10686 if eval $compile && $run ./try; then
10687 echo "Your C compiler supports __builtin_choose_expr."
10690 echo "Your C compiler doesn't seem to understand __builtin_choose_expr."
10694 *) val="$d_builtin_choose_expr" ;;
10697 set d_builtin_choose_expr
10701 : Look for GCC-style __builtin_expect
10702 case "$d_builtin_expect" in
10705 echo "Checking whether your compiler can handle __builtin_expect ..." >&4
10706 $cat >try.c <<'EOCP'
10709 if ( __builtin_expect(n, 0) ) n = 1;
10710 /* Remember shell exit code truth is 0, C truth is non-zero */
10715 if eval $compile && $run ./try; then
10716 echo "Your C compiler supports __builtin_expect."
10719 echo "Your C compiler doesn't seem to understand __builtin_expect."
10723 *) val="$d_builtin_expect" ;;
10726 set d_builtin_expect
10730 : see if bzero exists
10734 : see if stdarg is available
10736 if $test `./findhdr stdarg.h`; then
10737 echo "<stdarg.h> found." >&4
10740 echo "<stdarg.h> NOT found." >&4
10744 : see if varags is available
10746 if $test `./findhdr varargs.h`; then
10747 echo "<varargs.h> found." >&4
10749 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
10752 : set up the varargs testing programs
10753 $cat > varargs.c <<EOP
10755 #include <stdarg.h>
10758 #include <varargs.h>
10762 int f(char *p, ...)
10776 p = va_arg(ap, char *);
10782 $cat > varargs <<EOP
10784 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
10793 : now check which varargs header should be included
10798 if `./varargs I_STDARG`; then
10800 elif `./varargs I_VARARGS`; then
10805 if `./varargs I_VARARGS`; then
10812 echo "I could not find the definition for va_dcl... You have problems..." >&4
10813 val="$undef"; set i_stdarg; eval $setvar
10814 val="$undef"; set i_varargs; eval $setvar
10819 case "$i_varhdr" in
10821 val="$define"; set i_stdarg; eval $setvar
10822 val="$undef"; set i_varargs; eval $setvar
10825 val="$undef"; set i_stdarg; eval $setvar
10826 val="$define"; set i_varargs; eval $setvar
10829 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
10833 : see if the Compiler supports C99 variadic macros
10834 case "$i_stdarg$i_stdlib" in
10836 echo "You have <stdarg.h> and <stdlib.h>, so checking for C99 variadic macros." >&4
10839 #include <stdarg.h>
10841 #define foo(buffer, format, ...) sprintf(buffer, format, __VA_ARGS__)
10845 foo(buf, "%d %g %.*s", 123, 456.0, (int)3, "789fail");
10851 if eval $compile && $run ./try 2>&1 >/dev/null; then
10852 case "`$run ./try`" in
10854 echo "You have C99 variadic macros." >&4
10855 d_c99_variadic_macros="$define"
10858 echo "You don't have functional C99 variadic macros." >&4
10859 d_c99_variadic_macros="$undef"
10863 echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4
10864 d_c99_variadic_macros="$undef"
10869 echo "You don't have <stdarg.h> and <stdlib.h>, so not checking for C99 variadic macros." >&4
10870 d_c99_variadic_macros="$undef"
10874 : see if signal is declared as pointer to function returning int or void
10876 xxx=`./findhdr signal.h`
10877 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
10878 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
10879 echo "You have int (*signal())() instead of void." >&4
10881 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
10882 echo "You have void (*signal())()." >&4
10884 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
10885 echo "You have int (*signal())() instead of void." >&4
10887 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
10888 echo "You have void (*signal())()." >&4
10891 case "$d_voidsig" in
10893 echo "I can't determine whether signal handler returns void or int..." >&4
10895 rp="What type does your signal handler return?"
10898 v*) val="$define";;
10902 echo "As you already told me, signal handler returns void." >&4
10905 *) echo "As you already told me, signal handler returns int." >&4
10912 case "$d_voidsig" in
10913 "$define") signal_t="void";;
10914 *) signal_t="int";;
10918 : check for ability to cast large floats to 32-bit ints.
10920 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
10921 if $test "$intsize" -ge 4; then
10928 #$i_stdlib I_STDLIB
10930 #include <stdlib.h>
10932 #include <sys/types.h>
10933 #include <signal.h>
10934 $signal_t blech(int s) { exit(3); }
10941 signal(SIGFPE, blech);
10943 /* Don't let compiler optimize the test away. Store the number
10944 in a writable string for gcc to pass to sscanf under HP/UX.
10946 sprintf(str, "2147483647");
10947 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
10951 /* x86 processors will probably give 0x8000 0000, which is a
10952 sign change. We don't want that. We want to mimic SPARC
10953 behavior here, which is to preserve the sign and give
10956 if (i32 != ($xxx) f)
10962 if eval $compile_ok; then
10966 echo "(I can't seem to compile the test program--assuming it can't)"
10971 echo "Yup, it can."
10974 echo "Nope, it can't."
10981 : check for ability to cast negative floats to unsigned
10983 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
10986 #$i_stdlib I_STDLIB
10988 #include <stdlib.h>
10990 #include <sys/types.h>
10991 #include <signal.h>
10992 $signal_t blech(int s) { exit(7); }
10993 $signal_t blech_in_list(int s) { exit(4); }
10994 unsigned long dummy_long(unsigned long p) { return p; }
10995 unsigned int dummy_int(unsigned int p) { return p; }
10996 unsigned short dummy_short(unsigned short p) { return p; }
11000 unsigned long along;
11002 unsigned short ashort;
11006 /* Frustrate gcc-2.7.2's optimizer which failed this test with
11007 a direct f = -123. assignment. gcc-2.8.0 reportedly
11008 optimized the whole file away
11010 /* Store the number in a writable string for gcc to pass to
11011 sscanf under HP/UX.
11013 sprintf(str, "-123");
11014 sscanf(str, "%lf", &f); /* f = -123.; */
11016 signal(SIGFPE, blech);
11017 along = (unsigned long)f;
11018 aint = (unsigned int)f;
11019 ashort = (unsigned short)f;
11020 if (along != (unsigned long)-123)
11022 if (aint != (unsigned int)-123)
11024 if (ashort != (unsigned short)-123)
11026 sprintf(str, "1073741824.");
11027 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
11030 along = (unsigned long)f;
11031 if (along != 0x80000000)
11035 along = (unsigned long)f;
11036 if (along != 0x7fffffff)
11040 along = (unsigned long)f;
11041 if (along != 0x80000001)
11045 signal(SIGFPE, blech_in_list);
11046 sprintf(str, "123.");
11047 sscanf(str, "%lf", &f); /* f = 123.; */
11048 along = dummy_long((unsigned long)f);
11049 aint = dummy_int((unsigned int)f);
11050 ashort = dummy_short((unsigned short)f);
11051 if (along != (unsigned long)123)
11053 if (aint != (unsigned int)123)
11055 if (ashort != (unsigned short)123)
11062 if eval $compile_ok; then
11066 echo "(I can't seem to compile the test program--assuming it can't)"
11069 case "$castflags" in
11071 echo "Yup, it can."
11074 echo "Nope, it can't."
11081 : see if vprintf exists
11083 if set vprintf val -f d_vprintf; eval $csym; $val; then
11084 echo 'vprintf() found.' >&4
11087 #$i_stdarg I_STDARG /* Only one of these can be defined by i_varhrd */
11088 #$i_varargs I_VARARGS
11090 #$i_stdlib I_STDLIB
11091 #$i_unistd I_UNISTD
11094 # include <stdarg.h>
11095 #else /* I_VARARGS */
11096 # include <varargs.h>
11100 # include <unistd.h>
11104 # include <stdlib.h>
11107 #include <stdio.h> /* vsprintf prototype */
11110 void xxx(int n, ...)
11115 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
11117 int main() { xxx(1, "foo"); }
11119 #else /* I_VARARGS */
11127 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
11129 int main() { xxx("foo"); }
11135 if eval $compile_ok; then
11136 if $run ./try; then
11137 echo "Your vsprintf() returns (int)." >&4
11140 echo "Your vsprintf() returns (char*)." >&4
11144 echo 'I am unable to compile the vsprintf() test program.' >&4
11145 # We shouldn't get here. If we do, assume the standard signature,
11146 # not the old BSD one.
11147 echo 'Guessing that vsprintf() returns (int).' >&4
11151 echo 'vprintf() NOT found.' >&4
11162 : see if chown exists
11166 : see if chroot exists
11167 set chroot d_chroot
11170 : see if chsize exists
11171 set chsize d_chsize
11174 : see if class exists
11178 : see if clearenv exists
11179 set clearenv d_clearenv
11182 : Define hasstruct macro for Configure internal use
11183 hasstruct='varname=$1; struct=$2; shift; shift;
11184 while $test $# -ge 2; do
11186 $define) echo "#include <$2>";;
11190 echo "int main () { struct $struct foo; }" >> try.c;
11192 if eval $compile; then
11201 : see whether socket exists
11205 $echo $n "Hmm... $c" >&4
11206 if set socket val -f d_socket; eval $csym; $val; then
11207 echo "Looks like you have Berkeley networking support." >&4
11209 if set setsockopt val -f; eval $csym; $val; then
11212 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
11213 d_oldsock="$define"
11216 if $contains socklib libc.list >/dev/null 2>&1; then
11217 echo "Looks like you have Berkeley networking support." >&4
11219 : we will have to assume that it supports the 4.2 BSD interface
11222 echo "You don't have Berkeley networking in libc$_a..." >&4
11223 if test "X$d_socket" = "X$define"; then
11224 echo "...but you seem to believe that you have sockets." >&4
11226 for net in net socket
11228 if test -f /usr/lib/lib$net$_a; then
11229 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
11230 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
11231 if $contains socket libc.list >/dev/null 2>&1; then
11236 echo "...but the Wollongong group seems to have hacked it in." >&4
11237 sockethdr="-I/usr/netinclude"
11240 echo "Found Berkeley sockets interface in lib$net." >&4
11241 if $contains setsockopt libc.list >/dev/null 2>&1; then
11244 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
11245 d_oldsock="$define"
11251 if test "X$d_socket" != "X$define"; then
11252 echo "or anywhere else I see." >&4
11260 : see if socketpair exists
11261 set socketpair d_sockpair
11266 echo "Checking the availability of certain socket constants..." >&4
11267 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
11268 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
11270 #include <sys/types.h>
11271 #include <sys/socket.h>
11277 set try; if eval $compile; then
11280 set d_${enum}; eval $setvar
11284 : see if this is a sys/uio.h system
11285 set sys/uio.h i_sysuio
11288 : Check for cmsghdr support
11290 echo "Checking to see if your system supports struct cmsghdr..." >&4
11291 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
11293 case "$d_cmsghdr_s" in
11294 "$define") echo "Yes, it does." ;;
11295 *) echo "No, it doesn't." ;;
11299 : check for const keyword
11301 echo 'Checking to see if your C compiler knows about "const"...' >&4
11302 $cat >const.c <<'EOCP'
11303 typedef struct spug { int drokk; } spug;
11307 const spug y = { 0 };
11310 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
11312 echo "Yup, it does."
11315 echo "Nope, it doesn't."
11320 : see if copysignl exists
11321 set copysignl d_copysignl
11324 : see if crypt exists
11329 $define) cryptlib='' ;;
11330 *) if set crypt val -f d_crypt; eval $csym; $val; then
11331 echo 'crypt() found.' >&4
11335 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
11336 if $test -z "$cryptlib"; then
11337 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
11341 if $test -z "$cryptlib"; then
11342 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
11346 if $test -z "$cryptlib"; then
11347 cryptlib=`./loc libcrypt$_a "" $libpth`
11351 if $test -z "$cryptlib"; then
11352 echo 'crypt() NOT found.' >&4
11363 : see if this is a crypt.h system
11364 set crypt.h i_crypt
11367 : see if crypt_r exists
11368 set crypt_r d_crypt_r
11370 case "$d_crypt_r" in
11372 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
11373 case "$d_crypt_r_proto:$usethreads" in
11374 ":define") d_crypt_r_proto=define
11375 set d_crypt_r_proto crypt_r $hdrs
11379 case "$d_crypt_r_proto" in
11381 case "$crypt_r_proto" in
11382 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
11383 ./protochk "$extern_C $try" $hdrs && crypt_r_proto=B_CCS ;;
11385 case "$crypt_r_proto" in
11386 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
11387 ./protochk "$extern_C $try" $hdrs && crypt_r_proto=B_CCD ;;
11389 case "$crypt_r_proto" in
11390 ''|0) d_crypt_r=undef
11392 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
11393 * ) case "$crypt_r_proto" in
11394 REENTRANT_PROTO*) ;;
11395 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
11397 echo "Prototype: $try" ;;
11400 *) case "$usethreads" in
11401 define) echo "crypt_r has no prototype, not using it." >&4 ;;
11412 : get csh whereabouts
11414 'csh') val="$undef" ;;
11415 *) val="$define" ;;
11419 : Respect a hint or command line value for full_csh.
11420 case "$full_csh" in
11421 '') full_csh=$csh ;;
11424 : see if ctermid exists
11425 set ctermid d_ctermid
11428 : see if ctermid_r exists
11429 set ctermid_r d_ctermid_r
11431 case "$d_ctermid_r" in
11433 hdrs="$i_systypes sys/types.h define stdio.h "
11434 case "$d_ctermid_r_proto:$usethreads" in
11435 ":define") d_ctermid_r_proto=define
11436 set d_ctermid_r_proto ctermid_r $hdrs
11440 case "$d_ctermid_r_proto" in
11442 case "$ctermid_r_proto" in
11443 ''|0) try='char* ctermid_r(char*);'
11444 ./protochk "$extern_C $try" $hdrs && ctermid_r_proto=B_B ;;
11446 case "$ctermid_r_proto" in
11447 ''|0) d_ctermid_r=undef
11449 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
11450 * ) case "$ctermid_r_proto" in
11451 REENTRANT_PROTO*) ;;
11452 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
11454 echo "Prototype: $try" ;;
11457 *) case "$usethreads" in
11458 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
11465 *) ctermid_r_proto=0
11469 : see if ctime_r exists
11470 set ctime_r d_ctime_r
11472 case "$d_ctime_r" in
11474 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
11475 case "$d_ctime_r_proto:$usethreads" in
11476 ":define") d_ctime_r_proto=define
11477 set d_ctime_r_proto ctime_r $hdrs
11481 case "$d_ctime_r_proto" in
11483 case "$ctime_r_proto" in
11484 ''|0) try='char* ctime_r(const time_t*, char*);'
11485 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=B_SB ;;
11487 case "$ctime_r_proto" in
11488 ''|0) try='char* ctime_r(const time_t*, char*, int);'
11489 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=B_SBI ;;
11491 case "$ctime_r_proto" in
11492 ''|0) try='int ctime_r(const time_t*, char*);'
11493 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=I_SB ;;
11495 case "$ctime_r_proto" in
11496 ''|0) try='int ctime_r(const time_t*, char*, int);'
11497 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=I_SBI ;;
11499 case "$ctime_r_proto" in
11500 ''|0) d_ctime_r=undef
11502 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
11503 * ) case "$ctime_r_proto" in
11504 REENTRANT_PROTO*) ;;
11505 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
11507 echo "Prototype: $try" ;;
11510 *) case "$usethreads" in
11511 define) echo "ctime_r has no prototype, not using it." >&4 ;;
11522 : see if cuserid exists
11523 set cuserid d_cuserid
11526 : see if this is a limits.h system
11527 set limits.h i_limits
11530 : see if this is a float.h system
11531 set float.h i_float
11534 : See if number of significant digits in a double precision number is known
11536 $cat >dbl_dig.c <<EOM
11537 #$i_limits I_LIMITS
11540 #include <limits.h>
11546 printf("Contains DBL_DIG");
11549 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
11550 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
11551 echo "DBL_DIG found." >&4
11554 echo "DBL_DIG NOT found." >&4
11561 : see if dbm.h is available
11562 : see if dbmclose exists
11563 set dbmclose d_dbmclose
11566 case "$d_dbmclose" in
11576 *) set rpcsvc/dbm.h i_rpcsvcdbm
11581 *) echo "We won't be including <dbm.h>"
11591 : see if prototype for dbminit is available
11593 set d_dbminitproto dbminit $i_dbm dbm.h
11596 : see if difftime exists
11597 set difftime d_difftime
11600 : see if this is a dirent system
11602 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
11604 echo "<dirent.h> found." >&4
11607 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
11608 echo "<sys/dir.h> found." >&4
11611 xinc=`./findhdr sys/ndir.h`
11613 echo "<dirent.h> NOT found." >&4
11618 : Look for type of directory structure.
11620 $cppstdin $cppflags $cppminus < "$xinc" > try.c
11622 case "$direntrytype" in
11624 case "$i_dirent" in
11625 $define) guess1='struct dirent' ;;
11626 *) guess1='struct direct' ;;
11629 *) guess1="$direntrytype"
11634 'struct dirent') guess2='struct direct' ;;
11635 *) guess2='struct dirent' ;;
11638 if $contains "$guess1" try.c >/dev/null 2>&1; then
11639 direntrytype="$guess1"
11640 echo "Your directory entries are $direntrytype." >&4
11641 elif $contains "$guess2" try.c >/dev/null 2>&1; then
11642 direntrytype="$guess2"
11643 echo "Your directory entries seem to be $direntrytype." >&4
11645 echo "I don't recognize your system's directory entries." >&4
11646 rp="What type is used for directory entries on this system?"
11649 direntrytype="$ans"
11653 : see if the directory entry stores field length
11655 $cppstdin $cppflags $cppminus < "$xinc" > try.c
11656 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
11657 echo "Good, your directory entry keeps length information in d_namlen." >&4
11660 echo "Your directory entry does not know about the d_namlen field." >&4
11667 : Look for DIR.dd_fd
11668 case "$i_dirent" in
11670 echo "Checking to see if DIR has a dd_fd member variable" >&4
11672 #$i_stdlib I_STDLIB
11674 #include <stdlib.h>
11676 #include <dirent.h>
11686 if eval $compile; then
11687 echo "Yes, it does."
11690 echo "No, it does not."
11695 echo "You don't have a <dirent.h>, so not checking for dd_fd." >&4
11703 : see if this is an sysdir system
11704 set sys/dir.h i_sysdir
11707 : see if this is an sysndir system
11708 set sys/ndir.h i_sysndir
11713 $cat >dirfd.c <<EOM
11715 #$i_stdlib I_STDLIB
11717 #include <stdlib.h>
11719 #$i_dirent I_DIRENT /**/
11720 #$i_sysdir I_SYS_DIR /**/
11721 #$i_sysndir I_SYS_NDIR /**/
11722 #$i_systypes I_SYS_TYPES /**/
11723 #if defined(I_SYS_TYPES)
11724 #include <sys/types.h>
11726 #if defined(I_DIRENT)
11727 #include <dirent.h>
11728 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
11729 #include <sys/dir.h>
11733 #include <sys/ndir.h>
11737 #include <ndir.h> /* may be wrong in the future */
11739 #include <sys/dir.h>
11745 DIR *dirp = opendir(".");
11746 if (dirfd(dirp) >= 0)
11754 if eval $compile; then
11758 $define) echo "dirfd() found." >&4 ;;
11759 *) echo "dirfd() NOT found." >&4 ;;
11765 : see if dlerror exists
11768 set dlerror d_dlerror
11772 : see if dlfcn is available
11773 set dlfcn.h i_dlfcn
11776 : Check what extension to use for shared libs
11781 On a few systems, the dynamically loaded modules that perl generates and uses
11782 will need a different extension than shared libs. The default will probably
11788 *) dflt="$dlext" ;;
11790 rp='What is the extension of dynamically loaded modules'
11799 : Check if dlsym need a leading underscore
11805 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
11806 $cat >dyna.c <<'EOM'
11813 #$i_stdlib I_STDLIB
11815 #include <stdlib.h>
11819 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
11821 #include <sys/types.h>
11826 extern int fred() ;
11835 int mode = RTLD_LAZY ;
11837 handle = dlopen("./dyna.$dlext", mode) ;
11838 if (handle == NULL) {
11843 symbol = dlsym(handle, "fred") ;
11844 if (symbol == NULL) {
11845 /* try putting a leading underscore */
11846 symbol = dlsym(handle, "_fred") ;
11847 if (symbol == NULL) {
11860 : Call the object file tmp-dyna.o in case dlext=o.
11861 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
11862 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
11863 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
11864 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
11867 1) echo "Test program failed using dlopen." >&4
11868 echo "Perhaps you should not use dynamic loading." >&4;;
11869 2) echo "Test program failed using dlsym." >&4
11870 echo "Perhaps you should not use dynamic loading." >&4;;
11871 3) echo "dlsym needs a leading underscore" >&4
11873 4) echo "dlsym doesn't need a leading underscore." >&4;;
11876 echo "I can't compile and run the test program." >&4
11877 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
11882 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
11887 : see if drand48_r exists
11888 set drand48_r d_drand48_r
11890 case "$d_drand48_r" in
11892 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
11893 case "$d_drand48_r_proto:$usethreads" in
11894 ":define") d_drand48_r_proto=define
11895 set d_drand48_r_proto drand48_r $hdrs
11899 case "$d_drand48_r_proto" in
11901 case "$drand48_r_proto" in
11902 ''|0) try='int drand48_r(struct drand48_data*, double*);'
11903 ./protochk "$extern_C $try" $hdrs && drand48_r_proto=I_ST ;;
11905 case "$drand48_r_proto" in
11906 ''|0) d_drand48_r=undef
11908 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
11909 * ) case "$drand48_r_proto" in
11910 REENTRANT_PROTO*) ;;
11911 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
11913 echo "Prototype: $try" ;;
11916 *) case "$usethreads" in
11917 define) echo "drand48_r has no prototype, not using it." >&4 ;;
11924 *) drand48_r_proto=0
11928 : see if prototype for drand48 is available
11930 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
11933 : see if dup2 exists
11937 : see if eaccess exists
11938 set eaccess d_eaccess
11941 : see if endgrent exists
11942 set endgrent d_endgrent
11945 : see if this is an grp system
11951 xxx=`./findhdr grp.h`
11952 $cppstdin $cppflags $cppminus < $xxx >$$.h
11954 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
11966 set d_grpasswd; eval $setvar
11970 : see if endgrent_r exists
11971 set endgrent_r d_endgrent_r
11973 case "$d_endgrent_r" in
11975 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
11976 case "$d_endgrent_r_proto:$usethreads" in
11977 ":define") d_endgrent_r_proto=define
11978 set d_endgrent_r_proto endgrent_r $hdrs
11982 case "$d_endgrent_r_proto" in
11984 case "$endgrent_r_proto" in
11985 ''|0) try='int endgrent_r(FILE**);'
11986 ./protochk "$extern_C $try" $hdrs && endgrent_r_proto=I_H ;;
11988 case "$endgrent_r_proto" in
11989 ''|0) try='void endgrent_r(FILE**);'
11990 ./protochk "$extern_C $try" $hdrs && endgrent_r_proto=V_H ;;
11992 case "$endgrent_r_proto" in
11993 ''|0) d_endgrent_r=undef
11995 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
11996 * ) case "$endgrent_r_proto" in
11997 REENTRANT_PROTO*) ;;
11998 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
12000 echo "Prototype: $try" ;;
12003 *) case "$usethreads" in
12004 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
12011 *) endgrent_r_proto=0
12015 : see if endhostent exists
12016 set endhostent d_endhent
12019 : see if this is a netdb.h system
12020 set netdb.h i_netdb
12023 : see if endhostent_r exists
12024 set endhostent_r d_endhostent_r
12026 case "$d_endhostent_r" in
12028 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12029 case "$d_endhostent_r_proto:$usethreads" in
12030 ":define") d_endhostent_r_proto=define
12031 set d_endhostent_r_proto endhostent_r $hdrs
12035 case "$d_endhostent_r_proto" in
12037 case "$endhostent_r_proto" in
12038 ''|0) try='int endhostent_r(struct hostent_data*);'
12039 ./protochk "$extern_C $try" $hdrs && endhostent_r_proto=I_D ;;
12041 case "$endhostent_r_proto" in
12042 ''|0) try='void endhostent_r(struct hostent_data*);'
12043 ./protochk "$extern_C $try" $hdrs && endhostent_r_proto=V_D ;;
12045 case "$endhostent_r_proto" in
12046 ''|0) d_endhostent_r=undef
12047 endhostent_r_proto=0
12048 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
12049 * ) case "$endhostent_r_proto" in
12050 REENTRANT_PROTO*) ;;
12051 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
12053 echo "Prototype: $try" ;;
12056 *) case "$usethreads" in
12057 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
12059 d_endhostent_r=undef
12060 endhostent_r_proto=0
12064 *) endhostent_r_proto=0
12068 : see if endnetent exists
12069 set endnetent d_endnent
12072 : see if endnetent_r exists
12073 set endnetent_r d_endnetent_r
12075 case "$d_endnetent_r" in
12077 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12078 case "$d_endnetent_r_proto:$usethreads" in
12079 ":define") d_endnetent_r_proto=define
12080 set d_endnetent_r_proto endnetent_r $hdrs
12084 case "$d_endnetent_r_proto" in
12086 case "$endnetent_r_proto" in
12087 ''|0) try='int endnetent_r(struct netent_data*);'
12088 ./protochk "$extern_C $try" $hdrs && endnetent_r_proto=I_D ;;
12090 case "$endnetent_r_proto" in
12091 ''|0) try='void endnetent_r(struct netent_data*);'
12092 ./protochk "$extern_C $try" $hdrs && endnetent_r_proto=V_D ;;
12094 case "$endnetent_r_proto" in
12095 ''|0) d_endnetent_r=undef
12096 endnetent_r_proto=0
12097 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
12098 * ) case "$endnetent_r_proto" in
12099 REENTRANT_PROTO*) ;;
12100 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
12102 echo "Prototype: $try" ;;
12105 *) case "$usethreads" in
12106 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
12108 d_endnetent_r=undef
12109 endnetent_r_proto=0
12113 *) endnetent_r_proto=0
12117 : see if endprotoent exists
12118 set endprotoent d_endpent
12121 : see if endprotoent_r exists
12122 set endprotoent_r d_endprotoent_r
12124 case "$d_endprotoent_r" in
12126 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12127 case "$d_endprotoent_r_proto:$usethreads" in
12128 ":define") d_endprotoent_r_proto=define
12129 set d_endprotoent_r_proto endprotoent_r $hdrs
12133 case "$d_endprotoent_r_proto" in
12135 case "$endprotoent_r_proto" in
12136 ''|0) try='int endprotoent_r(struct protoent_data*);'
12137 ./protochk "$extern_C $try" $hdrs && endprotoent_r_proto=I_D ;;
12139 case "$endprotoent_r_proto" in
12140 ''|0) try='void endprotoent_r(struct protoent_data*);'
12141 ./protochk "$extern_C $try" $hdrs && endprotoent_r_proto=V_D ;;
12143 case "$endprotoent_r_proto" in
12144 ''|0) d_endprotoent_r=undef
12145 endprotoent_r_proto=0
12146 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
12147 * ) case "$endprotoent_r_proto" in
12148 REENTRANT_PROTO*) ;;
12149 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
12151 echo "Prototype: $try" ;;
12154 *) case "$usethreads" in
12155 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
12157 d_endprotoent_r=undef
12158 endprotoent_r_proto=0
12162 *) endprotoent_r_proto=0
12166 : see if endpwent exists
12167 set endpwent d_endpwent
12170 : see if this is a pwd.h system
12176 xxx=`./findhdr pwd.h`
12177 $cppstdin $cppflags $cppminus < $xxx >$$.h
12179 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
12187 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
12195 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
12203 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
12211 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
12219 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
12227 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
12235 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
12247 set d_pwquota; eval $setvar
12248 set d_pwage; eval $setvar
12249 set d_pwchange; eval $setvar
12250 set d_pwclass; eval $setvar
12251 set d_pwexpire; eval $setvar
12252 set d_pwcomment; eval $setvar
12253 set d_pwgecos; eval $setvar
12254 set d_pwpasswd; eval $setvar
12258 : see if endpwent_r exists
12259 set endpwent_r d_endpwent_r
12261 case "$d_endpwent_r" in
12263 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12264 case "$d_endpwent_r_proto:$usethreads" in
12265 ":define") d_endpwent_r_proto=define
12266 set d_endpwent_r_proto endpwent_r $hdrs
12270 case "$d_endpwent_r_proto" in
12272 case "$endpwent_r_proto" in
12273 ''|0) try='int endpwent_r(FILE**);'
12274 ./protochk "$extern_C $try" $hdrs && endpwent_r_proto=I_H ;;
12276 case "$endpwent_r_proto" in
12277 ''|0) try='void endpwent_r(FILE**);'
12278 ./protochk "$extern_C $try" $hdrs && endpwent_r_proto=V_H ;;
12280 case "$endpwent_r_proto" in
12281 ''|0) d_endpwent_r=undef
12283 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
12284 * ) case "$endpwent_r_proto" in
12285 REENTRANT_PROTO*) ;;
12286 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
12288 echo "Prototype: $try" ;;
12291 *) case "$usethreads" in
12292 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
12299 *) endpwent_r_proto=0
12303 : see if endservent exists
12304 set endservent d_endsent
12307 : see if endservent_r exists
12308 set endservent_r d_endservent_r
12310 case "$d_endservent_r" in
12312 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12313 case "$d_endservent_r_proto:$usethreads" in
12314 ":define") d_endservent_r_proto=define
12315 set d_endservent_r_proto endservent_r $hdrs
12319 case "$d_endservent_r_proto" in
12321 case "$endservent_r_proto" in
12322 ''|0) try='int endservent_r(struct servent_data*);'
12323 ./protochk "$extern_C $try" $hdrs && endservent_r_proto=I_D ;;
12325 case "$endservent_r_proto" in
12326 ''|0) try='void endservent_r(struct servent_data*);'
12327 ./protochk "$extern_C $try" $hdrs && endservent_r_proto=V_D ;;
12329 case "$endservent_r_proto" in
12330 ''|0) d_endservent_r=undef
12331 endservent_r_proto=0
12332 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
12333 * ) case "$endservent_r_proto" in
12334 REENTRANT_PROTO*) ;;
12335 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
12337 echo "Prototype: $try" ;;
12340 *) case "$usethreads" in
12341 define) echo "endservent_r has no prototype, not using it." >&4 ;;
12343 d_endservent_r=undef
12344 endservent_r_proto=0
12348 *) endservent_r_proto=0
12352 : Locate the flags for 'open()'
12355 #include <sys/types.h>
12360 #include <sys/file.h>
12362 #$i_stdlib I_STDLIB
12364 #include <stdlib.h>
12375 : check sys/file.h first to get FREAD on Sun
12376 if $test `./findhdr sys/file.h` && \
12377 set try -DI_SYS_FILE && eval $compile; then
12379 echo "<sys/file.h> defines the O_* constants..." >&4
12380 if $run ./try; then
12381 echo "and you have the 3 argument form of open()." >&4
12384 echo "but not the 3 argument form of open(). Oh, well." >&4
12387 elif $test `./findhdr fcntl.h` && \
12388 set try -DI_FCNTL && eval $compile; then
12390 echo "<fcntl.h> defines the O_* constants..." >&4
12391 if $run ./try; then
12392 echo "and you have the 3 argument form of open()." >&4
12395 echo "but not the 3 argument form of open(). Oh, well." >&4
12400 echo "I can't find the O_* constant definitions! You got problems." >&4
12406 : see if this is a sys/file.h system
12411 : do we need to include sys/file.h ?
12415 if $h_sysfile; then
12417 echo "We'll be including <sys/file.h>." >&4
12420 echo "We won't be including <sys/file.h>." >&4
12430 : see if fcntl.h is there
12435 : see if we can include fcntl.h
12441 echo "We'll be including <fcntl.h>." >&4
12444 if $h_sysfile; then
12445 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
12447 echo "We won't be including <fcntl.h>." >&4
12459 : see if fork exists
12463 : see if pipe exists
12467 : check for non-blocking I/O stuff
12468 case "$h_sysfile" in
12469 true) echo "#include <sys/file.h>" > head.c;;
12472 true) echo "#include <fcntl.h>" > head.c;;
12473 *) echo "#include <sys/fcntl.h>" > head.c;;
12478 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
12479 case "$o_nonblock" in
12481 $cat head.c > try.c
12482 $cat >>try.c <<EOCP
12484 #$i_stdlib I_STDLIB
12486 #include <stdlib.h>
12494 printf("O_NONBLOCK\n");
12498 printf("O_NDELAY\n");
12502 printf("FNDELAY\n");
12509 if eval $compile_ok; then
12510 o_nonblock=`$run ./try`
12511 case "$o_nonblock" in
12512 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
12513 *) echo "Seems like we can use $o_nonblock.";;
12516 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
12519 *) echo "Using $hint value $o_nonblock.";;
12524 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
12527 case "$d_fork:$d_pipe" in
12529 $cat head.c > try.c
12530 $cat >>try.c <<EOCP
12532 #include <sys/types.h>
12533 #include <signal.h>
12535 #$i_stdlib I_STDLIB
12537 #include <stdlib.h>
12543 #define MY_O_NONBLOCK $o_nonblock
12544 #ifndef errno /* XXX need better Configure test */
12547 #$i_unistd I_UNISTD
12549 #include <unistd.h>
12551 #$i_string I_STRING
12553 #include <string.h>
12555 #include <strings.h>
12557 $signal_t blech(int x) { exit(3); }
12559 $cat >> try.c <<'EOCP'
12567 pipe(pd); /* Down: child -> parent */
12568 pipe(pu); /* Up: parent -> child */
12571 close(pd[1]); /* Parent reads from pd[0] */
12572 close(pu[0]); /* Parent writes (blocking) to pu[1] */
12574 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
12579 signal(SIGALRM, blech);
12581 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
12583 sprintf(string, "%d\n", ret);
12584 write(2, string, strlen(string));
12587 if (errno == EAGAIN) {
12588 printf("EAGAIN\n");
12593 if (errno == EWOULDBLOCK)
12594 printf("EWOULDBLOCK\n");
12597 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
12598 sleep(2); /* Give it time to close our pipe */
12600 ret = read(pd[0], buf, 1); /* Should read EOF */
12602 sprintf(string, "%d\n", ret);
12603 write(4, string, strlen(string));
12607 close(pd[0]); /* We write to pd[1] */
12608 close(pu[1]); /* We read from pu[0] */
12609 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
12610 close(pd[1]); /* Pipe pd is now fully closed! */
12611 exit(0); /* Bye bye, thank you for playing! */
12615 if eval $compile_ok; then
12616 echo "$startsh" >mtry
12617 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
12619 ./mtry >/dev/null 2>&1
12621 0) eagain=`$cat try.out`;;
12622 1) echo "Could not perform non-blocking setting!";;
12623 2) echo "I did a successful read() for something that was not there!";;
12624 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
12625 4) echo "Could not find F_SETFL!";;
12626 *) echo "Something terribly wrong happened during testing.";;
12628 rd_nodata=`$cat try.ret`
12629 echo "A read() system call with no data present returns $rd_nodata."
12630 case "$rd_nodata" in
12633 echo "(That's peculiar, fixing that to be -1.)"
12639 echo "Forcing errno EAGAIN on read() with no data available."
12643 echo "Your read() sets errno to $eagain when no data is available."
12646 status=`$cat try.err`
12648 0) echo "And it correctly returns 0 to signal EOF.";;
12649 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
12650 *) echo "However, your read() returns '$status' on EOF??";;
12653 if test "$status" = "$rd_nodata"; then
12654 echo "WARNING: you can't distinguish between EOF and no data!"
12658 echo "I can't compile the test program--assuming errno EAGAIN will do."
12662 *) echo "Can't figure out how to test this--assuming errno EAGAIN will do."
12671 echo "Using $hint value $eagain."
12672 echo "Your read() returns $rd_nodata when no data is present."
12673 case "$d_eofnblk" in
12674 "$define") echo "And you can see EOF because read() returns 0.";;
12675 "$undef") echo "But you can't see EOF status from read() returned value.";;
12677 echo "(Assuming you can't see EOF status from read anyway.)"
12683 $rm_try head.c mtry
12685 : see if _ptr and _cnt from stdio act std
12688 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
12689 echo "(Looks like you have stdio.h from BSD.)"
12690 case "$stdio_ptr" in
12691 '') stdio_ptr='((fp)->_p)'
12694 *) ptr_lval=$d_stdio_ptr_lval;;
12696 case "$stdio_cnt" in
12697 '') stdio_cnt='((fp)->_r)'
12700 *) cnt_lval=$d_stdio_cnt_lval;;
12702 case "$stdio_base" in
12703 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
12705 case "$stdio_bufsiz" in
12706 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
12708 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
12709 echo "(Looks like you have stdio.h from Linux.)"
12710 case "$stdio_ptr" in
12711 '') stdio_ptr='((fp)->_IO_read_ptr)'
12714 *) ptr_lval=$d_stdio_ptr_lval;;
12716 case "$stdio_cnt" in
12717 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
12720 *) cnt_lval=$d_stdio_cnt_lval;;
12722 case "$stdio_base" in
12723 '') stdio_base='((fp)->_IO_read_base)';;
12725 case "$stdio_bufsiz" in
12726 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
12729 case "$stdio_ptr" in
12730 '') stdio_ptr='((fp)->_ptr)'
12733 *) ptr_lval=$d_stdio_ptr_lval;;
12735 case "$stdio_cnt" in
12736 '') stdio_cnt='((fp)->_cnt)'
12739 *) cnt_lval=$d_stdio_cnt_lval;;
12741 case "$stdio_base" in
12742 '') stdio_base='((fp)->_base)';;
12744 case "$stdio_bufsiz" in
12745 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
12749 : test whether _ptr and _cnt really work
12750 echo "Checking how std your stdio is..." >&4
12753 #$i_stdlib I_STDLIB
12755 #include <stdlib.h>
12757 #define FILE_ptr(fp) $stdio_ptr
12758 #define FILE_cnt(fp) $stdio_cnt
12760 FILE *fp = fopen("try.c", "r");
12763 18 <= FILE_cnt(fp) &&
12764 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
12772 if eval $compile && $to try.c; then
12773 if $run ./try; then
12774 echo "Your stdio acts pretty std."
12777 echo "Your stdio isn't very std."
12780 echo "Your stdio doesn't appear very std."
12784 # glibc 2.2.90 and above apparently change stdio streams so Perl's
12785 # direct buffer manipulation no longer works. The Configure tests
12786 # should be changed to correctly detect this, but until then,
12787 # the following check should at least let perl compile and run.
12788 # (This quick fix should be updated before 5.8.1.)
12789 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
12790 # A. Dougherty, June 3, 2002.
12791 case "$d_gnulibc" in
12793 case "$gnulibc_version" in
12797 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
12806 : Can _ptr be used as an lvalue?
12807 case "$d_stdstdio$ptr_lval" in
12808 $define$define) val=$define ;;
12811 set d_stdio_ptr_lval
12814 : Can _cnt be used as an lvalue?
12815 case "$d_stdstdio$cnt_lval" in
12816 $define$define) val=$define ;;
12819 set d_stdio_cnt_lval
12823 : test whether setting _ptr sets _cnt as a side effect
12824 d_stdio_ptr_lval_sets_cnt="$undef"
12825 d_stdio_ptr_lval_nochange_cnt="$undef"
12826 case "$d_stdio_ptr_lval$d_stdstdio" in
12828 echo "Checking to see what happens if we set the stdio ptr..." >&4
12831 /* Can we scream? */
12832 /* Eat dust sed :-) */
12833 /* In the buffer space, no one can hear you scream. */
12834 #$i_stdlib I_STDLIB
12836 #include <stdlib.h>
12838 #define FILE_ptr(fp) $stdio_ptr
12839 #define FILE_cnt(fp) $stdio_cnt
12840 #include <sys/types.h>
12842 FILE *fp = fopen("try.c", "r");
12847 puts("Fail even to read");
12850 c = getc(fp); /* Read away the first # */
12852 puts("Fail even to read");
12856 18 <= FILE_cnt(fp) &&
12857 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
12859 puts("Fail even to read");
12862 ptr = (char*) FILE_ptr(fp);
12863 cnt = (size_t)FILE_cnt(fp);
12865 FILE_ptr(fp) += 42;
12867 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
12868 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
12871 if (FILE_cnt(fp) <= 20) {
12872 printf ("Fail (<20 chars to test)");
12875 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
12876 puts("Fail compare");
12879 if (cnt == FILE_cnt(fp)) {
12880 puts("Pass_unchanged");
12883 if (FILE_cnt(fp) == (cnt - 42)) {
12884 puts("Pass_changed");
12887 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
12893 if eval $compile && $to try.c; then
12894 case `$run ./try` in
12896 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
12897 d_stdio_ptr_lval_sets_cnt="$define" ;;
12899 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
12900 d_stdio_ptr_lval_nochange_cnt="$define" ;;
12902 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
12904 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
12907 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
12913 : see if _base is also standard
12915 case "$d_stdstdio" in
12919 #$i_stdlib I_STDLIB
12921 #include <stdlib.h>
12923 #define FILE_base(fp) $stdio_base
12924 #define FILE_bufsiz(fp) $stdio_bufsiz
12926 FILE *fp = fopen("try.c", "r");
12929 19 <= FILE_bufsiz(fp) &&
12930 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
12937 if eval $compile && $to try.c; then
12938 if $run ./try; then
12939 echo "And its _base field acts std."
12942 echo "But its _base field isn't std."
12945 echo "However, it seems to be lacking the _base field."
12953 : see if fast_stdio exists
12955 case "$d_stdstdio:$d_stdio_ptr_lval" in
12957 case "$d_stdio_cnt_lval$d_stdio_ptr_lval_sets_cnt" in
12959 echo "You seem to have 'fast stdio' to directly manipulate the stdio buffers." >& 4
12970 : see if fchdir exists
12971 set fchdir d_fchdir
12974 : see if fchmod exists
12975 set fchmod d_fchmod
12978 : see if fchown exists
12979 set fchown d_fchown
12982 : see if this is an fcntl system
12986 : See if fcntl-based locking works.
12989 #$i_stdlib I_STDLIB
12991 #include <stdlib.h>
12993 #include <unistd.h>
12995 #include <signal.h>
12996 $signal_t blech(int x) { exit(3); }
12998 #if defined(F_SETLK) && defined(F_SETLKW)
12999 struct flock flock;
13001 fd = open("try.c", O_RDONLY);
13002 flock.l_type = F_RDLCK;
13003 flock.l_whence = SEEK_SET;
13004 flock.l_start = flock.l_len = 0;
13005 signal(SIGALRM, blech);
13007 retval = fcntl(fd, F_SETLK, &flock);
13009 (retval < 0 ? exit(2) : exit(0));
13015 echo "Checking if fcntl-based file locking works... "
13019 if eval $compile_ok; then
13020 if $run ./try; then
13021 echo "Yes, it seems to work."
13024 echo "Nope, it didn't work."
13029 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
13030 *** This is (almost) impossible.
13031 *** If your NFS lock daemons are not feeling well, something like
13032 *** this may happen, please investigate. Cannot continue, aborting.
13040 echo "I'm unable to compile the test program, so I'll assume not."
13045 echo "Nope, since you don't even have fcntl()."
13048 set d_fcntl_can_lock
13052 : check for fd_set items
13055 Checking to see how well your C compiler handles fd_set and friends ...
13058 #$i_stdlib I_STDLIB
13060 #include <stdlib.h>
13062 #$i_systime I_SYS_TIME
13063 #$i_sysselct I_SYS_SELECT
13064 #$d_socket HAS_SOCKET
13065 #include <sys/types.h>
13067 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
13070 #include <sys/time.h>
13072 #ifdef I_SYS_SELECT
13073 #include <sys/select.h>
13082 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
13090 if eval $compile; then
13091 d_fds_bits="$define"
13093 echo "Well, your system knows about the normal fd_set typedef..." >&4
13094 if $run ./try; then
13095 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
13096 d_fd_macros="$define"
13099 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
13101 d_fd_macros="$undef"
13105 Hmm, your compiler has some difficulty with fd_set. Checking further...
13108 if eval $compile; then
13109 d_fds_bits="$undef"
13111 echo "Well, your system has some sort of fd_set available..." >&4
13112 if $run ./try; then
13113 echo "and you have the normal fd_set macros." >&4
13114 d_fd_macros="$define"
13117 but not the normal fd_set macros! Gross! More work for me...
13119 d_fd_macros="$undef"
13122 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
13124 d_fds_bits="$undef"
13125 d_fd_macros="$undef"
13130 : see if fgetpos exists
13131 set fgetpos d_fgetpos
13134 : see if finite exists
13135 set finite d_finite
13138 : see if finitel exists
13139 set finitel d_finitel
13142 : see if flock exists
13146 : see if prototype for flock is available
13148 set d_flockproto flock $i_sysfile sys/file.h
13151 : see if fp_class exists
13152 set fp_class d_fp_class
13155 : see if pathconf exists
13156 set pathconf d_pathconf
13159 : see if fpathconf exists
13160 set fpathconf d_fpathconf
13163 : see if fpclass exists
13164 set fpclass d_fpclass
13167 : see if fpclassify exists
13168 set fpclassify d_fpclassify
13171 : see if fpclassl exists
13172 set fpclassl d_fpclassl
13175 : check for fpos64_t
13177 echo "Checking to see if you have fpos64_t..." >&4
13180 int main() { fpos64_t x = 7; }
13183 if eval $compile; then
13185 echo "You have fpos64_t."
13188 echo "You do not have fpos64_t."
13189 case "$fpossize" in
13190 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
13197 : see if frexpl exists
13198 set frexpl d_frexpl
13201 : see if this is a sys/param system
13202 set sys/param.h i_sysparam
13205 : see if this is a sys/mount.h system
13206 set sys/mount.h i_sysmount
13209 : Check for fs_data_s
13211 echo "Checking to see if your system supports struct fs_data..." >&4
13212 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
13214 case "$d_fs_data_s" in
13215 "$define") echo "Yes, it does." ;;
13216 *) echo "No, it doesn't." ;;
13219 : see if fseeko exists
13220 set fseeko d_fseeko
13222 case "$longsize" in
13223 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
13226 : see if fsetpos exists
13227 set fsetpos d_fsetpos
13230 : see if fstatfs exists
13231 set fstatfs d_fstatfs
13234 : see if statvfs exists
13235 set statvfs d_statvfs
13238 : see if fstatvfs exists
13239 set fstatvfs d_fstatvfs
13243 : see if fsync exists
13247 : see if ftello exists
13248 set ftello d_ftello
13250 case "$longsize" in
13251 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
13254 : check for a working futimes
13257 echo "Checking if you have a working futimes()" >&4
13260 #include <sys/time.h>
13267 fd = open ("try.c", O_RDWR);
13268 if (-1 == fd) exit (1);
13269 rv = futimes (fd, NULL);
13270 exit (rv == -1 ? errno : 0);
13274 if eval $compile; then
13278 0) echo "Yes, you have" >&4
13279 d_futimes="$define"
13281 *) echo "No, you have futimes, but it isn't working ($rc) (probably harmless)" >&4
13285 echo "No, it does not (probably harmless)" >&4
13289 : see if ndbm.h is available
13292 : Compatibility location for RedHat 7.1
13293 set gdbm/ndbm.h i_gdbmndbm
13295 : Compatibility location for Debian 4.0
13296 set gdbm-ndbm.h i_gdbm_ndbm
13300 if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then
13301 : see if dbm_open exists
13302 set dbm_open d_dbm_open
13304 case "$d_dbm_open" in
13307 i_gdbmndbm="$undef"
13308 i_gdbm_ndbm="$undef"
13309 echo "We won't be including <ndbm.h>"
13319 ndbm_hdr_protochk='name=$1; hdr=$2;
13320 eval "ihdr=\$""i_$name";
13322 if $test "$ihdr" = "$define"; then
13323 $echo "Checking if your <$hdr> uses prototypes..." >&4;
13324 case "$d_cplusplus" in
13325 $define) ./protochk "$extern_C void dbm_close(DBM *);" literal "extern \"C\" {" $ihdr $hdr literal "}" && val="$define" ;;
13326 *) ./protochk "$extern_C void dbm_close(int, int);" $ihdr $hdr || val="$define" ;;
13329 $define) $echo "Your <$hdr> seems to have prototypes";;
13330 *) $echo "Your <$hdr> does not seem to have prototypes";;
13333 set "d_${name}_h_uses_prototypes";
13337 eval $ndbm_hdr_protochk
13338 set gdbmndbm gdbm/ndbm.h
13339 eval $ndbm_hdr_protochk
13340 set gdbm_ndbm gdbm-ndbm.h
13341 eval $ndbm_hdr_protochk
13343 : see if getcwd exists
13344 set getcwd d_getcwd
13347 : see if getespwnam exists
13348 set getespwnam d_getespwnam
13351 : see if getfsstat exists
13352 set getfsstat d_getfsstat
13355 : see if getgrent exists
13356 set getgrent d_getgrent
13359 : see if getgrent_r exists
13360 set getgrent_r d_getgrent_r
13362 case "$d_getgrent_r" in
13364 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
13365 case "$d_getgrent_r_proto:$usethreads" in
13366 ":define") d_getgrent_r_proto=define
13367 set d_getgrent_r_proto getgrent_r $hdrs
13371 case "$d_getgrent_r_proto" in
13373 case "$getgrent_r_proto" in
13374 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
13375 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBWR ;;
13377 case "$getgrent_r_proto" in
13378 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
13379 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBIR ;;
13381 case "$getgrent_r_proto" in
13382 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
13383 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=S_SBW ;;
13385 case "$getgrent_r_proto" in
13386 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
13387 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=S_SBI ;;
13389 case "$getgrent_r_proto" in
13390 ''|0) try='int getgrent_r(struct group*, char*, int);'
13391 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBI ;;
13393 case "$getgrent_r_proto" in
13394 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
13395 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBIH ;;
13397 case "$getgrent_r_proto" in
13398 ''|0) d_getgrent_r=undef
13400 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
13401 * ) case "$getgrent_r_proto" in
13402 REENTRANT_PROTO*) ;;
13403 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
13405 echo "Prototype: $try" ;;
13408 *) case "$usethreads" in
13409 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
13416 *) getgrent_r_proto=0
13420 : see if getgrgid_r exists
13421 set getgrgid_r d_getgrgid_r
13423 case "$d_getgrgid_r" in
13425 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
13426 case "$d_getgrgid_r_proto:$usethreads" in
13427 ":define") d_getgrgid_r_proto=define
13428 set d_getgrgid_r_proto getgrgid_r $hdrs
13432 case "$d_getgrgid_r_proto" in
13434 case "$getgrgid_r_proto" in
13435 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
13436 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
13438 case "$getgrgid_r_proto" in
13439 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
13440 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
13442 case "$getgrgid_r_proto" in
13443 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
13444 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
13446 case "$getgrgid_r_proto" in
13447 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
13448 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
13450 case "$getgrgid_r_proto" in
13451 ''|0) d_getgrgid_r=undef
13453 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
13454 * ) case "$getgrgid_r_proto" in
13455 REENTRANT_PROTO*) ;;
13456 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
13458 echo "Prototype: $try" ;;
13461 *) case "$usethreads" in
13462 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
13469 *) getgrgid_r_proto=0
13473 : see if getgrnam_r exists
13474 set getgrnam_r d_getgrnam_r
13476 case "$d_getgrnam_r" in
13478 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
13479 case "$d_getgrnam_r_proto:$usethreads" in
13480 ":define") d_getgrnam_r_proto=define
13481 set d_getgrnam_r_proto getgrnam_r $hdrs
13485 case "$d_getgrnam_r_proto" in
13487 case "$getgrnam_r_proto" in
13488 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
13489 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
13491 case "$getgrnam_r_proto" in
13492 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
13493 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
13495 case "$getgrnam_r_proto" in
13496 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
13497 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=S_CBI ;;
13499 case "$getgrnam_r_proto" in
13500 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
13501 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
13503 case "$getgrnam_r_proto" in
13504 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
13505 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
13507 case "$getgrnam_r_proto" in
13508 ''|0) d_getgrnam_r=undef
13510 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
13511 * ) case "$getgrnam_r_proto" in
13512 REENTRANT_PROTO*) ;;
13513 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
13515 echo "Prototype: $try" ;;
13518 *) case "$usethreads" in
13519 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
13526 *) getgrnam_r_proto=0
13530 : see if gethostbyaddr exists
13531 set gethostbyaddr d_gethbyaddr
13534 : see if gethostbyname exists
13535 set gethostbyname d_gethbyname
13538 : see if gethostent exists
13539 set gethostent d_gethent
13542 : see how we will look up host name
13545 if set gethostname val -f d_gethname; eval $csym; $val; then
13546 echo 'gethostname() found.' >&4
13547 d_gethname="$define"
13550 if set uname val -f d_uname; eval $csym; $val; then
13553 uname() was found, but you're running xenix, and older versions of xenix
13554 have a broken uname(). If you don't really know whether your xenix is old
13555 enough to have a broken system call, use the default answer.
13560 "$define") dflt=n;;
13562 rp='Is your uname() broken?'
13565 n*) d_uname="$define"; call=uname;;
13568 echo 'uname() found.' >&4
13575 case "$d_gethname" in
13576 '') d_gethname="$undef";;
13579 '') d_uname="$undef";;
13581 case "$d_uname$d_gethname" in
13586 Every now and then someone has a $call() that lies about the hostname
13587 but can't be fixed for political or economic reasons. If you wish, I can
13588 pretend $call() isn't there and maybe compute hostname at run-time
13589 thanks to the '$phostname' command.
13592 rp="Shall I ignore $call() from now on?"
13595 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
13598 case "$phostname" in
13599 '') aphostname='';;
13600 *) case "$aphostname" in
13602 *) set X $phostname
13606 file=`./loc $file $file $pth`
13607 aphostname=`echo $file $*`
13612 case "$d_uname$d_gethname" in
13615 case "$phostname" in
13617 echo "There will be no way for $package to get your hostname." >&4;;
13619 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
13623 case "$d_phostname" in
13624 '') d_phostname="$undef";;
13627 : see if gethostbyaddr_r exists
13628 set gethostbyaddr_r d_gethostbyaddr_r
13630 case "$d_gethostbyaddr_r" in
13632 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13633 case "$d_gethostbyaddr_r_proto:$usethreads" in
13634 ":define") d_gethostbyaddr_r_proto=define
13635 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
13639 case "$d_gethostbyaddr_r_proto" in
13641 case "$gethostbyaddr_r_proto" in
13642 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
13643 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
13645 case "$gethostbyaddr_r_proto" in
13646 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
13647 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
13649 case "$gethostbyaddr_r_proto" in
13650 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
13651 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
13653 case "$gethostbyaddr_r_proto" in
13654 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
13655 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
13657 case "$gethostbyaddr_r_proto" in
13658 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
13659 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
13661 case "$gethostbyaddr_r_proto" in
13662 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
13663 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
13665 case "$gethostbyaddr_r_proto" in
13666 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
13667 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
13669 case "$gethostbyaddr_r_proto" in
13670 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
13671 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
13673 case "$gethostbyaddr_r_proto" in
13674 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
13675 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
13677 case "$gethostbyaddr_r_proto" in
13678 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
13679 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
13681 case "$gethostbyaddr_r_proto" in
13682 ''|0) try='int gethostbyaddr_r(const void*, socklen_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
13683 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_TsISBWRE ;;
13685 case "$gethostbyaddr_r_proto" in
13686 ''|0) d_gethostbyaddr_r=undef
13687 gethostbyaddr_r_proto=0
13688 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
13689 * ) case "$gethostbyaddr_r_proto" in
13690 REENTRANT_PROTO*) ;;
13691 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
13693 echo "Prototype: $try" ;;
13696 *) case "$usethreads" in
13697 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
13699 d_gethostbyaddr_r=undef
13700 gethostbyaddr_r_proto=0
13704 *) gethostbyaddr_r_proto=0
13708 : see if gethostbyname_r exists
13709 set gethostbyname_r d_gethostbyname_r
13711 case "$d_gethostbyname_r" in
13713 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13714 case "$d_gethostbyname_r_proto:$usethreads" in
13715 ":define") d_gethostbyname_r_proto=define
13716 set d_gethostbyname_r_proto gethostbyname_r $hdrs
13720 case "$d_gethostbyname_r_proto" in
13722 case "$gethostbyname_r_proto" in
13723 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
13724 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
13726 case "$gethostbyname_r_proto" in
13727 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
13728 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
13730 case "$gethostbyname_r_proto" in
13731 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
13732 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
13734 case "$gethostbyname_r_proto" in
13735 ''|0) d_gethostbyname_r=undef
13736 gethostbyname_r_proto=0
13737 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
13738 * ) case "$gethostbyname_r_proto" in
13739 REENTRANT_PROTO*) ;;
13740 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
13742 echo "Prototype: $try" ;;
13745 *) case "$usethreads" in
13746 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
13748 d_gethostbyname_r=undef
13749 gethostbyname_r_proto=0
13753 *) gethostbyname_r_proto=0
13757 : see if gethostent_r exists
13758 set gethostent_r d_gethostent_r
13760 case "$d_gethostent_r" in
13762 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13763 case "$d_gethostent_r_proto:$usethreads" in
13764 ":define") d_gethostent_r_proto=define
13765 set d_gethostent_r_proto gethostent_r $hdrs
13769 case "$d_gethostent_r_proto" in
13771 case "$gethostent_r_proto" in
13772 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
13773 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
13775 case "$gethostent_r_proto" in
13776 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
13777 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBIE ;;
13779 case "$gethostent_r_proto" in
13780 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
13781 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=S_SBIE ;;
13783 case "$gethostent_r_proto" in
13784 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
13785 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=S_SBI ;;
13787 case "$gethostent_r_proto" in
13788 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
13789 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBI ;;
13791 case "$gethostent_r_proto" in
13792 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
13793 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SD ;;
13795 case "$gethostent_r_proto" in
13796 ''|0) d_gethostent_r=undef
13797 gethostent_r_proto=0
13798 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
13799 * ) case "$gethostent_r_proto" in
13800 REENTRANT_PROTO*) ;;
13801 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
13803 echo "Prototype: $try" ;;
13806 *) case "$usethreads" in
13807 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
13809 d_gethostent_r=undef
13810 gethostent_r_proto=0
13814 *) gethostent_r_proto=0
13818 : see if prototypes for various gethostxxx netdb.h functions are available
13820 set d_gethostprotos gethostent $i_netdb netdb.h
13823 : see if getitimer exists
13824 set getitimer d_getitimer
13827 : see if getlogin exists
13828 set getlogin d_getlogin
13831 : see if getlogin_r exists
13832 set getlogin_r d_getlogin_r
13834 case "$d_getlogin_r" in
13836 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
13837 case "$d_getlogin_r_proto:$usethreads" in
13838 ":define") d_getlogin_r_proto=define
13839 set d_getlogin_r_proto getlogin_r $hdrs
13843 case "$d_getlogin_r_proto" in
13845 case "$getlogin_r_proto" in
13846 ''|0) try='int getlogin_r(char*, size_t);'
13847 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=I_BW ;;
13849 case "$getlogin_r_proto" in
13850 ''|0) try='int getlogin_r(char*, int);'
13851 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=I_BI ;;
13853 case "$getlogin_r_proto" in
13854 ''|0) try='char* getlogin_r(char*, size_t);'
13855 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=B_BW ;;
13857 case "$getlogin_r_proto" in
13858 ''|0) try='char* getlogin_r(char*, int);'
13859 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=B_BI ;;
13861 case "$getlogin_r_proto" in
13862 ''|0) d_getlogin_r=undef
13864 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
13865 * ) case "$getlogin_r_proto" in
13866 REENTRANT_PROTO*) ;;
13867 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
13869 echo "Prototype: $try" ;;
13872 *) case "$usethreads" in
13873 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
13880 *) getlogin_r_proto=0
13884 : see if getmnt exists
13885 set getmnt d_getmnt
13888 : see if getmntent exists
13889 set getmntent d_getmntent
13892 : see if getnetbyaddr exists
13893 set getnetbyaddr d_getnbyaddr
13896 : see if getnetbyname exists
13897 set getnetbyname d_getnbyname
13900 : see if getnetent exists
13901 set getnetent d_getnent
13904 : see if getnetbyaddr_r exists
13905 set getnetbyaddr_r d_getnetbyaddr_r
13907 case "$d_getnetbyaddr_r" in
13909 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13910 case "$d_getnetbyaddr_r_proto:$usethreads" in
13911 ":define") d_getnetbyaddr_r_proto=define
13912 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
13916 case "$d_getnetbyaddr_r_proto" in
13918 case "$getnetbyaddr_r_proto" in
13919 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
13920 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
13922 case "$getnetbyaddr_r_proto" in
13923 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
13924 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
13926 case "$getnetbyaddr_r_proto" in
13927 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
13928 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
13930 case "$getnetbyaddr_r_proto" in
13931 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
13932 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
13934 case "$getnetbyaddr_r_proto" in
13935 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
13936 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
13938 case "$getnetbyaddr_r_proto" in
13939 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
13940 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
13942 case "$getnetbyaddr_r_proto" in
13943 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
13944 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
13946 case "$getnetbyaddr_r_proto" in
13947 ''|0) try='int getnetbyaddr_r(uint32_t, int, struct netent*, char*, size_t, struct netent**, int*);'
13948 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_uISBWRE ;;
13950 case "$getnetbyaddr_r_proto" in
13951 ''|0) d_getnetbyaddr_r=undef
13952 getnetbyaddr_r_proto=0
13953 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
13954 * ) case "$getnetbyaddr_r_proto" in
13955 REENTRANT_PROTO*) ;;
13956 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
13958 echo "Prototype: $try" ;;
13961 *) case "$usethreads" in
13962 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
13964 d_getnetbyaddr_r=undef
13965 getnetbyaddr_r_proto=0
13969 *) getnetbyaddr_r_proto=0
13973 : see if getnetbyname_r exists
13974 set getnetbyname_r d_getnetbyname_r
13976 case "$d_getnetbyname_r" in
13978 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13979 case "$d_getnetbyname_r_proto:$usethreads" in
13980 ":define") d_getnetbyname_r_proto=define
13981 set d_getnetbyname_r_proto getnetbyname_r $hdrs
13985 case "$d_getnetbyname_r_proto" in
13987 case "$getnetbyname_r_proto" in
13988 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
13989 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
13991 case "$getnetbyname_r_proto" in
13992 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
13993 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
13995 case "$getnetbyname_r_proto" in
13996 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
13997 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
13999 case "$getnetbyname_r_proto" in
14000 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
14001 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
14003 case "$getnetbyname_r_proto" in
14004 ''|0) d_getnetbyname_r=undef
14005 getnetbyname_r_proto=0
14006 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
14007 * ) case "$getnetbyname_r_proto" in
14008 REENTRANT_PROTO*) ;;
14009 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
14011 echo "Prototype: $try" ;;
14014 *) case "$usethreads" in
14015 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
14017 d_getnetbyname_r=undef
14018 getnetbyname_r_proto=0
14022 *) getnetbyname_r_proto=0
14026 : see if getnetent_r exists
14027 set getnetent_r d_getnetent_r
14029 case "$d_getnetent_r" in
14031 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14032 case "$d_getnetent_r_proto:$usethreads" in
14033 ":define") d_getnetent_r_proto=define
14034 set d_getnetent_r_proto getnetent_r $hdrs
14038 case "$d_getnetent_r_proto" in
14040 case "$getnetent_r_proto" in
14041 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
14042 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
14044 case "$getnetent_r_proto" in
14045 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
14046 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBIE ;;
14048 case "$getnetent_r_proto" in
14049 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
14050 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=S_SBIE ;;
14052 case "$getnetent_r_proto" in
14053 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
14054 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=S_SBI ;;
14056 case "$getnetent_r_proto" in
14057 ''|0) try='int getnetent_r(struct netent*, char*, int);'
14058 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBI ;;
14060 case "$getnetent_r_proto" in
14061 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
14062 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SD ;;
14064 case "$getnetent_r_proto" in
14065 ''|0) d_getnetent_r=undef
14066 getnetent_r_proto=0
14067 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
14068 * ) case "$getnetent_r_proto" in
14069 REENTRANT_PROTO*) ;;
14070 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
14072 echo "Prototype: $try" ;;
14075 *) case "$usethreads" in
14076 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
14078 d_getnetent_r=undef
14079 getnetent_r_proto=0
14083 *) getnetent_r_proto=0
14087 : see if prototypes for various getnetxxx netdb.h functions are available
14089 set d_getnetprotos getnetent $i_netdb netdb.h
14092 : see if getpagesize exists
14093 set getpagesize d_getpagsz
14096 : Optional checks for getprotobyname and getprotobynumber
14098 : see if getprotobyname exists
14099 set getprotobyname d_getpbyname
14102 : see if getprotobynumber exists
14103 set getprotobynumber d_getpbynumber
14106 : see if getprotoent exists
14107 set getprotoent d_getpent
14110 : see if getpgid exists
14111 set getpgid d_getpgid
14114 : see if getpgrp2 exists
14115 set getpgrp2 d_getpgrp2
14118 : see if getppid exists
14119 set getppid d_getppid
14122 : see if getpriority exists
14123 set getpriority d_getprior
14126 : see if getprotobyname_r exists
14127 set getprotobyname_r d_getprotobyname_r
14129 case "$d_getprotobyname_r" in
14131 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14132 case "$d_getprotobyname_r_proto:$usethreads" in
14133 ":define") d_getprotobyname_r_proto=define
14134 set d_getprotobyname_r_proto getprotobyname_r $hdrs
14138 case "$d_getprotobyname_r_proto" in
14140 case "$getprotobyname_r_proto" in
14141 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
14142 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
14144 case "$getprotobyname_r_proto" in
14145 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
14146 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
14148 case "$getprotobyname_r_proto" in
14149 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
14150 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
14152 case "$getprotobyname_r_proto" in
14153 ''|0) d_getprotobyname_r=undef
14154 getprotobyname_r_proto=0
14155 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
14156 * ) case "$getprotobyname_r_proto" in
14157 REENTRANT_PROTO*) ;;
14158 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
14160 echo "Prototype: $try" ;;
14163 *) case "$usethreads" in
14164 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
14166 d_getprotobyname_r=undef
14167 getprotobyname_r_proto=0
14171 *) getprotobyname_r_proto=0
14175 : see if getprotobynumber_r exists
14176 set getprotobynumber_r d_getprotobynumber_r
14178 case "$d_getprotobynumber_r" in
14180 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14181 case "$d_getprotobynumber_r_proto:$usethreads" in
14182 ":define") d_getprotobynumber_r_proto=define
14183 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
14187 case "$d_getprotobynumber_r_proto" in
14189 case "$getprotobynumber_r_proto" in
14190 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
14191 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
14193 case "$getprotobynumber_r_proto" in
14194 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
14195 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
14197 case "$getprotobynumber_r_proto" in
14198 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
14199 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
14201 case "$getprotobynumber_r_proto" in
14202 ''|0) d_getprotobynumber_r=undef
14203 getprotobynumber_r_proto=0
14204 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
14205 * ) case "$getprotobynumber_r_proto" in
14206 REENTRANT_PROTO*) ;;
14207 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
14209 echo "Prototype: $try" ;;
14212 *) case "$usethreads" in
14213 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
14215 d_getprotobynumber_r=undef
14216 getprotobynumber_r_proto=0
14220 *) getprotobynumber_r_proto=0
14224 : see if getprotoent_r exists
14225 set getprotoent_r d_getprotoent_r
14227 case "$d_getprotoent_r" in
14229 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14230 case "$d_getprotoent_r_proto:$usethreads" in
14231 ":define") d_getprotoent_r_proto=define
14232 set d_getprotoent_r_proto getprotoent_r $hdrs
14236 case "$d_getprotoent_r_proto" in
14238 case "$getprotoent_r_proto" in
14239 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
14240 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
14242 case "$getprotoent_r_proto" in
14243 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
14244 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SBI ;;
14246 case "$getprotoent_r_proto" in
14247 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
14248 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=S_SBI ;;
14250 case "$getprotoent_r_proto" in
14251 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
14252 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SD ;;
14254 case "$getprotoent_r_proto" in
14255 ''|0) d_getprotoent_r=undef
14256 getprotoent_r_proto=0
14257 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
14258 * ) case "$getprotoent_r_proto" in
14259 REENTRANT_PROTO*) ;;
14260 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
14262 echo "Prototype: $try" ;;
14265 *) case "$usethreads" in
14266 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
14268 d_getprotoent_r=undef
14269 getprotoent_r_proto=0
14273 *) getprotoent_r_proto=0
14277 : see if prototypes for various getprotoxxx netdb.h functions are available
14279 set d_getprotoprotos getprotoent $i_netdb netdb.h
14282 : see if getprpwnam exists
14283 set getprpwnam d_getprpwnam
14286 : see if getpwent exists
14287 set getpwent d_getpwent
14290 : see if getpwent_r exists
14291 set getpwent_r d_getpwent_r
14293 case "$d_getpwent_r" in
14295 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14296 case "$d_getpwent_r_proto:$usethreads" in
14297 ":define") d_getpwent_r_proto=define
14298 set d_getpwent_r_proto getpwent_r $hdrs
14302 case "$d_getpwent_r_proto" in
14304 case "$getpwent_r_proto" in
14305 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
14306 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBWR ;;
14308 case "$getpwent_r_proto" in
14309 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
14310 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBIR ;;
14312 case "$getpwent_r_proto" in
14313 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
14314 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=S_SBW ;;
14316 case "$getpwent_r_proto" in
14317 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
14318 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=S_SBI ;;
14320 case "$getpwent_r_proto" in
14321 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
14322 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBI ;;
14324 case "$getpwent_r_proto" in
14325 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
14326 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBIH ;;
14328 case "$getpwent_r_proto" in
14329 ''|0) d_getpwent_r=undef
14331 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
14332 * ) case "$getpwent_r_proto" in
14333 REENTRANT_PROTO*) ;;
14334 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
14336 echo "Prototype: $try" ;;
14339 *) case "$usethreads" in
14340 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
14347 *) getpwent_r_proto=0
14351 : see if getpwnam_r exists
14352 set getpwnam_r d_getpwnam_r
14354 case "$d_getpwnam_r" in
14356 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14357 case "$d_getpwnam_r_proto:$usethreads" in
14358 ":define") d_getpwnam_r_proto=define
14359 set d_getpwnam_r_proto getpwnam_r $hdrs
14363 case "$d_getpwnam_r_proto" in
14365 case "$getpwnam_r_proto" in
14366 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
14367 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
14369 case "$getpwnam_r_proto" in
14370 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
14371 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
14373 case "$getpwnam_r_proto" in
14374 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
14375 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
14377 case "$getpwnam_r_proto" in
14378 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
14379 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
14381 case "$getpwnam_r_proto" in
14382 ''|0) d_getpwnam_r=undef
14384 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
14385 * ) case "$getpwnam_r_proto" in
14386 REENTRANT_PROTO*) ;;
14387 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
14389 echo "Prototype: $try" ;;
14392 *) case "$usethreads" in
14393 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
14400 *) getpwnam_r_proto=0
14404 : see if getpwuid_r exists
14405 set getpwuid_r d_getpwuid_r
14407 case "$d_getpwuid_r" in
14409 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
14410 case "$d_getpwuid_r_proto:$usethreads" in
14411 ":define") d_getpwuid_r_proto=define
14412 set d_getpwuid_r_proto getpwuid_r $hdrs
14416 case "$d_getpwuid_r_proto" in
14418 case "$getpwuid_r_proto" in
14419 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
14420 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
14422 case "$getpwuid_r_proto" in
14423 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
14424 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
14426 case "$getpwuid_r_proto" in
14427 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
14428 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
14430 case "$getpwuid_r_proto" in
14431 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
14432 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
14434 case "$getpwuid_r_proto" in
14435 ''|0) d_getpwuid_r=undef
14437 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
14438 * ) case "$getpwuid_r_proto" in
14439 REENTRANT_PROTO*) ;;
14440 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
14442 echo "Prototype: $try" ;;
14445 *) case "$usethreads" in
14446 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
14453 *) getpwuid_r_proto=0
14457 : Optional checks for getsbyname and getsbyport
14459 : see if getservbyname exists
14460 set getservbyname d_getsbyname
14463 : see if getservbyport exists
14464 set getservbyport d_getsbyport
14467 : see if getservent exists
14468 set getservent d_getsent
14471 : see if getservbyname_r exists
14472 set getservbyname_r d_getservbyname_r
14474 case "$d_getservbyname_r" in
14476 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14477 case "$d_getservbyname_r_proto:$usethreads" in
14478 ":define") d_getservbyname_r_proto=define
14479 set d_getservbyname_r_proto getservbyname_r $hdrs
14483 case "$d_getservbyname_r_proto" in
14485 case "$getservbyname_r_proto" in
14486 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
14487 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
14489 case "$getservbyname_r_proto" in
14490 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
14491 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
14493 case "$getservbyname_r_proto" in
14494 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
14495 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
14497 case "$getservbyname_r_proto" in
14498 ''|0) d_getservbyname_r=undef
14499 getservbyname_r_proto=0
14500 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
14501 * ) case "$getservbyname_r_proto" in
14502 REENTRANT_PROTO*) ;;
14503 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
14505 echo "Prototype: $try" ;;
14508 *) case "$usethreads" in
14509 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
14511 d_getservbyname_r=undef
14512 getservbyname_r_proto=0
14516 *) getservbyname_r_proto=0
14520 : see if getservbyport_r exists
14521 set getservbyport_r d_getservbyport_r
14523 case "$d_getservbyport_r" in
14525 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14526 case "$d_getservbyport_r_proto:$usethreads" in
14527 ":define") d_getservbyport_r_proto=define
14528 set d_getservbyport_r_proto getservbyport_r $hdrs
14532 case "$d_getservbyport_r_proto" in
14534 case "$getservbyport_r_proto" in
14535 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
14536 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
14538 case "$getservbyport_r_proto" in
14539 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
14540 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
14542 case "$getservbyport_r_proto" in
14543 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
14544 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
14546 case "$getservbyport_r_proto" in
14547 ''|0) d_getservbyport_r=undef
14548 getservbyport_r_proto=0
14549 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
14550 * ) case "$getservbyport_r_proto" in
14551 REENTRANT_PROTO*) ;;
14552 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
14554 echo "Prototype: $try" ;;
14557 *) case "$usethreads" in
14558 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
14560 d_getservbyport_r=undef
14561 getservbyport_r_proto=0
14565 *) getservbyport_r_proto=0
14569 : see if getservent_r exists
14570 set getservent_r d_getservent_r
14572 case "$d_getservent_r" in
14574 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14575 case "$d_getservent_r_proto:$usethreads" in
14576 ":define") d_getservent_r_proto=define
14577 set d_getservent_r_proto getservent_r $hdrs
14581 case "$d_getservent_r_proto" in
14583 case "$getservent_r_proto" in
14584 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
14585 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SBWR ;;
14587 case "$getservent_r_proto" in
14588 ''|0) try='int getservent_r(struct servent*, char*, int);'
14589 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SBI ;;
14591 case "$getservent_r_proto" in
14592 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
14593 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=S_SBI ;;
14595 case "$getservent_r_proto" in
14596 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
14597 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SD ;;
14599 case "$getservent_r_proto" in
14600 ''|0) d_getservent_r=undef
14601 getservent_r_proto=0
14602 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
14603 * ) case "$getservent_r_proto" in
14604 REENTRANT_PROTO*) ;;
14605 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
14607 echo "Prototype: $try" ;;
14610 *) case "$usethreads" in
14611 define) echo "getservent_r has no prototype, not using it." >&4 ;;
14613 d_getservent_r=undef
14614 getservent_r_proto=0
14618 *) getservent_r_proto=0
14622 : see if prototypes for various getservxxx netdb.h functions are available
14624 set d_getservprotos getservent $i_netdb netdb.h
14627 : see if getspnam exists
14628 set getspnam d_getspnam
14631 : see if this is a shadow.h system
14632 set shadow.h i_shadow
14635 : see if getspnam_r exists
14636 set getspnam_r d_getspnam_r
14638 case "$d_getspnam_r" in
14640 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
14641 case "$d_getspnam_r_proto:$usethreads" in
14642 ":define") d_getspnam_r_proto=define
14643 set d_getspnam_r_proto getspnam_r $hdrs
14647 case "$d_getspnam_r_proto" in
14649 case "$getspnam_r_proto" in
14650 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
14651 ./protochk "$extern_C $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
14653 case "$getspnam_r_proto" in
14654 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
14655 ./protochk "$extern_C $try" $hdrs && getspnam_r_proto=S_CSBI ;;
14657 case "$getspnam_r_proto" in
14658 ''|0) d_getspnam_r=undef
14660 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
14661 * ) case "$getspnam_r_proto" in
14662 REENTRANT_PROTO*) ;;
14663 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
14665 echo "Prototype: $try" ;;
14668 *) case "$usethreads" in
14669 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
14676 *) getspnam_r_proto=0
14680 : see if gettimeofday or ftime exists
14681 set gettimeofday d_gettimeod
14683 case "$d_gettimeod" in
14689 val="$undef"; set d_ftime; eval $setvar
14692 case "$d_gettimeod$d_ftime" in
14695 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
14699 : see if gmtime_r exists
14700 set gmtime_r d_gmtime_r
14702 case "$d_gmtime_r" in
14704 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
14705 case "$d_gmtime_r_proto:$usethreads" in
14706 ":define") d_gmtime_r_proto=define
14707 set d_gmtime_r_proto gmtime_r $hdrs
14711 case "$d_gmtime_r_proto" in
14713 case "$gmtime_r_proto" in
14714 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
14715 ./protochk "$extern_C $try" $hdrs && gmtime_r_proto=S_TS ;;
14717 case "$gmtime_r_proto" in
14718 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
14719 ./protochk "$extern_C $try" $hdrs && gmtime_r_proto=I_TS ;;
14721 case "$gmtime_r_proto" in
14722 ''|0) d_gmtime_r=undef
14724 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
14725 * ) case "$gmtime_r_proto" in
14726 REENTRANT_PROTO*) ;;
14727 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
14729 echo "Prototype: $try" ;;
14732 *) case "$usethreads" in
14733 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
14740 *) gmtime_r_proto=0
14744 : see if hasmntopt exists
14745 set hasmntopt d_hasmntopt
14748 : see if this is a netinet/in.h or sys/in.h system
14749 set netinet/in.h i_niin sys/in.h i_sysin
14752 : see if arpa/inet.h has to be included
14753 set arpa/inet.h i_arpainet
14756 : see if htonl --and friends-- exists
14761 : Maybe they are macros.
14764 $cat >htonl.c <<EOM
14766 #include <sys/types.h>
14767 #$i_niin I_NETINET_IN
14769 #$i_arpainet I_ARPA_INET
14770 #ifdef I_NETINET_IN
14771 #include <netinet/in.h>
14774 #include <sys/in.h>
14777 #include <arpa/inet.h>
14780 printf("Defined as a macro.");
14783 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
14784 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
14786 echo "But it seems to be defined as a macro." >&4
14794 : see if ilogbl exists
14795 set ilogbl d_ilogbl
14800 if set index val -f; eval $csym; $val; then
14801 if set strchr val -f d_strchr; eval $csym; $val; then
14802 if $contains strchr "$strings" >/dev/null 2>&1 ; then
14805 echo "strchr() found." >&4
14809 echo "index() found." >&4
14814 echo "index() found." >&4
14817 if set strchr val -f d_strchr; eval $csym; $val; then
14820 echo "strchr() found." >&4
14822 echo "No index() or strchr() found!" >&4
14827 set d_strchr; eval $setvar
14829 set d_index; eval $setvar
14831 : check whether inet_aton exists
14832 set inet_aton d_inetaton
14837 $cat >isascii.c <<EOCP
14840 #$i_stdlib I_STDLIB
14842 #include <stdlib.h>
14853 if eval $compile; then
14854 echo "isascii() found." >&4
14857 echo "isascii() NOT found." >&4
14864 : see if isfinite exists
14865 set isfinite d_isfinite
14868 : see if isinf exists
14872 : see if isnan exists
14876 : see if isnanl exists
14877 set isnanl d_isnanl
14880 : see if killpg exists
14881 set killpg d_killpg
14884 : see if lchown exists
14886 $cat > try.c <<'EOCP'
14887 /* System header to define __stub macros and hopefully few prototypes,
14888 which can conflict with char lchown(); below. */
14889 #include <assert.h>
14890 /* Override any gcc2 internal prototype to avoid an error. */
14891 /* We use char because int might match the return type of a gcc2
14892 builtin and then its argument prototype would still apply. */
14895 /* The GNU C library defines this for functions which it implements
14896 to always fail with ENOSYS. Some functions are actually named
14897 something starting with __ and the normal name is an alias. */
14898 #if defined (__stub_lchown) || defined (__stub___lchown)
14906 if eval $compile; then
14907 $echo "lchown() found." >&4
14910 $echo "lchown() NOT found." >&4
14916 : See if number of significant digits in a double precision number is known
14918 $cat >ldbl_dig.c <<EOM
14919 #$i_limits I_LIMITS
14922 #include <limits.h>
14928 printf("Contains LDBL_DIG");
14931 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
14932 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
14933 echo "LDBL_DIG found." >&4
14936 echo "LDBL_DIG NOT found." >&4
14943 : see if this is a math.h system
14947 : check to see if math.h defines _LIB_VERSION
14948 d_libm_lib_version="$undef"
14952 echo "Checking to see if your libm supports _LIB_VERSION..." >&4
14954 #include <unistd.h>
14956 int main (int argc, char *argv[])
14958 printf ("%d\n", _LIB_VERSION);
14963 if eval $compile; then
14965 echo "Yes, it does ($foo)" >&4
14966 d_libm_lib_version="$define"
14968 echo "No, it does not (probably harmless)" >&4
14975 : see if link exists
14979 : see if localtime_r exists
14980 set localtime_r d_localtime_r
14982 case "$d_localtime_r" in
14984 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
14985 case "$d_localtime_r_proto:$usethreads" in
14986 ":define") d_localtime_r_proto=define
14987 set d_localtime_r_proto localtime_r $hdrs
14991 case "$d_localtime_r_proto" in
14993 case "$localtime_r_proto" in
14994 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
14995 ./protochk "$extern_C $try" $hdrs && localtime_r_proto=S_TS ;;
14997 case "$localtime_r_proto" in
14998 ''|0) try='int localtime_r(const time_t*, struct tm*);'
14999 ./protochk "$extern_C $try" $hdrs && localtime_r_proto=I_TS ;;
15001 case "$localtime_r_proto" in
15002 ''|0) d_localtime_r=undef
15003 localtime_r_proto=0
15004 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
15005 * ) case "$localtime_r_proto" in
15006 REENTRANT_PROTO*) ;;
15007 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
15009 echo "Prototype: $try" ;;
15012 *) case "$usethreads" in
15013 define) echo "localtime_r has no prototype, not using it." >&4 ;;
15015 d_localtime_r=undef
15016 localtime_r_proto=0
15020 *) localtime_r_proto=0
15024 : see if localtime_r calls tzset
15025 case "$localtime_r_proto" in
15028 /* Does our libc's localtime_r call tzset ?
15029 * return 0 if so, 1 otherwise.
15031 #$i_systypes I_SYS_TYPES
15032 #$i_unistd I_UNISTD
15034 #$i_stdlib I_STDLIB
15035 #$i_string I_STRING
15036 #$i_malloc I_MALLOC
15038 # include <sys/types.h>
15041 # include <unistd.h>
15047 #include <stdlib.h>
15050 # include <string.h>
15052 # include <strings.h>
15055 # include <malloc.h>
15059 time_t t = time(0L);
15060 char w_tz[]="TZ" "=GMT+5",
15061 e_tz[]="TZ" "=GMT-5",
15062 *tz_e = (char*)malloc(16),
15063 *tz_w = (char*)malloc(16);
15064 struct tm tm_e, tm_w;
15065 memset(&tm_e,'\0',sizeof(struct tm));
15066 memset(&tm_w,'\0',sizeof(struct tm));
15071 localtime_r(&t, &tm_e);
15074 localtime_r(&t, &tm_w);
15076 if( memcmp(&tm_e, &tm_w, sizeof(struct tm)) == 0 )
15082 if eval $compile; then
15083 if $run ./try; then
15084 d_localtime_r_needs_tzset=undef;
15086 d_localtime_r_needs_tzset=define;
15089 d_localtime_r_needs_tzset=undef;
15093 d_localtime_r_needs_tzset=undef;
15098 : see if localeconv exists
15099 set localeconv d_locconv
15102 : see if lockf exists
15106 : see if prototype for lseek is available
15108 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
15111 : see if lstat exists
15115 : see if madvise exists
15116 set madvise d_madvise
15119 : see if malloc_size exists
15120 set malloc_size d_malloc_size
15123 : see if malloc_size_good exists
15124 set malloc_good_size d_malloc_good_size
15127 : see if mblen exists
15131 : see if mbstowcs exists
15132 set mbstowcs d_mbstowcs
15135 : see if mbtowc exists
15136 set mbtowc d_mbtowc
15139 : see if memchr exists
15140 set memchr d_memchr
15143 : see if memcmp exists
15144 set memcmp d_memcmp
15147 : see if memcpy exists
15148 set memcpy d_memcpy
15151 : see if memmove exists
15152 set memmove d_memmove
15155 : see if memset exists
15156 set memset d_memset
15159 : see if mkdir exists
15163 : see if mkdtemp exists
15164 set mkdtemp d_mkdtemp
15167 : see if mkfifo exists
15168 set mkfifo d_mkfifo
15171 : see if mkstemp exists
15172 set mkstemp d_mkstemp
15175 : see if mkstemps exists
15176 set mkstemps d_mkstemps
15179 : see if mktime exists
15180 set mktime d_mktime
15183 : see if this is a sys/mman.h system
15184 set sys/mman.h i_sysmman
15187 : see if mmap exists
15190 : see what shmat returns
15191 : default to something harmless
15193 case "$i_sysmman$d_mmap" in
15195 $cat >mmap.c <<'END'
15196 #include <sys/mman.h>
15199 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
15204 echo "and it returns ($mmaptype)." >&4
15210 : see if sqrtl exists
15214 : see if scalbnl exists
15215 set scalbnl d_scalbnl
15218 : see if modfl exists
15222 : see if prototype for modfl is available
15224 set d_modflproto modfl $i_math math.h
15227 d_modfl_pow32_bug="$undef"
15229 case "$d_longdbl$d_modfl" in
15232 Checking to see whether your modfl() is okay for large values...
15238 if $test "X$d_modflproto" != "X$define"; then
15239 $cat >>try.c <<EOCP
15240 /* Sigh. many current glibcs provide the function, but do not prototype it. */
15241 long double modfl (long double, long double *);
15244 $cat >>try.c <<EOCP
15246 long double nv = 4294967303.15;
15252 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
15256 case "$osname:$gccversion" in
15257 aix:) saveccflags="$ccflags"
15258 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
15261 if eval $compile; then
15264 *" 4294967303.150000 1.150000 4294967302.000000")
15265 echo >&4 "Your modfl() is broken for large values."
15266 d_modfl_pow32_bug="$define"
15268 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
15272 *" 4294967303.150000 0.150000 4294967303.000000")
15273 echo >&4 "Your modfl() seems okay for large values."
15275 *) echo >&4 "I don't understand your modfl() at all."
15281 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
15284 case "$osname:$gccversion" in
15285 aix:) ccflags="$saveccflags" ;; # restore
15290 if $test "$uselongdouble" = "$define"; then
15292 if $test "$d_sqrtl" != "$define"; then
15293 message="$message sqrtl"
15295 if $test "$d_modfl" != "$define"; then
15296 if $test "$d_aintl:$d_copysignl" = "$define:$define"; then
15297 echo "You have both aintl and copysignl, so I can emulate modfl."
15299 message="$message modfl"
15302 if $test "$d_frexpl" != "$define"; then
15303 if $test "$d_ilogbl:$d_scalbnl" = "$define:$define"; then
15304 echo "You have both ilogbl and scalbnl, so I can emulate frexpl."
15306 message="$message frexpl"
15310 if $test "$message" != ""; then
15313 *** You requested the use of long doubles but you do not seem to have
15314 *** the following mathematical functions needed for long double support:
15316 *** Please rerun Configure without -Duselongdouble and/or -Dusemorebits.
15317 *** Cannot continue, aborting.
15325 : see if mprotect exists
15326 set mprotect d_mprotect
15329 : see if msgctl exists
15330 set msgctl d_msgctl
15333 : see if msgget exists
15334 set msgget d_msgget
15337 : see if msgsnd exists
15338 set msgsnd d_msgsnd
15341 : see if msgrcv exists
15342 set msgrcv d_msgrcv
15345 : see how much of the 'msg*(2)' library is present.
15348 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
15349 *"$undef"*) h_msg=false;;
15353 case "`ipcs 2>&1`" in
15354 "SVID messages"*"not configured"*)
15355 echo "Your $osname does not have the msg*(2) configured." >&4
15358 set msgctl d_msgctl
15360 set msgget d_msgget
15362 set msgsnd d_msgsnd
15364 set msgrcv d_msgrcv
15370 : we could also check for sys/ipc.h ...
15371 if $h_msg && $test `./findhdr sys/msg.h`; then
15372 echo "You have the full msg*(2) library." >&4
15375 echo "You don't have the full msg*(2) library." >&4
15381 : Check for msghdr_s
15383 echo "Checking to see if your system supports struct msghdr..." >&4
15384 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
15386 case "$d_msghdr_s" in
15387 "$define") echo "Yes, it does." ;;
15388 *) echo "No, it doesn't." ;;
15392 : see if msync exists
15396 : see if munmap exists
15397 set munmap d_munmap
15400 : see if nice exists
15404 : see if this is a langinfo.h system
15405 set langinfo.h i_langinfo
15408 : see if nl_langinfo exists
15409 set nl_langinfo d_nl_langinfo
15412 : check for volatile keyword
15414 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
15415 $cat >try.c <<'EOCP'
15418 typedef struct _goo_struct goo_struct;
15419 goo_struct * volatile goo = ((goo_struct *)0);
15420 struct _goo_struct {
15425 typedef unsigned short foo_t;
15426 char *volatile foo;
15428 volatile foo_t blech;
15432 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
15434 echo "Yup, it does."
15437 echo "Nope, it doesn't."
15443 : Check basic sizes
15445 $echo "Choosing the C types to be used for Perl's internal types..." >&4
15447 case "$use64bitint:$d_quad:$quadtype" in
15450 uvtype="$uquadtype"
15455 uvtype="unsigned long"
15461 case "$uselongdouble:$d_longdbl" in
15463 nvtype="long double"
15464 nvsize=$longdblsize
15471 $echo "(IV will be "$ivtype", $ivsize bytes)"
15472 $echo "(UV will be "$uvtype", $uvsize bytes)"
15473 $echo "(NV will be "$nvtype", $nvsize bytes)"
15476 #$i_inttypes I_INTTYPES
15478 #include <inttypes.h>
15483 int8_t i = INT8_MAX;
15484 uint8_t u = UINT8_MAX;
15485 printf("int8_t\n");
15488 int16_t i = INT16_MAX;
15489 uint16_t i = UINT16_MAX;
15490 printf("int16_t\n");
15493 int32_t i = INT32_MAX;
15494 uint32_t u = UINT32_MAX;
15495 printf("int32_t\n");
15500 i8type="signed char"
15501 u8type="unsigned char"
15506 '') case "$shortsize" in
15508 u16type="unsigned short"
15516 '') set try -DINT16
15517 if eval $compile; then
15518 case "`$run ./try`" in
15530 '') if $test $shortsize -ge 2; then
15532 u16type="unsigned short"
15540 '') case "$longsize" in
15542 u32type="unsigned long"
15546 *) case "$intsize" in
15548 u32type="unsigned int"
15558 '') set try -DINT32
15559 if eval $compile; then
15560 case "`$run ./try`" in
15572 '') if $test $intsize -ge 4; then
15574 u32type="unsigned int"
15582 '') case "$d_quad:$quadtype" in
15584 i64type="$quadtype"
15585 u64type="$uquadtype"
15593 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
15594 : volatile so that the compiler has to store it out to memory.
15595 if test X"$d_volatile" = X"$define"; then
15600 #$i_stdlib I_STDLIB
15602 #include <stdlib.h>
15604 #include <sys/types.h>
15605 #include <signal.h>
15607 $volatile int bletched = 0;
15608 $signal_t blech(int s) { bletched = 1; }
15613 int n = 8 * $uvsize;
15616 signal(SIGFPE, blech);
15619 for (i = 0; i < n; i++) {
15620 u = u << 1 | ($uvtype)1;
15622 if (($uvtype)d != u)
15626 d = ($nvtype)(u - 1);
15627 if (($uvtype)d != (u - 1))
15634 printf("%d\n", ((i == n) ? -n : i));
15640 d_nv_preserves_uv="$undef"
15641 if eval $compile; then
15642 nv_preserves_uv_bits="`$run ./try`"
15644 case "$nv_preserves_uv_bits" in
15646 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
15647 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
15648 d_nv_preserves_uv="$define"
15650 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
15651 d_nv_preserves_uv="$undef" ;;
15652 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
15653 nv_preserves_uv_bits="0" ;;
15657 $echo "Checking to find the largest integer value your NVs can hold..." >&4
15658 : volatile so that the compiler has to store it out to memory.
15659 if test X"$d_volatile" = X"$define"; then
15665 typedef $nvtype NV;
15672 while(count < 256) {
15673 $volatile NV up = value + 1.0;
15674 $volatile NV negated = -value;
15675 $volatile NV down = negated - 1.0;
15676 $volatile NV got_up = up - value;
15677 int up_good = got_up == 1.0;
15678 int got_down = down - negated;
15679 int down_good = got_down == -1.0;
15681 if (down_good != up_good) {
15683 "Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n",
15684 up_good, (double) got_up, down_good, (double) got_down,
15685 count, (double) value);
15692 fputs("256.0", stdout);
15695 fputs("2.0", stdout);
15701 fputs("*", stdout);
15707 fprintf(stderr, "Cannot overflow integer range, even at 2**%d (%.20f)\n",
15708 count, (double) value);
15714 nv_overflows_integers_at='0'
15715 if eval $compile; then
15721 The largest integer your NVs can preserve is equal to $xxx
15723 nv_overflows_integers_at="$xxx"
15726 Cannot determine the largest integer value your NVs can hold, unexpected output
15733 Cannot determine the largest integer value your NVs can hold
15740 $echo "Checking whether NV 0.0 is all bits zero in memory..." >&4
15741 : volatile so that the compiler has to store it out to memory.
15742 if test X"$d_volatile" = X"$define"; then
15747 #$i_stdlib I_STDLIB
15749 #include <stdlib.h>
15751 #$i_string I_STRING
15753 # include <string.h>
15755 # include <strings.h>
15757 #include <sys/types.h>
15758 #include <signal.h>
15760 $volatile int bletched = 0;
15761 $signal_t blech(int s) { bletched = 1; }
15764 int checkit($nvtype d, char *where) {
15765 unsigned char *p = (char *)&d;
15766 unsigned char *end = p + sizeof(d);
15776 printf("No - %s: 0x", where);
15778 printf ("%02X", *p++);
15783 int main(int argc, char **argv) {
15786 fail += checkit(d, "0.0");
15788 /* The compiler shouldn't be assuming that bletched is 0 */
15791 fail += checkit(d, "bleched");
15794 signal(SIGFPE, blech);
15797 /* Paranoia - the compiler should have no way of knowing that ANSI says
15798 that argv[argc] will always be NULL. Actually, if it did assume this it
15799 would be buggy, as this is C and main() can be called from elsewhere in
15801 d = argv[argc] ? 1 : 0;
15804 printf("Odd argv[argc]=%p, d=%g\n", argv[argc], d);
15807 fail += checkit(d, "ternary");
15809 memset(&d, sizeof(d), argv[argc] ? 1 : 0);
15812 printf("No - memset doesn't give 0.0\n");
15813 /* This might just blow up: */
15814 printf("(gives %g)\n", d);
15820 printf("No - something bleched\n");
15825 printf("No - %d fail(s)\n", fail);
15834 d_nv_zero_is_allbits_zero="$undef"
15835 if eval $compile; then
15841 0.0 is represented as all bits zero in memory
15843 d_nv_zero_is_allbits_zero="$define"
15846 0.0 is not represented as all bits zero in memory
15848 d_nv_zero_is_allbits_zero="$undef"
15853 0.0 is not represented as all bits zero in memory
15855 d_nv_zero_is_allbits_zero="$undef"
15861 : check for off64_t
15863 echo "Checking to see if you have off64_t..." >&4
15865 #include <sys/types.h>
15866 #include <unistd.h>
15867 int main() { off64_t x = 7; }
15870 if eval $compile; then
15872 echo "You have off64_t."
15875 echo "You do not have off64_t."
15876 case "$lseeksize" in
15877 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
15884 : how to create joinable pthreads
15885 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
15887 echo "Checking what constant to use for creating joinable pthreads..." >&4
15888 $cat >try.c <<'EOCP'
15889 #include <pthread.h>
15891 int detachstate = JOINABLE;
15894 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
15895 if eval $compile; then
15896 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
15897 val="$undef" # Yes, undef.
15898 set d_old_pthread_create_joinable
15901 set old_pthread_create_joinable
15904 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
15905 if eval $compile; then
15906 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
15908 set d_old_pthread_create_joinable
15910 val=PTHREAD_CREATE_UNDETACHED
15911 set old_pthread_create_joinable
15914 set try -DJOINABLE=__UNDETACHED
15915 if eval $compile; then
15916 echo "You seem to use __UNDETACHED." >&4
15918 set d_old_pthread_create_joinable
15921 set old_pthread_create_joinable
15924 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
15926 set d_old_pthread_create_joinable
15929 set old_pthread_create_joinable
15936 d_old_pthread_create_joinable="$undef"
15937 old_pthread_create_joinable=""
15940 : see if pause exists
15944 : see if poll exists
15948 : see if readlink exists
15949 set readlink d_readlink
15952 : Check if exe is symlink to abs path of executing program
15956 case "$d_readlink" in
15958 if $issymlink /proc/self/exe ; then
15959 $ls -l /proc/self/exe > reflect
15960 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
15961 echo "You have Linux-like /proc/self/exe."
15962 procselfexe='"/proc/self/exe"'
15966 if $issymlink /proc/curproc/file ; then
15967 $ls -l /proc/curproc/file > reflect
15968 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
15969 echo "You have BSD-like /proc/curproc/file."
15970 procselfexe='"/proc/curproc/file"'
15980 : backward compatibility for d_hvfork
15981 if test X$d_hvfork != X; then
15982 d_vfork="$d_hvfork"
15985 : see if there is a vfork
15990 d_pseudofork=$undef
15992 : Ok, but do we want to use it. vfork is reportedly unreliable in
15993 : perl on Solaris 2.x, and probably elsewhere.
15997 case "$usevfork" in
16003 Perl can only use a vfork() that doesn't suffer from strict
16004 restrictions on calling functions or modifying global data in
16005 the child. For example, glibc-2.1 contains such a vfork()
16006 that is unsuitable. If your system provides a proper fork()
16007 call, chances are that you do NOT want perl to use vfork().
16010 rp="Do you still want to use vfork()?"
16015 echo "Ok, we won't use vfork()."
16024 $define) usevfork='true';;
16025 *) usevfork='false';;
16028 : see whether the pthread_atfork exists
16030 #include <pthread.h>
16033 #ifdef PTHREAD_ATFORK
16034 pthread_atfork(NULL,NULL,NULL);
16039 : see if pthread_atfork exists
16040 set try -DPTHREAD_ATFORK
16041 if eval $compile; then
16046 case "$usethreads" in
16049 $define) echo 'pthread_atfork found.' >&4 ;;
16050 *) echo 'pthread_atfork NOT found.' >&4 ;;
16053 set d_pthread_atfork
16056 : see if pthread_attr_setscope exists
16057 set pthread_attr_setscope d_pthread_attr_setscope
16060 : see whether the various POSIXish _yields exist
16062 #include <pthread.h>
16068 #ifdef PTHREAD_YIELD
16071 #ifdef PTHREAD_YIELD_NULL
16072 pthread_yield(NULL);
16078 : see if sched_yield exists
16079 set try -DSCHED_YIELD
16080 if eval $compile; then
16082 sched_yield='sched_yield()'
16086 case "$usethreads" in
16089 $define) echo 'sched_yield() found.' >&4 ;;
16090 *) echo 'sched_yield() NOT found.' >&4 ;;
16096 : see if pthread_yield exists
16097 set try -DPTHREAD_YIELD
16098 if eval $compile; then
16100 case "$sched_yield" in
16101 '') sched_yield='pthread_yield()' ;;
16104 set try -DPTHREAD_YIELD_NULL
16105 if eval $compile; then
16107 case "$sched_yield" in
16108 '') sched_yield='pthread_yield(NULL)' ;;
16114 case "$usethreads" in
16117 $define) echo 'pthread_yield() found.' >&4 ;;
16118 *) echo 'pthread_yield() NOT found.' >&4 ;;
16122 set d_pthread_yield
16124 case "$sched_yield" in
16125 '') sched_yield=undef ;;
16129 : see if random_r exists
16130 set random_r d_random_r
16132 case "$d_random_r" in
16134 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
16135 case "$d_random_r_proto:$usethreads" in
16136 ":define") d_random_r_proto=define
16137 set d_random_r_proto random_r $hdrs
16141 case "$d_random_r_proto" in
16143 case "$random_r_proto" in
16144 ''|0) try='int random_r(int*, struct random_data*);'
16145 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_iS ;;
16147 case "$random_r_proto" in
16148 ''|0) try='int random_r(long*, struct random_data*);'
16149 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_lS ;;
16151 case "$random_r_proto" in
16152 ''|0) try='int random_r(struct random_data*, int32_t*);'
16153 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_St ;;
16155 case "$random_r_proto" in
16156 ''|0) d_random_r=undef
16158 echo "Disabling random_r, cannot determine prototype." >&4 ;;
16159 * ) case "$random_r_proto" in
16160 REENTRANT_PROTO*) ;;
16161 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
16163 echo "Prototype: $try" ;;
16166 *) case "$usethreads" in
16167 define) echo "random_r has no prototype, not using it." >&4 ;;
16174 *) random_r_proto=0
16178 : see if readdir and friends exist
16179 set readdir d_readdir
16181 set seekdir d_seekdir
16183 set telldir d_telldir
16185 set rewinddir d_rewinddir
16188 : see if readdir64_r exists
16189 set readdir64_r d_readdir64_r
16191 case "$d_readdir64_r" in
16193 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
16194 case "$d_readdir64_r_proto:$usethreads" in
16195 ":define") d_readdir64_r_proto=define
16196 set d_readdir64_r_proto readdir64_r $hdrs
16200 case "$d_readdir64_r_proto" in
16202 case "$readdir64_r_proto" in
16203 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
16204 ./protochk "$extern_C $try" $hdrs && readdir64_r_proto=I_TSR ;;
16206 case "$readdir64_r_proto" in
16207 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
16208 ./protochk "$extern_C $try" $hdrs && readdir64_r_proto=I_TS ;;
16210 case "$readdir64_r_proto" in
16211 ''|0) d_readdir64_r=undef
16212 readdir64_r_proto=0
16213 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
16214 * ) case "$readdir64_r_proto" in
16215 REENTRANT_PROTO*) ;;
16216 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
16218 echo "Prototype: $try" ;;
16221 *) case "$usethreads" in
16222 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
16224 d_readdir64_r=undef
16225 readdir64_r_proto=0
16229 *) readdir64_r_proto=0
16233 : see if readdir_r exists
16234 set readdir_r d_readdir_r
16236 case "$d_readdir_r" in
16238 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
16239 case "$d_readdir_r_proto:$usethreads" in
16240 ":define") d_readdir_r_proto=define
16241 set d_readdir_r_proto readdir_r $hdrs
16245 case "$d_readdir_r_proto" in
16247 case "$readdir_r_proto" in
16248 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
16249 ./protochk "$extern_C $try" $hdrs && readdir_r_proto=I_TSR ;;
16251 case "$readdir_r_proto" in
16252 ''|0) try='int readdir_r(DIR*, struct dirent*);'
16253 ./protochk "$extern_C $try" $hdrs && readdir_r_proto=I_TS ;;
16255 case "$readdir_r_proto" in
16256 ''|0) d_readdir_r=undef
16258 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
16259 * ) case "$readdir_r_proto" in
16260 REENTRANT_PROTO*) ;;
16261 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
16263 echo "Prototype: $try" ;;
16266 *) case "$usethreads" in
16267 define) echo "readdir_r has no prototype, not using it." >&4 ;;
16274 *) readdir_r_proto=0
16278 : see if readv exists
16282 : see if recvmsg exists
16283 set recvmsg d_recvmsg
16286 : see if rename exists
16287 set rename d_rename
16290 : see if rmdir exists
16294 : see if memory.h is available.
16299 : See if it conflicts with string.h
16305 $cppstdin $cppflags $cppminus < $strings > mem.h
16306 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
16308 echo "We won't be including <memory.h>."
16318 : can bcopy handle overlapping blocks?
16321 case "$d_memmove" in
16322 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
16323 *) case "$d_bcopy" in
16325 echo "Checking to see if bcopy() can do overlapping copies..." >&4
16327 #$i_memory I_MEMORY
16328 #$i_stdlib I_STDLIB
16329 #$i_string I_STRING
16330 #$i_unistd I_UNISTD
16332 $cat >>try.c <<'EOCP'
16335 # include <memory.h>
16338 # include <stdlib.h>
16341 # include <string.h>
16343 # include <strings.h>
16346 # include <unistd.h> /* Needed for NetBSD */
16350 char buf[128], abc[128];
16356 /* Copy "abcde..." string to char abc[] so that gcc doesn't
16357 try to store the string in read-only memory. */
16358 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
16360 for (align = 7; align >= 0; align--) {
16361 for (len = 36; len; len--) {
16363 bcopy(abc, b, len);
16364 for (off = 1; off <= len; off++) {
16365 bcopy(b, b+off, len);
16366 bcopy(b+off, b, len);
16367 if (bcmp(b, abc, len))
16376 if eval $compile_ok; then
16377 if $run ./try 2>/dev/null; then
16378 echo "Yes, it can."
16381 echo "It can't, sorry."
16384 echo "(I can't compile the test program, so we'll assume not...)"
16394 : can memcpy handle overlapping blocks?
16397 case "$d_memmove" in
16398 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
16399 *) case "$d_memcpy" in
16401 echo "Checking to see if memcpy() can do overlapping copies..." >&4
16403 #$i_memory I_MEMORY
16404 #$i_stdlib I_STDLIB
16405 #$i_string I_STRING
16406 #$i_unistd I_UNISTD
16408 $cat >>try.c <<'EOCP'
16411 # include <memory.h>
16414 # include <stdlib.h>
16417 # include <string.h>
16419 # include <strings.h>
16422 # include <unistd.h> /* Needed for NetBSD */
16426 char buf[128], abc[128];
16432 /* Copy "abcde..." string to char abc[] so that gcc doesn't
16433 try to store the string in read-only memory. */
16434 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
16436 for (align = 7; align >= 0; align--) {
16437 for (len = 36; len; len--) {
16439 memcpy(b, abc, len);
16440 for (off = 1; off <= len; off++) {
16441 memcpy(b+off, b, len);
16442 memcpy(b, b+off, len);
16443 if (memcmp(b, abc, len))
16452 if eval $compile_ok; then
16453 if $run ./try 2>/dev/null; then
16454 echo "Yes, it can."
16457 echo "It can't, sorry."
16460 echo "(I can't compile the test program, so we'll assume not...)"
16470 : can memcmp be trusted to compare relative magnitude?
16472 case "$d_memcmp" in
16475 echo "Checking if your memcmp() can compare relative magnitude..." >&4
16477 #$i_memory I_MEMORY
16478 #$i_stdlib I_STDLIB
16479 #$i_string I_STRING
16480 #$i_unistd I_UNISTD
16482 $cat >>try.c <<'EOCP'
16485 # include <memory.h>
16488 # include <stdlib.h>
16491 # include <string.h>
16493 # include <strings.h>
16496 # include <unistd.h> /* Needed for NetBSD */
16502 if ((a < b) && memcmp(&a, &b, 1) < 0)
16508 if eval $compile_ok; then
16509 if $run ./try 2>/dev/null; then
16510 echo "Yes, it can."
16513 echo "No, it can't (it uses signed chars)."
16516 echo "(I can't compile the test program, so we'll assume not...)"
16524 : see if prototype for sbrk is available
16526 set d_sbrkproto sbrk $i_unistd unistd.h
16529 : see if select exists
16530 set select d_select
16533 : see if semctl exists
16534 set semctl d_semctl
16537 : see if semget exists
16538 set semget d_semget
16541 : see if semop exists
16545 : see how much of the 'sem*(2)' library is present.
16548 case "$d_semctl$d_semget$d_semop" in
16549 *"$undef"*) h_sem=false;;
16553 case "`ipcs 2>&1`" in
16554 "SVID messages"*"not configured"*)
16555 echo "Your $osname does not have the sem*(2) configured." >&4
16558 set semctl d_semctl
16560 set semget d_semget
16568 : we could also check for sys/ipc.h ...
16569 if $h_sem && $test `./findhdr sys/sem.h`; then
16570 echo "You have the full sem*(2) library." >&4
16573 echo "You don't have the full sem*(2) library." >&4
16579 : see whether sys/sem.h defines union semun
16581 $cat > try.c <<'END'
16582 #include <sys/types.h>
16583 #include <sys/ipc.h>
16584 #include <sys/sem.h>
16585 int main () { union semun semun; semun.buf = 0; }
16588 if eval $compile; then
16589 echo "You have union semun in <sys/sem.h>." >&4
16592 echo "You do not have union semun in <sys/sem.h>." >&4
16599 : see how to do semctl IPC_STAT
16603 $cat > tryh.h <<END
16606 # define S_IRUSR S_IREAD
16607 # define S_IWUSR S_IWRITE
16608 # define S_IXUSR S_IEXEC
16610 # define S_IRUSR 0400
16611 # define S_IWUSR 0200
16612 # define S_IXUSR 0100
16614 # define S_IRGRP (S_IRUSR>>3)
16615 # define S_IWGRP (S_IWUSR>>3)
16616 # define S_IXGRP (S_IXUSR>>3)
16617 # define S_IROTH (S_IRUSR>>6)
16618 # define S_IWOTH (S_IWUSR>>6)
16619 # define S_IXOTH (S_IXUSR>>6)
16622 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
16623 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
16624 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
16627 : see whether semctl IPC_STAT can use union semun
16628 case "$d_semctl_semun" in
16632 #include <sys/types.h>
16633 #include <sys/ipc.h>
16634 #include <sys/sem.h>
16635 #include <sys/stat.h>
16642 #$d_union_semun HAS_UNION_SEMUN
16645 #ifndef HAS_UNION_SEMUN
16648 struct semid_ds *buf;
16649 unsigned short *array;
16655 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
16656 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
16658 struct semid_ds argbuf;
16661 st = semctl(sem, 0, IPC_STAT, arg);
16665 # endif /* IPC_STAT */
16666 printf("semctl IPC_STAT failed: errno = %d\n", errno);
16668 if (semctl(sem, 0, IPC_RMID, arg) != 0)
16669 # endif /* IPC_RMID */
16670 printf("semctl IPC_RMID failed: errno = %d\n", errno);
16672 #endif /* IPC_PRIVATE && ... */
16673 printf("semget failed: errno = %d\n", errno);
16678 if eval $compile; then
16681 semun) val="$define" ;;
16689 case "$d_semctl_semun" in
16691 echo "You can use union semun for semctl IPC_STAT." >&4
16694 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
16699 : see whether semctl IPC_STAT can use struct semid_ds pointer
16700 case "$d_semctl_semid_ds" in
16703 $cat > try.c <<'END'
16704 #include <sys/types.h>
16705 #include <sys/ipc.h>
16706 #include <sys/sem.h>
16707 #include <sys/stat.h>
16715 struct semid_ds arg;
16718 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
16719 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
16722 st = semctl(sem, 0, IPC_STAT, &arg);
16724 printf("semid_ds\n");
16726 # endif /* IPC_STAT */
16727 printf("semctl IPC_STAT failed: errno = %d\n", errno);
16729 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
16730 # endif /* IPC_RMID */
16731 printf("semctl IPC_RMID failed: errno = %d\n", errno);
16733 #endif /* IPC_PRIVATE && ... */
16734 printf("semget failed: errno = %d\n", errno);
16740 if eval $compile; then
16743 semid_ds) val="$define" ;;
16747 set d_semctl_semid_ds
16751 case "$d_semctl_semid_ds" in
16753 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
16755 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
16761 # We do not have the full sem*(2) library, so assume we can not
16767 set d_semctl_semid_ds
16773 : see if sendmsg exists
16774 set sendmsg d_sendmsg
16777 : see if setegid exists
16778 set setegid d_setegid
16781 : see if seteuid exists
16782 set seteuid d_seteuid
16785 : see if setgrent exists
16786 set setgrent d_setgrent
16789 : see if setgrent_r exists
16790 set setgrent_r d_setgrent_r
16792 case "$d_setgrent_r" in
16794 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
16795 case "$d_setgrent_r_proto:$usethreads" in
16796 ":define") d_setgrent_r_proto=define
16797 set d_setgrent_r_proto setgrent_r $hdrs
16801 case "$d_setgrent_r_proto" in
16803 case "$setgrent_r_proto" in
16804 ''|0) try='int setgrent_r(FILE**);'
16805 ./protochk "$extern_C $try" $hdrs && setgrent_r_proto=I_H ;;
16807 case "$setgrent_r_proto" in
16808 ''|0) try='void setgrent_r(FILE**);'
16809 ./protochk "$extern_C $try" $hdrs && setgrent_r_proto=V_H ;;
16811 case "$setgrent_r_proto" in
16812 ''|0) d_setgrent_r=undef
16814 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
16815 * ) case "$setgrent_r_proto" in
16816 REENTRANT_PROTO*) ;;
16817 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
16819 echo "Prototype: $try" ;;
16822 *) case "$usethreads" in
16823 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
16830 *) setgrent_r_proto=0
16834 : see if sethostent exists
16835 set sethostent d_sethent
16838 : see if sethostent_r exists
16839 set sethostent_r d_sethostent_r
16841 case "$d_sethostent_r" in
16843 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16844 case "$d_sethostent_r_proto:$usethreads" in
16845 ":define") d_sethostent_r_proto=define
16846 set d_sethostent_r_proto sethostent_r $hdrs
16850 case "$d_sethostent_r_proto" in
16852 case "$sethostent_r_proto" in
16853 ''|0) try='int sethostent_r(int, struct hostent_data*);'
16854 ./protochk "$extern_C $try" $hdrs && sethostent_r_proto=I_ID ;;
16856 case "$sethostent_r_proto" in
16857 ''|0) try='void sethostent_r(int, struct hostent_data*);'
16858 ./protochk "$extern_C $try" $hdrs && sethostent_r_proto=V_ID ;;
16860 case "$sethostent_r_proto" in
16861 ''|0) d_sethostent_r=undef
16862 sethostent_r_proto=0
16863 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
16864 * ) case "$sethostent_r_proto" in
16865 REENTRANT_PROTO*) ;;
16866 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
16868 echo "Prototype: $try" ;;
16871 *) case "$usethreads" in
16872 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
16874 d_sethostent_r=undef
16875 sethostent_r_proto=0
16879 *) sethostent_r_proto=0
16883 : see if setitimer exists
16884 set setitimer d_setitimer
16887 : see if setlinebuf exists
16888 set setlinebuf d_setlinebuf
16891 : see if setlocale exists
16892 set setlocale d_setlocale
16895 : see if locale.h is available
16896 set locale.h i_locale
16899 : see if setlocale_r exists
16900 set setlocale_r d_setlocale_r
16902 case "$d_setlocale_r" in
16904 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
16905 case "$d_setlocale_r_proto:$usethreads" in
16906 ":define") d_setlocale_r_proto=define
16907 set d_setlocale_r_proto setlocale_r $hdrs
16911 case "$d_setlocale_r_proto" in
16913 case "$setlocale_r_proto" in
16914 ''|0) try='int setlocale_r(int, const char*, char*, int);'
16915 ./protochk "$extern_C $try" $hdrs && setlocale_r_proto=I_ICBI ;;
16917 case "$setlocale_r_proto" in
16918 ''|0) d_setlocale_r=undef
16919 setlocale_r_proto=0
16920 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
16921 * ) case "$setlocale_r_proto" in
16922 REENTRANT_PROTO*) ;;
16923 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
16925 echo "Prototype: $try" ;;
16928 *) case "$usethreads" in
16929 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
16931 d_setlocale_r=undef
16932 setlocale_r_proto=0
16936 *) setlocale_r_proto=0
16940 : see if setnetent exists
16941 set setnetent d_setnent
16944 : see if setnetent_r exists
16945 set setnetent_r d_setnetent_r
16947 case "$d_setnetent_r" in
16949 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
16950 case "$d_setnetent_r_proto:$usethreads" in
16951 ":define") d_setnetent_r_proto=define
16952 set d_setnetent_r_proto setnetent_r $hdrs
16956 case "$d_setnetent_r_proto" in
16958 case "$setnetent_r_proto" in
16959 ''|0) try='int setnetent_r(int, struct netent_data*);'
16960 ./protochk "$extern_C $try" $hdrs && setnetent_r_proto=I_ID ;;
16962 case "$setnetent_r_proto" in
16963 ''|0) try='void setnetent_r(int, struct netent_data*);'
16964 ./protochk "$extern_C $try" $hdrs && setnetent_r_proto=V_ID ;;
16966 case "$setnetent_r_proto" in
16967 ''|0) d_setnetent_r=undef
16968 setnetent_r_proto=0
16969 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
16970 * ) case "$setnetent_r_proto" in
16971 REENTRANT_PROTO*) ;;
16972 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
16974 echo "Prototype: $try" ;;
16977 *) case "$usethreads" in
16978 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
16980 d_setnetent_r=undef
16981 setnetent_r_proto=0
16985 *) setnetent_r_proto=0
16989 : see if setprotoent exists
16990 set setprotoent d_setpent
16993 : see if setpgid exists
16994 set setpgid d_setpgid
16997 : see if setpgrp2 exists
16998 set setpgrp2 d_setpgrp2
17001 : see if setpriority exists
17002 set setpriority d_setprior
17005 : see if setproctitle exists
17006 set setproctitle d_setproctitle
17009 : see if setprotoent_r exists
17010 set setprotoent_r d_setprotoent_r
17012 case "$d_setprotoent_r" in
17014 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
17015 case "$d_setprotoent_r_proto:$usethreads" in
17016 ":define") d_setprotoent_r_proto=define
17017 set d_setprotoent_r_proto setprotoent_r $hdrs
17021 case "$d_setprotoent_r_proto" in
17023 case "$setprotoent_r_proto" in
17024 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
17025 ./protochk "$extern_C $try" $hdrs && setprotoent_r_proto=I_ID ;;
17027 case "$setprotoent_r_proto" in
17028 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
17029 ./protochk "$extern_C $try" $hdrs && setprotoent_r_proto=V_ID ;;
17031 case "$setprotoent_r_proto" in
17032 ''|0) d_setprotoent_r=undef
17033 setprotoent_r_proto=0
17034 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
17035 * ) case "$setprotoent_r_proto" in
17036 REENTRANT_PROTO*) ;;
17037 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
17039 echo "Prototype: $try" ;;
17042 *) case "$usethreads" in
17043 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
17045 d_setprotoent_r=undef
17046 setprotoent_r_proto=0
17050 *) setprotoent_r_proto=0
17054 : see if setpwent exists
17055 set setpwent d_setpwent
17058 : see if setpwent_r exists
17059 set setpwent_r d_setpwent_r
17061 case "$d_setpwent_r" in
17063 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
17064 case "$d_setpwent_r_proto:$usethreads" in
17065 ":define") d_setpwent_r_proto=define
17066 set d_setpwent_r_proto setpwent_r $hdrs
17070 case "$d_setpwent_r_proto" in
17072 case "$setpwent_r_proto" in
17073 ''|0) try='int setpwent_r(FILE**);'
17074 ./protochk "$extern_C $try" $hdrs && setpwent_r_proto=I_H ;;
17076 case "$setpwent_r_proto" in
17077 ''|0) try='void setpwent_r(FILE**);'
17078 ./protochk "$extern_C $try" $hdrs && setpwent_r_proto=V_H ;;
17080 case "$setpwent_r_proto" in
17081 ''|0) d_setpwent_r=undef
17083 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
17084 * ) case "$setpwent_r_proto" in
17085 REENTRANT_PROTO*) ;;
17086 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
17088 echo "Prototype: $try" ;;
17091 *) case "$usethreads" in
17092 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
17099 *) setpwent_r_proto=0
17103 : see if setregid exists
17104 set setregid d_setregid
17106 set setresgid d_setresgid
17109 : see if setreuid exists
17110 set setreuid d_setreuid
17112 set setresuid d_setresuid
17115 : see if setrgid exists
17116 set setrgid d_setrgid
17119 : see if setruid exists
17120 set setruid d_setruid
17123 : see if setservent exists
17124 set setservent d_setsent
17127 : see if setservent_r exists
17128 set setservent_r d_setservent_r
17130 case "$d_setservent_r" in
17132 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
17133 case "$d_setservent_r_proto:$usethreads" in
17134 ":define") d_setservent_r_proto=define
17135 set d_setservent_r_proto setservent_r $hdrs
17139 case "$d_setservent_r_proto" in
17141 case "$setservent_r_proto" in
17142 ''|0) try='int setservent_r(int, struct servent_data*);'
17143 ./protochk "$extern_C $try" $hdrs && setservent_r_proto=I_ID ;;
17145 case "$setservent_r_proto" in
17146 ''|0) try='void setservent_r(int, struct servent_data*);'
17147 ./protochk "$extern_C $try" $hdrs && setservent_r_proto=V_ID ;;
17149 case "$setservent_r_proto" in
17150 ''|0) d_setservent_r=undef
17151 setservent_r_proto=0
17152 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
17153 * ) case "$setservent_r_proto" in
17154 REENTRANT_PROTO*) ;;
17155 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
17157 echo "Prototype: $try" ;;
17160 *) case "$usethreads" in
17161 define) echo "setservent_r has no prototype, not using it." >&4 ;;
17163 d_setservent_r=undef
17164 setservent_r_proto=0
17168 *) setservent_r_proto=0
17172 : see if setsid exists
17173 set setsid d_setsid
17176 : see if setvbuf exists
17177 set setvbuf d_setvbuf
17180 : see if sfio.h is available
17184 : see if sfio library is available
17195 : Ok, but do we want to use it.
17199 true|$define|[yY]*) dflt='y';;
17202 echo "$package can use the sfio library, but it is experimental."
17203 case "$useperlio" in
17205 echo "For sfio also the PerlIO abstraction layer is needed."
17206 echo "Earlier you said you wouldn't want that."
17209 rp="You seem to have sfio available, do you want to try using it?"
17212 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
17213 useperlio="$define"
17216 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
17221 *) case "$usesfio" in
17222 true|$define|[yY]*)
17223 echo "Sorry, cannot find sfio on this machine." >&4
17224 echo "Ignoring your setting of usesfio=$usesfio." >&4
17233 $define) usesfio='true';;
17234 *) usesfio='false';;
17238 *) : Remove sfio from list of libraries to use
17241 echo "Removing unneeded -lsfio from library list" >&4
17242 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
17245 echo "libs = $libs" >&4
17252 : see if shmctl exists
17253 set shmctl d_shmctl
17256 : see if shmget exists
17257 set shmget d_shmget
17260 : see if shmat exists
17263 : see what shmat returns
17266 $cat >shmat.c <<'END'
17267 #include <sys/shm.h>
17270 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
17275 echo "and it returns ($shmattype)." >&4
17276 : see if a prototype for shmat is available
17277 xxx=`./findhdr sys/shm.h`
17278 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
17279 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
17290 set d_shmatprototype
17293 : see if shmdt exists
17297 : see how much of the 'shm*(2)' library is present.
17300 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
17301 *"$undef"*) h_shm=false;;
17305 case "`ipcs 2>&1`" in
17306 "SVID shared memory"*"not configured"*)
17307 echo "Your $osname does not have the shm*(2) configured." >&4
17310 set shmctl d_shmctl
17312 set shmget d_shmget
17322 : we could also check for sys/ipc.h ...
17323 if $h_shm && $test `./findhdr sys/shm.h`; then
17324 echo "You have the full shm*(2) library." >&4
17327 echo "You don't have the full shm*(2) library." >&4
17333 : see if we have sigaction
17335 if set sigaction val -f d_sigaction; eval $csym; $val; then
17336 echo 'sigaction() found.' >&4
17339 #include <sys/types.h>
17340 #include <signal.h>
17341 #$i_stdlib I_STDLIB
17343 #include <stdlib.h>
17347 struct sigaction act, oact;
17349 oact.sa_handler = 0;
17350 /* so that act and oact are used */
17351 exit(act.sa_flags == 0 && oact.sa_handler == 0);
17355 if eval $compile_ok; then
17358 echo "But you don't seem to have a useable struct sigaction." >&4
17362 echo 'sigaction NOT found.' >&4
17365 set d_sigaction; eval $setvar
17368 : see if this is a sunmath.h system
17369 set sunmath.h i_sunmath
17372 : see if signbit exists
17373 $echo $n "Checking to see if you have signbit() available to work on $nvtype... $c" >&4
17376 #$i_sunmath I_SUNMATH
17380 #ifdef I_SUNMATH /* Solaris special math library */
17381 # include <sunmath.h>
17384 int main(int argc, char **argv)
17388 if ((signbit(x) == 0) && (signbit(y) != 0))
17396 if eval $compile; then
17397 if $run ./try; then
17401 $echo "Signbit seems to be available, but doesn't work as I expected."
17402 $echo "I won't use it." >&4
17413 : see if sigprocmask exists
17414 set sigprocmask d_sigprocmask
17417 : see if sigsetjmp exists
17419 case "$d_sigsetjmp" in
17422 #include <setjmp.h>
17423 #$i_stdlib I_STDLIB
17425 #include <stdlib.h>
17431 if (sigsetjmp(env,1))
17434 siglongjmp(env, 1);
17439 if eval $compile; then
17440 if $run ./try >/dev/null 2>&1; then
17441 echo "POSIX sigsetjmp found." >&4
17445 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
17451 echo "sigsetjmp not found." >&4
17455 *) val="$d_sigsetjmp"
17456 case "$d_sigsetjmp" in
17457 $define) echo "POSIX sigsetjmp found." >&4;;
17458 $undef) echo "sigsetjmp not found." >&4;;
17466 : see if snprintf exists
17467 set snprintf d_snprintf
17470 : see if vsnprintf exists
17471 set vsnprintf d_vsnprintf
17474 case "$d_snprintf-$d_vsnprintf" in
17477 Checking whether your snprintf() and vsnprintf() work okay...
17479 $cat >try.c <<'EOCP'
17480 /* v?snprintf testing logic courtesy of Russ Allbery.
17481 * According to C99:
17482 * - if the buffer is too short it still must be \0-terminated
17483 * - if the buffer is too short the potentially required length
17484 * must be returned and not -1
17485 * - if the buffer is NULL the potentially required length
17486 * must be returned and not -1 or core dump
17489 #include <stdarg.h>
17493 int test (char *format, ...)
17498 va_start (args, format);
17499 count = vsnprintf (buf, sizeof buf, format, args);
17506 return ((test ("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0'
17507 && snprintf (NULL, 0, "%s", "abcd") == 4) ? 0 : 1);
17511 if eval $compile; then
17514 0) echo "Your snprintf() and vsnprintf() seem to be working okay." ;;
17516 Your snprintf() and snprintf() don't seem to be working okay.
17518 d_snprintf="$undef"
17519 d_vsnprintf="$undef"
17523 echo "(I can't seem to compile the test program--assuming they don't)"
17524 d_snprintf="$undef"
17525 d_vsnprintf="$undef"
17531 : see if sockatmark exists
17532 set sockatmark d_sockatmark
17535 : see if prototype for sockatmark is available
17537 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
17540 : see if socks5_init exists
17541 set socks5_init d_socks5_init
17544 : see if sprintf returns the length of the string in the buffer as per ANSI
17545 $echo "Checking whether sprintf returns the length of the string..." >&4
17548 #$i_stdlib I_STDLIB
17550 #include <stdlib.h>
17552 #$i_string I_STRING
17554 # include <string.h>
17556 # include <strings.h>
17565 int check (size_t expect, int test) {
17566 size_t got = strlen(buffer);
17570 printf("expected %ld, got %ld in test %d '%s'\n", (long) expect, (long) got,
17575 int main(int argc, char **argv) {
17578 check(sprintf(buffer, ""), ++test);
17579 check(sprintf(buffer, "%s %s", "perl", "rules"), ++test);
17580 check(sprintf(buffer, "I like %g", atan2(0,-1)), ++test);
17587 if eval $compile; then
17591 sprintf returns the length of the string (as ANSI says it should)
17593 d_sprintf_returns_strlen="$define"
17596 sprintf does not return the length of the string (how old is this system?)
17598 d_sprintf_returns_strlen="$undef"
17602 echo "(I can't seem to compile the test program--assuming it doesn't)" >&4
17603 d_sprintf_returns_strlen="$undef"
17607 : see if srand48_r exists
17608 set srand48_r d_srand48_r
17610 case "$d_srand48_r" in
17612 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
17613 case "$d_srand48_r_proto:$usethreads" in
17614 ":define") d_srand48_r_proto=define
17615 set d_srand48_r_proto srand48_r $hdrs
17619 case "$d_srand48_r_proto" in
17621 case "$srand48_r_proto" in
17622 ''|0) try='int srand48_r(long, struct drand48_data*);'
17623 ./protochk "$extern_C $try" $hdrs && srand48_r_proto=I_LS ;;
17625 case "$srand48_r_proto" in
17626 ''|0) d_srand48_r=undef
17628 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
17629 * ) case "$srand48_r_proto" in
17630 REENTRANT_PROTO*) ;;
17631 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
17633 echo "Prototype: $try" ;;
17636 *) case "$usethreads" in
17637 define) echo "srand48_r has no prototype, not using it." >&4 ;;
17644 *) srand48_r_proto=0
17648 : see if srandom_r exists
17649 set srandom_r d_srandom_r
17651 case "$d_srandom_r" in
17653 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
17654 case "$d_srandom_r_proto:$usethreads" in
17655 ":define") d_srandom_r_proto=define
17656 set d_srandom_r_proto srandom_r $hdrs
17660 case "$d_srandom_r_proto" in
17662 case "$srandom_r_proto" in
17663 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
17664 ./protochk "$extern_C $try" $hdrs && srandom_r_proto=I_TS ;;
17666 case "$srandom_r_proto" in
17667 ''|0) d_srandom_r=undef
17669 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
17670 * ) case "$srandom_r_proto" in
17671 REENTRANT_PROTO*) ;;
17672 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
17674 echo "Prototype: $try" ;;
17677 *) case "$usethreads" in
17678 define) echo "srandom_r has no prototype, not using it." >&4 ;;
17685 *) srandom_r_proto=0
17689 : see if prototype for setresgid is available
17691 set d_sresgproto setresgid $i_unistd unistd.h
17694 : see if prototype for setresuid is available
17696 set d_sresuproto setresuid $i_unistd unistd.h
17699 : see if sys/stat.h is available
17700 set sys/stat.h i_sysstat
17703 : see if stat knows about block sizes
17705 echo "Checking to see if your struct stat has st_blocks field..." >&4
17706 set d_statblks stat st_blocks $i_sysstat sys/stat.h
17709 : see if this is a sys/vfs.h system
17710 set sys/vfs.h i_sysvfs
17713 : see if this is a sys/statfs.h system
17714 set sys/statfs.h i_sysstatfs
17717 : Check for statfs_s
17719 echo "Checking to see if your system supports struct statfs..." >&4
17720 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
17722 case "$d_statfs_s" in
17723 "$define") echo "Yes, it does." ;;
17724 *) echo "No, it doesn't." ;;
17728 : see if struct statfs knows about f_flags
17729 case "$d_statfs_s" in
17732 echo "Checking to see if your struct statfs has f_flags field..." >&4
17733 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
17737 set d_statfs_f_flags
17741 case "$d_statfs_f_flags" in
17742 "$define") echo "Yes, it does." ;;
17743 *) echo "No, it doesn't." ;;
17746 : Check stream access
17748 Checking how to access stdio streams by file descriptor number...
17750 case "$stdio_stream_array" in
17751 '') $cat >try.c <<EOCP
17754 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
17758 for s in _iob __iob __sF
17760 set try -DSTDIO_STREAM_ARRAY=$s
17761 if eval $compile; then
17762 case "`$run ./try`" in
17763 yes) stdio_stream_array=$s; break ;;
17769 case "$stdio_stream_array" in
17771 I can't figure out how to access stdio streams by file descriptor number.
17773 d_stdio_stream_array="$undef"
17776 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
17778 d_stdio_stream_array="$define"
17782 : see if strcoll exists
17783 set strcoll d_strcoll
17786 : check for structure copying
17788 echo "Checking to see if your C compiler can copy structs..." >&4
17789 $cat >try.c <<'EOCP'
17799 if $cc -c try.c >/dev/null 2>&1 ; then
17801 echo "Yup, it can."
17804 echo "Nope, it can't."
17810 : see if strerror and/or sys_errlist[] exist
17812 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
17813 if set strerror val -f d_strerror; eval $csym; $val; then
17814 echo 'strerror() found.' >&4
17815 d_strerror="$define"
17816 d_strerrm='strerror(e)'
17817 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
17818 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
17819 d_syserrlst="$define"
17821 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
17822 d_syserrlst="$undef"
17824 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
17825 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
17826 echo 'strerror() found in string header.' >&4
17827 d_strerror="$define"
17828 d_strerrm='strerror(e)'
17829 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
17830 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
17831 d_syserrlst="$define"
17833 echo "(You don't appear to have any sys_errlist[], how can this be?)"
17834 d_syserrlst="$undef"
17836 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
17837 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
17838 d_strerror="$undef"
17839 d_syserrlst="$define"
17840 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
17842 echo 'strerror() and sys_errlist[] NOT found.' >&4
17843 d_strerror="$undef"
17844 d_syserrlst="$undef"
17845 d_strerrm='"unknown"'
17849 : see if strerror_r exists
17850 set strerror_r d_strerror_r
17852 case "$d_strerror_r" in
17854 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
17855 case "$d_strerror_r_proto:$usethreads" in
17856 ":define") d_strerror_r_proto=define
17857 set d_strerror_r_proto strerror_r $hdrs
17861 case "$d_strerror_r_proto" in
17863 case "$strerror_r_proto" in
17864 ''|0) try='int strerror_r(int, char*, size_t);'
17865 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=I_IBW ;;
17867 case "$strerror_r_proto" in
17868 ''|0) try='int strerror_r(int, char*, int);'
17869 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=I_IBI ;;
17871 case "$strerror_r_proto" in
17872 ''|0) try='char* strerror_r(int, char*, size_t);'
17873 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=B_IBW ;;
17875 case "$strerror_r_proto" in
17876 ''|0) d_strerror_r=undef
17878 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
17879 * ) case "$strerror_r_proto" in
17880 REENTRANT_PROTO*) ;;
17881 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
17883 echo "Prototype: $try" ;;
17886 *) case "$usethreads" in
17887 define) echo "strerror_r has no prototype, not using it." >&4 ;;
17894 *) strerror_r_proto=0
17898 : see if strftime exists
17899 set strftime d_strftime
17902 : see if strlcat exists
17903 set strlcat d_strlcat
17906 : see if strlcpy exists
17907 set strlcpy d_strlcpy
17910 : see if strtod exists
17911 set strtod d_strtod
17914 : see if strtol exists
17915 set strtol d_strtol
17918 : see if strtold exists
17919 set strtold d_strtold
17922 : see if strtoll exists
17923 set strtoll d_strtoll
17926 case "$d_longlong-$d_strtoll" in
17929 Checking whether your strtoll() works okay...
17931 $cat >try.c <<'EOCP'
17934 #define strtoll __strtoll
17937 #define strtoll _strtoll
17940 extern long long int strtoll(char *s, char **, int);
17941 static int bad = 0;
17942 int check(char *s, long long ell, int een) {
17945 gll = strtoll(s, 0, 10);
17946 if (!((gll == ell) && (errno == een)))
17950 check(" 1", 1LL, 0);
17951 check(" 0", 0LL, 0);
17952 check("-1", -1LL, 0);
17953 check("-9223372036854775808", -9223372036854775808LL, 0);
17954 check("-9223372036854775808", -9223372036854775808LL, 0);
17955 check(" 9223372036854775807", 9223372036854775807LL, 0);
17956 check("-9223372036854775808", -9223372036854775808LL, 0);
17957 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
17958 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
17964 if eval $compile; then
17967 ok) echo "Your strtoll() seems to be working okay." ;;
17969 Your strtoll() doesn't seem to be working okay.
17975 echo "(I can't seem to compile the test program--assuming it doesn't)"
17981 : see if strtoq exists
17982 set strtoq d_strtoq
17985 : see if strtoul exists
17986 set strtoul d_strtoul
17989 case "$d_strtoul" in
17992 Checking whether your strtoul() works okay...
17994 $cat >try.c <<'EOCP'
17997 extern unsigned long int strtoul(char *s, char **, int);
17998 static int bad = 0;
17999 void check(char *s, unsigned long eul, int een) {
18002 gul = strtoul(s, 0, 10);
18003 if (!((gul == eul) && (errno == een)))
18007 check(" 1", 1L, 0);
18008 check(" 0", 0L, 0);
18010 case "$longsize" in
18012 $cat >>try.c <<'EOCP'
18013 check("18446744073709551615", 18446744073709551615UL, 0);
18014 check("18446744073709551616", 18446744073709551615UL, ERANGE);
18015 #if 0 /* strtoul() for /^-/ strings is undefined. */
18016 check("-1", 18446744073709551615UL, 0);
18017 check("-18446744073709551614", 2, 0);
18018 check("-18446744073709551615", 1, 0);
18019 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
18020 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
18025 $cat >>try.c <<'EOCP'
18026 check("4294967295", 4294967295UL, 0);
18027 check("4294967296", 4294967295UL, ERANGE);
18028 #if 0 /* strtoul() for /^-/ strings is undefined. */
18029 check("-1", 4294967295UL, 0);
18030 check("-4294967294", 2, 0);
18031 check("-4294967295", 1, 0);
18032 check("-4294967296", 4294967295UL, ERANGE);
18033 check("-4294967297", 4294967295UL, ERANGE);
18038 : Should we write these tests to be more portable by sprintf-ing
18039 : ~0 and then manipulating that char string as input for strtol?
18042 $cat >>try.c <<'EOCP'
18049 if eval $compile; then
18050 case "`$run ./try`" in
18051 ok) echo "Your strtoul() seems to be working okay." ;;
18053 Your strtoul() doesn't seem to be working okay.
18059 echo "(I can't seem to compile the test program--assuming it doesn't)"
18065 : see if strtoull exists
18066 set strtoull d_strtoull
18069 case "$d_longlong-$d_strtoull" in
18072 Checking whether your strtoull() works okay...
18074 $cat >try.c <<'EOCP'
18077 #define strtoull __strtoull
18080 extern unsigned long long int strtoull(char *s, char **, int);
18081 static int bad = 0;
18082 int check(char *s, long long eull, int een) {
18085 gull = strtoull(s, 0, 10);
18086 if (!((gull == eull) && (errno == een)))
18090 check(" 1", 1LL, 0);
18091 check(" 0", 0LL, 0);
18092 check("18446744073709551615", 18446744073709551615ULL, 0);
18093 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
18094 #if 0 /* strtoull() for /^-/ strings is undefined. */
18095 check("-1", 18446744073709551615ULL, 0);
18096 check("-18446744073709551614", 2LL, 0);
18097 check("-18446744073709551615", 1LL, 0);
18098 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
18099 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
18106 if eval $compile; then
18107 case "`$run ./try`" in
18108 ok) echo "Your strtoull() seems to be working okay." ;;
18110 Your strtoull() doesn't seem to be working okay.
18112 d_strtoull="$undef"
18116 echo "(I can't seem to compile the test program--assuming it doesn't)"
18117 d_strtoull="$undef"
18122 : see if strtouq exists
18123 set strtouq d_strtouq
18126 case "$d_strtouq" in
18129 Checking whether your strtouq() works okay...
18131 $cat >try.c <<'EOCP'
18134 extern unsigned long long int strtouq(char *s, char **, int);
18135 static int bad = 0;
18136 void check(char *s, unsigned long long eull, int een) {
18137 unsigned long long gull;
18139 gull = strtouq(s, 0, 10);
18140 if (!((gull == eull) && (errno == een)))
18144 check(" 1", 1LL, 0);
18145 check(" 0", 0LL, 0);
18146 check("18446744073709551615", 18446744073709551615ULL, 0);
18147 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
18148 #if 0 /* strtouq() for /^-/ strings is undefined. */
18149 check("-1", 18446744073709551615ULL, 0);
18150 check("-18446744073709551614", 2LL, 0);
18151 check("-18446744073709551615", 1LL, 0);
18152 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
18153 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
18161 if eval $compile; then
18162 case "`$run ./try`" in
18163 ok) echo "Your strtouq() seems to be working okay." ;;
18165 Your strtouq() doesn't seem to be working okay.
18171 echo "(I can't seem to compile the test program--assuming it doesn't)"
18177 : see if strxfrm exists
18178 set strxfrm d_strxfrm
18181 : see if symlink exists
18182 set symlink d_symlink
18185 : see if syscall exists
18186 set syscall d_syscall
18189 : see if prototype for syscall is available
18191 set d_syscallproto syscall $i_unistd unistd.h
18194 : see if sysconf exists
18195 set sysconf d_sysconf
18198 : see if system exists
18199 set system d_system
18202 : see if tcgetpgrp exists
18203 set tcgetpgrp d_tcgetpgrp
18206 : see if tcsetpgrp exists
18207 set tcsetpgrp d_tcsetpgrp
18210 : see if prototype for telldir is available
18212 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
18215 : see if time exists
18217 if test "X$d_time" = X -o X"$timetype" = X; then
18218 if set time val -f d_time; eval $csym; $val; then
18219 echo 'time() found.' >&4
18221 rp="What is the type returned by time() on this system?"
18222 set time_t timetype long stdio.h sys/types.h
18225 echo 'time() not found, hope that will do.' >&4
18233 : see if timegm exists
18234 set timegm d_timegm
18237 : see if this is a sys/times.h system
18238 set sys/times.h i_systimes
18241 : see if times exists
18243 if set times val -f d_times; eval $csym; $val; then
18244 echo 'times() found.' >&4
18247 case "$i_systimes" in
18248 "$define") inc='sys/times.h';;
18250 rp="What is the type returned by times() on this system?"
18251 set clock_t clocktype long stdio.h sys/types.h $inc
18254 echo 'times() NOT found, hope that will do.' >&4
18259 : see if tmpnam_r exists
18260 set tmpnam_r d_tmpnam_r
18262 case "$d_tmpnam_r" in
18264 hdrs="$i_systypes sys/types.h define stdio.h "
18265 case "$d_tmpnam_r_proto:$usethreads" in
18266 ":define") d_tmpnam_r_proto=define
18267 set d_tmpnam_r_proto tmpnam_r $hdrs
18271 case "$d_tmpnam_r_proto" in
18273 case "$tmpnam_r_proto" in
18274 ''|0) try='char* tmpnam_r(char*);'
18275 ./protochk "$extern_C $try" $hdrs && tmpnam_r_proto=B_B ;;
18277 case "$tmpnam_r_proto" in
18278 ''|0) d_tmpnam_r=undef
18280 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
18281 * ) case "$tmpnam_r_proto" in
18282 REENTRANT_PROTO*) ;;
18283 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
18285 echo "Prototype: $try" ;;
18288 *) case "$usethreads" in
18289 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
18296 *) tmpnam_r_proto=0
18300 : see if truncate exists
18301 set truncate d_truncate
18304 : see if ttyname_r exists
18305 set ttyname_r d_ttyname_r
18307 case "$d_ttyname_r" in
18309 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
18310 case "$d_ttyname_r_proto:$usethreads" in
18311 ":define") d_ttyname_r_proto=define
18312 set d_ttyname_r_proto ttyname_r $hdrs
18316 case "$d_ttyname_r_proto" in
18318 case "$ttyname_r_proto" in
18319 ''|0) try='int ttyname_r(int, char*, size_t);'
18320 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=I_IBW ;;
18322 case "$ttyname_r_proto" in
18323 ''|0) try='int ttyname_r(int, char*, int);'
18324 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=I_IBI ;;
18326 case "$ttyname_r_proto" in
18327 ''|0) try='char* ttyname_r(int, char*, int);'
18328 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=B_IBI ;;
18330 case "$ttyname_r_proto" in
18331 ''|0) d_ttyname_r=undef
18333 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
18334 * ) case "$ttyname_r_proto" in
18335 REENTRANT_PROTO*) ;;
18336 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
18338 echo "Prototype: $try" ;;
18341 *) case "$usethreads" in
18342 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
18349 *) ttyname_r_proto=0
18353 : see if tzname[] exists
18355 if set tzname val -a d_tzname; eval $csym; $val; then
18357 echo 'tzname[] found.' >&4
18360 echo 'tzname[] NOT found.' >&4
18365 : Check if is a multiplatform env
18367 next|rhapsody|darwin) multiarch="$define" ;;
18369 case "$multiarch" in
18370 ''|[nN]*) multiarch="$undef" ;;
18373 : check for ordering of bytes in a UV
18375 case "$usecrosscompile$multiarch" in
18378 You seem to be either cross-compiling or doing a multiarchitecture build,
18379 skipping the byteorder check.
18385 case "$byteorder" in
18388 In the following, larger digits indicate more significance. A big-endian
18389 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
18390 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
18391 machines may have weird orders like 3412. A Cray will report 87654321,
18392 an Alpha will report 12345678. If the test program works the default is
18394 I'm now running the test program...
18398 #$i_stdlib I_STDLIB
18400 #include <stdlib.h>
18402 #include <sys/types.h>
18403 typedef $uvtype UV;
18413 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
18415 u.l = (UV)0x04030201;
18416 for (i = 0; i < $uvsize; i++)
18417 printf("%c", u.c[i]+'0');
18424 if eval $compile && $run ./try > /dev/null; then
18427 [1-4][1-4][1-4][1-4]|12345678|87654321)
18428 echo "(The test program ran ok.)"
18429 echo "byteorder=$dflt"
18432 ????|????????) echo "(The test program ran ok.)" ;;
18433 *) echo "(The test program didn't run right for some reason.)" ;;
18438 (I can't seem to compile the test program. Guessing big-endian...)
18441 case "$xxx_prompt" in
18443 rp="What is the order of bytes in $uvtype?"
18456 : Checking 32bit aligndness
18459 Checking to see whether you can access character data unalignedly...
18461 case "$d_u32align" in
18462 '') $cat >try.c <<EOCP
18464 #$i_stdlib I_STDLIB
18466 #include <stdlib.h>
18468 #define U32 $u32type
18469 #define BYTEORDER 0x$byteorder
18471 #include <signal.h>
18473 $signal_t bletch(int s) { exit(4); }
18476 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
18481 if (sizeof(U32) != 4) {
18482 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
18489 signal(SIGBUS, bletch);
18501 for (i = 0; i < 4; i++) {
18502 up = (U32*)(buf + i);
18503 if (! ((*up == 1 << (8*i)) || /* big-endian */
18504 (*up == 1 << (8*(3-i))) /* little-endian */
18508 printf("read failed (%x)\n", *up);
18514 for (i = 0; i < 4; i++) {
18515 up = (U32*)(buf + i);
18517 if (*up != 0xBeef) {
18518 printf("write failed (%x)\n", *up);
18532 if eval $compile_ok; then
18533 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
18534 $run ./try 2>&1 >/dev/null
18537 You can access character data pretty unalignedly.
18539 d_u32align="$undef"
18542 It seems that you must access character data in an aligned manner.
18544 d_u32align="$define"
18548 rp='Can you access character data at unaligned addresses?'
18552 [yY]*) d_u32align="$undef" ;;
18553 *) d_u32align="$define" ;;
18560 : see if ualarm exists
18561 set ualarm d_ualarm
18564 : see if umask exists
18568 : see if unordered exists
18569 set unordered d_unordered
18572 : see if unsetenv exists
18573 set unsetenv d_unsetenv
18576 : see if usleep exists
18577 set usleep d_usleep
18580 : see if prototype for usleep is available
18582 set d_usleepproto usleep $i_unistd unistd.h
18585 : see if ustat exists
18589 : see if closedir exists
18590 set closedir d_closedir
18593 case "$d_closedir" in
18596 echo "Checking whether closedir() returns a status..." >&4
18598 #$i_dirent I_DIRENT /**/
18599 #$i_sysdir I_SYS_DIR /**/
18600 #$i_sysndir I_SYS_NDIR /**/
18601 #$i_systypes I_SYS_TYPES /**/
18603 #if defined(I_SYS_TYPES)
18604 #include <sys/types.h>
18606 #if defined(I_DIRENT)
18607 #include <dirent.h>
18608 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
18609 #include <sys/dir.h>
18613 #include <sys/ndir.h>
18617 #include <ndir.h> /* may be wrong in the future */
18619 #include <sys/dir.h>
18624 int main() { return closedir(opendir(".")); }
18627 if eval $compile_ok; then
18628 if $run ./try > /dev/null 2>&1 ; then
18629 echo "Yes, it does."
18632 echo "No, it doesn't."
18636 echo "(I can't seem to compile the test program--assuming it doesn't)"
18644 set d_void_closedir
18648 : see if there is a wait4
18652 : see if waitpid exists
18653 set waitpid d_waitpid
18656 : see if wcstombs exists
18657 set wcstombs d_wcstombs
18660 : see if wctomb exists
18661 set wctomb d_wctomb
18664 : see if writev exists
18665 set writev d_writev
18668 : preserve RCS keywords in files with variable substitution, grrr
18673 Revision='$Revision'
18675 : check for alignment requirements
18677 case "$usecrosscompile$multiarch" in
18680 You seem to be either cross-compiling or doing a multiarchitecture build,
18681 skipping the memory alignment check.
18684 case "$alignbytes" in
18685 '') alignbytes=8 ;;
18689 case "$alignbytes" in
18690 '') echo "Checking alignment constraints..." >&4
18691 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
18692 $cat >try.c <<'EOCP'
18693 typedef long double NV;
18696 $cat >try.c <<'EOCP'
18700 $cat >>try.c <<'EOCP'
18708 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
18713 if eval $compile_ok; then
18717 echo "(I can't seem to compile the test program...)"
18720 *) dflt="$alignbytes"
18723 rp="Doubles must be aligned on a how-many-byte boundary?"
18731 : set the base revision
18734 : how do we concatenate cpp tokens here?
18736 echo "Checking to see how your cpp does stuff like concatenate tokens..." >&4
18737 $cat >cpp_stuff.c <<'EOCP'
18738 #define RCAT(a,b)a/**/b
18739 #define ACAT(a,b)a ## b
18743 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
18744 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
18745 echo "Oh! Smells like ANSI's been here." >&4
18746 echo "We can catify or stringify, separately or together!"
18748 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
18749 echo "Ah, yes! The good old days!" >&4
18750 echo "However, in the good old days we don't know how to stringify and"
18751 echo "catify at the same time."
18755 Hmm, I don't seem to be able to concatenate tokens with your cpp.
18756 You're going to have to edit the values of CAT[2-5] in config.h...
18758 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
18762 : see if this is a db.h system
18768 : Check db version.
18770 echo "Checking Berkeley DB version ..." >&4
18776 #include <sys/types.h>
18778 #$i_stdlib I_STDLIB
18780 #include <stdlib.h>
18783 int main(int argc, char *argv[])
18785 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
18786 int Major, Minor, Patch ;
18787 unsigned long Version ;
18788 (void)db_version(&Major, &Minor, &Patch) ;
18790 printf("%d %d %d %d %d %d\n",
18791 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
18792 Major, Minor, Patch);
18795 printf("You have Berkeley DB Version 2 or greater.\n");
18797 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
18798 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
18799 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
18800 Major, Minor, Patch) ;
18802 /* check that db.h & libdb are compatible */
18803 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
18804 printf("db.h and libdb are incompatible.\n") ;
18808 printf("db.h and libdb are compatible.\n") ;
18810 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
18811 + DB_VERSION_PATCH ;
18813 /* needs to be >= 2.3.4 */
18814 if (Version < 2003004) {
18815 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
18816 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
18822 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
18827 printf("You have Berkeley DB Version 1.\n");
18828 exit(0); /* DB version < 2: the coast is clear. */
18830 exit(1); /* <db.h> not Berkeley DB? */
18836 if eval $compile_ok && $run ./try; then
18837 echo 'Looks OK.' >&4
18839 db_version_major=$1
18840 db_version_minor=$2
18841 db_version_patch=$3
18843 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
18847 : Remove db from list of libraries to use
18848 echo "Removing unusable -ldb from library list" >&4
18849 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
18852 echo "libs = $libs" >&4
18862 : Check the return type needed for hash
18864 echo "Checking return type needed for hash for Berkeley DB ..." >&4
18870 #include <sys/types.h>
18873 #ifndef DB_VERSION_MAJOR
18874 u_int32_t hash_cb (ptr, size)
18882 info.hash = hash_cb;
18886 if $cc $ccflags -c try.c >try.out 2>&1 ; then
18887 if $contains warning try.out >>/dev/null 2>&1 ; then
18890 db_hashtype='u_int32_t'
18893 : XXX Maybe we should just give up here.
18894 db_hashtype=u_int32_t
18896 echo "Help: I can't seem to compile the db test program." >&4
18897 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
18900 echo "Your version of Berkeley DB uses $db_hashtype for hash."
18902 *) db_hashtype=u_int32_t
18907 : Check the return type needed for prefix
18909 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
18915 #include <sys/types.h>
18918 #ifndef DB_VERSION_MAJOR
18919 size_t prefix_cb (key1, key2)
18927 info.prefix = prefix_cb;
18931 if $cc $ccflags -c try.c >try.out 2>&1 ; then
18932 if $contains warning try.out >>/dev/null 2>&1 ; then
18933 db_prefixtype='int'
18935 db_prefixtype='size_t'
18938 db_prefixtype='size_t'
18939 : XXX Maybe we should just give up here.
18941 echo "Help: I can't seem to compile the db test program." >&4
18942 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
18945 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
18947 *) db_prefixtype='size_t'
18951 : How can we generate normalized random numbers ?
18953 echo "Looking for a random number function..." >&4
18954 case "$randfunc" in
18956 if set drand48 val -f; eval $csym; $val; then
18958 echo "Good, found drand48()." >&4
18959 elif set random val -f; eval $csym; $val; then
18961 echo "OK, found random()." >&4
18964 echo "Yick, looks like I have to use rand()." >&4
18975 *-Dmy_rand=*|*-Dmy_srand=*)
18976 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
18977 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
18978 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
18979 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
18983 while $test "$cont"; do
18984 rp="Use which function to generate random numbers?"
18986 if $test "$ans" = "$dflt"; then
18992 if set $ans val -f; eval $csym; $val; then
18996 rp="I cannot find function $ans. Use that name anyway?"
19005 case "$randfunc" in
19007 drand01="drand48()"
19013 case "$randbits" in
19015 echo "Checking to see how many bits your $randfunc() function produces..." >&4
19017 #$i_unistd I_UNISTD
19018 #$i_stdlib I_STDLIB
19021 # include <unistd.h>
19024 # include <stdlib.h>
19029 register unsigned long tmp;
19030 register unsigned long max = 0L;
19032 for (i = 1000; i; i--) {
19033 tmp = (unsigned long) $randfunc();
19034 if (tmp > max) max = tmp;
19036 for (i = 0; max; i++)
19042 if eval $compile_ok; then
19046 echo "(I can't seem to compile the test program...)"
19053 rp="How many bits does your $randfunc() function produce?"
19057 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
19058 seedfunc="s$randfunc"
19059 randseedtype=unsigned
19063 rp="How many bits does your $randfunc() function produce?"
19066 seedfunc="s$randfunc"
19067 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
19068 if set $seedfunc val -f; eval $csym; $val; then
19069 echo "(Using $seedfunc() to seed random generator)"
19071 echo "(Warning: no $seedfunc() to seed random generator)"
19074 randseedtype=unsigned
19081 : Determine if this is an EBCDIC system
19083 echo "Determining whether or not we are on an EBCDIC system..." >&4
19084 $cat >try.c <<'EOM'
19087 if ('M'==0xd4) return 0;
19094 if eval $compile_ok; then
19095 if $run ./try; then
19096 echo "You seem to speak EBCDIC." >&4
19099 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
19102 echo "I'm unable to compile the test program." >&4
19103 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
19109 : Check how to flush
19112 Checking how to flush all pending stdio output...
19114 # I only know how to find the first 32 possibly open files on SunOS.
19115 # See also hints/sunos_4_1.sh and util.c --AD
19117 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
19119 $cat >>try.c <<EOCP
19121 #$i_stdlib I_STDLIB
19123 #include <stdlib.h>
19125 #$i_unistd I_UNISTD
19127 # include <unistd.h>
19129 #$d_sysconf HAS_SYSCONF
19130 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
19131 #ifdef HAS_STDIO_STREAM_ARRAY
19132 # define STDIO_STREAM_ARRAY $stdio_stream_array
19137 p = fopen("try.out", "w");
19141 # ifdef TRY_FPRINTF
19145 #ifdef TRY_FFLUSH_NULL
19148 #ifdef TRY_FFLUSH_ALL
19150 long open_max = -1;
19151 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
19152 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
19154 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
19155 open_max = sysconf(_SC_OPEN_MAX);
19158 open_max = FOPEN_MAX;
19161 open_max = OPEN_MAX;
19170 # ifdef HAS_STDIO_STREAM_ARRAY
19171 if (open_max > 0) {
19173 for (i = 0; i < open_max; i++)
19174 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
19175 STDIO_STREAM_ARRAY[i]._file < open_max &&
19176 STDIO_STREAM_ARRAY[i]._flag)
19177 fflush(&STDIO_STREAM_ARRAY[i]);
19185 : first we have to find out how _not_ to flush
19187 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
19189 set try -DTRY_FPUTC
19190 if eval $compile; then
19191 $run ./try 2>/dev/null
19194 if $test ! -s try.out -a "X$code" = X42; then
19200 set try -DTRY_FPRINTF
19201 if eval $compile; then
19202 $run ./try 2>/dev/null
19205 if $test ! -s try.out -a "X$code" = X42; then
19206 output=-DTRY_FPRINTF
19212 : check for fflush NULL behaviour
19213 case "$fflushNULL" in
19214 '') set try -DTRY_FFLUSH_NULL $output
19215 if eval $compile; then
19216 $run ./try 2>/dev/null
19219 if $test -s try.out -a "X$code" = X42; then
19220 fflushNULL="`$cat try.out`"
19222 if $test "X$code" != X42; then
19224 (If this test failed, don't worry, we'll try another method shortly.)
19229 $rm -f core try.core core.try.*
19230 case "$fflushNULL" in
19232 Your fflush(NULL) works okay for output streams.
19233 Let's see if it clobbers input pipes...
19235 # As of mid-March 2000 all versions of Solaris appear to have a stdio
19236 # bug that improperly flushes the input end of pipes. So we avoid the
19237 # autoflush on fork/system/exec support for now. :-(
19238 $cat >tryp.c <<EOCP
19241 main(int argc, char **argv)
19247 while ((i = getc(stdin)) != -1
19248 && (*bp++ = i) != '\n'
19249 && bp < &buf[1024])
19252 fprintf(stdout, "%s", buf);
19260 fflushNULL="$define"
19262 if eval $compile; then
19264 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
19265 if cmp tryp.c tryp.out >/dev/null 2>&1; then
19267 fflush(NULL) seems to behave okay with input streams.
19269 fflushNULL="$define"
19272 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
19274 fflushNULL="$undef"
19277 $rm -f core tryp.c tryp.core core.tryp.*
19280 Your fflush(NULL) isn't working (contrary to ANSI C).
19282 fflushNULL="$undef"
19285 Cannot figure out whether your fflush(NULL) works or not.
19286 I'm assuming it doesn't (contrary to ANSI C).
19288 fflushNULL="$undef"
19292 $define|true|[yY]*)
19293 fflushNULL="$define"
19296 fflushNULL="$undef"
19299 : check explicit looping only if NULL did not work, and if the pipe
19300 : bug does not show up on an explicit flush too
19301 case "$fflushNULL" in
19303 $cat >tryp.c <<EOCP
19306 main(int argc, char **argv)
19312 while ((i = getc(stdin)) != -1
19313 && (*bp++ = i) != '\n'
19314 && bp < &buf[1024])
19317 fprintf(stdout, "%s", buf);
19326 if eval $compile; then
19328 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
19329 if cmp tryp.c tryp.out >/dev/null 2>&1; then
19331 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
19333 : now check for fflushall behaviour
19334 case "$fflushall" in
19335 '') set try -DTRY_FFLUSH_ALL $output
19336 if eval $compile; then
19338 (Now testing the other method--but note that this also may fail.)
19340 $run ./try 2>/dev/null
19343 if $test -s try.out -a "X$code" = X42; then
19344 fflushall="`$cat try.out`"
19348 case "$fflushall" in
19350 Whew. Flushing explicitly all the stdio streams works.
19352 fflushall="$define"
19355 Sigh. Flushing explicitly all the stdio streams doesn't work.
19360 Cannot figure out whether flushing stdio streams explicitly works or not.
19361 I'm assuming it doesn't.
19367 "$define"|true|[yY]*)
19368 fflushall="$define"
19376 All is futile. Even fflush(stdin) clobbers input pipes!
19383 $rm -f core tryp.c tryp.core core.tryp.*
19385 *) fflushall="$undef"
19389 case "$fflushNULL$fflushall" in
19392 OK, I give up. I cannot figure out how to flush pending stdio output.
19393 We won't be flushing handles at all before fork/exec/popen.
19399 : Store the full pathname to the ar program for use in the C program
19400 : Respect a hint or command line value for full_ar.
19405 : Store the full pathname to the sed program for use in the C program
19408 : see what type gids are declared as in the kernel
19410 echo "Looking for the type for group ids returned by getgid()."
19411 set gid_t gidtype xxx stdio.h sys/types.h
19415 xxx=`./findhdr sys/user.h`
19416 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
19418 unsigned) dflt="$1 $2" ;;
19422 *) dflt="$gidtype";;
19425 gid_t) echo "gid_t found." ;;
19426 *) rp="What is the type for group ids returned by getgid()?"
19432 : Check the size of GID
19435 *_t) zzz="$gidtype" ;;
19438 echo "Checking the size of $zzz..." >&4
19440 #include <sys/types.h>
19442 #$i_stdlib I_STDLIB
19444 #include <stdlib.h>
19447 printf("%d\n", (int)sizeof($gidtype));
19452 if eval $compile_ok; then
19456 echo "(I can't execute the test program--guessing $gidsize.)" >&4
19459 echo "Your $zzz is $gidsize bytes long."
19464 echo "(I can't compile the test program--guessing $gidsize.)" >&4
19468 : Check if GID is signed
19471 *_t) zzz="$gidtype" ;;
19474 echo "Checking the sign of $zzz..." >&4
19476 #include <sys/types.h>
19487 if eval $compile; then
19491 echo "(I can't execute the test program--guessing unsigned.)" >&4
19495 1) echo "Your $zzz is unsigned." ;;
19496 -1) echo "Your $zzz is signed." ;;
19502 echo "(I can't compile the test program--guessing unsigned.)" >&4
19506 : Check 64bit sizes
19509 if $test X"$quadtype" != X; then
19511 echo "Checking how to print 64-bit integers..." >&4
19513 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
19514 $cat >try.c <<'EOCP'
19515 #include <sys/types.h>
19518 int q = 12345678901;
19519 printf("%ld\n", q);
19523 if eval $compile; then
19527 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
19528 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
19529 echo "We will use %d."
19535 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
19536 $cat >try.c <<'EOCP'
19537 #include <sys/types.h>
19540 long q = 12345678901;
19541 printf("%ld\n", q);
19545 if eval $compile; then
19549 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
19550 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
19551 echo "We will use %ld."
19557 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
19558 $cat >try.c <<'EOCP'
19559 #include <sys/types.h>
19560 #include <inttypes.h>
19563 int64_t q = 12345678901;
19564 printf("%" PRId64 "\n", q);
19568 if eval $compile; then
19572 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
19573 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
19574 echo "We will use the C9X style."
19580 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
19582 #include <sys/types.h>
19585 $quadtype q = 12345678901;
19586 printf("%Ld\n", q);
19590 if eval $compile; then
19594 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
19595 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
19596 echo "We will use %Ld."
19602 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
19603 $cat >try.c <<'EOCP'
19604 #include <sys/types.h>
19607 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
19608 printf("%lld\n", q);
19612 if eval $compile; then
19616 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
19617 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
19618 echo "We will use the %lld style."
19624 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
19626 #include <sys/types.h>
19629 $quadtype q = 12345678901;
19630 printf("%qd\n", q);
19634 if eval $compile; then
19638 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
19639 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
19640 echo "We will use %qd."
19646 if $test X"$sPRId64" = X; then
19647 echo "Cannot figure out how to print 64-bit integers." >&4
19654 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
19655 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
19657 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
19658 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
19662 : Check format strings for internal types
19664 $echo "Checking the format strings to be used for Perl's internal types..." >&4
19666 if $test X"$ivsize" = X8; then
19667 ivdformat="$sPRId64"
19668 uvuformat="$sPRIu64"
19669 uvoformat="$sPRIo64"
19670 uvxformat="$sPRIx64"
19671 uvXUformat="$sPRIXU64"
19673 if $test X"$ivsize" = X"$longsize"; then
19680 if $test X"$ivsize" = X"$intsize"; then
19688 if $test X"$ivsize" = X"$shortsize"; then
19699 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
19700 nveformat="$sPRIeldbl"
19701 nvfformat="$sPRIfldbl"
19702 nvgformat="$sPRIgldbl"
19703 nvEUformat="$sPRIEUldbl"
19704 nvFUformat="$sPRIFUldbl"
19705 nvGUformat="$sPRIGUldbl"
19715 case "$ivdformat" in
19716 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
19721 : Check format string for GID
19724 $echo "Checking the format string to be used for gids..." >&4
19727 -1) if $test X"$gidsize" = X"$ivsize"; then
19728 gidformat="$ivdformat"
19730 if $test X"$gidsize" = X"$longsize"; then
19733 if $test X"$gidsize" = X"$intsize"; then
19736 if $test X"$gidsize" = X"$shortsize"; then
19743 *) if $test X"$gidsize" = X"$uvsize"; then
19744 gidformat="$uvuformat"
19746 if $test X"$gidsize" = X"$longsize"; then
19749 if $test X"$gidsize" = X"$intsize"; then
19752 if $test X"$gidsize" = X"$shortsize"; then
19761 : see if getgroups exists
19762 set getgroups d_getgrps
19765 : see if setgroups exists
19766 set setgroups d_setgrps
19769 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
19771 case "$d_getgrps$d_setgrps" in
19773 case "$groupstype" in
19774 '') dflt="$gidtype" ;;
19775 *) dflt="$groupstype" ;;
19778 What type of pointer is the second argument to getgroups() and setgroups()?
19779 Usually this is the same as group ids, $gidtype, but not always.
19782 rp='What type pointer is the second argument to getgroups() and setgroups()?'
19786 *) groupstype="$gidtype";;
19789 : MAD = Misc Attribute Definition
19791 if $test $patchlevel -lt 9; then
19792 : MAD is not available in 5.8.x or earlier.
19796 $define|true|[yY]*) dflt='y' ;;
19801 Would you like to build with Misc Attribute Decoration? This is development
19802 work leading to a Perl 5 to Perl 6 convertor, which imposes a space and speed
19803 overhead on the interpreter.
19805 If this doesn't make any sense to you, just accept the default '$dflt'.
19807 rp='Build Perl with MAD?'
19812 madlyh='madly.h madly.act madly.tab'
19814 madlyobj="madly$_o" ;;
19823 : check whether make sets MAKE
19825 echo "Checking if your $make program sets \$(MAKE)..." >&4
19826 case "$make_set_make" in
19828 $sed 's/^X //' > testmake.mak << 'EOF'
19830 X @echo 'maketemp="$(MAKE)"'
19832 case "`$make -f testmake.mak 2>/dev/null`" in
19833 *maketemp=*) make_set_make='#' ;;
19834 *) make_set_make="MAKE=$make" ;;
19836 $rm -f testmake.mak
19839 case "$make_set_make" in
19840 '#') echo "Yup, it does.";;
19841 *) echo "Nope, it doesn't.";;
19844 : see what type is used for mode_t
19845 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
19846 set mode_t modetype int stdio.h sys/types.h
19849 : see if we need va_copy
19851 case "$i_stdarg" in
19854 #include <stdarg.h>
19856 #$i_stdlib I_STDLIB
19858 #include <stdlib.h>
19860 #include <signal.h>
19863 ivfprintf(FILE *f, const char *fmt, va_list *valp)
19865 return vfprintf(f, fmt, *valp);
19869 myvfprintf(FILE *f, const char *fmt, va_list val)
19871 return ivfprintf(f, fmt, &val);
19875 myprintf(char *fmt, ...)
19878 va_start(val, fmt);
19879 return myvfprintf(stdout, fmt, val);
19883 main(int ac, char **av)
19885 signal(SIGSEGV, exit);
19887 myprintf("%s%cs all right, then\n", "that", '\'');
19892 if eval $compile && $run ./try 2>&1 >/dev/null; then
19893 case "`$run ./try`" in
19894 "that's all right, then")
19900 yes) echo "It seems that you don't need va_copy()." >&4
19901 need_va_copy="$undef"
19903 *) echo "It seems that va_copy() or similar will be needed." >&4
19904 need_va_copy="$define"
19909 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
19913 : see what type is used for size_t
19914 rp="What is the type used for the length parameter for string functions?"
19915 set size_t sizetype 'unsigned int' stdio.h sys/types.h
19918 : check for type of arguments to gethostbyaddr.
19919 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
19920 case "$d_gethbyaddr" in
19924 Checking to see what type of arguments are accepted by gethostbyaddr().
19926 hdrs="$define sys/types.h
19927 $d_socket sys/socket.h
19928 $i_niin netinet/in.h
19930 $i_unistd unistd.h"
19931 : The first arg can 'char *' or 'void *'
19932 : The second arg is some of integral type
19933 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
19934 for yyy in size_t long int; do
19935 case "$netdb_host_type" in
19936 '') try="$extern_C struct hostent *gethostbyaddr($xxx, $yyy, int);"
19937 if ./protochk "$try" $hdrs; then
19938 echo "Your system accepts $xxx for the first arg."
19939 echo "...and $yyy for the second arg."
19940 netdb_host_type="$xxx"
19941 netdb_hlen_type="$yyy"
19947 : In case none of those worked, prompt the user.
19948 case "$netdb_host_type" in
19949 '') rp='What is the type for the 1st argument to gethostbyaddr?'
19952 netdb_host_type=$ans
19953 rp='What is the type for the 2nd argument to gethostbyaddr?'
19956 netdb_hlen_type=$ans
19960 *) : no gethostbyaddr, so pick harmless defaults
19961 netdb_host_type='char *'
19962 netdb_hlen_type="$sizetype"
19965 # Remove the "const" if needed. -- but then we'll have a
19967 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
19970 : check for type of argument to gethostbyname.
19971 if test "X$netdb_name_type" = X ; then
19972 case "$d_gethbyname" in
19976 Checking to see what type of argument is accepted by gethostbyname().
19978 hdrs="$define sys/types.h
19979 $d_socket sys/socket.h
19980 $i_niin netinet/in.h
19982 $i_unistd unistd.h"
19983 for xxx in "const char *" "char *"; do
19984 case "$netdb_name_type" in
19985 '') try="$extern_C struct hostent *gethostbyname($xxx);"
19986 if ./protochk "$try" $hdrs; then
19987 echo "Your system accepts $xxx."
19988 netdb_name_type="$xxx"
19993 : In case none of those worked, prompt the user.
19994 case "$netdb_name_type" in
19995 '') rp='What is the type for the 1st argument to gethostbyname?'
19998 netdb_name_type=$ans
20002 *) : no gethostbyname, so pick harmless default
20003 netdb_name_type='char *'
20008 : check for type of 1st argument to getnetbyaddr.
20009 if test "X$netdb_net_type" = X ; then
20010 case "$d_getnbyaddr" in
20014 Checking to see what type of 1st argument is accepted by getnetbyaddr().
20016 hdrs="$define sys/types.h
20017 $d_socket sys/socket.h
20018 $i_niin netinet/in.h
20020 $i_unistd unistd.h"
20021 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
20022 case "$netdb_net_type" in
20023 '') try="$extern_C struct netent *getnetbyaddr($xxx, int);"
20024 if ./protochk "$try" $hdrs; then
20025 echo "Your system accepts $xxx."
20026 netdb_net_type="$xxx"
20031 : In case none of those worked, prompt the user.
20032 case "$netdb_net_type" in
20033 '') rp='What is the type for the 1st argument to getnetbyaddr?'
20036 netdb_net_type=$ans
20040 *) : no getnetbyaddr, so pick harmless default
20041 netdb_net_type='long'
20045 : locate the preferred pager for this system
20052 [a-zA-Z]:/*) dflt=$pg;;
20056 [a-zA-Z]:/*) dflt=$more;;
20060 [a-zA-Z]:/*) dflt=$less;;
20063 '') dflt=/usr/ucb/more;;
20071 rp='What pager is used on your system?'
20075 : see what type pids are declared as in the kernel
20076 rp="What is the type of process ids on this system?"
20077 set pid_t pidtype int stdio.h sys/types.h
20080 : see if ar generates random libraries by itself
20082 echo "Checking how to generate random libraries on your machine..." >&4
20083 echo 'int bar1() { return bar2(); }' > bar1.c
20084 echo 'int bar2() { return 2; }' > bar2.c
20086 #$i_stdlib I_STDLIB
20088 #include <stdlib.h>
20090 int main() { printf("%d\n", bar1()); exit(0); }
20092 $cc $ccflags -c bar1.c >/dev/null 2>&1
20093 $cc $ccflags -c bar2.c >/dev/null 2>&1
20094 $cc $ccflags -c foo.c >/dev/null 2>&1
20095 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
20096 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
20097 $run ./foobar >/dev/null 2>&1; then
20098 echo "$ar appears to generate random libraries itself."
20100 if [ "X$ranlib" = "X" ]; then
20103 elif $ar s bar$_a >/dev/null 2>&1 &&
20104 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
20105 $run ./foobar >/dev/null 2>&1; then
20106 echo "a table of contents needs to be added with '$ar s'."
20109 elif $ar ts bar$_a >/dev/null 2>&1 &&
20110 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
20111 $run ./foobar >/dev/null 2>&1; then
20112 echo "a table of contents needs to be added with '$ar ts'."
20119 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
20120 $test -f $ranlib || ranlib=''
20123 if $test -n "$ranlib"; then
20124 echo "your system has '$ranlib'; we'll use that."
20127 echo "your system doesn't seem to support random libraries"
20128 echo "so we'll use lorder and tsort to order the libraries."
20135 : see if this is a values.h system
20136 set values.h i_values
20139 : Check the max offset that gmtime and localtime accept
20140 echo "Checking max offsets that gmtime () accepts"
20143 define) yyy="#include <values.h>" ;;
20147 case "$sGMTIME_min/$sGMTIME_max" in
20150 #include <sys/types.h>
20159 void gm_check (time_t t, int min_year, int max_year)
20162 if ( tmp == NULL ||
20163 /* Check tm_year overflow */
20164 tmp->tm_year < min_year || tmp->tm_year > max_year)
20175 gm_check (MAXLONG, 69, 0x7fffffff);
20177 if (tmp == NULL || tmp->tm_year < 0) {
20178 for (i = 63; i >= 0; i--) {
20179 time_t x = pt | ((time_t)1 << i);
20180 if (x < 0 || x < pt) continue;
20181 gm_check (x, 69, 0x7fffffff);
20184 printf ("sGMTIME_max=%ld\n", pt);
20193 gm_check (MINLONG, -1900, 70);
20196 for (i = 36; i >= 0; i--) {
20197 time_t x = pt - ((time_t)1 << i);
20198 if (x > 0) continue;
20199 gm_check (x, -1900, 70);
20202 printf ("sGMTIME_min=%ld\n", pt);
20206 int main (int argc, char *argv[])
20208 fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t));
20215 if eval $compile; then
20218 echo "Cannot determine sGMTIME_max and sGMTIME_min." >&4
20224 echo "Checking max offsets that localtime () accepts"
20226 case "$sLOCALTIME_min/$sLOCALTIME_max" in
20229 #include <sys/types.h>
20238 void local_check (time_t t, int min_year, int max_year)
20240 if (sizeof (time_t) > 4 && t > 0x7ffffffffffff000LL)
20243 tmp = localtime (&t);
20244 if ( tmp == NULL ||
20245 /* Check tm_year overflow */
20246 tmp->tm_year < min_year || tmp->tm_year > max_year)
20250 } /* local_check */
20257 local_check (MAXLONG, 69, 0x7fffffff);
20259 if (tmp == NULL || tmp->tm_year < 0) {
20260 for (i = 63; i >= 0; i--) {
20261 time_t x = pt | ((time_t)1 << i);
20262 if (x < 0 || x < pt) continue;
20263 local_check (x, 69, 0x7fffffff);
20266 printf ("sLOCALTIME_max=%ld\n", pt);
20275 local_check (MINLONG, -1900, 70);
20278 for (i = 36; i >= 0; i--) {
20279 time_t x = pt - ((time_t)1 << i);
20280 if (x > 0) continue;
20281 local_check (x, -1900, 70);
20284 printf ("sLOCALTIME_min=%ld\n", pt);
20288 int main (int argc, char *argv[])
20296 if eval $compile; then
20299 echo "Cannot determine sLOCALTIME_max and sLOCALTIME_min." >&4
20305 : check for type of arguments to select.
20306 case "$selecttype" in
20307 '') case "$d_select" in
20311 Checking to see what type of arguments are accepted by select().
20313 hdrs="$define sys/types.h
20314 $i_systime sys/time.h
20315 $i_sysselct sys/select.h
20316 $d_socket sys/socket.h"
20317 : The first arg can be int, unsigned, or size_t
20318 : The last arg may or may not be 'const'
20320 : void pointer has been seen but using that
20321 : breaks the selectminbits test
20322 for xxx in 'fd_set *' 'int *'; do
20323 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
20324 for tmo in 'struct timeval *' 'const struct timeval *'; do
20326 '') try="$extern_C select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
20327 if ./protochk "$try" $hdrs; then
20328 echo "Your system accepts $xxx."
20337 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
20338 case "$d_fd_set" in
20339 $define) dflt="fd_set *" ;;
20348 *) : no select, so pick a harmless default
20355 : check for the select 'width'
20356 case "$selectminbits" in
20357 '') safebits=`expr $ptrsize \* 8`
20358 case "$d_select" in
20362 Checking to see on how many bits at a time your select() operates...
20365 #include <sys/types.h>
20367 #$i_systime I_SYS_TIME
20368 #$i_systimek I_SYS_TIME_KERNEL
20373 # ifdef I_SYS_TIME_KERNEL
20376 # include <sys/time.h>
20377 # ifdef I_SYS_TIME_KERNEL
20381 #$i_sysselct I_SYS_SELECT
20382 #ifdef I_SYS_SELECT
20383 #include <sys/select.h>
20385 #$d_socket HAS_SOCKET
20387 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
20390 #$i_stdlib I_STDLIB
20392 #include <stdlib.h>
20395 #define S sizeof(*(b))
20397 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
20398 #define NBITS (NBYTES * 8)
20400 char *s = (char *)malloc(NBYTES);
20409 fp = fopen("try.c", "r");
20415 b = ($selecttype)s;
20416 for (i = 0; i < NBITS; i++)
20420 select(fd + 1, b, 0, 0, &t);
20421 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
20423 printf("%d\n", i + 1);
20428 if eval $compile_ok; then
20429 selectminbits=`$run ./try`
20430 case "$selectminbits" in
20432 Cannot figure out on how many bits at a time your select() operates.
20433 I'll play safe and guess it is $safebits bits.
20435 selectminbits=$safebits
20436 bits="$safebits bits"
20439 *) bits="$selectminbits bits" ;;
20441 echo "Your select() operates on $bits at a time." >&4
20443 rp='What is the minimum number of bits your select() operates on?'
20444 case "$byteorder" in
20445 12345678) dflt=64 ;;
20451 selectminbits="$val"
20455 *) : no select, so pick a harmless default
20456 selectminbits=$safebits
20462 : Trace out the files included by signal.h, then look for SIGxxx names.
20463 if [ "X$fieldn" = X ]; then
20464 : Just make some guesses. We check them later.
20465 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
20467 xxx=`echo '#include <signal.h>' |
20468 $cppstdin $cppminus $cppflags 2>/dev/null |
20469 $grep '^[ ]*#.*include' |
20470 $awk "{print \\$$fieldn}" | $sed 's!"!!g' |\
20471 $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
20474 for xx in $xxx /dev/null ; do
20475 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
20477 case "$xxxfiles" in
20478 '') xxxfiles=`./findhdr signal.h` ;;
20481 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
20482 print substr($2, 4, 20)
20484 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
20485 print substr($3, 4, 20)
20487 : Append some common names just in case the awk scan failed.
20488 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
20489 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
20490 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
20491 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
20492 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
20494 : generate a few handy files for later
20495 $cat > signal.c <<EOCP
20496 #include <sys/types.h>
20497 #include <signal.h>
20498 #$i_stdlib I_STDLIB
20500 #include <stdlib.h>
20505 /* Strange style to avoid deeply-nested #if/#else/#endif */
20508 # define NSIG (_NSIG)
20514 # define NSIG (SIGMAX+1)
20520 # define NSIG (SIG_MAX+1)
20526 # define NSIG (_SIG_MAX+1)
20532 # define NSIG (MAXSIG+1)
20538 # define NSIG (MAX_SIG+1)
20543 # ifdef SIGARRAYSIZE
20544 # define NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */
20550 # define NSIG (_sys_nsig) /* Solaris 2.5 */
20554 /* Default to some arbitrary number that's big enough to get most
20555 of the common signals.
20561 printf("NSIG %d\n", NSIG);
20567 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
20569 printf "#ifdef SIG"; printf $1; printf "\n"
20570 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
20571 printf $1; printf ");\n"
20575 printf "#endif /* JUST_NSIG */\n";
20576 printf "exit(0);\n}\n";
20579 $cat >signal.awk <<'EOP'
20580 BEGIN { ndups = 0 }
20581 $1 ~ /^NSIG$/ { nsig = $2 }
20582 ($1 !~ /^NSIG$/) && (NF == 2) && ($2 ~ /^[0-9][0-9]*$/) {
20583 if ($2 > maxsig) { maxsig = $2 }
20584 if (sig_name[$2]) {
20585 dup_name[ndups] = $1
20586 dup_num[ndups] = $2
20598 printf("NSIG %d\n", nsig);
20599 for (n = 1; n < nsig; n++) {
20601 printf("%s %d\n", sig_name[n], sig_num[n])
20604 printf("NUM%d %d\n", n, n)
20607 for (n = 0; n < ndups; n++) {
20608 printf("%s %d\n", dup_name[n], dup_num[n])
20612 $cat >signal_cmd <<EOS
20614 if $test -s signal.lst; then
20615 echo "Using your existing signal.lst file"
20620 $cat >>signal_cmd <<'EOS'
20623 if eval $compile_ok; then
20624 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) |\
20625 $uniq | $awk -f signal.awk >signal.lst
20627 echo "(I can't seem be able to compile the whole test program)" >&4
20628 echo "(I'll try it in little pieces.)" >&4
20629 set signal -DJUST_NSIG
20630 if eval $compile_ok; then
20631 $run ./signal$_exe > signal.nsg
20634 echo "I can't seem to figure out how many signals you have." >&4
20635 echo "Guessing 50." >&4
20636 echo 'NSIG 50' > signal.nsg
20638 : Now look at all the signal names, one at a time.
20639 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
20640 $cat > signal.c <<EOCP
20641 #include <sys/types.h>
20642 #include <signal.h>
20645 printf("$xx %d\n", SIG${xx});
20650 if eval $compile; then
20651 echo "SIG${xx} found."
20652 $run ./signal$_exe >> signal.ls1
20654 echo "SIG${xx} NOT found."
20657 if $test -s signal.ls1; then
20658 $cat signal.nsg signal.ls1 |
20659 $sort -n | $uniq | $awk -f signal.awk >signal.lst
20663 if $test -s signal.lst; then
20666 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
20667 echo 'kill -l' >signal
20668 set X `csh -f <signal`
20672 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
20674 echo $@ | $tr ' ' $trnl | \
20675 $awk '{ printf "%s %d\n", $1, ++s; }
20676 END { printf "NSIG %d\n", ++s }' >signal.lst
20678 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
20680 chmod a+x signal_cmd
20681 $eunicefix signal_cmd
20683 : generate list of signal names
20685 case "$sig_name_init" in
20687 *) case "$sig_num_init" in
20688 ''|*,*) doinit=yes ;;
20693 echo "Generating a list of signal names and numbers..." >&4
20695 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
20696 sig_name=`$awk 'BEGIN { printf "ZERO " }
20697 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
20698 sig_num=`$awk 'BEGIN { printf "0 " }
20699 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
20700 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
20701 !/^NSIG/ { printf "\"%s\", ", $1 }
20702 END { printf "0\n" }' signal.lst`
20703 sig_num_init=`$awk 'BEGIN { printf "0, " }
20704 !/^NSIG/ { printf "%d, ", $2}
20705 END { printf "0\n"}' signal.lst`
20708 echo "The following $sig_count signals are available:"
20710 echo $sig_name | $awk \
20711 'BEGIN { linelen = 0 }
20713 for (i = 1; i <= NF; i++) {
20714 name = "SIG" $i " "
20715 linelen = linelen + length(name)
20716 if (linelen > 70) {
20718 linelen = length(name)
20724 sig_size=`echo $sig_name | awk '{print NF}'`
20725 $rm -f signal signal.c signal.awk signal.lst signal_cmd
20727 : Check size of size
20729 case "$sizetype" in
20730 *_t) zzz="$sizetype" ;;
20731 *) zzz="filesize" ;;
20733 echo "Checking the size of $zzz..." >&4
20735 #include <sys/types.h>
20737 #$i_stdlib I_STDLIB
20739 #include <stdlib.h>
20742 printf("%d\n", (int)sizeof($sizetype));
20747 if eval $compile_ok; then
20751 echo "(I can't execute the test program--guessing $sizesize.)" >&4
20754 echo "Your $zzz size is $sizesize bytes."
20759 echo "(I can't compile the test program--guessing $sizesize.)" >&4
20763 : check for socklen_t
20765 echo "Checking to see if you have socklen_t..." >&4
20767 #include <sys/types.h>
20768 #$d_socket HAS_SOCKET
20770 #include <sys/socket.h>
20772 int main() { socklen_t x = 16; }
20775 if eval $compile; then
20777 echo "You have socklen_t."
20780 echo "You do not have socklen_t."
20781 case "$sizetype" in
20782 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
20789 : see if this is a socks.h system
20790 set socks.h i_socks
20793 : check for type of the size argument to socket calls
20794 case "$d_socket" in
20798 Checking to see what type is the last argument of accept().
20801 case "$d_socklen_t" in
20802 "$define") yyy="$yyy socklen_t"
20804 yyy="$yyy $sizetype int long unsigned"
20805 for xxx in $yyy; do
20806 case "$socksizetype" in
20807 '') try="$extern_C int accept(int, struct sockaddr *, $xxx *);"
20808 case "$usesocks" in
20810 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
20811 echo "Your system accepts '$xxx *' for the last argument of accept()."
20812 socksizetype="$xxx"
20815 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
20816 echo "Your system accepts '$xxx *' for the last argument of accept()."
20817 socksizetype="$xxx"
20824 : In case none of those worked, prompt the user.
20825 case "$socksizetype" in
20826 '') rp='What is the type for socket address structure sizes?'
20833 *) : no sockets, so pick relatively harmless default
20838 : see what type is used for signed size_t
20839 set ssize_t ssizetype int stdio.h sys/types.h
20844 #$i_stdlib I_STDLIB
20846 #include <stdlib.h>
20848 #include <sys/types.h>
20849 #define Size_t $sizetype
20850 #define SSize_t $dflt
20853 if (sizeof(Size_t) == sizeof(SSize_t))
20855 else if (sizeof(Size_t) == sizeof(int))
20864 if eval $compile_ok && $run ./try > /dev/null; then
20865 ssizetype=`$run ./try`
20866 echo "I'll be using $ssizetype for functions returning a byte count." >&4
20869 Help! I can't compile and run the ssize_t test program: please enlighten me!
20870 (This is probably a misconfiguration in your system or libraries, and
20871 you really ought to fix it. Still, I'll try anyway.)
20873 I need a type that is the same size as $sizetype, but is guaranteed to
20874 be signed. Common values are ssize_t, int and long.
20877 rp="What signed type is the same size as $sizetype?"
20883 : see what type of char stdio uses.
20885 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
20886 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
20887 echo "Your stdio uses unsigned chars." >&4
20888 stdchar="unsigned char"
20890 echo "Your stdio uses signed chars." >&4
20895 : see what type uids are declared as in the kernel
20897 echo "Looking for the type for user ids returned by getuid()."
20898 set uid_t uidtype xxx stdio.h sys/types.h
20902 xxx=`./findhdr sys/user.h`
20903 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
20905 unsigned) dflt="$1 $2" ;;
20909 *) dflt="$uidtype";;
20912 uid_t) echo "uid_t found." ;;
20913 *) rp="What is the type for user ids returned by getuid()?"
20919 : Check size of UID
20922 *_t) zzz="$uidtype" ;;
20925 echo "Checking the size of $zzz..." >&4
20927 #include <sys/types.h>
20929 #$i_stdlib I_STDLIB
20931 #include <stdlib.h>
20934 printf("%d\n", (int)sizeof($uidtype));
20939 if eval $compile_ok; then
20943 echo "(I can't execute the test program--guessing $uidsize.)" >&4
20946 echo "Your $zzz is $uidsize bytes long."
20951 echo "(I can't compile the test program--guessing $uidsize.)" >&4
20954 : Check if UID is signed
20957 *_t) zzz="$uidtype" ;;
20960 echo "Checking the sign of $zzz..." >&4
20962 #include <sys/types.h>
20973 if eval $compile; then
20977 echo "(I can't execute the test program--guessing unsigned.)" >&4
20981 1) echo "Your $zzz is unsigned." ;;
20982 -1) echo "Your $zzz is signed." ;;
20988 echo "(I can't compile the test program--guessing unsigned.)" >&4
20992 : Check format string for UID
20994 $echo "Checking the format string to be used for uids..." >&4
20997 -1) if $test X"$uidsize" = X"$ivsize"; then
20998 uidformat="$ivdformat"
21000 if $test X"$uidsize" = X"$longsize"; then
21003 if $test X"$uidsize" = X"$intsize"; then
21006 if $test X"$uidsize" = X"$shortsize"; then
21013 *) if $test X"$uidsize" = X"$uvsize"; then
21014 uidformat="$uvuformat"
21016 if $test X"$uidsize" = X"$longsize"; then
21019 if $test X"$uidsize" = X"$intsize"; then
21022 if $test X"$uidsize" = X"$shortsize"; then
21031 : Check if site customization support was requested
21032 case "$usesitecustomize" in
21033 $define|true|[Yy]*)
21034 usesitecustomize="$define"
21037 usesitecustomize="$undef"
21041 : determine compiler compiler
21050 if $test -f "$byacc$_exe"; then
21052 comp="byacc or $comp"
21054 if $test -f "$bison$_exe"; then
21055 comp="$comp or bison -y"
21057 rp="Which compiler compiler ($comp) shall I use?"
21066 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
21072 : see if this is a assert.h system
21073 set assert.h i_assert
21076 : see if this is a fp.h system
21080 : see if this is a fp_class.h system
21081 set fp_class.h i_fp_class
21084 : see if gdbm.h is available
21089 : see if gdbm_open exists
21090 set gdbm_open d_gdbm_open
21092 case "$d_gdbm_open" in
21095 echo "We won't be including <gdbm.h>"
21104 : see if this is a ieeefp.h system
21105 case "$i_ieeefp" in
21106 '' ) set ieeefp.h i_ieeefp
21111 : see if this is a libutil.h system
21112 set libutil.h i_libutil
21115 : see if mach cthreads are available
21116 if test "X$usethreads" = "X$define"; then
21117 set mach/cthreads.h i_machcthr
21120 i_machcthr="$undef"
21123 : see if this is a mntent.h system
21124 set mntent.h i_mntent
21127 : see if net/errno.h is available
21129 set net/errno.h val
21132 : Unfortunately, it causes problems on some systems. Arrgh.
21135 cat > try.c <<'EOM'
21138 #include <net/errno.h>
21144 if $cc $ccflags -c try.c >/dev/null 2>&1; then
21145 echo "We'll be including <net/errno.h>." >&4
21147 echo "We won't be including <net/errno.h>." >&4
21156 : see if netinet/tcp.h is available
21157 set netinet/tcp.h i_netinettcp
21160 : see if this is a poll.h system
21164 : see if this is a prot.h system
21168 : Preprocessor symbols
21170 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
21171 $cat <<'EOSH' > Cppsym.know
21172 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
21173 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
21174 alliant alpha am29000 AM29000 AMD64 amd64 amiga AMIGAOS AMIX
21175 ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
21176 BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
21177 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
21178 bull c cadmus clipper CMU COFF COMPILER_VERSION
21179 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
21180 CYGWIN DECC DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
21181 Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
21182 FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
21184 GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
21185 H3050R H3050RX hbullx20 hcx host_mips
21186 hp200 hp300 hp700 HP700 hp800 hp9000
21187 hp9000s200 hp9000s300 hp9000s400 hp9000s500
21188 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
21189 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
21190 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
21191 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
21192 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
21193 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
21194 LIBCATAMOUNT Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
21195 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
21196 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
21197 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
21198 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
21199 MATH_HAS_NO_SIDE_EFFECTS
21200 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
21201 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
21202 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
21203 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
21204 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
21205 NetBSD news1500 news1700 news1800 news1900 news3700
21206 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
21207 ns32016 ns32332 ns32k nsc32000
21208 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
21209 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
21210 pc532 pdp11 PGC PIC plexus PORTAR posix
21211 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
21212 POSIX_C_SOURCE POSIX_SOURCE POWER
21213 PROTOTYPES PWB pyr QNX QK_USER R3000 REENTRANT RES Rhapsody RISC6000
21214 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
21215 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
21216 sony sony_news sonyrisc sparc sparclite spectrum
21217 stardent stdc STDC_EXT stratos sun sun3 sun386
21218 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
21219 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
21220 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
21221 sysV68 sysV88 Tek4132 Tek4300 titan
21222 TM3200 TM5400 TM5600
21223 tower tower32 tower32_200 tower32_600 tower32_700
21224 tower32_800 tower32_850 tss
21225 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
21226 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
21227 unix UNIX95 UNIX99 unixpc unos
21228 USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
21229 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
21230 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
21232 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms x86_64 xenix Xenix286
21233 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
21234 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
21237 # Maybe put other stuff here too.
21238 cat <<EOSH >>Cppsym.know
21241 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
21242 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
21243 $cat Cppsym.know > Cppsym.c
21244 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
21245 $rm -f Cppsym.a Cppsym.b Cppsym.c
21246 cat <<EOSH > Cppsym
21248 if $test \$# -gt 0; then
21249 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
21250 if $test -s Cppsym.got; then
21257 $tr " " "$trnl" | ./Cppsym.try
21263 cat <<EOSH > Cppsym.try
21265 cat <<'EOCP' > try.c
21268 #define STRINGIFY(a) "a"
21270 #if cpp_stuff == 42
21271 #define StGiFy(a) #a
21272 #define STRINGIFY(a) StGiFy(a)
21274 #if $cpp_stuff != 1 && $cpp_stuff != 42
21275 # include "Bletch: How does this C preprocessor stringify macros?"
21281 cat <<'EOSH' >> Cppsym.try
21283 printf "#ifdef %s\nprintf(\"%s=%%s\\n\", STRINGIFY(%s));\n#endif\n", $1, $1, $1
21284 printf "#ifdef _%s\nprintf(\"_%s=%%s\\n\", STRINGIFY(_%s));\n#endif\n", $1, $1, $1
21285 printf "#ifdef __%s\nprintf(\"__%s=%%s\\n\", STRINGIFY(__%s));\n#endif\n", $1, $1, $1
21286 printf "#ifdef __%s__\nprintf(\"__%s__=%%s\\n\", STRINGIFY(__%s__));\n#endif\n", $1, $1, $1
21288 echo 'return 0;}' >> try.c
21290 cat <<EOSH >> Cppsym.try
21292 case "$osname-$gccversion" in
21293 irix-) ccflags="\$ccflags -woff 1178" ;;
21294 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
21296 $cc -o try -Dcpp_stuff=$cpp_stuff $optimize \$ccflags $ldflags try.c $libs && $run ./try | $sed 's/ /\\\\ /g'
21298 chmod +x Cppsym.try
21299 $eunicefix Cppsym.try
21300 ./Cppsym < Cppsym.know > Cppsym.true
21301 : Add in any linux cpp "predefined macros":
21302 case "$osname::$gccversion" in
21305 rm -f $tHdrH'.h' $tHdrH
21307 if cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
21308 sed 's/#define[\ \ ]*//;s/[\ \ ].*$//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
21309 if [ -s $tHdrH'_cppsym.real' ]; then
21310 cat $tHdrH'_cppsym.real' Cppsym.know | sort | uniq | ./Cppsym | sort | uniq > Cppsym.true
21313 rm -f $tHdrH'.h' $tHdrH'_cppsym.h' $tHdrH'_cppsym.real'
21316 : now check the C compiler for additional symbols
21317 postprocess_cc_v=''
21319 aix) postprocess_cc_v="|$tr , ' '" ;;
21326 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
21329 -D*) echo "\$i" | $sed 's/^-D//';;
21330 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
21335 postprocess_cc_v=''
21338 ./ccsym > ccsym1.raw
21339 if $test -s ccsym1.raw; then
21340 $sort ccsym1.raw | $uniq >ccsym.raw
21342 mv ccsym1.raw ccsym.raw
21345 $awk '/\=/ { print $0; next }
21346 { print $0"=1" }' ccsym.raw >ccsym.list
21347 $comm -13 Cppsym.true ccsym.list >ccsym.own
21348 $comm -12 Cppsym.true ccsym.list >ccsym.com
21349 $comm -23 Cppsym.true ccsym.list >ccsym.cpp
21351 if $test -z ccsym.raw; then
21352 echo "Your C compiler doesn't seem to define any symbols!" >&4
21354 echo "However, your C preprocessor defines the following symbols:"
21357 cppsymbols=`$cat Cppsym.true`
21358 cppsymbols=`echo $cppsymbols`
21359 cppccsymbols="$cppsymbols"
21361 if $test -s ccsym.com; then
21362 echo "Your C compiler and pre-processor define these symbols:"
21363 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
21366 cppccsymbols=`$cat ccsym.com`
21367 cppccsymbols=`echo $cppccsymbols`
21368 $test "$silent" || sleep 1
21370 if $test -s ccsym.cpp; then
21371 $test "$also" && echo " "
21372 echo "Your C pre-processor ${also}defines the following symbols:"
21373 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
21375 cppsymbols=`$cat ccsym.cpp`
21376 cppsymbols=`echo $cppsymbols`
21377 $test "$silent" || sleep 1
21379 if $test -s ccsym.own; then
21380 $test "$also" && echo " "
21381 echo "Your C compiler ${also}defines the following cpp symbols:"
21382 $sed -e 's/\(..*\)=1/\1/' ccsym.own
21383 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
21384 ccsymbols=`$cat ccsym.own`
21385 ccsymbols=`echo $ccsymbols`
21386 $test "$silent" || sleep 1
21390 : see if this is a termio system
21394 if $test `./findhdr termios.h`; then
21395 set tcsetattr i_termios
21401 "$define") echo "You have POSIX termios.h... good!" >&4;;
21402 *) if ./Cppsym pyr; then
21403 case "`/bin/universe`" in
21404 ucb) if $test `./findhdr sgtty.h`; then
21406 echo "<sgtty.h> found." >&4
21408 echo "System is pyramid with BSD universe."
21409 ./warn "<sgtty.h> not found--you could have problems."
21411 *) if $test `./findhdr termio.h`; then
21413 echo "<termio.h> found." >&4
21415 echo "System is pyramid with USG universe."
21416 ./warn "<termio.h> not found--you could have problems."
21420 if $test `./findhdr termio.h`; then
21421 echo "<termio.h> found." >&4
21423 elif $test `./findhdr sgtty.h`; then
21424 echo "<sgtty.h> found." >&4
21427 ./warn "Neither <termio.h> nor <sgtty.h> found--cross fingers!"
21430 if $test `./findhdr sgtty.h`; then
21431 echo "<sgtty.h> found." >&4
21433 elif $test `./findhdr termio.h`; then
21434 echo "<termio.h> found." >&4
21437 ./warn "Neither <sgtty.h> nor <termio.h> found--cross fingers!"
21441 set i_termio; eval $setvar
21442 val=$val2; set i_sgtty; eval $setvar
21443 val=$val3; set i_termios; eval $setvar
21445 : see if stddef is available
21446 set stddef.h i_stddef
21449 : see if sys/access.h is available
21450 set sys/access.h i_sysaccess
21453 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
21454 set sys/filio.h i_sysfilio
21457 if $test `./findhdr sys/ioctl.h`; then
21459 echo '<sys/ioctl.h> found.' >&4
21462 if $test $i_sysfilio = "$define"; then
21463 echo '<sys/ioctl.h> NOT found.' >&4
21465 $test $i_sgtty = "$define" && xxx="sgtty.h"
21466 $test $i_termio = "$define" && xxx="termio.h"
21467 $test $i_termios = "$define" && xxx="termios.h"
21468 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
21474 : see if socket ioctl defs are in sys/sockio.h
21476 xxx=`./findhdr sys/sockio.h`
21477 if $test "$xxx"; then
21478 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
21480 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
21483 echo "No socket ioctls found in <sys/sockio.h>." >&4
21488 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
21494 : see if this is a syslog.h system
21495 set syslog.h i_syslog
21498 : see if this is a sys/mode.h system
21499 set sys/mode.h i_sysmode
21502 : see if there is a sys/poll.h file
21503 set sys/poll.h i_syspoll
21506 : see if sys/resource.h has to be included
21507 set sys/resource.h i_sysresrc
21510 : see if sys/security.h is available
21511 set sys/security.h i_syssecrt
21514 : see if this is a sys/statvfs.h system
21515 set sys/statvfs.h i_sysstatvfs
21518 : see if this is a sys/un.h system
21519 set sys/un.h i_sysun
21522 : see if this is a sys/utsname.h system
21523 set sys/utsname.h i_sysutsname
21526 : see if this is a syswait system
21527 set sys/wait.h i_syswait
21530 : see if this is a ustat.h system
21531 set ustat.h i_ustat
21534 : see if this is an utime system
21535 set utime.h i_utime
21538 : see if this is a vfork system
21541 set vfork.h i_vfork
21551 echo "Looking for extensions..." >&4
21552 : If we are using the old config.sh, known_extensions may contain
21553 : old or inaccurate or duplicate values.
21554 known_extensions=''
21555 nonxs_extensions=''
21556 : We do not use find because it might not be available.
21557 : We do not just use MANIFEST because the user may have dropped
21558 : some additional extensions into the source tree and expect them
21561 : Function to recursively find available extensions, ignoring DynaLoader
21562 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
21566 DynaLoader|dynaload) ;;
21568 if $test -f $xxx/$xxx.xs -o -f $xxx/$xxx.c; then
21569 known_extensions="$known_extensions $1$xxx";
21570 elif $test -f $xxx/Makefile.PL; then
21571 nonxs_extensions="$nonxs_extensions $1$xxx";
21573 if $test -d $xxx -a $# -lt 10; then
21576 eval $find_extensions;
21588 eval $find_extensions
21589 # Special case: Add in modules that nest beyond the first level.
21590 # Currently threads/shared and Hash/Util/FieldHash, since they are
21591 # not picked up by the recursive find above (and adding in general
21592 # recursive finding breaks SDBM_File/sdbm).
21593 # A.D. 20011025 (SDBM), ajgough 20071008 (FieldHash)
21594 known_extensions="$known_extensions threads/shared Hash/Util/FieldHash"
21595 set X $known_extensions
21597 known_extensions="$*"
21598 set X $nonxs_extensions
21600 nonxs_extensions="$*"
21603 : Now see which are supported on this system.
21605 for xxx in $known_extensions ; do
21609 $define) avail_ext="$avail_ext $xxx" ;;
21612 GDBM_File|gdbm_fil)
21614 $define) avail_ext="$avail_ext $xxx" ;;
21617 I18N/Langinfo|i18n_lan)
21618 case "$i_langinfo$d_nl_langinfo" in
21619 $define$define) avail_ext="$avail_ext $xxx" ;;
21623 : XXX Do we need a useipcsysv variable here
21624 case "${d_msg}${d_sem}${d_shm}" in
21625 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
21628 NDBM_File|ndbm_fil)
21631 case "$osname-$use64bitint" in
21634 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
21637 *) avail_ext="$avail_ext $xxx" ;;
21642 ODBM_File|odbm_fil)
21643 case "${i_dbm}${i_rpcsvcdbm}" in
21645 case "$d_cplusplus" in
21646 define) ;; # delete as a function name will not work
21647 *) case "$osname-$use64bitint" in
21650 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
21653 *) avail_ext="$avail_ext $xxx" ;;
21661 case "$useopcode" in
21662 true|define|y) avail_ext="$avail_ext $xxx" ;;
21666 case "$useposix" in
21667 true|define|y) avail_ext="$avail_ext $xxx" ;;
21671 case "$d_socket" in
21674 beos) ;; # not unless BONE
21675 *) avail_ext="$avail_ext $xxx" ;;
21680 Sys/Syslog|sys/syslog)
21681 : XXX syslog requires socket
21682 case "$d_socket" in
21683 true|$define|y) avail_ext="$avail_ext $xxx" ;;
21687 case "$usethreads" in
21689 case "$use5005threads" in
21690 $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;;
21694 threads|threads/shared)
21695 # threads and threads::shared are special cases.
21696 # To stop people from asking "Perl 5.8.0 was supposed
21697 # to have this new fancy threads implementation but my
21698 # perl doesn't have it" and from people trying to
21699 # (re)install the threads module using CPAN.pm and
21700 # CPAN.pm then offering to reinstall Perl 5.8.0,
21701 # the threads.pm and threads/shared.pm will always be
21702 # there, croaking informatively ("you need to rebuild
21703 # all of Perl with threads, sorry") when threads haven't
21704 # been compiled in.
21706 avail_ext="$avail_ext $xxx"
21710 cygwin) avail_ext="$avail_ext $xxx" ;;
21713 XS/APItest|xs/apitest)
21714 # This is just for testing. Skip it unless we have dynamic loading.
21717 $define) avail_ext="$avail_ext $xxx" ;;
21720 XS/Typemap|xs/typemap)
21721 # This is just for testing. Skip it unless we have dynamic loading.
21723 $define) avail_ext="$avail_ext $xxx" ;;
21726 *) avail_ext="$avail_ext $xxx"
21735 case "$onlyextensions" in
21737 *) keepextensions=''
21738 echo "You have requested that only certains extensions be included..." >&4
21739 for i in $onlyextensions; do
21740 case " $avail_ext " in
21742 echo "Keeping extension $i."
21743 keepextensions="$keepextensions $i"
21745 *) echo "Ignoring extension $i." ;;
21748 avail_ext="$keepextensions"
21752 case "$noextensions" in
21754 *) keepextensions=''
21755 echo "You have requested that certain extensions be ignored..." >&4
21756 for i in $avail_ext; do
21757 case " $noextensions " in
21758 *" $i "*) echo "Ignoring extension $i." ;;
21759 *) echo "Keeping extension $i.";
21760 keepextensions="$keepextensions $i"
21764 avail_ext="$keepextensions"
21768 : Now see which nonxs extensions are supported on this system.
21769 : For now assume all are.
21771 for xxx in $nonxs_extensions ; do
21773 *) nonxs_ext="$nonxs_ext $xxx"
21785 A number of extensions are supplied with $package. You may choose to
21786 compile these extensions for dynamic loading (the default), compile
21787 them into the $package executable (static loading), or not include
21788 them at all. Answer "none" to include no extensions.
21789 Note that DynaLoader is always built and need not be mentioned here.
21792 case "$dynamic_ext" in
21794 : Exclude those listed in static_ext
21796 for xxx in $avail_ext; do
21797 case " $static_ext " in
21799 *) dflt="$dflt $xxx" ;;
21806 *) dflt="$dynamic_ext"
21807 # Perhaps we are reusing an old out-of-date config.sh.
21810 if test X"$dynamic_ext" != X"$avail_ext"; then
21812 NOTICE: Your previous config.sh list may be incorrect.
21813 The extensions now available to you are
21815 but the default list from your previous config.sh is
21827 rp="What extensions do you wish to load dynamically?"
21830 none) dynamic_ext=' ' ;;
21831 *) dynamic_ext="$ans" ;;
21834 case "$static_ext" in
21836 : Exclude those already listed in dynamic linking
21838 for xxx in $avail_ext; do
21839 case " $dynamic_ext " in
21841 *) dflt="$dflt $xxx" ;;
21848 *) dflt="$static_ext"
21855 rp="What extensions do you wish to load statically?"
21858 none) static_ext=' ' ;;
21859 *) static_ext="$ans" ;;
21864 A number of extensions are supplied with $package. Answer "none"
21865 to include no extensions.
21866 Note that DynaLoader is always built and need not be mentioned here.
21869 case "$static_ext" in
21870 '') dflt="$avail_ext" ;;
21871 *) dflt="$static_ext"
21872 # Perhaps we are reusing an old out-of-date config.sh.
21875 if test X"$static_ext" != X"$avail_ext"; then
21877 NOTICE: Your previous config.sh list may be incorrect.
21878 The extensions now available to you are
21880 but the default list from your previous config.sh is
21889 : Exclude those that are not xs extensions
21893 rp="What extensions do you wish to include?"
21896 none) static_ext=' ' ;;
21897 *) static_ext="$ans" ;;
21902 # Encode is a special case. If we are building Encode as a static
21903 # extension, we need to explicitly list its subextensions as well.
21904 # For other nested extensions, this is handled automatically by
21905 # the appropriate Makefile.PL.
21906 case " $static_ext " in
21907 *" Encode "*) # Add the subextensions of Encode
21909 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
21910 static_ext="$static_ext Encode/$xxx"
21916 set X $dynamic_ext $static_ext $nonxs_ext
21920 # Sanity check: We require an extension suitable for use with
21921 # AnyDBM_File, as well as Fcntl and IO. (Failure to have these
21922 # should show up as failures in the test suite, but it's helpful to
21923 # catch them now.) The 'extensions' list is normally sorted
21924 # alphabetically, so we need to accept either
21925 # DB_File ... Fcntl ... IO ....
21926 # or something like
21927 # Fcntl ... NDBM_File ... IO ....
21928 case " $extensions" in
21929 *"_File "*" Fcntl "*" IO "*) ;; # DB_File
21930 *" Fcntl "*"_File "*" IO "*) ;; # GDBM_File
21931 *" Fcntl "*" IO "*"_File "*) ;; # NDBM_File
21932 *) echo "WARNING: Extensions DB_File or *DBM_File, Fcntl, and IO not configured." >&4
21933 echo "WARNING: The Perl you are building will be quite crippled." >& 4
21937 : Remove libraries needed only for extensions
21938 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
21939 : The exception is SunOS 4.x, which needs them.
21940 case "${osname}X${osvers}" in
21944 *) case "$usedl" in
21945 $define|true|[yY]*)
21946 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
21950 *) perllibs="$libs"
21956 : Remove build directory name from cppstdin so it can be used from
21957 : either the present location or the final installed location.
21959 : Get out of the UU directory to get correct path name.
21961 case "$cppstdin" in
21963 echo "Stripping down cppstdin path name"
21969 : end of configuration questions
21971 echo "End of configuration questions."
21974 : back to where it started
21975 if test -d ../UU; then
21979 : configuration may be unconditionally patched via a 'config.arch' file
21980 if $test -f config.arch; then
21981 echo "I see a config.arch file, loading it." >&4
21985 : configuration may be patched via a 'config.over' file
21986 if $test -f config.over; then
21989 rp='I see a config.over file. Do you wish to load it?'
21992 n*) echo "OK, I'll ignore it.";;
21994 echo "Configuration override changes have been loaded."
21999 : in case they want portability, strip down executable paths
22000 case "$d_portable" in
22003 echo "Stripping down executable paths..." >&4
22004 for file in $loclist $trylist; do
22006 eval $file=`basename $temp`
22011 : create config.sh file
22013 echo "Creating config.sh..." >&4
22014 $spitshell <<EOT >config.sh
22017 # This file was produced by running the Configure script. It holds all the
22018 # definitions figured out by Configure. Should you modify one of these values,
22019 # do not forget to propagate your changes by running "Configure -der". You may
22020 # instead choose to run each of the .SH files by yourself, or "Configure -S".
22023 # Package name : $package
22024 # Source directory : $src
22025 # Configuration time: $cf_time
22026 # Configured by : $cf_by
22027 # Target system : $myuname
22030 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
22031 $spitshell <<EOT >>config.sh
22040 Revision='$Revision'
22048 alignbytes='$alignbytes'
22049 ansi2knr='$ansi2knr'
22050 aphostname='$aphostname'
22051 api_revision='$api_revision'
22052 api_subversion='$api_subversion'
22053 api_version='$api_version'
22054 api_versionstring='$api_versionstring'
22057 archlibexp='$archlibexp'
22058 archname64='$archname64'
22059 archname='$archname'
22060 archobjs='$archobjs'
22061 asctime_r_proto='$asctime_r_proto'
22069 byteorder='$byteorder'
22071 castflags='$castflags'
22074 cccdlflags='$cccdlflags'
22075 ccdlflags='$ccdlflags'
22077 ccflags_uselargefiles='$ccflags_uselargefiles'
22079 ccsymbols='$ccsymbols'
22080 ccversion='$ccversion'
22082 cf_email='$cf_email'
22087 clocktype='$clocktype'
22089 compress='$compress'
22090 contains='$contains'
22094 cpp_stuff='$cpp_stuff'
22095 cppccsymbols='$cppccsymbols'
22096 cppflags='$cppflags'
22098 cppminus='$cppminus'
22100 cppstdin='$cppstdin'
22101 cppsymbols='$cppsymbols'
22102 crypt_r_proto='$crypt_r_proto'
22103 cryptlib='$cryptlib'
22105 ctermid_r_proto='$ctermid_r_proto'
22106 ctime_r_proto='$ctime_r_proto'
22107 d_Gconvert='$d_Gconvert'
22108 d_PRIEUldbl='$d_PRIEUldbl'
22109 d_PRIFUldbl='$d_PRIFUldbl'
22110 d_PRIGUldbl='$d_PRIGUldbl'
22111 d_PRIXU64='$d_PRIXU64'
22112 d_PRId64='$d_PRId64'
22113 d_PRIeldbl='$d_PRIeldbl'
22114 d_PRIfldbl='$d_PRIfldbl'
22115 d_PRIgldbl='$d_PRIgldbl'
22116 d_PRIi64='$d_PRIi64'
22117 d_PRIo64='$d_PRIo64'
22118 d_PRIu64='$d_PRIu64'
22119 d_PRIx64='$d_PRIx64'
22120 d_SCNfldbl='$d_SCNfldbl'
22121 d__fwalk='$d__fwalk'
22122 d_access='$d_access'
22123 d_accessx='$d_accessx'
22126 d_archlib='$d_archlib'
22127 d_asctime64='$d_asctime64'
22128 d_asctime_r='$d_asctime_r'
22131 d_attribute_format='$d_attribute_format'
22132 d_attribute_malloc='$d_attribute_malloc'
22133 d_attribute_nonnull='$d_attribute_nonnull'
22134 d_attribute_noreturn='$d_attribute_noreturn'
22135 d_attribute_pure='$d_attribute_pure'
22136 d_attribute_unused='$d_attribute_unused'
22137 d_attribute_warn_unused_result='$d_attribute_warn_unused_result'
22141 d_bsdgetpgrp='$d_bsdgetpgrp'
22142 d_bsdsetpgrp='$d_bsdsetpgrp'
22143 d_builtin_choose_expr='$d_builtin_choose_expr'
22144 d_builtin_expect='$d_builtin_expect'
22146 d_c99_variadic_macros='$d_c99_variadic_macros'
22147 d_casti32='$d_casti32'
22148 d_castneg='$d_castneg'
22149 d_charvspr='$d_charvspr'
22151 d_chroot='$d_chroot'
22152 d_chsize='$d_chsize'
22154 d_clearenv='$d_clearenv'
22155 d_closedir='$d_closedir'
22156 d_cmsghdr_s='$d_cmsghdr_s'
22158 d_copysignl='$d_copysignl'
22159 d_cplusplus='$d_cplusplus'
22161 d_crypt_r='$d_crypt_r'
22163 d_ctermid='$d_ctermid'
22164 d_ctermid_r='$d_ctermid_r'
22165 d_ctime64='$d_ctime64'
22166 d_ctime_r='$d_ctime_r'
22167 d_cuserid='$d_cuserid'
22168 d_dbl_dig='$d_dbl_dig'
22169 d_dbminitproto='$d_dbminitproto'
22170 d_difftime64='$d_difftime64'
22171 d_difftime='$d_difftime'
22172 d_dir_dd_fd='$d_dir_dd_fd'
22174 d_dirnamlen='$d_dirnamlen'
22175 d_dlerror='$d_dlerror'
22176 d_dlopen='$d_dlopen'
22177 d_dlsymun='$d_dlsymun'
22178 d_dosuid='$d_dosuid'
22179 d_drand48_r='$d_drand48_r'
22180 d_drand48proto='$d_drand48proto'
22182 d_eaccess='$d_eaccess'
22183 d_endgrent='$d_endgrent'
22184 d_endgrent_r='$d_endgrent_r'
22185 d_endhent='$d_endhent'
22186 d_endhostent_r='$d_endhostent_r'
22187 d_endnent='$d_endnent'
22188 d_endnetent_r='$d_endnetent_r'
22189 d_endpent='$d_endpent'
22190 d_endprotoent_r='$d_endprotoent_r'
22191 d_endpwent='$d_endpwent'
22192 d_endpwent_r='$d_endpwent_r'
22193 d_endsent='$d_endsent'
22194 d_endservent_r='$d_endservent_r'
22195 d_eofnblk='$d_eofnblk'
22196 d_eunice='$d_eunice'
22197 d_faststdio='$d_faststdio'
22198 d_fchdir='$d_fchdir'
22199 d_fchmod='$d_fchmod'
22200 d_fchown='$d_fchown'
22202 d_fcntl_can_lock='$d_fcntl_can_lock'
22203 d_fd_macros='$d_fd_macros'
22204 d_fd_set='$d_fd_set'
22205 d_fds_bits='$d_fds_bits'
22206 d_fgetpos='$d_fgetpos'
22207 d_finite='$d_finite'
22208 d_finitel='$d_finitel'
22209 d_flexfnam='$d_flexfnam'
22211 d_flockproto='$d_flockproto'
22213 d_fp_class='$d_fp_class'
22214 d_fpathconf='$d_fpathconf'
22215 d_fpclass='$d_fpclass'
22216 d_fpclassify='$d_fpclassify'
22217 d_fpclassl='$d_fpclassl'
22218 d_fpos64_t='$d_fpos64_t'
22219 d_frexpl='$d_frexpl'
22220 d_fs_data_s='$d_fs_data_s'
22221 d_fseeko='$d_fseeko'
22222 d_fsetpos='$d_fsetpos'
22223 d_fstatfs='$d_fstatfs'
22224 d_fstatvfs='$d_fstatvfs'
22226 d_ftello='$d_ftello'
22228 d_futimes='$d_futimes'
22229 d_gdbm_ndbm_h_uses_prototypes='$d_gdbm_ndbm_h_uses_prototypes'
22230 d_gdbmndbm_h_uses_prototypes='$d_gdbmndbm_h_uses_prototypes'
22231 d_getcwd='$d_getcwd'
22232 d_getespwnam='$d_getespwnam'
22233 d_getfsstat='$d_getfsstat'
22234 d_getgrent='$d_getgrent'
22235 d_getgrent_r='$d_getgrent_r'
22236 d_getgrgid_r='$d_getgrgid_r'
22237 d_getgrnam_r='$d_getgrnam_r'
22238 d_getgrps='$d_getgrps'
22239 d_gethbyaddr='$d_gethbyaddr'
22240 d_gethbyname='$d_gethbyname'
22241 d_gethent='$d_gethent'
22242 d_gethname='$d_gethname'
22243 d_gethostbyaddr_r='$d_gethostbyaddr_r'
22244 d_gethostbyname_r='$d_gethostbyname_r'
22245 d_gethostent_r='$d_gethostent_r'
22246 d_gethostprotos='$d_gethostprotos'
22247 d_getitimer='$d_getitimer'
22248 d_getlogin='$d_getlogin'
22249 d_getlogin_r='$d_getlogin_r'
22250 d_getmnt='$d_getmnt'
22251 d_getmntent='$d_getmntent'
22252 d_getnbyaddr='$d_getnbyaddr'
22253 d_getnbyname='$d_getnbyname'
22254 d_getnent='$d_getnent'
22255 d_getnetbyaddr_r='$d_getnetbyaddr_r'
22256 d_getnetbyname_r='$d_getnetbyname_r'
22257 d_getnetent_r='$d_getnetent_r'
22258 d_getnetprotos='$d_getnetprotos'
22259 d_getpagsz='$d_getpagsz'
22260 d_getpbyname='$d_getpbyname'
22261 d_getpbynumber='$d_getpbynumber'
22262 d_getpent='$d_getpent'
22263 d_getpgid='$d_getpgid'
22264 d_getpgrp2='$d_getpgrp2'
22265 d_getpgrp='$d_getpgrp'
22266 d_getppid='$d_getppid'
22267 d_getprior='$d_getprior'
22268 d_getprotobyname_r='$d_getprotobyname_r'
22269 d_getprotobynumber_r='$d_getprotobynumber_r'
22270 d_getprotoent_r='$d_getprotoent_r'
22271 d_getprotoprotos='$d_getprotoprotos'
22272 d_getprpwnam='$d_getprpwnam'
22273 d_getpwent='$d_getpwent'
22274 d_getpwent_r='$d_getpwent_r'
22275 d_getpwnam_r='$d_getpwnam_r'
22276 d_getpwuid_r='$d_getpwuid_r'
22277 d_getsbyname='$d_getsbyname'
22278 d_getsbyport='$d_getsbyport'
22279 d_getsent='$d_getsent'
22280 d_getservbyname_r='$d_getservbyname_r'
22281 d_getservbyport_r='$d_getservbyport_r'
22282 d_getservent_r='$d_getservent_r'
22283 d_getservprotos='$d_getservprotos'
22284 d_getspnam='$d_getspnam'
22285 d_getspnam_r='$d_getspnam_r'
22286 d_gettimeod='$d_gettimeod'
22287 d_gmtime64='$d_gmtime64'
22288 d_gmtime_r='$d_gmtime_r'
22289 d_gnulibc='$d_gnulibc'
22290 d_grpasswd='$d_grpasswd'
22291 d_hasmntopt='$d_hasmntopt'
22293 d_ilogbl='$d_ilogbl'
22294 d_inc_version_list='$d_inc_version_list'
22296 d_inetaton='$d_inetaton'
22297 d_int64_t='$d_int64_t'
22298 d_isascii='$d_isascii'
22299 d_isfinite='$d_isfinite'
22302 d_isnanl='$d_isnanl'
22303 d_killpg='$d_killpg'
22304 d_lchown='$d_lchown'
22305 d_ldbl_dig='$d_ldbl_dig'
22306 d_libm_lib_version='$d_libm_lib_version'
22308 d_localtime64='$d_localtime64'
22309 d_localtime_r='$d_localtime_r'
22310 d_localtime_r_needs_tzset='$d_localtime_r_needs_tzset'
22311 d_locconv='$d_locconv'
22313 d_longdbl='$d_longdbl'
22314 d_longlong='$d_longlong'
22315 d_lseekproto='$d_lseekproto'
22317 d_madvise='$d_madvise'
22318 d_malloc_good_size='$d_malloc_good_size'
22319 d_malloc_size='$d_malloc_size'
22321 d_mbstowcs='$d_mbstowcs'
22322 d_mbtowc='$d_mbtowc'
22323 d_memchr='$d_memchr'
22324 d_memcmp='$d_memcmp'
22325 d_memcpy='$d_memcpy'
22326 d_memmove='$d_memmove'
22327 d_memset='$d_memset'
22329 d_mkdtemp='$d_mkdtemp'
22330 d_mkfifo='$d_mkfifo'
22331 d_mkstemp='$d_mkstemp'
22332 d_mkstemps='$d_mkstemps'
22333 d_mktime64='$d_mktime64'
22334 d_mktime='$d_mktime'
22337 d_modfl_pow32_bug='$d_modfl_pow32_bug'
22338 d_modflproto='$d_modflproto'
22339 d_mprotect='$d_mprotect'
22341 d_msg_ctrunc='$d_msg_ctrunc'
22342 d_msg_dontroute='$d_msg_dontroute'
22343 d_msg_oob='$d_msg_oob'
22344 d_msg_peek='$d_msg_peek'
22345 d_msg_proxy='$d_msg_proxy'
22346 d_msgctl='$d_msgctl'
22347 d_msgget='$d_msgget'
22348 d_msghdr_s='$d_msghdr_s'
22349 d_msgrcv='$d_msgrcv'
22350 d_msgsnd='$d_msgsnd'
22352 d_munmap='$d_munmap'
22353 d_mymalloc='$d_mymalloc'
22355 d_ndbm_h_uses_prototypes='$d_ndbm_h_uses_prototypes'
22357 d_nl_langinfo='$d_nl_langinfo'
22358 d_nv_preserves_uv='$d_nv_preserves_uv'
22359 d_nv_zero_is_allbits_zero='$d_nv_zero_is_allbits_zero'
22360 d_off64_t='$d_off64_t'
22361 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
22362 d_oldpthreads='$d_oldpthreads'
22363 d_oldsock='$d_oldsock'
22365 d_pathconf='$d_pathconf'
22367 d_perl_otherlibdirs='$d_perl_otherlibdirs'
22368 d_phostname='$d_phostname'
22371 d_portable='$d_portable'
22372 d_printf_format_null='$d_printf_format_null'
22373 d_procselfexe='$d_procselfexe'
22374 d_pseudofork='$d_pseudofork'
22375 d_pthread_atfork='$d_pthread_atfork'
22376 d_pthread_attr_setscope='$d_pthread_attr_setscope'
22377 d_pthread_yield='$d_pthread_yield'
22379 d_pwchange='$d_pwchange'
22380 d_pwclass='$d_pwclass'
22381 d_pwcomment='$d_pwcomment'
22382 d_pwexpire='$d_pwexpire'
22383 d_pwgecos='$d_pwgecos'
22384 d_pwpasswd='$d_pwpasswd'
22385 d_pwquota='$d_pwquota'
22388 d_random_r='$d_random_r'
22389 d_readdir64_r='$d_readdir64_r'
22390 d_readdir='$d_readdir'
22391 d_readdir_r='$d_readdir_r'
22392 d_readlink='$d_readlink'
22394 d_recvmsg='$d_recvmsg'
22395 d_rename='$d_rename'
22396 d_rewinddir='$d_rewinddir'
22398 d_safebcpy='$d_safebcpy'
22399 d_safemcpy='$d_safemcpy'
22400 d_sanemcmp='$d_sanemcmp'
22401 d_sbrkproto='$d_sbrkproto'
22402 d_scalbnl='$d_scalbnl'
22403 d_sched_yield='$d_sched_yield'
22404 d_scm_rights='$d_scm_rights'
22405 d_seekdir='$d_seekdir'
22406 d_select='$d_select'
22408 d_semctl='$d_semctl'
22409 d_semctl_semid_ds='$d_semctl_semid_ds'
22410 d_semctl_semun='$d_semctl_semun'
22411 d_semget='$d_semget'
22413 d_sendmsg='$d_sendmsg'
22414 d_setegid='$d_setegid'
22415 d_seteuid='$d_seteuid'
22416 d_setgrent='$d_setgrent'
22417 d_setgrent_r='$d_setgrent_r'
22418 d_setgrps='$d_setgrps'
22419 d_sethent='$d_sethent'
22420 d_sethostent_r='$d_sethostent_r'
22421 d_setitimer='$d_setitimer'
22422 d_setlinebuf='$d_setlinebuf'
22423 d_setlocale='$d_setlocale'
22424 d_setlocale_r='$d_setlocale_r'
22425 d_setnent='$d_setnent'
22426 d_setnetent_r='$d_setnetent_r'
22427 d_setpent='$d_setpent'
22428 d_setpgid='$d_setpgid'
22429 d_setpgrp2='$d_setpgrp2'
22430 d_setpgrp='$d_setpgrp'
22431 d_setprior='$d_setprior'
22432 d_setproctitle='$d_setproctitle'
22433 d_setprotoent_r='$d_setprotoent_r'
22434 d_setpwent='$d_setpwent'
22435 d_setpwent_r='$d_setpwent_r'
22436 d_setregid='$d_setregid'
22437 d_setresgid='$d_setresgid'
22438 d_setresuid='$d_setresuid'
22439 d_setreuid='$d_setreuid'
22440 d_setrgid='$d_setrgid'
22441 d_setruid='$d_setruid'
22442 d_setsent='$d_setsent'
22443 d_setservent_r='$d_setservent_r'
22444 d_setsid='$d_setsid'
22445 d_setvbuf='$d_setvbuf'
22449 d_shmatprototype='$d_shmatprototype'
22450 d_shmctl='$d_shmctl'
22452 d_shmget='$d_shmget'
22453 d_sigaction='$d_sigaction'
22454 d_signbit='$d_signbit'
22455 d_sigprocmask='$d_sigprocmask'
22456 d_sigsetjmp='$d_sigsetjmp'
22457 d_sitearch='$d_sitearch'
22458 d_snprintf='$d_snprintf'
22459 d_sockatmark='$d_sockatmark'
22460 d_sockatmarkproto='$d_sockatmarkproto'
22461 d_socket='$d_socket'
22462 d_socklen_t='$d_socklen_t'
22463 d_sockpair='$d_sockpair'
22464 d_socks5_init='$d_socks5_init'
22465 d_sprintf_returns_strlen='$d_sprintf_returns_strlen'
22467 d_srand48_r='$d_srand48_r'
22468 d_srandom_r='$d_srandom_r'
22469 d_sresgproto='$d_sresgproto'
22470 d_sresuproto='$d_sresuproto'
22471 d_statblks='$d_statblks'
22472 d_statfs_f_flags='$d_statfs_f_flags'
22473 d_statfs_s='$d_statfs_s'
22474 d_statvfs='$d_statvfs'
22475 d_stdio_cnt_lval='$d_stdio_cnt_lval'
22476 d_stdio_ptr_lval='$d_stdio_ptr_lval'
22477 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
22478 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
22479 d_stdio_stream_array='$d_stdio_stream_array'
22480 d_stdiobase='$d_stdiobase'
22481 d_stdstdio='$d_stdstdio'
22482 d_strchr='$d_strchr'
22483 d_strcoll='$d_strcoll'
22484 d_strctcpy='$d_strctcpy'
22485 d_strerrm='$d_strerrm'
22486 d_strerror='$d_strerror'
22487 d_strerror_r='$d_strerror_r'
22488 d_strftime='$d_strftime'
22489 d_strlcat='$d_strlcat'
22490 d_strlcpy='$d_strlcpy'
22491 d_strtod='$d_strtod'
22492 d_strtol='$d_strtol'
22493 d_strtold='$d_strtold'
22494 d_strtoll='$d_strtoll'
22495 d_strtoq='$d_strtoq'
22496 d_strtoul='$d_strtoul'
22497 d_strtoull='$d_strtoull'
22498 d_strtouq='$d_strtouq'
22499 d_strxfrm='$d_strxfrm'
22500 d_suidsafe='$d_suidsafe'
22501 d_symlink='$d_symlink'
22502 d_syscall='$d_syscall'
22503 d_syscallproto='$d_syscallproto'
22504 d_sysconf='$d_sysconf'
22505 d_sysernlst='$d_sysernlst'
22506 d_syserrlst='$d_syserrlst'
22507 d_system='$d_system'
22508 d_tcgetpgrp='$d_tcgetpgrp'
22509 d_tcsetpgrp='$d_tcsetpgrp'
22510 d_telldir='$d_telldir'
22511 d_telldirproto='$d_telldirproto'
22513 d_timegm='$d_timegm'
22515 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
22516 d_tm_tm_zone='$d_tm_tm_zone'
22517 d_tmpnam_r='$d_tmpnam_r'
22518 d_truncate='$d_truncate'
22519 d_ttyname_r='$d_ttyname_r'
22520 d_tzname='$d_tzname'
22521 d_u32align='$d_u32align'
22522 d_ualarm='$d_ualarm'
22525 d_union_semun='$d_union_semun'
22526 d_unordered='$d_unordered'
22527 d_unsetenv='$d_unsetenv'
22528 d_usleep='$d_usleep'
22529 d_usleepproto='$d_usleepproto'
22531 d_vendorarch='$d_vendorarch'
22532 d_vendorbin='$d_vendorbin'
22533 d_vendorlib='$d_vendorlib'
22534 d_vendorscript='$d_vendorscript'
22536 d_void_closedir='$d_void_closedir'
22537 d_voidsig='$d_voidsig'
22538 d_voidtty='$d_voidtty'
22539 d_volatile='$d_volatile'
22540 d_vprintf='$d_vprintf'
22541 d_vsnprintf='$d_vsnprintf'
22543 d_waitpid='$d_waitpid'
22544 d_wcstombs='$d_wcstombs'
22545 d_wctomb='$d_wctomb'
22546 d_writev='$d_writev'
22549 db_hashtype='$db_hashtype'
22550 db_prefixtype='$db_prefixtype'
22551 db_version_major='$db_version_major'
22552 db_version_minor='$db_version_minor'
22553 db_version_patch='$db_version_patch'
22554 defvoidused='$defvoidused'
22555 direntrytype='$direntrytype'
22558 doublesize='$doublesize'
22560 drand48_r_proto='$drand48_r_proto'
22562 dynamic_ext='$dynamic_ext'
22568 endgrent_r_proto='$endgrent_r_proto'
22569 endhostent_r_proto='$endhostent_r_proto'
22570 endnetent_r_proto='$endnetent_r_proto'
22571 endprotoent_r_proto='$endprotoent_r_proto'
22572 endpwent_r_proto='$endpwent_r_proto'
22573 endservent_r_proto='$endservent_r_proto'
22574 eunicefix='$eunicefix'
22577 extensions='$extensions'
22578 extern_C='$extern_C'
22580 fflushNULL='$fflushNULL'
22581 fflushall='$fflushall'
22583 firstmakefile='$firstmakefile'
22585 fpossize='$fpossize'
22586 fpostype='$fpostype'
22587 freetype='$freetype'
22590 full_csh='$full_csh'
22591 full_sed='$full_sed'
22592 gccansipedantic='$gccansipedantic'
22593 gccosandvers='$gccosandvers'
22594 gccversion='$gccversion'
22595 getgrent_r_proto='$getgrent_r_proto'
22596 getgrgid_r_proto='$getgrgid_r_proto'
22597 getgrnam_r_proto='$getgrnam_r_proto'
22598 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
22599 gethostbyname_r_proto='$gethostbyname_r_proto'
22600 gethostent_r_proto='$gethostent_r_proto'
22601 getlogin_r_proto='$getlogin_r_proto'
22602 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
22603 getnetbyname_r_proto='$getnetbyname_r_proto'
22604 getnetent_r_proto='$getnetent_r_proto'
22605 getprotobyname_r_proto='$getprotobyname_r_proto'
22606 getprotobynumber_r_proto='$getprotobynumber_r_proto'
22607 getprotoent_r_proto='$getprotoent_r_proto'
22608 getpwent_r_proto='$getpwent_r_proto'
22609 getpwnam_r_proto='$getpwnam_r_proto'
22610 getpwuid_r_proto='$getpwuid_r_proto'
22611 getservbyname_r_proto='$getservbyname_r_proto'
22612 getservbyport_r_proto='$getservbyport_r_proto'
22613 getservent_r_proto='$getservent_r_proto'
22614 getspnam_r_proto='$getspnam_r_proto'
22615 gidformat='$gidformat'
22621 gmtime_r_proto='$gmtime_r_proto'
22622 gnulibc_version='$gnulibc_version'
22624 groupcat='$groupcat'
22625 groupstype='$groupstype'
22628 h_sysfile='$h_sysfile'
22631 html1dir='$html1dir'
22632 html1direxp='$html1direxp'
22633 html3dir='$html3dir'
22634 html3direxp='$html3direxp'
22643 i_arpainet='$i_arpainet'
22644 i_assert='$i_assert'
22645 i_bsdioctl='$i_bsdioctl'
22649 i_dirent='$i_dirent'
22655 i_fp_class='$i_fp_class'
22657 i_gdbm_ndbm='$i_gdbm_ndbm'
22658 i_gdbmndbm='$i_gdbmndbm'
22660 i_ieeefp='$i_ieeefp'
22661 i_inttypes='$i_inttypes'
22662 i_langinfo='$i_langinfo'
22663 i_libutil='$i_libutil'
22664 i_limits='$i_limits'
22665 i_locale='$i_locale'
22666 i_machcthr='$i_machcthr'
22667 i_malloc='$i_malloc'
22668 i_mallocmalloc='$i_mallocmalloc'
22670 i_memory='$i_memory'
22671 i_mntent='$i_mntent'
22674 i_neterrno='$i_neterrno'
22675 i_netinettcp='$i_netinettcp'
22679 i_pthread='$i_pthread'
22681 i_rpcsvcdbm='$i_rpcsvcdbm'
22684 i_shadow='$i_shadow'
22686 i_stdarg='$i_stdarg'
22687 i_stddef='$i_stddef'
22688 i_stdlib='$i_stdlib'
22689 i_string='$i_string'
22690 i_sunmath='$i_sunmath'
22691 i_sysaccess='$i_sysaccess'
22692 i_sysdir='$i_sysdir'
22693 i_sysfile='$i_sysfile'
22694 i_sysfilio='$i_sysfilio'
22696 i_sysioctl='$i_sysioctl'
22697 i_syslog='$i_syslog'
22698 i_sysmman='$i_sysmman'
22699 i_sysmode='$i_sysmode'
22700 i_sysmount='$i_sysmount'
22701 i_sysndir='$i_sysndir'
22702 i_sysparam='$i_sysparam'
22703 i_syspoll='$i_syspoll'
22704 i_sysresrc='$i_sysresrc'
22705 i_syssecrt='$i_syssecrt'
22706 i_sysselct='$i_sysselct'
22707 i_syssockio='$i_syssockio'
22708 i_sysstat='$i_sysstat'
22709 i_sysstatfs='$i_sysstatfs'
22710 i_sysstatvfs='$i_sysstatvfs'
22711 i_systime='$i_systime'
22712 i_systimek='$i_systimek'
22713 i_systimes='$i_systimes'
22714 i_systypes='$i_systypes'
22715 i_sysuio='$i_sysuio'
22717 i_sysutsname='$i_sysutsname'
22718 i_sysvfs='$i_sysvfs'
22719 i_syswait='$i_syswait'
22720 i_termio='$i_termio'
22721 i_termios='$i_termios'
22723 i_unistd='$i_unistd'
22726 i_values='$i_values'
22727 i_varargs='$i_varargs'
22728 i_varhdr='$i_varhdr'
22730 ignore_versioned_solibs='$ignore_versioned_solibs'
22731 inc_version_list='$inc_version_list'
22732 inc_version_list_init='$inc_version_list_init'
22735 initialinstalllocation='$initialinstalllocation'
22736 installarchlib='$installarchlib'
22737 installbin='$installbin'
22738 installhtml1dir='$installhtml1dir'
22739 installhtml3dir='$installhtml3dir'
22740 installman1dir='$installman1dir'
22741 installman3dir='$installman3dir'
22742 installprefix='$installprefix'
22743 installprefixexp='$installprefixexp'
22744 installprivlib='$installprivlib'
22745 installscript='$installscript'
22746 installsitearch='$installsitearch'
22747 installsitebin='$installsitebin'
22748 installsitehtml1dir='$installsitehtml1dir'
22749 installsitehtml3dir='$installsitehtml3dir'
22750 installsitelib='$installsitelib'
22751 installsiteman1dir='$installsiteman1dir'
22752 installsiteman3dir='$installsiteman3dir'
22753 installsitescript='$installsitescript'
22754 installstyle='$installstyle'
22755 installusrbinperl='$installusrbinperl'
22756 installvendorarch='$installvendorarch'
22757 installvendorbin='$installvendorbin'
22758 installvendorhtml1dir='$installvendorhtml1dir'
22759 installvendorhtml3dir='$installvendorhtml3dir'
22760 installvendorlib='$installvendorlib'
22761 installvendorman1dir='$installvendorman1dir'
22762 installvendorman3dir='$installvendorman3dir'
22763 installvendorscript='$installvendorscript'
22765 issymlink='$issymlink'
22766 ivdformat='$ivdformat'
22769 known_extensions='$known_extensions'
22772 lddlflags='$lddlflags'
22774 ldflags_uselargefiles='$ldflags_uselargefiles'
22775 ldlibpthname='$ldlibpthname'
22782 libsdirs='$libsdirs'
22783 libsfiles='$libsfiles'
22784 libsfound='$libsfound'
22785 libspath='$libspath'
22786 libswanted='$libswanted'
22787 libswanted_uselargefiles='$libswanted_uselargefiles'
22793 localtime_r_proto='$localtime_r_proto'
22794 locincpth='$locincpth'
22795 loclibpth='$loclibpth'
22796 longdblsize='$longdblsize'
22797 longlongsize='$longlongsize'
22798 longsize='$longsize'
22802 lseeksize='$lseeksize'
22803 lseektype='$lseektype'
22806 madlyobj='$madlyobj'
22807 madlysrc='$madlysrc'
22811 make_set_make='$make_set_make'
22812 mallocobj='$mallocobj'
22813 mallocsrc='$mallocsrc'
22814 malloctype='$malloctype'
22816 man1direxp='$man1direxp'
22819 man3direxp='$man3direxp'
22821 mips_type='$mips_type'
22822 mistrustnm='$mistrustnm'
22824 mmaptype='$mmaptype'
22825 modetype='$modetype'
22827 multiarch='$multiarch'
22829 myarchname='$myarchname'
22830 mydomain='$mydomain'
22831 myhostname='$myhostname'
22834 need_va_copy='$need_va_copy'
22835 netdb_hlen_type='$netdb_hlen_type'
22836 netdb_host_type='$netdb_host_type'
22837 netdb_name_type='$netdb_name_type'
22838 netdb_net_type='$netdb_net_type'
22841 nm_so_opt='$nm_so_opt'
22842 nonxs_ext='$nonxs_ext'
22844 nvEUformat='$nvEUformat'
22845 nvFUformat='$nvFUformat'
22846 nvGUformat='$nvGUformat'
22847 nv_overflows_integers_at='$nv_overflows_integers_at'
22848 nv_preserves_uv_bits='$nv_preserves_uv_bits'
22849 nveformat='$nveformat'
22850 nvfformat='$nvfformat'
22851 nvgformat='$nvgformat'
22854 o_nonblock='$o_nonblock'
22856 old_pthread_create_joinable='$old_pthread_create_joinable'
22857 optimize='$optimize'
22858 orderlib='$orderlib'
22861 otherlibdirs='$otherlibdirs'
22865 patchlevel='$patchlevel'
22866 path_sep='$path_sep'
22869 perl_patchlevel='$perl_patchlevel'
22870 perladmin='$perladmin'
22871 perllibs='$perllibs'
22872 perlpath='$perlpath'
22874 phostname='$phostname'
22880 prefixexp='$prefixexp'
22882 privlibexp='$privlibexp'
22883 procselfexe='$procselfexe'
22884 prototype='$prototype'
22886 quadkind='$quadkind'
22887 quadtype='$quadtype'
22888 randbits='$randbits'
22889 randfunc='$randfunc'
22890 random_r_proto='$random_r_proto'
22891 randseedtype='$randseedtype'
22893 rd_nodata='$rd_nodata'
22894 readdir64_r_proto='$readdir64_r_proto'
22895 readdir_r_proto='$readdir_r_proto'
22896 revision='$revision'
22902 sGMTIME_max='$sGMTIME_max'
22903 sGMTIME_min='$sGMTIME_min'
22904 sLOCALTIME_max='$sLOCALTIME_max'
22905 sLOCALTIME_min='$sLOCALTIME_min'
22906 sPRIEUldbl='$sPRIEUldbl'
22907 sPRIFUldbl='$sPRIFUldbl'
22908 sPRIGUldbl='$sPRIGUldbl'
22909 sPRIXU64='$sPRIXU64'
22911 sPRIeldbl='$sPRIeldbl'
22912 sPRIfldbl='$sPRIfldbl'
22913 sPRIgldbl='$sPRIgldbl'
22918 sSCNfldbl='$sSCNfldbl'
22919 sched_yield='$sched_yield'
22920 scriptdir='$scriptdir'
22921 scriptdirexp='$scriptdirexp'
22923 seedfunc='$seedfunc'
22924 selectminbits='$selectminbits'
22925 selecttype='$selecttype'
22926 sendmail='$sendmail'
22927 setgrent_r_proto='$setgrent_r_proto'
22928 sethostent_r_proto='$sethostent_r_proto'
22929 setlocale_r_proto='$setlocale_r_proto'
22930 setnetent_r_proto='$setnetent_r_proto'
22931 setprotoent_r_proto='$setprotoent_r_proto'
22932 setpwent_r_proto='$setpwent_r_proto'
22933 setservent_r_proto='$setservent_r_proto'
22936 sharpbang='$sharpbang'
22937 shmattype='$shmattype'
22938 shortsize='$shortsize'
22941 sig_count='$sig_count'
22942 sig_name='$sig_name'
22943 sig_name_init='$sig_name_init'
22945 sig_num_init='$sig_num_init'
22946 sig_size='$sig_size'
22947 signal_t='$signal_t'
22948 sitearch='$sitearch'
22949 sitearchexp='$sitearchexp'
22951 sitebinexp='$sitebinexp'
22952 sitehtml1dir='$sitehtml1dir'
22953 sitehtml1direxp='$sitehtml1direxp'
22954 sitehtml3dir='$sitehtml3dir'
22955 sitehtml3direxp='$sitehtml3direxp'
22957 sitelib_stem='$sitelib_stem'
22958 sitelibexp='$sitelibexp'
22959 siteman1dir='$siteman1dir'
22960 siteman1direxp='$siteman1direxp'
22961 siteman3dir='$siteman3dir'
22962 siteman3direxp='$siteman3direxp'
22963 siteprefix='$siteprefix'
22964 siteprefixexp='$siteprefixexp'
22965 sitescript='$sitescript'
22966 sitescriptexp='$sitescriptexp'
22967 sizesize='$sizesize'
22968 sizetype='$sizetype'
22972 sockethdr='$sockethdr'
22973 socketlib='$socketlib'
22974 socksizetype='$socksizetype'
22976 spackage='$spackage'
22977 spitshell='$spitshell'
22978 srand48_r_proto='$srand48_r_proto'
22979 srandom_r_proto='$srandom_r_proto'
22981 ssizetype='$ssizetype'
22982 startperl='$startperl'
22984 static_ext='$static_ext'
22986 stdio_base='$stdio_base'
22987 stdio_bufsiz='$stdio_bufsiz'
22988 stdio_cnt='$stdio_cnt'
22989 stdio_filbuf='$stdio_filbuf'
22990 stdio_ptr='$stdio_ptr'
22991 stdio_stream_array='$stdio_stream_array'
22992 strerror_r_proto='$strerror_r_proto'
22995 subversion='$subversion'
22999 targetarch='$targetarch'
23003 timeincl='$timeincl'
23004 timetype='$timetype'
23005 tmpnam_r_proto='$tmpnam_r_proto'
23011 ttyname_r_proto='$ttyname_r_proto'
23020 uidformat='$uidformat'
23026 uquadtype='$uquadtype'
23027 use5005threads='$use5005threads'
23028 use64bitall='$use64bitall'
23029 use64bitint='$use64bitint'
23030 usecrosscompile='$usecrosscompile'
23032 usedtrace='$usedtrace'
23033 usefaststdio='$usefaststdio'
23034 useithreads='$useithreads'
23035 uselargefiles='$uselargefiles'
23036 uselongdouble='$uselongdouble'
23037 usemallocwrap='$usemallocwrap'
23038 usemorebits='$usemorebits'
23039 usemultiplicity='$usemultiplicity'
23040 usemymalloc='$usemymalloc'
23042 useopcode='$useopcode'
23043 useperlio='$useperlio'
23044 useposix='$useposix'
23045 usereentrant='$usereentrant'
23046 userelocatableinc='$userelocatableinc'
23048 useshrplib='$useshrplib'
23049 usesitecustomize='$usesitecustomize'
23050 usesocks='$usesocks'
23051 usethreads='$usethreads'
23052 usevendorprefix='$usevendorprefix'
23053 usevfork='$usevfork'
23056 uvXUformat='$uvXUformat'
23057 uvoformat='$uvoformat'
23060 uvuformat='$uvuformat'
23061 uvxformat='$uvxformat'
23062 vendorarch='$vendorarch'
23063 vendorarchexp='$vendorarchexp'
23064 vendorbin='$vendorbin'
23065 vendorbinexp='$vendorbinexp'
23066 vendorhtml1dir='$vendorhtml1dir'
23067 vendorhtml1direxp='$vendorhtml1direxp'
23068 vendorhtml3dir='$vendorhtml3dir'
23069 vendorhtml3direxp='$vendorhtml3direxp'
23070 vendorlib='$vendorlib'
23071 vendorlib_stem='$vendorlib_stem'
23072 vendorlibexp='$vendorlibexp'
23073 vendorman1dir='$vendorman1dir'
23074 vendorman1direxp='$vendorman1direxp'
23075 vendorman3dir='$vendorman3dir'
23076 vendorman3direxp='$vendorman3direxp'
23077 vendorprefix='$vendorprefix'
23078 vendorprefixexp='$vendorprefixexp'
23079 vendorscript='$vendorscript'
23080 vendorscriptexp='$vendorscriptexp'
23082 version_patchlevel_string='$version_patchlevel_string'
23083 versiononly='$versiononly'
23085 voidflags='$voidflags'
23088 yaccflags='$yaccflags'
23093 : Add in command line options if available
23094 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
23096 : add special variables
23097 $test -f $src/patchlevel.h && \
23098 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
23099 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
23100 echo "PERL_CONFIG_SH=true" >>config.sh
23102 : propagate old symbols
23103 if $test -f UU/config.sh; then
23104 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
23105 $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \
23106 config.sh config.sh UU/oldconfig.sh |\
23107 $sort | $uniq -u >UU/oldsyms
23108 set X `cat UU/oldsyms`
23114 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
23116 echo ": Variables propagated from previous config.sh file." >>config.sh
23117 for sym in `cat UU/oldsyms`; do
23118 echo " Propagating $hint variable "'$'"$sym..."
23119 eval 'tmp="$'"${sym}"'"'
23121 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
23127 : Finish up by extracting the .SH files
23131 echo "Extraction done."
23141 If you'd like to make any changes to the config.sh file before I begin
23142 to configure things, do it as a shell escape now (e.g. !vi config.sh).
23145 rp="Press return or use a shell escape to edit config.sh:"
23150 *) : in case they cannot read
23151 sh 1>&4 -c "$ans";;
23156 : if this fails, just run all the .SH files by hand
23165 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
23172 Now you need to generate make dependencies by running "$make depend".
23173 You might prefer to run it in background: "$make depend > makedepend.out &"
23174 It can take a while, so you might not want to run it right now.
23179 rp="Run $make depend now?"
23183 $make depend && echo "Now you must run '$make'."
23186 echo "You must run '$make depend' then '$make'."
23189 elif test -f [Mm]akefile; then
23191 echo "Now you must run a $make."
23193 echo "Configure done."
23196 if $test -f Policy.sh; then
23199 If you compile $package on a different machine or from a different object
23200 directory, copy the Policy.sh file from this object directory to the
23201 new one before you run Configure -- this will help you with most of
23202 the policy defaults.
23206 if $test -f config.msg; then
23207 echo "Hmm. I also noted the following information while running:"
23209 $cat config.msg >&4
23212 $rm -f kit*isdone ark*isdone