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 by the tool
15 # called "metaconfig". Rather than working with this copy of Configure,
16 # you may wish to get metaconfig. Perl uses a modified version of this
17 # tool, available in the "dist" folder in the checkout of the git repo
18 # $ git clone git://perl5.git.perl.org/metaconfig.git metaconfig
19 # The original dist package (including metaconfig) is available via SVN:
20 # $ svn co https://svn.code.sf.net/p/dist/code/trunk/dist
22 # Though this script was generated by metaconfig from metaunits, it is
23 # OK to send patches against Configure itself. It's up to the Configure
24 # pumpkin to backport the patch to the metaunits if it is accepted.
25 # For more information on patching Configure, see pod/perlhack.pod
27 # The metaunits are also available from the public git repository:
28 # http://perl5.git.perl.org/metaconfig.git/ or
29 # $ git clone git://perl5.git.perl.org/metaconfig.git metaconfig
31 # See Porting/pumpkin.pod for more information on metaconfig.
33 # Generated using [metaconfig 3.5 PL0]
34 # (with additional metaconfig patches by perlbug@perl.org)
39 SCO csh still thinks true is false. Write to SCO today and tell them that next
40 year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
42 (Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
43 we'd have to do is go in and swap the && and || tokens, wherever they are.)
45 [End of diatribe. We now return you to your regularly scheduled programming...]
49 OOPS! You naughty creature! You didn't run Configure with sh!
50 I will attempt to remedy the situation by running sh for you...
54 true || exec sh $0 $argv:q
56 (exit $?0) || cat c2$$
57 (exit $?0) || exec sh $0 $argv:q
60 if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
63 *** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do
64 *** Configure that well. (Plan 9 is close to UNIX but not close enough.)
65 *** Please read the README.plan9 for further instructions.
66 *** Cannot continue, aborting.
72 if test ! -c /dev/null ; then
75 *** I'm sorry, but /dev/null appears to be a file rather than a device.
76 *** Please consult your operating sytem's notes for making a device
78 *** Cannot continue, aborting.
84 : compute my invocation name
88 me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
93 : Proper separator for the PATH environment variable
95 : On OS/2 this directory should exist if this is not floppy only system ":-]"
96 if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' 2>&1 ) 2>&1 >/dev/null ; then
97 if test -n "$OS2_SHELL"; then
99 PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
100 OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
102 elif test -n "$DJGPP"; then
103 case "X${MACHTYPE:-nonesuchmach}" in
110 : Proper PATH setting
111 paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
112 paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
113 paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
114 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
115 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
116 paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
117 paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
118 paths="$paths /sbin /usr/sbin /usr/libexec"
119 paths="$paths /system/gnu_library/bin"
123 case "$p_$PATH$p_" in
125 *) test -d $p && PATH=$PATH$p_$p ;;
132 : shall we be using ksh?
138 if (PATH=.; alias -x) >/dev/null 2>&1; then
141 if test -f /hp-ux -a -f /bin/ksh; then
142 needksh='to avoid sh bug in "here document" expansion'
144 if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
145 if test X`/usr/bin/uname -v` = X4; then
146 avoidksh="to avoid AIX 4's /bin/sh"
150 if test -f /osf_boot -a -f /usr/sbin/setld; then
151 if test X`/usr/bin/uname -s` = XOSF1; then
152 avoidksh="to avoid Digital UNIX' ksh"
157 case "$inksh/$needksh" in
164 case "$inksh/$avoidksh" in
170 case "$inksh/$needksh-$avoidksh-" in
173 (I see you are using the Korn shell. Some ksh's blow up on $me,
174 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
181 echo "(Feeding myself to $newsh $reason.)"
183 Configure|*/Configure) exec $newsh $0 "$@";;
184 *) exec $newsh Configure "$@";;
188 test -x "${newsh}" || unset newsh
190 : if needed, set CDPATH to a harmless value that is not chatty
191 : avoid bash 2.02 problems with empty CDPATH.
195 *bash*) CDPATH='.' ;;
201 : Configure runs within the UU subdirectory
202 test -d UU || mkdir UU
346 useversionedarchname=''
352 initialinstalllocation=''
384 d_attribute_deprecated=''
385 d_attribute_format=''
386 d_attribute_malloc=''
387 d_attribute_nonnull=''
388 d_attribute_noreturn=''
390 d_attribute_unused=''
391 d_attribute_warn_unused_result=''
392 d_printf_format_null=''
396 d_builtin_choose_expr=''
399 d_c99_variadic_macros=''
449 endhostent_r_proto=''
455 endprotoent_r_proto=''
461 endservent_r_proto=''
526 gethostbyaddr_r_proto=''
528 gethostbyname_r_proto=''
530 gethostent_r_proto=''
543 getnetbyaddr_r_proto=''
545 getnetbyname_r_proto=''
559 d_getprotobyname_r=''
560 getprotobyname_r_proto=''
561 d_getprotobynumber_r=''
562 getprotobynumber_r_proto=''
564 getprotoent_r_proto=''
576 getservbyname_r_proto=''
578 getservbyport_r_proto=''
580 getservent_r_proto=''
613 d_lc_monetary_2008=''
618 d_libm_lib_version=''
623 d_localtime_r_needs_tzset=''
641 d_malloc_good_size=''
689 d_old_pthread_create_joinable=''
690 old_pthread_create_joinable=''
692 d_pthread_attr_setscope=''
740 sethostent_r_proto=''
757 setprotoent_r_proto=''
769 setservent_r_proto=''
791 d_ipv6_mreq_source=''
808 d_sprintf_returns_strlen=''
821 perl_static_inline=''
826 d_stdio_ptr_lval_nochange_cnt=''
827 d_stdio_ptr_lval_sets_cnt=''
979 d_gdbm_ndbm_h_uses_prototypes=''
980 d_gdbmndbm_h_uses_prototypes=''
982 d_ndbm_h_uses_prototypes=''
1058 d_inc_version_list=''
1060 inc_version_list_init=''
1064 installusrbinperl=''
1080 ignore_versioned_solibs=''
1141 d_perl_otherlibdirs=''
1149 api_versionstring=''
1155 version_patchlevel_string=''
1159 d_nv_preserves_uv=''
1160 d_nv_zero_is_allbits_zero=''
1171 nv_overflows_integers_at=''
1172 nv_preserves_uv_bits=''
1245 installsitehtml1dir=''
1248 installsitehtml3dir=''
1255 installsiteman1dir=''
1258 installsiteman3dir=''
1263 installsitescript=''
1281 d_stdio_stream_array=''
1282 stdio_stream_array=''
1300 usekernprocpathname=''
1301 ccflags_uselargefiles=''
1302 ldflags_uselargefiles=''
1303 libswanted_uselargefiles=''
1312 usensgetexecutablepath=''
1326 installvendorarch=''
1333 installvendorhtml1dir=''
1335 vendorhtml1direxp=''
1336 installvendorhtml3dir=''
1338 vendorhtml3direxp=''
1344 installvendorman1dir=''
1347 installvendorman3dir=''
1354 installvendorscript=''
1365 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1368 : We must find out about Eunice early
1370 if test -f /etc/unixtovms; then
1371 eunicefix=/etc/unixtovms
1373 if test -f /etc/unixtovms.exe; then
1374 eunicefix=/etc/unixtovms.exe
1377 : Set executable suffix now -- needed before hints available
1378 if test -f "/libs/version.library"; then
1381 elif test -f "/system/gnu_library/bin/ar.pm"; then
1384 elif test -n "$DJGPP"; then
1387 elif test -f /kern/cookiejar; then
1390 elif test -d c:/. -o -n "$is_os2" ; then
1397 : Trailing extension. Override this in a hint file, if needed.
1398 : Extra object files, if any, needed on this platform.
1401 : Possible local include directories to search.
1402 : Set locincpth to "" in a hint file to defeat local include searches.
1403 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1404 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1406 : no include file wanted by default
1409 : Enable -DEBUGGING and -DDEBUGGING from the command line
1414 : change the next line if compiling for Xenix/286 on Xenix/386
1415 xlibpth='/usr/lib/386 /lib/386'
1416 : Possible local library directories to search.
1417 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1418 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1420 : general looking path for locating libraries
1421 glibpth="/lib /usr/lib $xlibpth"
1422 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1423 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1424 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1425 test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
1427 : Private path used by Configure to find libraries. Its value
1428 : is prepended to libpth. This variable takes care of special
1429 : machines, like the mips. Usually, it should be empty.
1432 : default library list
1434 : some systems want to use only the non-versioned libso:s
1435 ignore_versioned_solibs=''
1436 : set usethreads on the Configure command line to enable threads.
1437 usereentrant='undef'
1441 : set useposix=false in your hint file to disable the POSIX extension.
1443 : set useopcode=false in your hint file to disable the Opcode extension.
1446 ccflags_uselargefiles=''
1447 ldflags_uselargefiles=''
1448 libswanted_uselargefiles=''
1449 : set usemultiplicity on the Configure command line to enable multiplicity.
1450 : set usesocks on the Configure command line to enable socks.
1451 : List of libraries we want.
1452 : If anyone needs extra -lxxx, put those in a hint file.
1453 libswanted="cl pthread socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld"
1454 libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
1455 : We probably want to search /usr/shlib before most other libraries.
1456 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1457 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1458 glibpth="/usr/shlib $glibpth"
1459 : Do not use vfork unless overridden by a hint file.
1462 : Find the basic shell for Bourne shell scripts
1466 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1469 if test -f "$xxx"; then
1472 : Build up a list and do a single loop so we can 'break' out.
1473 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1474 for xxx in sh bash ksh pdksh ash; do
1476 try="$try ${p}/${xxx}"
1480 if test -f "$xxx"; then
1483 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1486 elif test -f "$xxx.exe"; then
1497 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1499 Usually it's in /bin/sh. How did you even get this far?
1500 Please contact me (Perl Maintainers) at perlbug@perl.org and
1501 we'll try to straighten this all out.
1507 : When cross-compiling we need to separate the sh-to-run-Configure-with from the sh-to-use-in-Perl
1508 : default both to the same thing, cross-compilers can then set targetsh differently if they like
1511 : see if sh knows # comments
1512 if `$sh -c '#' >/dev/null 2>&1`; then
1516 test -f $xcat$_exe || xcat=/usr/bin/cat
1517 if test ! -f $xcat$_exe; then
1518 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1519 if test -f $p/cat$_exe; then
1524 if test ! -f $xcat$_exe; then
1525 echo "Can't find cat anywhere!"
1529 echo "#!$xcat" >sharp
1532 ./sharp > today 2>/dev/null
1533 if test -s today; then
1536 echo "#! $xcat" > sharp
1539 ./sharp > today 2>/dev/null
1540 if test -s today; then
1548 echo "Your $sh doesn't grok # comments--I will strip them later on."
1551 echo "exec grep -v '^[ ]*#'" >spitshell
1553 $eunicefix spitshell
1554 spitshell=`pwd`/spitshell
1556 echo "I presume that if # doesn't work, #! won't work either!"
1561 : figure out how to guarantee sh startup
1563 '') startsh=${sharpbang}${sh} ;;
1575 : echo "Yup, it does."
1577 echo "Hmm... '$startsh' does not guarantee sh startup..."
1578 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1582 : Save command line options in file UU/cmdline.opt for later use in
1583 : generating config.sh.
1584 cat > cmdline.opt <<EOSH
1585 : Configure command line arguments.
1594 cat >>cmdline.opt <<EOSH
1595 config_arg$argn='$arg'
1597 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1600 arg_exp=`cat cmdl.opt`
1601 args_exp="$args_exp$args_sep'$arg_exp'"
1602 argn=`expr $argn + 1`
1607 : produce awk script to parse command line options
1608 cat >options.awk <<'EOF'
1610 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1612 len = length(optstr);
1613 for (i = 1; i <= len; i++) {
1614 c = substr(optstr, i, 1);
1615 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1626 if (substr(str, 1, 1) != "-") {
1627 printf("'%s'\n", str);
1631 for (i = 2; i <= len; i++) {
1632 c = substr(str, i, 1);
1634 printf("-%s\n", substr(str, i));
1640 printf("'%s'\n", substr(str, i + 1));
1653 : process the command line options
1654 set X `for arg in "$@"; do echo "X$arg"; done |
1655 sed -e s/X// | awk -f options.awk`
1660 : set up default values
1670 rm -f optdef.sh posthint.sh
1671 cat >optdef.sh <<EOS
1677 while test $# -gt 0; do
1679 -d) shift; fastread=yes;;
1680 -e) shift; alldone=cont;;
1684 if test -r "$1"; then
1687 echo "$me: cannot read config file $1." >&2
1693 -h) shift; error=true;;
1694 -r) shift; reuseval=true;;
1695 -s) shift; silent=true; realsilent=true;;
1696 -E) shift; alldone=exit;;
1697 -K) shift; knowitall=true;;
1698 -O) shift; override=true;;
1699 -S) shift; silent=true; extractsh=true;;
1704 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1705 echo "$me: ignoring -D $1" >&2
1708 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1709 *) echo "$1='define'" >> optdef.sh;;
1716 *=) echo "$1" >> optdef.sh;;
1718 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1719 echo "$me: ignoring -U $1" >&2
1721 *) echo "$1='undef'" >> optdef.sh;;
1732 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
1736 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
1737 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1743 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1744 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1745 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1746 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1747 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1748 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
1754 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1756 echo "$yyy=''" >> posthint.sh ;;
1761 echo "$yyy='$zzz'" >> posthint.sh ;;
1763 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1765 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1770 echo "$yyy=$zzz" >> posthint.sh ;;
1771 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1775 -V) echo "$me generated by metaconfig 3.5 PL0." >&2
1778 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1786 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1787 [-U symbol] [-U symbol=] [-A command:symbol...]
1788 -d : use defaults for all answers.
1789 -e : go on without questioning past the production of config.sh.
1790 -f : specify an alternate default configuration file.
1791 -h : print this help message and exit (with an error status).
1792 -r : reuse C symbols value if possible (skips costly nm extraction).
1793 -s : silent mode, only echoes questions and essential information.
1794 -D : define symbol to have some value:
1795 -D symbol symbol gets the value 'define'
1796 -D symbol=value symbol gets the value 'value'
1797 common used examples (see INSTALL for more info):
1798 -Duse64bitint use 64bit integers
1799 -Duse64bitall use 64bit integers and pointers
1800 -Dusethreads use thread support
1801 -Dinc_version_list=none do not include older perl trees in @INC
1802 -DEBUGGING=none DEBUGGING options
1803 -Dcc=gcc choose your compiler
1804 -Dprefix=/opt/perl5 choose your destination
1805 -E : stop at the end of questions, after having produced config.sh.
1806 -K : do not use unless you know what you are doing.
1807 -O : let -D and -U override definitions from loaded configuration file.
1808 -S : perform variable substitutions on all .SH files (can mix with -f)
1809 -U : undefine symbol:
1810 -U symbol symbol gets the value 'undef'
1811 -U symbol= symbol gets completely empty
1813 -A : manipulate symbol after the platform specific hints have been applied:
1814 -A append:symbol=value append value to symbol
1815 -A symbol=value like append:, but with a separating space
1816 -A define:symbol=value define symbol to have value
1817 -A clear:symbol define symbol to be ''
1818 -A define:symbol define symbol to be 'define'
1819 -A eval:symbol=value define symbol to be eval of value
1820 -A prepend:symbol=value prepend value to symbol
1821 -A undef:symbol define symbol to be 'undef'
1822 -A undef:symbol= define symbol to be ''
1823 e.g.: -A prepend:libswanted='cl pthread '
1824 -A ccflags=-DSOME_MACRO
1825 -V : print version number and exit (with a zero status).
1832 case "$fastread$alldone" in
1835 case "$extractsh" in
1838 if test ! -t 0; then
1839 echo "Say 'sh Configure', not 'sh <Configure'"
1849 true) exec 1>/dev/null;;
1852 : run the defines and the undefines, if any, but leave the file out there...
1855 : create the posthint manipulation script and leave the file out there...
1860 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1861 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1862 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1863 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1864 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1867 : Some greps do not return status, grrr.
1868 echo "grimblepritz" >grimble
1869 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1871 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1877 : the following should work in any shell
1881 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1882 cat >contains <<'EOSS'
1883 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1888 : Find the path to the source tree
1891 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1895 *) src=`cd ../$src && pwd` ;;
1908 if test -f $rsrc/Configure && \
1909 $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
1911 : found it, so we are ok.
1914 for src in . .. ../.. ../../.. ../../../..; do
1915 if test -f ../$src/Configure && \
1916 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1927 Sorry, I can't seem to locate the source dir for $package. Please start
1928 Configure with an explicit path -- i.e. /some/path/Configure.
1936 echo "Sources for $package found in \"$src\"." >&4
1940 : script used to extract .SH files with variable substitutions
1941 cat >extract <<'EOS'
1943 echo "Doing variable substitutions on .SH files..."
1944 if test -f MANIFEST; then
1945 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1947 echo "(Looking for .SH files under the source directory.)"
1948 set x `(cd "$src"; find . -name "*.SH" -print)`
1952 0) set x `(cd "$src"; echo *.SH)`; shift;;
1954 if test ! -f "$src/$1"; then
1960 while test $name; do
1961 if test ! -d "$name"; then
1962 create="$name $create";
1963 name=`echo $name | sed -e "s|^[^/]*$||"`;
1964 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1969 for file in $create; do
1978 dir=`expr X$file : 'X\(.*\)/'`
1979 file=`expr X$file : 'X.*/\(.*\)'`
1980 (cd "$dir" && . ./$file)
1990 dir=`expr X$file : 'X\(.*\)/'`
1991 file=`expr X$file : 'X.*/\(.*\)'`
1992 (set x $dir; shift; eval $mkdir_p)
1993 sh <"$src/$dir/$file"
2002 if test -f "$src/config_h.SH"; then
2003 if test ! -f config.h; then
2004 : oops, they left it out of MANIFEST, probably, so do it anyway.
2005 . "$src/config_h.SH"
2010 : extract files and exit if asked to do so
2011 case "$extractsh" in
2013 case "$realsilent" in
2017 case "$config_sh" in
2018 '') config_sh='config.sh';;
2021 echo "Fetching answers from $config_sh..."
2024 test "$override" && . ./optdef.sh
2028 echo "Extraction done."
2033 : Eunice requires " " instead of "", can you believe it
2036 echo "Beginning of configuration questions for $package."
2038 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
2040 : first determine how to suppress newline on echo command
2042 echo "Checking echo to see how to suppress newlines..."
2043 (echo "hi there\c" ; echo " ") >.echotmp
2044 if $contains c .echotmp >/dev/null 2>&1 ; then
2055 echo $n "The star should be here-->$c"
2059 : Now test for existence of everything in MANIFEST
2061 if test -f "$rsrc/MANIFEST"; then
2062 echo "First let's make sure your kit is complete. Checking..." >&4
2063 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
2064 (split -l 50 2>/dev/null || split -50)
2067 for filelist in x??; do
2068 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
2069 >/dev/null 2>>"$tmppwd/missing")
2071 if test -s missing; then
2075 THIS PACKAGE SEEMS TO BE INCOMPLETE.
2077 You have the option of continuing the configuration process, despite the
2078 distinct possibility that your kit is damaged, by typing 'y'es. If you
2079 do, don't blame me if something goes wrong. I advise you to type 'n'o
2080 and contact the author (perlbug@perl.org).
2083 echo $n "Continue? [n] $c" >&4
2087 echo "Continuing..." >&4
2091 echo "ABORTING..." >&4
2096 echo "Looks good..."
2099 echo "There is no MANIFEST file. I hope your kit is complete !"
2103 : Find the appropriate value for a newline for tr
2105 if test -n "$DJGPP"; then
2108 if test X"$trnl" = X; then
2109 case "`echo foo|tr '\n' x 2>/dev/null`" in
2113 if test X"$trnl" = X; then
2114 case "`echo foo|tr '\012' x 2>/dev/null`" in
2115 foox) trnl='\012' ;;
2118 if test X"$trnl" = X; then
2119 case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
2120 fooxy) trnl='\n\r' ;;
2123 if test X"$trnl" = X; then
2126 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
2132 : compute the number of columns on the terminal for proper question formatting
2137 : set up the echo used in my read
2138 myecho="case \"\$xxxm\" in
2139 '') echo $n \"\$rp $c\" >&4;;
2141 '') echo $n \"[\$xxxm] $c\";;
2143 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
2145 echo $n \"[\$xxxm] $c\" >&4
2147 echo $n \"\$rp [\$xxxm] $c\" >&4
2153 : now set up to do reads with possible shell escape and default assignment
2159 case "\$fastread" in
2160 yes) case "\$dflt" in
2163 case "\$silent-\$rp" in
2168 *) case "\$silent" in
2169 true) case "\$rp" in
2174 while expr "X\$ans" : "X!" >/dev/null; do
2178 aok=''; eval "ans=\\"\$answ\\"" && aok=y
2186 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
2195 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
2200 echo "(OK, I'll run with -d after this question.)" >&4
2203 echo "*** Sorry, \$1 not supported yet." >&4
2213 echo "*** Substitution done -- please confirm."
2215 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
2220 echo "*** Error -- try again."
2227 case "\$ans\$xxxm\$nostick" in
2239 : create .config dir to save info across Configure sessions
2240 test -d ../.config || mkdir ../.config
2241 cat >../.config/README <<EOF
2242 This directory created by Configure to save information that should
2243 persist across sessions for $package.
2245 You may safely delete it if you wish.
2248 : See if we are using a devel version and want that
2249 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
2252 usedevel="$define" ;;
2253 *) case "$xversion" in
2256 *** WHOA THERE!!! ***
2258 This is an UNSTABLE DEVELOPMENT release.
2259 The version of this $package distribution is $xversion, that is, odd,
2260 (as opposed to even) and that signifies a development release.
2261 If you want a maintenance release, you want an even-numbered version.
2263 Do ***NOT*** install this into production use.
2264 Data corruption and crashes are possible.
2266 It is most seriously suggested that you do not continue any further
2267 unless you want to help in developing and debugging Perl.
2269 If you *still* want to build perl, you can answer 'y' now,
2270 or pass -Dusedevel to Configure.
2273 rp='Do you really want to continue?'
2277 [yY]) echo >&4 "Okay, continuing."
2278 usedevel="$define" ;;
2279 *) echo >&4 "Okay, bye."
2290 case "$versiononly" in
2291 '') versiononly="$define" ;;
2293 case "$installusrbinperl" in
2294 '') installusrbinperl="$undef" ;;
2299 : general instructions
2302 user=`(logname) 2>/dev/null`
2304 '') user=`whoami 2>&1`;;
2306 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2309 rp='Would you like to see the instructions?'
2320 This installation shell script will examine your system and ask you questions
2321 to determine how the perl5 package should be installed. If you get
2322 stuck on a question, you may use a ! shell escape to start a subshell or
2323 execute a command. Many of the questions will have default answers in square
2324 brackets; typing carriage return will give you the default.
2326 On some of the questions which ask for file or directory names you are allowed
2327 to use the ~name construct to specify the login directory belonging to "name",
2328 even if you don't have a shell which knows about that. Questions where this is
2329 allowed will be marked "(~name ok)".
2333 dflt='Type carriage return to continue'
2337 The prompter used in this script allows you to use shell variables and
2338 backticks in your answers. You may use $1, $2, etc... to refer to the words
2339 in the default answer, as if the default line was a set of arguments given to a
2340 script shell. This means you may also use $* to repeat the whole default line,
2341 so you do not have to re-type everything to add something to the default.
2343 Every time there is a substitution, you will have to confirm. If there is an
2344 error (e.g. an unmatched backtick), the default answer will remain unchanged
2345 and you will be prompted again.
2347 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2348 the questions and use the computed defaults (or the previous answers if there
2349 was already a config.sh file). Type 'Configure -h' for a list of options.
2350 You may also start interactively and then answer '& -d' at any prompt to turn
2351 on the non-interactive behaviour for the remainder of the execution.
2357 Much effort has been expended to ensure that this shell script will run on any
2358 Unix system. If despite that it blows up on yours, your best bet is to edit
2359 Configure and run it again. If you can't run Configure for some reason,
2360 you'll have to generate a config.sh file by hand. Whatever problems you
2361 have, let me (perlbug@perl.org) know how I blew it.
2363 This installation script affects things in two ways:
2365 1) it may do direct variable substitutions on some of the files included
2367 2) it builds a config.h file for inclusion in C programs. You may edit
2368 any of these files as the need arises after running this script.
2370 If you make a mistake on a question, there is no easy way to back up to it
2371 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2372 files. Configure will offer to let you do this before it runs the SH files.
2375 dflt='Type carriage return to continue'
2377 case "$firsttime" in
2378 true) echo $user >>../.config/instruct;;
2382 : Set 'sysroot' to change the logical root directory to your headers and libraries see man gcc
2383 : This is primarily meant for cross-compile environments, and may fail to be useful in other cases
2384 if test "X$sysroot" = X; then
2389 echo "Using $sysroot to find your headers and libraries, adding to ccflags"
2390 # _sysroot is used in places where we need --sysroot=foo
2391 # but using the rest of the flags could cause issues.
2392 _sysroot="--sysroot=$sysroot";
2396 ccflags="$ccflags $_sysroot"
2401 ldflags="$ldflags $_sysroot"
2406 cppflags="$cppflags $_sysroot"
2408 # lddlflags updated below in lddlflags section;
2409 # same with cccdlflags
2413 # Adjust some defaults to also use $sysroot
2414 for var in xlibpth loclibpth locincpth glibpth; do
2417 for path in $xxx; do
2418 eval $var=\"\$$var $sysroot$path\"
2424 : find out where common programs are
2426 echo "Locating common programs..." >&4
2439 if test -d \$dir/\$thing; then
2445 for thisthing in \$dir/\$thing; do
2446 : just loop through to pick last item
2448 if test -f \$thisthing; then
2451 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2454 elif test -f \$dir/\$thing.exe; then
2455 if test -n "$DJGPP"; then
2456 echo \$dir/\$thing.exe
2457 elif test "$eunicefix" != ":"; then
2458 : on Eunice apparently
2511 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2512 pth="$pth $sysroot/lib $sysroot/usr/lib"
2513 for file in $loclist; do
2517 if test -f "$xxx"; then
2520 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2521 xxx=`./loc $file $file $pth`
2524 '') xxx=`./loc $file $file $pth`;;
2525 *) xxx=`./loc $xxx $xxx $pth`;;
2527 eval $file=$xxx$_exe
2531 echo $file is in $xxx.
2534 echo $file is in $xxx.
2537 echo "I don't know where '$file' is, and my life depends on it." >&4
2538 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2544 echo "Don't worry if any of the following aren't found..."
2546 for file in $trylist; do
2550 if test -f "$xxx"; then
2553 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2554 xxx=`./loc $file $file $pth`
2557 '') xxx=`./loc $file $file $pth`;;
2558 *) xxx=`./loc $xxx $xxx $pth`;;
2560 eval $file=$xxx$_exe
2564 echo $file is in $xxx.
2567 echo $file is in $xxx.
2570 echo "I don't see $file out there, $say."
2577 echo "Substituting grep for egrep."
2584 *) if $less -R </dev/null >/dev/null 2>&1; then
2585 echo "Substituting less -R for less."
2593 echo "Substituting cp for ln."
2602 echo "I can't find make or gmake, and my life depends on it." >&4
2603 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2611 *) # We can't have osname yet.
2612 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2613 # Assume that gmake, if found, is definitely GNU make
2614 # and prefer it over the system make.
2615 echo "Substituting gmake for make."
2623 echo "Hopefully test is built into your sh."
2626 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2627 echo "Using the test built into your sh."
2635 echo "Hopefully echo is built into your sh."
2640 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2641 $echo $n "hi there$c" >foo1
2642 echo $n "hi there$c" >foo2
2643 if cmp foo1 foo2 >/dev/null 2>&1; then
2644 echo "They are compatible. In fact, they may be identical."
2651 They are not compatible! You are probably running ksh on a non-USG system.
2652 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2653 have echo built in and we may have to run some Bourne shell scripts. That
2654 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2657 $echo $n "The star should be here-->$c"
2664 # This question was auctioned at YAPC::Europe-2007 in Vienna
2665 # I never promised you could answer it. I only auctioned the question.
2667 The following message is sponsored by
2669 Dresden.pm<--The stars should be here.
2671 Dear Perl user, system administrator or package
2672 maintainer, the Perl community sends greetings to
2673 you. Do you (emblematical) greet back [Y/n]? n
2677 : Check what type of C compiler we use
2681 cat <<'EOSC' >>trygcc
2686 int main(int argc, char *argv[]) {
2690 if $cc -o try $ccflags $ldflags try.c; then
2693 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2699 # Skip this test because it gives a false match on output like:
2700 # ./trygcc: line 23: cc: command not found
2701 # case "`$cc -v -c try.c 2>&1`" in
2702 # *gcc*) trygcc=no ;;
2704 if $test X"$trygcc" = Xyes; then
2705 if gcc -o try -c try.c; then
2707 echo "You seem to have a working gcc, though." >&4
2708 # Switching compilers may undo the work of hints files.
2709 # The most common problem is -D_REENTRANT for threads.
2710 # This heuristic catches that case, but gets false positives
2711 # if -Dusethreads was not actually specified. Better to
2712 # bail out here with a useful message than fail
2713 # mysteriously later. Should we perhaps just try to
2714 # re-invoke Configure -Dcc=gcc config_args ?
2715 if $test -f usethreads.cbu; then
2718 *** However, any setting of the C compiler flags (e.g. for thread support)
2719 *** will be lost. It may be necessary for you to restart Configure and
2720 *** add -Dcc=gcc to your Configure command line.
2723 rp="Would you like to go ahead and try gcc anyway?"
2726 rp="Would you like to use it?"
2729 if $test -f myread; then
2732 if $test -f UU/myread; then
2735 echo "Cannot find myread, sorry. Aborting." >&2
2740 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2753 cat <<'EOSC' >>checkcc
2758 int main(int argc, char *argv[]) {
2762 if $cc -o try $ccflags $ldflags try.c; then
2765 if $test X"$despair" = Xyes; then
2766 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2769 You need to find a working C compiler.
2770 Either (purchase and) install the C compiler supplied by your OS vendor,
2771 or for a free C compiler try http://gcc.gnu.org/
2772 I cannot continue any further, aborting.
2781 : determine whether symbolic links are supported
2784 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2785 echo "Symbolic links are supported." >&4
2788 echo "Symbolic links are NOT supported." >&4
2793 : determine whether symbolic links are supported
2797 echo "Checking how to test for symbolic links..." >&4
2799 if $test "X$issymlink" = X; then
2801 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2802 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2804 if test $? = 0; then
2807 echo "Your builtin 'test -h' may be broken." >&4
2810 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2813 if test -f "$p/$test"; then
2822 echo "Trying external '$test -h'." >&4
2823 issymlink="$test -h"
2824 if $test ! -h sym >/dev/null 2>&1; then
2825 echo "External '$test -h' is broken, too." >&4
2833 if $test "X$issymlink" = X; then
2834 if $test -L sym 2>/dev/null; then
2835 issymlink="$test -L"
2836 echo "The builtin '$test -L' worked." >&4
2839 if $test "X$issymlink" != X; then
2840 echo "You can test for symbolic links with '$issymlink'." >&4
2842 echo "I do not know how you can test for symbolic links." >&4
2846 *) echo "No symbolic links, so not testing for their testing..." >&4
2851 : Make symlinks util
2852 case "$mksymlinks" in
2855 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2858 *) case "$lns:$issymlink" in
2859 *"ln"*" -s:"*"test -"?)
2860 echo "Creating the symbolic links..." >&4
2862 awk '{print $1}' $src/MANIFEST | sed -e 's:/\([^/]*\)$: \1:' |
2872 print "# dir = ", dir, "file = ", file
2873 mf[dir] = mf[dir]" "source"/"dir"/"file;
2876 if (d != ".") { print("mkdir -p "d) }
2877 print("ln -sf "mf[d]" "d);
2879 }' source="$src" > UU/mksymlinks.$$
2883 if test ! -d t/base; then
2884 echo "Failed to create the subdirectories. Aborting." >&4
2888 if test ! -f t/base/lex.t; then
2889 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2892 if test ! -f win32/win32.c; then
2893 echo "Failed to create the symlinks (win32/win32.c missing). Aborting." >&4
2898 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2906 : Check for Cross-Compilation
2907 if $test "X$targethost" = "X"; then
2910 if $test "X$targetenv" = "X"; then
2913 case "$usecrosscompile" in
2915 $echo "Cross-compiling..."
2918 *-gcc*|*-g++*) # A cross-compiling gcc, probably.
2919 # arm-linux-androideabi-gcc -> arm-linux-androideabi
2920 # x86_64-w64-mingw32-gcc.exe -> x86_64-w64-mingw32
2921 targetarch=`$echo $cc|$sed 's/-g[c\+][c\+].*$//'`
2922 ar=`$echo $cc|$sed 's/-g[c\+][c\+]/-ar/'`
2923 # leave out ld, choosing it is more complex
2924 nm=`$echo $cc|$sed 's/-g[c\+][c\+]/-nm/'`
2925 ranlib=`$echo $cc|$sed 's/-g[c\+][c\+]/-ranlib/'`
2926 # We are in a weird spot. Just before us, some values
2927 # were 'saved', to be restored after the hints are
2928 # run. This means that the changes we made to ar,
2929 # nm and ranlib will get reverted.
2930 # To avoid that, we hijack the saving mechanism and
2931 # have it save our new values.
2932 for file in ar nm ranlib; do
2934 eval $file=$xxx$_exe
2939 case "$targetarch" in
2940 '') echo "Targetarch not defined." >&4; croak=y ;;
2941 *) echo "Using targetarch $targetarch." >&4 ;;
2943 case "$targethost" in
2944 '') echo "Targethost not defined." >&4; croak=y ;;
2945 *) echo "Using targethost $targethost." >&4
2950 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2952 : compile a host miniperl and generate_uudmap, unless we got passed them
2953 if $test "X$hostperl" = X; then
2954 echo "Building host miniperl and generate_uudmap binaries" >&4
2962 $src/Configure -des -Dusedevel -Dmksymlinks
2964 case "$hostgenerate" in
2965 '') $make generate_uudmap
2966 hostgenerate=$src/host/generate_uudmap
2968 "$undef") hostgenerate=''
2971 hostperl=$src/host/miniperl
2974 hostosname=`$hostperl -le 'print $^O'`
2977 usecrosscompile="$undef"
2981 : Define -Dtargethost=somecomputer to run compiled tests on another machine
2982 case "$targethost" in
2983 '') echo "Checking for cross-compile" >&4
2984 case "$usecrosscompile$multiarch" in
2985 *$define*) echo "Skipping the try tests in the rest of Configure as no targethost was defined when cross-compiling" >&4
2986 if [ -f Makefile ]; then
2988 echo "Now you must ensure config.sh, config.h and the generated headers exist and run a $make."
2990 echo "Configure done."
2994 *) echo "No targethost for running compiler tests against defined, running locally" >&4
3001 *) echo "Using targethost $targethost." >&4
3003 /*) run=$src/Cross/run
3004 targetmkdir=$src/Cross/mkdir
3006 from=$src/Cross/from
3008 *) pwd=`$test -f ../Configure & cd ..; pwd`
3010 targetmkdir=$pwd/Cross/mkdir
3012 from=$pwd/Cross/from
3015 case "$targetrun" in
3016 '') targetrun=ssh ;;
3021 case "$targetfrom" in
3022 '') targetfrom=scp ;;
3026 from=$from-$targetfrom
3027 case "$targetdir" in
3029 echo "Guessing targetdir $targetdir." >&4
3032 case "$targetuser" in
3034 echo "Guessing targetuser $targetuser." >&4
3037 case "$targetport" in
3039 echo "Guessing targetport $targetport." >&4
3042 case "$targetfrom" in
3046 case "$targetrun" in
3066 '') cwd=$targetdir ;;
3071 $targetrun -p $targetport -l $targetuser $targethost "cd \$cwd && \$env \$exe \$@"
3077 *) echo "Unknown targetrun '$targetrun'" >&4
3081 case "$targetmkdir" in
3083 cat >$targetmkdir <<EOF
3085 $targetrun -p $targetport -l $targetuser $targethost "mkdir -p \$@"
3087 $chmod a+rx $targetmkdir
3089 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
3101 $targetmkdir \`dirname \$f\`
3102 $targetto -P $targetport -r $q \$f $targetuser@$targethost:\$f 2>/dev/null || exit 1
3105 $targetmkdir $targetdir/\`dirname \$f\`
3106 $targetto -P $targetport -r $q \$f $targetuser@$targethost:$targetdir/\$f 2>/dev/null || exit 1
3119 $mkdir -p $targetdir/\`dirname \$f\`
3120 $cp \$f $targetdir/\$f || exit 1
3123 $targetmkdir $targetdir/\`dirname \$f\`
3124 $cp \$f $targetdir/\$f || exit 1
3131 *) echo "Unknown targetto '$targetto'" >&4
3135 case "$targetfrom" in
3142 $targetfrom -P $targetport $q $targetuser@$targethost:$targetdir/\$f . || exit 1
3147 cp) cat >$from <<EOF
3152 cp $targetdir/\$f . || exit 1
3157 *) echo "Unknown targetfrom '$targetfrom'" >&4
3161 if $test ! -f $run; then
3162 echo "Target 'run' script '$run' not found." >&4
3166 if $test ! -f $to; then
3167 echo "Target 'to' script '$to' not found." >&4
3171 if $test ! -f $from; then
3172 echo "Target 'from' script '$from' not found." >&4
3176 if $test ! -f $run -o ! -f $to -o ! -f $from; then
3180 Using '$run' for remote execution,
3181 and '$from' and '$to'
3182 for remote file transfer.
3188 usecrosscompile="$undef"
3193 : see whether [:lower:] and [:upper:] are supported character classes
3195 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
3197 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
3201 *) # There is a discontinuity in EBCDIC between 'R' and 'S'
3202 # (0xd9 and 0xe2), therefore that is a nice testing point.
3203 if test "X$up" = X -o "X$low" = X; then
3204 case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in
3210 if test "X$up" = X -o "X$low" = X; then
3211 case "`echo RS | $tr R-S r-s 2>/dev/null`" in
3217 if test "X$up" = X -o "X$low" = X; then
3218 case "`echo RS | od -x 2>/dev/null`" in
3220 echo "Hey, this might be EBCDIC." >&4
3221 if test "X$up" = X -o "X$low" = X; then
3222 case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
3223 rs) up='[A-IJ-RS-Z]'
3228 if test "X$up" = X -o "X$low" = X; then
3229 case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
3239 case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in
3241 echo "Using $up and $low to convert case." >&4
3244 echo "I don't know how to translate letters from upper to lower case." >&4
3245 echo "Your tr is not acting any way I know of." >&4
3249 : set up the translation script tr, must be called with ./tr of course
3253 '[A-Z][a-z]') exec $tr '$up' '$low';;
3254 '[a-z][A-Z]') exec $tr '$low' '$up';;
3261 : Try to determine whether config.sh was made on this system
3262 case "$config_sh" in
3264 myuname=`$uname -a 2>/dev/null`
3265 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
3266 # Downcase everything to avoid ambiguity.
3267 # Remove slashes and single quotes so we can use parts of this in
3268 # directory and file names.
3269 # Remove newlines so myuname is sane to use elsewhere.
3270 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
3271 # because the A-Z/a-z are not consecutive.
3272 myuname=`echo $myuname | $sed -e "s,['/],,g" | \
3273 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
3274 newmyuname="$myuname"
3276 case "$knowitall" in
3278 if test -f ../config.sh; then
3279 if $contains myuname= ../config.sh >/dev/null 2>&1; then
3280 eval "`grep myuname= ../config.sh`"
3282 if test "X$myuname" = "X$newmyuname"; then
3290 : Get old answers from old config file if Configure was run on the
3291 : same system, otherwise use the hints.
3294 if test -f config.sh; then
3296 rp="I see a config.sh file. Shall I use it to set the defaults?"
3299 n*|N*) echo "OK, I'll ignore it."
3300 mv config.sh config.sh.old
3301 myuname="$newmyuname"
3303 *) echo "Fetching default answers from your old config.sh file..." >&4
3311 : Older versions did not always set $sh. Catch re-use of such
3321 if test ! -f config.sh; then
3324 First time through, eh? I have some defaults handy for some systems
3325 that need some extra help getting the Configure answers right:
3328 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
3330 : Half the following guesses are probably wrong... If you have better
3331 : tests or hints, please send them to perlbug@perl.org
3332 : The metaconfig authors would also appreciate a copy...
3333 $test -f /irix && osname=irix
3334 $test -f /xenix && osname=sco_xenix
3335 $test -f /dynix && osname=dynix
3336 $test -f /dnix && osname=dnix
3337 $test -f /lynx.os && osname=lynxos
3338 $test -f /unicos && osname=unicos && osvers=`$uname -r`
3339 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
3340 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
3341 $test -f /bin/mips && /bin/mips && osname=mips
3342 $test -d /usr/apollo/bin && osname=apollo
3343 $test -f /etc/saf/_sactab && osname=svr4
3344 $test -d /usr/include/minix && osname=minix && osvers=`$uname -r`
3345 $test -f /system/gnu_library/bin/ar.pm && osname=vos
3346 if $test -d /MachTen -o -d /MachTen_Folder; then
3348 if $test -x /sbin/version; then
3349 osvers=`/sbin/version | $awk '{print $2}' |
3350 $sed -e 's/[A-Za-z]$//'`
3351 elif $test -x /usr/etc/version; then
3352 osvers=`/usr/etc/version | $awk '{print $2}' |
3353 $sed -e 's/[A-Za-z]$//'`
3359 $test -f /sys/posix.dll &&
3360 $test -f /usr/bin/what &&
3361 set X `/usr/bin/what /sys/posix.dll` &&
3362 $test "$3" = UWIN &&
3366 if $test -f $uname; then
3374 umips) osname=umips ;;
3377 [23]100) osname=mips ;;
3379 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
3380 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
3383 elif $test -f /etc/kconfig; then
3385 if test "$lns" = "$ln -s"; then
3387 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3389 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3396 if test -n "$DJGPP"; then
3405 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3407 # oslevel can fail with:
3408 # oslevel: Unable to acquire lock.
3409 *not\ found) osvers="$4"."$3" ;;
3410 '<3240'|'<>3240') osvers=3.2.0 ;;
3411 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3412 '=3250'|'>3250') osvers=3.2.5 ;;
3416 bitrig) osname=bitrig
3419 bsd386) osname=bsd386
3422 cygwin*) osname=cygwin
3425 *dc.osx) osname=dcosx
3431 domainos) osname=apollo
3437 dragonfly) osname=dragonfly
3440 dynixptx*) osname=dynixptx
3441 osvers=`echo "$4"|sed 's/^v//'`
3443 freebsd) osname=freebsd
3445 genix) osname=genix ;;
3449 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3462 $test -f /system/lib/libandroid.so && osname=linux-android
3466 netbsd*) osname=netbsd
3469 news-os) osvers="$3"
3471 4*) osname=newsos4 ;;
3475 nonstop-ux) osname=nonstopux ;;
3476 openbsd) osname=openbsd
3482 POSIX-BC | posix-bc ) osname=posix-bc
3485 powerux | power_ux | powermax_os | powermaxos | \
3486 powerunix | power_unix) osname=powerux
3492 solaris) osname=solaris
3494 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3501 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3505 titanos) osname=titanos
3514 ultrix) osname=ultrix
3517 osf1|mls+) case "$5" in
3520 osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3523 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3526 hp*) osname=hp_osf1 ;;
3527 mips) osname=mips_osf1 ;;
3530 # UnixWare 7.1.2 is known as Open UNIX 8
3531 openunix|unixware) osname=svr5
3539 $2) case "$osname" in
3543 : svr4.x or possibly later
3553 if test -f /stand/boot ; then
3554 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3555 if test -n "$INITPROG" -a -f "$INITPROG"; then
3556 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3557 if test -n "$isesix"; then
3565 *) if test -f /etc/systemid; then
3567 set `echo $3 | $sed 's/\./ /g'` $4
3568 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3570 elif $test -f $src/hints/sco_$1_$2.sh; then
3572 elif $test -f $src/hints/sco_$1.sh; then
3577 '') : Still unknown. Probably a generic Sys V.
3586 *) case "$osname" in
3587 '') : Still unknown. Probably a generic BSD.
3595 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3596 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3597 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3600 $rm -f UU/kernel.what
3601 elif test -d c:/. -o -n "$is_os2" ; then
3608 case "$targetarch" in
3611 case "$targetarch" in
3613 # Will load qnx.sh, which should change osname to nto
3618 # Catch arm-linux-androideabi, mipsel-linux-android,
3619 # and i686-linux-android
3620 osname=linux-android
3624 # Something like arm-linux-gnueabihf is really just
3631 # XXX perhaps we should just assume
3632 # osvers to be 2, or maybe take the value
3633 # from targetarch. Using $run before the
3634 # hints are run is somewhat icky.
3635 set X `$run $uname -a 2>/dev/null`
3638 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3643 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3650 : Now look for a hint file osname_osvers, unless one has been
3651 : specified already.
3654 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3655 : Also try without trailing minor version numbers.
3656 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3657 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3658 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3659 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3662 *) case "$osvers" in
3665 *) if $test -f $src/hints/$file.sh ; then
3667 elif $test -f $src/hints/$xfile.sh ; then
3669 elif $test -f $src/hints/$xxfile.sh ; then
3671 elif $test -f $src/hints/$xxxfile.sh ; then
3673 elif $test -f $src/hints/$xxxxfile.sh ; then
3675 elif $test -f "$src/hints/${osname}.sh" ; then
3684 if $test -f Policy.sh ; then
3687 none) dflt="Policy" ;;
3688 *) dflt="Policy $dflt" ;;
3693 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3697 if $test -f Policy.sh ; then
3700 There's also a Policy hint file available, which should make the
3701 site-specific (policy) questions easier to answer.
3708 You may give one or more space-separated answers, or "none" if appropriate.
3709 If you have a handcrafted Policy.sh file or a Policy.sh file generated by a
3710 previous run of Configure, you may specify it as well as or instead of
3711 OS-specific hints. If hints are provided for your OS, you should use them:
3712 although Perl can probably be built without hints on many platforms, using
3713 hints often improve performance and may enable features that Configure can't
3714 set up on its own. If there are no hints that match your OS, specify "none";
3715 DO NOT give a wrong version or a wrong OS.
3719 rp="Which of these apply, if any?"
3722 for file in $tans; do
3723 if $test X$file = XPolicy -a -f Policy.sh; then
3725 $cat Policy.sh >> UU/config.sh
3726 elif $test -f $src/hints/$file.sh; then
3727 . $src/hints/$file.sh
3728 $cat $src/hints/$file.sh >> UU/config.sh
3729 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3732 : Give one chance to correct a possible typo.
3733 echo "$file.sh does not exist"
3735 rp="hint to use instead?"
3737 for file in $ans; do
3738 if $test -f "$src/hints/$file.sh"; then
3739 . $src/hints/$file.sh
3740 $cat $src/hints/$file.sh >> UU/config.sh
3741 elif $test X$ans = X -o X$ans = Xnone ; then
3744 echo "$file.sh does not exist -- ignored."
3751 : Remember our hint file for later.
3752 if $test -f "$src/hints/$file.sh" ; then
3762 echo "Fetching default answers from $config_sh..." >&4
3766 cp $config_sh config.sh 2>/dev/null
3776 test "$override" && . ./optdef.sh
3778 : Restore computed paths
3779 for file in $loclist $trylist; do
3780 eval $file="\$_$file"
3785 Configure uses the operating system name and version to set some defaults.
3786 The default value is probably right if the name rings a bell. Otherwise,
3787 since spelling matters for me, either accept the default or answer "none"
3794 ''|' '|none) dflt=none ;;
3795 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3798 *) dflt="$osname" ;;
3800 rp="Operating system name?"
3804 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3810 ''|' '|none) dflt=none ;;
3811 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3812 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3814 ''|' ') dflt=none ;;
3819 *) dflt="$osvers" ;;
3821 rp="Operating system version?"
3831 : who configured the system
3832 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3835 cf_by=`(logname) 2>/dev/null`
3838 cf_by=`(whoami) 2>/dev/null`
3840 "") cf_by=unknown ;;
3845 : decide how portable to be. Allow command line overrides.
3846 case "$d_portable" in
3848 *) d_portable="$define" ;;
3851 : set up shell script to do ~ expansion
3857 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3860 if $test -f /bin/csh; then
3861 /bin/csh -f -c "glob \$1"
3866 name=\`$expr x\$1 : '..\([^/]*\)'\`
3867 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3868 if $test ! -d "\$dir"; then
3870 echo "\$me: can't locate home directory for: \$name" >&2
3875 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3891 : now set up to get a file name
3895 cat <<'EOSC' >>getfile
3911 : getfile will accept an answer from the comma-separated list
3912 : enclosed in parentheses even if it does not meet other criteria.
3913 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3914 fn=`echo $fn | sed 's/(.*)//'`
3920 loc_file=`expr $fn : '.*:\(.*\)'`
3921 fn=`expr $fn : '\(.*\):.*'`
3929 */*) fullpath=true;;
3938 *e*) exp_file=true;;
3941 *p*) nopath_ok=true;;
3946 *d*) type='Directory';;
3947 *l*) type='Locate';;
3952 Locate) what='File';;
3957 case "$d_portable" in
3965 while test "$type"; do
3970 true) rp="$rp (~name ok)";;
3973 if test -f UU/getfile.ok && \
3974 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3993 value=`UU/filexp $ans`
3996 if test "$ans" != "$value"; then
3997 echo "(That expands to $value on this system.)"
4011 /*) value="$ansexp" ;;
4012 [a-zA-Z]:/*) value="$ansexp" ;;
4017 echo "I shall only accept a full path name, as in /bin/ls." >&4
4018 echo "Use a ! shell escape if you wish to check pathnames." >&4
4021 echo "Please give a full path name, starting with slash." >&4
4024 echo "Note that using ~name is ok provided it expands well." >&4
4037 for fp in $gfpth; do
4038 if test "X$fp" = X.; then
4043 if test -f "$pf"; then
4045 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
4047 echo "($value is not a plain file, but that's ok.)"
4050 if test X"$type" = X; then
4057 for fp in $gfpth; do
4058 if test "X$fp" = X.; then
4063 direxp="$fp/$ansexp"
4065 if test -d "$direxp"; then
4073 if test -d "$ansexp"; then
4074 echo "(Looking for $loc_file in directory $value.)"
4075 value="$value/$loc_file"
4076 ansexp="$ansexp/$loc_file"
4078 if test -f "$ansexp"; then
4081 case "$nopath_ok" in
4082 true) case "$value" in
4084 *) echo "Assuming $value will be in people's path."
4100 if test "$fastread" = yes; then
4105 rp="$what $value doesn't exist. Use that name anyway?"
4124 test "X$gfpthkeep" != Xy && gfpth=""
4127 : determine root of directory hierarchy where package will be installed.
4130 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
4133 dflt=`echo "$prefix" | sed 's/.$//'`
4141 By default, $package will be installed in $dflt/bin, manual pages
4142 under $dflt/man, etc..., i.e. with $dflt as prefix for all
4143 installation directories. Typically this is something like /usr/local.
4144 If you wish to have binaries under /usr/bin but other parts of the
4145 installation under /usr/local, that's ok: you will be prompted
4146 separately for each of the installation directories, the prefix being
4147 only used to set the defaults.
4151 rp='Installation prefix to use?'
4159 *) oldprefix="$prefix";;
4166 : allow them to override the AFS root
4169 *) afsroot=$afsroot ;;
4175 $define|true) afs=true ;;
4176 $undef|false) afs=false ;;
4177 *) if $test -d $afsroot; then
4185 echo "AFS may be running... I'll be extra cautious then..." >&4
4187 echo "AFS does not seem to be running..." >&4
4190 : determine installation prefix for where package is to be installed.
4194 Since you are running AFS, I need to distinguish the directory in which
4195 files will reside from the directory in which they are installed (and from
4196 which they are presumably copied to the former directory by occult means).
4199 case "$installprefix" in
4200 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
4201 *) dflt="$installprefix";;
4206 In some special cases, particularly when building $package for distribution,
4207 it is convenient to distinguish the directory in which files should be
4208 installed from the directory ($prefix) in which they will
4209 eventually reside. For most users, these two directories are the same.
4212 case "$installprefix" in
4214 *) dflt=$installprefix;;
4218 rp='What installation prefix should I use for installing files?'
4220 installprefix="$ans"
4221 installprefixexp="$ansexp"
4223 : Perform the prefixexp/installprefixexp correction if necessary
4224 cat <<EOS >installprefix
4227 cat <<'EOSC' >>installprefix
4228 : Change installation prefix, if necessary.
4229 if $test X"$prefix" != X"$installprefix"; then
4230 eval "install${prefixvar}=\`echo \$${prefixvar}exp | sed \"s#^\$prefixexp#\$installprefixexp#\"\`"
4232 eval "install${prefixvar}=\"\$${prefixvar}exp\""
4235 chmod +x installprefix
4236 $eunicefix installprefix
4238 : Set variables such as privlib and privlibexp from the output of ./getfile
4239 : performing the prefixexp/installprefixexp correction if necessary.
4240 cat <<EOS >setprefixvar
4243 cat <<'EOSC' >>setprefixvar
4244 eval "${prefixvar}=\"\$ans\""
4245 eval "${prefixvar}exp=\"\$ansexp\""
4248 chmod +x setprefixvar
4249 $eunicefix setprefixvar
4251 : set up the script used to warn in case of inconsistency
4260 '') echo "The $hint value for \$$var on this machine was \"$was\"!" >&4
4262 *) echo "Hmm. Based on the hints in hints/$hintfile.sh, " >&4
4263 echo "the $hint value for \$$var on this machine was \"$was\"!" >&4
4268 echo "*** WHOA THERE!!! ***" >&4
4269 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
4272 rp=" Keep the $hint value?"
4275 y) td=$was; tu=$was;;
4279 : function used to set '$1' to '$val'
4280 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
4282 $define$undef) . ./whoa; eval "$var=\$td";;
4283 $undef$define) . ./whoa; eval "$var=\$tu";;
4284 *) eval "$var=$val";;
4287 : get the patchlevel
4289 echo "Getting the current patchlevel..." >&4
4290 if $test -r $rsrc/patchlevel.h;then
4291 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
4292 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
4293 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4294 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
4295 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
4296 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4297 perl_patchlevel=`egrep ',"(MAINT|SMOKE)[0-9][0-9]*"' $rsrc/patchlevel.h|tail -1|sed 's/[^0-9]//g'`
4306 $echo "(You do not have patchlevel.h. Eek.)"
4308 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
4309 version_patchlevel_string="version $patchlevel subversion $subversion"
4310 case "$perl_patchlevel" in
4312 *) perl_patchlevel=`echo $perl_patchlevel | sed 's/.* //'`
4313 version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel"
4317 $echo "(You have $package $version_patchlevel_string.)"
4321 : XXX Should be a Configure test for double-dots in filenames.
4322 version=`echo $revision $patchlevel $subversion | \
4323 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
4324 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4325 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
4328 version=`echo $revision $patchlevel $subversion | \
4329 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
4330 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4331 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
4334 : Special case the 5.005_xx maintenance series, which used 5.005
4335 : without any subversion label as a subdirectory in $sitelib
4336 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
4337 api_versionstring='5.005'
4340 : Do we want threads support and if so, what type
4341 case "$usethreads" in
4342 $define|true|[yY]*) dflt='y';;
4343 *) # Catch case where user specified ithreads or 5005threads but
4344 # forgot -Dusethreads (A.D. 4/2002)
4345 case "$useithreads$use5005threads" in
4346 *$define*) dflt='y';;
4353 Perl can be built to offer a form of threading support on some systems
4354 To do so, Configure can be run with -Dusethreads.
4356 Note that Perl built with threading support runs slightly slower
4357 and uses slightly more memory than plain Perl.
4359 If this doesn't make any sense to you, just accept the default '$dflt'.
4361 rp='Build a threading Perl?'
4364 y|Y) val="$define" ;;
4370 if $test $patchlevel -lt 9; then
4371 case "$usethreads" in
4373 : Default to ithreads unless overridden on command line or with
4376 case "$use5005threads" in
4378 echo "5.005 threads are no longer supported"
4382 case "$useithreads" in
4383 $undef|false|[nN]*) dflt='n';;
4385 rp='Use the newer interpreter-based ithreads?'
4388 y|Y) val="$define" ;;
4393 : Now set use5005threads to the opposite value.
4394 case "$useithreads" in
4395 $define) val="$undef" ;;
4402 useithreads="$undef"
4403 use5005threads="$undef"
4407 case "$useithreads$use5005threads" in
4411 You cannot have both the ithreads and the 5.005 threads enabled
4412 at the same time. Disabling the 5.005 threads since they are
4413 much less stable than the ithreads.
4416 use5005threads="$undef"
4421 : perl-5.9.x and later
4423 if test X"$usethreads" = "X$define"; then
4424 case "$use5005threads" in
4428 5.005 threads has been removed for 5.10. Perl will be built using ithreads.
4435 use5005threads="$undef"
4436 useithreads="$usethreads"
4439 case "$d_oldpthreads" in
4440 '') : Configure tests would be welcome here. For now, assume undef.
4442 *) val="$d_oldpthreads" ;;
4448 : Look for a hint-file generated 'call-back-unit'. If the
4449 : user has specified that a threading perl is to be built,
4450 : we may need to set or change some other defaults.
4451 if $test -f usethreads.cbu; then
4452 echo "Your platform has some specific hints regarding threaded builds, using them..."
4455 case "$usethreads" in
4456 "$define"|true|[yY]*)
4458 (Your platform does not have any specific hints for threaded builds.
4459 Assuming POSIX threads, then.)
4465 : Check if multiplicity is required
4468 Perl can be built so that multiple Perl interpreters can coexist
4469 within the same Perl executable.
4472 case "$useithreads" in
4475 This multiple interpreter support is required for interpreter-based threads.
4479 *) case "$usemultiplicity" in
4480 $define|true|[yY]*) dflt='y';;
4484 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
4485 rp='Build Perl for multiplicity?'
4488 y|Y) val="$define" ;;
4496 : Check if morebits is requested
4497 case "$usemorebits" in
4498 "$define"|true|[yY]*)
4499 use64bitint="$define"
4500 uselongdouble="$define"
4501 usemorebits="$define"
4503 *) usemorebits="$undef"
4507 : Determine the C compiler to be used
4513 rp="Use which C compiler?"
4517 : See whether they have no cc but they do have gcc
4519 if $test -f cc.cbu; then
4524 : make some quick guesses about what we are up against
4526 $echo $n "Hmm... $c"
4536 $cat $sysroot/usr/include/signal.h $sysroot/usr/include/sys/signal.h >foo 2>/dev/null
4537 if test -f /osf_boot || $contains 'OSF/1' $sysroot/usr/include/ctype.h >/dev/null 2>&1
4539 echo "Looks kind of like an OSF/1 system, but we'll see..."
4541 elif test `echo abc | $tr a-z A-Z` = Abc ; then
4542 xxx=`./loc addbib blurfl $pth`
4543 if $test -f $xxx; then
4544 echo "Looks kind of like a USG system with BSD features, but we'll see..."
4548 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
4549 echo "Looks kind of like an extended USG system, but we'll see..."
4551 echo "Looks kind of like a USG system, but we'll see..."
4555 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
4556 echo "Looks kind of like a BSD system, but we'll see..."
4560 echo "Looks kind of like a Version 7 system, but we'll see..."
4563 case "$eunicefix" in
4566 There is, however, a strange, musty smell in the air that reminds me of
4567 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
4571 : it so happens the Eunice I know will not run shell scripts in Unix format
4575 echo "Congratulations. You aren't running Eunice."
4579 : Detect OS2. The p_ variable is set above in the Head.U unit.
4580 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
4581 : semicolon as a patch separator
4586 I have the feeling something is not exactly right, however...don't tell me...
4587 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
4588 (Or you may be running DOS with DJGPP.)
4593 if test -f /xenix; then
4594 echo "Actually, this looks more like a XENIX system..."
4599 echo "It's not Xenix..."
4604 if test -f /venix; then
4605 echo "Actually, this looks more like a VENIX system..."
4612 echo "Nor is it Venix..."
4615 chmod +x bsd usg v7 osf1 eunice xenix venix os2
4616 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
4619 : Check if we are using GNU gcc and what its version is
4621 echo "Checking for GNU cc in disguise and/or its version number..." >&4
4625 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
4627 printf("%s\n", __VERSION__);
4629 printf("%s\n", "1");
4635 if $cc -o try $ccflags $ldflags try.c; then
4636 gccversion=`$run ./try`
4637 case "$gccversion" in
4638 '') echo "You are not using GNU cc." ;;
4639 *) echo "You are using GNU cc $gccversion."
4645 echo "*** WHOA THERE!!! ***" >&4
4646 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
4647 case "$knowitall" in
4649 echo " You'd better start hunting for one and let me know about it." >&4
4655 case "$gccversion" in
4656 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
4658 case "$gccversion" in
4659 '') gccosandvers='' ;;
4660 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
4661 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
4663 case "$gccosandvers" in
4664 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
4665 $osname$osvers) ;; # looking good
4666 $osname*) cat <<EOM >&4
4668 *** WHOA THERE!!! ***
4670 Your gcc has not been compiled for the exact release of
4671 your operating system ($gccosandvers versus $osname$osvers).
4673 In general it is a good idea to keep gcc synchronized with
4674 the operating system because otherwise serious problems
4675 may ensue when trying to compile software, like Perl.
4677 I'm trying to be optimistic here, though, and will continue.
4678 If later during the configuration and build icky compilation
4679 problems appear (headerfile conflicts being the most common
4680 manifestation), I suggest reinstalling the gcc to match
4681 your operating system release.
4685 *) gccosandvers='' ;; # failed to parse, better be silent
4693 # gcc 3.* complain about adding -Idirectories that they already know about,
4694 # so we will take those off from locincpth.
4695 case "$gccversion" in
4697 echo "main(){}">try.c
4698 for incdir in $locincpth; do
4699 warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
4700 grep '^c[cp]p*[01]: warning: changing search order '`
4701 if test "X$warn" != X; then
4702 locincpth=`echo " $locincpth " | sed "s! $incdir ! !"`
4708 # gcc 4.9 by default does some optimizations that break perl.
4709 # see ticket 121505.
4711 # The -fwrapv disables those optimizations (and probably others,) so
4712 # for gcc 4.9 (and later, since the optimizations probably won't go
4713 # away), add -fwrapv unless the user requests -fno-wrapv, which
4714 # disables -fwrapv, or if the user requests -fsanitize=undefined,
4715 # which turns the overflows -fwrapv ignores into runtime errors.
4716 case "$gccversion" in
4717 4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
4719 *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
4720 *) ccflags="$ccflags -fwrapv" ;;
4724 : What should the include directory be ?
4725 : Use sysroot if set, so findhdr looks in the right place.
4727 $echo $n "Hmm... $c"
4728 dflt="$sysroot/usr/include"
4731 if $test -f /bin/mips && /bin/mips; then
4732 echo "Looks like a MIPS system..."
4733 $cat >usr.c <<'EOCP'
4734 #ifdef SYSTYPE_BSD43
4738 if $cc $cppflags -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4739 dflt='/bsd43/usr/include'
4743 mips_type='System V'
4745 $rm -f usr.c usr.out
4746 echo "and you're compiling with the $mips_type compiler and libraries."
4750 echo "Doesn't look like a MIPS system."
4760 case "$xxx_prompt" in
4763 rp='Where are the include files you want to use?'
4771 : see how we invoke the C preprocessor
4773 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4774 cat <<'EOT' >testcpp.c
4780 if test ! -f cppstdin; then
4781 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4782 # AIX cc -E doesn't show the absolute headerfile
4783 # locations but we'll cheat by using the -M flag.
4784 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
4786 echo 'cat >.$$.c; '"$cc $cppflags"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4789 echo "Keeping your $hint cppstdin wrapper."
4792 wrapper=`pwd`/cppstdin
4796 if $test "X$cppstdin" != "X" && \
4797 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4798 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4800 echo "You used to use $cppstdin $cppminus so we'll use that again."
4802 '') echo "But let's see if we can live without a wrapper..." ;;
4804 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4805 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4807 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4810 echo "(However, $cpprun $cpplast does not work, let's see...)"
4818 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4825 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4826 $cc -E <testcpp.c >testcpp.out 2>&1; \
4827 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4828 echo "Yup, it does."
4829 x_cpp="$cc $cppflags -E"
4831 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4832 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4833 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4834 echo "Yup, it does."
4835 x_cpp="$cc $cppflags -E"
4837 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4838 $cc -P <testcpp.c >testcpp.out 2>&1; \
4839 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4840 echo "Yipee, that works!"
4841 x_cpp="$cc $cppflags -P"
4843 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4844 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4845 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4846 echo "At long last!"
4847 x_cpp="$cc $cppflags -P"
4849 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4850 $cpp <testcpp.c >testcpp.out 2>&1; \
4851 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4853 x_cpp="$cpp $cppflags"
4855 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4856 $cpp - <testcpp.c >testcpp.out 2>&1; \
4857 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4858 echo "Hooray, it works! I was beginning to wonder."
4859 x_cpp="$cpp $cppflags"
4861 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4862 $wrapper <testcpp.c >testcpp.out 2>&1; \
4863 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4869 rp="No dice. I can't find a C preprocessor. Name one:"
4873 $x_cpp <testcpp.c >testcpp.out 2>&1
4874 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4875 echo "OK, that will do." >&4
4877 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4892 echo "Perhaps can we force $cc -E using a wrapper..."
4893 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4894 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4900 echo "Nope, we'll have to live without it..."
4914 "$wrapper"|'cppstdin') ;;
4915 *) $rm -f $wrapper;;
4917 $rm -f testcpp.c testcpp.out
4919 : Adjust cppfilter for path component separator
4921 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
4922 os2) cppfilter="sed -e 's|\\\\\\\\|/|g' |" ;; # path component separator is \
4926 : Use gcc to determine libpth and incpth
4927 # If using gcc or clang, we can get better values for libpth, incpth
4928 # and usrinc directly from the compiler.
4929 # Note that ccname for clang is also gcc.
4932 $echo 'extern int foo;' > try.c
4933 set X `$cppstdin -v try.c 2>&1 | $awk '/^#include </,/^End of search /'|$cppfilter $grep '/include'`
4935 if $test $# -gt 0; then
4937 incpth="`$echo $incpth|$sed 's/^ //'`"
4939 j="`$echo $i|$sed 's,/include$,/lib,'`"
4940 if $test -d $j; then
4944 libpth="`$echo $libpth|$sed 's/^ //'`"
4945 for xxx in $libpth $loclibpth $plibpth $glibpth; do
4946 if $test -d $xxx; then
4949 *) libpth="$libpth $xxx";;
4956 '') for i in $incpth; do
4957 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
4965 case "$usecrosscompile" in
4968 '') echo "Incpth not defined." >&4; croak=y ;;
4969 *) echo "Using incpth '$incpth'." >&4 ;;
4972 '') echo "Libpth not defined." >&4; croak=y ;;
4973 *) echo "Using libpth '$libpth'." >&4 ;;
4976 '') echo "Usrinc not defined." >&4; croak=y ;;
4977 *) echo "Using usrinc $usrinc." >&4 ;;
4981 if test "X$sysroot" = X; then
4982 echo "Cannot continue, aborting." >&4; exit 1
4984 echo "Cross-compiling using sysroot $sysroot, failing to guess inc/lib paths is not fatal" >&4
4993 : Default value for incpth is just usrinc
4995 '') incpth="$usrinc";;
4998 : Set private lib path
5001 plibpth="$incpath/usr/lib $sysroot/usr/local/lib $sysroot/usr/ccs/lib"
5006 '') dlist="$loclibpth $plibpth $glibpth";;
5007 *) dlist="$libpth";;
5010 : Now check and see which directories actually exist, avoiding duplicates
5013 if $test -d $xxx; then
5016 *) libpth="$libpth $xxx";;
5022 Some systems have incompatible or broken versions of libraries. Among
5023 the directories listed in the question below, please remove any you
5024 know not to be holding relevant libraries, and add any that are needed.
5025 Say "none" for none.
5029 if test "X$sysroot" != X; then
5031 You have set sysroot to $sysroot, please supply the directories excluding sysroot
5044 rp="Directories to use for library searches?"
5051 : compute shared library extension
5054 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
5064 On some systems, shared libraries may be available. Answer 'none' if
5065 you want to suppress searching of shared libraries for the remainder
5066 of this configuration.
5069 rp='What is the file extension used for shared libraries?'
5073 : Does target system insist that shared library basenames are unique
5076 Some dynamic loaders assume that the *basename* of shared library filenames
5077 are globally unique. We'll default this to undef as we assume your system
5078 is not this weird. Set to defined if you're on one of them.
5083 rp='Make shared library basenames unique?'
5086 y|Y) val="$define" ;;
5089 set d_libname_unique
5092 : Define several unixisms.
5093 : Hints files or command line option can be used to override them.
5094 : The convoluted testing is in case hints files set either the old
5097 '') case "$exe_ext" in
5099 *) _exe="$exe_ext" ;;
5104 '') case "$lib_ext" in
5111 '') case "$obj_ext" in
5118 '') case "$path_sep" in
5129 rm_try="$rm -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*"
5131 : Which makefile gets called first. This is used by make depend.
5132 case "$firstmakefile" in
5133 '') firstmakefile='makefile';;
5136 : Check is we will use socks
5138 $define|true|[yY]*) dflt='y';;
5143 Perl can be built to use the SOCKS proxy protocol library. To do so,
5144 Configure must be run with -Dusesocks. If you use SOCKS you also need
5145 to use the PerlIO abstraction layer, this will be implicitly selected.
5147 If this doesn't make any sense to you, just accept the default '$dflt'.
5149 rp='Build Perl for SOCKS?'
5152 y|Y) val="$define" ;;
5158 : Check for uselongdouble support
5160 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
5163 case "$uselongdouble" in
5164 $define|true|[yY]*) dflt='y';;
5169 Perl can be built to take advantage of long doubles which
5170 (if available) may give more accuracy and range for floating point numbers.
5172 If this doesn't make any sense to you, just accept the default '$dflt'.
5174 rp='Try to use long doubles if available?'
5177 y|Y) val="$define" ;;
5183 case "$uselongdouble" in
5184 true|[yY]*) uselongdouble="$define" ;;
5187 : Look for a hint-file generated 'call-back-unit'. If the
5188 : user has specified that long doubles should be used,
5189 : we may need to set or change some other defaults.
5190 if $test -f uselongdouble.cbu; then
5191 echo "Your platform has some specific hints regarding long doubles, using them..."
5192 . ./uselongdouble.cbu
5194 case "$uselongdouble" in
5197 (Your platform does not have any specific hints for long doubles.)
5203 : Check if quadmath is requested
5204 case "$usequadmath" in
5205 "$define"|true|[yY]*) usequadmath="$define" ;;
5206 *) usequadmath="$undef" ;;
5209 : Looking for optional libraries
5211 echo "Checking for optional libraries..." >&4
5216 case "$libswanted" in
5217 '') libswanted='c_s';;
5220 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
5222 case "$usecbacktrace" in
5223 "$define") libswanted="$libswanted bfd" ;;
5225 case "$usequadmath" in
5226 "$define") libswanted="$libswanted quadmath" ;;
5232 for thisdir in $libpth $xlibpth; do
5233 test -d $thisdir && libspath="$libspath $thisdir"
5235 for thislib in $libswanted; do
5236 for thisdir in $libspath; do
5238 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
5239 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
5240 $test -f "$xxx" && eval $libscheck
5241 $test -f "$xxx" && libstyle=shared
5242 xxx=`ls $thisdir/lib$thislib.[0-9].$so 2>/dev/null|sed -n '$p'`
5243 $test -f "$xxx" && eval $libscheck
5244 $test -f "$xxx" && libstyle=shared
5246 if test ! -f "$xxx"; then
5247 xxx=$thisdir/lib$thislib.$so
5248 $test -f "$xxx" && eval $libscheck
5249 $test -f "$xxx" && libstyle=shared
5251 if test ! -f "$xxx"; then
5252 xxx=$thisdir/lib$thislib$_a
5253 $test -f "$xxx" && eval $libscheck
5254 $test -f "$xxx" && libstyle=static
5256 if test ! -f "$xxx"; then
5257 xxx=$thisdir/$thislib$_a
5258 $test -f "$xxx" && eval $libscheck
5259 $test -f "$xxx" && libstyle=static
5261 if test ! -f "$xxx"; then
5262 xxx=$thisdir/lib${thislib}_s$_a
5263 $test -f "$xxx" && eval $libscheck
5264 $test -f "$xxx" && libstyle=static
5265 $test -f "$xxx" && thislib=${thislib}_s
5267 if test ! -f "$xxx"; then
5268 xxx=$thisdir/Slib$thislib$_a
5269 $test -f "$xxx" && eval $libscheck
5270 $test -f "$xxx" && libstyle=static
5272 if $test -f "$xxx"; then
5274 shared) echo "Found -l$thislib (shared)." ;;
5275 static) echo "Found -l$thislib." ;;
5276 *) echo "Found -l$thislib ($libstyle)." ;;
5280 *) dflt="$dflt -l$thislib"
5281 libsfound="$libsfound $xxx"
5283 libsfiles="$libsfiles $yyy"
5284 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
5285 case " $libsdirs " in
5287 *) libsdirs="$libsdirs $yyy" ;;
5294 if $test ! -f "$xxx"; then
5295 echo "No -l$thislib."
5306 ' '|'') dflt='none';;
5311 In order to compile $package on your machine, a number of libraries
5312 are usually needed. Include any other special libraries here as well.
5313 Say "none" for none. The default list is almost always right.
5317 rp="What libraries to use?"
5324 : determine optimization, if desired, or use for debug flag also
5326 ' '|$undef) dflt='none';;
5328 *) dflt="$optimize";;
5332 By default, $package compiles with the -O flag to use the optimizer.
5333 Alternately, you might want to use the symbolic debugger, which uses
5334 the -g flag (on traditional Unix systems). Either flag can be
5335 specified here. To use neither flag, specify the word "none".
5338 rp="What optimizer/debugger flag should be used?"
5342 'none') optimize=" ";;
5345 : Check what DEBUGGING is required from the command line
5346 : -DEBUGGING or -DDEBUGGING or
5347 : -DEBUGGING=both = -g + -DDEBUGGING
5348 : -DEBUGGING=-g or -Doptimize=-g = -g
5349 : -DEBUGGING=none or -UDEBUGGING =
5350 : -DEBUGGING=old or -DEBUGGING=default = ? $optimize
5353 *) DEBUGGING=$EBUGGING ;;
5356 case "$DEBUGGING" in
5360 *) optimize="$optimize -g" ;;
5364 *-g*) set `echo "X $optimize " | sed 's/ -g / /'`
5372 case "$DEBUGGING" in
5373 both|$define) dflt='-DDEBUGGING'
5376 : argument order is deliberate, as the flag will start with - which set could
5377 : think is an option
5378 checkccflag='check=$1; flag=$2; callback=$3;
5380 echo "Checking if your compiler accepts $flag" 2>&1;
5381 [ "X$sysroot" != "X" ] && echo "For sysroot = $sysroot";
5382 echo "int main(void) { return 0; }" > gcctest.c;
5383 if $cc $_sysroot -O2 $flag -o gcctest gcctest.c 2>gcctest.out && $run ./gcctest; then
5384 echo "Yes, it does." 2>&1;
5385 if $test -s gcctest.out ; then
5386 echo "But your platform does not like it:";
5391 echo "Leaving current flags $ccflags alone." 2>&1
5393 *) dflt="$dflt $flag";
5399 echo "Nope, it does not, but that is ok." 2>&1;
5403 : We will not override a previous value, but we might want to
5404 : augment a hint file
5406 default|recommended)
5407 case "$gccversion" in
5408 1*) dflt="$dflt -fpcc-struct-return" ;;
5410 case "$optimize:$DEBUGGING" in
5411 *-g*:old) dflt="$dflt -DDEBUGGING";;
5413 case "$gccversion" in
5414 2*) if $test -d /etc/conf/kconfig.d &&
5415 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
5417 # Interactive Systems (ISC) POSIX mode.
5422 case "$gccversion" in
5425 ?*) set strict-aliasing -fno-strict-aliasing
5429 # For gcc, adding -pipe speeds up compilations for some, but apparently
5430 # some assemblers can't read from stdin. (It also slows down compilations
5431 # in other cases, but those are apparently rarer these days.) AD 5/2004.
5432 case "$gccversion" in
5438 # on x86_64 (at least) we require an extra library (libssp) in the
5439 # link command line. This library is not named, so I infer that it is
5440 # an implementation detail that may change. Hence the safest approach
5441 # is to add the flag to the flags passed to the compiler at link time,
5442 # as that way the compiler can do the right implementation dependant
5444 case "$gccversion" in
5445 ?*) set stack-protector-strong -fstack-protector-strong
5448 *-fstack-protector-strong*) ;; # It got added.
5449 *) # Try the plain/older -fstack-protector.
5450 set stack-protector -fstack-protector
5459 case "$mips_type" in
5460 *BSD*|'') inclwanted="$locincpth $usrinc";;
5461 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
5463 for thisincl in $inclwanted; do
5464 if $test -d $thisincl; then
5465 if $test x$thisincl != x$usrinc; then
5467 *" -I$thisincl "*);;
5468 *) dflt="$dflt -I$thisincl ";;
5474 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
5476 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
5484 *) dflt="$dflt -D$2";;
5488 set signal.h LANGUAGE_C; eval $inctest
5492 ccflags="$ccflags -DSOCKS"
5497 default|recommended) dflt="$ccflags $dflt" ;;
5498 *) dflt="$ccflags";;
5507 Your C compiler may want other flags. For this question you should include
5508 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
5509 but you should NOT include libraries or ld flags like -lwhatever. If you
5510 want $package to honor its debug switch, you should include -DDEBUGGING here.
5511 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
5513 To use no flags, specify the word "none".
5519 rp="Any additional cc flags?"
5526 : the following weeds options from ccflags that are of no interest to cpp
5528 '') cppflags="$ccflags" ;;
5529 *) cppflags="$cppflags $ccflags" ;;
5531 case "$gccversion" in
5532 1*) cppflags="$cppflags -D__GNUC__"
5534 case "$mips_type" in
5536 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
5542 echo "Let me guess what the preprocessor flags are..." >&4
5556 *) ftry="$previous $flag";;
5558 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
5559 >cpp1.out 2>/dev/null && \
5560 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
5561 >cpp2.out 2>/dev/null && \
5562 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
5563 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
5565 cppflags="$cppflags $ftry"
5575 *-*) echo "They appear to be: $cppflags";;
5577 $rm -f cpp.c cpp?.out
5581 : flags used in final linking phase
5583 '') if ./venix; then
5589 *-posix*) dflt="$dflt -posix" ;;
5592 *) dflt="$ldflags";;
5594 # See note above about -fstack-protector
5596 *-fstack-protector-strong*)
5598 *-fstack-protector-strong*) ;; # Don't add it again
5599 *) dflt="$dflt -fstack-protector-strong" ;;
5602 *-fstack-protector*)
5604 *-fstack-protector*) ;; # Don't add it again
5605 *) dflt="$dflt -fstack-protector" ;;
5610 : Try to guess additional flags to pick up local libraries.
5611 for thislibdir in $libpth; do
5612 case " $loclibpth " in
5615 *"-L$thislibdir "*) ;;
5616 *) dflt="$dflt -L$thislibdir" ;;
5628 Your C linker may need flags. For this question you should
5629 include -L/whatever and any other flags used by the C linker, but you
5630 should NOT include libraries like -lwhatever.
5632 Make sure you include the appropriate -L/path flags if your C linker
5633 does not normally search all of the directories you specified above,
5636 To use no flags, specify the word "none".
5640 rp="Any additional ld flags (NOT including libraries)?"
5646 rmlist="$rmlist pdp11"
5650 echo "Checking your choice of C compiler and flags for coherency..." >&4
5651 $cat > try.c <<'EOF'
5653 int main() { printf("Ok\n"); return(0); }
5655 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
5657 $cat >try.msg <<'EOM'
5658 I've tried to compile and run the following simple program:
5661 $cat try.c >> try.msg
5663 $cat >> try.msg <<EOM
5670 and I got the following output:
5674 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
5675 if $sh -c "$run ./try " >>try.msg 2>&1; then
5679 *) echo 'The program compiled OK, but produced no output.' >> try.msg ;;
5682 echo "The program compiled OK, but exited with status $?." >>try.msg
5683 rp="You have a problem. Shall I abort Configure"
5687 echo "I can't compile the test program." >>try.msg
5688 rp="You have a BIG problem. Shall I abort Configure"
5694 case "$knowitall" in
5696 echo "(The supplied flags or libraries might be incorrect.)"
5704 *) echo "Ok. Stopping Configure." >&4
5709 n) echo "OK, that should do.";;
5711 $rm_try gcctest gcctest.out
5713 : define a shorthand compile call
5717 case "$usedevel" in $define|true|[yY]*) if $test ! -f "${mc_file}.c"; then
5718 echo "Internal Configure script bug - compiler test file ${mc_file}.c is missing. Please report this to perlbug@perl.org" >&4;
5722 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
5723 : define a shorthand compile call for compilations that should be ok.
5727 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
5729 : determine filename position in cpp output
5731 echo "Computing filename position in cpp output for #include directives..." >&4
5733 vos) testaccess=-e ;;
5736 echo '#include <stdio.h>' > foo.c
5739 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5740 $grep '^[ ]*#.*stdio\.h' | \
5741 while read cline; do
5744 while $test \$# -gt 0; do
5745 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5750 pos=\`expr \$pos + 1\`
5762 *) pos="${fieldn}th";;
5764 echo "Your cpp writes the filename in the $pos field of the line."
5766 : locate header file
5771 for usrincdir in $incpth
5773 if test -f \$usrincdir/\$wanted; then
5774 echo "\$usrincdir/\$wanted"
5778 awkprg='{ print \$$fieldn }'
5779 echo "#include <\$wanted>" > foo\$\$.c
5780 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5781 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5782 while read cline; do
5783 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5785 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5786 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5791 # status = 0: grep returned 0 lines, case statement not executed
5792 # status = 1: headerfile found
5793 # status = 2: while loop executed, no headerfile found
5797 if test \$status -eq 1; then
5804 : define an alternate in-header-list? function
5805 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5806 cont=true; xxf="echo \"<\$1> found.\" >&4";
5807 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5808 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5810 case $# in 4) instead=instead;; *) instead="at last";; esac;
5811 while $test "$cont"; do
5813 var=$2; eval "was=\$$2";
5814 if $test "$xxx" && $test -r "$xxx";
5816 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5819 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5820 set $yyy; shift; shift; yyy=$@;
5821 case $# in 0) cont="";;
5822 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5823 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5824 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5825 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5829 do set $yyy; var=$2; eval "was=\$$2";
5830 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5831 set $yyy; shift; shift; yyy=$@;
5834 : see if stdlib is available
5835 set stdlib.h i_stdlib
5838 : check for lengths of integral types
5842 echo "Checking to see how big your integers are..." >&4
5851 printf("intsize=%d;\n", (int)sizeof(int));
5852 printf("longsize=%d;\n", (int)sizeof(long));
5853 printf("shortsize=%d;\n", (int)sizeof(short));
5858 if eval $compile_ok && $run ./try > /dev/null; then
5860 echo "Your integers are $intsize bytes long."
5861 echo "Your long integers are $longsize bytes long."
5862 echo "Your short integers are $shortsize bytes long."
5866 Help! I can't compile and run the intsize test program: please enlighten me!
5867 (This is probably a misconfiguration in your system or libraries, and
5868 you really ought to fix it. Still, I'll try anyway.)
5872 rp="What is the size of an integer (in bytes)?"
5876 rp="What is the size of a long integer (in bytes)?"
5880 rp="What is the size of a short integer (in bytes)?"
5888 : check for long long
5890 echo "Checking to see if you have long long..." >&4
5891 echo 'int main() { long long x = 7; return 0; }' > try.c
5893 if eval $compile; then
5895 echo "You have long long."
5898 echo "You do not have long long."
5904 : check for length of long long
5905 case "${d_longlong}${longlongsize}" in
5908 echo "Checking to see how big your long longs are..." >&4
5909 $cat >try.c <<'EOCP'
5913 printf("%d\n", (int)sizeof(long long));
5918 if eval $compile_ok; then
5919 longlongsize=`$run ./try`
5920 echo "Your long longs are $longlongsize bytes long."
5924 echo "(I can't seem to compile the test program. Guessing...)"
5925 rp="What is the size of a long long (in bytes)?"
5929 if $test "X$longsize" = "X$longlongsize"; then
5930 echo "(That isn't any different from an ordinary long.)"
5936 : see if inttypes.h is available
5937 : we want a real compile instead of Inhdr because some systems
5938 : have an inttypes.h which includes non-existent headers
5941 #include <inttypes.h>
5943 static int32_t foo32 = 0x12345678;
5947 if eval $compile; then
5948 echo "<inttypes.h> found." >&4
5951 echo "<inttypes.h> NOT found." >&4
5960 echo "Checking to see if you have int64_t..." >&4
5962 #include <sys/types.h>
5963 #$i_inttypes I_INTTYPES
5965 #include <inttypes.h>
5967 int main() { int64_t x = 7; }
5970 if eval $compile; then
5972 echo "You have int64_t."
5975 echo "You do not have int64_t."
5981 : Check if 64bit ints have a quad type
5983 echo "Checking which 64-bit integer type we could use..." >&4
5989 val='"unsigned int"'
5994 *) case "$longsize" in
5998 val='"unsigned long"'
6003 *) case "$d_longlong:$longlongsize" in
6008 val='"unsigned long long"'
6013 *) case "$d_int64_t" in
6032 '') echo "Alas, no 64-bit integer types in sight." >&4
6035 *) echo "We could use '$quadtype' for 64-bit integers." >&4
6040 : Do we want 64bit support
6041 case "$uselonglong" in
6042 "$define"|true|[yY]*)
6045 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
6047 use64bitint="$define"
6050 case "$use64bits" in
6051 "$define"|true|[yY]*)
6054 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
6056 use64bitint="$define"
6059 case "$use64bitints" in
6060 "$define"|true|[yY]*)
6063 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
6065 use64bitint="$define"
6068 case "$use64bitsint" in
6069 "$define"|true|[yY]*)
6072 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
6074 use64bitint="$define"
6077 case "$uselonglongs" in
6078 "$define"|true|[yY]*)
6081 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
6083 use64bitint="$define"
6086 case "$use64bitsall" in
6087 "$define"|true|[yY]*)
6090 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
6092 use64bitall="$define"
6097 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
6099 case "$use64bitall" in
6100 "$define"|true|[yY]*) use64bitint="$define" ;;
6106 You have natively 64-bit long integers.
6110 *) case "$use64bitint" in
6111 "$define"|true|[yY]*) dflt='y';;
6120 Perl can be built to take advantage of 64-bit integer types
6121 on some systems. To do so, Configure can be run with -Duse64bitint.
6122 Choosing this option will most probably introduce binary incompatibilities.
6124 If this doesn't make any sense to you, just accept the default '$dflt'.
6125 (The default has been chosen based on your configuration.)
6127 rp='Try to use 64-bit integers, if available?'
6130 [yY]*) val="$define" ;;
6138 case "$use64bitall" in
6139 "$define"|true|[yY]*) dflt='y' ;;
6140 *) case "$longsize" in
6148 You may also choose to try maximal 64-bitness. It means using as much
6149 64-bitness as possible on the platform. This in turn means even more
6150 binary incompatibilities. On the other hand, your platform may not
6151 have any more 64-bitness available than what you already have chosen.
6153 If this doesn't make any sense to you, just accept the default '$dflt'.
6154 (The default has been chosen based on your configuration.)
6156 rp='Try to use maximal 64-bit support, if available?'
6159 [yY]*) val="$define" ;;
6164 case "$use64bitall" in
6166 case "$use64bitint" in
6170 Since you have chosen a maximally 64-bit build, I'm also turning on
6171 the use of 64-bit integers.
6173 use64bitint="$define" ;;
6178 : Look for a hint-file generated 'call-back-unit'. If the
6179 : user has specified that a 64-bit perl is to be built,
6180 : we may need to set or change some other defaults.
6181 if $test -f use64bitint.cbu; then
6182 echo "Your platform has some specific hints regarding 64-bit integers, using them..."
6185 case "$use64bitint" in
6186 "$define"|true|[yY]*)
6187 : This test was common to all the OpenBSD forks, and seems harmless for
6190 echo "Checking if your C library has broken 64-bit functions..." >&4
6193 typedef $uquadtype myULL;
6200 {4294967303.15, 4294967303ULL},
6201 {4294967294.2, 4294967294ULL},
6202 {4294967295.7, 4294967295ULL},
6205 for (p = test; p->u; p++) {
6206 myULL x = (myULL)p->d;
6217 if eval $compile_ok; then
6218 libcquad=`$run ./try`
6219 echo "Your C library's 64-bit functions are $libcquad."
6221 echo "(I can't seem to compile the test program.)"
6222 echo "Assuming that your C library's 64-bit functions are ok."
6231 *** You have a C library with broken 64-bit functions.
6232 *** 64-bit support does not work reliably in this configuration.
6233 *** Please rerun Configure without -Duse64bitint and/or -Dusemorebits.
6234 *** Cannot continue, aborting.
6241 4) case "$archname64" in
6242 '') archname64=64int ;;
6249 : Look for a hint-file generated 'call-back-unit'. If the
6250 : user has specified that a maximally 64-bit perl is to be built,
6251 : we may need to set or change some other defaults.
6252 if $test -f use64bitall.cbu; then
6253 echo "Your platform has some specific hints regarding 64-bit builds, using them..."
6256 case "$use64bitall" in
6257 "$define"|true|[yY]*)
6259 4) case "$archname64" in
6260 ''|64int) archname64=64all ;;
6267 case "$d_quad:$use64bitint" in
6271 *** You have chosen to use 64-bit integers,
6272 *** but none can be found.
6273 *** Please rerun Configure without -Duse64bitint and/or -Dusemorebits.
6274 *** Cannot continue, aborting.
6281 : Check if we are using the GNU C library
6283 echo "Checking for GNU C Library..." >&4
6285 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
6286 alone are insufficient to distinguish different versions, such as
6287 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
6288 libc version 2.1.0. A. Dougherty, June 3, 2002.
6294 # ifdef __GLIBC_MINOR__
6295 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 && !defined(__cplusplus)
6296 # include <gnu/libc-version.h>
6297 printf("%s\n", gnu_get_libc_version());
6299 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
6302 printf("%d\n", __GLIBC__);
6311 if eval $compile_ok && $run ./try > glibc.ver; then
6313 gnulibc_version=`$cat glibc.ver`
6314 echo "You are using the GNU C Library version $gnulibc_version"
6318 echo "You are not using the GNU C Library"
6324 : see if nm is to be used to determine whether a symbol is defined or not
6328 case "$d_gnulibc" in
6331 echo "nm probably won't work on the GNU C Library." >&4
6337 if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
6339 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
6340 echo "'nm' won't be sufficient on this system." >&4
6346 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
6347 if $test $dflt -gt 20; then
6357 true|$define) dflt=y;;
6364 I can use $nm to extract the symbols from your C libraries. This
6365 is a time consuming task which may generate huge output on the disk (up
6366 to 3 megabytes) but that should make the symbols extraction faster. The
6367 alternative is to skip the 'nm' extraction part and to compile a small
6368 test program instead to determine whether each symbol is present. If
6369 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
6370 this may be the best solution.
6372 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
6375 rp="Shall I use $nm to extract C symbols from the libraries?"
6378 [Nn]*) usenm=false;;
6387 : nm options which may be necessary
6389 '') if $test -f /mach_boot; then
6391 elif $test -d /usr/ccs/lib; then
6392 nm_opt='-p' # Solaris (and SunOS?)
6393 elif $test -f /dgux; then
6395 elif $test -f /lib64/rld; then
6396 nm_opt='-p' # 64-bit Irix
6402 : nm options which may be necessary for shared libraries but illegal
6403 : for archive libraries. Thank you, Linux.
6404 case "$nm_so_opt" in
6405 '') case "$myuname" in
6407 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
6408 nm_so_opt='--dynamic'
6415 : Figure out where the libc is located
6418 : get list of predefined functions in a handy place
6423 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
6429 *) for thislib in $libs; do
6432 : Handle C library specially below.
6435 thislib=`echo $thislib | $sed -e 's/^-l//'`
6436 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
6438 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
6440 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
6442 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
6444 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
6446 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
6448 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
6453 libnames="$libnames $try"
6455 *) libnames="$libnames $thislib" ;;
6464 for xxx in $libpth; do
6465 $test -r $1 || set $xxx/libc.$so
6466 : The messy sed command sorts on library version numbers.
6468 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
6469 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
6471 s/[0-9][0-9]*/0000&/g
6472 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
6475 $sort | $sed -e 's/^.* //'`
6478 $test -r $1 || set $sysroot/usr/ccs/lib/libc.$so
6479 $test -r $1 || set $sysroot/lib/libsys_s$_a
6485 if $test -r "$1"; then
6486 echo "Your (shared) C library seems to be in $1."
6488 elif $test -r /lib/libc && $test -r /lib/clib; then
6489 echo "Your C library seems to be in both /lib/clib and /lib/libc."
6491 libc='/lib/clib /lib/libc'
6492 if $test -r /lib/syslib; then
6493 echo "(Your math library is in /lib/syslib.)"
6494 libc="$libc /lib/syslib"
6496 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
6497 echo "Your C library seems to be in $libc, as you said before."
6498 elif $test -r $incpath/usr/lib/libc$_a; then
6499 libc=$incpath/usr/lib/libc$_a;
6500 echo "Your C library seems to be in $libc. That's fine."
6501 elif $test -r /lib/libc$_a; then
6503 echo "Your C library seems to be in $libc. You're normal."
6505 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
6507 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
6508 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
6509 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
6511 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
6513 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
6516 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
6518 if $test -r "$tans"; then
6519 echo "Your C library seems to be in $tans, of all places."
6525 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
6529 If the guess above is wrong (which it might be if you're using a strange
6530 compiler, or your machine supports multiple models), you can override it here.
6535 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
6537 I can't seem to find your C library. I've looked in the following places:
6540 $sed 's/^/ /' libpath
6543 None of these seems to contain your C library. I need to get its name...
6548 rp='Where is your C library?'
6553 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
6554 set X `cat libnames`
6557 case $# in 1) xxx=file; esac
6558 echo "Extracting names from the following $xxx for later perusal:" >&4
6560 $sed 's/^/ /' libnames >&4
6562 $echo $n "This may take a while...$c" >&4
6566 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
6567 *) $nm $nm_opt $file 2>/dev/null;;
6572 $grep fprintf libc.tmp > libc.ptf
6573 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
6574 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
6576 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *//p'";\
6578 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6580 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
6582 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6584 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
6586 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6588 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
6590 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6592 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
6594 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6596 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
6598 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6600 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
6601 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
6603 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6605 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
6607 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6609 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
6611 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6613 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
6615 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6617 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
6619 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6621 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
6623 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6625 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
6627 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6629 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
6631 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6634 $nm -p $* 2>/dev/null >libc.tmp
6635 $grep fprintf libc.tmp > libc.ptf
6636 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
6637 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
6643 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
6645 if $ar t $libc > libc.tmp && \
6646 $contains '^fprintf$' libc.tmp >/dev/null 2>&1
6648 for thisname in $libnames $libc; do
6649 $ar t $thisname >>libc.tmp
6651 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
6653 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
6654 for thisname in $libnames $libc; do
6655 $ar tv $thisname >>libc.tmp
6656 emximp -o tmp.imp $thisname \
6658 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
6659 < tmp.imp >>libc.tmp
6662 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
6665 echo "$ar didn't seem to work right." >&4
6666 echo "Maybe this is a Cray...trying bld instead..." >&4
6668 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list &&
6671 for thisname in $libnames; do
6673 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
6674 $ar t $thisname >>libc.tmp
6678 echo "That didn't work either. Giving up." >&4
6688 echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4
6689 dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list
6691 *) if $test -f /lib/syscalls.exp; then
6693 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
6694 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' \
6695 /lib/syscalls.exp >>libc.list
6701 $rm -f libnames libpath
6703 : Check if we are using C++
6705 echo "Checking for C++..." >&4
6706 $cat >try.c <<'EOCP'
6718 if eval $compile_ok && $run ./try; then
6720 echo "You are using a C++ compiler."
6723 echo "You are not using a C++ compiler."
6729 : is a C symbol defined?
6732 -v) tf=libc.tmp; tdc="";;
6733 -a) tf=libc.tmp; tdc="[]";;
6734 *) tlook="^$1\$"; tf=libc.list; tdc="()";;
6736 case "$d_cplusplus" in
6737 $define) extern_C="extern \"C\"" ;;
6738 *) extern_C="extern" ;;
6741 case "$reuseval-$4" in
6743 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
6748 if $test "$runnm" = true; then
6749 if $contains $tlook $tf >/dev/null 2>&1; then
6751 elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
6752 echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p() && p() != (void *)main) return(0); else return(1); }"> try.c;
6753 $cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true;
6754 $test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; };
6758 echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p() && p() != (void *)main) return(0); else return(1); }"> try.c;
6759 $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
6765 $define) tval=true;;
6772 : define an is-in-libc? function
6773 inlibc='echo " "; td=$define; tu=$undef;
6774 sym=$1; var=$2; eval "was=\$$2";
6776 case "$reuseval$was" in
6786 echo "$sym() found." >&4;
6787 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
6789 echo "$sym() NOT found." >&4;
6790 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
6794 $define) echo "$sym() found." >&4;;
6795 *) echo "$sym() NOT found." >&4;;
6799 : check for length of double
6801 case "$doublesize" in
6803 echo "Checking to see how big your double precision numbers are..." >&4
6812 printf("%d\n", (int)sizeof(double));
6817 if eval $compile_ok; then
6818 doublesize=`$run ./try`
6819 echo "Your double is $doublesize bytes long."
6822 echo "(I can't seem to compile the test program. Guessing...)"
6823 rp="What is the size of a double precision number (in bytes)?"
6831 : see if this is a float.h system
6835 : check for long doubles
6837 echo "Checking to see if you have long double..." >&4
6838 echo 'int main() { long double x = 7.0; }' > try.c
6840 if eval $compile; then
6842 echo "You have long double."
6845 echo "You do not have long double."
6851 : see if ldexpl exists
6855 : check for length of long double
6856 case "${d_longdbl}${longdblsize}" in
6859 echo "Checking to see how big your long doubles are..." >&4
6860 $cat >try.c <<'EOCP'
6864 printf("%d\n", sizeof(long double));
6869 if eval $compile; then
6870 longdblsize=`$run ./try`
6871 echo "Your long doubles are $longdblsize bytes long."
6875 echo "(I can't seem to compile the test program. Guessing...)" >&4
6876 rp="What is the size of a long double (in bytes)?"
6880 if $test "X$doublesize" = "X$longdblsize"; then
6881 echo "That isn't any different from an ordinary double."
6882 echo "I'll keep your setting anyway, but you may see some"
6883 echo "harmless compilation warnings."
6889 $echo "Checking the kind of long doubles you have..." >&4
6890 case "$d_longdbl" in
6895 #define LONGDBLSIZE $longdblsize
6896 #define DOUBLESIZE $doublesize
6904 static const long double d = -0.1L;
6906 unsigned const char* b = (unsigned const char*)(&d);
6907 #if DOUBLESIZE == LONGDBLSIZE
6908 printf("0\n"); /* if it floats like double */
6911 #if (LDBL_MANT_DIG == 113 || FLT128_MANT_DIG == 113) && LONGDBLSIZE == 16
6912 if (b[0] == 0x9A && b[1] == 0x99 && b[15] == 0xBF) {
6913 /* IEEE 754 128-bit little-endian */
6917 if (b[0] == 0xBF && b[14] == 0x99 && b[15] == 0x9A) {
6918 /* IEEE 128-bit big-endian, e.g. solaris sparc */
6923 /* For alignment 32-bit platforms have the 80 bits in 12 bytes,
6924 * while 64-bits platforms have it in 16 bytes. */
6925 #if LDBL_MANT_DIG == 64 && (LONGDBLSIZE == 16 || LONGDBLSIZE == 12)
6926 if (b[0] == 0xCD && b[9] == 0xBF && b[10] == 0x00) {
6927 /* x86 80-bit little-endian, sizeof 12 (ILP32, Solaris x86)
6928 * or 16 (LP64, Linux and OS X), 4 or 6 bytes of padding.
6929 * Also known as "extended precision". */
6933 if (b[0] == 0xBF && b[9] == 0xCD && b[10] == 0x00) {
6934 /* is there ever big-endian 80-bit, really? */
6939 #if (LDBL_MANT_DIG == 106 || LDBL_MANT_DIG == 107) && LONGDBLSIZE == 16
6940 /* software "double double", the 106 is 53+53.
6941 * but irix thinks it is 107. */
6942 if (b[0] == 0x9A && b[7] == 0x3C && b[8] == 0x9A && b[15] == 0xBF) {
6943 /* double double 128-bit little-endian,
6944 * 9a 99 99 99 99 99 59 3c 9a 99 99 99 99 99 b9 bf */
6948 if (b[0] == 0xBF && b[7] == 0x9A && b[8] == 0x3C && b[15] == 0x9A) {
6949 /* double double 128-bit big-endian, e.g. PPC/Power and MIPS:
6950 * bf b9 99 99 99 99 99 9a 3c 59 99 99 99 99 99 9a */
6955 printf("-1\n"); /* unknown */
6960 if eval $compile; then
6961 longdblkind=`$run ./try`
6968 case "$longdblkind" in
6969 0) echo "Your long doubles are doubles." >&4 ;;
6970 1) echo "You have IEEE 754 128-bit little endian long doubles." >&4 ;;
6971 2) echo "You have IEEE 754 128-bit big endian long doubles." >&4 ;;
6972 3) echo "You have x86 80-bit little endian long doubles." >& 4 ;;
6973 4) echo "You have x86 80-bit big endian long doubles." >& 4 ;;
6974 5) echo "You have 128-bit little-endian double-double long doubles." >& 4 ;;
6975 6) echo "You have 128-bit big-endian double-double long doubles." >& 4 ;;
6976 *) echo "Cannot figure out your long double." >&4 ;;
6980 : determine the architecture name
6982 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
6983 tarch=`arch`"-$osname"
6984 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
6985 if uname -m > tmparch 2>&1 ; then
6986 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
6987 -e 's/$/'"-$osname/" tmparch`
6995 case "$myarchname" in
6998 echo "(Your architecture name used to be $myarchname.)"
7002 case "$targetarch" in
7004 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
7009 *) dflt="$archname";;
7011 rp='What is your architecture name'
7015 : optionally add API version to the architecture for versioned archlibs
7016 case "$useversionedarchname" in
7017 $define|true|[yY]*) dflt='y';;
7020 rp='Add the Perl API version to your archname?'
7023 y|Y) useversionedarchname="$define" ;;
7024 *) useversionedarchname="$undef" ;;
7026 case "$useversionedarchname" in
7029 *-$api_versionstring)
7030 echo "...and architecture name already has -$api_versionstring" >&4
7033 archname="$archname-$api_versionstring"
7034 echo "...setting architecture name to $archname." >&4
7040 case "$usethreads" in
7042 echo "Threads selected." >&4
7044 *-thread*) echo "...and architecture name already has -thread." >&4
7046 *) archname="$archname-thread"
7047 echo "...setting architecture name to $archname." >&4
7052 case "$usemultiplicity" in
7054 echo "Multiplicity selected." >&4
7056 *-multi*) echo "...and architecture name already has -multi." >&4
7058 *) archname="$archname-multi"
7059 echo "...setting architecture name to $archname." >&4
7064 case "$use64bitint$use64bitall" in
7066 case "$archname64" in
7068 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
7071 case "$use64bitint" in
7072 "$define") echo "64 bit integers selected." >&4 ;;
7074 case "$use64bitall" in
7075 "$define") echo "Maximal 64 bitness selected." >&4 ;;
7078 *-$archname64*) echo "...and architecture name already has $archname64." >&4
7080 *) archname="$archname-$archname64"
7081 echo "...setting architecture name to $archname." >&4
7087 case "$uselongdouble" in
7089 echo "Long doubles selected." >&4
7090 case "$longdblsize" in
7092 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
7096 *-ld*) echo "...and architecture name already has -ld." >&4
7098 *) archname="$archname-ld"
7099 echo "...setting architecture name to $archname." >&4
7106 case "$usequadmath" in
7108 echo "quadmath selected." >&4
7110 *-ld*) echo "...and architecture name already has -quadmath." >&4
7112 *) archname="$archname-quadmath"
7113 echo "...setting architecture name to $archname." >&4
7118 if $test -f archname.cbu; then
7119 echo "Your platform has some specific hints for architecture name, using them..."
7123 : set the prefixit variable, to compute a suitable default value
7124 prefixit='case "$3" in
7126 case "$oldprefix" in
7127 "") eval "$1=\"\$$2\"";;
7134 ""|" ") eval "$1=\"\$$2\"";;
7140 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
7142 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
7143 /*-$oldprefix/*|\~*-$oldprefix/*)
7144 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
7145 *) eval "$1=\"\$$2\"";;
7149 : determine installation style
7150 : For now, try to deduce it from prefix unless it is already set.
7151 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
7152 case "$installstyle" in
7153 '') case "$prefix" in
7154 *perl*) dflt='lib';;
7155 *) dflt='lib/perl5' ;;
7158 *) dflt="$installstyle" ;;
7160 : Probably not worth prompting for this since we prompt for all
7161 : the directories individually, and the prompt would be too long and
7165 : determine where public executables go
7170 rp='Pathname where the public executables will reside?'
7172 if $test "X$ansexp" != "X$binexp"; then
7176 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
7177 : XXX If this is fixed, also fix the "start perl" hunk below, which relies on
7178 : this via initialinstalllocation
7181 case "$userelocatableinc" in
7182 $define|true|[yY]*) dflt='y' ;;
7187 Would you like to build Perl so that the installation is relocatable, so that
7188 library paths in @INC are determined relative to the path of the perl binary?
7189 This is not advised for system Perl installs, or if you need to run setid
7190 scripts or scripts under taint mode.
7192 If this doesn't make any sense to you, just accept the default '$dflt'.
7194 rp='Use relocatable @INC?'
7197 y|Y) val="$define" ;;
7200 set userelocatableinc
7203 initialinstalllocation="$binexp"
7204 : Default prefix is now "up one level from where the binaries are"
7205 case "$userelocatableinc" in
7211 installprefixexp=".../.."
7215 : determine where private library files go
7216 : Usual default is /usr/local/lib/perl5/$version.
7217 : Also allow things like /opt/perl/lib/$version, since
7218 : /opt/perl/lib/perl5... would be redundant.
7219 : The default "style" setting is made in installstyle.U
7220 case "$installstyle" in
7221 *lib/perl5*) set dflt privlib lib/$package/$version ;;
7222 *) set dflt privlib lib/$version ;;
7227 There are some auxiliary files for $package that need to be put into a
7228 private library directory that is accessible by everyone.
7233 rp='Pathname where the private library files will reside?'
7238 : set the prefixup variable, to restore leading tilda escape
7239 prefixup='case "$prefixexp" in
7241 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
7244 : determine where public architecture dependent libraries go
7247 : privlib default is /usr/local/lib/$package/$version
7248 : archlib default is /usr/local/lib/$package/$version/$archname
7249 : privlib may have an optional trailing /share.
7250 tdflt=`echo $privlib | $sed 's,/share$,,'`
7251 tdflt=$tdflt/$archname
7260 $spackage contains architecture-dependent library files. If you are
7261 sharing libraries in a heterogeneous environment, you might store
7262 these files in a separate location. Otherwise, you can just include
7263 them with the rest of the public library files.
7268 rp='Where do you want to put the public architecture-dependent libraries?'
7272 if $test X"$archlib" = X"$privlib"; then
7278 : see if setuid scripts can be secure
7281 Some kernels have a bug that prevents setuid #! scripts from being
7282 secure. Some sites have disabled setuid #! scripts because of this.
7284 First let's decide if your kernel supports secure setuid #! scripts.
7285 (If setuid #! scripts would be secure but have been disabled anyway,
7286 don't say that they are secure if asked.)
7291 if $test -d /dev/fd; then
7292 echo "#!$ls" >reflect
7293 chmod +x,u+s reflect
7294 ./reflect >flect 2>&1
7295 if $contains "/dev/fd" flect >/dev/null; then
7296 echo "Congratulations, your kernel has secure setuid scripts!" >&4
7300 If you are not sure if they are secure, I can check but I'll need a
7301 username and password different from the one you are using right now.
7302 If you don't have such a username or don't want me to test, simply
7306 rp='Other username to test security of setuid scripts with?'
7311 case "$d_suidsafe" in
7312 '') echo "I'll assume setuid scripts are *not* secure." >&4
7315 echo "Well, the $hint value is *not* secure." >&4
7317 *) echo "Well, the $hint value *is* secure." >&4
7322 $rm -f reflect flect
7323 echo "#!$ls" >reflect
7324 chmod +x,u+s reflect
7327 echo '"su" will (probably) prompt you for '"$ans's password."
7328 su $ans -c './reflect >flect'
7329 if $contains "/dev/fd" flect >/dev/null; then
7330 echo "Okay, it looks like setuid scripts are secure." >&4
7333 echo "I don't think setuid scripts are secure." >&4
7338 rp='Does your kernel have *secure* setuid scripts?'
7341 [yY]*) val="$define";;
7346 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
7347 echo "(That's for file descriptors, not floppy disks.)"
7353 $rm -f reflect flect
7355 : now see if they want to do setuid emulation
7356 if $test $patchlevel -lt 11; then
7359 case "$d_suidsafe" in
7362 echo "No need to emulate SUID scripts since they are secure here." >&4
7366 Some systems have disabled setuid scripts, especially systems where
7367 setuid scripts cannot be secure. On systems where setuid scripts have
7368 been disabled, the setuid/setgid bits on scripts are currently
7369 useless. It is possible for $package to detect those bits and emulate
7370 setuid/setgid in a secure fashion. This emulation will only work if
7371 setuid scripts have been disabled in your kernel.
7375 "$define") dflt=y ;;
7378 rp="Do you want to do setuid/setgid emulation?"
7381 [yY]*) val="$define";;
7393 SUID emulation has been removed for 5.12
7394 Please re-run Configure without -Dd_dosuid
7403 : Find perl5.005 or later.
7404 echo "Looking for a previously installed perl5.005 or later... "
7406 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
7407 : Check if this perl is recent and can load a simple module
7408 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7411 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7421 '') echo "None found. That's ok.";;
7422 *) echo "Using $perl5." ;;
7425 : Set the siteprefix variables
7428 After $package is installed, you may wish to install various
7429 add-on modules and utilities. Typically, these add-ons will
7430 be installed under $prefix with the rest
7431 of this package. However, you may wish to install such add-ons
7432 elsewhere under a different prefix.
7434 If you do not wish to put everything under a single prefix, that's
7435 ok. You will be prompted for the individual locations; this siteprefix
7436 is only used to suggest the defaults.
7438 The default should be fine for most people.
7442 rp='Installation prefix to use for add-on modules and utilities?'
7443 : XXX Here might be another good place for an installstyle setting.
7444 case "$siteprefix" in
7446 *) dflt=$siteprefix ;;
7449 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7451 case "$siteprefix" in
7455 *) oldsiteprefix="$prefix";;
7460 siteprefixexp="$ansexp"
7462 : determine where site specific libraries go.
7463 : Usual default is /usr/local/lib/perl5/site_perl/$version
7464 : The default "style" setting is made in installstyle.U
7465 : XXX No longer works with Prefixit stuff.
7466 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7468 '') case "$installstyle" in
7469 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
7470 *) dflt=$siteprefix/lib/site_$prog/$version ;;
7478 The installation process will create a directory for
7479 site-specific extensions and modules. Most users find it convenient
7480 to place all site-specific files in this directory rather than in the
7481 main distribution directory.
7485 rp='Pathname for the site-specific library files?'
7489 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
7491 : Determine list of previous versions to include in @INC
7492 $cat > getverlist <<EOPL
7495 \$api_versionstring = "$api_versionstring";
7496 \$version = "$version";
7497 \$stem = "$sitelib_stem";
7498 \$archname = "$archname";
7500 $cat >> getverlist <<'EOPL'
7501 # The list found is store twice for each entry: the original name, and
7502 # the binary broken down version as pack "sss", so sorting is easy and
7503 # unambiguous. This will work for all versions that have a maximum of
7504 # three digit groups, separate by '.'s or '_'s. Names are extended with
7505 # ".0.0" to ensure at least three elements for the pack.
7506 # -- H.Merijn Brand (m)'06 23-10-2006
7508 # Can't have leading @ because metaconfig interprets it as a command!
7509 ;@inc_version_list=();
7510 # XXX Redo to do opendir/readdir?
7513 ;@candidates = map {
7514 [ $_, pack "sss", split m/[._]/, "$_.0.0" ] } glob("5.*");
7515 ;@candidates = sort { $a->[1] cmp $b->[1]} @candidates;
7521 ($pversion, $aversion, $vsn5005) = map {
7522 pack "sss", split m/[._]/, "$_.0.0" } $version, $api_versionstring, "5.005";
7523 foreach $d (@candidates) {
7524 if ($d->[1] lt $pversion) {
7525 if ($d->[1] ge $aversion) {
7526 unshift(@inc_version_list, grep { -d } $d->[0]."/$archname", $d->[0]);
7528 elsif ($d->[1] ge $vsn5005) {
7529 unshift(@inc_version_list, grep { -d } $d->[0]);
7533 # Skip newer version. I.e. don't look in
7534 # 5.7.0 if we're installing 5.6.1.
7538 if (@inc_version_list) {
7539 print join(' ', @inc_version_list);
7542 # Blank space to preserve value for next Configure run.
7547 case "$inc_version_list" in
7548 '') if test -x "$perl5$exe_ext"; then
7549 dflt=`$perl5 getverlist`
7554 $undef) dflt='none' ;;
7555 *) eval dflt=\"$inc_version_list\" ;;
7558 ''|' ') dflt=none ;;
7565 In order to ease the process of upgrading, this version of perl
7566 can be configured to use modules built and installed with earlier
7567 versions of perl that were installed under $prefix. Specify here
7568 the list of earlier versions that this version of perl should check.
7569 If Configure detected no earlier versions of perl installed under
7570 $prefix, then the list will be empty. Answer 'none' to tell perl
7571 to not search earlier versions.
7573 The default should almost always be sensible, so if you're not sure,
7574 just accept the default.
7577 rp='List of earlier versions to include in @INC?'
7580 [Nn]one|''|' '|$undef) inc_version_list=' ' ;;
7581 *) inc_version_list="$ans" ;;
7583 case "$inc_version_list" in
7585 inc_version_list_init='0'
7586 d_inc_version_list="$undef"
7588 *) inc_version_list_init=`echo $inc_version_list |
7589 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
7590 d_inc_version_list="$define"
7595 : see if malloc/malloc.h has to be included
7596 set malloc/malloc.h i_mallocmalloc
7599 : see if this is a malloc.h system
7600 : we want a real compile instead of Inhdr because some systems have a
7601 : malloc.h that just gives a compile error saying to use stdlib.h instead
7606 #$i_mallocmalloc I_MALLOCMALLOC
7607 #ifdef I_MALLOCMALLOC
7608 # include <malloc/malloc.h>
7611 int main () { return 0; }
7614 if eval $compile; then
7615 echo "<malloc.h> found." >&4
7618 echo "<malloc.h> NOT found." >&4
7625 : check for length of pointer
7629 echo "Checking to see how big your pointers are..." >&4
7638 printf("%d\n", (int)sizeof(void *));
7643 if eval $compile_ok; then
7644 ptrsize=`$run ./try`
7645 echo "Your pointers are $ptrsize bytes long."
7648 echo "(I can't seem to compile the test program. Guessing...)" >&4
7649 rp="What is the size of a pointer (in bytes)?"
7656 case "$use64bitall" in
7657 "$define"|true|[yY]*)
7661 *** You have chosen a maximally 64-bit build,
7662 *** but your pointers are only 4 bytes wide.
7663 *** Please rerun Configure without -Duse64bitall.
7668 *** Since you have quads, you could possibly try with -Duse64bitint.
7673 *** Cannot continue, aborting.
7684 : determine whether to use malloc wrapping
7686 case "$usemallocwrap" in
7687 [yY]*|true|$define) dflt='y' ;;
7688 [nN]*|false|$undef) dflt='n' ;;
7689 *) case "$usedevel" in
7690 [yY]*|true|$define) dflt='y' ;;
7695 rp="Do you wish to wrap malloc calls to protect against potential overflows?"
7697 usemallocwrap="$ans"
7700 usemallocwrap="$define" ;;
7702 usemallocwrap="$undef" ;;
7705 : determine which malloc to compile in
7707 case "$usemymalloc" in
7708 [yY]*|true|$define) dflt='y' ;;
7709 [nN]*|false|$undef) dflt='n' ;;
7710 *) case "$ptrsize" in
7714 if test "$useithreads" = "$define"; then dflt='n'; fi
7717 rp="Do you wish to attempt to use the malloc that comes with $package?"
7723 mallocsrc='malloc.c'
7724 mallocobj="malloc$_o"
7725 d_mymalloc="$define"
7728 : Remove malloc from list of libraries to use
7729 echo "Removing unneeded -lmalloc from library list" >&4
7730 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
7733 echo "libs = $libs" >&4
7745 : compute the return types of malloc and free
7747 $cat >malloc.c <<END
7751 #include <sys/types.h>
7765 case "$malloctype" in
7767 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
7774 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
7778 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
7785 echo "Your system uses $freetype free(), it would seem." >&4
7787 : determine where site specific architecture-dependent libraries go.
7788 : sitelib default is /usr/local/lib/perl5/site_perl/$version
7789 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
7790 : sitelib may have an optional trailing /share.
7792 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
7793 dflt="$dflt/$archname"
7798 set sitearch sitearch none
7802 The installation process will also create a directory for
7803 architecture-dependent site-specific extensions and modules.
7807 rp='Pathname for the site-specific architecture-dependent library files?'
7811 if $test X"$sitearch" = X"$sitelib"; then
7814 d_sitearch="$define"
7817 : Set the vendorprefix variables
7820 The installation process will also create a directory for
7821 vendor-supplied add-ons. Vendors who supply perl with their system
7822 may find it convenient to place all vendor-supplied files in this
7823 directory rather than in the main distribution directory. This will
7824 ease upgrades between binary-compatible maintenance versions of perl.
7826 Of course you may also use these directories in whatever way you see
7827 fit. For example, you might use them to access modules shared over a
7828 company-wide network.
7830 The default answer should be fine for most people.
7831 This causes further questions about vendor add-ons to be skipped
7832 and no vendor-specific directories will be configured for perl.
7835 rp='Do you want to configure vendor-specific add-on directories?'
7836 case "$usevendorprefix" in
7837 define|true|[yY]*) dflt=y ;;
7838 *) : User may have set vendorprefix directly on Configure command line.
7839 case "$vendorprefix" in
7848 rp='Installation prefix to use for vendor-supplied add-ons?'
7849 case "$vendorprefix" in
7850 '') dflt="$prefix" ;;
7851 *) dflt=$vendorprefix ;;
7854 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7856 case "$vendorprefix" in
7860 *) oldvendorprefix="$prefix";;
7864 usevendorprefix="$define"
7866 vendorprefixexp="$ansexp"
7868 *) usevendorprefix="$undef"
7874 : Set the vendorlib variables
7875 case "$vendorprefix" in
7876 '') d_vendorlib="$undef"
7880 *) d_vendorlib="$define"
7881 : determine where vendor-supplied modules go.
7882 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
7883 case "$vendorlib" in
7885 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7886 case "$installstyle" in
7887 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
7888 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
7891 *) dflt="$vendorlib"
7895 rp='Pathname for the vendor-supplied library files?'
7898 vendorlibexp="$ansexp"
7901 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
7905 : Set the vendorarch variables
7906 case "$vendorprefix" in
7907 '') d_vendorarch="$undef"
7911 *) d_vendorarch="$define"
7912 : determine where vendor-supplied architecture-dependent libraries go.
7913 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
7914 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
7915 : vendorlib may have an optional trailing /share.
7916 case "$vendorarch" in
7917 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
7918 dflt="$dflt/$archname"
7920 *) dflt="$vendorarch" ;;
7923 rp='Pathname for vendor-supplied architecture-dependent files?'
7926 vendorarchexp="$ansexp"
7929 prefixvar=vendorarch
7931 if $test X"$vendorarch" = X"$vendorlib"; then
7932 d_vendorarch="$undef"
7934 d_vendorarch="$define"
7937 : Final catch-all directories to search
7940 Lastly, you can have perl look in other directories for extensions and
7941 modules in addition to those already specified.
7942 These directories will be searched after
7946 test X"$vendorlib" != "X" && echo ' ' $vendorlib
7947 test X"$vendorarch" != "X" && echo ' ' $vendorarch
7949 case "$otherlibdirs" in
7950 ''|' ') dflt='none' ;;
7951 *) dflt="$otherlibdirs" ;;
7954 Enter a colon-separated set of extra paths to include in perl's @INC
7955 search path, or enter 'none' for no extra paths.
7959 rp='Colon-separated list of additional directories for perl to search?'
7962 ' '|''|none) otherlibdirs=' ' ;;
7963 *) otherlibdirs="$ans" ;;
7965 case "$otherlibdirs" in
7969 set d_perl_otherlibdirs
7972 : Cruising for prototypes
7974 echo "Checking out function prototypes..." >&4
7975 $cat >prototype.c <<EOCP
7980 int main(int argc, char *argv[]) {
7983 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
7984 echo "Your C compiler appears to support function prototypes."
7987 echo "Your C compiler doesn't seem to understand function prototypes."
7994 : Check if ansi2knr is required
7995 case "$prototype" in
7997 *) ansi2knr='ansi2knr'
8002 This version of $package can only be compiled by a compiler that
8003 understands function prototypes. Unfortunately, your C compiler
8005 doesn't seem to understand them. Sorry about that.
8007 If GNU cc is available for your system, perhaps you could try that instead.
8009 Eventually, we hope to support building Perl with pre-ANSI compilers.
8010 If you would like to help in that effort, please contact <perlbug@perl.org>.
8012 Aborting Configure now.
8019 dflt_dtrace='/usr/sbin/dtrace'
8020 $test -x /usr/bin/dtrace && dflt_dtrace='/usr/bin/dtrace'
8024 Perl can be built to support DTrace on platforms that support it.
8025 DTrace is a diagnosis and performance analysis tool from Sun.
8027 If this doesn't make any sense to you, just accept the default '$dflt'.
8031 case "$usedtrace" in
8037 dflt_dtrace=$usedtrace
8044 rp='Support DTrace if available?'
8047 y|Y) val="$define" ;;
8053 test "X$usedtrace" != "X$define" && break
8056 rp='Where is the dtrace executable?'
8065 if $dtrace -h -s ../perldtrace.d \
8066 -o perldtrace.tmp >/dev/null 2>&1 \
8067 && rm -f perldtrace.tmp
8070 echo "Good: your $dtrace knows about the -h flag."
8074 *** $me: Fatal Error: $dtrace doesn't support -h flag
8076 *** Your installed dtrace doesn't support the -h switch to compile a D
8077 *** program into a C header. Can't continue.
8089 *** $me: Fatal Error: $dtrace not found.
8096 echo "*** $dtrace was not found."
8102 : See if we want extra modules installed
8109 Perl can be built with extra modules or bundles of modules which
8110 will be fetched from the CPAN and installed alongside Perl.
8112 Notice that you will need access to the CPAN; either via the Internet,
8113 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
8114 be asked later to configure the CPAN.pm module which will in turn do
8115 the installation of the rest of the extra modules or bundles.)
8117 Notice also that if the modules require any external software such as
8118 libraries and headers (the libz library and the zlib.h header for the
8119 Compress::Zlib module, for example) you MUST have any such software
8120 already installed, this configuration process will NOT install such
8123 If this doesn't make any sense to you, just accept the default '$dflt'.
8125 rp='Install any extra modules (y or n)?'
8131 Please list any extra modules or bundles to be installed from CPAN,
8132 with spaces between the names. The names can be in any format the
8133 'install' command of CPAN.pm will understand. (Answer 'none',
8134 without the quotes, to install no extra modules or bundles.)
8144 $rm -f ../extras.lst
8146 *) echo "(Saving the list of extras for later...)"
8147 echo "$extras" > ../extras.lst
8155 : determine where html pages for programs go
8156 set html1dir html1dir none
8160 If you wish to install html files for programs in $spackage, indicate
8161 the appropriate directory here. To skip installing html files,
8165 ''|none|$undef|' ') dflt=none ;;
8166 *) dflt=$html1dir ;;
8169 rp="Directory for the main $spackage html pages?"
8173 : Use ' ' for none so value is preserved next time through Configure
8174 $test X"$html1dir" = "X" && html1dir=' '
8176 : determine where html pages for libraries and modules go
8177 set html3dir html3dir none
8181 If you wish to install html files for modules associated with $spackage,
8182 indicate the appropriate directory here. To skip installing html files,
8185 : There is no obvious default. If they have specified html1dir, then
8186 : try to key off that, possibly changing .../html1 into .../html3.
8188 '') html3dir=`echo "$html1dir" | $sed 's/1$/3$/'` ;;
8189 *) dflt=$html3dir ;;
8192 rp="Directory for the $spackage module html pages?"
8196 : Use ' ' for none so value is preserved next time through Configure
8197 $test X"$html3dir" = "X" && html3dir=' '
8199 : determine whether to install perl also as /usr/bin/perl
8202 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
8204 Many scripts expect perl to be installed as /usr/bin/perl.
8206 If you want to, I can install the perl you are about to compile
8207 as /usr/bin/perl (in addition to $bin/perl).
8209 if test -f /usr/bin/perl; then
8212 However, please note that because you already have a /usr/bin/perl,
8213 overwriting that with a new Perl would very probably cause problems.
8214 Therefore I'm assuming you don't want to do that (unless you insist).
8217 case "$installusrbinperl" in
8218 "$define"|[yY]*) dflt='y';;
8224 Since you don't have a /usr/bin/perl I'm assuming creating one is okay.
8227 case "$installusrbinperl" in
8228 "$undef"|[nN]*) dflt='n';;
8232 rp="Do you want to install perl as /usr/bin/perl?"
8235 [yY]*) val="$define";;
8241 set installusrbinperl
8244 : see if dlopen exists
8246 xxx_ccflags="$ccflags"
8248 : with g++ one needs -shared to get is-in-libc to work for dlopen
8249 case "$gccversion" in
8251 *) case "$d_cplusplus" in
8252 "$define") ccflags="$ccflags -shared" ;;
8259 ccflags="$xxx_ccflags"
8261 : see if this is a unistd.h system
8262 set unistd.h i_unistd
8265 : determine which dynamic loading, if any, to compile in
8267 dldir="ext/DynaLoader"
8280 $define) dflt='y' ;;
8282 : Does a dl_xxx.xs file exist for this operating system
8283 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
8286 rp="Do you wish to use dynamic loading?"
8293 '') if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
8294 dflt="$dldir/dl_${osname}.xs"
8295 elif $test "$d_dlopen" = "$define" ; then
8296 dflt="$dldir/dl_dlopen.xs"
8301 *) dflt="$dldir/$dlsrc"
8304 echo "The following dynamic loading files are available:"
8305 : Can not go over to $dldir because getfile has path hard-coded in.
8306 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
8307 rp="Source file to use for dynamic loading"
8313 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
8317 Some systems may require passing special flags to $cc -c to
8318 compile modules that will be used to create a shared library.
8319 To use no flags, say "none".
8322 case "$cccdlflags" in
8323 '') case "$gccversion" in
8324 '') case "$osname" in
8326 irix*) dflt='-KPIC' ;;
8327 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
8328 sunos) dflt='-pic' ;;
8332 *) case "$osname" in
8333 darwin) dflt='none' ;;
8334 *linux*|svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
8339 *) dflt="$cccdlflags" ;;
8346 # If -Dsysroot was specified, now's the time to add it
8348 if test "X$sysroot" != X; then
8349 case "$gccversion" in
8354 dflt="$dflt --sysroot=$sysroot" ;;
8364 rp="Any special flags to pass to $cc -c to compile shared library modules?"
8367 none) cccdlflags=' ' ;;
8368 *) cccdlflags="$ans" ;;
8373 Some systems use ld to create libraries that can be dynamically loaded,
8374 while other systems (such as those using ELF) use $cc.
8378 : Determine if this is ELF
8380 /* Test for whether ELF binaries are produced */
8392 int i = open("a.out",O_RDONLY);
8395 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
8396 exit(0); /* succeed (yes, it is ELF) */
8400 if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
8406 '') if $test $bin_ELF = "$define"; then
8408 You appear to have ELF support. I'll use $cc to build dynamic libraries.
8412 echo "I'll use ld to build dynamic libraries."
8420 rp="What command should be used to create dynamic libraries?"
8426 Some systems may require passing special flags to $ld to create a
8427 library that can be dynamically loaded. If your ld flags include
8428 -L/other/path options to locate libraries outside your loader's normal
8429 search path, you may need to specify those -L options here as well. To
8430 use no flags, say "none".
8433 case "$lddlflags" in
8434 '') case "$osname" in
8435 haiku) dflt='-shared' ;;
8437 case "$gccversion" in
8438 '') dflt="$dflt +vnocompatwarnings" ;;
8441 *linux*|irix*|gnu*) dflt="-shared $optimize" ;;
8442 solaris) # See [perl #66604].
8443 # On Solaris 11, gcc -m64 on amd64
8444 # appears not to understand -G. gcc versions at
8445 # least as old as 3.4.3 support -shared, so just
8446 # use that with Solaris 11 and later, but keep
8447 # the old behavior for older Solaris versions.
8448 case "$gccversion" in
8450 *) case "$osvers" in
8451 2.?|2.10) dflt='-G' ;;
8452 *) dflt='-shared' ;;
8457 sunos) dflt='-assert nodefinitions' ;;
8458 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
8462 *) dflt="$lddlflags" ;;
8465 : Only do this for gcc, since, for example, qcc has no concept
8467 if $test "X$sysroot" != X; then
8468 case "$gccversion" in
8470 *) dflt="$dflt --sysroot $sysroot" ;;
8474 : Try to guess additional flags to pick up local libraries.
8475 : Be careful not to append to a plain 'none'
8479 for thisflag in $ldflags; do
8484 *) dflt="$dflt $thisflag" ;;
8491 ''|' ') dflt='none' ;;
8495 *-fstack-protector-strong*)
8497 *-fstack-protector-strong*) ;; # Don't add it again
8498 *) dflt="$dflt -fstack-protector-strong" ;;
8501 *-fstack-protector*)
8503 *-fstack-protector*) ;; # Don't add it again
8504 *) dflt="$dflt -fstack-protector" ;;
8509 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
8512 none) lddlflags=' ' ;;
8513 *) lddlflags="$ans" ;;
8518 Some systems may require passing special flags to $cc to indicate that
8519 the resulting executable will use dynamic linking. To use no flags,
8523 case "$ccdlflags" in
8524 '') case "$osname" in
8525 *linux*|hpux|gnu*) dflt='-Wl,-E' ;;
8526 sunos) dflt='none' ;;
8530 *) dflt="$ccdlflags" ;;
8532 rp="Any special flags to pass to $cc to use dynamic linking?"
8535 none) ccdlflags=' ' ;;
8536 *) ccdlflags="$ans" ;;
8548 ld_can_script="$undef"
8549 case "$bin_ELF$usedl" in
8551 # Abuse try.h and a.out names for neat cleanup
8563 if $cc $cccdlflags $ccdlflags $ccflags \
8564 $ldflags $lddlflags -o a.out try.c \
8565 -Wl,--version-script=try.h >/dev/null 2>&1 \
8566 && $test -s a.out ; then
8567 echo "ld supports scripting" >&4
8568 ld_can_script="$define"
8570 echo "ld does not support scripting" >&4
8576 : Do we want a shared libperl?
8580 # No dynamic loading being used, so don't bother even to prompt.
8583 *) case "$useshrplib" in
8584 '') case "$osname" in
8585 svr4*|nonstopux|dgux|dynixptx|esix|powerux|haiku|cygwin*)
8587 also='Building a shared libperl is required for dynamic loading to work on your system.'
8601 The perl executable is normally obtained by linking perlmain.c with
8602 libperl${_a}, any static extensions (usually just DynaLoader), and
8603 any other libraries needed on this system (such as -lm, etc.). Since
8604 your system supports dynamic loading, it is probably possible to build
8605 a shared libperl.$so. If you will have more than one executable linked
8606 to libperl.$so, this will significantly reduce the size of each
8607 executable, but it may have a noticeable effect on performance. The
8608 default is probably sensible for your system.
8612 rp="Build a shared libperl.$so (y/n)"
8616 useshrplib='true' ;;
8617 *) useshrplib='false' ;;
8622 case "$useshrplib" in
8624 case "$userelocatableinc" in
8626 echo "Cannot build with both -Duserelocatableinc and -Duseshrplib" >&4
8627 echo "See INSTALL for an explanation why that won't work." >&4
8633 # Figure out a good name for libperl.so. Since it gets stored in
8634 # a version-specific architecture-dependent library, the version
8635 # number isn't really that important, except for making cc/ld happy.
8637 # A name such as libperl.so.10.1
8638 majmin="libperl.$so.$patchlevel.$subversion"
8639 # A name such as libperl.so.100
8640 majonly=`echo $patchlevel $subversion |
8641 $awk '{printf "%d%02d", $1, $2}'`
8642 majonly=libperl.$so.$majonly
8643 # I'd prefer to keep the os-specific stuff here to a minimum, and
8644 # rely on figuring it out from the naming of libc.
8645 case "${osname}${osvers}" in
8646 *linux*|gnu*) # ld won't link with a bare -lperl otherwise.
8649 cygwin*) # ld links now against the dll directly
8650 majmin="cygperl5_${patchlevel}_${subversion}.${so}"
8651 majonly=`echo $patchlevel $subversion |
8652 $awk '{printf "%03d%03d", $1, $2}'`
8653 majonly=cygperl5.$majonly.$so
8656 *) # Try to guess based on whether libc has major.minor.
8658 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
8659 *libc.$so.[0-9]*) dflt=$majonly ;;
8660 *) dflt=libperl.$so ;;
8670 I need to select a good name for the shared libperl. If your system uses
8671 library names with major and minor numbers, then you might want something
8672 like $majmin. Alternatively, if your system uses a single version
8673 number for shared libraries, then you might want to use $majonly.
8674 Or, your system might be quite happy with a simple libperl.$so.
8676 Since the shared libperl will get installed into a version-specific
8677 architecture-dependent directory, the version number of the shared perl
8678 library probably isn't important, so the default should be o.k.
8681 rp='What name do you want to give to the shared libperl?'
8684 echo "Ok, I'll use $libperl"
8687 libperl="libperl${_a}"
8691 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
8695 WARNING: Use of the shrpdir variable for the installation location of
8696 the shared $libperl is not supported. It was never documented and
8697 will not work in this version. Let me (perlbug@perl.org)
8698 know of any problems this may cause.
8704 But your current setting of $shrpdir is
8705 the default anyway, so it's harmless.
8710 Further, your current attempted setting of $shrpdir
8711 conflicts with the value of $archlibexp/CORE
8712 that installperl will use.
8719 # How will the perl executable find the installed shared $libperl?
8720 # Add $xxx to ccdlflags.
8721 # If we can't figure out a command-line option, use $shrpenv to
8722 # set env LD_RUN_PATH. The main perl makefile uses this.
8723 shrpdir=$archlibexp/CORE
8726 if "$useshrplib"; then
8729 # We'll set it in Makefile.SH...
8734 freebsd|mirbsd|netbsd|openbsd|interix|dragonfly|bitrig)
8735 xxx="-Wl,-R$shrpdir"
8737 bsdos|linux|irix*|dec_osf|gnu*|haiku)
8738 xxx="-Wl,-rpath,$shrpdir"
8741 # hpux doesn't like the default, either.
8742 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
8745 # cygwin needs only ldlibpth
8748 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
8754 # Only add $xxx if it isn't already in ccdlflags.
8755 case " $ccdlflags " in
8757 *) ccdlflags="$ccdlflags $xxx"
8760 Adding $xxx to the flags
8761 passed to $ld so that the perl executable will find the
8762 installed shared $libperl.
8770 # Fix ccdlflags in AIX for building external extensions.
8771 # (For building Perl itself bare -bE:perl.exp is needed,
8772 # Makefile.SH takes care of this.)
8774 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
8776 # Respect a hint or command-line value.
8778 '') shrpenv="$tmp_shrpenv" ;;
8780 case "$ldlibpthname" in
8781 '') ldlibpthname=LD_LIBRARY_PATH ;;
8782 none) ldlibpthname='' ;;
8785 : determine where manual pages are on this system
8789 syspath='/usr/share/man/man1 /usr/man/man1'
8790 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
8791 syspath="$syspath /usr/man/u_man/man1"
8792 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
8793 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
8794 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
8795 sysman=`./loc . /usr/man/man1 $syspath`
8798 if $test -d "$sysman"; then
8799 echo "System manual is in $sysman." >&4
8801 echo "Could not find manual pages in source form." >&4
8804 : determine where manual pages go
8805 set man1dir man1dir none
8809 $spackage has manual pages available in source form.
8813 echo "However, you don't have nroff, so they're probably useless to you."
8815 '') man1dir="none";;
8818 echo "If you don't want the manual sources installed, answer 'none'."
8823 lookpath="$prefixexp/share/man/man1"
8824 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
8825 lookpath="$lookpath $prefixexp/man/p_man/man1"
8826 lookpath="$lookpath $prefixexp/man/u_man/man1"
8827 lookpath="$lookpath $prefixexp/man/man.1"
8829 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
8830 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
8840 rp="Where do the main $spackage manual pages (source) go?"
8842 if $test "X$man1direxp" != "X$ansexp"; then
8853 : What suffix to use on installed man pages
8860 rp="What suffix should be used for the main $spackage man pages?"
8862 '') case "$man1dir" in
8876 *) dflt="$man1ext";;
8883 : see if we can have long filenames
8885 first=123456789abcdef
8887 if (echo hi >$first) 2>/dev/null; then
8888 if $test -f 123456789abcde; then
8889 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
8892 echo 'You can have filenames longer than 14 characters.'>&4
8897 You can't have filenames longer than 14 chars.
8898 You can't even think about them!
8904 $rm -rf 123456789abcde*
8906 : determine where library module manual pages go
8907 set man3dir man3dir none
8911 $spackage has manual pages for many of the library modules.
8917 However, you don't have nroff, so they're probably useless to you.
8920 '') man3dir="none";;
8924 case "$d_flexfnam" in
8927 However, your system can't handle the long file names like File::Basename.3.
8930 '') man3dir="none";;
8934 echo "If you don't want the manual sources installed, answer 'none'."
8935 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
8937 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
8938 if $test -d "$privlib/man/man3"; then
8941 WARNING: Previous versions of perl installed man3 pages into
8942 $privlib/man/man3. This version will suggest a
8943 new default of $dflt.
8947 rp='Do you wish to preserve the old behavior?(y/n)'
8950 y*) dflt="$privlib/man/man3" ;;
8955 *) dflt="$man3dir" ;;
8962 rp="Where do the $package library man pages (source) go?"
8972 : What suffix to use on installed man pages
8978 rp="What suffix should be used for the $package library man pages?"
8980 '') case "$man3dir" in
8994 *) dflt="$man3ext";;
9001 : see if we have to deal with yellow pages, now NIS.
9002 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
9008 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
9016 rp='Are you getting the hosts file via yellow pages?'
9019 y*) hostcat='ypcat hosts';;
9020 *) hostcat='cat /etc/hosts';;
9026 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
9029 '') test -f /etc/group && groupcat='cat /etc/group';;
9032 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
9035 : now get the host name
9037 echo "Figuring out host name..." >&4
9038 case "$myhostname" in
9040 echo 'Maybe "hostname" will work...'
9041 if tans=`sh -c hostname 2>&1` ; then
9049 if $test "$cont"; then
9051 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
9052 if tans=`cat /etc/systemid 2>&1` ; then
9054 phostname='cat /etc/systemid'
9055 echo "Whadyaknow. Xenix always was a bit strange..."
9058 elif $test -r /etc/systemid; then
9059 echo "(What is a non-Xenix system doing with /etc/systemid?)"
9062 if $test "$cont"; then
9063 echo 'No, maybe "uuname -l" will work...'
9064 if tans=`sh -c 'uuname -l' 2>&1` ; then
9066 phostname='uuname -l'
9068 echo 'Strange. Maybe "uname -n" will work...'
9069 if tans=`sh -c 'uname -n' 2>&1` ; then
9071 phostname='uname -n'
9073 echo 'Oh well, maybe I can mine it out of whoami.h...'
9074 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
9075 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
9076 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
9078 case "$myhostname" in
9079 '') echo "Does this machine have an identity crisis or something?"
9082 echo "Well, you said $myhostname before..."
9083 phostname='echo $myhostname';;
9089 case "$myhostname" in
9090 '') myhostname=noname ;;
9092 : you do not want to know about this
9097 if $test "$myhostname" ; then
9099 rp='Your host name appears to be "'$myhostname'".'" Right?"
9107 : bad guess or no guess
9108 while $test "X$myhostname" = X ; do
9110 rp="Please type the (one word) name of your host:"
9115 : translate upper to lower if necessary
9116 case "$myhostname" in
9118 echo "(Normalizing case in your host name)"
9119 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
9123 case "$myhostname" in
9125 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
9126 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
9127 echo "(Trimming domain name from host name--host name is now $myhostname)"
9129 *) case "$mydomain" in
9132 test "X$hostcat" = "Xypcat hosts" &&
9133 ypmatch "$myhostname" hosts 2>/dev/null |\
9134 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
9137 test "X$hostcat" != "X" &&
9138 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
9139 /[ ]$myhostname[ . ]/p" > hosts
9142 if $test -f hosts; then
9143 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
9144 END { print sum }" hosts` = x1 || tmp_re="[ ]"
9145 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
9146 hosts | $sort | $uniq | \
9147 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
9148 case `$echo X$dflt` in
9149 X*\ *) echo "(Several hosts in the database matched hostname)"
9152 X.) echo "(You do not have fully-qualified names in the hosts database)"
9156 echo "(I cannot locate a hosts database anywhere)"
9161 tans=`./loc resolv.conf X /etc /usr/etc`
9162 if $test -f "$tans"; then
9163 echo "(Attempting domain name extraction from $tans)"
9164 dflt=.`$sed -n -e 's/ / /g' \
9165 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
9168 .) dflt=.`$sed -n -e 's/ / /g' \
9169 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
9177 .) echo "(No help from resolv.conf either -- attempting clever guess)"
9178 dflt=.`sh -c domainname 2>/dev/null`
9181 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
9185 case "$dflt$osname" in
9186 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
9187 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
9191 .) echo "(Lost all hope -- silly guess then)"
9197 *) dflt="$mydomain";;
9201 rp="What is your domain name?"
9211 : translate upper to lower if necessary
9214 echo "(Normalizing case in your domain name)"
9215 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
9219 : a little sanity check here
9220 case "$phostname" in
9223 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
9224 $myhostname$mydomain|$myhostname) ;;
9226 case "$phostname" in
9228 echo "(That doesn't agree with your whoami.h file, by the way.)"
9231 echo "(That doesn't agree with your $phostname command, by the way.)"
9239 : determine the e-mail address of the user who is running us
9242 I need to get your e-mail address in Internet format if possible, i.e.
9243 something like user@host.domain. Please answer accurately since I have
9244 no easy means to double check it. The default value provided below
9245 is most probably close to reality but may not be valid from outside
9246 your organization...
9250 while test "$cont"; do
9251 case "$MAILDOMAIN" in
9253 if $test -s /etc/mailname; then
9254 maildomain=`$cat /etc/mailname`
9256 maildomain="$myhostname$mydomain"
9259 *) maildomain="$MAILDOMAIN";;
9262 '') dflt="$cf_by@$maildomain";;
9263 *) dflt="$cf_email";;
9265 rp='What is your e-mail address?'
9271 rp='Address does not look like an Internet one. Use it anyway?'
9285 : Ask e-mail of administrator
9288 If you or somebody else will be maintaining perl at your site, please
9289 fill in the correct e-mail address here so that they may be contacted
9290 if necessary. Currently, the "perlbug" program included with perl
9291 will send mail to this address in addition to perlbug@perl.org. You may
9292 enter "none" for no administrator.
9295 case "$perladmin" in
9296 '') dflt="$cf_email";;
9297 *) dflt="$perladmin";;
9299 rp='Perl administrator e-mail address'
9303 : determine whether to only install version-specific parts.
9306 Do you want to install only the version-specific parts of the perl
9307 distribution? Usually you do *not* want to do this.
9309 case "$versiononly" in
9310 "$define"|[Yy]*|true) dflt='y' ;;
9313 rp="Do you want to install only the version-specific parts of perl?"
9316 [yY]*) val="$define";;
9322 case "$versiononly" in
9323 "$define") inc_version_list=''
9324 inc_version_list_init=0
9328 : figure out how to guarantee perl startup
9329 : XXX Note that this currently takes advantage of the bug that binexp ignores
9330 : the Configure -Dinstallprefix setting, which in turn means that under
9331 : relocatable @INC, initialinstalllocation is what binexp started as.
9332 case "$startperl" in
9334 case "$sharpbang" in
9338 I can use the #! construct to start perl on your system. This will
9339 make startup of perl scripts faster, but may cause problems if you
9340 want to share those scripts and perl is not in a standard place
9341 ($initialinstalllocation/perl) on all your platforms. The alternative
9342 is to force a shell by starting the script with a single ':' character.
9345 case "$versiononly" in
9346 "$define") dflt="$initialinstalllocation/perl$version";;
9347 *) dflt="$initialinstalllocation/perl";;
9349 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
9352 none) startperl=": # use perl";;
9353 *) startperl="#!$ans"
9354 if $test 30 -lt `echo "$ans" | wc -c`; then
9357 WARNING: Some systems limit the #! command to 32 characters.
9358 If you experience difficulty running Perl scripts with #!, try
9359 installing Perl in a directory with a shorter pathname.
9365 *) startperl=": # use perl"
9370 echo "I'll use $startperl to start perl scripts."
9372 : figure best path for perl in scripts
9375 case "$versiononly" in
9376 "$define") perlpath="$initialinstalllocation/perl$version";;
9377 *) perlpath="$initialinstalllocation/perl";;
9379 case "$startperl" in
9384 I will use the "eval 'exec'" idiom to start Perl on your system.
9385 I can use the full path of your Perl binary for this purpose, but
9386 doing so may cause problems if you want to share those scripts and
9387 Perl is not always in a standard place ($initialinstalllocation/perl).
9390 dflt="$initialinstalllocation/perl"
9391 rp="What path shall I use in \"eval 'exec'\"?"
9398 case "$startperl" in
9400 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
9403 : determine where public executable scripts go
9404 set scriptdir scriptdir
9406 case "$scriptdir" in
9409 : guess some guesses
9410 $test -d /usr/share/scripts && dflt=/usr/share/scripts
9411 $test -d /usr/share/bin && dflt=/usr/share/bin
9412 $test -d /usr/local/script && dflt=/usr/local/script
9413 $test -d /usr/local/scripts && dflt=/usr/local/scripts
9414 $test -d $prefixexp/script && dflt=$prefixexp/script
9418 *) dflt="$scriptdir"
9423 Some installations have a separate directory just for executable scripts so
9424 that they can mount it across multiple architectures but keep the scripts in
9425 one spot. You might, for example, have a subdirectory of /usr/share for this.
9426 Or you might just lump your scripts in with all your other executables.
9430 rp='Where do you keep publicly executable scripts?'
9432 if $test "X$ansexp" != "X$scriptdirexp"; then
9438 : A little fix up for an irregularly named variable.
9439 installscript="$installscriptdir"
9441 : determine where add-on public executables go
9443 '') dflt=$siteprefix/bin ;;
9447 rp='Pathname where the add-on public executables should be installed?'
9452 : determine where add-on html pages go
9453 : There is no standard location, so try to copy the previously-selected
9454 : directory structure for the core html pages.
9455 case "$sitehtml1dir" in
9456 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$siteprefix#"` ;;
9457 *) dflt=$sitehtml1dir ;;
9460 ''|' ') dflt=none ;;
9463 rp='Pathname where the site-specific html pages should be installed?'
9465 prefixvar=sitehtml1dir
9468 : determine where add-on library html pages go
9469 : There is no standard location, so try to copy the previously-selected
9470 : directory structure for the core html pages.
9471 case "$sitehtml3dir" in
9472 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$siteprefix#"` ;;
9473 *) dflt=$sitehtml3dir ;;
9476 ''|' ') dflt=none ;;
9479 rp='Pathname where the site-specific library html pages should be installed?'
9481 prefixvar=sitehtml3dir
9484 : determine where add-on manual pages go
9485 case "$siteman1dir" in
9486 '') dflt=`echo $man1dir | $sed "s#^$prefix#$siteprefix#"` ;;
9487 *) dflt=$siteman1dir ;;
9490 ''|' ') dflt=none ;;
9493 rp='Pathname where the site-specific manual pages should be installed?'
9495 prefixvar=siteman1dir
9498 : determine where add-on library man pages go
9499 case "$siteman3dir" in
9500 '') dflt=`echo $man3dir | $sed "s#^$prefix#$siteprefix#"` ;;
9501 *) dflt=$siteman3dir ;;
9504 ''|' ') dflt=none ;;
9507 rp='Pathname where the site-specific library manual pages should be installed?'
9509 prefixvar=siteman3dir
9512 : determine where add-on public executable scripts go
9513 case "$sitescript" in
9514 '') dflt=$siteprefix/script
9515 $test -d $dflt || dflt=$sitebin ;;
9516 *) dflt="$sitescript" ;;
9519 rp='Pathname where add-on public executable scripts should be installed?'
9521 prefixvar=sitescript
9524 : see if backtrace exists
9525 set backtrace d_backtrace
9528 : add flags if using c backtrace
9529 case "$usecbacktrace" in
9530 "") usecbacktrace=$undef ;;
9532 case "$d_backtrace" in
9534 case " $ccflags " in
9535 *" -DUSE_C_BACKTRACE "*) ;; # Already there.
9536 *) ccflags="$ccflags -DUSE_C_BACKTRACE -g" ;;
9540 echo "This system does not support backtrace" >&4
9541 usecbacktrace=$undef
9547 : Check if faststdio is requested and available
9548 case "$usefaststdio" in
9549 $define|true|[yY]*|'')
9550 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
9560 Perl can be built to use 'fast stdio', which means using the stdio
9561 library but also directly manipulating the stdio buffers to enable
9562 faster I/O. Using stdio is better for backward compatibility (especially
9563 for Perl extensions), but on the other hand since Perl 5.8 the 'perlio'
9564 interface has been preferred instead of stdio.
9566 If this doesn't make any sense to you, just accept the default '$dflt'.
9568 rp='Use the "fast stdio" if available?'
9571 y|Y) val="$define" ;;
9578 : define an is-a-typedef? function
9579 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
9581 "") inclist="sys/types.h";;
9583 eval "varval=\$$var";
9587 for inc in $inclist; do
9588 echo "#include <$inc>" >>temp.c;
9590 echo "#ifdef $type" >> temp.c;
9591 echo "printf(\"We have $type\");" >> temp.c;
9592 echo "#endif" >> temp.c;
9593 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
9594 if $contains $type temp.E >/dev/null 2>&1; then
9600 *) eval "$var=\$varval";;
9603 : define an is-a-typedef? function that prompts if the type is not available.
9604 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
9606 "") inclist="sys/types.h";;
9608 eval "varval=\$$var";
9612 for inc in $inclist; do
9613 echo "#include <$inc>" >>temp.c;
9615 echo "#ifdef $type" >> temp.c;
9616 echo "printf(\"We have $type\");" >> temp.c;
9617 echo "#endif" >> temp.c;
9618 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
9620 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
9621 if $contains $type temp.E >/dev/null 2>&1; then
9622 echo "$type found." >&4;
9625 echo "$type NOT found." >&4;
9631 *) eval "$var=\$varval";;
9634 : see what type lseek is declared as in the kernel
9635 rp="What is the type used for lseek's offset on this system?"
9636 set off_t lseektype long stdio.h sys/types.h
9640 echo "Checking to see how big your file offsets are..." >&4
9642 #include <sys/types.h>
9646 printf("%d\n", (int)sizeof($lseektype));
9651 if eval $compile_ok; then
9652 lseeksize=`$run ./try`
9653 echo "Your file offsets are $lseeksize bytes long."
9657 echo "(I can't seem to compile the test program. Guessing...)"
9658 rp="What is the size of your file offsets (in bytes)?"
9664 : see what type file positions are declared as in the library
9665 rp="What is the type for file position used by fsetpos()?"
9666 set fpos_t fpostype long stdio.h sys/types.h
9669 : Check size for Fpos_t
9672 *_t) zzz="$fpostype" ;;
9675 echo "Checking the size of $zzz..." >&4
9677 #include <sys/types.h>
9684 printf("%d\n", (int)sizeof($fpostype));
9689 if eval $compile_ok; then
9693 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9696 echo "Your $zzz is $fpossize bytes long."
9702 echo "(I can't compile the test program. Guessing...)" >&4
9703 rp="What is the size of your file positions (in bytes)?"
9708 : Check for large file support
9709 # Backward compatibility (uselfs is deprecated).
9711 "$define"|true|[yY]*)
9714 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
9716 uselargefiles="$define"
9720 case "$lseeksize:$fpossize" in
9723 You can have files larger than 2 gigabytes.
9726 *) case "$uselargefiles" in
9727 "$undef"|false|[nN]*) dflt='n' ;;
9732 Perl can be built to understand large files (files larger than 2 gigabytes)
9733 on some systems. To do so, Configure can be run with -Duselargefiles.
9735 If this doesn't make any sense to you, just accept the default '$dflt'.
9737 rp='Try to understand large files, if available?'
9740 y|Y) val="$define" ;;
9747 : Look for a hint-file generated 'call-back-unit'. If the
9748 : user has specified that a large files perl is to be built,
9749 : we may need to set or change some other defaults.
9750 if $test -f uselargefiles.cbu; then
9751 echo "Your platform has some specific hints regarding large file builds, using them..."
9752 . ./uselargefiles.cbu
9754 case "$uselargefiles" in
9756 if $test -f uselargefiles.cbu; then
9758 echo "Rechecking to see how big your file offsets are..." >&4
9760 #include <sys/types.h>
9764 printf("%d\n", (int)sizeof($lseektype));
9769 if eval $compile_ok; then
9770 lseeksize=`$run ./try`
9771 $echo "Your file offsets are now $lseeksize bytes long."
9775 echo "(I can't seem to compile the test program. Guessing...)"
9776 rp="What is the size of your file offsets (in bytes)?"
9781 *_t) zzz="$fpostype" ;;
9784 $echo $n "Rechecking the size of $zzz...$c" >&4
9786 #include <sys/types.h>
9793 printf("%d\n", (int)sizeof($fpostype));
9798 if eval $compile_ok; then
9803 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9806 echo " $fpossize bytes." >&4
9812 echo "(I can't compile the test program. Guessing...)" >&4
9813 rp="What is the size of your file positions (in bytes)?"
9822 : Check if we want perlio
9825 : Set the vendorbin variables
9826 case "$vendorprefix" in
9827 '') d_vendorbin="$undef"
9831 *) d_vendorbin="$define"
9832 : determine where vendor-supplied executables go.
9833 case "$vendorbin" in
9834 '') dflt=$vendorprefix/bin ;;
9835 *) dflt="$vendorbin" ;;
9838 rp='Pathname for the vendor-supplied executables directory?'
9841 vendorbinexp="$ansexp"
9847 : Set the vendorhtml1dir variables
9848 case "$vendorprefix" in
9849 '') vendorhtml1dir=''
9850 vendorhtml1direxp=''
9852 *) : determine where vendor-supplied html pages go.
9853 : There is no standard location, so try to copy the previously-selected
9854 : directory structure for the core html pages.
9855 : XXX Better default suggestions would be welcome.
9856 case "$vendorhtml1dir" in
9857 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9858 *) dflt=$vendorhtml1dir ;;
9861 ''|' ') dflt=none ;;
9864 rp='Pathname for the vendor-supplied html pages?'
9866 vendorhtml1dir="$ans"
9867 vendorhtml1direxp="$ansexp"
9870 : Use ' ' for none so value is preserved next time through Configure
9871 $test X"$vendorhtml1dir" = "X" && vendorhtml1dir=' '
9872 prefixvar=vendorhtml1dir
9875 : Set the vendorhtml3dir variables
9876 case "$vendorprefix" in
9877 '') vendorhtml3dir=''
9878 vendorhtml3direxp=''
9880 *) : determine where vendor-supplied module html pages go.
9881 : There is no standard location, so try to copy the previously-selected
9882 : directory structure for the core html pages.
9883 : XXX Better default suggestions would be welcome.
9884 case "$vendorhtml3dir" in
9885 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9886 *) dflt=$vendorhtml3dir ;;
9889 ''|' ') dflt=none ;;
9892 rp='Pathname for the vendor-supplied html pages?'
9894 vendorhtml3dir="$ans"
9895 vendorhtml3direxp="$ansexp"
9898 : Use ' ' for none so value is preserved next time through Configure
9899 $test X"$vendorhtml3dir" = "X" && vendorhtml3dir=' '
9900 prefixvar=vendorhtml3dir
9903 : Set the vendorman1dir variables
9904 case "$vendorprefix" in
9905 '') vendorman1dir=''
9908 *) : determine where vendor-supplied manual pages go.
9909 case "$vendorman1dir" in
9910 '') dflt=`echo "$man1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9911 *) dflt=$vendorman1dir ;;
9914 ''|' ') dflt=none ;;
9917 rp='Pathname for the vendor-supplied manual section 1 pages?'
9919 vendorman1dir="$ans"
9920 vendorman1direxp="$ansexp"
9923 : Use ' ' for none so value is preserved next time through Configure
9924 $test X"$vendorman1dir" = "X" && vendorman1dir=' '
9925 prefixvar=vendorman1dir
9928 : Set the vendorman3dir variables
9929 case "$vendorprefix" in
9930 '') vendorman3dir=''
9933 *) : determine where vendor-supplied module manual pages go.
9934 case "$vendorman3dir" in
9935 '') dflt=`echo "$man3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9936 *) dflt=$vendorman3dir ;;
9939 ''|' ') dflt=none ;;
9942 rp='Pathname for the vendor-supplied manual section 3 pages?'
9944 vendorman3dir="$ans"
9945 vendorman3direxp="$ansexp"
9948 : Use ' ' for none so value is preserved next time through Configure
9949 $test X"$vendorman3dir" = "X" && vendorman3dir=' '
9950 prefixvar=vendorman3dir
9953 : Set the vendorscript variables
9954 case "$vendorprefix" in
9955 '') d_vendorscript="$undef"
9959 *) d_vendorscript="$define"
9960 : determine where vendor-supplied scripts go.
9961 case "$vendorscript" in
9962 '') dflt=$vendorprefix/script
9963 $test -d $dflt || dflt=$vendorbin ;;
9964 *) dflt="$vendorscript" ;;
9968 The installation process will create a directory for
9969 vendor-supplied scripts.
9973 rp='Pathname for the vendor-supplied scripts directory?'
9976 vendorscriptexp="$ansexp"
9979 prefixvar=vendorscript
9982 : script used to emit important warnings
9985 if test \$# -gt 0; then
9990 echo "*** WARNING:" >&4
9991 sed -e 's/^/*** /' <msg >&4
9993 cat msg >>config.msg
9994 echo " " >>config.msg
10000 : see which of string.h or strings.h is needed
10002 strings=`./findhdr string.h`
10003 if $test "$strings" && $test -r "$strings"; then
10004 echo "Using <string.h> instead of <strings.h>." >&4
10008 strings=`./findhdr strings.h`
10009 if $test "$strings" && $test -r "$strings"; then
10010 echo "Using <strings.h> instead of <string.h>." >&4
10012 ./warn "No string header found -- You'll surely have problems."
10017 case "$i_string" in
10018 "$undef") strings=`./findhdr strings.h`;;
10019 *) strings=`./findhdr string.h`;;
10022 : see if qgcvt exists
10026 : Check what kind of doubles your system has
10027 $echo "Checking the kind of doubles you have..." >&4
10029 #$i_stdlib I_STDLIB
10030 #define DOUBLESIZE $doublesize
10032 #include <stdlib.h>
10035 static const double d = -0.1;
10037 unsigned const char* b = (unsigned const char*)(&d);
10038 #if DOUBLESIZE == 4
10039 if (b[0] == 0xCD && b[3] == 0xBD) {
10040 /* IEEE 754 32-bit little-endian */
10044 if (b[0] == 0xBD && b[3] == 0xCD) {
10045 /* IEEE 754 32-bit big-endian */
10050 #if DOUBLESIZE == 8
10051 if (b[0] == 0x9A && b[7] == 0xBF) {
10052 /* IEEE 754 64-bit little-endian */
10056 if (b[0] == 0xBF && b[7] == 0x9A) {
10057 /* IEEE 754 64-bit big-endian */
10061 if (b[0] == 0x99 && b[3] == 0xBF && b[4] == 0x9A && b[7] == 0x99) {
10062 /* ARM mixed endian: two little-endian 32-bit floats, in big endian order:
10063 * 4 5 6 7 0 1 2 3 (MSB = 7, LSB = 0)
10064 * 99 99 b9 bf 9a 99 99 99 */
10068 if (b[0] == 0x99 && b[3] == 0x9A && b[4] == 0xBF && b[7] == 0x99) {
10069 /* The opposite of case 7, mixed endian: two big-endian 32-bit floats,
10070 * in little endian order: 3 2 1 0 7 6 5 4 (MSB = 7, LSB = 0)
10071 * 99 99 99 9a bf b9 99 99 */
10076 #if DOUBLESIZE == 16
10077 if (b[0] == 0x9A && b[15] == 0xBF) {
10078 /* IEEE 754 128-bit little-endian */
10082 if (b[0] == 0xBF && b[15] == 0x9A) {
10083 /* IEEE 754 128-bit big-endian */
10088 /* Then there are old mainframe/miniframe formats like VAX, IBM, and CRAY.
10089 * Whether those environments can still build Perl is debatable. */
10090 printf("-1\n"); /* unknown */
10095 if eval $compile; then
10096 doublekind=`$run ./try`
10100 case "$doublekind" in
10101 1) echo "You have IEEE 754 32-bit little endian doubles." >&4 ;;
10102 2) echo "You have IEEE 754 32-bit big endian doubles." >&4 ;;
10103 3) echo "You have IEEE 754 64-bit little endian doubles." >&4 ;;
10104 4) echo "You have IEEE 754 64-bit big endian doubles." >&4 ;;
10105 5) echo "You have IEEE 754 128-bit little endian doubles." >&4 ;;
10106 6) echo "You have IEEE 754 128-bit big endian doubles." >&4 ;;
10107 *) echo "Cannot figure out your double. You VAX, or something?" >&4 ;;
10111 : Check print/scan long double stuff
10114 if $test X"$d_longdbl" = X"$define"; then
10116 echo "Checking how to print long doubles..." >&4
10118 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
10119 $cat >try.c <<'EOCP'
10120 #include <sys/types.h>
10123 double d = 123.456;
10124 printf("%.3f\n", d);
10128 if eval $compile; then
10132 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
10133 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
10134 echo "We will use %f."
10140 if $test X"$sPRIfldbl" = X; then
10141 $cat >try.c <<'EOCP'
10142 #include <sys/types.h>
10145 long double d = 123.456;
10146 printf("%.3Lf\n", d);
10150 if eval $compile; then
10154 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
10155 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
10156 echo "We will use %Lf."
10162 if $test X"$sPRIfldbl" = X; then
10163 $cat >try.c <<'EOCP'
10164 #include <sys/types.h>
10167 long double d = 123.456;
10168 printf("%.3llf\n", d);
10172 if eval $compile; then
10176 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
10177 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
10178 echo "We will use %llf."
10184 if $test X"$sPRIfldbl" = X; then
10185 $cat >try.c <<'EOCP'
10186 #include <sys/types.h>
10189 long double d = 123.456;
10190 printf("%.3lf\n", d);
10194 if eval $compile; then
10198 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
10199 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
10200 echo "We will use %lf."
10206 if $test X"$sPRIfldbl" = X; then
10207 echo "Cannot figure out how to print long doubles." >&4
10209 sSCNfldbl=$sPRIfldbl # expect consistency
10216 case "$sPRIfldbl" in
10217 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
10218 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
10219 d_SCNfldbl="$undef";
10221 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
10222 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
10223 d_SCNfldbl="$define";
10227 : Before committing on uselongdouble, see whether that looks sane.
10228 if $test "$uselongdouble" = "$define"; then
10231 echo "Checking if your long double math functions work right..." >&4
10236 printf("%"$sPRIgldbl"\n", sqrtl(logl(expl(cosl(sinl(0.0L))))+powl(2.0L, 3.0L)));
10239 case "$osname:$gccversion" in
10240 aix:) saveccflags="$ccflags"
10241 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
10244 if eval $compile_ok; then
10248 3) echo "Your long double math functions are working correctly." >&4 ;;
10249 *) echo "Your long double math functions are broken, not using long doubles." >&4
10250 uselongdouble=$undef
10254 case "$osname:$gccversion" in
10255 aix:) ccflags="$saveccflags" ;; # restore
10259 : Check how to convert floats to strings.
10261 if test "X$d_Gconvert" = X; then
10264 echo "Checking for an efficient way to convert floats to strings."
10266 case "$uselongdouble" in
10267 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
10269 case "$d_longdbl" in
10270 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
10272 case "$d_PRIgldbl" in
10273 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
10276 #ifdef TRY_gconvert
10277 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
10278 char *myname = "gconvert";
10281 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
10282 char *myname = "gcvt";
10285 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
10286 char *myname = "qgcvt";
10287 #define DOUBLETYPE long double
10290 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
10291 #ifdef HAS_PRIgldbl
10292 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
10294 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
10297 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
10299 char *myname = "sprintf";
10303 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
10304 #define DOUBLETYPE long double
10306 #define DOUBLETYPE double
10312 #$i_stdlib I_STDLIB
10314 #include <stdlib.h>
10316 #$i_string I_STRING
10318 # include <string.h>
10320 # include <strings.h>
10323 int checkit(char *expect, char *got)
10325 if (strcmp(expect, got)) {
10326 printf("%s oddity: Expected %s, got %s\n",
10327 myname, expect, got);
10337 /* This must be 1st test on (which?) platform */
10338 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
10339 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
10340 checkit("0.1", buf);
10342 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
10343 checkit("0.01", buf);
10345 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
10346 checkit("0.001", buf);
10348 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
10349 checkit("0.0001", buf);
10351 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
10352 if (strlen(buf) > 5)
10353 checkit("9e-005", buf); /* for Microsoft ?? */
10355 checkit("9e-05", buf);
10357 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
10360 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
10361 checkit("1.1", buf);
10363 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
10364 checkit("1.01", buf);
10366 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
10367 checkit("1.001", buf);
10369 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
10370 checkit("1.0001", buf);
10372 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
10373 checkit("1.00001", buf);
10375 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
10376 checkit("1.000001", buf);
10378 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
10381 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
10382 checkit("-1", buf);
10384 /* Some Linux gcvt's give 1.e+5 here. */
10385 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
10386 checkit("100000", buf);
10388 /* Some Linux gcvt's give -1.e+5 here. */
10389 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
10390 checkit("-100000", buf);
10392 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
10393 checkit("123.456", buf);
10395 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
10396 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
10397 /* 34 should be enough to scare even long double
10398 * places into using the e notation. */
10399 if (strlen(buf) > 5)
10400 checkit("1e+034", buf); /* for Microsoft */
10402 checkit("1e+34", buf);
10404 /* For Perl, if you add additional tests here, also add them to
10405 * t/base/num.t for benefit of platforms not using Configure or
10406 * overriding d_Gconvert */
10411 : first add preferred functions to our list
10413 for xxx_convert in $gconvert_preference; do
10414 case $xxx_convert in
10415 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
10416 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
10419 : then add any others
10420 for xxx_convert in gconvert gcvt sprintf; do
10421 case "$xxx_list" in
10423 *) xxx_list="$xxx_list $xxx_convert" ;;
10427 case "$d_longdbl$uselongdouble" in
10429 : again, add preferred functions to our list first
10431 for xxx_convert in $gconvert_ld_preference; do
10432 case $xxx_convert in
10433 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
10434 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
10437 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
10438 for xxx_convert in qgcvt sprintf $xxx_list; do
10439 case "$xxx_ld_list" in
10440 $xxx_convert*|*" $xxx_convert"*) ;;
10441 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
10444 : if sprintf cannot do long doubles, move it to the end
10445 if test "$d_PRIgldbl" != "$define"; then
10446 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
10448 : if no qgcvt, remove it
10449 if test "$d_qgcvt" != "$define"; then
10450 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
10453 xxx_list="$xxx_ld_list"
10457 for xxx_convert in $xxx_list; do
10458 echo "Trying $xxx_convert..."
10459 $rm -f try try$_o core
10460 set try -DTRY_$xxx_convert
10461 if eval $compile; then
10462 echo "$xxx_convert() found." >&4
10463 if $run ./try; then
10464 echo "I'll use $xxx_convert to convert floats into a string." >&4
10467 echo "...But $xxx_convert didn't work as I expected."
10471 echo "$xxx_convert NOT found." >&4
10475 if test X$xxx_convert = X; then
10476 echo "*** WHOA THERE!!! ***" >&4
10477 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
10478 xxx_convert=sprintf
10481 case "$xxx_convert" in
10482 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
10483 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
10484 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
10485 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
10486 "$define$define$define")
10487 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
10488 "$define$define$undef")
10489 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
10490 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
10498 : see if _fwalk exists
10502 : Initialize h_fcntl
10505 : Initialize h_sysfile
10508 : access call always available on UNIX
10509 set access d_access
10512 : locate the flags for 'access()'
10513 case "$d_access" in
10516 $cat >access.c <<EOCP
10517 #include <sys/types.h>
10522 #include <sys/file.h>
10525 #include <unistd.h>
10527 #$i_stdlib I_STDLIB
10529 #include <stdlib.h>
10535 : check sys/file.h first, no particular reason here
10536 if $test `./findhdr sys/file.h` && \
10537 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
10539 echo "<sys/file.h> defines the *_OK access constants." >&4
10540 elif $test `./findhdr fcntl.h` && \
10541 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
10543 echo "<fcntl.h> defines the *_OK access constants." >&4
10544 elif $test `./findhdr unistd.h` && \
10545 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
10546 echo "<unistd.h> defines the *_OK access constants." >&4
10548 echo "I can't find the four *_OK access constants--I'll use mine." >&4
10554 : see if accessx exists
10555 set accessx d_accessx
10558 : see if acosh exists
10562 : see if aintl exists
10566 : see if alarm exists
10570 : see if 64bit time functions exists
10572 set ctime64 d_ctime64
10575 set localtime64 d_localtime64
10578 set gmtime64 d_gmtime64
10581 set mktime64 d_mktime64
10584 set difftime64 d_difftime64
10587 set asctime64 d_asctime64
10590 : see if POSIX threads are available
10591 set pthread.h i_pthread
10594 : define a function to check prototypes
10595 $cat > protochk <<EOSH
10598 optimize="$optimize"
10600 prototype="$prototype"
10603 usethreads=$usethreads
10604 i_pthread=$i_pthread
10605 pthread_h_first=$pthread_h_first
10608 $cat >> protochk <<'EOSH'
10613 while test $# -ge 2; do
10615 $define) echo "#include <$2>" >> try.c ;;
10616 literal) echo "$2" >> try.c ;;
10618 # Extra magic for the benefit of systems that need pthread.h
10619 # to be included early to correctly detect threadsafe functions.
10620 # Such functions must guarantee themselves, though, that the usethreads
10621 # and i_pthread have been defined, before calling protochk.
10622 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
10623 echo "#include <pthread.h>" >> try.c
10628 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
10629 cat >> try.c <<'EOCP'
10630 #ifdef CAN_PROTOTYPE
10631 #define _(args) args
10636 echo "$foo" >> try.c
10637 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
10638 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
10644 $eunicefix protochk
10646 : Define hasproto macro for Configure internal use
10647 hasproto='varname=$1; func=$2; shift; shift;
10648 while $test $# -ge 2; do
10650 $define) echo "#include <$2>";;
10654 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
10655 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
10656 echo "$func() prototype found.";
10659 echo "$func() prototype NOT found.";
10666 : see if sys/types.h has to be included
10667 set sys/types.h i_systypes
10670 : see if sys/select.h has to be included
10671 set sys/select.h i_sysselct
10674 : Define hasfield macro for Configure internal use
10675 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
10676 while $test $# -ge 2; do
10678 $define) echo "#include <$2>";;
10682 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
10684 if eval $compile; then
10693 : see if we should include time.h, sys/time.h, or both
10695 if test "X$timeincl" = X; then
10696 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
10697 $echo $n "I'm now running the test program...$c"
10699 #include <sys/types.h>
10704 #ifdef SYSTIMEKERNEL
10707 #include <sys/time.h>
10710 #include <sys/select.h>
10712 #$i_stdlib I_STDLIB
10714 #include <stdlib.h>
10720 struct timeval bar;
10723 struct timezone tzp;
10725 if (foo.tm_sec == foo.tm_sec)
10728 if (bar.tv_sec == bar.tv_sec)
10735 for s_timezone in '-DS_TIMEZONE' ''; do
10737 for s_timeval in '-DS_TIMEVAL' ''; do
10738 for i_systimek in '' '-DSYSTIMEKERNEL'; do
10739 for i_time in '' '-DI_TIME'; do
10740 for i_systime in '-DI_SYSTIME' ''; do
10743 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
10744 if eval $compile; then
10745 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
10749 $echo $n "Succeeded with $flags$c"
10761 *SYSTIMEKERNEL*) i_systimek="$define"
10762 timeincl=`./findhdr sys/time.h`
10763 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
10764 *) i_systimek="$undef";;
10767 *I_TIME*) i_time="$define"
10768 timeincl=`./findhdr time.h`" $timeincl"
10769 echo "We'll include <time.h>." >&4;;
10770 *) i_time="$undef";;
10773 *I_SYSTIME*) i_systime="$define"
10774 timeincl=`./findhdr sys/time.h`" $timeincl"
10775 echo "We'll include <sys/time.h>." >&4;;
10776 *) i_systime="$undef";;
10780 : see if struct tm knows about tm_zone
10781 case "$i_systime$i_time" in
10784 echo "Checking to see if your struct tm has tm_zone field..." >&4
10785 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
10793 case "$d_tm_tm_zone" in
10794 "$define") echo "Yes, it does." ;;
10795 *) echo "No, it doesn't." ;;
10797 : see if struct tm knows about tm_gmtoff
10798 case "$i_systime$i_time" in
10801 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
10802 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
10810 case "$d_tm_tm_gmtoff" in
10811 "$define") echo "Yes, it does." ;;
10812 *) echo "No, it doesn't." ;;
10815 : see if asctime_r exists
10816 set asctime_r d_asctime_r
10818 case "$d_asctime_r" in
10820 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
10821 case "$d_asctime_r_proto:$usethreads" in
10822 ":define") d_asctime_r_proto=define
10823 set d_asctime_r_proto asctime_r $hdrs
10827 case "$d_asctime_r_proto" in
10829 case "$asctime_r_proto" in
10830 ''|0) try='char* asctime_r(const struct tm*, char*);'
10831 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SB ;;
10833 case "$asctime_r_proto" in
10834 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
10835 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SBI ;;
10837 case "$asctime_r_proto" in
10838 ''|0) try='int asctime_r(const struct tm*, char*);'
10839 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SB ;;
10841 case "$asctime_r_proto" in
10842 ''|0) try='int asctime_r(const struct tm*, char*, int);'
10843 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SBI ;;
10845 case "$asctime_r_proto" in
10846 ''|0) d_asctime_r=undef
10848 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
10849 * ) case "$asctime_r_proto" in
10850 REENTRANT_PROTO*) ;;
10851 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
10853 echo "Prototype: $try" ;;
10856 *) case "$usethreads" in
10857 define) echo "asctime_r has no prototype, not using it." >&4 ;;
10864 *) asctime_r_proto=0
10868 : see if asinh exists
10872 : see if atanh exists
10876 : see if atolf exists
10880 : see if atoll exists
10884 : Look for GCC-style attribute format
10885 case "$d_attribute_format" in
10888 echo "Checking whether your compiler can handle __attribute__((format)) ..." >&4
10889 $cat >attrib.c <<'EOCP'
10891 void my_special_printf(char* pat,...) __attribute__((__format__(__printf__,1,2)));
10893 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10894 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10895 echo "Your C compiler doesn't support __attribute__((format))."
10898 echo "Your C compiler supports __attribute__((format))."
10902 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10906 *) val="$d_attribute_format" ;;
10908 set d_attribute_format
10912 : Look for GCC-style attribute format with null format allowed
10913 case "$d_printf_format_null" in
10914 '') case "$d_attribute_format" in
10917 echo "Checking whether your compiler allows __printf__ format to be null ..." >&4
10918 $cat >attrib.c <<EOCP
10920 #$i_stdlib I_STDLIB
10922 #include <stdlib.h>
10924 int null_printf (char* pat,...) __attribute__((__format__(__printf__,1,2)));
10925 int null_printf (char* pat,...) { return (int)pat; }
10926 int main () { exit(null_printf(NULL)); }
10928 if $cc $ccflags -o attrib attrib.c >attrib.out 2>&1 ; then
10929 : run the executable in case it produces a run-time warning
10930 if $run ./attrib >>attrib.out 2>&1; then
10931 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10932 echo "Your C compiler doesn't allow __printf__ format to be null."
10935 echo "Your C compiler allows __printf__ format to be null."
10939 echo "Your C compiler executable failed with __printf__ format null."
10943 echo "Your C compiler fails with __printf__ format null."
10950 *) val="$d_printf_format_null" ;;
10952 set d_printf_format_null
10956 : Look for GCC-style attribute malloc
10957 case "$d_attribute_malloc" in
10960 echo "Checking whether your compiler can handle __attribute__((malloc)) ..." >&4
10961 $cat >attrib.c <<'EOCP'
10963 char *go_get_some_memory( int how_many_bytes ) __attribute__((malloc));
10965 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10966 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10967 echo "Your C compiler doesn't support __attribute__((malloc))."
10970 echo "Your C compiler supports __attribute__((malloc))."
10974 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10978 *) val="$d_attribute_malloc" ;;
10980 set d_attribute_malloc
10984 : Look for GCC-style attribute nonnull
10985 case "$d_attribute_nonnull" in
10988 echo "Checking whether your compiler can handle __attribute__((nonnull(1))) ..." >&4
10989 $cat >attrib.c <<'EOCP'
10991 void do_something (char *some_pointer,...) __attribute__((nonnull(1)));
10993 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10994 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10995 echo "Your C compiler doesn't support __attribute__((nonnull))."
10998 echo "Your C compiler supports __attribute__((nonnull))."
11002 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11006 *) val="$d_attribute_nonnull" ;;
11008 set d_attribute_nonnull
11012 : Look for GCC-style attribute noreturn
11013 case "$d_attribute_noreturn" in
11016 echo "Checking whether your compiler can handle __attribute__((noreturn)) ..." >&4
11017 $cat >attrib.c <<'EOCP'
11019 void fall_over_dead( void ) __attribute__((noreturn));
11021 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11022 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11023 echo "Your C compiler doesn't support __attribute__((noreturn))."
11026 echo "Your C compiler supports __attribute__((noreturn))."
11030 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11034 *) val="$d_attribute_noreturn" ;;
11036 set d_attribute_noreturn
11040 : Look for GCC-style attribute pure
11041 case "$d_attribute_pure" in
11044 echo "Checking whether your compiler can handle __attribute__((pure)) ..." >&4
11045 $cat >attrib.c <<'EOCP'
11047 int square( int n ) __attribute__((pure));
11049 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11050 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11051 echo "Your C compiler doesn't support __attribute__((pure))."
11054 echo "Your C compiler supports __attribute__((pure))."
11058 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11062 *) val="$d_attribute_pure" ;;
11064 set d_attribute_pure
11068 : Look for GCC-style attribute unused
11069 case "$d_attribute_unused" in
11072 echo "Checking whether your compiler can handle __attribute__((unused)) ..." >&4
11073 $cat >attrib.c <<'EOCP'
11075 int do_something( int dummy __attribute__((unused)), int n );
11077 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11078 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11079 echo "Your C compiler doesn't support __attribute__((unused))."
11082 echo "Your C compiler supports __attribute__((unused))."
11086 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11090 *) val="$d_attribute_unused" ;;
11092 set d_attribute_unused
11096 : Look for GCC-style attribute deprecated
11097 case "$d_attribute_deprecated" in
11100 echo "Checking whether your compiler can handle __attribute__((deprecated)) ..." >&4
11101 $cat >attrib.c <<'EOCP'
11103 int I_am_deprecated(void) __attribute__((deprecated));
11105 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11106 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11107 echo "Your C compiler doesn't support __attribute__((deprecated))."
11110 echo "Your C compiler supports __attribute__((deprecated))."
11114 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11118 *) val="$d_attribute_deprecated" ;;
11120 set d_attribute_deprecated
11124 : Look for GCC-style attribute warn_unused_result
11125 case "$d_attribute_warn_unused_result" in
11128 echo "Checking whether your compiler can handle __attribute__((warn_unused_result)) ..." >&4
11129 $cat >attrib.c <<'EOCP'
11131 int I_will_not_be_ignored(void) __attribute__((warn_unused_result));
11133 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11134 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11135 echo "Your C compiler doesn't support __attribute__((warn_unused_result))."
11138 echo "Your C compiler supports __attribute__((warn_unused_result))."
11142 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11146 *) val="$d_attribute_warn_unused_result" ;;
11148 set d_attribute_warn_unused_result
11152 : see if bcmp exists
11156 : see if bcopy exists
11160 : see if getpgrp exists
11161 set getpgrp d_getpgrp
11164 case "$d_getpgrp" in
11167 echo "Checking to see which flavor of getpgrp is in use..."
11169 #$i_unistd I_UNISTD
11170 #include <sys/types.h>
11172 # include <unistd.h>
11174 #$i_stdlib I_STDLIB
11176 #include <stdlib.h>
11180 if (getuid() == 0) {
11181 printf("(I see you are running Configure as super-user...)\n");
11184 #ifdef TRY_BSD_PGRP
11185 if (getpgrp(1) == 0)
11194 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
11195 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
11197 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
11198 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
11201 echo "I can't seem to compile and run the test program."
11203 xxx="a USG one, i.e. you use getpgrp()."
11205 # SVR4 systems can appear rather BSD-ish.
11206 case "$i_unistd" in
11208 xxx="a BSD one, i.e. you use getpgrp(pid)."
11212 xxx="probably a USG one, i.e. you use getpgrp()."
11217 echo "Assuming your getpgrp is $xxx" >&4
11226 : see if setpgrp exists
11227 set setpgrp d_setpgrp
11230 case "$d_setpgrp" in
11233 echo "Checking to see which flavor of setpgrp is in use..."
11235 #$i_unistd I_UNISTD
11236 #include <sys/types.h>
11238 # include <unistd.h>
11240 #$i_stdlib I_STDLIB
11242 #include <stdlib.h>
11246 if (getuid() == 0) {
11247 printf("(I see you are running Configure as super-user...)\n");
11250 #ifdef TRY_BSD_PGRP
11251 if (-1 == setpgrp(1, 1))
11254 if (setpgrp() != -1)
11260 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
11261 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
11263 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
11264 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
11267 echo "(I can't seem to compile and run the test program.)"
11269 xxx="a USG one, i.e. you use setpgrp()."
11271 # SVR4 systems can appear rather BSD-ish.
11272 case "$i_unistd" in
11274 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
11278 xxx="probably a USG one, i.e. you use setpgrp()."
11283 echo "Assuming your setpgrp is $xxx" >&4
11292 : Look for GCC-style __builtin_choose_expr
11293 case "$d_builtin_choose_expr" in
11296 echo "Checking whether your compiler can handle __builtin_choose_expr ..." >&4
11297 $cat >try.c <<'EOCP'
11298 #include <assert.h>
11299 #include <stdlib.h>
11302 #define SYRINX(x) __builtin_choose_expr( x, (1056*2), (103*50) )
11305 assert( SYRINX(1) == 2112 );
11306 assert( SYRINX(1) != 5150 );
11307 assert( SYRINX(0) == 5150 );
11308 assert( SYRINX(0) != 2112 );
11309 puts( "All good!" );
11315 if eval $compile && $run ./try; then
11316 echo "Your C compiler supports __builtin_choose_expr."
11319 echo "Your C compiler doesn't seem to understand __builtin_choose_expr."
11323 *) val="$d_builtin_choose_expr" ;;
11326 set d_builtin_choose_expr
11330 : Look for GCC-style __builtin_expect
11331 case "$d_builtin_expect" in
11334 echo "Checking whether your compiler can handle __builtin_expect ..." >&4
11335 $cat >try.c <<'EOCP'
11338 if ( __builtin_expect(n, 0) ) n = 1;
11339 /* Remember shell exit code truth is 0, C truth is non-zero */
11344 if eval $compile && $run ./try; then
11345 echo "Your C compiler supports __builtin_expect."
11348 echo "Your C compiler doesn't seem to understand __builtin_expect."
11352 *) val="$d_builtin_expect" ;;
11355 set d_builtin_expect
11359 : see if bzero exists
11363 : see if stdarg is available
11365 if $test `./findhdr stdarg.h`; then
11366 echo "<stdarg.h> found." >&4
11369 echo "<stdarg.h> NOT found." >&4
11373 : see if varargs is available
11375 if $test `./findhdr varargs.h`; then
11376 echo "<varargs.h> found." >&4
11378 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
11381 : set up the varargs testing programs
11382 $cat > varargs.c <<EOP
11384 #include <stdarg.h>
11387 #include <varargs.h>
11391 int f(char *p, ...)
11405 p = va_arg(ap, char *);
11411 $cat > varargs <<EOP
11413 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
11422 : now check which varargs header should be included
11428 if `./varargs I_STDARG`; then
11430 elif `./varargs I_VARARGS`; then
11435 if `./varargs I_VARARGS`; then
11443 echo "*** WHOA THERE!!! ***" >&4
11444 echo " Your C compiler \"$cc\" doesn't seem to support stdarg or varargs!" >&4
11445 case "$knowitall" in
11447 echo " I'm giving up; maybe you can try again with a different compiler?" >&4
11451 echo "I could not find the definition for va_dcl... You have problems..." >&4
11452 val="$undef"; set i_stdarg; eval $setvar
11453 val="$undef"; set i_varargs; eval $setvar
11458 case "$i_varhdr" in
11460 val="$define"; set i_stdarg; eval $setvar
11461 val="$undef"; set i_varargs; eval $setvar
11464 val="$undef"; set i_stdarg; eval $setvar
11465 val="$define"; set i_varargs; eval $setvar
11468 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
11472 : see if the Compiler supports C99 variadic macros
11473 case "$i_stdarg$i_stdlib" in
11475 echo "You have <stdarg.h> and <stdlib.h>, so checking for C99 variadic macros." >&4
11478 #include <stdarg.h>
11480 #define foo(buffer, format, ...) sprintf(buffer, format, __VA_ARGS__)
11484 foo(buf, "%d %g %.*s", 123, 456.0, (int)3, "789fail");
11490 if eval $compile && $run ./try 2>&1 >/dev/null; then
11491 case "`$run ./try`" in
11493 echo "You have C99 variadic macros." >&4
11494 d_c99_variadic_macros="$define"
11497 echo "You don't have functional C99 variadic macros." >&4
11498 d_c99_variadic_macros="$undef"
11502 echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4
11503 d_c99_variadic_macros="$undef"
11508 echo "You don't have <stdarg.h> and <stdlib.h>, so not checking for C99 variadic macros." >&4
11509 d_c99_variadic_macros="$undef"
11513 : see if signal is declared as pointer to function returning int or void
11515 xxx=`./findhdr signal.h`
11516 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
11517 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
11518 echo "You have int (*signal())() instead of void." >&4
11520 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
11521 echo "You have void (*signal())()." >&4
11523 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
11524 echo "You have int (*signal())() instead of void." >&4
11526 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
11527 echo "You have void (*signal())()." >&4
11530 case "$d_voidsig" in
11532 echo "I can't determine whether signal handler returns void or int..." >&4
11534 rp="What type does your signal handler return?"
11537 v*) val="$define";;
11541 echo "As you already told me, signal handler returns void." >&4
11544 *) echo "As you already told me, signal handler returns int." >&4
11551 case "$d_voidsig" in
11552 "$define") signal_t="void";;
11553 *) signal_t="int";;
11557 : check for ability to cast large floats to 32-bit ints.
11559 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
11560 if $test "$intsize" -ge 4; then
11567 #$i_stdlib I_STDLIB
11569 #include <stdlib.h>
11571 #include <sys/types.h>
11572 #include <signal.h>
11573 $signal_t blech(int s) { exit(3); }
11580 signal(SIGFPE, blech);
11582 /* Don't let compiler optimize the test away. Store the number
11583 in a writable string for gcc to pass to sscanf under HP-UX.
11585 sprintf(str, "2147483647");
11586 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
11590 /* x86 processors will probably give 0x8000 0000, which is a
11591 sign change. We don't want that. We want to mimic SPARC
11592 behavior here, which is to preserve the sign and give
11595 if (i32 != ($xxx) f)
11601 if eval $compile_ok; then
11602 $run ./try 2>/dev/null
11605 echo "(I can't seem to compile the test program--assuming it can't)"
11610 echo "Yup, it can."
11613 echo "Nope, it can't."
11620 : check for ability to cast negative floats to unsigned
11622 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
11625 #$i_stdlib I_STDLIB
11627 #include <stdlib.h>
11629 #include <sys/types.h>
11630 #include <signal.h>
11631 $signal_t blech(int s) { exit(7); }
11632 $signal_t blech_in_list(int s) { exit(4); }
11633 unsigned long dummy_long(unsigned long p) { return p; }
11634 unsigned int dummy_int(unsigned int p) { return p; }
11635 unsigned short dummy_short(unsigned short p) { return p; }
11639 unsigned long along;
11641 unsigned short ashort;
11645 /* Frustrate gcc-2.7.2's optimizer which failed this test with
11646 a direct f = -123. assignment. gcc-2.8.0 reportedly
11647 optimized the whole file away
11649 /* Store the number in a writable string for gcc to pass to
11650 sscanf under HP-UX.
11652 sprintf(str, "-123");
11653 sscanf(str, "%lf", &f); /* f = -123.; */
11655 signal(SIGFPE, blech);
11656 along = (unsigned long)f;
11657 aint = (unsigned int)f;
11658 ashort = (unsigned short)f;
11659 if (along != (unsigned long)-123)
11661 if (aint != (unsigned int)-123)
11663 if (ashort != (unsigned short)-123)
11665 sprintf(str, "1073741824.");
11666 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
11669 along = (unsigned long)f;
11670 if (along != 0x80000000)
11674 along = (unsigned long)f;
11675 if (along != 0x7fffffff)
11679 along = (unsigned long)f;
11680 if (along != 0x80000001)
11684 signal(SIGFPE, blech_in_list);
11685 sprintf(str, "123.");
11686 sscanf(str, "%lf", &f); /* f = 123.; */
11687 along = dummy_long((unsigned long)f);
11688 aint = dummy_int((unsigned int)f);
11689 ashort = dummy_short((unsigned short)f);
11690 if (along != (unsigned long)123)
11692 if (aint != (unsigned int)123)
11694 if (ashort != (unsigned short)123)
11701 if eval $compile_ok; then
11702 $run ./try 2>/dev/null
11705 echo "(I can't seem to compile the test program--assuming it can't)"
11708 case "$castflags" in
11710 echo "Yup, it can."
11713 echo "Nope, it can't."
11720 : see if cbrt exists
11724 : see if vprintf exists
11726 if set vprintf val -f d_vprintf; eval $csym; $val; then
11727 echo 'vprintf() found.' >&4
11730 #$i_stdarg I_STDARG /* Only one of these can be defined by i_varhrd */
11731 #$i_varargs I_VARARGS
11733 #$i_stdlib I_STDLIB
11734 #$i_unistd I_UNISTD
11737 # include <stdarg.h>
11738 #else /* I_VARARGS */
11739 # include <varargs.h>
11743 # include <unistd.h>
11747 # include <stdlib.h>
11750 #include <stdio.h> /* vsprintf prototype */
11753 void xxx(int n, ...)
11758 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
11760 int main() { xxx(1, "foo"); }
11762 #else /* I_VARARGS */
11770 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
11772 int main() { xxx("foo"); }
11778 if eval $compile_ok; then
11779 if $run ./try; then
11780 echo "Your vsprintf() returns (int)." >&4
11783 echo "Your vsprintf() returns (char*)." >&4
11787 echo 'I am unable to compile the vsprintf() test program.' >&4
11788 # We shouldn't get here. If we do, assume the standard signature,
11789 # not the old BSD one.
11790 echo 'Guessing that vsprintf() returns (int).' >&4
11794 echo 'vprintf() NOT found.' >&4
11805 : see if chown exists
11809 : see if chroot exists
11810 set chroot d_chroot
11813 : see if chsize exists
11814 set chsize d_chsize
11817 : see if class exists
11821 : see if clearenv exists
11822 set clearenv d_clearenv
11825 : Define hasstruct macro for Configure internal use
11826 hasstruct='varname=$1; struct=$2; shift; shift;
11827 while $test $# -ge 2; do
11829 $define) echo "#include <$2>";;
11833 echo "int main () { struct $struct foo; }" >> try.c;
11835 if eval $compile; then
11844 : see whether socket exists
11848 $echo $n "Hmm... $c" >&4
11849 if set socket val -f d_socket; eval $csym; $val; then
11850 echo "Looks like you have Berkeley networking support." >&4
11852 if set setsockopt val -f; eval $csym; $val; then
11855 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
11856 d_oldsock="$define"
11859 if $contains socklib libc.list >/dev/null 2>&1; then
11860 echo "Looks like you have Berkeley networking support." >&4
11862 : we will have to assume that it supports the 4.2 BSD interface
11865 echo "You don't have Berkeley networking in libc$_a..." >&4
11866 if test "X$d_socket" = "X$define"; then
11867 echo "...but you seem to believe that you have sockets." >&4
11869 for net in net socket
11871 if test -f $sysroot/usr/lib/lib$net$_a; then
11872 ( ($nm $nm_opt $sysroot/usr/lib/lib$net$_a | eval $nm_extract) || \
11873 $ar t $sysroot/usr/lib/lib$net$_a) 2>/dev/null >> libc.list
11874 if $contains socket libc.list >/dev/null 2>&1; then
11879 echo "...but the Wollongong group seems to have hacked it in." >&4
11880 sockethdr="-I$sysroot/usr/netinclude"
11883 echo "Found Berkeley sockets interface in lib$net." >&4
11884 if $contains setsockopt libc.list >/dev/null 2>&1; then
11887 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
11888 d_oldsock="$define"
11894 if test "X$d_socket" != "X$define"; then
11895 echo "or anywhere else I see." >&4
11903 : see if socketpair exists
11904 set socketpair d_sockpair
11909 echo "Checking the availability sa_len in the sock struct ..." >&4
11911 #include <sys/types.h>
11912 #include <sys/socket.h>
11914 struct sockaddr sa;
11915 return (sa.sa_len);
11919 set try; if eval $compile; then
11922 set d_sockaddr_sa_len; eval $setvar
11926 echo "Checking the availability struct sockaddr_in6 ..." >&4
11928 #include <sys/types.h>
11929 #include <sys/socket.h>
11930 #include <netinet/in.h>
11932 struct sockaddr_in6 sin6;
11933 return (sin6.sin6_family);
11937 set try; if eval $compile; then
11940 set d_sockaddr_in6; eval $setvar
11944 echo "Checking the availability sin6_scope_id in struct sockaddr_in6 ..." >&4
11946 #include <sys/types.h>
11947 #include <sys/socket.h>
11948 #include <netinet/in.h>
11950 struct sockaddr_in6 sin6;
11951 return (sin6.sin6_scope_id);
11955 set try; if eval $compile; then
11958 set d_sin6_scope_id; eval $setvar
11962 echo "Checking the availability struct ip_mreq ..." >&4
11964 #include <sys/types.h>
11965 #include <sys/socket.h>
11966 #include <netinet/in.h>
11968 struct ip_mreq mreq;
11969 return (mreq.imr_multiaddr.s_addr);
11973 set try; if eval $compile; then
11976 set d_ip_mreq; eval $setvar
11980 echo "Checking the availability struct ip_mreq_source ..." >&4
11982 #include <sys/types.h>
11983 #include <sys/socket.h>
11984 #include <netinet/in.h>
11986 struct ip_mreq_source mreq;
11987 return (mreq.imr_multiaddr.s_addr);
11991 set try; if eval $compile; then
11994 set d_ip_mreq_source; eval $setvar
11998 echo "Checking the availability struct ipv6_mreq ..." >&4
12000 #include <sys/types.h>
12001 #include <sys/socket.h>
12002 #include <netinet/in.h>
12004 struct ipv6_mreq mreq;
12005 return (mreq.ipv6mr_interface);
12009 set try; if eval $compile; then
12012 set d_ipv6_mreq; eval $setvar
12016 echo "Checking the availability struct ipv6_mreq_source ..." >&4
12018 #include <sys/types.h>
12019 #include <sys/socket.h>
12020 #include <netinet/in.h>
12022 struct ipv6_mreq_source mreq;
12023 return (mreq.imr_multiaddr.s_addr);
12027 set try; if eval $compile; then
12030 set d_ipv6_mreq_source; eval $setvar
12034 echo "Checking the availability of certain socket constants..." >&4
12035 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
12036 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
12038 #include <sys/types.h>
12039 #include <sys/socket.h>
12045 set try; if eval $compile; then
12048 set d_${enum}; eval $setvar
12052 : see if this is a sys/uio.h system
12053 set sys/uio.h i_sysuio
12056 : Check for cmsghdr support
12058 echo "Checking to see if your system supports struct cmsghdr..." >&4
12059 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
12061 case "$d_cmsghdr_s" in
12062 "$define") echo "Yes, it does." ;;
12063 *) echo "No, it doesn't." ;;
12067 : check for const keyword
12069 echo 'Checking to see if your C compiler knows about "const"...' >&4
12070 $cat >const.c <<'EOCP'
12071 typedef struct spug { int drokk; } spug;
12075 const spug y = { 0 };
12078 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
12080 echo "Yup, it does."
12083 echo "Nope, it doesn't."
12088 : see if copysign exists
12089 set copysign d_copysign
12092 : see if copysignl exists
12093 set copysignl d_copysignl
12096 : see if crypt exists
12101 $define) cryptlib='' ;;
12102 *) if set crypt val -f d_crypt; eval $csym; $val; then
12103 echo 'crypt() found.' >&4
12107 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
12108 if $test -z "$cryptlib"; then
12109 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
12113 if $test -z "$cryptlib"; then
12114 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
12118 if $test -z "$cryptlib"; then
12119 cryptlib=`./loc libcrypt$_a "" $libpth`
12123 if $test -z "$cryptlib"; then
12124 echo 'crypt() NOT found.' >&4
12135 : see if this is a crypt.h system
12136 set crypt.h i_crypt
12139 : see if crypt_r exists
12140 set crypt_r d_crypt_r
12142 case "$d_crypt_r" in
12144 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
12145 case "$d_crypt_r_proto:$usethreads" in
12146 ":define") d_crypt_r_proto=define
12147 set d_crypt_r_proto crypt_r $hdrs
12151 case "$d_crypt_r_proto" in
12153 case "$crypt_r_proto" in
12154 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
12155 ./protochk "$extern_C $try" $hdrs && crypt_r_proto=B_CCS ;;
12157 case "$crypt_r_proto" in
12158 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
12159 ./protochk "$extern_C $try" $hdrs && crypt_r_proto=B_CCD ;;
12161 case "$crypt_r_proto" in
12162 ''|0) d_crypt_r=undef
12164 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
12165 * ) case "$crypt_r_proto" in
12166 REENTRANT_PROTO*) ;;
12167 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
12169 echo "Prototype: $try" ;;
12172 *) case "$usethreads" in
12173 define) echo "crypt_r has no prototype, not using it." >&4 ;;
12184 : get csh whereabouts
12186 'csh') val="$undef" ;;
12187 *) val="$define" ;;
12191 : Respect a hint or command line value for full_csh.
12192 case "$full_csh" in
12193 '') full_csh=$csh ;;
12196 : see if ctermid exists
12197 set ctermid d_ctermid
12200 : see if ctermid_r exists
12201 set ctermid_r d_ctermid_r
12203 case "$d_ctermid_r" in
12205 hdrs="$i_systypes sys/types.h define stdio.h "
12206 case "$d_ctermid_r_proto:$usethreads" in
12207 ":define") d_ctermid_r_proto=define
12208 set d_ctermid_r_proto ctermid_r $hdrs
12212 case "$d_ctermid_r_proto" in
12214 case "$ctermid_r_proto" in
12215 ''|0) try='char* ctermid_r(char*);'
12216 ./protochk "$extern_C $try" $hdrs && ctermid_r_proto=B_B ;;
12218 case "$ctermid_r_proto" in
12219 ''|0) d_ctermid_r=undef
12221 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
12222 * ) case "$ctermid_r_proto" in
12223 REENTRANT_PROTO*) ;;
12224 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
12226 echo "Prototype: $try" ;;
12229 *) case "$usethreads" in
12230 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
12237 *) ctermid_r_proto=0
12241 : see if ctime_r exists
12242 set ctime_r d_ctime_r
12244 case "$d_ctime_r" in
12246 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
12247 case "$d_ctime_r_proto:$usethreads" in
12248 ":define") d_ctime_r_proto=define
12249 set d_ctime_r_proto ctime_r $hdrs
12253 case "$d_ctime_r_proto" in
12255 case "$ctime_r_proto" in
12256 ''|0) try='char* ctime_r(const time_t*, char*);'
12257 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=B_SB ;;
12259 case "$ctime_r_proto" in
12260 ''|0) try='char* ctime_r(const time_t*, char*, int);'
12261 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=B_SBI ;;
12263 case "$ctime_r_proto" in
12264 ''|0) try='int ctime_r(const time_t*, char*);'
12265 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=I_SB ;;
12267 case "$ctime_r_proto" in
12268 ''|0) try='int ctime_r(const time_t*, char*, int);'
12269 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=I_SBI ;;
12271 case "$ctime_r_proto" in
12272 ''|0) d_ctime_r=undef
12274 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
12275 * ) case "$ctime_r_proto" in
12276 REENTRANT_PROTO*) ;;
12277 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
12279 echo "Prototype: $try" ;;
12282 *) case "$usethreads" in
12283 define) echo "ctime_r has no prototype, not using it." >&4 ;;
12294 : see if cuserid exists
12295 set cuserid d_cuserid
12298 : see if this is a limits.h system
12299 set limits.h i_limits
12302 : See if number of significant digits in a double precision number is known
12304 $cat >dbl_dig.c <<EOM
12305 #$i_limits I_LIMITS
12308 #include <limits.h>
12314 printf("Contains DBL_DIG");
12317 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
12318 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
12319 echo "DBL_DIG found." >&4
12322 echo "DBL_DIG NOT found." >&4
12329 : see if dbm.h is available
12330 : see if dbmclose exists
12331 set dbmclose d_dbmclose
12334 case "$d_dbmclose" in
12344 *) set rpcsvc/dbm.h i_rpcsvcdbm
12349 *) echo "We won't be including <dbm.h>"
12359 : see if prototype for dbminit is available
12361 set d_dbminitproto dbminit $i_dbm dbm.h
12364 : see if difftime exists
12365 set difftime d_difftime
12368 : see if this is a dirent system
12370 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
12372 echo "<dirent.h> found." >&4
12375 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
12376 echo "<sys/dir.h> found." >&4
12379 xinc=`./findhdr sys/ndir.h`
12381 echo "<dirent.h> NOT found." >&4
12386 : Look for type of directory structure.
12388 $cppstdin $cppflags $cppminus < "$xinc" > try.c
12390 case "$direntrytype" in
12392 case "$i_dirent" in
12393 $define) guess1='struct dirent' ;;
12394 *) guess1='struct direct' ;;
12397 *) guess1="$direntrytype"
12402 'struct dirent') guess2='struct direct' ;;
12403 *) guess2='struct dirent' ;;
12406 if $contains "$guess1" try.c >/dev/null 2>&1; then
12407 direntrytype="$guess1"
12408 echo "Your directory entries are $direntrytype." >&4
12409 elif $contains "$guess2" try.c >/dev/null 2>&1; then
12410 direntrytype="$guess2"
12411 echo "Your directory entries seem to be $direntrytype." >&4
12413 echo "I don't recognize your system's directory entries." >&4
12414 rp="What type is used for directory entries on this system?"
12417 direntrytype="$ans"
12421 : see if the directory entry stores field length
12423 $cppstdin $cppflags $cppminus < "$xinc" > try.c
12424 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
12425 echo "Good, your directory entry keeps length information in d_namlen." >&4
12428 echo "Your directory entry does not know about the d_namlen field." >&4
12435 : Look for DIR.dd_fd
12436 case "$i_dirent" in
12438 echo "Checking to see if DIR has a dd_fd member variable" >&4
12440 #$i_stdlib I_STDLIB
12442 #include <stdlib.h>
12444 #include <dirent.h>
12454 if eval $compile; then
12455 echo "Yes, it does."
12458 echo "No, it does not."
12463 echo "You don't have a <dirent.h>, so not checking for dd_fd." >&4
12471 : see if this is an sysdir system
12472 set sys/dir.h i_sysdir
12475 : see if this is an sysndir system
12476 set sys/ndir.h i_sysndir
12481 $cat >dirfd.c <<EOM
12483 #$i_stdlib I_STDLIB
12485 #include <stdlib.h>
12487 #$i_dirent I_DIRENT /**/
12488 #$i_sysdir I_SYS_DIR /**/
12489 #$i_sysndir I_SYS_NDIR /**/
12490 #$i_systypes I_SYS_TYPES /**/
12491 #if defined(I_SYS_TYPES)
12492 #include <sys/types.h>
12494 #if defined(I_DIRENT)
12495 #include <dirent.h>
12498 #include <sys/ndir.h>
12502 #include <ndir.h> /* may be wrong in the future */
12504 #include <sys/dir.h>
12510 DIR *dirp = opendir(".");
12511 if (dirfd(dirp) >= 0)
12519 if eval $compile; then
12523 $define) echo "dirfd() found." >&4 ;;
12524 *) echo "dirfd() NOT found." >&4 ;;
12530 : see if dladdr exists
12531 set dladdr d_dladdr
12534 : see if dlerror exists
12537 set dlerror d_dlerror
12541 : see if dlfcn is available
12542 set dlfcn.h i_dlfcn
12545 : Check what extension to use for shared libs
12550 On a few systems, the dynamically loaded modules that perl generates and uses
12551 will need a different extension than shared libs. The default will probably
12557 *) dflt="$dlext" ;;
12559 rp='What is the extension of dynamically loaded modules'
12568 : Check if dlsym need a leading underscore
12574 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
12575 $cat >dyna.c <<'EOM'
12582 #$i_stdlib I_STDLIB
12584 #include <stdlib.h>
12588 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
12590 #include <sys/types.h>
12595 extern int fred() ;
12604 int mode = RTLD_LAZY ;
12606 handle = dlopen("./dyna.$dlext", mode) ;
12607 if (handle == NULL) {
12612 symbol = dlsym(handle, "fred") ;
12613 if (symbol == NULL) {
12614 /* try putting a leading underscore */
12615 symbol = dlsym(handle, "_fred") ;
12616 if (symbol == NULL) {
12629 : Call the object file tmp-dyna.o in case dlext=o.
12630 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
12631 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
12632 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
12633 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
12636 1) echo "Test program failed using dlopen." >&4
12637 echo "Perhaps you should not use dynamic loading." >&4;;
12638 2) echo "Test program failed using dlsym." >&4
12639 echo "Perhaps you should not use dynamic loading." >&4;;
12640 3) echo "dlsym needs a leading underscore" >&4
12642 4) echo "dlsym doesn't need a leading underscore." >&4;;
12645 echo "I can't compile and run the test program." >&4
12646 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
12651 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
12656 : see if drand48_r exists
12657 set drand48_r d_drand48_r
12659 case "$d_drand48_r" in
12661 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
12662 case "$d_drand48_r_proto:$usethreads" in
12663 ":define") d_drand48_r_proto=define
12664 set d_drand48_r_proto drand48_r $hdrs
12668 case "$d_drand48_r_proto" in
12670 case "$drand48_r_proto" in
12671 ''|0) try='int drand48_r(struct drand48_data*, double*);'
12672 ./protochk "$extern_C $try" $hdrs && drand48_r_proto=I_ST ;;
12674 case "$drand48_r_proto" in
12675 ''|0) d_drand48_r=undef
12677 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
12678 * ) case "$drand48_r_proto" in
12679 REENTRANT_PROTO*) ;;
12680 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
12682 echo "Prototype: $try" ;;
12685 *) case "$usethreads" in
12686 define) echo "drand48_r has no prototype, not using it." >&4 ;;
12693 *) drand48_r_proto=0
12697 : see if prototype for drand48 is available
12699 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
12702 : see if dup2 exists
12706 : see if eaccess exists
12707 set eaccess d_eaccess
12710 : see if endgrent exists
12711 set endgrent d_endgrent
12714 : see if this is an grp system
12720 xxx=`./findhdr grp.h`
12721 $cppstdin $cppflags $cppminus < $xxx >$$.h
12723 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
12735 set d_grpasswd; eval $setvar
12739 : see if endgrent_r exists
12740 set endgrent_r d_endgrent_r
12742 case "$d_endgrent_r" in
12744 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
12745 case "$d_endgrent_r_proto:$usethreads" in
12746 ":define") d_endgrent_r_proto=define
12747 set d_endgrent_r_proto endgrent_r $hdrs
12751 case "$d_endgrent_r_proto" in
12753 case "$endgrent_r_proto" in
12754 ''|0) try='int endgrent_r(FILE**);'
12755 ./protochk "$extern_C $try" $hdrs && endgrent_r_proto=I_H ;;
12757 case "$endgrent_r_proto" in
12758 ''|0) try='void endgrent_r(FILE**);'
12759 ./protochk "$extern_C $try" $hdrs && endgrent_r_proto=V_H ;;
12761 case "$endgrent_r_proto" in
12762 ''|0) d_endgrent_r=undef
12764 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
12765 * ) case "$endgrent_r_proto" in
12766 REENTRANT_PROTO*) ;;
12767 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
12769 echo "Prototype: $try" ;;
12772 *) case "$usethreads" in
12773 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
12780 *) endgrent_r_proto=0
12784 : see if endhostent exists
12785 set endhostent d_endhent
12788 : see if this is a netdb.h system
12789 set netdb.h i_netdb
12792 : see if endhostent_r exists
12793 set endhostent_r d_endhostent_r
12795 case "$d_endhostent_r" in
12797 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12798 case "$d_endhostent_r_proto:$usethreads" in
12799 ":define") d_endhostent_r_proto=define
12800 set d_endhostent_r_proto endhostent_r $hdrs
12804 case "$d_endhostent_r_proto" in
12806 case "$endhostent_r_proto" in
12807 ''|0) try='int endhostent_r(struct hostent_data*);'
12808 ./protochk "$extern_C $try" $hdrs && endhostent_r_proto=I_D ;;
12810 case "$endhostent_r_proto" in
12811 ''|0) try='void endhostent_r(struct hostent_data*);'
12812 ./protochk "$extern_C $try" $hdrs && endhostent_r_proto=V_D ;;
12814 case "$endhostent_r_proto" in
12815 ''|0) d_endhostent_r=undef
12816 endhostent_r_proto=0
12817 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
12818 * ) case "$endhostent_r_proto" in
12819 REENTRANT_PROTO*) ;;
12820 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
12822 echo "Prototype: $try" ;;
12825 *) case "$usethreads" in
12826 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
12828 d_endhostent_r=undef
12829 endhostent_r_proto=0
12833 *) endhostent_r_proto=0
12837 : see if endnetent exists
12838 set endnetent d_endnent
12841 : see if endnetent_r exists
12842 set endnetent_r d_endnetent_r
12844 case "$d_endnetent_r" in
12846 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12847 case "$d_endnetent_r_proto:$usethreads" in
12848 ":define") d_endnetent_r_proto=define
12849 set d_endnetent_r_proto endnetent_r $hdrs
12853 case "$d_endnetent_r_proto" in
12855 case "$endnetent_r_proto" in
12856 ''|0) try='int endnetent_r(struct netent_data*);'
12857 ./protochk "$extern_C $try" $hdrs && endnetent_r_proto=I_D ;;
12859 case "$endnetent_r_proto" in
12860 ''|0) try='void endnetent_r(struct netent_data*);'
12861 ./protochk "$extern_C $try" $hdrs && endnetent_r_proto=V_D ;;
12863 case "$endnetent_r_proto" in
12864 ''|0) d_endnetent_r=undef
12865 endnetent_r_proto=0
12866 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
12867 * ) case "$endnetent_r_proto" in
12868 REENTRANT_PROTO*) ;;
12869 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
12871 echo "Prototype: $try" ;;
12874 *) case "$usethreads" in
12875 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
12877 d_endnetent_r=undef
12878 endnetent_r_proto=0
12882 *) endnetent_r_proto=0
12886 : see if endprotoent exists
12887 set endprotoent d_endpent
12890 : see if endprotoent_r exists
12891 set endprotoent_r d_endprotoent_r
12893 case "$d_endprotoent_r" in
12895 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12896 case "$d_endprotoent_r_proto:$usethreads" in
12897 ":define") d_endprotoent_r_proto=define
12898 set d_endprotoent_r_proto endprotoent_r $hdrs
12902 case "$d_endprotoent_r_proto" in
12904 case "$endprotoent_r_proto" in
12905 ''|0) try='int endprotoent_r(struct protoent_data*);'
12906 ./protochk "$extern_C $try" $hdrs && endprotoent_r_proto=I_D ;;
12908 case "$endprotoent_r_proto" in
12909 ''|0) try='void endprotoent_r(struct protoent_data*);'
12910 ./protochk "$extern_C $try" $hdrs && endprotoent_r_proto=V_D ;;
12912 case "$endprotoent_r_proto" in
12913 ''|0) d_endprotoent_r=undef
12914 endprotoent_r_proto=0
12915 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
12916 * ) case "$endprotoent_r_proto" in
12917 REENTRANT_PROTO*) ;;
12918 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
12920 echo "Prototype: $try" ;;
12923 *) case "$usethreads" in
12924 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
12926 d_endprotoent_r=undef
12927 endprotoent_r_proto=0
12931 *) endprotoent_r_proto=0
12935 : see if endpwent exists
12936 set endpwent d_endpwent
12939 : see if this is a pwd.h system
12945 xxx=`./findhdr pwd.h`
12946 $cppstdin $cppflags $cppminus < $xxx >$$.h
12948 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
12956 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
12964 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
12972 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
12980 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
12988 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
12996 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
13004 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
13016 set d_pwquota; eval $setvar
13017 set d_pwage; eval $setvar
13018 set d_pwchange; eval $setvar
13019 set d_pwclass; eval $setvar
13020 set d_pwexpire; eval $setvar
13021 set d_pwcomment; eval $setvar
13022 set d_pwgecos; eval $setvar
13023 set d_pwpasswd; eval $setvar
13027 : see if endpwent_r exists
13028 set endpwent_r d_endpwent_r
13030 case "$d_endpwent_r" in
13032 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
13033 case "$d_endpwent_r_proto:$usethreads" in
13034 ":define") d_endpwent_r_proto=define
13035 set d_endpwent_r_proto endpwent_r $hdrs
13039 case "$d_endpwent_r_proto" in
13041 case "$endpwent_r_proto" in
13042 ''|0) try='int endpwent_r(FILE**);'
13043 ./protochk "$extern_C $try" $hdrs && endpwent_r_proto=I_H ;;
13045 case "$endpwent_r_proto" in
13046 ''|0) try='void endpwent_r(FILE**);'
13047 ./protochk "$extern_C $try" $hdrs && endpwent_r_proto=V_H ;;
13049 case "$endpwent_r_proto" in
13050 ''|0) d_endpwent_r=undef
13052 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
13053 * ) case "$endpwent_r_proto" in
13054 REENTRANT_PROTO*) ;;
13055 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
13057 echo "Prototype: $try" ;;
13060 *) case "$usethreads" in
13061 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
13068 *) endpwent_r_proto=0
13072 : see if endservent exists
13073 set endservent d_endsent
13076 : see if endservent_r exists
13077 set endservent_r d_endservent_r
13079 case "$d_endservent_r" in
13081 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13082 case "$d_endservent_r_proto:$usethreads" in
13083 ":define") d_endservent_r_proto=define
13084 set d_endservent_r_proto endservent_r $hdrs
13088 case "$d_endservent_r_proto" in
13090 case "$endservent_r_proto" in
13091 ''|0) try='int endservent_r(struct servent_data*);'
13092 ./protochk "$extern_C $try" $hdrs && endservent_r_proto=I_D ;;
13094 case "$endservent_r_proto" in
13095 ''|0) try='void endservent_r(struct servent_data*);'
13096 ./protochk "$extern_C $try" $hdrs && endservent_r_proto=V_D ;;
13098 case "$endservent_r_proto" in
13099 ''|0) d_endservent_r=undef
13100 endservent_r_proto=0
13101 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
13102 * ) case "$endservent_r_proto" in
13103 REENTRANT_PROTO*) ;;
13104 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
13106 echo "Prototype: $try" ;;
13109 *) case "$usethreads" in
13110 define) echo "endservent_r has no prototype, not using it." >&4 ;;
13112 d_endservent_r=undef
13113 endservent_r_proto=0
13117 *) endservent_r_proto=0
13121 : Locate the flags for 'open()'
13124 #include <sys/types.h>
13129 #include <sys/file.h>
13131 #$i_stdlib I_STDLIB
13133 #include <stdlib.h>
13144 : check sys/file.h first to get FREAD on Sun
13145 if $test `./findhdr sys/file.h` && \
13146 set try -DI_SYS_FILE && eval $compile; then
13148 echo "<sys/file.h> defines the O_* constants..." >&4
13149 if $run ./try; then
13150 echo "and you have the 3 argument form of open()." >&4
13153 echo "but not the 3 argument form of open(). Oh, well." >&4
13156 elif $test `./findhdr fcntl.h` && \
13157 set try -DI_FCNTL && eval $compile; then
13159 echo "<fcntl.h> defines the O_* constants..." >&4
13160 if $run ./try; then
13161 echo "and you have the 3 argument form of open()." >&4
13164 echo "but not the 3 argument form of open(). Oh, well." >&4
13169 echo "I can't find the O_* constant definitions! You got problems." >&4
13175 : see if this is a sys/file.h system
13180 : do we need to include sys/file.h ?
13184 if $h_sysfile; then
13186 echo "We'll be including <sys/file.h>." >&4
13189 echo "We won't be including <sys/file.h>." >&4
13199 : see if fcntl.h is there
13204 : see if we can include fcntl.h
13210 echo "We'll be including <fcntl.h>." >&4
13213 if $h_sysfile; then
13214 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
13216 echo "We won't be including <fcntl.h>." >&4
13228 : see if fork exists
13232 : see if pipe exists
13236 : check for non-blocking I/O stuff
13237 case "$h_sysfile" in
13238 true) echo "#include <sys/file.h>" > head.c;;
13241 true) echo "#include <fcntl.h>" > head.c;;
13242 *) echo "#include <sys/fcntl.h>" > head.c;;
13247 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
13248 case "$o_nonblock" in
13250 $cat head.c > try.c
13251 $cat >>try.c <<EOCP
13253 #$i_stdlib I_STDLIB
13255 #include <stdlib.h>
13263 printf("O_NONBLOCK\n");
13267 printf("O_NDELAY\n");
13271 printf("FNDELAY\n");
13278 if eval $compile_ok; then
13279 o_nonblock=`$run ./try`
13280 case "$o_nonblock" in
13281 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
13282 *) echo "Seems like we can use $o_nonblock.";;
13285 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
13288 *) echo "Using $hint value $o_nonblock.";;
13293 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
13296 case "$d_fork:$d_pipe" in
13298 $cat head.c > try.c
13299 $cat >>try.c <<EOCP
13301 #include <sys/types.h>
13302 #include <signal.h>
13304 #$i_stdlib I_STDLIB
13306 #include <stdlib.h>
13312 #define MY_O_NONBLOCK $o_nonblock
13313 #ifndef errno /* XXX need better Configure test */
13316 #$i_unistd I_UNISTD
13318 #include <unistd.h>
13320 #$i_string I_STRING
13322 #include <string.h>
13324 #include <strings.h>
13326 $signal_t blech(int x) { exit(3); }
13328 $cat >> try.c <<'EOCP'
13337 ret = pipe(pd); /* Down: child -> parent */
13340 ret = pipe(pu); /* Up: parent -> child */
13344 close(pd[1]); /* Parent reads from pd[0] */
13345 close(pu[0]); /* Parent writes (blocking) to pu[1] */
13347 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
13352 signal(SIGALRM, blech);
13354 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
13356 sprintf(string, "%d\n", ret);
13357 ret = write(2, string, strlen(string));
13358 if (ret != strlen(string))
13362 if (errno == EAGAIN) {
13363 printf("EAGAIN\n");
13368 if (errno == EWOULDBLOCK)
13369 printf("EWOULDBLOCK\n");
13372 ret = write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
13375 sleep(2); /* Give it time to close our pipe */
13377 ret = read(pd[0], buf, 1); /* Should read EOF */
13379 sprintf(string, "%d\n", ret);
13380 ret = write(4, string, strlen(string));
13381 if (ret != strlen(string))
13386 close(pd[0]); /* We write to pd[1] */
13387 close(pu[1]); /* We read from pu[0] */
13388 ret = read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
13391 close(pd[1]); /* Pipe pd is now fully closed! */
13392 exit(0); /* Bye bye, thank you for playing! */
13396 if eval $compile_ok; then
13397 echo "$startsh" >mtry
13398 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
13400 $run ./mtry >/dev/null 2>&1
13402 0) eagain=`$cat try.out`;;
13403 1) echo "Could not perform non-blocking setting!";;
13404 2) echo "I did a successful read() for something that was not there!";;
13405 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
13406 4) echo "Could not find F_SETFL!";;
13407 *) echo "Something terribly wrong happened during testing.";;
13409 rd_nodata=`$cat try.ret`
13410 echo "A read() system call with no data present returns $rd_nodata."
13411 case "$rd_nodata" in
13414 echo "(That's peculiar, fixing that to be -1.)"
13420 echo "Forcing errno EAGAIN on read() with no data available."
13424 echo "Your read() sets errno to $eagain when no data is available."
13427 status=`$cat try.err`
13429 0) echo "And it correctly returns 0 to signal EOF.";;
13430 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
13431 *) echo "However, your read() returns '$status' on EOF??";;
13434 if test "$status" = "$rd_nodata"; then
13435 echo "WARNING: you can't distinguish between EOF and no data!"
13439 echo "I can't compile the test program--assuming errno EAGAIN will do."
13443 *) echo "Can't figure out how to test this--assuming errno EAGAIN will do."
13452 echo "Using $hint value $eagain."
13453 echo "Your read() returns $rd_nodata when no data is present."
13454 case "$d_eofnblk" in
13455 "$define") echo "And you can see EOF because read() returns 0.";;
13456 "$undef") echo "But you can't see EOF status from read() returned value.";;
13458 echo "(Assuming you can't see EOF status from read anyway.)"
13464 $rm_try head.c mtry
13466 : see if erf exists
13470 : see if erfc exists
13474 : see if exp2 exists
13478 : see if expm1 exists
13482 : see if _ptr and _cnt from stdio act std
13485 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
13486 echo "(Looks like you have stdio.h from BSD.)"
13487 case "$stdio_ptr" in
13488 '') stdio_ptr='((fp)->_p)'
13491 *) ptr_lval=$d_stdio_ptr_lval;;
13493 case "$stdio_cnt" in
13494 '') stdio_cnt='((fp)->_r)'
13497 *) cnt_lval=$d_stdio_cnt_lval;;
13499 case "$stdio_base" in
13500 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
13502 case "$stdio_bufsiz" in
13503 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
13505 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
13506 echo "(Looks like you have stdio.h from Linux.)"
13507 case "$stdio_ptr" in
13508 '') stdio_ptr='((fp)->_IO_read_ptr)'
13511 *) ptr_lval=$d_stdio_ptr_lval;;
13513 case "$stdio_cnt" in
13514 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
13517 *) cnt_lval=$d_stdio_cnt_lval;;
13519 case "$stdio_base" in
13520 '') stdio_base='((fp)->_IO_read_base)';;
13522 case "$stdio_bufsiz" in
13523 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
13526 case "$stdio_ptr" in
13527 '') stdio_ptr='((fp)->_ptr)'
13530 *) ptr_lval=$d_stdio_ptr_lval;;
13532 case "$stdio_cnt" in
13533 '') stdio_cnt='((fp)->_cnt)'
13536 *) cnt_lval=$d_stdio_cnt_lval;;
13538 case "$stdio_base" in
13539 '') stdio_base='((fp)->_base)';;
13541 case "$stdio_bufsiz" in
13542 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
13546 : test whether _ptr and _cnt really work
13547 echo "Checking how std your stdio is..." >&4
13550 #$i_stdlib I_STDLIB
13552 #include <stdlib.h>
13554 #define FILE_ptr(fp) $stdio_ptr
13555 #define FILE_cnt(fp) $stdio_cnt
13557 FILE *fp = fopen("try.c", "r");
13560 18 <= FILE_cnt(fp) &&
13561 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
13569 if eval $compile && $to try.c; then
13570 if $run ./try; then
13571 echo "Your stdio acts pretty std."
13574 echo "Your stdio isn't very std."
13577 echo "Your stdio doesn't appear very std."
13581 # glibc 2.2.90 and above apparently change stdio streams so Perl's
13582 # direct buffer manipulation no longer works. The Configure tests
13583 # should be changed to correctly detect this, but until then,
13584 # the following check should at least let perl compile and run.
13585 # (This quick fix should be updated before 5.8.1.)
13586 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
13587 # A. Dougherty, June 3, 2002.
13588 case "$d_gnulibc" in
13590 case "$gnulibc_version" in
13594 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
13603 : Can _ptr be used as an lvalue?
13604 case "$d_stdstdio$ptr_lval" in
13605 $define$define) val=$define ;;
13608 set d_stdio_ptr_lval
13611 : Can _cnt be used as an lvalue?
13612 case "$d_stdstdio$cnt_lval" in
13613 $define$define) val=$define ;;
13616 set d_stdio_cnt_lval
13620 : test whether setting _ptr sets _cnt as a side effect
13621 d_stdio_ptr_lval_sets_cnt="$undef"
13622 d_stdio_ptr_lval_nochange_cnt="$undef"
13623 case "$d_stdio_ptr_lval$d_stdstdio" in
13625 echo "Checking to see what happens if we set the stdio ptr..." >&4
13628 /* Can we scream? */
13629 /* Eat dust sed :-) */
13630 /* In the buffer space, no one can hear you scream. */
13631 #$i_stdlib I_STDLIB
13633 #include <stdlib.h>
13635 #define FILE_ptr(fp) $stdio_ptr
13636 #define FILE_cnt(fp) $stdio_cnt
13637 #include <sys/types.h>
13639 FILE *fp = fopen("try.c", "r");
13644 puts("Fail even to read");
13647 c = getc(fp); /* Read away the first # */
13649 puts("Fail even to read");
13653 18 <= FILE_cnt(fp) &&
13654 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
13656 puts("Fail even to read");
13659 ptr = (char*) FILE_ptr(fp);
13660 cnt = (size_t)FILE_cnt(fp);
13662 FILE_ptr(fp) += 42;
13664 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
13665 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
13668 if (FILE_cnt(fp) <= 20) {
13669 printf ("Fail (<20 chars to test)");
13672 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
13673 puts("Fail compare");
13676 if (cnt == FILE_cnt(fp)) {
13677 puts("Pass_unchanged");
13680 if (FILE_cnt(fp) == (cnt - 42)) {
13681 puts("Pass_changed");
13684 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
13690 if eval $compile && $to try.c; then
13691 case `$run ./try` in
13693 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
13694 d_stdio_ptr_lval_sets_cnt="$define" ;;
13696 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
13697 d_stdio_ptr_lval_nochange_cnt="$define" ;;
13699 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
13701 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
13704 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
13710 : see if _base is also standard
13712 case "$d_stdstdio" in
13716 #$i_stdlib I_STDLIB
13718 #include <stdlib.h>
13720 #define FILE_base(fp) $stdio_base
13721 #define FILE_bufsiz(fp) $stdio_bufsiz
13723 FILE *fp = fopen("try.c", "r");
13726 19 <= FILE_bufsiz(fp) &&
13727 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
13734 if eval $compile && $to try.c; then
13735 if $run ./try; then
13736 echo "And its _base field acts std."
13739 echo "But its _base field isn't std."
13742 echo "However, it seems to be lacking the _base field."
13750 : see if fast_stdio exists
13752 case "$d_stdstdio:$d_stdio_ptr_lval" in
13754 case "$d_stdio_cnt_lval$d_stdio_ptr_lval_sets_cnt" in
13756 echo "You seem to have 'fast stdio' to directly manipulate the stdio buffers." >& 4
13767 : see if fchdir exists
13768 set fchdir d_fchdir
13771 : see if fchmod exists
13772 set fchmod d_fchmod
13775 : see if fchown exists
13776 set fchown d_fchown
13779 : see if this is an fcntl system
13783 : See if fcntl-based locking works.
13786 #$i_stdlib I_STDLIB
13788 #include <stdlib.h>
13790 #include <unistd.h>
13792 #include <signal.h>
13793 $signal_t blech(int x) { exit(3); }
13795 #if defined(F_SETLK) && defined(F_SETLKW)
13796 struct flock flock;
13798 fd = open("try.c", O_RDONLY);
13799 flock.l_type = F_RDLCK;
13800 flock.l_whence = SEEK_SET;
13801 flock.l_start = flock.l_len = 0;
13802 signal(SIGALRM, blech);
13804 retval = fcntl(fd, F_SETLK, &flock);
13806 (retval < 0 ? exit(2) : exit(0));
13812 echo "Checking if fcntl-based file locking works... "
13816 if eval $compile_ok; then
13817 if $run ./try; then
13818 echo "Yes, it seems to work."
13821 echo "Nope, it didn't work."
13826 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
13827 *** This is (almost) impossible.
13828 *** If your NFS lock daemons are not feeling well, something like
13829 *** this may happen, please investigate. Cannot continue, aborting.
13837 echo "I'm unable to compile the test program, so I'll assume not."
13842 echo "Nope, since you don't even have fcntl()."
13845 set d_fcntl_can_lock
13849 : check for fd_set items
13852 Checking to see how well your C compiler handles fd_set and friends ...
13855 #$i_stdlib I_STDLIB
13857 #include <stdlib.h>
13859 #$i_systime I_SYS_TIME
13860 #$i_sysselct I_SYS_SELECT
13861 #$d_socket HAS_SOCKET
13862 #include <sys/types.h>
13864 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
13867 #include <sys/time.h>
13869 #ifdef I_SYS_SELECT
13870 #include <sys/select.h>
13879 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
13887 if eval $compile; then
13888 d_fds_bits="$define"
13890 echo "Well, your system knows about the normal fd_set typedef..." >&4
13891 if $run ./try; then
13892 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
13893 d_fd_macros="$define"
13896 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
13898 d_fd_macros="$undef"
13902 Hmm, your compiler has some difficulty with fd_set. Checking further...
13905 if eval $compile; then
13906 d_fds_bits="$undef"
13908 echo "Well, your system has some sort of fd_set available..." >&4
13909 if $run ./try; then
13910 echo "and you have the normal fd_set macros." >&4
13911 d_fd_macros="$define"
13914 but not the normal fd_set macros! Gross! More work for me...
13916 d_fd_macros="$undef"
13919 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
13921 d_fds_bits="$undef"
13922 d_fd_macros="$undef"
13927 : see if fdim exists
13931 : see if fegetround exists
13932 set fegetround d_fegetround
13935 : see if fgetpos exists
13936 set fgetpos d_fgetpos
13939 : see if finite exists
13940 set finite d_finite
13943 : see if finitel exists
13944 set finitel d_finitel
13947 : see if flock exists
13951 : see if prototype for flock is available
13953 set d_flockproto flock $i_sysfile sys/file.h
13956 : see if fma exists
13960 : see if fmax exists
13964 : see if fmin exists
13968 : see if fp_class exists
13969 set fp_class d_fp_class
13972 : see if this is a math.h system
13976 : check for fpclassify
13977 echo "Checking to see if you have fpclassify..." >&4
13983 int main() { return fpclassify(1.0) == FP_NORMAL ? 0 : 1; }
13986 if eval $compile; then
13988 echo "You have fpclassify."
13991 echo "You do not have fpclassify."
13997 : see if fp_classify exists
13998 set fp_classify d_fp_classify
14001 : see if fp_classl exists
14002 set fp_classl d_fp_classl
14005 : see if pathconf exists
14006 set pathconf d_pathconf
14009 : see if fpathconf exists
14010 set fpathconf d_fpathconf
14013 : see if fpclass exists
14014 set fpclass d_fpclass
14017 : see if fpclassl exists
14018 set fpclassl d_fpclassl
14021 : see if fpgetround exists
14022 set fpgetround d_fpgetround
14025 : check for fpos64_t
14027 echo "Checking to see if you have fpos64_t..." >&4
14030 int main() { fpos64_t x = 7; }
14033 if eval $compile; then
14035 echo "You have fpos64_t."
14038 echo "You do not have fpos64_t."
14039 case "$fpossize" in
14040 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
14047 : see if frexpl exists
14048 set frexpl d_frexpl
14051 : see if this is a sys/param system
14052 set sys/param.h i_sysparam
14055 : see if this is a sys/mount.h system
14056 set sys/mount.h i_sysmount
14059 : Check for fs_data_s
14061 echo "Checking to see if your system supports struct fs_data..." >&4
14062 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
14064 case "$d_fs_data_s" in
14065 "$define") echo "Yes, it does." ;;
14066 *) echo "No, it doesn't." ;;
14069 : see if fseeko exists
14070 set fseeko d_fseeko
14072 case "$longsize" in
14073 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
14076 : see if fsetpos exists
14077 set fsetpos d_fsetpos
14080 : see if fstatfs exists
14081 set fstatfs d_fstatfs
14084 : see if statvfs exists
14085 set statvfs d_statvfs
14088 : see if fstatvfs exists
14089 set fstatvfs d_fstatvfs
14093 : see if fsync exists
14097 : see if ftello exists
14098 set ftello d_ftello
14100 case "$longsize" in
14101 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
14104 : check for a working futimes
14107 echo "Checking if you have a working futimes()" >&4
14110 #include <sys/time.h>
14117 fd = open ("try.c", O_RDWR);
14118 if (-1 == fd) exit (1);
14119 rv = futimes (fd, NULL);
14120 exit (rv == -1 ? errno : 0);
14124 if eval $compile; then
14128 0) echo "Yes, you have" >&4
14129 d_futimes="$define"
14131 *) echo "No, you have futimes, but it isn't working ($rc) (probably harmless)" >&4
14135 echo "No, it does not (probably harmless)" >&4
14139 : see if ndbm.h is available
14142 : Compatibility location for RedHat 7.1
14143 set gdbm/ndbm.h i_gdbmndbm
14145 : Compatibility location for Debian 4.0
14146 set gdbm-ndbm.h i_gdbm_ndbm
14150 if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then
14151 : see if dbm_open exists
14152 set dbm_open d_dbm_open
14154 case "$d_dbm_open" in
14157 i_gdbmndbm="$undef"
14158 i_gdbm_ndbm="$undef"
14159 echo "We won't be including <ndbm.h>"
14169 ndbm_hdr_protochk='name=$1; hdr=$2;
14170 eval "ihdr=\$""i_$name";
14172 if $test "$ihdr" = "$define"; then
14173 $echo "Checking if your <$hdr> uses prototypes..." >&4;
14174 case "$d_cplusplus" in
14175 $define) ./protochk "$extern_C void dbm_close(DBM *);" literal "extern \"C\" {" $ihdr $hdr literal "}" && val="$define" ;;
14176 *) ./protochk "$extern_C void dbm_close(int, int);" $ihdr $hdr || val="$define" ;;
14179 $define) $echo "Your <$hdr> seems to have prototypes";;
14180 *) $echo "Your <$hdr> does not seem to have prototypes";;
14183 set "d_${name}_h_uses_prototypes";
14187 eval $ndbm_hdr_protochk
14188 set gdbmndbm gdbm/ndbm.h
14189 eval $ndbm_hdr_protochk
14190 set gdbm_ndbm gdbm-ndbm.h
14191 eval $ndbm_hdr_protochk
14193 : see if getaddrinfo exists
14194 set getaddrinfo d_getaddrinfo
14197 : see if getcwd exists
14198 set getcwd d_getcwd
14201 : see if getespwnam exists
14202 set getespwnam d_getespwnam
14205 : see if getfsstat exists
14206 set getfsstat d_getfsstat
14209 : see if getgrent exists
14210 set getgrent d_getgrent
14213 : see if getgrent_r exists
14214 set getgrent_r d_getgrent_r
14216 case "$d_getgrent_r" in
14218 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14219 case "$d_getgrent_r_proto:$usethreads" in
14220 ":define") d_getgrent_r_proto=define
14221 set d_getgrent_r_proto getgrent_r $hdrs
14225 case "$d_getgrent_r_proto" in
14227 case "$getgrent_r_proto" in
14228 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
14229 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBWR ;;
14231 case "$getgrent_r_proto" in
14232 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
14233 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBIR ;;
14235 case "$getgrent_r_proto" in
14236 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
14237 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=S_SBW ;;
14239 case "$getgrent_r_proto" in
14240 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
14241 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=S_SBI ;;
14243 case "$getgrent_r_proto" in
14244 ''|0) try='int getgrent_r(struct group*, char*, int);'
14245 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBI ;;
14247 case "$getgrent_r_proto" in
14248 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
14249 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBIH ;;
14251 case "$getgrent_r_proto" in
14252 ''|0) d_getgrent_r=undef
14254 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
14255 * ) case "$getgrent_r_proto" in
14256 REENTRANT_PROTO*) ;;
14257 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
14259 echo "Prototype: $try" ;;
14262 *) case "$usethreads" in
14263 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
14270 *) getgrent_r_proto=0
14274 : see if getgrgid_r exists
14275 set getgrgid_r d_getgrgid_r
14277 case "$d_getgrgid_r" in
14279 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14280 case "$d_getgrgid_r_proto:$usethreads" in
14281 ":define") d_getgrgid_r_proto=define
14282 set d_getgrgid_r_proto getgrgid_r $hdrs
14286 case "$d_getgrgid_r_proto" in
14288 case "$getgrgid_r_proto" in
14289 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
14290 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
14292 case "$getgrgid_r_proto" in
14293 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
14294 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
14296 case "$getgrgid_r_proto" in
14297 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
14298 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
14300 case "$getgrgid_r_proto" in
14301 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
14302 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
14304 case "$getgrgid_r_proto" in
14305 ''|0) d_getgrgid_r=undef
14307 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
14308 * ) case "$getgrgid_r_proto" in
14309 REENTRANT_PROTO*) ;;
14310 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
14312 echo "Prototype: $try" ;;
14315 *) case "$usethreads" in
14316 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
14323 *) getgrgid_r_proto=0
14327 : see if getgrnam_r exists
14328 set getgrnam_r d_getgrnam_r
14330 case "$d_getgrnam_r" in
14332 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14333 case "$d_getgrnam_r_proto:$usethreads" in
14334 ":define") d_getgrnam_r_proto=define
14335 set d_getgrnam_r_proto getgrnam_r $hdrs
14339 case "$d_getgrnam_r_proto" in
14341 case "$getgrnam_r_proto" in
14342 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
14343 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
14345 case "$getgrnam_r_proto" in
14346 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
14347 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
14349 case "$getgrnam_r_proto" in
14350 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
14351 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=S_CBI ;;
14353 case "$getgrnam_r_proto" in
14354 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
14355 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
14357 case "$getgrnam_r_proto" in
14358 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
14359 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
14361 case "$getgrnam_r_proto" in
14362 ''|0) d_getgrnam_r=undef
14364 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
14365 * ) case "$getgrnam_r_proto" in
14366 REENTRANT_PROTO*) ;;
14367 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
14369 echo "Prototype: $try" ;;
14372 *) case "$usethreads" in
14373 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
14380 *) getgrnam_r_proto=0
14384 : see if gethostbyaddr exists
14385 set gethostbyaddr d_gethbyaddr
14388 : see if gethostbyname exists
14389 set gethostbyname d_gethbyname
14392 : see if gethostent exists
14393 set gethostent d_gethent
14396 : see how we will look up host name
14399 if set gethostname val -f d_gethname; eval $csym; $val; then
14400 echo 'gethostname() found.' >&4
14401 d_gethname="$define"
14404 if set uname val -f d_uname; eval $csym; $val; then
14407 uname() was found, but you're running xenix, and older versions of xenix
14408 have a broken uname(). If you don't really know whether your xenix is old
14409 enough to have a broken system call, use the default answer.
14414 "$define") dflt=n;;
14416 rp='Is your uname() broken?'
14419 n*) d_uname="$define"; call=uname;;
14422 echo 'uname() found.' >&4
14429 case "$d_gethname" in
14430 '') d_gethname="$undef";;
14433 '') d_uname="$undef";;
14435 case "$d_uname$d_gethname" in
14440 Every now and then someone has a $call() that lies about the hostname
14441 but can't be fixed for political or economic reasons. If you wish, I can
14442 pretend $call() isn't there and maybe compute hostname at run-time
14443 thanks to the '$phostname' command.
14446 rp="Shall I ignore $call() from now on?"
14449 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
14452 case "$phostname" in
14453 '') aphostname='';;
14454 *) case "$aphostname" in
14456 *) set X $phostname
14460 file=`./loc $file $file $pth`
14461 aphostname=`echo $file $*`
14466 case "$d_uname$d_gethname" in
14469 case "$phostname" in
14471 echo "There will be no way for $package to get your hostname." >&4;;
14473 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
14477 case "$d_phostname" in
14478 '') d_phostname="$undef";;
14481 : see if gethostbyaddr_r exists
14482 set gethostbyaddr_r d_gethostbyaddr_r
14484 case "$d_gethostbyaddr_r" in
14486 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14487 case "$d_gethostbyaddr_r_proto:$usethreads" in
14488 ":define") d_gethostbyaddr_r_proto=define
14489 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
14493 case "$d_gethostbyaddr_r_proto" in
14495 case "$gethostbyaddr_r_proto" in
14496 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
14497 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
14499 case "$gethostbyaddr_r_proto" in
14500 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
14501 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
14503 case "$gethostbyaddr_r_proto" in
14504 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
14505 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
14507 case "$gethostbyaddr_r_proto" in
14508 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
14509 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
14511 case "$gethostbyaddr_r_proto" in
14512 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
14513 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
14515 case "$gethostbyaddr_r_proto" in
14516 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
14517 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
14519 case "$gethostbyaddr_r_proto" in
14520 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
14521 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
14523 case "$gethostbyaddr_r_proto" in
14524 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
14525 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
14527 case "$gethostbyaddr_r_proto" in
14528 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
14529 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
14531 case "$gethostbyaddr_r_proto" in
14532 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
14533 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
14535 case "$gethostbyaddr_r_proto" in
14536 ''|0) try='int gethostbyaddr_r(const void*, socklen_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
14537 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_TsISBWRE ;;
14539 case "$gethostbyaddr_r_proto" in
14540 ''|0) d_gethostbyaddr_r=undef
14541 gethostbyaddr_r_proto=0
14542 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
14543 * ) case "$gethostbyaddr_r_proto" in
14544 REENTRANT_PROTO*) ;;
14545 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
14547 echo "Prototype: $try" ;;
14550 *) case "$usethreads" in
14551 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
14553 d_gethostbyaddr_r=undef
14554 gethostbyaddr_r_proto=0
14558 *) gethostbyaddr_r_proto=0
14562 : see if gethostbyname_r exists
14563 set gethostbyname_r d_gethostbyname_r
14565 case "$d_gethostbyname_r" in
14567 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14568 case "$d_gethostbyname_r_proto:$usethreads" in
14569 ":define") d_gethostbyname_r_proto=define
14570 set d_gethostbyname_r_proto gethostbyname_r $hdrs
14574 case "$d_gethostbyname_r_proto" in
14576 case "$gethostbyname_r_proto" in
14577 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
14578 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
14580 case "$gethostbyname_r_proto" in
14581 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
14582 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
14584 case "$gethostbyname_r_proto" in
14585 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
14586 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
14588 case "$gethostbyname_r_proto" in
14589 ''|0) d_gethostbyname_r=undef
14590 gethostbyname_r_proto=0
14591 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
14592 * ) case "$gethostbyname_r_proto" in
14593 REENTRANT_PROTO*) ;;
14594 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
14596 echo "Prototype: $try" ;;
14599 *) case "$usethreads" in
14600 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
14602 d_gethostbyname_r=undef
14603 gethostbyname_r_proto=0
14607 *) gethostbyname_r_proto=0
14611 : see if gethostent_r exists
14612 set gethostent_r d_gethostent_r
14614 case "$d_gethostent_r" in
14616 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14617 case "$d_gethostent_r_proto:$usethreads" in
14618 ":define") d_gethostent_r_proto=define
14619 set d_gethostent_r_proto gethostent_r $hdrs
14623 case "$d_gethostent_r_proto" in
14625 case "$gethostent_r_proto" in
14626 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
14627 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
14629 case "$gethostent_r_proto" in
14630 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
14631 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBIE ;;
14633 case "$gethostent_r_proto" in
14634 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
14635 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=S_SBIE ;;
14637 case "$gethostent_r_proto" in
14638 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
14639 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=S_SBI ;;
14641 case "$gethostent_r_proto" in
14642 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
14643 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBI ;;
14645 case "$gethostent_r_proto" in
14646 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
14647 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SD ;;
14649 case "$gethostent_r_proto" in
14650 ''|0) d_gethostent_r=undef
14651 gethostent_r_proto=0
14652 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
14653 * ) case "$gethostent_r_proto" in
14654 REENTRANT_PROTO*) ;;
14655 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
14657 echo "Prototype: $try" ;;
14660 *) case "$usethreads" in
14661 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
14663 d_gethostent_r=undef
14664 gethostent_r_proto=0
14668 *) gethostent_r_proto=0
14672 : see if prototypes for various gethostxxx netdb.h functions are available
14674 set d_gethostprotos gethostent $i_netdb netdb.h
14677 : see if getitimer exists
14678 set getitimer d_getitimer
14681 : see if getlogin exists
14682 set getlogin d_getlogin
14685 : see if getlogin_r exists
14686 set getlogin_r d_getlogin_r
14688 case "$d_getlogin_r" in
14690 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
14691 case "$d_getlogin_r_proto:$usethreads" in
14692 ":define") d_getlogin_r_proto=define
14693 set d_getlogin_r_proto getlogin_r $hdrs
14697 case "$d_getlogin_r_proto" in
14699 case "$getlogin_r_proto" in
14700 ''|0) try='int getlogin_r(char*, size_t);'
14701 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=I_BW ;;
14703 case "$getlogin_r_proto" in
14704 ''|0) try='int getlogin_r(char*, int);'
14705 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=I_BI ;;
14707 case "$getlogin_r_proto" in
14708 ''|0) try='char* getlogin_r(char*, size_t);'
14709 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=B_BW ;;
14711 case "$getlogin_r_proto" in
14712 ''|0) try='char* getlogin_r(char*, int);'
14713 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=B_BI ;;
14715 case "$getlogin_r_proto" in
14716 ''|0) d_getlogin_r=undef
14718 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
14719 * ) case "$getlogin_r_proto" in
14720 REENTRANT_PROTO*) ;;
14721 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
14723 echo "Prototype: $try" ;;
14726 *) case "$usethreads" in
14727 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
14734 *) getlogin_r_proto=0
14738 : see if getmnt exists
14739 set getmnt d_getmnt
14742 : see if getmntent exists
14743 set getmntent d_getmntent
14746 : see if getnameinfo exists
14747 set getnameinfo d_getnameinfo
14750 : see if getnetbyaddr exists
14751 set getnetbyaddr d_getnbyaddr
14754 : see if getnetbyname exists
14755 set getnetbyname d_getnbyname
14758 : see if getnetent exists
14759 set getnetent d_getnent
14762 : see if getnetbyaddr_r exists
14763 set getnetbyaddr_r d_getnetbyaddr_r
14765 case "$d_getnetbyaddr_r" in
14767 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14768 case "$d_getnetbyaddr_r_proto:$usethreads" in
14769 ":define") d_getnetbyaddr_r_proto=define
14770 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
14774 case "$d_getnetbyaddr_r_proto" in
14776 case "$getnetbyaddr_r_proto" in
14777 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
14778 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
14780 case "$getnetbyaddr_r_proto" in
14781 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
14782 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
14784 case "$getnetbyaddr_r_proto" in
14785 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
14786 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
14788 case "$getnetbyaddr_r_proto" in
14789 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
14790 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
14792 case "$getnetbyaddr_r_proto" in
14793 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
14794 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
14796 case "$getnetbyaddr_r_proto" in
14797 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
14798 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
14800 case "$getnetbyaddr_r_proto" in
14801 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
14802 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
14804 case "$getnetbyaddr_r_proto" in
14805 ''|0) try='int getnetbyaddr_r(uint32_t, int, struct netent*, char*, size_t, struct netent**, int*);'
14806 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_uISBWRE ;;
14808 case "$getnetbyaddr_r_proto" in
14809 ''|0) d_getnetbyaddr_r=undef
14810 getnetbyaddr_r_proto=0
14811 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
14812 * ) case "$getnetbyaddr_r_proto" in
14813 REENTRANT_PROTO*) ;;
14814 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
14816 echo "Prototype: $try" ;;
14819 *) case "$usethreads" in
14820 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
14822 d_getnetbyaddr_r=undef
14823 getnetbyaddr_r_proto=0
14827 *) getnetbyaddr_r_proto=0
14831 : see if getnetbyname_r exists
14832 set getnetbyname_r d_getnetbyname_r
14834 case "$d_getnetbyname_r" in
14836 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14837 case "$d_getnetbyname_r_proto:$usethreads" in
14838 ":define") d_getnetbyname_r_proto=define
14839 set d_getnetbyname_r_proto getnetbyname_r $hdrs
14843 case "$d_getnetbyname_r_proto" in
14845 case "$getnetbyname_r_proto" in
14846 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
14847 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
14849 case "$getnetbyname_r_proto" in
14850 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
14851 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
14853 case "$getnetbyname_r_proto" in
14854 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
14855 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
14857 case "$getnetbyname_r_proto" in
14858 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
14859 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
14861 case "$getnetbyname_r_proto" in
14862 ''|0) d_getnetbyname_r=undef
14863 getnetbyname_r_proto=0
14864 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
14865 * ) case "$getnetbyname_r_proto" in
14866 REENTRANT_PROTO*) ;;
14867 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
14869 echo "Prototype: $try" ;;
14872 *) case "$usethreads" in
14873 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
14875 d_getnetbyname_r=undef
14876 getnetbyname_r_proto=0
14880 *) getnetbyname_r_proto=0
14884 : see if getnetent_r exists
14885 set getnetent_r d_getnetent_r
14887 case "$d_getnetent_r" in
14889 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14890 case "$d_getnetent_r_proto:$usethreads" in
14891 ":define") d_getnetent_r_proto=define
14892 set d_getnetent_r_proto getnetent_r $hdrs
14896 case "$d_getnetent_r_proto" in
14898 case "$getnetent_r_proto" in
14899 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
14900 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
14902 case "$getnetent_r_proto" in
14903 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
14904 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBIE ;;
14906 case "$getnetent_r_proto" in
14907 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
14908 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=S_SBIE ;;
14910 case "$getnetent_r_proto" in
14911 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
14912 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=S_SBI ;;
14914 case "$getnetent_r_proto" in
14915 ''|0) try='int getnetent_r(struct netent*, char*, int);'
14916 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBI ;;
14918 case "$getnetent_r_proto" in
14919 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
14920 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SD ;;
14922 case "$getnetent_r_proto" in
14923 ''|0) d_getnetent_r=undef
14924 getnetent_r_proto=0
14925 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
14926 * ) case "$getnetent_r_proto" in
14927 REENTRANT_PROTO*) ;;
14928 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
14930 echo "Prototype: $try" ;;
14933 *) case "$usethreads" in
14934 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
14936 d_getnetent_r=undef
14937 getnetent_r_proto=0
14941 *) getnetent_r_proto=0
14945 : see if prototypes for various getnetxxx netdb.h functions are available
14947 set d_getnetprotos getnetent $i_netdb netdb.h
14950 : see if getpagesize exists
14951 set getpagesize d_getpagsz
14954 : Optional checks for getprotobyname and getprotobynumber
14956 : see if getprotobyname exists
14957 set getprotobyname d_getpbyname
14960 : see if getprotobynumber exists
14961 set getprotobynumber d_getpbynumber
14964 : see if getprotoent exists
14965 set getprotoent d_getpent
14968 : see if getpgid exists
14969 set getpgid d_getpgid
14972 : see if getpgrp2 exists
14973 set getpgrp2 d_getpgrp2
14976 : see if getppid exists
14977 set getppid d_getppid
14980 : see if getpriority exists
14981 set getpriority d_getprior
14984 : see if getprotobyname_r exists
14985 set getprotobyname_r d_getprotobyname_r
14987 case "$d_getprotobyname_r" in
14989 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14990 case "$d_getprotobyname_r_proto:$usethreads" in
14991 ":define") d_getprotobyname_r_proto=define
14992 set d_getprotobyname_r_proto getprotobyname_r $hdrs
14996 case "$d_getprotobyname_r_proto" in
14998 case "$getprotobyname_r_proto" in
14999 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
15000 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
15002 case "$getprotobyname_r_proto" in
15003 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
15004 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
15006 case "$getprotobyname_r_proto" in
15007 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
15008 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
15010 case "$getprotobyname_r_proto" in
15011 ''|0) d_getprotobyname_r=undef
15012 getprotobyname_r_proto=0
15013 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
15014 * ) case "$getprotobyname_r_proto" in
15015 REENTRANT_PROTO*) ;;
15016 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
15018 echo "Prototype: $try" ;;
15021 *) case "$usethreads" in
15022 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
15024 d_getprotobyname_r=undef
15025 getprotobyname_r_proto=0
15029 *) getprotobyname_r_proto=0
15033 : see if getprotobynumber_r exists
15034 set getprotobynumber_r d_getprotobynumber_r
15036 case "$d_getprotobynumber_r" in
15038 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15039 case "$d_getprotobynumber_r_proto:$usethreads" in
15040 ":define") d_getprotobynumber_r_proto=define
15041 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
15045 case "$d_getprotobynumber_r_proto" in
15047 case "$getprotobynumber_r_proto" in
15048 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
15049 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
15051 case "$getprotobynumber_r_proto" in
15052 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
15053 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
15055 case "$getprotobynumber_r_proto" in
15056 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
15057 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
15059 case "$getprotobynumber_r_proto" in
15060 ''|0) d_getprotobynumber_r=undef
15061 getprotobynumber_r_proto=0
15062 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
15063 * ) case "$getprotobynumber_r_proto" in
15064 REENTRANT_PROTO*) ;;
15065 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
15067 echo "Prototype: $try" ;;
15070 *) case "$usethreads" in
15071 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
15073 d_getprotobynumber_r=undef
15074 getprotobynumber_r_proto=0
15078 *) getprotobynumber_r_proto=0
15082 : see if getprotoent_r exists
15083 set getprotoent_r d_getprotoent_r
15085 case "$d_getprotoent_r" in
15087 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15088 case "$d_getprotoent_r_proto:$usethreads" in
15089 ":define") d_getprotoent_r_proto=define
15090 set d_getprotoent_r_proto getprotoent_r $hdrs
15094 case "$d_getprotoent_r_proto" in
15096 case "$getprotoent_r_proto" in
15097 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
15098 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
15100 case "$getprotoent_r_proto" in
15101 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
15102 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SBI ;;
15104 case "$getprotoent_r_proto" in
15105 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
15106 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=S_SBI ;;
15108 case "$getprotoent_r_proto" in
15109 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
15110 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SD ;;
15112 case "$getprotoent_r_proto" in
15113 ''|0) d_getprotoent_r=undef
15114 getprotoent_r_proto=0
15115 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
15116 * ) case "$getprotoent_r_proto" in
15117 REENTRANT_PROTO*) ;;
15118 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
15120 echo "Prototype: $try" ;;
15123 *) case "$usethreads" in
15124 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
15126 d_getprotoent_r=undef
15127 getprotoent_r_proto=0
15131 *) getprotoent_r_proto=0
15135 : see if prototypes for various getprotoxxx netdb.h functions are available
15137 set d_getprotoprotos getprotoent $i_netdb netdb.h
15140 : see if getprpwnam exists
15141 set getprpwnam d_getprpwnam
15144 : see if getpwent exists
15145 set getpwent d_getpwent
15148 : see if getpwent_r exists
15149 set getpwent_r d_getpwent_r
15151 case "$d_getpwent_r" in
15153 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
15154 case "$d_getpwent_r_proto:$usethreads" in
15155 ":define") d_getpwent_r_proto=define
15156 set d_getpwent_r_proto getpwent_r $hdrs
15160 case "$d_getpwent_r_proto" in
15162 case "$getpwent_r_proto" in
15163 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
15164 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBWR ;;
15166 case "$getpwent_r_proto" in
15167 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
15168 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBIR ;;
15170 case "$getpwent_r_proto" in
15171 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
15172 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=S_SBW ;;
15174 case "$getpwent_r_proto" in
15175 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
15176 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=S_SBI ;;
15178 case "$getpwent_r_proto" in
15179 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
15180 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBI ;;
15182 case "$getpwent_r_proto" in
15183 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
15184 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBIH ;;
15186 case "$getpwent_r_proto" in
15187 ''|0) d_getpwent_r=undef
15189 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
15190 * ) case "$getpwent_r_proto" in
15191 REENTRANT_PROTO*) ;;
15192 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
15194 echo "Prototype: $try" ;;
15197 *) case "$usethreads" in
15198 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
15205 *) getpwent_r_proto=0
15209 : see if getpwnam_r exists
15210 set getpwnam_r d_getpwnam_r
15212 case "$d_getpwnam_r" in
15214 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
15215 case "$d_getpwnam_r_proto:$usethreads" in
15216 ":define") d_getpwnam_r_proto=define
15217 set d_getpwnam_r_proto getpwnam_r $hdrs
15221 case "$d_getpwnam_r_proto" in
15223 case "$getpwnam_r_proto" in
15224 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
15225 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
15227 case "$getpwnam_r_proto" in
15228 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
15229 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
15231 case "$getpwnam_r_proto" in
15232 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
15233 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
15235 case "$getpwnam_r_proto" in
15236 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
15237 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
15239 case "$getpwnam_r_proto" in
15240 ''|0) d_getpwnam_r=undef
15242 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
15243 * ) case "$getpwnam_r_proto" in
15244 REENTRANT_PROTO*) ;;
15245 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
15247 echo "Prototype: $try" ;;
15250 *) case "$usethreads" in
15251 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
15258 *) getpwnam_r_proto=0
15262 : see if getpwuid_r exists
15263 set getpwuid_r d_getpwuid_r
15265 case "$d_getpwuid_r" in
15267 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
15268 case "$d_getpwuid_r_proto:$usethreads" in
15269 ":define") d_getpwuid_r_proto=define
15270 set d_getpwuid_r_proto getpwuid_r $hdrs
15274 case "$d_getpwuid_r_proto" in
15276 case "$getpwuid_r_proto" in
15277 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
15278 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
15280 case "$getpwuid_r_proto" in
15281 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
15282 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
15284 case "$getpwuid_r_proto" in
15285 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
15286 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
15288 case "$getpwuid_r_proto" in
15289 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
15290 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
15292 case "$getpwuid_r_proto" in
15293 ''|0) d_getpwuid_r=undef
15295 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
15296 * ) case "$getpwuid_r_proto" in
15297 REENTRANT_PROTO*) ;;
15298 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
15300 echo "Prototype: $try" ;;
15303 *) case "$usethreads" in
15304 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
15311 *) getpwuid_r_proto=0
15315 : Optional checks for getsbyname and getsbyport
15317 : see if getservbyname exists
15318 set getservbyname d_getsbyname
15321 : see if getservbyport exists
15322 set getservbyport d_getsbyport
15325 : see if getservent exists
15326 set getservent d_getsent
15329 : see if getservbyname_r exists
15330 set getservbyname_r d_getservbyname_r
15332 case "$d_getservbyname_r" in
15334 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15335 case "$d_getservbyname_r_proto:$usethreads" in
15336 ":define") d_getservbyname_r_proto=define
15337 set d_getservbyname_r_proto getservbyname_r $hdrs
15341 case "$d_getservbyname_r_proto" in
15343 case "$getservbyname_r_proto" in
15344 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
15345 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
15347 case "$getservbyname_r_proto" in
15348 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
15349 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
15351 case "$getservbyname_r_proto" in
15352 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
15353 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
15355 case "$getservbyname_r_proto" in
15356 ''|0) d_getservbyname_r=undef
15357 getservbyname_r_proto=0
15358 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
15359 * ) case "$getservbyname_r_proto" in
15360 REENTRANT_PROTO*) ;;
15361 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
15363 echo "Prototype: $try" ;;
15366 *) case "$usethreads" in
15367 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
15369 d_getservbyname_r=undef
15370 getservbyname_r_proto=0
15374 *) getservbyname_r_proto=0
15378 : see if getservbyport_r exists
15379 set getservbyport_r d_getservbyport_r
15381 case "$d_getservbyport_r" in
15383 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15384 case "$d_getservbyport_r_proto:$usethreads" in
15385 ":define") d_getservbyport_r_proto=define
15386 set d_getservbyport_r_proto getservbyport_r $hdrs
15390 case "$d_getservbyport_r_proto" in
15392 case "$getservbyport_r_proto" in
15393 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
15394 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
15396 case "$getservbyport_r_proto" in
15397 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
15398 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
15400 case "$getservbyport_r_proto" in
15401 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
15402 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
15404 case "$getservbyport_r_proto" in
15405 ''|0) d_getservbyport_r=undef
15406 getservbyport_r_proto=0
15407 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
15408 * ) case "$getservbyport_r_proto" in
15409 REENTRANT_PROTO*) ;;
15410 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
15412 echo "Prototype: $try" ;;
15415 *) case "$usethreads" in
15416 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
15418 d_getservbyport_r=undef
15419 getservbyport_r_proto=0
15423 *) getservbyport_r_proto=0
15427 : see if getservent_r exists
15428 set getservent_r d_getservent_r
15430 case "$d_getservent_r" in
15432 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15433 case "$d_getservent_r_proto:$usethreads" in
15434 ":define") d_getservent_r_proto=define
15435 set d_getservent_r_proto getservent_r $hdrs
15439 case "$d_getservent_r_proto" in
15441 case "$getservent_r_proto" in
15442 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
15443 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SBWR ;;
15445 case "$getservent_r_proto" in
15446 ''|0) try='int getservent_r(struct servent*, char*, int);'
15447 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SBI ;;
15449 case "$getservent_r_proto" in
15450 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
15451 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=S_SBI ;;
15453 case "$getservent_r_proto" in
15454 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
15455 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SD ;;
15457 case "$getservent_r_proto" in
15458 ''|0) d_getservent_r=undef
15459 getservent_r_proto=0
15460 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
15461 * ) case "$getservent_r_proto" in
15462 REENTRANT_PROTO*) ;;
15463 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
15465 echo "Prototype: $try" ;;
15468 *) case "$usethreads" in
15469 define) echo "getservent_r has no prototype, not using it." >&4 ;;
15471 d_getservent_r=undef
15472 getservent_r_proto=0
15476 *) getservent_r_proto=0
15480 : see if prototypes for various getservxxx netdb.h functions are available
15482 set d_getservprotos getservent $i_netdb netdb.h
15485 : see if getspnam exists
15486 set getspnam d_getspnam
15489 : see if this is a shadow.h system
15490 set shadow.h i_shadow
15493 : see if getspnam_r exists
15494 set getspnam_r d_getspnam_r
15496 case "$d_getspnam_r" in
15498 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
15499 case "$d_getspnam_r_proto:$usethreads" in
15500 ":define") d_getspnam_r_proto=define
15501 set d_getspnam_r_proto getspnam_r $hdrs
15505 case "$d_getspnam_r_proto" in
15507 case "$getspnam_r_proto" in
15508 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
15509 ./protochk "$extern_C $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
15511 case "$getspnam_r_proto" in
15512 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
15513 ./protochk "$extern_C $try" $hdrs && getspnam_r_proto=S_CSBI ;;
15515 case "$getspnam_r_proto" in
15516 ''|0) d_getspnam_r=undef
15518 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
15519 * ) case "$getspnam_r_proto" in
15520 REENTRANT_PROTO*) ;;
15521 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
15523 echo "Prototype: $try" ;;
15526 *) case "$usethreads" in
15527 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
15534 *) getspnam_r_proto=0
15538 : see if gettimeofday or ftime exists
15539 set gettimeofday d_gettimeod
15541 case "$d_gettimeod" in
15547 val="$undef"; set d_ftime; eval $setvar
15550 case "$d_gettimeod$d_ftime" in
15553 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
15557 : see if gmtime_r exists
15558 set gmtime_r d_gmtime_r
15560 case "$d_gmtime_r" in
15562 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
15563 case "$d_gmtime_r_proto:$usethreads" in
15564 ":define") d_gmtime_r_proto=define
15565 set d_gmtime_r_proto gmtime_r $hdrs
15569 case "$d_gmtime_r_proto" in
15571 case "$gmtime_r_proto" in
15572 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
15573 ./protochk "$extern_C $try" $hdrs && gmtime_r_proto=S_TS ;;
15575 case "$gmtime_r_proto" in
15576 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
15577 ./protochk "$extern_C $try" $hdrs && gmtime_r_proto=I_TS ;;
15579 case "$gmtime_r_proto" in
15580 ''|0) d_gmtime_r=undef
15582 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
15583 * ) case "$gmtime_r_proto" in
15584 REENTRANT_PROTO*) ;;
15585 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
15587 echo "Prototype: $try" ;;
15590 *) case "$usethreads" in
15591 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
15598 *) gmtime_r_proto=0
15602 : see if hasmntopt exists
15603 set hasmntopt d_hasmntopt
15606 : see if this is a netinet/in.h or sys/in.h system
15607 set netinet/in.h i_niin sys/in.h i_sysin
15610 : see if arpa/inet.h has to be included
15611 set arpa/inet.h i_arpainet
15614 : see if htonl --and friends-- exists
15619 : Maybe they are macros.
15622 $cat >htonl.c <<EOM
15624 #include <sys/types.h>
15625 #$i_niin I_NETINET_IN
15627 #$i_arpainet I_ARPA_INET
15628 #ifdef I_NETINET_IN
15629 #include <netinet/in.h>
15632 #include <sys/in.h>
15635 #include <arpa/inet.h>
15638 printf("Defined as a macro.");
15641 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
15642 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
15644 echo "But it seems to be defined as a macro." >&4
15652 : see if hypot exists
15656 : see if ilogb exists
15660 : see if ilogbl exists
15661 set ilogbl d_ilogbl
15666 if set index val -f; eval $csym; $val; then
15667 if set strchr val -f d_strchr; eval $csym; $val; then
15668 if $contains strchr "$strings" >/dev/null 2>&1 ; then
15671 echo "strchr() found." >&4
15675 echo "index() found." >&4
15680 echo "index() found." >&4
15683 if set strchr val -f d_strchr; eval $csym; $val; then
15686 echo "strchr() found." >&4
15688 echo "No index() or strchr() found!" >&4
15693 set d_strchr; eval $setvar
15695 set d_index; eval $setvar
15697 : check whether inet_aton exists
15698 set inet_aton d_inetaton
15701 : see if inet_ntop exists
15702 set inet_ntop d_inetntop
15705 : see if inet_pton exists
15706 set inet_pton d_inetpton
15711 $cat >isascii.c <<EOCP
15714 #$i_stdlib I_STDLIB
15716 #include <stdlib.h>
15727 if eval $compile; then
15728 echo "isascii() found." >&4
15731 echo "isascii() NOT found." >&4
15740 $cat >isblank.c <<'EOCP'
15751 if $cc $ccflags $ldflags -o isblank isblank.c $libs >/dev/null 2>&1 ; then
15752 echo "isblank() found." >&4
15755 echo "isblank() NOT found." >&4
15762 : check for isfinite
15763 echo "Checking to see if you have isfinite..." >&4
15769 int main() { return isfinite(0.0); }
15772 if eval $compile; then
15774 echo "You have isfinite."
15777 echo "You do not have isfinite."
15783 : see if isfinitel exists
15784 set isfinitel d_isfinitel
15788 echo "Checking to see if you have isinf..." >&4
15794 int main() { return isinf(0.0); }
15797 if eval $compile; then
15799 echo "You have isinf."
15802 echo "You do not have isinf."
15808 : see if isinfl exists
15809 set isinfl d_isinfl
15813 echo "Checking to see if you have isless..." >&4
15819 int main() { return isless(0.0); }
15822 if eval $compile; then
15824 echo "You have isless."
15827 echo "You do not have isless."
15834 echo "Checking to see if you have isnan..." >&4
15840 int main() { return isnan(0.0); }
15843 if eval $compile; then
15845 echo "You have isnan."
15848 echo "You do not have isnan."
15854 : see if isnanl exists
15855 set isnanl d_isnanl
15858 : check for isnormal
15859 echo "Checking to see if you have isnormal..." >&4
15865 int main() { return isnormal(0.0); }
15868 if eval $compile; then
15870 echo "You have isnormal."
15873 echo "You do not have isnormal."
15883 : see if j0l exists
15887 : see if killpg exists
15888 set killpg d_killpg
15891 : see if localeconv exists
15892 set localeconv d_locconv
15895 : see if libc has the POSIX.1-2008 currency locale rules
15896 case "$d_locconv:$d_lc_monetary_2008" in
15899 #include <locale.h>
15901 struct lconv *lc = localeconv();
15902 char int_p_cs_precedes = lc->int_p_cs_precedes;
15907 if eval $compile; then
15908 d_lc_monetary_2008="$define"
15910 d_lc_monetary_2008="$undef"
15916 : see if lchown exists
15918 $cat > try.c <<'EOCP'
15919 /* System header to define __stub macros and hopefully few prototypes,
15920 which can conflict with char lchown(); below. */
15921 #include <assert.h>
15922 /* Override any gcc2 internal prototype to avoid an error. */
15923 /* We use char because int might match the return type of a gcc2
15924 builtin and then its argument prototype would still apply. */
15927 /* The GNU C library defines this for functions which it implements
15928 to always fail with ENOSYS. Some functions are actually named
15929 something starting with __ and the normal name is an alias. */
15930 #if defined (__stub_lchown) || defined (__stub___lchown)
15938 if eval $compile; then
15939 $echo "lchown() found." >&4
15942 $echo "lchown() NOT found." >&4
15948 : See if number of significant digits in a double precision number is known
15950 $cat >ldbl_dig.c <<EOM
15951 #$i_limits I_LIMITS
15954 #include <limits.h>
15960 printf("Contains LDBL_DIG");
15963 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
15964 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
15965 echo "LDBL_DIG found." >&4
15968 echo "LDBL_DIG NOT found." >&4
15975 : see if lgamma exists
15976 set lgamma d_lgamma
15979 : see if lgamma_r exists
15980 set lgamma_r d_lgamma_r
15983 : check to see if math.h defines _LIB_VERSION
15984 d_libm_lib_version="$undef"
15988 echo "Checking to see if your libm supports _LIB_VERSION..." >&4
15990 #include <unistd.h>
15992 int main (int argc, char *argv[])
15994 printf ("%d\n", _LIB_VERSION);
15999 if eval $compile; then
16001 echo "Yes, it does ($foo)" >&4
16002 d_libm_lib_version="$define"
16004 echo "No, it does not (probably harmless)" >&4
16011 : see if link exists
16015 : see if llrint exists
16016 set llrint d_llrint
16019 : see if llround exists
16020 set llround d_llround
16023 : see if localtime_r exists
16024 set localtime_r d_localtime_r
16026 case "$d_localtime_r" in
16028 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
16029 case "$d_localtime_r_proto:$usethreads" in
16030 ":define") d_localtime_r_proto=define
16031 set d_localtime_r_proto localtime_r $hdrs
16035 case "$d_localtime_r_proto" in
16037 case "$localtime_r_proto" in
16038 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
16039 ./protochk "$extern_C $try" $hdrs && localtime_r_proto=S_TS ;;
16041 case "$localtime_r_proto" in
16042 ''|0) try='int localtime_r(const time_t*, struct tm*);'
16043 ./protochk "$extern_C $try" $hdrs && localtime_r_proto=I_TS ;;
16045 case "$localtime_r_proto" in
16046 ''|0) d_localtime_r=undef
16047 localtime_r_proto=0
16048 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
16049 * ) case "$localtime_r_proto" in
16050 REENTRANT_PROTO*) ;;
16051 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
16053 echo "Prototype: $try" ;;
16056 *) case "$usethreads" in
16057 define) echo "localtime_r has no prototype, not using it." >&4 ;;
16059 d_localtime_r=undef
16060 localtime_r_proto=0
16064 *) localtime_r_proto=0
16068 : see if localtime_r calls tzset
16069 case "$localtime_r_proto" in
16072 /* Does our libc's localtime_r call tzset ?
16073 * return 0 if so, 1 otherwise.
16075 #$i_systypes I_SYS_TYPES
16076 #$i_unistd I_UNISTD
16078 #$i_stdlib I_STDLIB
16079 #$i_string I_STRING
16080 #$i_malloc I_MALLOC
16082 # include <sys/types.h>
16085 # include <unistd.h>
16091 #include <stdlib.h>
16094 # include <string.h>
16096 # include <strings.h>
16099 # include <malloc.h>
16103 time_t t = time(0L);
16104 char w_tz[]="TZ" "=GMT+5",
16105 e_tz[]="TZ" "=GMT-5",
16106 *tz_e = (char*)malloc(16),
16107 *tz_w = (char*)malloc(16);
16108 struct tm tm_e, tm_w;
16109 memset(&tm_e,'\0',sizeof(struct tm));
16110 memset(&tm_w,'\0',sizeof(struct tm));
16115 localtime_r(&t, &tm_e);
16118 localtime_r(&t, &tm_w);
16120 if( memcmp(&tm_e, &tm_w, sizeof(struct tm)) == 0 )
16126 if eval $compile; then
16127 if $run ./try; then
16128 d_localtime_r_needs_tzset=undef;
16130 d_localtime_r_needs_tzset=define;
16133 d_localtime_r_needs_tzset=undef;
16137 d_localtime_r_needs_tzset=undef;
16142 : see if lockf exists
16146 : see if log1p exists
16150 : see if log2 exists
16154 : see if logb exists
16158 : see if lrint exists
16162 : see if lround exists
16163 set lround d_lround
16166 : see if prototype for lseek is available
16168 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
16171 : see if lstat exists
16175 : see if madvise exists
16176 set madvise d_madvise
16179 : see if malloc_size exists
16180 set malloc_size d_malloc_size
16183 : see if malloc_size_good exists
16184 set malloc_good_size d_malloc_good_size
16187 : see if mblen exists
16191 : see if mbstowcs exists
16192 set mbstowcs d_mbstowcs
16195 : see if mbtowc exists
16196 set mbtowc d_mbtowc
16199 : see if memchr exists
16200 set memchr d_memchr
16203 : see if memcmp exists
16204 set memcmp d_memcmp
16207 : see if memcpy exists
16208 set memcpy d_memcpy
16211 : see if memmove exists
16212 set memmove d_memmove
16215 : see if memset exists
16216 set memset d_memset
16219 : see if mkdir exists
16223 : see if mkdtemp exists
16224 set mkdtemp d_mkdtemp
16227 : see if mkfifo exists
16228 set mkfifo d_mkfifo
16231 : see if mkstemp exists
16232 set mkstemp d_mkstemp
16235 : see if mkstemps exists
16236 set mkstemps d_mkstemps
16239 : see if mktime exists
16240 set mktime d_mktime
16243 : see if this is a sys/mman.h system
16244 set sys/mman.h i_sysmman
16247 : see if mmap exists
16250 : see what shmat returns
16251 : default to something harmless
16253 case "$i_sysmman$d_mmap" in
16255 $cat >mmap.c <<'END'
16256 #include <sys/mman.h>
16259 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
16264 echo "and it returns ($mmaptype)." >&4
16270 : see if sqrtl exists
16274 : see if scalbnl exists
16275 set scalbnl d_scalbnl
16278 : see if truncl exists
16279 set truncl d_truncl
16282 : see if modfl exists
16286 : see if prototype for modfl is available
16288 set d_modflproto modfl $i_math math.h
16291 d_modfl_pow32_bug="$undef"
16293 case "$d_longdbl$d_modfl" in
16296 Checking to see whether your modfl() is okay for large values...
16302 if $test "X$d_modflproto" != "X$define"; then
16303 $cat >>try.c <<EOCP
16304 /* Sigh. many current glibcs provide the function, but do not prototype it. */
16305 long double modfl (long double, long double *);
16308 $cat >>try.c <<EOCP
16310 long double nv = 4294967303.15;
16316 printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
16320 case "$osname:$gccversion" in
16321 aix:) saveccflags="$ccflags"
16322 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
16325 if eval $compile; then
16328 *" 4294967303.150000 1.150000 4294967302.000000")
16329 echo >&4 "Your modfl() is broken for large values."
16330 d_modfl_pow32_bug="$define"
16332 glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
16336 *" 4294967303.150000 0.150000 4294967303.000000")
16337 echo >&4 "Your modfl() seems okay for large values."
16339 *) echo >&4 "I don't understand your modfl() at all."
16345 echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
16348 case "$osname:$gccversion" in
16349 aix:) ccflags="$saveccflags" ;; # restore
16354 if $test "$uselongdouble" = "$define"; then
16356 if $test "$d_sqrtl" != "$define"; then
16357 message="$message sqrtl"
16359 if $test "$d_modfl" != "$define"; then
16360 if $test "$d_truncl:$d_copysignl" = "$define:$define"; then
16361 echo "You have both truncl and copysignl, so I can emulate modfl."
16363 if $test "$d_aintl:$d_copysignl" = "$define:$define"; then
16364 echo "You have both aintl and copysignl, so I can emulate modfl."
16366 message="$message modfl"
16370 if $test "$d_frexpl" != "$define"; then
16371 if $test "$d_ilogbl:$d_scalbnl" = "$define:$define"; then
16372 echo "You have both ilogbl and scalbnl, so I can emulate frexpl."
16374 message="$message frexpl"
16377 if $test "$d_ldexpl" != "$define"; then
16378 message="$message ldexpl"
16381 if $test "$message" != ""; then
16384 *** You requested the use of long doubles but you do not seem to have
16385 *** the following mathematical functions needed for long double support:
16387 *** Please rerun Configure without -Duselongdouble and/or -Dusemorebits.
16388 *** Cannot continue, aborting.
16396 : see if mprotect exists
16397 set mprotect d_mprotect
16400 : see if msgctl exists
16401 set msgctl d_msgctl
16404 : see if msgget exists
16405 set msgget d_msgget
16408 : see if msgsnd exists
16409 set msgsnd d_msgsnd
16412 : see if msgrcv exists
16413 set msgrcv d_msgrcv
16416 : see how much of the 'msg*(2)' library is present.
16419 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
16420 *"$undef"*) h_msg=false;;
16424 case "`ipcs 2>&1`" in
16425 "SVID messages"*"not configured"*)
16426 echo "Your $osname does not have the msg*(2) configured." >&4
16429 set msgctl d_msgctl
16431 set msgget d_msgget
16433 set msgsnd d_msgsnd
16435 set msgrcv d_msgrcv
16441 : we could also check for sys/ipc.h ...
16442 if $h_msg && $test `./findhdr sys/msg.h`; then
16443 echo "You have the full msg*(2) library." >&4
16446 echo "You don't have the full msg*(2) library." >&4
16452 : Check for msghdr_s
16454 echo "Checking to see if your system supports struct msghdr..." >&4
16455 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
16457 case "$d_msghdr_s" in
16458 "$define") echo "Yes, it does." ;;
16459 *) echo "No, it doesn't." ;;
16463 : see if msync exists
16467 : see if munmap exists
16468 set munmap d_munmap
16471 : see if nan exists
16475 : see if nearbyint exists
16476 set nearbyint d_nearbyint
16479 : see if nextafter exists
16480 set nextafter d_nextafter
16483 : see if nexttoward exists
16484 set nexttoward d_nexttoward
16487 : see if nice exists
16491 : see if this is a langinfo.h system
16492 set langinfo.h i_langinfo
16495 : see if nl_langinfo exists
16496 set nl_langinfo d_nl_langinfo
16499 : see if this is a quadmath.h system
16500 set quadmath.h i_quadmath
16503 : check for volatile keyword
16505 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
16506 $cat >try.c <<'EOCP'
16509 typedef struct _goo_struct goo_struct;
16510 goo_struct * volatile goo = ((goo_struct *)0);
16511 struct _goo_struct {
16516 typedef unsigned short foo_t;
16517 char *volatile foo;
16519 volatile foo_t blech;
16523 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
16525 echo "Yup, it does."
16528 echo "Nope, it doesn't."
16534 : Check basic sizes
16536 $echo "Choosing the C types to be used for Perl's internal types..." >&4
16538 case "$use64bitint:$d_quad:$quadtype" in
16541 uvtype="$uquadtype"
16546 uvtype="unsigned long"
16552 case "$uselongdouble:$d_longdbl" in
16554 nvtype="long double"
16555 nvsize=$longdblsize
16562 case "$usequadmath:$i_quadmath" in
16564 nvtype="__float128"
16570 *** You requested the use of the quadmath library, but you
16571 *** do not seem to have the quadmath library installed.
16572 *** Cannot continue, aborting.
16578 define:*) $cat <<EOM >&4
16580 *** You requested the use of the quadmath library, but you
16581 *** do not seem to have the required header, <quadmath.h>.
16583 case "$gccversion" in
16586 *** Your gcc looks a bit old:
16592 *** You are not running a gcc.
16597 *** For the quadmath library you need at least gcc 4.6.
16598 *** Cannot continue, aborting.
16604 $echo "(IV will be "$ivtype", $ivsize bytes)"
16605 $echo "(UV will be "$uvtype", $uvsize bytes)"
16606 $echo "(NV will be "$nvtype", $nvsize bytes)"
16609 #$i_inttypes I_INTTYPES
16611 #include <inttypes.h>
16616 int8_t i = INT8_MAX;
16617 uint8_t u = UINT8_MAX;
16618 printf("int8_t\n");
16621 int16_t i = INT16_MAX;
16622 uint16_t u = UINT16_MAX;
16623 printf("int16_t\n");
16626 int32_t i = INT32_MAX;
16627 uint32_t u = UINT32_MAX;
16628 printf("int32_t\n");
16633 i8type="signed char"
16634 u8type="unsigned char"
16639 '') case "$shortsize" in
16641 u16type="unsigned short"
16649 '') set try -DINT16
16650 if eval $compile; then
16651 case "`$run ./try`" in
16663 '') if $test $shortsize -ge 2; then
16665 u16type="unsigned short"
16673 '') case "$longsize" in
16675 u32type="unsigned long"
16679 *) case "$intsize" in
16681 u32type="unsigned int"
16691 '') set try -DINT32
16692 if eval $compile; then
16693 case "`$run ./try`" in
16705 '') if $test $intsize -ge 4; then
16707 u32type="unsigned int"
16715 '') case "$d_quad:$quadtype" in
16717 i64type="$quadtype"
16718 u64type="$uquadtype"
16726 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
16727 : volatile so that the compiler has to store it out to memory.
16728 if test X"$d_volatile" = X"$define"; then
16733 #$i_stdlib I_STDLIB
16735 #include <stdlib.h>
16737 #include <sys/types.h>
16738 #include <signal.h>
16740 $volatile int bletched = 0;
16741 $signal_t blech(int s) { bletched = 1; }
16746 int n = 8 * $uvsize;
16749 signal(SIGFPE, blech);
16752 for (i = 0; i < n; i++) {
16753 u = u << 1 | ($uvtype)1;
16755 if (($uvtype)d != u)
16759 d = ($nvtype)(u - 1);
16760 if (($uvtype)d != (u - 1))
16767 printf("%d\n", ((i == n) ? -n : i));
16773 d_nv_preserves_uv="$undef"
16774 if eval $compile; then
16775 nv_preserves_uv_bits="`$run ./try`"
16777 case "$nv_preserves_uv_bits" in
16779 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
16780 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
16781 d_nv_preserves_uv="$define"
16783 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
16784 d_nv_preserves_uv="$undef" ;;
16785 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
16786 nv_preserves_uv_bits="0" ;;
16790 $echo "Checking to find the largest integer value your NVs can hold..." >&4
16791 : volatile so that the compiler has to store it out to memory.
16792 if test X"$d_volatile" = X"$define"; then
16798 typedef $nvtype NV;
16805 while(count < 256) {
16806 $volatile NV up = value + 1.0;
16807 $volatile NV negated = -value;
16808 $volatile NV down = negated - 1.0;
16809 $volatile NV got_up = up - value;
16810 int up_good = got_up == 1.0;
16811 int got_down = down - negated;
16812 int down_good = got_down == -1.0;
16814 if (down_good != up_good) {
16816 "Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n",
16817 up_good, (double) got_up, down_good, (double) got_down,
16818 count, (double) value);
16825 fputs("256.0", stdout);
16828 fputs("2.0", stdout);
16834 fputs("*", stdout);
16840 fprintf(stderr, "Cannot overflow integer range, even at 2**%d (%.20f)\n",
16841 count, (double) value);
16847 nv_overflows_integers_at='0'
16848 if eval $compile; then
16854 The largest integer your NVs can preserve is equal to $xxx
16856 nv_overflows_integers_at="$xxx"
16859 Cannot determine the largest integer value your NVs can hold, unexpected output
16866 Cannot determine the largest integer value your NVs can hold
16873 $echo "Checking whether NV 0.0 is all bits zero in memory..." >&4
16874 : volatile so that the compiler has to store it out to memory.
16875 if test X"$d_volatile" = X"$define"; then
16880 #$i_stdlib I_STDLIB
16882 #include <stdlib.h>
16884 #$i_string I_STRING
16886 # include <string.h>
16888 # include <strings.h>
16890 #include <sys/types.h>
16891 #include <signal.h>
16893 $volatile int bletched = 0;
16894 $signal_t blech(int s) { bletched = 1; }
16897 int checkit($nvtype d, char *where) {
16898 unsigned char *p = (char *)&d;
16899 unsigned char *end = p + sizeof(d);
16909 printf("No - %s: 0x", where);
16911 printf ("%02X", *p++);
16916 int main(int argc, char **argv) {
16919 fail += checkit(d, "0.0");
16921 /* The compiler shouldn't be assuming that bletched is 0 */
16924 fail += checkit(d, "bleched");
16927 signal(SIGFPE, blech);
16930 /* Paranoia - the compiler should have no way of knowing that ANSI says
16931 that argv[argc] will always be NULL. Actually, if it did assume this it
16932 would be buggy, as this is C and main() can be called from elsewhere in
16934 d = argv[argc] ? 1 : 0;
16937 printf("Odd argv[argc]=%p, d=%g\n", argv[argc], d);
16940 fail += checkit(d, "ternary");
16942 memset(&d, sizeof(d), argv[argc] ? 1 : 0);
16945 printf("No - memset doesn't give 0.0\n");
16946 /* This might just blow up: */
16947 printf("(gives %g)\n", d);
16953 printf("No - something bleched\n");
16958 printf("No - %d fail(s)\n", fail);
16967 d_nv_zero_is_allbits_zero="$undef"
16968 if eval $compile; then
16974 0.0 is represented as all bits zero in memory
16976 d_nv_zero_is_allbits_zero="$define"
16979 0.0 is not represented as all bits zero in memory
16981 d_nv_zero_is_allbits_zero="$undef"
16986 0.0 is not represented as all bits zero in memory
16988 d_nv_zero_is_allbits_zero="$undef"
16994 : check for off64_t
16996 echo "Checking to see if you have off64_t..." >&4
16998 #include <sys/types.h>
16999 #include <unistd.h>
17000 int main() { off64_t x = 7; }
17003 if eval $compile; then
17005 echo "You have off64_t."
17008 echo "You do not have off64_t."
17009 case "$lseeksize" in
17010 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
17017 : how to create joinable pthreads
17018 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
17020 echo "Checking what constant to use for creating joinable pthreads..." >&4
17021 $cat >try.c <<'EOCP'
17022 #include <pthread.h>
17024 int detachstate = JOINABLE;
17027 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
17028 if eval $compile; then
17029 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
17030 val="$undef" # Yes, undef.
17031 set d_old_pthread_create_joinable
17034 set old_pthread_create_joinable
17037 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
17038 if eval $compile; then
17039 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
17041 set d_old_pthread_create_joinable
17043 val=PTHREAD_CREATE_UNDETACHED
17044 set old_pthread_create_joinable
17047 set try -DJOINABLE=__UNDETACHED
17048 if eval $compile; then
17049 echo "You seem to use __UNDETACHED." >&4
17051 set d_old_pthread_create_joinable
17054 set old_pthread_create_joinable
17057 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
17059 set d_old_pthread_create_joinable
17062 set old_pthread_create_joinable
17069 d_old_pthread_create_joinable="$undef"
17070 old_pthread_create_joinable=""
17073 : see if pause exists
17077 : see if poll exists
17081 : see if prctl exists
17085 : see if prctl supports PR_SET_NAME
17086 d_prctl_set_name=$undef
17091 #include <unistd.h>
17093 #include <sys/prctl.h>
17095 int main (int argc, char *argv[])
17097 return (prctl (PR_SET_NAME, "Test"));
17101 if eval $compile_ok && $run ./try; then
17102 echo "Your prctl (PR_SET_NAME, ...) works"
17103 d_prctl_set_name=$define
17109 : see if readlink exists
17110 set readlink d_readlink
17113 : Check if exe is symlink to abs path of executing program
17117 case "$d_readlink" in
17119 : NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
17120 : more tidy to avoid an extra level of symlink
17121 set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
17122 while test $# -gt 0; do
17125 if $issymlink $try; then
17126 $ls -l $try > reflect
17127 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
17128 echo "You have $type-like $try."
17129 procselfexe='"'$try'"'
17131 : This will break out of the loop
17142 : backward compatibility for d_hvfork
17143 if test X$d_hvfork != X; then
17144 d_vfork="$d_hvfork"
17147 : see if there is a vfork
17152 d_pseudofork=$undef
17154 : Ok, but do we want to use it. vfork is reportedly unreliable in
17155 : perl on Solaris 2.x, and probably elsewhere.
17159 case "$usevfork" in
17165 Perl can only use a vfork() that doesn't suffer from strict
17166 restrictions on calling functions or modifying global data in
17167 the child. For example, glibc-2.1 contains such a vfork()
17168 that is unsuitable. If your system provides a proper fork()
17169 call, chances are that you do NOT want perl to use vfork().
17172 rp="Do you still want to use vfork()?"
17177 echo "Ok, we won't use vfork()."
17186 $define) usevfork='true';;
17187 *) usevfork='false';;
17190 : see whether the pthread_atfork exists
17192 #include <pthread.h>
17195 #ifdef PTHREAD_ATFORK
17196 pthread_atfork(NULL,NULL,NULL);
17201 : see if pthread_atfork exists
17202 set try -DPTHREAD_ATFORK
17203 if eval $compile; then
17208 case "$usethreads" in
17211 $define) echo 'pthread_atfork found.' >&4 ;;
17212 *) echo 'pthread_atfork NOT found.' >&4 ;;
17215 set d_pthread_atfork
17218 : see if pthread_attr_setscope exists
17219 set pthread_attr_setscope d_pthread_attr_setscope
17222 : see whether the various POSIXish _yields exist
17224 #include <pthread.h>
17230 #ifdef PTHREAD_YIELD
17233 #ifdef PTHREAD_YIELD_NULL
17234 pthread_yield(NULL);
17240 : see if sched_yield exists
17241 set try -DSCHED_YIELD
17242 if eval $compile; then
17244 sched_yield='sched_yield()'
17248 case "$usethreads" in
17251 $define) echo 'sched_yield() found.' >&4 ;;
17252 *) echo 'sched_yield() NOT found.' >&4 ;;
17258 : see if pthread_yield exists
17259 set try -DPTHREAD_YIELD
17260 if eval $compile; then
17262 case "$sched_yield" in
17263 '') sched_yield='pthread_yield()' ;;
17266 set try -DPTHREAD_YIELD_NULL
17267 if eval $compile; then
17269 case "$sched_yield" in
17270 '') sched_yield='pthread_yield(NULL)' ;;
17276 case "$usethreads" in
17279 $define) echo 'pthread_yield() found.' >&4 ;;
17280 *) echo 'pthread_yield() NOT found.' >&4 ;;
17284 set d_pthread_yield
17286 case "$sched_yield" in
17287 '') sched_yield=undef ;;
17291 : check for ptrdiff_t
17293 echo "Checking to see if you have ptrdiff_t..." >&4
17295 #include <stddef.h>
17296 int main() { ptrdiff_t x = 7; }
17299 if eval $compile; then
17301 echo "You have ptrdiff_t."
17304 echo "You do not have ptrdiff_t."
17310 : see if random_r exists
17311 set random_r d_random_r
17313 case "$d_random_r" in
17315 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
17316 case "$d_random_r_proto:$usethreads" in
17317 ":define") d_random_r_proto=define
17318 set d_random_r_proto random_r $hdrs
17322 case "$d_random_r_proto" in
17324 case "$random_r_proto" in
17325 ''|0) try='int random_r(int*, struct random_data*);'
17326 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_iS ;;
17328 case "$random_r_proto" in
17329 ''|0) try='int random_r(long*, struct random_data*);'
17330 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_lS ;;
17332 case "$random_r_proto" in
17333 ''|0) try='int random_r(struct random_data*, int32_t*);'
17334 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_St ;;
17336 case "$random_r_proto" in
17337 ''|0) d_random_r=undef
17339 echo "Disabling random_r, cannot determine prototype." >&4 ;;
17340 * ) case "$random_r_proto" in
17341 REENTRANT_PROTO*) ;;
17342 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
17344 echo "Prototype: $try" ;;
17347 *) case "$usethreads" in
17348 define) echo "random_r has no prototype, not using it." >&4 ;;
17355 *) random_r_proto=0
17359 : see if readdir and friends exist
17360 set readdir d_readdir
17362 set seekdir d_seekdir
17364 set telldir d_telldir
17366 set rewinddir d_rewinddir
17369 : see if readdir64_r exists
17370 set readdir64_r d_readdir64_r
17372 case "$d_readdir64_r" in
17374 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
17375 case "$d_readdir64_r_proto:$usethreads" in
17376 ":define") d_readdir64_r_proto=define
17377 set d_readdir64_r_proto readdir64_r $hdrs
17381 case "$d_readdir64_r_proto" in
17383 case "$readdir64_r_proto" in
17384 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
17385 ./protochk "$extern_C $try" $hdrs && readdir64_r_proto=I_TSR ;;
17387 case "$readdir64_r_proto" in
17388 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
17389 ./protochk "$extern_C $try" $hdrs && readdir64_r_proto=I_TS ;;
17391 case "$readdir64_r_proto" in
17392 ''|0) d_readdir64_r=undef
17393 readdir64_r_proto=0
17394 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
17395 * ) case "$readdir64_r_proto" in
17396 REENTRANT_PROTO*) ;;
17397 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
17399 echo "Prototype: $try" ;;
17402 *) case "$usethreads" in
17403 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
17405 d_readdir64_r=undef
17406 readdir64_r_proto=0
17410 *) readdir64_r_proto=0
17414 : see if readdir_r exists
17415 set readdir_r d_readdir_r
17417 case "$d_readdir_r" in
17419 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
17420 case "$d_readdir_r_proto:$usethreads" in
17421 ":define") d_readdir_r_proto=define
17422 set d_readdir_r_proto readdir_r $hdrs
17426 case "$d_readdir_r_proto" in
17428 case "$readdir_r_proto" in
17429 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
17430 ./protochk "$extern_C $try" $hdrs && readdir_r_proto=I_TSR ;;
17432 case "$readdir_r_proto" in
17433 ''|0) try='int readdir_r(DIR*, struct dirent*);'
17434 ./protochk "$extern_C $try" $hdrs && readdir_r_proto=I_TS ;;
17436 case "$readdir_r_proto" in
17437 ''|0) d_readdir_r=undef
17439 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
17440 * ) case "$readdir_r_proto" in
17441 REENTRANT_PROTO*) ;;
17442 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
17444 echo "Prototype: $try" ;;
17447 *) case "$usethreads" in
17448 define) echo "readdir_r has no prototype, not using it." >&4 ;;
17455 *) readdir_r_proto=0
17459 : see if readv exists
17463 : see if recvmsg exists
17464 set recvmsg d_recvmsg
17467 : see if regcomp, regcmp, or re_comp exist, for regular pattern matching
17469 if set regcomp val -f d_regcomp; eval $csym; $val; then
17470 echo 'regcomp() found.' >&4
17471 d_regcomp="$define"
17474 elif set regcmp val -f d_regcmp; eval $csym; $val; then
17475 echo 'regcmp() found.' >&4
17479 elif set re_comp val -f d_re_comp; eval $csym; $val; then
17480 echo 're_comp() found, assuming re_exec() also exists.' >&4
17481 d_re_comp="$define"
17486 No regcomp(), regcmp() nor re_comp() found !! No regular pattern matching.
17493 : see if remainder exists
17494 set remainder d_remainder
17497 : see if remquo exists
17498 set remquo d_remquo
17501 : see if rename exists
17502 set rename d_rename
17505 : see if rint exists
17509 : see if rmdir exists
17513 : see if round exists
17517 : see if memory.h is available.
17522 : See if it conflicts with string.h
17528 $cppstdin $cppflags $cppminus < $strings > mem.h
17529 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
17531 echo "We won't be including <memory.h>."
17541 : can bcopy handle overlapping blocks?
17544 case "$d_memmove" in
17545 "$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
17546 *) case "$d_bcopy" in
17548 echo "Checking to see if bcopy() can do overlapping copies..." >&4
17550 #$i_memory I_MEMORY
17551 #$i_stdlib I_STDLIB
17552 #$i_string I_STRING
17553 #$i_unistd I_UNISTD
17555 $cat >>try.c <<'EOCP'
17558 # include <memory.h>
17561 # include <stdlib.h>
17564 # include <string.h>
17566 # include <strings.h>
17569 # include <unistd.h> /* Needed for NetBSD */
17573 char buf[128], abc[128];
17579 /* Copy "abcde..." string to char abc[] so that gcc doesn't
17580 try to store the string in read-only memory. */
17581 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
17583 for (align = 7; align >= 0; align--) {
17584 for (len = 36; len; len--) {
17586 bcopy(abc, b, len);
17587 for (off = 1; off <= len; off++) {
17588 bcopy(b, b+off, len);
17589 bcopy(b+off, b, len);
17590 if (bcmp(b, abc, len))
17599 if eval $compile_ok; then
17600 if $run ./try 2>/dev/null; then
17601 echo "Yes, it can."
17604 echo "It can't, sorry."
17607 echo "(I can't compile the test program, so we'll assume not...)"
17617 : can memcpy handle overlapping blocks?
17620 case "$d_memmove" in
17621 "$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
17622 *) case "$d_memcpy" in
17624 echo "Checking to see if memcpy() can do overlapping copies..." >&4
17626 #$i_memory I_MEMORY
17627 #$i_stdlib I_STDLIB
17628 #$i_string I_STRING
17629 #$i_unistd I_UNISTD
17631 $cat >>try.c <<'EOCP'
17634 # include <memory.h>
17637 # include <stdlib.h>
17640 # include <string.h>
17642 # include <strings.h>
17645 # include <unistd.h> /* Needed for NetBSD */
17649 char buf[128], abc[128];
17655 /* Copy "abcde..." string to char abc[] so that gcc doesn't
17656 try to store the string in read-only memory. */
17657 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
17659 for (align = 7; align >= 0; align--) {
17660 for (len = 36; len; len--) {
17662 memcpy(b, abc, len);
17663 for (off = 1; off <= len; off++) {
17664 memcpy(b+off, b, len);
17665 memcpy(b, b+off, len);
17666 if (memcmp(b, abc, len))
17675 if eval $compile_ok; then
17676 if $run ./try 2>/dev/null; then
17677 echo "Yes, it can."
17680 echo "It can't, sorry."
17683 echo "(I can't compile the test program, so we'll assume not...)"
17693 : can memcmp be trusted to compare relative magnitude?
17695 case "$d_memcmp" in
17698 echo "Checking if your memcmp() can compare relative magnitude..." >&4
17700 #$i_memory I_MEMORY
17701 #$i_stdlib I_STDLIB
17702 #$i_string I_STRING
17703 #$i_unistd I_UNISTD
17705 $cat >>try.c <<'EOCP'
17708 # include <memory.h>
17711 # include <stdlib.h>
17714 # include <string.h>
17716 # include <strings.h>
17719 # include <unistd.h> /* Needed for NetBSD */
17725 if ((a < b) && memcmp(&a, &b, 1) < 0)
17731 if eval $compile_ok; then
17732 if $run ./try 2>/dev/null; then
17733 echo "Yes, it can."
17736 echo "No, it can't (it uses signed chars)."
17739 echo "(I can't compile the test program, so we'll assume not...)"
17747 : see if prototype for sbrk is available
17749 set d_sbrkproto sbrk $i_unistd unistd.h
17752 : see if scalbn exists
17753 set scalbn d_scalbn
17756 : see if select exists
17757 set select d_select
17760 : see if semctl exists
17761 set semctl d_semctl
17764 : see if semget exists
17765 set semget d_semget
17768 : see if semop exists
17772 : see how much of the 'sem*(2)' library is present.
17775 case "$d_semctl$d_semget$d_semop" in
17776 *"$undef"*) h_sem=false;;
17780 case "`ipcs 2>&1`" in
17781 "SVID messages"*"not configured"*)
17782 echo "Your $osname does not have the sem*(2) configured." >&4
17785 set semctl d_semctl
17787 set semget d_semget
17795 : we could also check for sys/ipc.h ...
17796 if $h_sem && $test `./findhdr sys/sem.h`; then
17797 echo "You have the full sem*(2) library." >&4
17800 echo "You don't have the full sem*(2) library." >&4
17806 : see whether sys/sem.h defines union semun
17808 $cat > try.c <<'END'
17809 #include <sys/types.h>
17810 #include <sys/ipc.h>
17811 #include <sys/sem.h>
17812 int main () { union semun semun; semun.buf = 0; }
17815 if eval $compile; then
17816 echo "You have union semun in <sys/sem.h>." >&4
17819 echo "You do not have union semun in <sys/sem.h>." >&4
17826 : see how to do semctl IPC_STAT
17830 $cat > tryh.h <<END
17833 # define S_IRUSR S_IREAD
17834 # define S_IWUSR S_IWRITE
17835 # define S_IXUSR S_IEXEC
17837 # define S_IRUSR 0400
17838 # define S_IWUSR 0200
17839 # define S_IXUSR 0100
17841 # define S_IRGRP (S_IRUSR>>3)
17842 # define S_IWGRP (S_IWUSR>>3)
17843 # define S_IXGRP (S_IXUSR>>3)
17844 # define S_IROTH (S_IRUSR>>6)
17845 # define S_IWOTH (S_IWUSR>>6)
17846 # define S_IXOTH (S_IXUSR>>6)
17849 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
17850 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
17851 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
17854 : see whether semctl IPC_STAT can use union semun
17855 case "$d_semctl_semun" in
17859 #include <sys/types.h>
17860 #include <sys/ipc.h>
17861 #include <sys/sem.h>
17862 #include <sys/stat.h>
17869 #$d_union_semun HAS_UNION_SEMUN
17872 #ifndef HAS_UNION_SEMUN
17875 struct semid_ds *buf;
17876 unsigned short *array;
17882 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
17883 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
17885 struct semid_ds argbuf;
17888 st = semctl(sem, 0, IPC_STAT, arg);
17892 # endif /* IPC_STAT */
17893 printf("semctl IPC_STAT failed: errno = %d\n", errno);
17895 if (semctl(sem, 0, IPC_RMID, arg) != 0)
17896 # endif /* IPC_RMID */
17897 printf("semctl IPC_RMID failed: errno = %d\n", errno);
17899 #endif /* IPC_PRIVATE && ... */
17900 printf("semget failed: errno = %d\n", errno);
17905 if eval $compile; then
17908 semun) val="$define" ;;
17916 case "$d_semctl_semun" in
17918 echo "You can use union semun for semctl IPC_STAT." >&4
17921 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
17926 : see whether semctl IPC_STAT can use struct semid_ds pointer
17927 case "$d_semctl_semid_ds" in
17930 $cat > try.c <<'END'
17931 #include <sys/types.h>
17932 #include <sys/ipc.h>
17933 #include <sys/sem.h>
17934 #include <sys/stat.h>
17942 struct semid_ds arg;
17945 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
17946 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
17949 st = semctl(sem, 0, IPC_STAT, &arg);
17951 printf("semid_ds\n");
17953 # endif /* IPC_STAT */
17954 printf("semctl IPC_STAT failed: errno = %d\n", errno);
17956 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
17957 # endif /* IPC_RMID */
17958 printf("semctl IPC_RMID failed: errno = %d\n", errno);
17960 #endif /* IPC_PRIVATE && ... */
17961 printf("semget failed: errno = %d\n", errno);
17967 if eval $compile; then
17970 semid_ds) val="$define" ;;
17974 set d_semctl_semid_ds
17978 case "$d_semctl_semid_ds" in
17980 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
17982 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
17988 # We do not have the full sem*(2) library, so assume we can not
17994 set d_semctl_semid_ds
18000 : see if sendmsg exists
18001 set sendmsg d_sendmsg
18004 : see if setegid exists
18005 set setegid d_setegid
18008 : see if seteuid exists
18009 set seteuid d_seteuid
18012 : see if setgrent exists
18013 set setgrent d_setgrent
18016 : see if setgrent_r exists
18017 set setgrent_r d_setgrent_r
18019 case "$d_setgrent_r" in
18021 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
18022 case "$d_setgrent_r_proto:$usethreads" in
18023 ":define") d_setgrent_r_proto=define
18024 set d_setgrent_r_proto setgrent_r $hdrs
18028 case "$d_setgrent_r_proto" in
18030 case "$setgrent_r_proto" in
18031 ''|0) try='int setgrent_r(FILE**);'
18032 ./protochk "$extern_C $try" $hdrs && setgrent_r_proto=I_H ;;
18034 case "$setgrent_r_proto" in
18035 ''|0) try='void setgrent_r(FILE**);'
18036 ./protochk "$extern_C $try" $hdrs && setgrent_r_proto=V_H ;;
18038 case "$setgrent_r_proto" in
18039 ''|0) d_setgrent_r=undef
18041 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
18042 * ) case "$setgrent_r_proto" in
18043 REENTRANT_PROTO*) ;;
18044 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
18046 echo "Prototype: $try" ;;
18049 *) case "$usethreads" in
18050 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
18057 *) setgrent_r_proto=0
18061 : see if sethostent exists
18062 set sethostent d_sethent
18065 : see if sethostent_r exists
18066 set sethostent_r d_sethostent_r
18068 case "$d_sethostent_r" in
18070 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
18071 case "$d_sethostent_r_proto:$usethreads" in
18072 ":define") d_sethostent_r_proto=define
18073 set d_sethostent_r_proto sethostent_r $hdrs
18077 case "$d_sethostent_r_proto" in
18079 case "$sethostent_r_proto" in
18080 ''|0) try='int sethostent_r(int, struct hostent_data*);'
18081 ./protochk "$extern_C $try" $hdrs && sethostent_r_proto=I_ID ;;
18083 case "$sethostent_r_proto" in
18084 ''|0) try='void sethostent_r(int, struct hostent_data*);'
18085 ./protochk "$extern_C $try" $hdrs && sethostent_r_proto=V_ID ;;
18087 case "$sethostent_r_proto" in
18088 ''|0) d_sethostent_r=undef
18089 sethostent_r_proto=0
18090 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
18091 * ) case "$sethostent_r_proto" in
18092 REENTRANT_PROTO*) ;;
18093 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
18095 echo "Prototype: $try" ;;
18098 *) case "$usethreads" in
18099 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
18101 d_sethostent_r=undef
18102 sethostent_r_proto=0
18106 *) sethostent_r_proto=0
18110 : see if setitimer exists
18111 set setitimer d_setitimer
18114 : see if setlinebuf exists
18115 set setlinebuf d_setlinebuf
18118 : see if setlocale exists
18119 set setlocale d_setlocale
18122 : see if locale.h is available
18123 set locale.h i_locale
18126 : see if setlocale_r exists
18127 set setlocale_r d_setlocale_r
18129 case "$d_setlocale_r" in
18131 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
18132 case "$d_setlocale_r_proto:$usethreads" in
18133 ":define") d_setlocale_r_proto=define
18134 set d_setlocale_r_proto setlocale_r $hdrs
18138 case "$d_setlocale_r_proto" in
18140 case "$setlocale_r_proto" in
18141 ''|0) try='int setlocale_r(int, const char*, char*, int);'
18142 ./protochk "$extern_C $try" $hdrs && setlocale_r_proto=I_ICBI ;;
18144 case "$setlocale_r_proto" in
18145 ''|0) d_setlocale_r=undef
18146 setlocale_r_proto=0
18147 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
18148 * ) case "$setlocale_r_proto" in
18149 REENTRANT_PROTO*) ;;
18150 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
18152 echo "Prototype: $try" ;;
18155 *) case "$usethreads" in
18156 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
18158 d_setlocale_r=undef
18159 setlocale_r_proto=0
18163 *) setlocale_r_proto=0
18167 : see if setnetent exists
18168 set setnetent d_setnent
18171 : see if setnetent_r exists
18172 set setnetent_r d_setnetent_r
18174 case "$d_setnetent_r" in
18176 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
18177 case "$d_setnetent_r_proto:$usethreads" in
18178 ":define") d_setnetent_r_proto=define
18179 set d_setnetent_r_proto setnetent_r $hdrs
18183 case "$d_setnetent_r_proto" in
18185 case "$setnetent_r_proto" in
18186 ''|0) try='int setnetent_r(int, struct netent_data*);'
18187 ./protochk "$extern_C $try" $hdrs && setnetent_r_proto=I_ID ;;
18189 case "$setnetent_r_proto" in
18190 ''|0) try='void setnetent_r(int, struct netent_data*);'
18191 ./protochk "$extern_C $try" $hdrs && setnetent_r_proto=V_ID ;;
18193 case "$setnetent_r_proto" in
18194 ''|0) d_setnetent_r=undef
18195 setnetent_r_proto=0
18196 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
18197 * ) case "$setnetent_r_proto" in
18198 REENTRANT_PROTO*) ;;
18199 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
18201 echo "Prototype: $try" ;;
18204 *) case "$usethreads" in
18205 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
18207 d_setnetent_r=undef
18208 setnetent_r_proto=0
18212 *) setnetent_r_proto=0
18216 : see if setprotoent exists
18217 set setprotoent d_setpent
18220 : see if setpgid exists
18221 set setpgid d_setpgid
18224 : see if setpgrp2 exists
18225 set setpgrp2 d_setpgrp2
18228 : see if setpriority exists
18229 set setpriority d_setprior
18232 : see if setproctitle exists
18233 set setproctitle d_setproctitle
18236 : see if setprotoent_r exists
18237 set setprotoent_r d_setprotoent_r
18239 case "$d_setprotoent_r" in
18241 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
18242 case "$d_setprotoent_r_proto:$usethreads" in
18243 ":define") d_setprotoent_r_proto=define
18244 set d_setprotoent_r_proto setprotoent_r $hdrs
18248 case "$d_setprotoent_r_proto" in
18250 case "$setprotoent_r_proto" in
18251 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
18252 ./protochk "$extern_C $try" $hdrs && setprotoent_r_proto=I_ID ;;
18254 case "$setprotoent_r_proto" in
18255 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
18256 ./protochk "$extern_C $try" $hdrs && setprotoent_r_proto=V_ID ;;
18258 case "$setprotoent_r_proto" in
18259 ''|0) d_setprotoent_r=undef
18260 setprotoent_r_proto=0
18261 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
18262 * ) case "$setprotoent_r_proto" in
18263 REENTRANT_PROTO*) ;;
18264 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
18266 echo "Prototype: $try" ;;
18269 *) case "$usethreads" in
18270 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
18272 d_setprotoent_r=undef
18273 setprotoent_r_proto=0
18277 *) setprotoent_r_proto=0
18281 : see if setpwent exists
18282 set setpwent d_setpwent
18285 : see if setpwent_r exists
18286 set setpwent_r d_setpwent_r
18288 case "$d_setpwent_r" in
18290 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
18291 case "$d_setpwent_r_proto:$usethreads" in
18292 ":define") d_setpwent_r_proto=define
18293 set d_setpwent_r_proto setpwent_r $hdrs
18297 case "$d_setpwent_r_proto" in
18299 case "$setpwent_r_proto" in
18300 ''|0) try='int setpwent_r(FILE**);'
18301 ./protochk "$extern_C $try" $hdrs && setpwent_r_proto=I_H ;;
18303 case "$setpwent_r_proto" in
18304 ''|0) try='void setpwent_r(FILE**);'
18305 ./protochk "$extern_C $try" $hdrs && setpwent_r_proto=V_H ;;
18307 case "$setpwent_r_proto" in
18308 ''|0) d_setpwent_r=undef
18310 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
18311 * ) case "$setpwent_r_proto" in
18312 REENTRANT_PROTO*) ;;
18313 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
18315 echo "Prototype: $try" ;;
18318 *) case "$usethreads" in
18319 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
18326 *) setpwent_r_proto=0
18330 : see if setregid exists
18331 set setregid d_setregid
18333 set setresgid d_setresgid
18336 : see if setreuid exists
18337 set setreuid d_setreuid
18339 set setresuid d_setresuid
18342 : see if setrgid exists
18343 set setrgid d_setrgid
18346 : see if setruid exists
18347 set setruid d_setruid
18350 : see if setservent exists
18351 set setservent d_setsent
18354 : see if setservent_r exists
18355 set setservent_r d_setservent_r
18357 case "$d_setservent_r" in
18359 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
18360 case "$d_setservent_r_proto:$usethreads" in
18361 ":define") d_setservent_r_proto=define
18362 set d_setservent_r_proto setservent_r $hdrs
18366 case "$d_setservent_r_proto" in
18368 case "$setservent_r_proto" in
18369 ''|0) try='int setservent_r(int, struct servent_data*);'
18370 ./protochk "$extern_C $try" $hdrs && setservent_r_proto=I_ID ;;
18372 case "$setservent_r_proto" in
18373 ''|0) try='void setservent_r(int, struct servent_data*);'
18374 ./protochk "$extern_C $try" $hdrs && setservent_r_proto=V_ID ;;
18376 case "$setservent_r_proto" in
18377 ''|0) d_setservent_r=undef
18378 setservent_r_proto=0
18379 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
18380 * ) case "$setservent_r_proto" in
18381 REENTRANT_PROTO*) ;;
18382 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
18384 echo "Prototype: $try" ;;
18387 *) case "$usethreads" in
18388 define) echo "setservent_r has no prototype, not using it." >&4 ;;
18390 d_setservent_r=undef
18391 setservent_r_proto=0
18395 *) setservent_r_proto=0
18399 : see if setsid exists
18400 set setsid d_setsid
18403 : see if setvbuf exists
18404 set setvbuf d_setvbuf
18407 : see if shmctl exists
18408 set shmctl d_shmctl
18411 : see if shmget exists
18412 set shmget d_shmget
18415 : see if shmat exists
18418 : see what shmat returns
18421 $cat >shmat.c <<'END'
18422 #include <sys/shm.h>
18425 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
18430 echo "and it returns ($shmattype)." >&4
18431 : see if a prototype for shmat is available
18432 xxx=`./findhdr sys/shm.h`
18433 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
18434 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
18445 set d_shmatprototype
18448 : see if shmdt exists
18452 : see how much of the 'shm*(2)' library is present.
18455 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
18456 *"$undef"*) h_shm=false;;
18460 case "`ipcs 2>&1`" in
18461 "SVID shared memory"*"not configured"*)
18462 echo "Your $osname does not have the shm*(2) configured." >&4
18465 set shmctl d_shmctl
18467 set shmget d_shmget
18477 : we could also check for sys/ipc.h ...
18478 if $h_shm && $test `./findhdr sys/shm.h`; then
18479 echo "You have the full shm*(2) library." >&4
18482 echo "You don't have the full shm*(2) library." >&4
18488 : see if we have sigaction
18490 if set sigaction val -f d_sigaction; eval $csym; $val; then
18491 echo 'sigaction() found.' >&4
18494 #include <sys/types.h>
18495 #include <signal.h>
18496 #$i_stdlib I_STDLIB
18498 #include <stdlib.h>
18502 struct sigaction act, oact;
18504 oact.sa_handler = 0;
18505 /* so that act and oact are used */
18506 exit(act.sa_flags == 0 && oact.sa_handler == 0);
18510 if eval $compile_ok; then
18513 echo "But you don't seem to have a usable struct sigaction." >&4
18517 echo 'sigaction NOT found.' >&4
18520 set d_sigaction; eval $setvar
18523 : see if this is a sunmath.h system
18524 set sunmath.h i_sunmath
18527 : see if signbit exists
18528 $echo $n "Checking to see if you have signbit() available to work on $nvtype... $c" >&4
18531 #$i_sunmath I_SUNMATH
18535 #ifdef I_SUNMATH /* Solaris special math library */
18536 # include <sunmath.h>
18539 int main(int argc, char **argv)
18543 if ((signbit(x) == 0) && (signbit(y) != 0))
18551 if eval $compile; then
18552 if $run ./try; then
18556 $echo "Signbit seems to be available, but doesn't work as I expected."
18557 $echo "I won't use it." >&4
18568 : see if sigprocmask exists
18569 set sigprocmask d_sigprocmask
18572 : see if sigsetjmp exists
18574 case "$d_sigsetjmp" in
18577 #include <setjmp.h>
18578 #$i_stdlib I_STDLIB
18580 #include <stdlib.h>
18586 if (sigsetjmp(env,1))
18589 siglongjmp(env, 1);
18594 if eval $compile; then
18595 if $run ./try >/dev/null 2>&1; then
18596 echo "POSIX sigsetjmp found." >&4
18600 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
18606 echo "sigsetjmp not found." >&4
18610 *) val="$d_sigsetjmp"
18611 case "$d_sigsetjmp" in
18612 $define) echo "POSIX sigsetjmp found." >&4;;
18613 $undef) echo "sigsetjmp not found." >&4;;
18621 : see if snprintf exists
18622 set snprintf d_snprintf
18625 : see if vsnprintf exists
18626 set vsnprintf d_vsnprintf
18629 case "$d_snprintf-$d_vsnprintf" in
18632 Checking whether your snprintf() and vsnprintf() work okay...
18634 $cat >try.c <<'EOCP'
18635 /* v?snprintf testing logic courtesy of Russ Allbery.
18636 * According to C99:
18637 * - if the buffer is too short it still must be \0-terminated
18638 * - if the buffer is too short the potentially required length
18639 * must be returned and not -1
18640 * - if the buffer is NULL the potentially required length
18641 * must be returned and not -1 or core dump
18644 #include <stdarg.h>
18648 int test (char *format, ...)
18653 va_start (args, format);
18654 count = vsnprintf (buf, sizeof buf, format, args);
18661 return ((test ("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0'
18662 && snprintf (NULL, 0, "%s", "abcd") == 4) ? 0 : 1);
18666 if eval $compile; then
18669 0) echo "Your snprintf() and vsnprintf() seem to be working okay." ;;
18671 Your snprintf() and snprintf() don't seem to be working okay.
18673 d_snprintf="$undef"
18674 d_vsnprintf="$undef"
18678 echo "(I can't seem to compile the test program--assuming they don't)"
18679 d_snprintf="$undef"
18680 d_vsnprintf="$undef"
18686 : see if sockatmark exists
18687 set sockatmark d_sockatmark
18690 : see if prototype for sockatmark is available
18692 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
18695 : see if socks5_init exists
18696 set socks5_init d_socks5_init
18699 : see if sprintf returns the length of the string in the buffer as per ANSI
18700 $echo "Checking whether sprintf returns the length of the string..." >&4
18703 #$i_stdlib I_STDLIB
18705 #include <stdlib.h>
18707 #$i_string I_STRING
18709 # include <string.h>
18711 # include <strings.h>
18720 int check (size_t expect, int test) {
18721 size_t got = strlen(buffer);
18725 printf("expected %ld, got %ld in test %d '%s'\n", (long) expect, (long) got,
18730 int main(int argc, char **argv) {
18733 check(sprintf(buffer, ""), ++test);
18734 check(sprintf(buffer, "%s %s", "perl", "rules"), ++test);
18735 check(sprintf(buffer, "I like %g", atan2(0,-1)), ++test);
18742 if eval $compile; then
18746 sprintf returns the length of the string (as ANSI says it should)
18748 d_sprintf_returns_strlen="$define"
18751 sprintf does not return the length of the string (how old is this system?)
18753 d_sprintf_returns_strlen="$undef"
18757 echo "(I can't seem to compile the test program--assuming it doesn't)" >&4
18758 d_sprintf_returns_strlen="$undef"
18762 : see if srand48_r exists
18763 set srand48_r d_srand48_r
18765 case "$d_srand48_r" in
18767 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
18768 case "$d_srand48_r_proto:$usethreads" in
18769 ":define") d_srand48_r_proto=define
18770 set d_srand48_r_proto srand48_r $hdrs
18774 case "$d_srand48_r_proto" in
18776 case "$srand48_r_proto" in
18777 ''|0) try='int srand48_r(long, struct drand48_data*);'
18778 ./protochk "$extern_C $try" $hdrs && srand48_r_proto=I_LS ;;
18780 case "$srand48_r_proto" in
18781 ''|0) d_srand48_r=undef
18783 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
18784 * ) case "$srand48_r_proto" in
18785 REENTRANT_PROTO*) ;;
18786 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
18788 echo "Prototype: $try" ;;
18791 *) case "$usethreads" in
18792 define) echo "srand48_r has no prototype, not using it." >&4 ;;
18799 *) srand48_r_proto=0
18803 : see if srandom_r exists
18804 set srandom_r d_srandom_r
18806 case "$d_srandom_r" in
18808 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
18809 case "$d_srandom_r_proto:$usethreads" in
18810 ":define") d_srandom_r_proto=define
18811 set d_srandom_r_proto srandom_r $hdrs
18815 case "$d_srandom_r_proto" in
18817 case "$srandom_r_proto" in
18818 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
18819 ./protochk "$extern_C $try" $hdrs && srandom_r_proto=I_TS ;;
18821 case "$srandom_r_proto" in
18822 ''|0) d_srandom_r=undef
18824 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
18825 * ) case "$srandom_r_proto" in
18826 REENTRANT_PROTO*) ;;
18827 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
18829 echo "Prototype: $try" ;;
18832 *) case "$usethreads" in
18833 define) echo "srandom_r has no prototype, not using it." >&4 ;;
18840 *) srandom_r_proto=0
18844 : see if prototype for setresgid is available
18846 set d_sresgproto setresgid $i_unistd unistd.h
18849 : see if prototype for setresuid is available
18851 set d_sresuproto setresuid $i_unistd unistd.h
18854 : see if stat exists
18858 : see if sys/stat.h is available
18859 set sys/stat.h i_sysstat
18862 : see if stat knows about block sizes
18864 echo "Checking to see if your struct stat has st_blocks field..." >&4
18865 set d_statblks stat st_blocks $i_sysstat sys/stat.h
18868 : see if this is a sys/vfs.h system
18869 set sys/vfs.h i_sysvfs
18872 : see if this is a sys/statfs.h system
18873 set sys/statfs.h i_sysstatfs
18876 : Check for statfs_s
18878 echo "Checking to see if your system supports struct statfs..." >&4
18879 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
18881 case "$d_statfs_s" in
18882 "$define") echo "Yes, it does." ;;
18883 *) echo "No, it doesn't." ;;
18887 : see if struct statfs knows about f_flags
18888 case "$d_statfs_s" in
18891 echo "Checking to see if your struct statfs has f_flags field..." >&4
18892 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
18896 set d_statfs_f_flags
18900 case "$d_statfs_f_flags" in
18901 "$define") echo "Yes, it does." ;;
18902 *) echo "No, it doesn't." ;;
18905 : see what flavor, if any, of static inline is supported
18907 echo "Checking to see if your system supports static inline..."
18908 $cat > try.c <<'EOCP'
18909 #include <stdlib.h>
18910 extern int f_via_a(int x);
18911 extern int f_via_b(int x);
18912 int main(int argc, char **argv)
18921 return EXIT_SUCCESS;
18924 return EXIT_FAILURE;
18928 $cat > a.c <<'EOCP'
18929 static INLINE int f(int x) {
18940 $cat > b.c <<'EOCP'
18941 extern int f(int x);
18949 # Respect a hint (or previous) value for perl_static_inline, if there is one.
18950 case "$perl_static_inline" in
18951 '') # Check the various possibilities, and break out on success.
18952 # For gcc, prefer __inline__, which will still permit
18953 # cflags.SH to add in -ansi.
18954 case "$gccversion" in
18955 '') xxx="inline __inline__ __inline _inline";;
18956 *) xxx="__inline__ inline __inline _inline";;
18958 for inline in $xxx; do
18959 set try -DINLINE=$inline a.c
18960 if eval $compile && $run ./try; then
18961 # Now make sure there is no external linkage of static
18963 set try -DINLINE=$inline -DUSE_B a.c b.c
18964 if eval $compile && $run ./try; then
18965 $echo "Your compiler supports static $inline, " >&4
18966 $echo "but it also creates an external definition," >&4
18967 $echo "so I won't use it." >&4
18970 $echo "Your compiler supports static $inline." >&4
18972 perl_static_inline="static $inline";
18976 $echo "Your compiler does NOT support static $inline." >&4
18981 *inline*) # Some variant of inline exists.
18982 echo "Keeping your $hint value of $perl_static_inline."
18985 static) # No inline capabilities
18986 echo "Keeping your $hint value of $perl_static_inline."
18989 *) # Unrecognized previous value -- blindly trust the supplied
18990 # value and hope it makes sense. Use old value for
18991 # d_static_inline, if there is one.
18992 echo "Keeping your $hint value of $perl_static_inline."
18993 case "$d_static_inline" in
18995 *) val=$d_static_inline ;;
18999 # Fallback to plain 'static' if nothing worked.
19000 case "$perl_static_inline" in
19002 perl_static_inline="static"
19006 set d_static_inline
19008 $rm -f a.[co] b.[co]
19011 : Check stream access
19013 Checking how to access stdio streams by file descriptor number...
19015 case "$stdio_stream_array" in
19016 '') $cat >try.c <<EOCP
19019 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
19023 for s in _iob __iob __sF
19025 set try -DSTDIO_STREAM_ARRAY=$s
19026 if eval $compile; then
19027 case "`$run ./try`" in
19028 yes) stdio_stream_array=$s; break ;;
19034 case "$stdio_stream_array" in
19036 I can't figure out how to access stdio streams by file descriptor number.
19038 d_stdio_stream_array="$undef"
19041 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
19043 d_stdio_stream_array="$define"
19047 : see if strcoll exists
19048 set strcoll d_strcoll
19051 : check for structure copying
19053 echo "Checking to see if your C compiler can copy structs..." >&4
19054 $cat >try.c <<'EOCP'
19064 if $cc -c try.c >/dev/null 2>&1 ; then
19066 echo "Yup, it can."
19069 echo "Nope, it can't."
19075 : see if strerror and/or sys_errlist[] exist
19077 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
19078 if set strerror val -f d_strerror; eval $csym; $val; then
19079 echo 'strerror() found.' >&4
19080 d_strerror="$define"
19081 d_strerrm='strerror(e)'
19082 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
19083 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
19084 d_syserrlst="$define"
19086 echo "(Since you don't have sys_errlist[], strerror() is welcome.)"
19087 d_syserrlst="$undef"
19089 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
19090 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
19091 echo 'strerror() found in string header.' >&4
19092 d_strerror="$define"
19093 d_strerrm='strerror(e)'
19094 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
19095 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
19096 d_syserrlst="$define"
19098 echo "(You don't appear to have any sys_errlist[], how can this be?)"
19099 d_syserrlst="$undef"
19101 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
19102 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
19103 d_strerror="$undef"
19104 d_syserrlst="$define"
19105 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
19107 echo 'strerror() and sys_errlist[] NOT found.' >&4
19108 d_strerror="$undef"
19109 d_syserrlst="$undef"
19110 d_strerrm='"unknown"'
19114 : see if strerror_r exists
19115 set strerror_r d_strerror_r
19117 case "$d_strerror_r" in
19119 hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
19120 case "$d_strerror_r_proto:$usethreads" in
19121 ":define") d_strerror_r_proto=define
19122 set d_strerror_r_proto strerror_r $hdrs
19126 case "$d_strerror_r_proto" in
19128 case "$strerror_r_proto" in
19129 ''|0) try='int strerror_r(int, char*, size_t);'
19130 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=I_IBW ;;
19132 case "$strerror_r_proto" in
19133 ''|0) try='int strerror_r(int, char*, int);'
19134 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=I_IBI ;;
19136 case "$strerror_r_proto" in
19137 ''|0) try='char* strerror_r(int, char*, size_t);'
19138 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=B_IBW ;;
19140 case "$strerror_r_proto" in
19141 ''|0) d_strerror_r=undef
19143 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
19144 * ) case "$strerror_r_proto" in
19145 REENTRANT_PROTO*) ;;
19146 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
19148 echo "Prototype: $try" ;;
19151 *) case "$usethreads" in
19152 define) echo "strerror_r has no prototype, not using it." >&4 ;;
19159 *) strerror_r_proto=0
19163 : see if strftime exists
19164 set strftime d_strftime
19167 : see if strlcat exists
19168 set strlcat d_strlcat
19171 : see if strlcpy exists
19172 set strlcpy d_strlcpy
19175 : see if strtod exists
19176 set strtod d_strtod
19179 : see if strtol exists
19180 set strtol d_strtol
19183 : see if strtold exists
19184 set strtold d_strtold
19187 : see if strtoll exists
19188 set strtoll d_strtoll
19191 case "$d_longlong-$d_strtoll" in
19194 Checking whether your strtoll() works okay...
19196 $cat >try.c <<'EOCP'
19199 #define strtoll __strtoll
19202 #define strtoll _strtoll
19205 extern long long int strtoll(char *s, char **, int);
19206 static int bad = 0;
19207 int check(char *s, long long ell, int een) {
19210 gll = strtoll(s, 0, 10);
19211 if (!((gll == ell) && (errno == een)))
19215 check(" 1", 1LL, 0);
19216 check(" 0", 0LL, 0);
19217 check("-1", -1LL, 0);
19218 check("-9223372036854775808", -9223372036854775808LL, 0);
19219 check("-9223372036854775808", -9223372036854775808LL, 0);
19220 check(" 9223372036854775807", 9223372036854775807LL, 0);
19221 check("-9223372036854775808", -9223372036854775808LL, 0);
19222 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
19223 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
19229 if eval $compile; then
19232 ok) echo "Your strtoll() seems to be working okay." ;;
19234 Your strtoll() doesn't seem to be working okay.
19240 echo "(I can't seem to compile the test program--assuming it doesn't)"
19246 : see if strtoq exists
19247 set strtoq d_strtoq
19250 : see if strtoul exists
19251 set strtoul d_strtoul
19254 case "$d_strtoul" in
19257 Checking whether your strtoul() works okay...
19259 $cat >try.c <<'EOCP'
19262 extern unsigned long int strtoul(char *s, char **, int);
19263 static int bad = 0;
19264 void check(char *s, unsigned long eul, int een) {
19267 gul = strtoul(s, 0, 10);
19268 if (!((gul == eul) && (errno == een)))
19272 check(" 1", 1L, 0);
19273 check(" 0", 0L, 0);
19275 case "$longsize" in
19277 $cat >>try.c <<'EOCP'
19278 check("18446744073709551615", 18446744073709551615UL, 0);
19279 check("18446744073709551616", 18446744073709551615UL, ERANGE);
19280 #if 0 /* strtoul() for /^-/ strings is undefined. */
19281 check("-1", 18446744073709551615UL, 0);
19282 check("-18446744073709551614", 2, 0);
19283 check("-18446744073709551615", 1, 0);
19284 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
19285 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
19290 $cat >>try.c <<'EOCP'
19291 check("4294967295", 4294967295UL, 0);
19292 check("4294967296", 4294967295UL, ERANGE);
19293 #if 0 /* strtoul() for /^-/ strings is undefined. */
19294 check("-1", 4294967295UL, 0);
19295 check("-4294967294", 2, 0);
19296 check("-4294967295", 1, 0);
19297 check("-4294967296", 4294967295UL, ERANGE);
19298 check("-4294967297", 4294967295UL, ERANGE);
19303 : Should we write these tests to be more portable by sprintf-ing
19304 : ~0 and then manipulating that char string as input for strtol?
19307 $cat >>try.c <<'EOCP'
19314 if eval $compile; then
19315 case "`$run ./try`" in
19316 ok) echo "Your strtoul() seems to be working okay." ;;
19318 Your strtoul() doesn't seem to be working okay.
19324 echo "(I can't seem to compile the test program--assuming it doesn't)"
19330 : see if strtoull exists
19331 set strtoull d_strtoull
19334 case "$d_longlong-$d_strtoull" in
19337 Checking whether your strtoull() works okay...
19339 $cat >try.c <<'EOCP'
19342 #define strtoull __strtoull
19345 extern unsigned long long int strtoull(char *s, char **, int);
19346 static int bad = 0;
19347 int check(char *s, long long eull, int een) {
19350 gull = strtoull(s, 0, 10);
19351 if (!((gull == eull) && (errno == een)))
19355 check(" 1", 1LL, 0);
19356 check(" 0", 0LL, 0);
19357 check("18446744073709551615", 18446744073709551615ULL, 0);
19358 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
19359 #if 0 /* strtoull() for /^-/ strings is undefined. */
19360 check("-1", 18446744073709551615ULL, 0);
19361 check("-18446744073709551614", 2LL, 0);
19362 check("-18446744073709551615", 1LL, 0);
19363 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
19364 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
19371 if eval $compile; then
19372 case "`$run ./try`" in
19373 ok) echo "Your strtoull() seems to be working okay." ;;
19375 Your strtoull() doesn't seem to be working okay.
19377 d_strtoull="$undef"
19381 echo "(I can't seem to compile the test program--assuming it doesn't)"
19382 d_strtoull="$undef"
19387 : see if strtouq exists
19388 set strtouq d_strtouq
19391 case "$d_strtouq" in
19394 Checking whether your strtouq() works okay...
19396 $cat >try.c <<'EOCP'
19399 extern unsigned long long int strtouq(char *s, char **, int);
19400 static int bad = 0;
19401 void check(char *s, unsigned long long eull, int een) {
19402 unsigned long long gull;
19404 gull = strtouq(s, 0, 10);
19405 if (!((gull == eull) && (errno == een)))
19409 check(" 1", 1LL, 0);
19410 check(" 0", 0LL, 0);
19411 check("18446744073709551615", 18446744073709551615ULL, 0);
19412 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
19413 #if 0 /* strtouq() for /^-/ strings is undefined. */
19414 check("-1", 18446744073709551615ULL, 0);
19415 check("-18446744073709551614", 2LL, 0);
19416 check("-18446744073709551615", 1LL, 0);
19417 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
19418 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
19426 if eval $compile; then
19427 case "`$run ./try`" in
19428 ok) echo "Your strtouq() seems to be working okay." ;;
19430 Your strtouq() doesn't seem to be working okay.
19436 echo "(I can't seem to compile the test program--assuming it doesn't)"
19442 : see if strxfrm exists
19443 set strxfrm d_strxfrm
19446 : see if symlink exists
19447 set symlink d_symlink
19450 : see if syscall exists
19451 set syscall d_syscall
19454 : see if prototype for syscall is available
19456 set d_syscallproto syscall $i_unistd unistd.h
19459 : see if sysconf exists
19460 set sysconf d_sysconf
19463 : see if system exists
19464 set system d_system
19467 : see if tcgetpgrp exists
19468 set tcgetpgrp d_tcgetpgrp
19471 : see if tcsetpgrp exists
19472 set tcsetpgrp d_tcsetpgrp
19475 : see if prototype for telldir is available
19477 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
19480 : see if tgamma exists
19481 set tgamma d_tgamma
19484 : see if time exists
19486 if test "X$d_time" = X -o X"$timetype" = X; then
19487 if set time val -f d_time; eval $csym; $val; then
19488 echo 'time() found.' >&4
19490 rp="What is the type returned by time() on this system?"
19491 set time_t timetype long stdio.h sys/types.h
19494 echo 'time() not found, hope that will do.' >&4
19502 : see if timegm exists
19503 set timegm d_timegm
19506 : see if this is a sys/times.h system
19507 set sys/times.h i_systimes
19510 : see if times exists
19512 if set times val -f d_times; eval $csym; $val; then
19513 echo 'times() found.' >&4
19516 case "$i_systimes" in
19517 "$define") inc='sys/times.h';;
19519 rp="What is the type returned by times() on this system?"
19520 set clock_t clocktype long stdio.h sys/types.h $inc
19523 echo 'times() NOT found, hope that will do.' >&4
19528 : see if tmpnam_r exists
19529 set tmpnam_r d_tmpnam_r
19531 case "$d_tmpnam_r" in
19533 hdrs="$i_systypes sys/types.h define stdio.h "
19534 case "$d_tmpnam_r_proto:$usethreads" in
19535 ":define") d_tmpnam_r_proto=define
19536 set d_tmpnam_r_proto tmpnam_r $hdrs
19540 case "$d_tmpnam_r_proto" in
19542 case "$tmpnam_r_proto" in
19543 ''|0) try='char* tmpnam_r(char*);'
19544 ./protochk "$extern_C $try" $hdrs && tmpnam_r_proto=B_B ;;
19546 case "$tmpnam_r_proto" in
19547 ''|0) d_tmpnam_r=undef
19549 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
19550 * ) case "$tmpnam_r_proto" in
19551 REENTRANT_PROTO*) ;;
19552 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
19554 echo "Prototype: $try" ;;
19557 *) case "$usethreads" in
19558 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
19565 *) tmpnam_r_proto=0
19569 : see if trunc exists
19573 : see if truncate exists
19574 set truncate d_truncate
19577 : see if ttyname_r exists
19578 set ttyname_r d_ttyname_r
19580 case "$d_ttyname_r" in
19582 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
19583 case "$d_ttyname_r_proto:$usethreads" in
19584 ":define") d_ttyname_r_proto=define
19585 set d_ttyname_r_proto ttyname_r $hdrs
19589 case "$d_ttyname_r_proto" in
19591 case "$ttyname_r_proto" in
19592 ''|0) try='int ttyname_r(int, char*, size_t);'
19593 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=I_IBW ;;
19595 case "$ttyname_r_proto" in
19596 ''|0) try='int ttyname_r(int, char*, int);'
19597 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=I_IBI ;;
19599 case "$ttyname_r_proto" in
19600 ''|0) try='char* ttyname_r(int, char*, int);'
19601 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=B_IBI ;;
19603 case "$ttyname_r_proto" in
19604 ''|0) d_ttyname_r=undef
19606 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
19607 * ) case "$ttyname_r_proto" in
19608 REENTRANT_PROTO*) ;;
19609 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
19611 echo "Prototype: $try" ;;
19614 *) case "$usethreads" in
19615 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
19622 *) ttyname_r_proto=0
19626 : see if tzname[] exists
19628 if set tzname val -a d_tzname; eval $csym; $val; then
19630 echo 'tzname[] found.' >&4
19633 echo 'tzname[] NOT found.' >&4
19638 : Check if is a multiplatform env
19640 darwin) multiarch="$define" ;;
19642 case "$multiarch" in
19643 ''|[nN]*) multiarch="$undef" ;;
19646 : check for ordering of bytes in a UV
19648 case "$multiarch" in
19651 You seem to be doing a multiarchitecture build,
19652 skipping the byteorder check.
19658 case "$byteorder" in
19661 In the following, larger digits indicate more significance. A big-endian
19662 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
19663 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
19664 machines may have weird orders like 3412. A Cray will report 87654321,
19665 an Alpha will report 12345678. If the test program works the default is
19667 I'm now running the test program...
19671 #$i_stdlib I_STDLIB
19673 #include <stdlib.h>
19675 #include <sys/types.h>
19676 typedef $uvtype UV;
19686 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
19688 u.l = (UV)0x04030201;
19689 for (i = 0; i < $uvsize; i++)
19690 printf("%c", u.c[i]+'0');
19697 if eval $compile && $run ./try > /dev/null; then
19700 [1-4][1-4][1-4][1-4]|12345678|87654321)
19701 echo "(The test program ran ok.)"
19702 echo "byteorder=$dflt"
19705 ????|????????) echo "(The test program ran ok.)" ;;
19706 *) echo "(The test program didn't run right for some reason.)" ;;
19711 (I can't seem to compile the test program. Guessing big-endian...)
19714 case "$xxx_prompt" in
19716 rp="What is the order of bytes in $uvtype?"
19729 : Checking 32bit alignedness
19732 Checking to see whether you can access character data unalignedly...
19734 case "$d_u32align" in
19735 '') $cat >try.c <<EOCP
19737 #$i_stdlib I_STDLIB
19739 #include <stdlib.h>
19741 #define U32 $u32type
19742 #define BYTEORDER 0x$byteorder
19744 #include <signal.h>
19746 $signal_t bletch(int s) { exit(4); }
19749 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
19750 volatile U8 buf[8];
19754 if (sizeof(U32) != 4) {
19755 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
19762 signal(SIGBUS, bletch);
19774 for (i = 0; i < 4; i++) {
19775 up = (U32*)(buf + i);
19776 if (! ((*up == 1 << (8*i)) || /* big-endian */
19777 (*up == 1 << (8*(3-i))) /* little-endian */
19781 printf("read failed (%x)\n", *up);
19787 for (i = 0; i < 4; i++) {
19788 up = (U32*)(buf + i);
19790 if (*up != 0xBeef) {
19791 printf("write failed (%x)\n", *up);
19805 if eval $compile_ok; then
19806 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
19807 $run ./try 2>&1 >/dev/null
19810 You can access character data pretty unalignedly.
19812 d_u32align="$undef"
19815 It seems that you must access character data in an aligned manner.
19817 d_u32align="$define"
19821 rp='Can you access character data at unaligned addresses?'
19825 [yY]*) d_u32align="$undef" ;;
19826 *) d_u32align="$define" ;;
19833 : see if ualarm exists
19834 set ualarm d_ualarm
19837 : see if umask exists
19841 : see if unordered exists
19842 set unordered d_unordered
19845 : see if unsetenv exists
19846 set unsetenv d_unsetenv
19849 : see if usleep exists
19850 set usleep d_usleep
19853 : see if prototype for usleep is available
19855 set d_usleepproto usleep $i_unistd unistd.h
19858 : see if ustat exists
19862 : see if closedir exists
19863 set closedir d_closedir
19866 case "$d_closedir" in
19869 echo "Checking whether closedir() returns a status..." >&4
19871 #$i_dirent I_DIRENT /**/
19872 #$i_sysdir I_SYS_DIR /**/
19873 #$i_sysndir I_SYS_NDIR /**/
19874 #$i_systypes I_SYS_TYPES /**/
19876 #if defined(I_SYS_TYPES)
19877 #include <sys/types.h>
19879 #if defined(I_DIRENT)
19880 #include <dirent.h>
19883 #include <sys/ndir.h>
19887 #include <ndir.h> /* may be wrong in the future */
19889 #include <sys/dir.h>
19894 int main() { return closedir(opendir(".")); }
19897 if eval $compile_ok; then
19898 if $run ./try > /dev/null 2>&1 ; then
19899 echo "Yes, it does."
19902 echo "No, it doesn't."
19906 echo "(I can't seem to compile the test program--assuming it doesn't)"
19914 set d_void_closedir
19918 : see if there is a wait4
19922 : see if waitpid exists
19923 set waitpid d_waitpid
19928 $cat >try.c <<'EOCP'
19934 return (wcscmp (s, s) ? 1 : 0);
19939 if eval $compile; then
19942 0) echo "A working wcscmp() found." >&4
19944 *) echo "wcscmp() found, but it doesn't work" >&4
19948 echo "wcscmp() NOT found." >&4
19954 : see if wcstombs exists
19955 set wcstombs d_wcstombs
19960 $cat >try.c <<'EOCP'
19965 wchar_t dst[4], *src = L" ";
19967 return (wcsxfrm (dst, src, 1) ? errno ? errno : 0 : 1);
19972 if eval $compile; then
19975 0) echo "A working wcsxfrm() found." >&4
19977 *) echo "wcsxfrm() found, but it doesn't work" >&4
19981 echo "wcsxfrm() NOT found." >&4
19987 : see if wctomb exists
19988 set wctomb d_wctomb
19991 : see if writev exists
19992 set writev d_writev
19995 : check for alignment requirements
19997 case "$alignbytes" in
19998 '') echo "Checking alignment constraints..." >&4
19999 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
20000 $cat >try.c <<'EOCP'
20001 typedef long double NV;
20004 $cat >try.c <<'EOCP'
20008 $cat >>try.c <<'EOCP'
20016 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
20021 if eval $compile_ok; then
20025 echo "(I can't seem to compile the test program...)"
20027 case "$multiarch" in
20029 : The usual safe value is 8, but Darwin with -Duselongdouble
20030 : needs 16. Hence, we will take 8 as a minimum, but allow
20031 : Configure to pick a larger value if needed.
20032 if $test "$dflt" -lt 8; then
20034 echo "Setting alignment to 8 for multiarch support.">&4
20039 *) dflt="$alignbytes"
20042 rp="Doubles must be aligned on a how-many-byte boundary?"
20047 : set the base revision
20050 : length of character in bytes. Is always 1, otherwise it is not C
20051 : This used to be a test using sizeof
20054 : Check for the number of bits in a character
20055 case "$charbits" in
20056 '') echo "Checking how long a character is (in bits)..." >&4
20063 for (c = 1, n = 0; c; c <<= 1, n++) ;
20064 printf ("%d\n", n);
20069 if eval $compile_ok; then
20073 echo "(I can't seem to compile the test program. Guessing...)"
20080 rp="What is the length of a character (in bits)?"
20084 case "$charbits" in
20087 Your system has an unsigned character size of $charbits bits, which
20088 is rather unusual (normally it is 8 bits). Perl likely will not work
20089 correctly on your system, with subtle bugs in various places.
20091 rp='Do you really want to continue?'
20095 [yY]) echo >&4 "Okay, continuing." ;;
20100 : how do we concatenate cpp tokens here?
20102 echo "Checking to see how your cpp does stuff like concatenate tokens..." >&4
20103 $cat >cpp_stuff.c <<'EOCP'
20104 #define RCAT(a,b)a/**/b
20105 #define ACAT(a,b)a ## b
20109 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
20110 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
20111 echo "Oh! Smells like ANSI's been here." >&4
20112 echo "We can catify or stringify, separately or together!"
20114 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
20115 echo "Ah, yes! The good old days!" >&4
20116 echo "However, in the good old days we don't know how to stringify and"
20117 echo "catify at the same time."
20121 Hmm, I don't seem to be able to concatenate tokens with your cpp.
20122 You're going to have to edit the values of CAT[2-5] in config.h...
20124 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
20128 : see if this is a db.h system
20134 : Check db version.
20136 echo "Checking Berkeley DB version ..." >&4
20142 #include <sys/types.h>
20144 #$i_stdlib I_STDLIB
20146 #include <stdlib.h>
20149 int main(int argc, char *argv[])
20151 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
20152 int Major, Minor, Patch ;
20153 unsigned long Version ;
20154 (void)db_version(&Major, &Minor, &Patch) ;
20156 printf("%d %d %d %d %d %d\n",
20157 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
20158 Major, Minor, Patch);
20161 printf("You have Berkeley DB Version 2 or greater.\n");
20163 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
20164 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
20165 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
20166 Major, Minor, Patch) ;
20168 /* check that db.h & libdb are compatible */
20169 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
20170 printf("db.h and libdb are incompatible.\n") ;
20174 printf("db.h and libdb are compatible.\n") ;
20176 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
20177 + DB_VERSION_PATCH ;
20179 /* needs to be >= 2.3.4 */
20180 if (Version < 2003004) {
20181 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
20182 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
20188 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
20193 printf("You have Berkeley DB Version 1.\n");
20194 exit(0); /* DB version < 2: the coast is clear. */
20196 exit(1); /* <db.h> not Berkeley DB? */
20202 if eval $compile_ok && $run ./try; then
20203 echo 'Looks OK.' >&4
20205 db_version_major=$1
20206 db_version_minor=$2
20207 db_version_patch=$3
20209 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
20213 : Remove db from list of libraries to use
20214 echo "Removing unusable -ldb from library list" >&4
20215 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
20218 echo "libs = $libs" >&4
20228 : Check the return type needed for hash
20230 echo "Checking return type needed for hash for Berkeley DB ..." >&4
20236 #include <sys/types.h>
20239 #ifndef DB_VERSION_MAJOR
20240 u_int32_t hash_cb (const void* ptr, size_t size)
20246 info.hash = hash_cb;
20250 if $cc $ccflags -c try.c >try.out 2>&1 ; then
20251 if $contains warning try.out >>/dev/null 2>&1 ; then
20254 db_hashtype='u_int32_t'
20257 : XXX Maybe we should just give up here.
20258 db_hashtype=u_int32_t
20260 echo "Help: I can't seem to compile the db test program." >&4
20261 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
20264 echo "Your version of Berkeley DB uses $db_hashtype for hash."
20266 *) db_hashtype=u_int32_t
20271 : Check the return type needed for prefix
20273 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
20279 #include <sys/types.h>
20282 #ifndef DB_VERSION_MAJOR
20283 size_t prefix_cb (const DBT *key1, const DBT *key2)
20289 info.prefix = prefix_cb;
20293 if $cc $ccflags -c try.c >try.out 2>&1 ; then
20294 if $contains warning try.out >>/dev/null 2>&1 ; then
20295 db_prefixtype='int'
20297 db_prefixtype='size_t'
20300 db_prefixtype='size_t'
20301 : XXX Maybe we should just give up here.
20303 echo "Help: I can't seem to compile the db test program." >&4
20304 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
20307 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
20309 *) db_prefixtype='size_t'
20313 : How can we generate normalized random numbers ?
20315 echo "Using our internal random number implementation..." >&4
20318 *-Dmy_rand=*|*-Dmy_srand=*)
20319 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
20320 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
20321 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
20322 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
20326 randfunc=Perl_drand48
20327 drand01="Perl_drand48()"
20328 seedfunc="Perl_drand48_init"
20332 : Determine if this is an EBCDIC system
20334 echo "Determining whether or not we are on an EBCDIC system..." >&4
20335 $cat >try.c <<'EOM'
20338 if ('M'==0xd4) return 0;
20345 if eval $compile_ok; then
20346 if $run ./try; then
20347 echo "You seem to speak EBCDIC." >&4
20350 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
20353 echo "I'm unable to compile the test program." >&4
20354 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
20360 : Check how to flush
20363 Checking how to flush all pending stdio output...
20365 # I only know how to find the first 32 possibly open files on SunOS.
20366 # See also hints/sunos_4_1.sh and util.c --AD
20368 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
20370 $cat >>try.c <<EOCP
20372 #$i_stdlib I_STDLIB
20374 #include <stdlib.h>
20376 #$i_unistd I_UNISTD
20378 # include <unistd.h>
20380 #$d_sysconf HAS_SYSCONF
20381 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
20382 #ifdef HAS_STDIO_STREAM_ARRAY
20383 # define STDIO_STREAM_ARRAY $stdio_stream_array
20388 p = fopen("try.out", "w");
20392 # ifdef TRY_FPRINTF
20396 #ifdef TRY_FFLUSH_NULL
20399 #ifdef TRY_FFLUSH_ALL
20401 long open_max = -1;
20402 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
20403 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
20405 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
20406 open_max = sysconf(_SC_OPEN_MAX);
20409 open_max = FOPEN_MAX;
20412 open_max = OPEN_MAX;
20421 # ifdef HAS_STDIO_STREAM_ARRAY
20422 if (open_max > 0) {
20424 for (i = 0; i < open_max; i++)
20425 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
20426 STDIO_STREAM_ARRAY[i]._file < open_max &&
20427 STDIO_STREAM_ARRAY[i]._flag)
20428 fflush(&STDIO_STREAM_ARRAY[i]);
20436 : first we have to find out how _not_ to flush
20438 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
20440 set try -DTRY_FPUTC
20441 if eval $compile; then
20442 $run ./try 2>/dev/null
20445 if $test ! -s try.out -a "X$code" = X42; then
20451 set try -DTRY_FPRINTF
20452 if eval $compile; then
20453 $run ./try 2>/dev/null
20456 if $test ! -s try.out -a "X$code" = X42; then
20457 output=-DTRY_FPRINTF
20463 : check for fflush NULL behavior
20464 case "$fflushNULL" in
20465 '') set try -DTRY_FFLUSH_NULL $output
20466 if eval $compile; then
20467 $run ./try 2>/dev/null
20470 if $test -s try.out -a "X$code" = X42; then
20471 fflushNULL="`$cat try.out`"
20473 if $test "X$code" != X42; then
20475 (If this test failed, don't worry, we'll try another method shortly.)
20480 $rm -f core try.core core.try.*
20481 case "$fflushNULL" in
20483 Your fflush(NULL) works okay for output streams.
20484 Let's see if it clobbers input pipes...
20486 # As of mid-March 2000 all versions of Solaris appear to have a stdio
20487 # bug that improperly flushes the input end of pipes. So we avoid the
20488 # autoflush on fork/system/exec support for now. :-(
20489 $cat >tryp.c <<EOCP
20492 main(int argc, char **argv)
20498 while ((i = getc(stdin)) != -1
20499 && (*bp++ = i) != '\n'
20500 && bp < &buf[1024])
20503 fprintf(stdout, "%s", buf);
20511 fflushNULL="$define"
20513 if eval $compile; then
20515 # Copy the .c file to the remote host ($to is an ssh-alike if targethost is set)
20516 if $test "X$targethost" != X; then
20519 $run "cat tryp.c | ./tryp " 2>/dev/null > tryp.out
20521 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
20523 if cmp tryp.c tryp.out >/dev/null 2>&1; then
20525 fflush(NULL) seems to behave okay with input streams.
20527 fflushNULL="$define"
20530 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
20532 fflushNULL="$undef"
20535 $rm -f core tryp.c tryp.core core.tryp.*
20538 Your fflush(NULL) isn't working (contrary to ANSI C).
20540 fflushNULL="$undef"
20543 Cannot figure out whether your fflush(NULL) works or not.
20544 I'm assuming it doesn't (contrary to ANSI C).
20546 fflushNULL="$undef"
20550 $define|true|[yY]*)
20551 fflushNULL="$define"
20554 fflushNULL="$undef"
20557 : check explicit looping only if NULL did not work, and if the pipe
20558 : bug does not show up on an explicit flush too
20559 case "$fflushNULL" in
20561 $cat >tryp.c <<EOCP
20564 main(int argc, char **argv)
20570 while ((i = getc(stdin)) != -1
20571 && (*bp++ = i) != '\n'
20572 && bp < &buf[1024])
20575 fprintf(stdout, "%s", buf);
20584 if eval $compile; then
20586 if $test "X$targethost" != X; then
20589 $run "cat tryp.c | ./tryp " 2>/dev/null > tryp.out
20591 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
20593 if cmp tryp.c tryp.out >/dev/null 2>&1; then
20595 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
20597 : now check for fflushall behaviour
20598 case "$fflushall" in
20599 '') set try -DTRY_FFLUSH_ALL $output
20600 if eval $compile; then
20602 (Now testing the other method--but note that this also may fail.)
20604 $run ./try 2>/dev/null
20607 if $test -s try.out -a "X$code" = X42; then
20608 fflushall="`$cat try.out`"
20612 case "$fflushall" in
20614 Whew. Flushing explicitly all the stdio streams works.
20616 fflushall="$define"
20619 Sigh. Flushing explicitly all the stdio streams doesn't work.
20624 Cannot figure out whether flushing stdio streams explicitly works or not.
20625 I'm assuming it doesn't.
20631 "$define"|true|[yY]*)
20632 fflushall="$define"
20640 All is futile. Even fflush(stdin) clobbers input pipes!
20647 $rm -f core tryp.c tryp.core core.tryp.*
20649 *) fflushall="$undef"
20653 case "$fflushNULL$fflushall" in
20656 OK, I give up. I cannot figure out how to flush pending stdio output.
20657 We won't be flushing handles at all before fork/exec/popen.
20663 : Store the full pathname to the ar program for use in the C program
20664 : Respect a hint or command line value for full_ar.
20669 : Store the full pathname to the sed program for use in the C program
20672 : see what type gids are declared as in the kernel
20674 echo "Looking for the type for group ids returned by getgid()."
20675 set gid_t gidtype xxx stdio.h sys/types.h
20679 xxx=`./findhdr sys/user.h`
20680 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
20682 unsigned) dflt="$1 $2" ;;
20686 *) dflt="$gidtype";;
20689 gid_t) echo "gid_t found." ;;
20690 *) rp="What is the type for group ids returned by getgid()?"
20696 : Check the size of GID
20699 *_t) zzz="$gidtype" ;;
20702 echo "Checking the size of $zzz..." >&4
20704 #include <sys/types.h>
20706 #$i_stdlib I_STDLIB
20708 #include <stdlib.h>
20711 printf("%d\n", (int)sizeof($gidtype));
20716 if eval $compile_ok; then
20720 echo "(I can't execute the test program--guessing $gidsize.)" >&4
20723 echo "Your $zzz is $gidsize bytes long."
20728 echo "(I can't compile the test program--guessing $gidsize.)" >&4
20732 : Check if GID is signed
20735 *_t) zzz="$gidtype" ;;
20738 echo "Checking the sign of $zzz..." >&4
20740 #include <sys/types.h>
20751 if eval $compile; then
20755 echo "(I can't execute the test program--guessing unsigned.)" >&4
20759 1) echo "Your $zzz is unsigned." ;;
20760 -1) echo "Your $zzz is signed." ;;
20766 echo "(I can't compile the test program--guessing unsigned.)" >&4
20770 : Check 64bit sizes
20773 if $test X"$quadtype" != X; then
20775 echo "Checking how to print 64-bit integers..." >&4
20777 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
20778 $cat >try.c <<'EOCP'
20779 #include <sys/types.h>
20782 int q = 12345678901;
20783 printf("%ld\n", q);
20787 if eval $compile; then
20791 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
20792 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
20793 echo "We will use %d."
20799 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
20800 $cat >try.c <<'EOCP'
20801 #include <sys/types.h>
20804 long q = 12345678901;
20805 printf("%ld\n", q);
20809 if eval $compile; then
20813 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
20814 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
20815 echo "We will use %ld."
20821 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
20822 $cat >try.c <<'EOCP'
20823 #include <sys/types.h>
20824 #include <inttypes.h>
20827 int64_t q = 12345678901;
20828 printf("%" PRId64 "\n", q);
20832 if eval $compile; then
20836 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
20837 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
20838 echo "We will use the C9X style."
20844 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
20846 #include <sys/types.h>
20849 $quadtype q = 12345678901;
20850 printf("%Ld\n", q);
20854 if eval $compile; then
20858 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
20859 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
20860 echo "We will use %Ld."
20866 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
20867 $cat >try.c <<'EOCP'
20868 #include <sys/types.h>
20871 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
20872 printf("%lld\n", q);
20876 if eval $compile; then
20880 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
20881 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
20882 echo "We will use the %lld style."
20888 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
20890 #include <sys/types.h>
20893 $quadtype q = 12345678901;
20894 printf("%qd\n", q);
20898 if eval $compile; then
20902 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
20903 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
20904 echo "We will use %qd."
20910 if $test X"$sPRId64" = X; then
20911 echo "Cannot figure out how to print 64-bit integers." >&4
20918 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
20919 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
20921 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
20922 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
20926 : Check format strings for internal types
20928 $echo "Checking the format strings to be used for Perl's internal types..." >&4
20930 if $test X"$ivsize" = X8; then
20931 ivdformat="$sPRId64"
20932 uvuformat="$sPRIu64"
20933 uvoformat="$sPRIo64"
20934 uvxformat="$sPRIx64"
20935 uvXUformat="$sPRIXU64"
20937 if $test X"$ivsize" = X"$longsize"; then
20944 if $test X"$ivsize" = X"$intsize"; then
20952 if $test X"$ivsize" = X"$shortsize"; then
20963 if $test X"$usequadmath" = X"$define"; then
20971 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
20972 nveformat="$sPRIeldbl"
20973 nvfformat="$sPRIfldbl"
20974 nvgformat="$sPRIgldbl"
20975 nvEUformat="$sPRIEUldbl"
20976 nvFUformat="$sPRIFUldbl"
20977 nvGUformat="$sPRIGUldbl"
20988 case "$ivdformat" in
20989 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
20994 : Check format string for GID
20997 $echo "Checking the format string to be used for gids..." >&4
21000 -1) if $test X"$gidsize" = X"$ivsize"; then
21001 gidformat="$ivdformat"
21003 if $test X"$gidsize" = X"$longsize"; then
21006 if $test X"$gidsize" = X"$intsize"; then
21009 if $test X"$gidsize" = X"$shortsize"; then
21016 *) if $test X"$gidsize" = X"$uvsize"; then
21017 gidformat="$uvuformat"
21019 if $test X"$gidsize" = X"$longsize"; then
21022 if $test X"$gidsize" = X"$intsize"; then
21025 if $test X"$gidsize" = X"$shortsize"; then
21034 : see if getgroups exists
21035 set getgroups d_getgrps
21038 : see if setgroups exists
21039 set setgroups d_setgrps
21042 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
21044 case "$d_getgrps$d_setgrps" in
21046 case "$groupstype" in
21047 '') dflt="$gidtype" ;;
21048 *) dflt="$groupstype" ;;
21051 What type of pointer is the second argument to getgroups() and setgroups()?
21052 Usually this is the same as group ids, $gidtype, but not always.
21055 rp='What type pointer is the second argument to getgroups() and setgroups()?'
21059 *) groupstype="$gidtype";;
21062 : check whether make sets MAKE
21064 echo "Checking if your $make program sets \$(MAKE)..." >&4
21065 case "$make_set_make" in
21067 $sed 's/^X //' > testmake.mak << 'EOF'
21069 X @echo 'maketemp="$(MAKE)"'
21071 case "`$make -f testmake.mak 2>/dev/null`" in
21072 *maketemp=*) make_set_make='#' ;;
21073 *) make_set_make="MAKE=$make" ;;
21075 $rm -f testmake.mak
21078 case "$make_set_make" in
21079 '#') echo "Yup, it does.";;
21080 *) echo "Nope, it doesn't.";;
21083 : see what type is used for mode_t
21084 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
21085 set mode_t modetype int stdio.h sys/types.h
21088 : see if we need va_copy
21090 case "$i_stdarg" in
21093 #include <stdarg.h>
21095 #$i_stdlib I_STDLIB
21097 #include <stdlib.h>
21099 #include <signal.h>
21102 ivfprintf(FILE *f, const char *fmt, va_list *valp)
21104 return vfprintf(f, fmt, *valp);
21108 myvfprintf(FILE *f, const char *fmt, va_list val)
21110 return ivfprintf(f, fmt, &val);
21114 myprintf(char *fmt, ...)
21117 va_start(val, fmt);
21118 return myvfprintf(stdout, fmt, val);
21122 main(int ac, char **av)
21124 signal(SIGSEGV, exit);
21126 myprintf("%s%cs all right, then\n", "that", '\'');
21131 if eval $compile && $run ./try 2>&1 >/dev/null; then
21132 case "`$run ./try`" in
21133 "that's all right, then")
21139 yes) echo "It seems that you don't need va_copy()." >&4
21140 need_va_copy="$undef"
21142 *) echo "It seems that va_copy() or similar will be needed." >&4
21143 need_va_copy="$define"
21148 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
21149 need_va_copy="$undef"
21153 : see what type is used for size_t
21154 rp="What is the type used for the length parameter for string functions?"
21155 set size_t sizetype 'unsigned int' stdio.h sys/types.h
21158 : check for type of arguments to gethostbyaddr.
21159 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
21160 case "$d_gethbyaddr" in
21164 Checking to see what type of arguments are accepted by gethostbyaddr().
21166 hdrs="$define sys/types.h
21167 $d_socket sys/socket.h
21168 $i_niin netinet/in.h
21170 $i_unistd unistd.h"
21171 : The first arg can 'char *' or 'void *'
21172 : The second arg is some of integral type
21173 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
21174 for yyy in size_t long int; do
21175 case "$netdb_host_type" in
21176 '') try="$extern_C struct hostent *gethostbyaddr($xxx, $yyy, int);"
21177 if ./protochk "$try" $hdrs; then
21178 echo "Your system accepts $xxx for the first arg."
21179 echo "...and $yyy for the second arg."
21180 netdb_host_type="$xxx"
21181 netdb_hlen_type="$yyy"
21187 : In case none of those worked, prompt the user.
21188 case "$netdb_host_type" in
21189 '') rp='What is the type for the 1st argument to gethostbyaddr?'
21192 netdb_host_type=$ans
21193 rp='What is the type for the 2nd argument to gethostbyaddr?'
21196 netdb_hlen_type=$ans
21200 *) : no gethostbyaddr, so pick harmless defaults
21201 netdb_host_type='char *'
21202 netdb_hlen_type="$sizetype"
21205 # Remove the "const" if needed. -- but then we'll have a
21207 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
21210 : check for type of argument to gethostbyname.
21211 if test "X$netdb_name_type" = X ; then
21212 case "$d_gethbyname" in
21216 Checking to see what type of argument is accepted by gethostbyname().
21218 hdrs="$define sys/types.h
21219 $d_socket sys/socket.h
21220 $i_niin netinet/in.h
21222 $i_unistd unistd.h"
21223 for xxx in "const char *" "char *"; do
21224 case "$netdb_name_type" in
21225 '') try="$extern_C struct hostent *gethostbyname($xxx);"
21226 if ./protochk "$try" $hdrs; then
21227 echo "Your system accepts $xxx."
21228 netdb_name_type="$xxx"
21233 : In case none of those worked, prompt the user.
21234 case "$netdb_name_type" in
21235 '') rp='What is the type for the 1st argument to gethostbyname?'
21238 netdb_name_type=$ans
21242 *) : no gethostbyname, so pick harmless default
21243 netdb_name_type='char *'
21248 : check for type of 1st argument to getnetbyaddr.
21249 if test "X$netdb_net_type" = X ; then
21250 case "$d_getnbyaddr" in
21254 Checking to see what type of 1st argument is accepted by getnetbyaddr().
21256 hdrs="$define sys/types.h
21257 $d_socket sys/socket.h
21258 $i_niin netinet/in.h
21260 $i_unistd unistd.h"
21261 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
21262 case "$netdb_net_type" in
21263 '') try="$extern_C struct netent *getnetbyaddr($xxx, int);"
21264 if ./protochk "$try" $hdrs; then
21265 echo "Your system accepts $xxx."
21266 netdb_net_type="$xxx"
21271 : In case none of those worked, prompt the user.
21272 case "$netdb_net_type" in
21273 '') rp='What is the type for the 1st argument to getnetbyaddr?'
21276 netdb_net_type=$ans
21280 *) : no getnetbyaddr, so pick harmless default
21281 netdb_net_type='long'
21285 : locate the preferred pager for this system
21292 [a-zA-Z]:/*) dflt=$pg;;
21296 [a-zA-Z]:/*) dflt=$more;;
21300 [a-zA-Z]:/*) dflt=$less;;
21303 '') dflt=/usr/ucb/more;;
21311 rp='What pager is used on your system?'
21315 : see what type pids are declared as in the kernel
21316 rp="What is the type of process ids on this system?"
21317 set pid_t pidtype int stdio.h sys/types.h
21320 : see if ar generates random libraries by itself
21322 echo "Checking how to generate random libraries on your machine..." >&4
21323 echo 'int bar1() { return bar2(); }' > bar1.c
21324 echo 'int bar2() { return 2; }' > bar2.c
21326 #$i_stdlib I_STDLIB
21328 #include <stdlib.h>
21330 int main() { printf("%d\n", bar1()); exit(0); }
21332 $cc $ccflags -c bar1.c >/dev/null 2>&1
21333 $cc $ccflags -c bar2.c >/dev/null 2>&1
21334 $cc $ccflags -c foo.c >/dev/null 2>&1
21335 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
21336 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
21337 $run ./foobar >/dev/null 2>&1; then
21338 echo "$ar appears to generate random libraries itself."
21340 if [ "X$ranlib" = "X" ]; then
21343 elif $ar s bar$_a >/dev/null 2>&1 &&
21344 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
21345 $run ./foobar >/dev/null 2>&1; then
21346 echo "a table of contents needs to be added with '$ar s'."
21349 elif $ar ts bar$_a >/dev/null 2>&1 &&
21350 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
21351 $run ./foobar >/dev/null 2>&1; then
21352 echo "a table of contents needs to be added with '$ar ts'."
21359 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
21360 $test -f $ranlib || ranlib=''
21363 if $test -n "$ranlib"; then
21364 echo "your system has '$ranlib'; we'll use that."
21367 echo "your system doesn't seem to support random libraries"
21368 echo "so we'll use lorder and tsort to order the libraries."
21375 : see if this is a values.h system
21376 set values.h i_values
21379 : Check the max offset that gmtime and localtime accept
21380 echo "Checking max offsets that gmtime () accepts"
21383 define) yyy="#include <values.h>" ;;
21387 case "$sGMTIME_min/$sGMTIME_max" in
21390 #include <sys/types.h>
21399 void gm_check (time_t t, int min_year, int max_year)
21402 if ( tmp == NULL ||
21403 /* Check tm_year overflow */
21404 tmp->tm_year < min_year || tmp->tm_year > max_year)
21415 gm_check (MAXLONG, 69, 0x7fffffff);
21417 if (tmp == NULL || tmp->tm_year < 0) {
21418 for (i = 63; i >= 0; i--) {
21419 time_t x = pt | ((time_t)1 << i);
21420 if (x < 0 || x < pt) continue;
21421 gm_check (x, 69, 0x7fffffff);
21424 printf ("sGMTIME_max=%ld\n", pt);
21433 gm_check (MINLONG, -1900, 70);
21436 for (i = 36; i >= 0; i--) {
21437 time_t x = pt - ((time_t)1 << i);
21438 if (x > 0) continue;
21439 gm_check (x, -1900, 70);
21442 printf ("sGMTIME_min=%ld\n", pt);
21446 int main (int argc, char *argv[])
21448 /* fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t)); */
21455 if eval $compile; then
21456 eval `$run ./try 2>/dev/null`
21458 echo "Cannot determine sGMTIME_max and sGMTIME_min." >&4
21464 echo "Checking max offsets that localtime () accepts"
21466 case "$sLOCALTIME_min/$sLOCALTIME_max" in
21469 #include <sys/types.h>
21478 void local_check (time_t t, int min_year, int max_year)
21480 if (sizeof (time_t) > 4 && t > 0x7ffffffffffff000LL)
21483 tmp = localtime (&t);
21484 if ( tmp == NULL ||
21485 /* Check tm_year overflow */
21486 tmp->tm_year < min_year || tmp->tm_year > max_year)
21490 } /* local_check */
21497 local_check (MAXLONG, 69, 0x7fffffff);
21499 if (tmp == NULL || tmp->tm_year < 0) {
21500 for (i = 63; i >= 0; i--) {
21501 time_t x = pt | ((time_t)1 << i);
21502 if (x < 0 || x < pt) continue;
21503 local_check (x, 69, 0x7fffffff);
21506 printf ("sLOCALTIME_max=%ld\n", pt);
21515 local_check (MINLONG, -1900, 70);
21518 for (i = 36; i >= 0; i--) {
21519 time_t x = pt - ((time_t)1 << i);
21520 if (x > 0) continue;
21521 local_check (x, -1900, 70);
21524 printf ("sLOCALTIME_min=%ld\n", pt);
21528 int main (int argc, char *argv[])
21536 if eval $compile; then
21537 eval `$run ./try 2>/dev/null`
21539 echo "Cannot determine sLOCALTIME_max and sLOCALTIME_min." >&4
21545 : check for type of arguments to select.
21546 case "$selecttype" in
21547 '') case "$d_select" in
21551 Checking to see what type of arguments are accepted by select().
21553 hdrs="$define sys/types.h
21554 $i_systime sys/time.h
21555 $i_sysselct sys/select.h
21556 $d_socket sys/socket.h"
21557 : The first arg can be int, unsigned, or size_t
21558 : The last arg may or may not be 'const'
21560 : void pointer has been seen but using that
21561 : breaks the selectminbits test
21562 for xxx in 'fd_set *' 'int *'; do
21563 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
21564 for tmo in 'struct timeval *' 'const struct timeval *'; do
21566 '') try="$extern_C select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
21567 if ./protochk "$try" $hdrs; then
21568 echo "Your system accepts $xxx."
21577 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
21578 case "$d_fd_set" in
21579 $define) dflt="fd_set *" ;;
21588 *) : no select, so pick a harmless default
21595 : check for the select 'width'
21596 case "$selectminbits" in
21597 '') safebits=`expr $ptrsize \* 8`
21598 case "$d_select" in
21602 Checking to see on how many bits at a time your select() operates...
21605 #include <sys/types.h>
21607 #$i_systime I_SYS_TIME
21608 #$i_systimek I_SYS_TIME_KERNEL
21613 # ifdef I_SYS_TIME_KERNEL
21616 # include <sys/time.h>
21617 # ifdef I_SYS_TIME_KERNEL
21621 #$i_sysselct I_SYS_SELECT
21622 #ifdef I_SYS_SELECT
21623 #include <sys/select.h>
21625 #$d_socket HAS_SOCKET
21627 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
21630 #$i_stdlib I_STDLIB
21632 #include <stdlib.h>
21635 #define S sizeof(*(b))
21637 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
21638 #define NBITS (NBYTES * 8)
21640 char *s = (char *)malloc(NBYTES);
21649 fp = fopen("try.c", "r");
21655 b = ($selecttype)s;
21656 for (i = 0; i < NBITS; i++)
21660 select(fd + 1, b, 0, 0, &t);
21661 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
21663 printf("%d\n", i + 1);
21668 if eval $compile_ok; then
21669 selectminbits=`$run ./try 2>/dev/null`
21670 case "$selectminbits" in
21672 Cannot figure out on how many bits at a time your select() operates.
21673 I'll play safe and guess it is $safebits bits.
21675 selectminbits=$safebits
21676 bits="$safebits bits"
21679 *) bits="$selectminbits bits" ;;
21681 echo "Your select() operates on $bits at a time." >&4
21683 rp='What is the minimum number of bits your select() operates on?'
21684 case "$byteorder" in
21685 12345678) dflt=64 ;;
21691 selectminbits="$val"
21695 *) : no select, so pick a harmless default
21696 selectminbits=$safebits
21702 : Trace out the files included by signal.h, then look for SIGxxx names.
21703 if [ "X$fieldn" = X ]; then
21704 : Just make some guesses. We check them later.
21705 xxx="$sysroot/usr/include/signal.h $sysroot/usr/include/sys/signal.h"
21707 xxx=`echo '#include <signal.h>' |
21708 $cppstdin $cppminus $cppflags 2>/dev/null |
21709 $grep '^[ ]*#.*include' |
21710 $awk "{print \\$$fieldn}" | $sed 's!"!!g' |\
21711 $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
21714 for xx in $xxx /dev/null ; do
21715 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
21717 case "$xxxfiles" in
21718 '') xxxfiles=`./findhdr signal.h` ;;
21721 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
21722 print substr($2, 4, 20)
21724 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
21725 print substr($3, 4, 20)
21727 : Append some common names just in case the awk scan failed.
21728 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
21729 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
21730 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
21731 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
21732 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
21734 : generate a few handy files for later
21735 $cat > signal.c <<EOCP
21736 #include <sys/types.h>
21737 #include <signal.h>
21738 #$i_stdlib I_STDLIB
21740 #include <stdlib.h>
21745 /* Strange style to avoid deeply-nested #if/#else/#endif */
21748 # define NSIG (_NSIG)
21754 # define NSIG (SIGMAX+1)
21760 # define NSIG (SIG_MAX+1)
21766 # define NSIG (_SIG_MAX+1)
21772 # define NSIG (MAXSIG+1)
21778 # define NSIG (MAX_SIG+1)
21783 # ifdef SIGARRAYSIZE
21784 # define NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */
21790 # define NSIG (_sys_nsig) /* Solaris 2.5 */
21794 /* Default to some arbitrary number that's big enough to get most
21795 of the common signals.
21801 printf("NSIG %d\n", NSIG);
21807 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
21809 printf "#ifdef SIG"; printf $1; printf "\n"
21810 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
21811 printf $1; printf ");\n"
21815 printf "#endif /* JUST_NSIG */\n";
21816 printf "exit(0);\n}\n";
21819 $cat >signal.awk <<'EOP'
21820 BEGIN { ndups = 0 }
21821 $1 ~ /^NSIG$/ { nsig = $2 }
21822 ($1 !~ /^NSIG$/) && (NF == 2) && ($2 ~ /^[0-9][0-9]*$/) {
21823 if ($2 > maxsig) { maxsig = $2 }
21824 if (sig_name[$2]) {
21825 dup_name[ndups] = $1
21826 dup_num[ndups] = $2
21838 printf("NSIG %d\n", nsig);
21839 for (n = 1; n < nsig; n++) {
21841 printf("%s %d\n", sig_name[n], sig_num[n])
21844 printf("NUM%d %d\n", n, n)
21847 for (n = 0; n < ndups; n++) {
21848 printf("%s %d\n", dup_name[n], dup_num[n])
21852 $cat >signal_cmd <<EOS
21854 if $test -s signal.lst; then
21855 echo "Using your existing signal.lst file"
21860 $cat >>signal_cmd <<'EOS'
21863 if eval $compile_ok; then
21864 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) |\
21865 $uniq | $awk -f signal.awk >signal.lst
21867 echo "(I can't seem be able to compile the whole test program)" >&4
21868 echo "(I'll try it in little pieces.)" >&4
21869 set signal -DJUST_NSIG
21870 if eval $compile_ok; then
21871 $run ./signal$_exe > signal.nsg
21874 echo "I can't seem to figure out how many signals you have." >&4
21875 echo "Guessing 50." >&4
21876 echo 'NSIG 50' > signal.nsg
21878 : Now look at all the signal names, one at a time.
21879 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
21880 $cat > signal.c <<EOCP
21881 #include <sys/types.h>
21882 #include <signal.h>
21885 printf("$xx %d\n", SIG${xx});
21890 if eval $compile; then
21891 echo "SIG${xx} found."
21892 $run ./signal$_exe >> signal.ls1
21894 echo "SIG${xx} NOT found."
21897 if $test -s signal.ls1; then
21898 $cat signal.nsg signal.ls1 |
21899 $sort -n | $uniq | $awk -f signal.awk >signal.lst
21903 if $test -s signal.lst; then
21906 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
21907 echo 'kill -l' >signal
21908 set X `csh -f <signal`
21912 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
21914 echo $@ | $tr ' ' $trnl | \
21915 $awk '{ printf "%s %d\n", $1, ++s; }
21916 END { printf "NSIG %d\n", ++s }' >signal.lst
21918 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
21920 chmod a+x signal_cmd
21921 $eunicefix signal_cmd
21923 : generate list of signal names
21925 case "$sig_name_init" in
21927 *) case "$sig_num_init" in
21928 ''|*,*) doinit=yes ;;
21933 echo "Generating a list of signal names and numbers..." >&4
21935 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
21936 sig_name=`$awk 'BEGIN { printf "ZERO " }
21937 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
21938 sig_num=`$awk 'BEGIN { printf "0 " }
21939 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
21940 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
21941 !/^NSIG/ { printf "\"%s\", ", $1 }
21942 END { printf "0\n" }' signal.lst`
21943 sig_num_init=`$awk 'BEGIN { printf "0, " }
21944 !/^NSIG/ { printf "%d, ", $2}
21945 END { printf "0\n"}' signal.lst`
21948 echo "The following $sig_count signals are available:"
21950 echo $sig_name | $awk \
21951 'BEGIN { linelen = 0 }
21953 for (i = 1; i <= NF; i++) {
21954 name = "SIG" $i " "
21955 linelen = linelen + length(name)
21956 if (linelen > 70) {
21958 linelen = length(name)
21964 sig_size=`echo $sig_name | awk '{print NF}'`
21965 $rm -f signal signal.c signal.awk signal.lst signal_cmd
21967 : Check size of size
21969 case "$sizetype" in
21970 *_t) zzz="$sizetype" ;;
21971 *) zzz="filesize" ;;
21973 echo "Checking the size of $zzz..." >&4
21975 #include <sys/types.h>
21977 #$i_stdlib I_STDLIB
21979 #include <stdlib.h>
21982 printf("%d\n", (int)sizeof($sizetype));
21987 if eval $compile_ok; then
21991 echo "(I can't execute the test program--guessing $sizesize.)" >&4
21994 echo "Your $zzz size is $sizesize bytes."
21999 echo "(I can't compile the test program--guessing $sizesize.)" >&4
22003 : check for socklen_t
22005 echo "Checking to see if you have socklen_t..." >&4
22007 #include <sys/types.h>
22008 #$d_socket HAS_SOCKET
22010 #include <sys/socket.h>
22012 int main() { socklen_t x = 16; }
22015 if eval $compile; then
22017 echo "You have socklen_t."
22020 echo "You do not have socklen_t."
22021 case "$sizetype" in
22022 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
22029 : see if this is a socks.h system
22030 set socks.h i_socks
22033 : check for type of the size argument to socket calls
22034 case "$d_socket" in
22038 Checking to see what type is the last argument of accept().
22041 case "$d_socklen_t" in
22042 "$define") yyy="$yyy socklen_t"
22044 yyy="$yyy $sizetype int long unsigned"
22045 for xxx in $yyy; do
22046 case "$socksizetype" in
22047 '') try="$extern_C int accept(int, struct sockaddr *, $xxx *);"
22048 case "$usesocks" in
22050 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
22051 echo "Your system accepts '$xxx *' for the last argument of accept()."
22052 socksizetype="$xxx"
22055 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
22056 echo "Your system accepts '$xxx *' for the last argument of accept()."
22057 socksizetype="$xxx"
22064 : In case none of those worked, prompt the user.
22065 case "$socksizetype" in
22066 '') rp='What is the type for socket address structure sizes?'
22073 *) : no sockets, so pick relatively harmless default
22078 : see what type is used for signed size_t
22079 set ssize_t ssizetype int stdio.h sys/types.h
22084 #$i_stdlib I_STDLIB
22086 #include <stdlib.h>
22088 #include <sys/types.h>
22089 #define Size_t $sizetype
22090 #define SSize_t $dflt
22093 if (sizeof(Size_t) == sizeof(SSize_t))
22095 else if (sizeof(Size_t) == sizeof(int))
22104 if eval $compile_ok && $run ./try > /dev/null; then
22105 ssizetype=`$run ./try`
22106 echo "I'll be using $ssizetype for functions returning a byte count." >&4
22109 Help! I can't compile and run the ssize_t test program: please enlighten me!
22110 (This is probably a misconfiguration in your system or libraries, and
22111 you really ought to fix it. Still, I'll try anyway.)
22113 I need a type that is the same size as $sizetype, but is guaranteed to
22114 be signed. Common values are ssize_t, int and long.
22117 rp="What signed type is the same size as $sizetype?"
22123 : Check the size of st_ino
22125 $echo "Checking the size of st_ino..." >&4
22126 $cat > try.c <<EOCP
22127 #include <sys/stat.h>
22129 #$i_stdlib I_STDLIB
22131 #include <stdlib.h>
22135 printf("%d\n", (int)sizeof(st.st_ino));
22140 if eval $compile_ok; then
22144 $echo "(I can't execute the test program--guessing $st_ino_size.)" >&4
22146 *) st_ino_size=$val
22147 $echo "Your st_ino is $st_ino_size bytes long."
22152 $echo "(I can't compile the test program--guessing $st_ino_size.)" >&4
22156 : Check if st_ino is signed
22158 $echo "Checking the sign of st_ino..." >&4
22159 $cat > try.c <<EOCP
22160 #include <sys/stat.h>
22165 if (foo.st_ino < 0)
22172 if eval $compile; then
22176 $echo "(I can't execute the test program--guessing unsigned.)" >&4
22178 *) st_ino_sign=$val
22179 case "$st_ino_sign" in
22180 1) $echo "Your st_ino is unsigned." ;;
22181 -1) $echo "Your st_ino is signed." ;;
22187 $echo "(I can't compile the test program--guessing unsigned.)" >&4
22191 : see what type of char stdio uses.
22193 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
22194 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
22195 echo "Your stdio uses unsigned chars." >&4
22196 stdchar="unsigned char"
22198 echo "Your stdio uses signed chars." >&4
22203 : see what type uids are declared as in the kernel
22205 echo "Looking for the type for user ids returned by getuid()."
22206 set uid_t uidtype xxx stdio.h sys/types.h
22210 xxx=`./findhdr sys/user.h`
22211 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
22213 unsigned) dflt="$1 $2" ;;
22217 *) dflt="$uidtype";;
22220 uid_t) echo "uid_t found." ;;
22221 *) rp="What is the type for user ids returned by getuid()?"
22227 : Check size of UID
22230 *_t) zzz="$uidtype" ;;
22233 echo "Checking the size of $zzz..." >&4
22235 #include <sys/types.h>
22237 #$i_stdlib I_STDLIB
22239 #include <stdlib.h>
22242 printf("%d\n", (int)sizeof($uidtype));
22247 if eval $compile_ok; then
22251 echo "(I can't execute the test program--guessing $uidsize.)" >&4
22254 echo "Your $zzz is $uidsize bytes long."
22259 echo "(I can't compile the test program--guessing $uidsize.)" >&4
22262 : Check if UID is signed
22265 *_t) zzz="$uidtype" ;;
22268 echo "Checking the sign of $zzz..." >&4
22270 #include <sys/types.h>
22281 if eval $compile; then
22285 echo "(I can't execute the test program--guessing unsigned.)" >&4
22289 1) echo "Your $zzz is unsigned." ;;
22290 -1) echo "Your $zzz is signed." ;;
22296 echo "(I can't compile the test program--guessing unsigned.)" >&4
22300 : Check format string for UID
22302 $echo "Checking the format string to be used for uids..." >&4
22305 -1) if $test X"$uidsize" = X"$ivsize"; then
22306 uidformat="$ivdformat"
22308 if $test X"$uidsize" = X"$longsize"; then
22311 if $test X"$uidsize" = X"$intsize"; then
22314 if $test X"$uidsize" = X"$shortsize"; then
22321 *) if $test X"$uidsize" = X"$uvsize"; then
22322 uidformat="$uvuformat"
22324 if $test X"$uidsize" = X"$longsize"; then
22327 if $test X"$uidsize" = X"$intsize"; then
22330 if $test X"$uidsize" = X"$shortsize"; then
22339 : Determine if we can use sysctl with KERN_PROC_PATHNAME to find executing program
22341 echo "Determining whether we can use sysctl with KERN_PROC_PATHNAME to find executing program..." >&4
22342 $cat >try.c <<'EOM'
22343 /* Intentionally a long probe as I'd like to sanity check that the exact
22344 approach is going to work, as thinking it will work, but only having it
22345 part working at runtime is worse than not having it. */
22347 #include <sys/types.h>
22348 #include <sys/sysctl.h>
22349 #include <sys/param.h>
22351 #include <string.h>
22352 #include <stdlib.h>
22353 #include <unistd.h>
22356 main(int argc, char **argv) {
22358 char *argv_leaf = strrchr(argv[0], '/');
22364 mib[1] = KERN_PROC;
22365 mib[2] = KERN_PROC_PATHNAME;
22369 fprintf(stderr, "Can't locate / in '%s'\n", argv[0]);
22373 if (sysctl(mib, 4, NULL, &size, NULL, 0)) {
22378 if (size < strlen(argv_leaf) + 1) {
22379 fprintf(stderr, "size %lu is too short for a path\n",
22380 (unsigned long) size);
22384 if (size > MAXPATHLEN * MAXPATHLEN) {
22385 fprintf(stderr, "size %lu is too long for a path\n",
22386 (unsigned long) size);
22390 buffer = malloc(size);
22396 if (sysctl(mib, 4, buffer, &size, NULL, 0)) {
22401 if (strlen(buffer) + 1 != size) {
22402 fprintf(stderr, "size != strlen(buffer) + 1 (%lu != %lu)\n",
22403 (unsigned long)size, (unsigned long)strlen(buffer) + 1);
22408 if (*buffer != '/') {
22409 fprintf(stderr, "Not an absolute path: '%s'\n", buffer);
22413 if (strstr(buffer, "/./")) {
22414 fprintf(stderr, "Contains /./: '%s'\n", buffer);
22418 if (strstr(buffer, "/../")) {
22419 fprintf(stderr, "Contains /../: '%s'\n", buffer);
22423 buffer_leaf = strrchr(buffer, '/');
22424 if (strcmp(buffer_leaf, argv_leaf) != 0) {
22425 fprintf(stderr, "Leafnames differ: '%s' vs '%s'\n", argv[0], buffer);
22437 if eval $compile; then
22438 if $run ./try; then
22439 echo "You can use sysctl with KERN_PROC_PATHNAME to find the executing program." >&4
22442 echo "Nope, sysctl with KERN_PROC_PATHNAME doesn't work here." >&4
22446 echo "I'm unable to compile the test program." >&4
22447 echo "I'll assume no sysctl with KERN_PROC_PATHNAME here." >&4
22451 set usekernprocpathname
22454 : Determine if we can use _NSGetExecutablePath to find executing program
22456 echo "Determining whether we can use _NSGetExecutablePath to find executing program..." >&4
22457 $cat >try.c <<'EOM'
22458 /* Intentionally a long probe as I'd like to sanity check that the exact
22459 approach is going to work, as thinking it will work, but only having it
22460 part working at runtime is worse than not having it. */
22461 #include <mach-o/dyld.h>
22463 #include <stdlib.h>
22464 #include <sys/param.h>
22465 #include <string.h>
22468 main(int argc, char **argv) {
22470 uint32_t size = sizeof(buf);
22474 char *argv_leaf = strrchr(argv[0], '/');
22478 fprintf(stderr, "Can't locate / in '%s'\n", argv[0]);
22482 _NSGetExecutablePath(buf, &size);
22483 if (size > MAXPATHLEN * MAXPATHLEN) {
22484 fprintf(stderr, "_NSGetExecutablePath size %u is too long for a path\n",
22485 (unsigned int) size);
22489 buffer = malloc(size);
22495 result = _NSGetExecutablePath(buffer, &size);
22497 fprintf(stderr, "_NSGetExecutablePath returned %i for a size of %u\n",
22498 result, (unsigned int) size);
22502 tidied = realpath(buffer, NULL);
22504 perror("realpath");
22510 if (*tidied != '/') {
22511 fprintf(stderr, "Not an absolute path: '%s'\n", tidied);
22515 if (strstr(tidied, "/./")) {
22516 fprintf(stderr, "Contains /./: '%s'\n", tidied);
22520 if (strstr(tidied, "/../")) {
22521 fprintf(stderr, "Contains /../: '%s'\n", tidied);
22525 tidied_leaf = strrchr(tidied, '/');
22526 if (strcmp(tidied_leaf, argv_leaf) != 0) {
22527 fprintf(stderr, "Leafnames differ: '%s' vs '%s'\n", argv[0], tidied);
22539 if eval $compile; then
22540 if $run ./try; then
22541 echo "You can use _NSGetExecutablePath to find the executing program." >&4
22544 echo "Nope, _NSGetExecutablePath doesn't work here." >&4
22547 echo "I'm unable to compile the test program." >&4
22548 echo "I'll assume no _NSGetExecutablePath here." >&4
22551 set usensgetexecutablepath
22554 : Check if site customization support was requested
22555 case "$usesitecustomize" in
22556 $define|true|[Yy]*)
22557 usesitecustomize="$define"
22560 usesitecustomize="$undef"
22564 : see if prototypes support variable argument declarations
22566 case "$prototype$i_stdarg" in
22568 echo "It appears we'll be able to prototype varargs functions." >&4
22572 echo "Too bad... We won't be using prototyped varargs functions..." >&4
22579 : determine compiler compiler
22588 if $test -f "$byacc$_exe"; then
22590 comp="byacc or $comp"
22592 if $test -f "$bison$_exe"; then
22593 comp="$comp or bison -y"
22595 rp="Which compiler compiler ($comp) shall I use?"
22604 echo "(Adding -y option to bison to get yacc-compatible behavior.)"
22610 : see if this is a assert.h system
22611 set assert.h i_assert
22614 : see if this is a bfd.h system
22618 : see if this is an execinfo.h system
22619 set execinfo.h i_execinfo
22622 : see if this is a fenv.h system
22626 : see if this is a fp.h system
22630 : see if this is a fp_class.h system
22631 set fp_class.h i_fp_class
22634 : see if gdbm.h is available
22639 : see if gdbm_open exists
22640 set gdbm_open d_gdbm_open
22642 case "$d_gdbm_open" in
22645 echo "We won't be including <gdbm.h>"
22654 : see if this is a ieeefp.h system
22655 case "$i_ieeefp" in
22656 '' ) set ieeefp.h i_ieeefp
22661 : see if this is a libutil.h system
22662 set libutil.h i_libutil
22665 : see if mach cthreads are available
22666 if test "X$usethreads" = "X$define"; then
22667 set mach/cthreads.h i_machcthr
22670 i_machcthr="$undef"
22673 : see if this is a mntent.h system
22674 set mntent.h i_mntent
22677 : see if net/errno.h is available
22679 set net/errno.h val
22682 : Unfortunately, it causes problems on some systems. Arrgh.
22685 cat > try.c <<'EOM'
22688 #include <net/errno.h>
22694 if $cc $ccflags -c try.c >/dev/null 2>&1; then
22695 echo "We'll be including <net/errno.h>." >&4
22697 echo "We won't be including <net/errno.h>." >&4
22706 : see if netinet/tcp.h is available
22707 set netinet/tcp.h i_netinettcp
22710 : see if this is a poll.h system
22714 : see if this is a prot.h system
22718 : Preprocessor symbols
22720 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
22721 $cat <<'EOSH' > Cppsym.know
22722 a29k aarch64 ABI64 aegis AES_SOURCE AIX AIX32 AIX370 AIX41 AIX42
22723 AIX43 aixpc AIX_SOURCE alliant ALL_SOURCE alpha AM29000 am29000
22724 AMD64 amd64 amiga AMIGAOS AMIX ansi ANSI_C_SOURCE apollo arch_ppc
22725 arch_pwr ardent ARM ARM32 atarist att386 att3b
22726 BeOS BIG_ENDIAN BIT_MSF BSD bsd bsd43 bsd4_2 BSD4_3 bsd4_3 bsd4_4
22727 BSDCOMPAT bsdi BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES bull
22728 byteorder byte_order
22729 c cadmus clang clipper CMU COFF COMPILER_VERSION concurrent
22730 convex cpu CRAY cray CRAYMPP ctix CX_UX CYGWIN
22731 DECC DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO Dynix DynixPTX
22732 ELF encore EPI EXTENSIONS
22733 FAVOR_BSD FILE_OFFSET_BITS FORTIFY_SOURCE FreeBSD
22734 GCC_NEW_VARARGS gcos gcx gimpel GLIBC GLIBC_MINOR GNUC GNUC_MINOR
22735 GNU_LIBRARY GNU_SOURCE GO32 gould GOULD_PN
22736 H3050R H3050RX hbullx20 hcx host_mips hp200 hp300 HP700 hp700
22737 hp800 hp9000 hp9000s200 hp9000s300 hp9000s400 hp9000s500
22738 hp9000s700 hp9000s800 hp9k8 hppa hpux HPUX_SOURCE hp_osf
22739 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960 IA32 IA64
22740 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
22741 INLINE_INTRINSICS INT64 INTEL interdata INTRINSICS is68k itanium
22743 LANGUAGE_C LARGEFILE64_SOURCE LARGEFILE_SOURCE LARGE_FILE_API
22744 LFS64_LARGEFILE LFS_LARGEFILE LIBCATAMOUNT Linux LITTLE_ENDIAN
22745 LONG64 LONGDOUBLE LONGLONG LONG_DOUBLE LONG_LONG LP64 luna
22747 M68000 m68k m88100 m88k M88KBCS_TARGET MACH machine MachTen
22748 MATH_HAS_NO_SIDE_EFFECTS mc300 mc500 mc68000 mc68010 mc68020
22749 mc68030 mc68040 mc68060 mc68k mc68k32 mc700 mc88000 mc88100
22750 merlin mert MiNT mips MIPSEB MIPSEL MIPS_FPSET MIPS_ISA MIPS_SIM
22751 MIPS_SZINT MIPS_SZLONG MIPS_SZPTR MODERN_C motorola mpeix MSDOS
22752 MTXINU MULTIMAX MVS mvs M_AMD64 M_ARM M_ARMT M_COFF M_I186 M_I286
22753 M_I386 M_I8086 M_I86 M_I86SM M_IA64 M_IX86 M_PPC M_SYS3 M_SYS5
22754 M_SYSIII M_SYSV M_UNIX M_X86 M_XENIX
22755 n16 ncl_el ncl_mr NetBSD news1500 news1700 news1800 news1900
22756 news3700 news700 news800 news900 NeXT NLS nonstopux ns16000
22757 ns32000 ns32016 ns32332 ns32k nsc32000
22758 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
22759 PARAGON parisc pa_risc PA_RISC1_1 PA_RISC2_0 pc532 pdp11 PGC PIC
22760 plexus PORTAR posix POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
22761 POSIX_C_SOURCE POSIX_SOURCE POWER powerpc ppc PROTOTYPES PWB pyr
22763 R3000 REENTRANT RES Rhapsody RISC6000 riscix riscos RT
22764 S390 S390x SA110 SCO scs sequent sgi SGI_SOURCE SH SH3 sinix
22765 SIZE_INT SIZE_LONG SIZE_PTR SOCKETS_SOURCE SOCKET_SOURCE sony
22766 sonyrisc sony_news sparc sparclite sparcv8 sparcv9 spectrum
22767 stardent stdc STDC_EXT stratos sun sun3 sun386 Sun386i svr3 svr4
22768 SVR4_2 SVR4_SOURCE svr5 SX system SYSTYPE_BSD SYSTYPE_BSD43
22769 SYSTYPE_BSD44 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3
22770 SYSV4 SYSV5 sysV68 sysV88
22771 Tek4132 Tek4300 thumb thw_370 thw_intel thw_rs6000 titan TM3200
22772 TM5400 TM5600 tower tower32 tower32_200 tower32_600 tower32_700
22773 tower32_800 tower32_850 tss
22774 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5 ultrix UMAXV UnicomPBB
22775 UnicomPBD UNICOS UNICOSMK unix UNIX95 UNIX99 unixpc unos USE_BSD
22776 USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE
22777 USE_LARGEFILE64 USE_MISC USE_POSIX USE_POSIX199309
22778 USE_POSIX199506 USE_POSIX2 USE_REENTRANT USE_SVID USE_UNIX98
22779 USE_XOPEN USE_XOPEN_EXTENDED USGr4 USGr4_2 UTek Utek UTS UWIN
22781 vax venix VMESA vms
22782 x86_64 xenix Xenix286 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2
22783 XPG2_EXTENDED XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
22786 # Maybe put other stuff here too.
22787 ./tr '-' '_' <<EOSH >>Cppsym.know
22790 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
22791 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
22792 $cat Cppsym.know > Cppsym.c
22793 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
22794 $rm -f Cppsym.a Cppsym.b Cppsym.c
22795 cat <<EOSH > Cppsym
22797 if $test \$# -gt 0; then
22798 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
22799 if $test -s Cppsym.got; then
22806 $tr " " "$trnl" | ./Cppsym.try
22812 cat <<EOSH > Cppsym.try
22814 cat <<'EOCP' > try.c
22817 #define STRINGIFY(a) "a"
22819 #if cpp_stuff == 42
22820 #define StGiFy(a) #a
22821 #define STRINGIFY(a) StGiFy(a)
22823 #if $cpp_stuff != 1 && $cpp_stuff != 42
22824 # include "Bletch: How does this C preprocessor stringify macros?"
22830 cat <<'EOSH' >> Cppsym.try
22832 printf "#ifdef %s\nprintf(\"%s=%%s\\n\", STRINGIFY(%s));\n#endif\n", $1, $1, $1
22833 printf "#ifdef _%s\nprintf(\"_%s=%%s\\n\", STRINGIFY(_%s));\n#endif\n", $1, $1, $1
22834 printf "#ifdef __%s\nprintf(\"__%s=%%s\\n\", STRINGIFY(__%s));\n#endif\n", $1, $1, $1
22835 printf "#ifdef __%s__\nprintf(\"__%s__=%%s\\n\", STRINGIFY(__%s__));\n#endif\n", $1, $1, $1
22837 echo 'return 0;}' >> try.c
22839 cat <<EOSH >> Cppsym.try
22841 case "$osname-$gccversion" in
22842 irix-) ccflags="\$ccflags -woff 1178" ;;
22843 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
22845 $cc -o try -Dcpp_stuff=$cpp_stuff $optimize \$ccflags $ldflags try.c $libs && $run ./try | $sed 's/ /\\\\ /g'
22847 chmod +x Cppsym.try
22848 $eunicefix Cppsym.try
22849 ./Cppsym < Cppsym.know | $sort | $uniq > Cppsym.true
22850 : Add in any Linux cpp "predefined macros":
22851 case "$osname::$gccversion" in
22852 *linux*::*.*|*gnukfreebsd*::*.*|gnu::*.*)
22854 rm -f $tHdrH'.h' $tHdrH
22856 # Filter out macro arguments, such as Linux's __INT8_C(c)
22857 if $cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
22858 sed -e 's/#define[\ \ ]*//;s/[\ \ ].*$//' -e 's/(.*//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
22859 if [ -s $tHdrH'_cppsym.real' ]; then
22860 cat $tHdrH'_cppsym.real' Cppsym.know | sort | uniq | ./Cppsym | sort | uniq > Cppsym.true
22863 rm -f $tHdrH'.h' $tHdrH'_cppsym.h' $tHdrH'_cppsym.real'
22866 : now check the C compiler for additional symbols
22867 postprocess_cc_v=''
22869 aix) postprocess_cc_v="|$tr , ' '" ;;
22876 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
22879 -D*) echo "\$i" | $sed 's/^-D//';;
22880 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
22885 postprocess_cc_v=''
22888 ./ccsym > ccsym1.raw
22889 if $test -s ccsym1.raw; then
22890 $sort ccsym1.raw | $uniq >ccsym.raw
22892 mv ccsym1.raw ccsym.raw
22895 $awk '/\=/ { print $0; next }
22896 { print $0"=1" }' ccsym.raw >ccsym.list
22897 $comm -13 Cppsym.true ccsym.list >ccsym.own
22898 $comm -12 Cppsym.true ccsym.list >ccsym.com
22899 $comm -23 Cppsym.true ccsym.list >ccsym.cpp
22901 if $test -z ccsym.raw; then
22902 echo "Your C compiler doesn't seem to define any symbols!" >&4
22904 echo "However, your C preprocessor defines the following symbols:"
22907 cppsymbols=`$cat Cppsym.true`
22908 cppsymbols=`echo $cppsymbols`
22909 cppccsymbols="$cppsymbols"
22911 if $test -s ccsym.com; then
22912 echo "Your C compiler and pre-processor define these symbols:"
22913 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
22916 cppccsymbols=`$cat ccsym.com`
22917 cppccsymbols=`echo $cppccsymbols`
22918 $test "$silent" || sleep 1
22920 if $test -s ccsym.cpp; then
22921 $test "$also" && echo " "
22922 echo "Your C pre-processor ${also}defines the following symbols:"
22923 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
22925 cppsymbols=`$cat ccsym.cpp`
22926 cppsymbols=`echo $cppsymbols`
22927 $test "$silent" || sleep 1
22929 if $test -s ccsym.own; then
22930 $test "$also" && echo " "
22931 echo "Your C compiler ${also}defines the following cpp symbols:"
22932 $sed -e 's/\(..*\)=1/\1/' ccsym.own
22933 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
22934 ccsymbols=`$cat ccsym.own`
22935 ccsymbols=`echo $ccsymbols`
22936 $test "$silent" || sleep 1
22940 : add -D_FORTIFY_SOURCE if feasible and not already there
22941 case "$gccversion" in
22942 4.*) case "$optimize$ccflags" in
22943 *-O*) case "$ccflags$cppsymbols" in
22944 *_FORTIFY_SOURCE=*) # Don't add it again.
22945 echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4
22947 *) echo "Adding -D_FORTIFY_SOURCE=2 to ccflags..." >&4
22948 ccflags="$ccflags -D_FORTIFY_SOURCE=2"
22952 *) echo "You have gcc 4.* but not optimizing, not adding -D_FORTIFY_SOURCE." >&4
22956 *) echo "You seem not to have gcc 4.*, not adding -D_FORTIFY_SOURCE." >&4
22960 : see if this is a termio system
22964 if $test `./findhdr termios.h`; then
22965 set tcsetattr i_termios
22971 "$define") echo "You have POSIX termios.h... good!" >&4;;
22972 *) if ./Cppsym pyr; then
22973 case "`$run /bin/universe`" in
22974 ucb) if $test `./findhdr sgtty.h`; then
22976 echo "<sgtty.h> found." >&4
22978 echo "System is pyramid with BSD universe."
22979 ./warn "<sgtty.h> not found--you could have problems."
22981 *) if $test `./findhdr termio.h`; then
22983 echo "<termio.h> found." >&4
22985 echo "System is pyramid with USG universe."
22986 ./warn "<termio.h> not found--you could have problems."
22990 if $test `./findhdr termio.h`; then
22991 echo "<termio.h> found." >&4
22993 elif $test `./findhdr sgtty.h`; then
22994 echo "<sgtty.h> found." >&4
22997 ./warn "Neither <termio.h> nor <sgtty.h> found--cross fingers!"
23000 if $test `./findhdr sgtty.h`; then
23001 echo "<sgtty.h> found." >&4
23003 elif $test `./findhdr termio.h`; then
23004 echo "<termio.h> found." >&4
23007 ./warn "Neither <sgtty.h> nor <termio.h> found--cross fingers!"
23011 set i_termio; eval $setvar
23012 val=$val2; set i_sgtty; eval $setvar
23013 val=$val3; set i_termios; eval $setvar
23015 : see if stdbool is available
23016 : we want a real compile instead of Inhdr because some Solaris systems
23017 : have stdbool.h, but it can only be used if the compiler indicates it
23018 : is sufficiently c99-compliant.
23022 #include <stdbool.h>
23027 int main(int argc, char **argv)
23033 if eval $compile; then
23034 echo "<stdbool.h> found." >&4
23037 echo "<stdbool.h> NOT found." >&4
23044 : see if stddef is available
23045 set stddef.h i_stddef
23048 : see if stdint is available
23049 set stdint.h i_stdint
23052 : see if sys/access.h is available
23053 set sys/access.h i_sysaccess
23056 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
23057 set sys/filio.h i_sysfilio
23060 if $test `./findhdr sys/ioctl.h`; then
23062 echo '<sys/ioctl.h> found.' >&4
23065 if $test $i_sysfilio = "$define"; then
23066 echo '<sys/ioctl.h> NOT found.' >&4
23068 $test $i_sgtty = "$define" && xxx="sgtty.h"
23069 $test $i_termio = "$define" && xxx="termio.h"
23070 $test $i_termios = "$define" && xxx="termios.h"
23071 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
23077 : see if socket ioctl defs are in sys/sockio.h
23079 xxx=`./findhdr sys/sockio.h`
23080 if $test "$xxx"; then
23081 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
23083 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
23086 echo "No socket ioctls found in <sys/sockio.h>." >&4
23091 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
23097 : see if this is a syslog.h system
23098 set syslog.h i_syslog
23101 : see if this is a sys/mode.h system
23102 set sys/mode.h i_sysmode
23105 : see if there is a sys/poll.h file
23106 set sys/poll.h i_syspoll
23109 : see if sys/resource.h has to be included
23110 set sys/resource.h i_sysresrc
23113 : see if sys/security.h is available
23114 set sys/security.h i_syssecrt
23117 : see if this is a sys/statvfs.h system
23118 set sys/statvfs.h i_sysstatvfs
23121 : see if this is a sys/un.h system
23122 set sys/un.h i_sysun
23125 : see if this is a sys/utsname.h system
23126 set sys/utsname.h i_sysutsname
23129 : see if this is a syswait system
23130 set sys/wait.h i_syswait
23133 : see if this is a ustat.h system
23134 set ustat.h i_ustat
23137 : see if this is an utime system
23138 set utime.h i_utime
23141 : see if this is a vfork system
23144 set vfork.h i_vfork
23154 echo "Looking for extensions..." >&4
23155 : If we are using the old config.sh, nonxs_extensions and xs_extensions may
23156 : contain old or inaccurate or duplicate values.
23157 nonxs_extensions=''
23159 : We do not use find because it might not be available.
23160 : We do not just use MANIFEST because the user may have dropped
23161 : some additional extensions into the source tree and expect them
23164 : Function to recursively find available extensions, ignoring DynaLoader
23165 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
23166 : In 5.10.1 and later, extensions are stored in directories
23167 : like File-Glob instead of the older File/Glob/.
23171 DynaLoader|dynaload) ;;
23173 this_ext=`echo $xxx | $sed -e s/-/\\\//g`;
23174 case "$this_ext" in
23175 Scalar/List/Utils) this_ext="List/Util" ;;
23176 PathTools) this_ext="Cwd" ;;
23178 echo " $xs_extensions $nonxs_extensions" > $tdir/$$.tmp;
23179 if $contains " $this_ext " $tdir/$$.tmp; then
23181 echo "Duplicate directories detected for extension $xxx" >&4;
23182 echo "Configure cannot correctly recover from this - shall I abort?" >&4;
23183 case "$knowitall" in
23191 echo "Ok. Stopping Configure." >&4;
23192 echo "Please remove the duplicate directory (e.g. using git clean) and then re-run Configure" >&4;
23195 echo "Ok. You will need to correct config.sh before running make." >&4;
23197 $ls -1 $xxx > $tdir/$$.tmp;
23198 if $contains "\.xs$" $tdir/$$.tmp > /dev/null 2>&1; then
23199 xs_extensions="$xs_extensions $this_ext";
23200 elif $contains "\.c$" $tdir/$$.tmp > /dev/null 2>&1; then
23201 xs_extensions="$xs_extensions $this_ext";
23202 elif $test -d $xxx; then
23203 nonxs_extensions="$nonxs_extensions $this_ext";
23205 $rm -f $tdir/$$.tmp;
23213 eval $find_extensions
23217 eval $find_extensions
23221 eval $find_extensions
23222 set X $xs_extensions
23224 xs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
23225 set X $nonxs_extensions
23227 nonxs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
23229 known_extensions=`echo $nonxs_extensions $xs_extensions | tr ' ' $trnl | $sort | tr $trnl ' '`
23231 : Now see which are supported on this system.
23233 for xxx in $xs_extensions ; do
23237 $define) avail_ext="$avail_ext $xxx" ;;
23240 GDBM_File|gdbm_fil)
23242 $define) avail_ext="$avail_ext $xxx" ;;
23245 I18N/Langinfo|i18n_lan)
23246 case "$i_langinfo$d_nl_langinfo" in
23247 $define$define) avail_ext="$avail_ext $xxx" ;;
23251 : XXX Do we need a useipcsysv variable here
23252 case "${d_msg}${d_sem}${d_shm}" in
23253 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
23256 NDBM_File|ndbm_fil)
23259 case "$osname-$use64bitint" in
23262 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
23265 *) avail_ext="$avail_ext $xxx" ;;
23270 ODBM_File|odbm_fil)
23271 case "${i_dbm}${i_rpcsvcdbm}" in
23273 case "$d_cplusplus" in
23274 define) ;; # delete as a function name will not work
23275 *) case "$osname-$use64bitint" in
23278 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
23281 *) avail_ext="$avail_ext $xxx" ;;
23289 case "$useopcode" in
23290 true|define|y) avail_ext="$avail_ext $xxx" ;;
23294 case "$useposix" in
23295 true|define|y) avail_ext="$avail_ext $xxx" ;;
23299 case "$d_socket" in
23300 true|$define|y) avail_ext="$avail_ext $xxx" ;;
23303 Sys/Syslog|sys/syslog)
23304 : XXX syslog requires socket
23305 case "$d_socket" in
23306 true|$define|y) avail_ext="$avail_ext $xxx" ;;
23310 case "$usethreads" in
23312 case "$use5005threads" in
23313 $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;;
23317 threads|threads/shared)
23318 # threads and threads::shared are special cases.
23319 # To stop people from asking "Perl 5.8.0 was supposed
23320 # to have this new fancy threads implementation but my
23321 # perl doesn't have it" and from people trying to
23322 # (re)install the threads module using CPAN.pm and
23323 # CPAN.pm then offering to reinstall Perl 5.8.0,
23324 # the threads.pm and threads/shared.pm will always be
23325 # there, croaking informatively ("you need to rebuild
23326 # all of Perl with threads, sorry") when threads haven't
23327 # been compiled in.
23329 avail_ext="$avail_ext $xxx"
23335 cygwin) avail_ext="$avail_ext $xxx" ;;
23338 XS/APItest|xs/apitest)
23339 # This is just for testing. Skip it unless we have dynamic loading.
23342 $define) avail_ext="$avail_ext $xxx" ;;
23345 XS/Typemap|xs/typemap)
23346 # This is just for testing. Skip it unless we have dynamic loading.
23348 $define) avail_ext="$avail_ext $xxx" ;;
23351 *) avail_ext="$avail_ext $xxx"
23360 case "$onlyextensions" in
23362 *) keepextensions=''
23363 echo "You have requested that only certain extensions be included..." >&4
23364 for i in $onlyextensions; do
23365 case " $avail_ext " in
23367 echo "Keeping extension $i."
23368 keepextensions="$keepextensions $i"
23370 *) echo "Ignoring extension $i." ;;
23373 avail_ext="$keepextensions"
23377 case "$noextensions" in
23379 *) keepextensions=''
23380 echo "You have requested that certain extensions be ignored..." >&4
23381 for i in $avail_ext; do
23382 case " $noextensions " in
23383 *" $i "*) echo "Ignoring extension $i." ;;
23384 *) echo "Keeping extension $i.";
23385 keepextensions="$keepextensions $i"
23389 avail_ext="$keepextensions"
23393 : Now see which nonxs extensions are supported on this system.
23394 : For now assume all are.
23396 for xxx in $nonxs_extensions ; do
23400 *) nonxs_ext="$nonxs_ext $xxx"
23412 A number of extensions are supplied with $package. You may choose to
23413 compile these extensions for dynamic loading (the default), compile
23414 them into the $package executable (static loading), or not include
23415 them at all. Answer "none" to include no extensions.
23416 Note that DynaLoader is always built and need not be mentioned here.
23419 case "$dynamic_ext" in
23421 : Exclude those listed in static_ext
23423 for xxx in $avail_ext; do
23424 case " $static_ext " in
23426 *) dflt="$dflt $xxx" ;;
23433 *) dflt="$dynamic_ext"
23434 # Perhaps we are reusing an old out-of-date config.sh.
23437 if test X"$dynamic_ext" != X"$avail_ext"; then
23439 NOTICE: Your previous config.sh list may be incorrect.
23440 The extensions now available to you are
23442 but the default list from your previous config.sh is
23454 rp="What extensions do you wish to load dynamically?"
23457 none) dynamic_ext=' ' ;;
23458 *) dynamic_ext="$ans" ;;
23461 case "$static_ext" in
23463 : Exclude those already listed in dynamic linking
23465 for xxx in $avail_ext; do
23466 case " $dynamic_ext " in
23468 *) dflt="$dflt $xxx" ;;
23475 *) dflt="$static_ext"
23482 rp="What extensions do you wish to load statically?"
23485 none) static_ext=' ' ;;
23486 *) static_ext="$ans" ;;
23491 A number of extensions are supplied with $package. Answer "none"
23492 to include no extensions.
23493 Note that DynaLoader is always built and need not be mentioned here.
23496 case "$static_ext" in
23497 '') dflt="$avail_ext" ;;
23498 *) dflt="$static_ext"
23499 # Perhaps we are reusing an old out-of-date config.sh.
23502 if test X"$static_ext" != X"$avail_ext"; then
23504 NOTICE: Your previous config.sh list may be incorrect.
23505 The extensions now available to you are
23507 but the default list from your previous config.sh is
23516 : Exclude those that are not xs extensions
23520 rp="What extensions do you wish to include?"
23523 none) static_ext=' ' ;;
23524 *) static_ext="$ans" ;;
23529 # Encode is a special case. If we are building Encode as a static
23530 # extension, we need to explicitly list its subextensions as well.
23531 # For other nested extensions, this is handled automatically by
23532 # the appropriate Makefile.PL.
23533 case " $static_ext " in
23534 *" Encode "*) # Add the subextensions of Encode
23536 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
23537 static_ext="$static_ext Encode/$xxx"
23538 known_extensions="$known_extensions Encode/$xxx"
23544 set X $dynamic_ext $static_ext $nonxs_ext
23548 # Sanity check: We require an extension suitable for use with
23549 # AnyDBM_File, as well as Fcntl and IO. (Failure to have these
23550 # should show up as failures in the test suite, but it's helpful to
23551 # catch them now.) The 'extensions' list is normally sorted
23552 # alphabetically, so we need to accept either
23553 # DB_File ... Fcntl ... IO ....
23554 # or something like
23555 # Fcntl ... NDBM_File ... IO ....
23556 case " $extensions" in
23557 *"_File "*" Fcntl "*" IO "*) ;; # DB_File
23558 *" Fcntl "*"_File "*" IO "*) ;; # GDBM_File
23559 *" Fcntl "*" IO "*"_File "*) ;; # NDBM_File
23560 *) echo "WARNING: Extensions DB_File or *DBM_File, Fcntl, and IO not configured." >&4
23561 echo "WARNING: The Perl you are building will be quite crippled." >& 4
23565 : Remove libraries needed only for extensions
23566 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
23567 : The exception is SunOS 4.x, which needs them.
23568 case "${osname}X${osvers}" in
23572 *) case "$usedl" in
23573 $define|true|[yY]*)
23574 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
23578 *) perllibs="$libs"
23584 : Remove build directory name from cppstdin so it can be used from
23585 : either the present location or the final installed location.
23587 : Get out of the UU directory to get correct path name.
23589 case "$cppstdin" in
23591 echo "Stripping down cppstdin path name"
23597 : end of configuration questions
23599 echo "End of configuration questions."
23602 : back to where it started
23603 if test -d ../UU; then
23607 : configuration may be unconditionally patched via a 'config.arch' file
23608 if $test -f config.arch; then
23609 echo "I see a config.arch file, loading it." >&4
23613 : configuration may be patched via a 'config.over' file
23614 if $test -f config.over; then
23617 rp='I see a config.over file. Do you wish to load it?'
23620 n*) echo "OK, I'll ignore it.";;
23622 echo "Configuration override changes have been loaded."
23627 : in case they want portability, strip down executable paths
23628 case "$d_portable" in
23631 echo "Stripping down executable paths..." >&4
23632 for file in $loclist $trylist; do
23634 eval $file=`basename $temp`
23639 : create config.sh file
23641 echo "Creating config.sh..." >&4
23642 $spitshell <<EOT >config.sh
23645 # This file was produced by running the Configure script. It holds all the
23646 # definitions figured out by Configure. Should you modify one of these values,
23647 # do not forget to propagate your changes by running "Configure -der". You may
23648 # instead choose to run each of the .SH files by yourself, or "Configure -S".
23651 # Package name : $package
23652 # Source directory : $src
23653 # Configuration time: $cf_time
23654 # Configured by : $cf_by
23655 # Target system : $myuname
23658 : Add in command line options if available
23659 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
23661 $spitshell <<EOT >>config.sh
23670 Revision='$Revision'
23678 alignbytes='$alignbytes'
23679 ansi2knr='$ansi2knr'
23680 aphostname='$aphostname'
23681 api_revision='$api_revision'
23682 api_subversion='$api_subversion'
23683 api_version='$api_version'
23684 api_versionstring='$api_versionstring'
23687 archlibexp='$archlibexp'
23688 archname64='$archname64'
23689 archname='$archname'
23690 archobjs='$archobjs'
23691 asctime_r_proto='$asctime_r_proto'
23700 byteorder='$byteorder'
23702 castflags='$castflags'
23705 cccdlflags='$cccdlflags'
23706 ccdlflags='$ccdlflags'
23708 ccflags_uselargefiles='$ccflags_uselargefiles'
23710 ccsymbols='$ccsymbols'
23711 ccversion='$ccversion'
23713 cf_email='$cf_email'
23715 charbits='$charbits'
23716 charsize='$charsize'
23720 clocktype='$clocktype'
23722 compress='$compress'
23723 contains='$contains'
23727 cpp_stuff='$cpp_stuff'
23728 cppccsymbols='$cppccsymbols'
23729 cppflags='$cppflags'
23731 cppminus='$cppminus'
23733 cppstdin='$cppstdin'
23734 cppsymbols='$cppsymbols'
23735 crypt_r_proto='$crypt_r_proto'
23736 cryptlib='$cryptlib'
23738 ctermid_r_proto='$ctermid_r_proto'
23739 ctime_r_proto='$ctime_r_proto'
23740 d_Gconvert='$d_Gconvert'
23741 d_PRIEUldbl='$d_PRIEUldbl'
23742 d_PRIFUldbl='$d_PRIFUldbl'
23743 d_PRIGUldbl='$d_PRIGUldbl'
23744 d_PRIXU64='$d_PRIXU64'
23745 d_PRId64='$d_PRId64'
23746 d_PRIeldbl='$d_PRIeldbl'
23747 d_PRIfldbl='$d_PRIfldbl'
23748 d_PRIgldbl='$d_PRIgldbl'
23749 d_PRIi64='$d_PRIi64'
23750 d_PRIo64='$d_PRIo64'
23751 d_PRIu64='$d_PRIu64'
23752 d_PRIx64='$d_PRIx64'
23753 d_SCNfldbl='$d_SCNfldbl'
23754 d__fwalk='$d__fwalk'
23755 d_access='$d_access'
23756 d_accessx='$d_accessx'
23760 d_archlib='$d_archlib'
23761 d_asctime64='$d_asctime64'
23762 d_asctime_r='$d_asctime_r'
23767 d_attribute_deprecated='$d_attribute_deprecated'
23768 d_attribute_format='$d_attribute_format'
23769 d_attribute_malloc='$d_attribute_malloc'
23770 d_attribute_nonnull='$d_attribute_nonnull'
23771 d_attribute_noreturn='$d_attribute_noreturn'
23772 d_attribute_pure='$d_attribute_pure'
23773 d_attribute_unused='$d_attribute_unused'
23774 d_attribute_warn_unused_result='$d_attribute_warn_unused_result'
23775 d_backtrace='$d_backtrace'
23779 d_bsdgetpgrp='$d_bsdgetpgrp'
23780 d_bsdsetpgrp='$d_bsdsetpgrp'
23781 d_builtin_choose_expr='$d_builtin_choose_expr'
23782 d_builtin_expect='$d_builtin_expect'
23784 d_c99_variadic_macros='$d_c99_variadic_macros'
23785 d_casti32='$d_casti32'
23786 d_castneg='$d_castneg'
23788 d_charvspr='$d_charvspr'
23790 d_chroot='$d_chroot'
23791 d_chsize='$d_chsize'
23793 d_clearenv='$d_clearenv'
23794 d_closedir='$d_closedir'
23795 d_cmsghdr_s='$d_cmsghdr_s'
23797 d_copysign='$d_copysign'
23798 d_copysignl='$d_copysignl'
23799 d_cplusplus='$d_cplusplus'
23801 d_crypt_r='$d_crypt_r'
23803 d_ctermid='$d_ctermid'
23804 d_ctermid_r='$d_ctermid_r'
23805 d_ctime64='$d_ctime64'
23806 d_ctime_r='$d_ctime_r'
23807 d_cuserid='$d_cuserid'
23808 d_dbl_dig='$d_dbl_dig'
23809 d_dbminitproto='$d_dbminitproto'
23810 d_difftime64='$d_difftime64'
23811 d_difftime='$d_difftime'
23812 d_dir_dd_fd='$d_dir_dd_fd'
23814 d_dirnamlen='$d_dirnamlen'
23815 d_dladdr='$d_dladdr'
23816 d_dlerror='$d_dlerror'
23817 d_dlopen='$d_dlopen'
23818 d_dlsymun='$d_dlsymun'
23819 d_dosuid='$d_dosuid'
23820 d_drand48_r='$d_drand48_r'
23821 d_drand48proto='$d_drand48proto'
23823 d_eaccess='$d_eaccess'
23824 d_endgrent='$d_endgrent'
23825 d_endgrent_r='$d_endgrent_r'
23826 d_endhent='$d_endhent'
23827 d_endhostent_r='$d_endhostent_r'
23828 d_endnent='$d_endnent'
23829 d_endnetent_r='$d_endnetent_r'
23830 d_endpent='$d_endpent'
23831 d_endprotoent_r='$d_endprotoent_r'
23832 d_endpwent='$d_endpwent'
23833 d_endpwent_r='$d_endpwent_r'
23834 d_endsent='$d_endsent'
23835 d_endservent_r='$d_endservent_r'
23836 d_eofnblk='$d_eofnblk'
23839 d_eunice='$d_eunice'
23842 d_faststdio='$d_faststdio'
23843 d_fchdir='$d_fchdir'
23844 d_fchmod='$d_fchmod'
23845 d_fchown='$d_fchown'
23847 d_fcntl_can_lock='$d_fcntl_can_lock'
23848 d_fd_macros='$d_fd_macros'
23849 d_fd_set='$d_fd_set'
23851 d_fds_bits='$d_fds_bits'
23852 d_fegetround='$d_fegetround'
23853 d_fgetpos='$d_fgetpos'
23854 d_finite='$d_finite'
23855 d_finitel='$d_finitel'
23856 d_flexfnam='$d_flexfnam'
23858 d_flockproto='$d_flockproto'
23863 d_fp_class='$d_fp_class'
23864 d_fp_classify='$d_fp_classify'
23865 d_fp_classl='$d_fp_classl'
23866 d_fpathconf='$d_fpathconf'
23867 d_fpclass='$d_fpclass'
23868 d_fpclassify='$d_fpclassify'
23869 d_fpclassl='$d_fpclassl'
23870 d_fpgetround='$d_fpgetround'
23871 d_fpos64_t='$d_fpos64_t'
23872 d_frexpl='$d_frexpl'
23873 d_fs_data_s='$d_fs_data_s'
23874 d_fseeko='$d_fseeko'
23875 d_fsetpos='$d_fsetpos'
23876 d_fstatfs='$d_fstatfs'
23877 d_fstatvfs='$d_fstatvfs'
23879 d_ftello='$d_ftello'
23881 d_futimes='$d_futimes'
23882 d_gdbm_ndbm_h_uses_prototypes='$d_gdbm_ndbm_h_uses_prototypes'
23883 d_gdbmndbm_h_uses_prototypes='$d_gdbmndbm_h_uses_prototypes'
23884 d_getaddrinfo='$d_getaddrinfo'
23885 d_getcwd='$d_getcwd'
23886 d_getespwnam='$d_getespwnam'
23887 d_getfsstat='$d_getfsstat'
23888 d_getgrent='$d_getgrent'
23889 d_getgrent_r='$d_getgrent_r'
23890 d_getgrgid_r='$d_getgrgid_r'
23891 d_getgrnam_r='$d_getgrnam_r'
23892 d_getgrps='$d_getgrps'
23893 d_gethbyaddr='$d_gethbyaddr'
23894 d_gethbyname='$d_gethbyname'
23895 d_gethent='$d_gethent'
23896 d_gethname='$d_gethname'
23897 d_gethostbyaddr_r='$d_gethostbyaddr_r'
23898 d_gethostbyname_r='$d_gethostbyname_r'
23899 d_gethostent_r='$d_gethostent_r'
23900 d_gethostprotos='$d_gethostprotos'
23901 d_getitimer='$d_getitimer'
23902 d_getlogin='$d_getlogin'
23903 d_getlogin_r='$d_getlogin_r'
23904 d_getmnt='$d_getmnt'
23905 d_getmntent='$d_getmntent'
23906 d_getnameinfo='$d_getnameinfo'
23907 d_getnbyaddr='$d_getnbyaddr'
23908 d_getnbyname='$d_getnbyname'
23909 d_getnent='$d_getnent'
23910 d_getnetbyaddr_r='$d_getnetbyaddr_r'
23911 d_getnetbyname_r='$d_getnetbyname_r'
23912 d_getnetent_r='$d_getnetent_r'
23913 d_getnetprotos='$d_getnetprotos'
23914 d_getpagsz='$d_getpagsz'
23915 d_getpbyname='$d_getpbyname'
23916 d_getpbynumber='$d_getpbynumber'
23917 d_getpent='$d_getpent'
23918 d_getpgid='$d_getpgid'
23919 d_getpgrp2='$d_getpgrp2'
23920 d_getpgrp='$d_getpgrp'
23921 d_getppid='$d_getppid'
23922 d_getprior='$d_getprior'
23923 d_getprotobyname_r='$d_getprotobyname_r'
23924 d_getprotobynumber_r='$d_getprotobynumber_r'
23925 d_getprotoent_r='$d_getprotoent_r'
23926 d_getprotoprotos='$d_getprotoprotos'
23927 d_getprpwnam='$d_getprpwnam'
23928 d_getpwent='$d_getpwent'
23929 d_getpwent_r='$d_getpwent_r'
23930 d_getpwnam_r='$d_getpwnam_r'
23931 d_getpwuid_r='$d_getpwuid_r'
23932 d_getsbyname='$d_getsbyname'
23933 d_getsbyport='$d_getsbyport'
23934 d_getsent='$d_getsent'
23935 d_getservbyname_r='$d_getservbyname_r'
23936 d_getservbyport_r='$d_getservbyport_r'
23937 d_getservent_r='$d_getservent_r'
23938 d_getservprotos='$d_getservprotos'
23939 d_getspnam='$d_getspnam'
23940 d_getspnam_r='$d_getspnam_r'
23941 d_gettimeod='$d_gettimeod'
23942 d_gmtime64='$d_gmtime64'
23943 d_gmtime_r='$d_gmtime_r'
23944 d_gnulibc='$d_gnulibc'
23945 d_grpasswd='$d_grpasswd'
23946 d_hasmntopt='$d_hasmntopt'
23950 d_ilogbl='$d_ilogbl'
23951 d_inc_version_list='$d_inc_version_list'
23953 d_inetaton='$d_inetaton'
23954 d_inetntop='$d_inetntop'
23955 d_inetpton='$d_inetpton'
23956 d_int64_t='$d_int64_t'
23957 d_ip_mreq='$d_ip_mreq'
23958 d_ip_mreq_source='$d_ip_mreq_source'
23959 d_ipv6_mreq='$d_ipv6_mreq'
23960 d_ipv6_mreq_source='$d_ipv6_mreq_source'
23961 d_isascii='$d_isascii'
23962 d_isblank='$d_isblank'
23963 d_isfinite='$d_isfinite'
23964 d_isfinitel='$d_isfinitel'
23966 d_isinfl='$d_isinfl'
23967 d_isless='$d_isless'
23969 d_isnanl='$d_isnanl'
23970 d_isnormal='$d_isnormal'
23973 d_killpg='$d_killpg'
23974 d_lc_monetary_2008='$d_lc_monetary_2008'
23975 d_lchown='$d_lchown'
23976 d_ldbl_dig='$d_ldbl_dig'
23977 d_ldexpl='$d_ldexpl'
23978 d_lgamma='$d_lgamma'
23979 d_lgamma_r='$d_lgamma_r'
23980 d_libm_lib_version='$d_libm_lib_version'
23981 d_libname_unique='$d_libname_unique'
23983 d_llrint='$d_llrint'
23984 d_llround='$d_llround'
23985 d_localtime64='$d_localtime64'
23986 d_localtime_r='$d_localtime_r'
23987 d_localtime_r_needs_tzset='$d_localtime_r_needs_tzset'
23988 d_locconv='$d_locconv'
23993 d_longdbl='$d_longdbl'
23994 d_longlong='$d_longlong'
23996 d_lround='$d_lround'
23997 d_lseekproto='$d_lseekproto'
23999 d_madvise='$d_madvise'
24000 d_malloc_good_size='$d_malloc_good_size'
24001 d_malloc_size='$d_malloc_size'
24003 d_mbstowcs='$d_mbstowcs'
24004 d_mbtowc='$d_mbtowc'
24005 d_memchr='$d_memchr'
24006 d_memcmp='$d_memcmp'
24007 d_memcpy='$d_memcpy'
24008 d_memmove='$d_memmove'
24009 d_memset='$d_memset'
24011 d_mkdtemp='$d_mkdtemp'
24012 d_mkfifo='$d_mkfifo'
24013 d_mkstemp='$d_mkstemp'
24014 d_mkstemps='$d_mkstemps'
24015 d_mktime64='$d_mktime64'
24016 d_mktime='$d_mktime'
24019 d_modfl_pow32_bug='$d_modfl_pow32_bug'
24020 d_modflproto='$d_modflproto'
24021 d_mprotect='$d_mprotect'
24023 d_msg_ctrunc='$d_msg_ctrunc'
24024 d_msg_dontroute='$d_msg_dontroute'
24025 d_msg_oob='$d_msg_oob'
24026 d_msg_peek='$d_msg_peek'
24027 d_msg_proxy='$d_msg_proxy'
24028 d_msgctl='$d_msgctl'
24029 d_msgget='$d_msgget'
24030 d_msghdr_s='$d_msghdr_s'
24031 d_msgrcv='$d_msgrcv'
24032 d_msgsnd='$d_msgsnd'
24034 d_munmap='$d_munmap'
24035 d_mymalloc='$d_mymalloc'
24038 d_ndbm_h_uses_prototypes='$d_ndbm_h_uses_prototypes'
24039 d_nearbyint='$d_nearbyint'
24040 d_nextafter='$d_nextafter'
24041 d_nexttoward='$d_nexttoward'
24043 d_nl_langinfo='$d_nl_langinfo'
24044 d_nv_preserves_uv='$d_nv_preserves_uv'
24045 d_nv_zero_is_allbits_zero='$d_nv_zero_is_allbits_zero'
24046 d_off64_t='$d_off64_t'
24047 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
24048 d_oldpthreads='$d_oldpthreads'
24049 d_oldsock='$d_oldsock'
24051 d_pathconf='$d_pathconf'
24053 d_perl_otherlibdirs='$d_perl_otherlibdirs'
24054 d_phostname='$d_phostname'
24057 d_portable='$d_portable'
24059 d_prctl_set_name='$d_prctl_set_name'
24060 d_printf_format_null='$d_printf_format_null'
24061 d_procselfexe='$d_procselfexe'
24062 d_pseudofork='$d_pseudofork'
24063 d_pthread_atfork='$d_pthread_atfork'
24064 d_pthread_attr_setscope='$d_pthread_attr_setscope'
24065 d_pthread_yield='$d_pthread_yield'
24066 d_ptrdiff_t='$d_ptrdiff_t'
24068 d_pwchange='$d_pwchange'
24069 d_pwclass='$d_pwclass'
24070 d_pwcomment='$d_pwcomment'
24071 d_pwexpire='$d_pwexpire'
24072 d_pwgecos='$d_pwgecos'
24073 d_pwpasswd='$d_pwpasswd'
24074 d_pwquota='$d_pwquota'
24077 d_random_r='$d_random_r'
24078 d_re_comp='$d_re_comp'
24079 d_readdir64_r='$d_readdir64_r'
24080 d_readdir='$d_readdir'
24081 d_readdir_r='$d_readdir_r'
24082 d_readlink='$d_readlink'
24084 d_recvmsg='$d_recvmsg'
24085 d_regcmp='$d_regcmp'
24086 d_regcomp='$d_regcomp'
24087 d_remainder='$d_remainder'
24088 d_remquo='$d_remquo'
24089 d_rename='$d_rename'
24090 d_rewinddir='$d_rewinddir'
24094 d_safebcpy='$d_safebcpy'
24095 d_safemcpy='$d_safemcpy'
24096 d_sanemcmp='$d_sanemcmp'
24097 d_sbrkproto='$d_sbrkproto'
24098 d_scalbn='$d_scalbn'
24099 d_scalbnl='$d_scalbnl'
24100 d_sched_yield='$d_sched_yield'
24101 d_scm_rights='$d_scm_rights'
24102 d_seekdir='$d_seekdir'
24103 d_select='$d_select'
24105 d_semctl='$d_semctl'
24106 d_semctl_semid_ds='$d_semctl_semid_ds'
24107 d_semctl_semun='$d_semctl_semun'
24108 d_semget='$d_semget'
24110 d_sendmsg='$d_sendmsg'
24111 d_setegid='$d_setegid'
24112 d_seteuid='$d_seteuid'
24113 d_setgrent='$d_setgrent'
24114 d_setgrent_r='$d_setgrent_r'
24115 d_setgrps='$d_setgrps'
24116 d_sethent='$d_sethent'
24117 d_sethostent_r='$d_sethostent_r'
24118 d_setitimer='$d_setitimer'
24119 d_setlinebuf='$d_setlinebuf'
24120 d_setlocale='$d_setlocale'
24121 d_setlocale_r='$d_setlocale_r'
24122 d_setnent='$d_setnent'
24123 d_setnetent_r='$d_setnetent_r'
24124 d_setpent='$d_setpent'
24125 d_setpgid='$d_setpgid'
24126 d_setpgrp2='$d_setpgrp2'
24127 d_setpgrp='$d_setpgrp'
24128 d_setprior='$d_setprior'
24129 d_setproctitle='$d_setproctitle'
24130 d_setprotoent_r='$d_setprotoent_r'
24131 d_setpwent='$d_setpwent'
24132 d_setpwent_r='$d_setpwent_r'
24133 d_setregid='$d_setregid'
24134 d_setresgid='$d_setresgid'
24135 d_setresuid='$d_setresuid'
24136 d_setreuid='$d_setreuid'
24137 d_setrgid='$d_setrgid'
24138 d_setruid='$d_setruid'
24139 d_setsent='$d_setsent'
24140 d_setservent_r='$d_setservent_r'
24141 d_setsid='$d_setsid'
24142 d_setvbuf='$d_setvbuf'
24145 d_shmatprototype='$d_shmatprototype'
24146 d_shmctl='$d_shmctl'
24148 d_shmget='$d_shmget'
24149 d_sigaction='$d_sigaction'
24150 d_signbit='$d_signbit'
24151 d_sigprocmask='$d_sigprocmask'
24152 d_sigsetjmp='$d_sigsetjmp'
24153 d_sin6_scope_id='$d_sin6_scope_id'
24154 d_sitearch='$d_sitearch'
24155 d_snprintf='$d_snprintf'
24156 d_sockaddr_in6='$d_sockaddr_in6'
24157 d_sockaddr_sa_len='$d_sockaddr_sa_len'
24158 d_sockatmark='$d_sockatmark'
24159 d_sockatmarkproto='$d_sockatmarkproto'
24160 d_socket='$d_socket'
24161 d_socklen_t='$d_socklen_t'
24162 d_sockpair='$d_sockpair'
24163 d_socks5_init='$d_socks5_init'
24164 d_sprintf_returns_strlen='$d_sprintf_returns_strlen'
24166 d_srand48_r='$d_srand48_r'
24167 d_srandom_r='$d_srandom_r'
24168 d_sresgproto='$d_sresgproto'
24169 d_sresuproto='$d_sresuproto'
24171 d_statblks='$d_statblks'
24172 d_statfs_f_flags='$d_statfs_f_flags'
24173 d_statfs_s='$d_statfs_s'
24174 d_static_inline='$d_static_inline'
24175 d_statvfs='$d_statvfs'
24176 d_stdio_cnt_lval='$d_stdio_cnt_lval'
24177 d_stdio_ptr_lval='$d_stdio_ptr_lval'
24178 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
24179 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
24180 d_stdio_stream_array='$d_stdio_stream_array'
24181 d_stdiobase='$d_stdiobase'
24182 d_stdstdio='$d_stdstdio'
24183 d_strchr='$d_strchr'
24184 d_strcoll='$d_strcoll'
24185 d_strctcpy='$d_strctcpy'
24186 d_strerrm='$d_strerrm'
24187 d_strerror='$d_strerror'
24188 d_strerror_r='$d_strerror_r'
24189 d_strftime='$d_strftime'
24190 d_strlcat='$d_strlcat'
24191 d_strlcpy='$d_strlcpy'
24192 d_strtod='$d_strtod'
24193 d_strtol='$d_strtol'
24194 d_strtold='$d_strtold'
24195 d_strtoll='$d_strtoll'
24196 d_strtoq='$d_strtoq'
24197 d_strtoul='$d_strtoul'
24198 d_strtoull='$d_strtoull'
24199 d_strtouq='$d_strtouq'
24200 d_strxfrm='$d_strxfrm'
24201 d_suidsafe='$d_suidsafe'
24202 d_symlink='$d_symlink'
24203 d_syscall='$d_syscall'
24204 d_syscallproto='$d_syscallproto'
24205 d_sysconf='$d_sysconf'
24206 d_sysernlst='$d_sysernlst'
24207 d_syserrlst='$d_syserrlst'
24208 d_system='$d_system'
24209 d_tcgetpgrp='$d_tcgetpgrp'
24210 d_tcsetpgrp='$d_tcsetpgrp'
24211 d_telldir='$d_telldir'
24212 d_telldirproto='$d_telldirproto'
24213 d_tgamma='$d_tgamma'
24215 d_timegm='$d_timegm'
24217 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
24218 d_tm_tm_zone='$d_tm_tm_zone'
24219 d_tmpnam_r='$d_tmpnam_r'
24221 d_truncate='$d_truncate'
24222 d_truncl='$d_truncl'
24223 d_ttyname_r='$d_ttyname_r'
24224 d_tzname='$d_tzname'
24225 d_u32align='$d_u32align'
24226 d_ualarm='$d_ualarm'
24229 d_union_semun='$d_union_semun'
24230 d_unordered='$d_unordered'
24231 d_unsetenv='$d_unsetenv'
24232 d_usleep='$d_usleep'
24233 d_usleepproto='$d_usleepproto'
24235 d_vendorarch='$d_vendorarch'
24236 d_vendorbin='$d_vendorbin'
24237 d_vendorlib='$d_vendorlib'
24238 d_vendorscript='$d_vendorscript'
24240 d_void_closedir='$d_void_closedir'
24241 d_voidsig='$d_voidsig'
24242 d_voidtty='$d_voidtty'
24243 d_volatile='$d_volatile'
24244 d_vprintf='$d_vprintf'
24245 d_vsnprintf='$d_vsnprintf'
24247 d_waitpid='$d_waitpid'
24248 d_wcscmp='$d_wcscmp'
24249 d_wcstombs='$d_wcstombs'
24250 d_wcsxfrm='$d_wcsxfrm'
24251 d_wctomb='$d_wctomb'
24252 d_writev='$d_writev'
24255 db_hashtype='$db_hashtype'
24256 db_prefixtype='$db_prefixtype'
24257 db_version_major='$db_version_major'
24258 db_version_minor='$db_version_minor'
24259 db_version_patch='$db_version_patch'
24260 direntrytype='$direntrytype'
24263 doublekind='$doublekind'
24264 doublesize='$doublesize'
24266 drand48_r_proto='$drand48_r_proto'
24268 dynamic_ext='$dynamic_ext'
24274 endgrent_r_proto='$endgrent_r_proto'
24275 endhostent_r_proto='$endhostent_r_proto'
24276 endnetent_r_proto='$endnetent_r_proto'
24277 endprotoent_r_proto='$endprotoent_r_proto'
24278 endpwent_r_proto='$endpwent_r_proto'
24279 endservent_r_proto='$endservent_r_proto'
24280 eunicefix='$eunicefix'
24283 extensions='$extensions'
24284 extern_C='$extern_C'
24286 fflushNULL='$fflushNULL'
24287 fflushall='$fflushall'
24289 firstmakefile='$firstmakefile'
24291 fpossize='$fpossize'
24292 fpostype='$fpostype'
24293 freetype='$freetype'
24296 full_csh='$full_csh'
24297 full_sed='$full_sed'
24298 gccansipedantic='$gccansipedantic'
24299 gccosandvers='$gccosandvers'
24300 gccversion='$gccversion'
24301 getgrent_r_proto='$getgrent_r_proto'
24302 getgrgid_r_proto='$getgrgid_r_proto'
24303 getgrnam_r_proto='$getgrnam_r_proto'
24304 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
24305 gethostbyname_r_proto='$gethostbyname_r_proto'
24306 gethostent_r_proto='$gethostent_r_proto'
24307 getlogin_r_proto='$getlogin_r_proto'
24308 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
24309 getnetbyname_r_proto='$getnetbyname_r_proto'
24310 getnetent_r_proto='$getnetent_r_proto'
24311 getprotobyname_r_proto='$getprotobyname_r_proto'
24312 getprotobynumber_r_proto='$getprotobynumber_r_proto'
24313 getprotoent_r_proto='$getprotoent_r_proto'
24314 getpwent_r_proto='$getpwent_r_proto'
24315 getpwnam_r_proto='$getpwnam_r_proto'
24316 getpwuid_r_proto='$getpwuid_r_proto'
24317 getservbyname_r_proto='$getservbyname_r_proto'
24318 getservbyport_r_proto='$getservbyport_r_proto'
24319 getservent_r_proto='$getservent_r_proto'
24320 getspnam_r_proto='$getspnam_r_proto'
24321 gidformat='$gidformat'
24327 gmtime_r_proto='$gmtime_r_proto'
24328 gnulibc_version='$gnulibc_version'
24330 groupcat='$groupcat'
24331 groupstype='$groupstype'
24334 h_sysfile='$h_sysfile'
24337 hostgenerate='$hostgenerate'
24338 hostosname='$hostosname'
24339 hostperl='$hostperl'
24340 html1dir='$html1dir'
24341 html1direxp='$html1direxp'
24342 html3dir='$html3dir'
24343 html3direxp='$html3direxp'
24352 i_arpainet='$i_arpainet'
24353 i_assert='$i_assert'
24355 i_bsdioctl='$i_bsdioctl'
24359 i_dirent='$i_dirent'
24361 i_execinfo='$i_execinfo'
24366 i_fp_class='$i_fp_class'
24368 i_gdbm_ndbm='$i_gdbm_ndbm'
24369 i_gdbmndbm='$i_gdbmndbm'
24371 i_ieeefp='$i_ieeefp'
24372 i_inttypes='$i_inttypes'
24373 i_langinfo='$i_langinfo'
24374 i_libutil='$i_libutil'
24375 i_limits='$i_limits'
24376 i_locale='$i_locale'
24377 i_machcthr='$i_machcthr'
24378 i_malloc='$i_malloc'
24379 i_mallocmalloc='$i_mallocmalloc'
24381 i_memory='$i_memory'
24382 i_mntent='$i_mntent'
24385 i_neterrno='$i_neterrno'
24386 i_netinettcp='$i_netinettcp'
24390 i_pthread='$i_pthread'
24392 i_quadmath='$i_quadmath'
24393 i_rpcsvcdbm='$i_rpcsvcdbm'
24395 i_shadow='$i_shadow'
24397 i_stdarg='$i_stdarg'
24398 i_stdbool='$i_stdbool'
24399 i_stddef='$i_stddef'
24400 i_stdint='$i_stdint'
24401 i_stdlib='$i_stdlib'
24402 i_string='$i_string'
24403 i_sunmath='$i_sunmath'
24404 i_sysaccess='$i_sysaccess'
24405 i_sysdir='$i_sysdir'
24406 i_sysfile='$i_sysfile'
24407 i_sysfilio='$i_sysfilio'
24409 i_sysioctl='$i_sysioctl'
24410 i_syslog='$i_syslog'
24411 i_sysmman='$i_sysmman'
24412 i_sysmode='$i_sysmode'
24413 i_sysmount='$i_sysmount'
24414 i_sysndir='$i_sysndir'
24415 i_sysparam='$i_sysparam'
24416 i_syspoll='$i_syspoll'
24417 i_sysresrc='$i_sysresrc'
24418 i_syssecrt='$i_syssecrt'
24419 i_sysselct='$i_sysselct'
24420 i_syssockio='$i_syssockio'
24421 i_sysstat='$i_sysstat'
24422 i_sysstatfs='$i_sysstatfs'
24423 i_sysstatvfs='$i_sysstatvfs'
24424 i_systime='$i_systime'
24425 i_systimek='$i_systimek'
24426 i_systimes='$i_systimes'
24427 i_systypes='$i_systypes'
24428 i_sysuio='$i_sysuio'
24430 i_sysutsname='$i_sysutsname'
24431 i_sysvfs='$i_sysvfs'
24432 i_syswait='$i_syswait'
24433 i_termio='$i_termio'
24434 i_termios='$i_termios'
24436 i_unistd='$i_unistd'
24439 i_values='$i_values'
24440 i_varargs='$i_varargs'
24441 i_varhdr='$i_varhdr'
24443 ignore_versioned_solibs='$ignore_versioned_solibs'
24444 inc_version_list='$inc_version_list'
24445 inc_version_list_init='$inc_version_list_init'
24449 initialinstalllocation='$initialinstalllocation'
24450 installarchlib='$installarchlib'
24451 installbin='$installbin'
24452 installhtml1dir='$installhtml1dir'
24453 installhtml3dir='$installhtml3dir'
24454 installman1dir='$installman1dir'
24455 installman3dir='$installman3dir'
24456 installprefix='$installprefix'
24457 installprefixexp='$installprefixexp'
24458 installprivlib='$installprivlib'
24459 installscript='$installscript'
24460 installsitearch='$installsitearch'
24461 installsitebin='$installsitebin'
24462 installsitehtml1dir='$installsitehtml1dir'
24463 installsitehtml3dir='$installsitehtml3dir'
24464 installsitelib='$installsitelib'
24465 installsiteman1dir='$installsiteman1dir'
24466 installsiteman3dir='$installsiteman3dir'
24467 installsitescript='$installsitescript'
24468 installstyle='$installstyle'
24469 installusrbinperl='$installusrbinperl'
24470 installvendorarch='$installvendorarch'
24471 installvendorbin='$installvendorbin'
24472 installvendorhtml1dir='$installvendorhtml1dir'
24473 installvendorhtml3dir='$installvendorhtml3dir'
24474 installvendorlib='$installvendorlib'
24475 installvendorman1dir='$installvendorman1dir'
24476 installvendorman3dir='$installvendorman3dir'
24477 installvendorscript='$installvendorscript'
24479 issymlink='$issymlink'
24480 ivdformat='$ivdformat'
24483 known_extensions='$known_extensions'
24486 ld_can_script='$ld_can_script'
24487 lddlflags='$lddlflags'
24489 ldflags_uselargefiles='$ldflags_uselargefiles'
24490 ldlibpthname='$ldlibpthname'
24497 libsdirs='$libsdirs'
24498 libsfiles='$libsfiles'
24499 libsfound='$libsfound'
24500 libspath='$libspath'
24501 libswanted='$libswanted'
24502 libswanted_uselargefiles='$libswanted_uselargefiles'
24508 localtime_r_proto='$localtime_r_proto'
24509 locincpth='$locincpth'
24510 loclibpth='$loclibpth'
24511 longdblkind='$longdblkind'
24512 longdblsize='$longdblsize'
24513 longlongsize='$longlongsize'
24514 longsize='$longsize'
24518 lseeksize='$lseeksize'
24519 lseektype='$lseektype'
24523 make_set_make='$make_set_make'
24524 mallocobj='$mallocobj'
24525 mallocsrc='$mallocsrc'
24526 malloctype='$malloctype'
24528 man1direxp='$man1direxp'
24531 man3direxp='$man3direxp'
24533 mips_type='$mips_type'
24534 mistrustnm='$mistrustnm'
24536 mmaptype='$mmaptype'
24537 modetype='$modetype'
24539 multiarch='$multiarch'
24541 myarchname='$myarchname'
24542 mydomain='$mydomain'
24543 myhostname='$myhostname'
24546 need_va_copy='$need_va_copy'
24547 netdb_hlen_type='$netdb_hlen_type'
24548 netdb_host_type='$netdb_host_type'
24549 netdb_name_type='$netdb_name_type'
24550 netdb_net_type='$netdb_net_type'
24553 nm_so_opt='$nm_so_opt'
24554 nonxs_ext='$nonxs_ext'
24556 nvEUformat='$nvEUformat'
24557 nvFUformat='$nvFUformat'
24558 nvGUformat='$nvGUformat'
24559 nv_overflows_integers_at='$nv_overflows_integers_at'
24560 nv_preserves_uv_bits='$nv_preserves_uv_bits'
24561 nveformat='$nveformat'
24562 nvfformat='$nvfformat'
24563 nvgformat='$nvgformat'
24566 o_nonblock='$o_nonblock'
24568 old_pthread_create_joinable='$old_pthread_create_joinable'
24569 optimize='$optimize'
24570 orderlib='$orderlib'
24573 otherlibdirs='$otherlibdirs'
24577 patchlevel='$patchlevel'
24578 path_sep='$path_sep'
24581 perl_patchlevel='$perl_patchlevel'
24582 perl_static_inline='$perl_static_inline'
24583 perladmin='$perladmin'
24584 perllibs='$perllibs'
24585 perlpath='$perlpath'
24587 phostname='$phostname'
24593 prefixexp='$prefixexp'
24595 privlibexp='$privlibexp'
24596 procselfexe='$procselfexe'
24597 prototype='$prototype'
24599 quadkind='$quadkind'
24600 quadtype='$quadtype'
24601 randbits='$randbits'
24602 randfunc='$randfunc'
24603 random_r_proto='$random_r_proto'
24604 randseedtype='$randseedtype'
24606 rd_nodata='$rd_nodata'
24607 readdir64_r_proto='$readdir64_r_proto'
24608 readdir_r_proto='$readdir_r_proto'
24609 revision='$revision'
24615 sGMTIME_max='$sGMTIME_max'
24616 sGMTIME_min='$sGMTIME_min'
24617 sLOCALTIME_max='$sLOCALTIME_max'
24618 sLOCALTIME_min='$sLOCALTIME_min'
24619 sPRIEUldbl='$sPRIEUldbl'
24620 sPRIFUldbl='$sPRIFUldbl'
24621 sPRIGUldbl='$sPRIGUldbl'
24622 sPRIXU64='$sPRIXU64'
24624 sPRIeldbl='$sPRIeldbl'
24625 sPRIfldbl='$sPRIfldbl'
24626 sPRIgldbl='$sPRIgldbl'
24631 sSCNfldbl='$sSCNfldbl'
24632 sched_yield='$sched_yield'
24633 scriptdir='$scriptdir'
24634 scriptdirexp='$scriptdirexp'
24636 seedfunc='$seedfunc'
24637 selectminbits='$selectminbits'
24638 selecttype='$selecttype'
24639 sendmail='$sendmail'
24640 setgrent_r_proto='$setgrent_r_proto'
24641 sethostent_r_proto='$sethostent_r_proto'
24642 setlocale_r_proto='$setlocale_r_proto'
24643 setnetent_r_proto='$setnetent_r_proto'
24644 setprotoent_r_proto='$setprotoent_r_proto'
24645 setpwent_r_proto='$setpwent_r_proto'
24646 setservent_r_proto='$setservent_r_proto'
24649 sharpbang='$sharpbang'
24650 shmattype='$shmattype'
24651 shortsize='$shortsize'
24654 sig_count='$sig_count'
24655 sig_name='$sig_name'
24656 sig_name_init='$sig_name_init'
24658 sig_num_init='$sig_num_init'
24659 sig_size='$sig_size'
24660 signal_t='$signal_t'
24661 sitearch='$sitearch'
24662 sitearchexp='$sitearchexp'
24664 sitebinexp='$sitebinexp'
24665 sitehtml1dir='$sitehtml1dir'
24666 sitehtml1direxp='$sitehtml1direxp'
24667 sitehtml3dir='$sitehtml3dir'
24668 sitehtml3direxp='$sitehtml3direxp'
24670 sitelib_stem='$sitelib_stem'
24671 sitelibexp='$sitelibexp'
24672 siteman1dir='$siteman1dir'
24673 siteman1direxp='$siteman1direxp'
24674 siteman3dir='$siteman3dir'
24675 siteman3direxp='$siteman3direxp'
24676 siteprefix='$siteprefix'
24677 siteprefixexp='$siteprefixexp'
24678 sitescript='$sitescript'
24679 sitescriptexp='$sitescriptexp'
24680 sizesize='$sizesize'
24681 sizetype='$sizetype'
24685 sockethdr='$sockethdr'
24686 socketlib='$socketlib'
24687 socksizetype='$socksizetype'
24689 spackage='$spackage'
24690 spitshell='$spitshell'
24691 srand48_r_proto='$srand48_r_proto'
24692 srandom_r_proto='$srandom_r_proto'
24694 ssizetype='$ssizetype'
24695 st_ino_sign='$st_ino_sign'
24696 st_ino_size='$st_ino_size'
24697 startperl='$startperl'
24699 static_ext='$static_ext'
24701 stdio_base='$stdio_base'
24702 stdio_bufsiz='$stdio_bufsiz'
24703 stdio_cnt='$stdio_cnt'
24704 stdio_filbuf='$stdio_filbuf'
24705 stdio_ptr='$stdio_ptr'
24706 stdio_stream_array='$stdio_stream_array'
24707 strerror_r_proto='$strerror_r_proto'
24710 subversion='$subversion'
24715 targetarch='$targetarch'
24716 targetdir='$targetdir'
24717 targetenv='$targetenv'
24718 targethost='$targethost'
24719 targetmkdir='$targetmkdir'
24720 targetport='$targetport'
24721 targetsh='$targetsh'
24725 timeincl='$timeincl'
24726 timetype='$timetype'
24727 tmpnam_r_proto='$tmpnam_r_proto'
24733 ttyname_r_proto='$ttyname_r_proto'
24742 uidformat='$uidformat'
24748 uquadtype='$uquadtype'
24749 use5005threads='$use5005threads'
24750 use64bitall='$use64bitall'
24751 use64bitint='$use64bitint'
24752 usecbacktrace='$usecbacktrace'
24753 usecrosscompile='$usecrosscompile'
24754 usedevel='$usedevel'
24756 usedtrace='$usedtrace'
24757 usefaststdio='$usefaststdio'
24758 useithreads='$useithreads'
24759 usekernprocpathname='$usekernprocpathname'
24760 uselargefiles='$uselargefiles'
24761 uselongdouble='$uselongdouble'
24762 usemallocwrap='$usemallocwrap'
24763 usemorebits='$usemorebits'
24764 usemultiplicity='$usemultiplicity'
24765 usemymalloc='$usemymalloc'
24767 usensgetexecutablepath='$usensgetexecutablepath'
24768 useopcode='$useopcode'
24769 useperlio='$useperlio'
24770 useposix='$useposix'
24771 usequadmath='$usequadmath'
24772 usereentrant='$usereentrant'
24773 userelocatableinc='$userelocatableinc'
24774 useshrplib='$useshrplib'
24775 usesitecustomize='$usesitecustomize'
24776 usesocks='$usesocks'
24777 usethreads='$usethreads'
24778 usevendorprefix='$usevendorprefix'
24779 useversionedarchname='$useversionedarchname'
24780 usevfork='$usevfork'
24783 uvXUformat='$uvXUformat'
24784 uvoformat='$uvoformat'
24787 uvuformat='$uvuformat'
24788 uvxformat='$uvxformat'
24790 vendorarch='$vendorarch'
24791 vendorarchexp='$vendorarchexp'
24792 vendorbin='$vendorbin'
24793 vendorbinexp='$vendorbinexp'
24794 vendorhtml1dir='$vendorhtml1dir'
24795 vendorhtml1direxp='$vendorhtml1direxp'
24796 vendorhtml3dir='$vendorhtml3dir'
24797 vendorhtml3direxp='$vendorhtml3direxp'
24798 vendorlib='$vendorlib'
24799 vendorlib_stem='$vendorlib_stem'
24800 vendorlibexp='$vendorlibexp'
24801 vendorman1dir='$vendorman1dir'
24802 vendorman1direxp='$vendorman1direxp'
24803 vendorman3dir='$vendorman3dir'
24804 vendorman3direxp='$vendorman3direxp'
24805 vendorprefix='$vendorprefix'
24806 vendorprefixexp='$vendorprefixexp'
24807 vendorscript='$vendorscript'
24808 vendorscriptexp='$vendorscriptexp'
24810 version_patchlevel_string='$version_patchlevel_string'
24811 versiononly='$versiononly'
24815 yaccflags='$yaccflags'
24820 : add special variables
24821 $test -f $src/patchlevel.h && \
24822 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
24823 echo "PERL_PATCHLEVEL='$perl_patchlevel'" >>config.sh
24824 echo "PERL_CONFIG_SH=true" >>config.sh
24826 : propagate old symbols
24827 if $test -f UU/config.sh; then
24828 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
24829 $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \
24830 config.sh config.sh UU/oldconfig.sh |\
24831 $sort | $uniq -u >UU/oldsyms
24832 set X `$cat UU/oldsyms`
24838 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
24840 echo ": Variables propagated from previous config.sh file." >>config.sh
24841 for sym in `$cat UU/oldsyms`; do
24842 echo " Propagating $hint variable "'$'"$sym..."
24843 eval 'tmp="$'"${sym}"'"'
24845 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
24851 : preserve RCS keywords in files with variable substitution, grrr
24854 : Finish up by extracting the .SH files
24858 echo "Extraction done."
24868 If you'd like to make any changes to the config.sh file before I begin
24869 to configure things, do it as a shell escape now (e.g. !vi config.sh).
24872 rp="Press return or use a shell escape to edit config.sh:"
24877 *) : in case they cannot read
24878 sh 1>&4 -c "$ans";;
24883 : if this fails, just run all the .SH files by hand
24892 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
24899 Now you need to generate make dependencies by running "$make depend".
24900 You might prefer to run it in background: "$make depend > makedepend.out &"
24901 It can take a while, so you might not want to run it right now.
24906 rp="Run $make depend now?"
24910 $make depend && echo "Now you must run '$make'."
24913 echo "You must run '$make depend' then '$make'."
24916 elif test -f [Mm]akefile; then
24918 echo "Now you must run a $make."
24920 echo "Configure done."
24923 if $test -f Policy.sh; then
24926 If you compile $package on a different machine or from a different object
24927 directory, copy the Policy.sh file from this object directory to the
24928 new one before you run Configure -- this will help you with most of
24929 the policy defaults.
24933 if $test -f config.msg; then
24934 echo "Hmm. I also noted the following information while running:"
24936 $cat config.msg >&4
24939 $rm -f kit*isdone ark*isdone