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 should use metaconfig. Perl uses a modified version of this
17 # tool, and this, together with the metaconfig units, are available
18 # in the git repository:
19 # $ git clone https://github.com/perl5-metaconfig/metaconfig metaconfig
20 # The original dist package (including metaconfig) is available on github:
21 # $ git clone https://github.com/rmanfredi/dist.git dist-git
23 # Though this script was generated by metaconfig from metaunits, it is
24 # OK to send patches against Configure itself (but not to commit them
25 # to blead). It's up to
26 # the Configure maintainers to backport the patch to the metaunits if it
27 # is accepted. Exceptions to this rule, and more information, is in
28 # Porting/pumpkin.pod.
30 # Generated using [metaconfig 3.5 PL0]
31 # (with additional metaconfig patches by perlbug@perl.org)
36 SCO csh still thinks true is false. Write to SCO today and tell them that next
37 year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
39 (Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
40 we'd have to do is go in and swap the && and || tokens, wherever they are.)
42 [End of diatribe. We now return you to your regularly scheduled programming...]
46 OOPS! You naughty creature! You didn't run Configure with sh!
47 I will attempt to remedy the situation by running sh for you...
51 true || exec sh $0 $argv:q
53 (exit $?0) || cat c2$$
54 (exit $?0) || exec sh $0 $argv:q
57 if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
60 *** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do
61 *** Configure that well. (Plan 9 is close to UNIX but not close enough.)
62 *** Please read the README.plan9 for further instructions.
63 *** Cannot continue, aborting.
69 if test -f /sys/utilities/MultiView ; then
70 # AmigaOS, test -c for /dev/null is not useful
72 elif 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=''
385 d_attribute_deprecated=''
386 d_attribute_format=''
387 d_attribute_malloc=''
388 d_attribute_nonnull=''
389 d_attribute_noreturn=''
391 d_attribute_unused=''
392 d_attribute_warn_unused_result=''
393 d_printf_format_null=''
395 d_builtin_choose_expr=''
397 d_builtin_add_overflow=''
398 d_builtin_mul_overflow=''
399 d_builtin_sub_overflow=''
400 d_c99_variadic_macros=''
449 endhostent_r_proto=''
455 endprotoent_r_proto=''
461 endservent_r_proto=''
533 gethostbyaddr_r_proto=''
535 gethostbyname_r_proto=''
537 gethostent_r_proto=''
550 getnetbyaddr_r_proto=''
552 getnetbyname_r_proto=''
566 d_getprotobyname_r=''
567 getprotobyname_r_proto=''
568 d_getprotobynumber_r=''
569 getprotobynumber_r_proto=''
571 getprotoent_r_proto=''
583 getservbyname_r_proto=''
585 getservbyport_r_proto=''
587 getservent_r_proto=''
620 d_lc_monetary_2008=''
625 d_libm_lib_version=''
633 d_localtime_r_needs_tzset=''
641 d_long_double_style_ieee=''
642 d_long_double_style_ieee_doubledouble=''
643 d_long_double_style_ieee_extended=''
644 d_long_double_style_ieee_std=''
645 d_long_double_style_vax=''
658 d_malloc_good_size=''
700 d_thread_safe_nl_langinfo_l=''
714 d_old_pthread_create_joinable=''
715 old_pthread_create_joinable=''
717 d_pthread_attr_setscope=''
762 sethostent_r_proto=''
779 setprotoent_r_proto=''
791 setservent_r_proto=''
804 d_siginfo_si_errno=''
807 d_siginfo_si_status=''
809 d_siginfo_si_value=''
821 d_ipv6_mreq_source=''
850 perl_static_inline=''
855 d_stdio_ptr_lval_nochange_cnt=''
856 d_stdio_ptr_lval_sets_cnt=''
936 default_inc_excludes_dot=''
1002 d_gdbm_ndbm_h_uses_prototypes=''
1003 d_gdbmndbm_h_uses_prototypes=''
1005 d_ndbm_h_uses_prototypes=''
1075 d_inc_version_list=''
1077 inc_version_list_init=''
1085 installusrbinperl=''
1101 ignore_versioned_solibs=''
1117 d_double_has_negative_zero=''
1118 d_double_has_subnormals=''
1119 d_double_style_cray=''
1120 d_double_style_ibm=''
1121 d_double_style_ieee=''
1122 d_double_style_vax=''
1173 d_perl_otherlibdirs=''
1181 api_versionstring=''
1187 version_patchlevel_string=''
1191 d_nv_preserves_uv=''
1192 d_nv_zero_is_allbits_zero=''
1203 nv_overflows_integers_at=''
1204 nv_preserves_uv_bits=''
1276 installsitehtml1dir=''
1279 installsitehtml3dir=''
1286 installsiteman1dir=''
1289 installsiteman3dir=''
1294 installsitescript=''
1312 d_stdio_stream_array=''
1313 stdio_stream_array=''
1331 usekernprocpathname=''
1332 ccflags_uselargefiles=''
1333 ldflags_uselargefiles=''
1334 libswanted_uselargefiles=''
1343 usensgetexecutablepath=''
1356 installvendorarch=''
1363 installvendorhtml1dir=''
1365 vendorhtml1direxp=''
1366 installvendorhtml3dir=''
1368 vendorhtml3direxp=''
1374 installvendorman1dir=''
1377 installvendorman3dir=''
1384 installvendorscript=''
1395 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1398 : We must find out about Eunice early
1400 if test -f /etc/unixtovms; then
1401 eunicefix=/etc/unixtovms
1403 if test -f /etc/unixtovms.exe; then
1404 eunicefix=/etc/unixtovms.exe
1407 : Set executable suffix now -- needed before hints available
1408 if test -f "/libs/version.library"; then
1411 elif test -f "/system/gnu_library/bin/ar.pm"; then
1414 elif test -n "$DJGPP"; then
1417 elif test -f /kern/cookiejar; then
1420 elif test -d c:/. -o -n "$is_os2" ; then
1427 : Possible local include directories to search.
1428 : Set locincpth to "" in a hint file to defeat local include searches.
1429 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1430 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1432 : no include file wanted by default
1435 : Enable -DEBUGGING and -DDEBUGGING from the command line
1439 : Trailing extension. Override this in a hint file, if needed.
1440 : Extra object files, if any, needed on this platform.
1443 : change the next line if compiling for Xenix/286 on Xenix/386
1444 xlibpth='/usr/lib/386 /lib/386'
1445 : Possible local library directories to search.
1446 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1447 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1449 : general looking path for locating libraries
1450 glibpth="/lib /usr/lib $xlibpth"
1451 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1452 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1453 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1454 test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
1456 : Private path used by Configure to find libraries. Its value
1457 : is prepended to libpth. This variable takes care of special
1458 : machines, like the mips. Usually, it should be empty.
1461 : default library list
1463 : some systems want to use only the non-versioned libso:s
1464 ignore_versioned_solibs=''
1468 : set useposix=false in your hint file to disable the POSIX extension.
1470 : set useopcode=false in your hint file to disable the Opcode extension.
1472 : set uselanginfo=false in your hint file to disable the I18N::Langinfo extension.
1475 ccflags_uselargefiles=''
1476 ldflags_uselargefiles=''
1477 libswanted_uselargefiles=''
1478 : set usemultiplicity on the Configure command line to enable multiplicity.
1479 : set usesocks on the Configure command line to enable socks.
1481 : set usethreads on the Configure command line to enable threads.
1482 usereentrant='undef'
1483 : List of libraries we want.
1484 : If anyone needs extra -lxxx, put those in a hint file.
1485 libswanted="cl pthread socket bind inet nsl ndbm gdbm dbm db malloc dl ld"
1486 libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
1487 : We probably want to search /usr/shlib before most other libraries.
1488 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1489 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1490 glibpth="/usr/shlib $glibpth"
1491 : Do not use vfork unless overridden by a hint file.
1494 : Find the basic shell for Bourne shell scripts
1498 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1501 if test -f "$xxx"; then
1504 : Build up a list and do a single loop so we can 'break' out.
1505 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1506 for xxx in sh bash ksh pdksh ash; do
1508 try="$try ${p}/${xxx}"
1512 if test -f "$xxx"; then
1515 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1518 elif test -f "$xxx.exe"; then
1529 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1531 Usually it's in /bin/sh. How did you even get this far?
1532 Please contact me (Perl Maintainers) at perlbug@perl.org and
1533 we'll try to straighten this all out.
1539 : When cross-compiling we need to separate the sh-to-run-Configure-with from the sh-to-use-in-Perl
1540 : default both to the same thing, cross-compilers can then set targetsh differently if they like
1543 : see if sh knows # comments
1544 if `$sh -c '#' >/dev/null 2>&1`; then
1548 test -f $xcat$_exe || xcat=/usr/bin/cat
1549 if test ! -f $xcat$_exe; then
1550 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
1551 if test -f $p/cat$_exe; then
1556 if test ! -f $xcat$_exe; then
1557 echo "Can't find cat anywhere!"
1561 echo "#!$xcat" >sharp
1564 ./sharp > today 2>/dev/null
1565 if test -s today; then
1568 echo "#! $xcat" > sharp
1571 ./sharp > today 2>/dev/null
1572 if test -s today; then
1580 echo "Your $sh doesn't grok # comments--I will strip them later on."
1583 echo "exec grep -v '^[ ]*#'" >spitshell
1585 $eunicefix spitshell
1586 spitshell=`pwd`/spitshell
1588 echo "I presume that if # doesn't work, #! won't work either!"
1593 : figure out how to guarantee sh startup
1595 '') startsh=${sharpbang}${sh} ;;
1607 : echo "Yup, it does."
1609 echo "Hmm... '$startsh' does not guarantee sh startup..."
1610 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1614 : Save command line options in file UU/cmdline.opt for later use in
1615 : generating config.sh.
1616 cat > cmdline.opt <<EOSH
1617 : Configure command line arguments.
1626 cat >>cmdline.opt <<EOSH
1627 config_arg$argn='$arg'
1629 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1632 arg_exp=`cat cmdl.opt`
1633 args_exp="$args_exp$args_sep'$arg_exp'"
1634 argn=`expr $argn + 1`
1639 : produce awk script to parse command line options
1640 cat >options.awk <<'EOF'
1642 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1644 len = length(optstr);
1645 for (i = 1; i <= len; i++) {
1646 c = substr(optstr, i, 1);
1647 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1658 if (substr(str, 1, 1) != "-") {
1659 printf("'%s'\n", str);
1663 for (i = 2; i <= len; i++) {
1664 c = substr(str, i, 1);
1666 printf("-%s\n", substr(str, i));
1672 printf("'%s'\n", substr(str, i + 1));
1685 : process the command line options
1686 set X `for arg in "$@"; do echo "X$arg"; done |
1687 sed -e s/X// | awk -f options.awk`
1692 : set up default values
1701 rm -f optdef.sh posthint.sh
1702 cat >optdef.sh <<EOS
1708 while test $# -gt 0; do
1710 -d) shift; fastread=yes;;
1711 -e) shift; alldone=cont;;
1715 if test -r "$1"; then
1718 echo "$me: cannot read config file $1." >&2
1724 -h) shift; error=true;;
1725 -r) shift; reuseval=true;;
1726 -s) shift; silent=true; realsilent=true;;
1727 -E) shift; alldone=exit;;
1728 -K) shift; knowitall=true;;
1730 -S) shift; silent=true; extractsh=true;;
1735 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1736 echo "$me: ignoring -D $1" >&2
1739 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1740 *) echo "$1='define'" >> optdef.sh;;
1747 *=) echo "$1" >> optdef.sh;;
1749 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1750 echo "$me: ignoring -U $1" >&2
1752 *) echo "$1='undef'" >> optdef.sh;;
1763 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
1767 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
1768 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1774 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1775 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1776 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1777 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1778 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1779 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
1785 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1787 echo "$yyy=''" >> posthint.sh ;;
1792 echo "$yyy='$zzz'" >> posthint.sh ;;
1794 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1796 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1801 echo "$yyy=$zzz" >> posthint.sh ;;
1802 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1806 -V) echo "$me generated by metaconfig 3.5 PL0." >&2
1809 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1817 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1818 [-U symbol] [-U symbol=] [-A command:symbol...]
1819 -d : use defaults for all answers.
1820 -e : go on without questioning past the production of config.sh.
1821 -f : specify an alternate default configuration file.
1822 -h : print this help message and exit (with an error status).
1823 -r : reuse C symbols value if possible (skips costly nm extraction).
1824 -s : silent mode, only echoes questions and essential information.
1825 -D : define symbol to have some value:
1826 -D symbol symbol gets the value 'define'
1827 -D symbol=value symbol gets the value 'value'
1828 common used examples (see INSTALL for more info):
1829 -Duse64bitint use 64bit integers
1830 -Duse64bitall use 64bit integers and pointers
1831 -Dusethreads use thread support
1832 -Dinc_version_list=none do not include older perl trees in @INC
1833 -DEBUGGING=none DEBUGGING options
1834 -Dcc=gcc choose your compiler
1835 -Dprefix=/opt/perl5 choose your destination
1836 -E : stop at the end of questions, after having produced config.sh.
1837 -K : do not use unless you know what you are doing.
1838 -O : ignored for backward compatibility
1839 -S : perform variable substitutions on all .SH files (can mix with -f)
1840 -U : undefine symbol:
1841 -U symbol symbol gets the value 'undef'
1842 -U symbol= symbol gets completely empty
1844 -A : manipulate symbol after the platform specific hints have been applied:
1845 -A append:symbol=value append value to symbol
1846 -A symbol=value like append:, but with a separating space
1847 -A define:symbol=value define symbol to have value
1848 -A clear:symbol define symbol to be ''
1849 -A define:symbol define symbol to be 'define'
1850 -A eval:symbol=value define symbol to be eval of value
1851 -A prepend:symbol=value prepend value to symbol
1852 -A undef:symbol define symbol to be 'undef'
1853 -A undef:symbol= define symbol to be ''
1854 e.g.: -A prepend:libswanted='cl pthread '
1855 -A ccflags=-DSOME_MACRO
1856 -V : print version number and exit (with a zero status).
1863 case "$fastread$alldone" in
1866 case "$extractsh" in
1869 if test ! -t 0; then
1870 echo "Say 'sh Configure', not 'sh <Configure'"
1880 true) exec 1>/dev/null;;
1883 : run the defines and the undefines, if any, but leave the file out there...
1885 grep '\\' optdef.sh >/dev/null 2>&1
1886 if test $? = 0; then
1887 echo "Configure does not support \\ in -D arguments"
1891 : create the posthint manipulation script and leave the file out there...
1896 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1897 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1898 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`"-"`echo AbyZ | tr '[:upper:]' '[:lower:]' 2>/dev/null`" in
1899 ABYZ-abyz) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1900 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1903 : Some greps do not return status, grrr.
1904 echo "grimblepritz" >grimble
1905 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1907 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1913 : the following should work in any shell
1917 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1918 cat >contains <<'EOSS'
1919 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1924 : Find the path to the source tree
1927 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1931 *) src=`cd ../$src && pwd` ;;
1944 if test -f $rsrc/Configure && \
1945 $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
1947 : found it, so we are ok.
1950 for src in . .. ../.. ../../.. ../../../..; do
1951 if test -f ../$src/Configure && \
1952 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1963 Sorry, I can't seem to locate the source dir for $package. Please start
1964 Configure with an explicit path -- i.e. /some/path/Configure.
1972 echo "Sources for $package found in \"$src\"." >&4
1976 : script used to extract .SH files with variable substitutions
1977 cat >extract <<'EOS'
1979 echo "Doing variable substitutions on .SH files..."
1980 if test -f MANIFEST; then
1981 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
1983 echo "(Looking for .SH files under the source directory.)"
1984 set x `(cd "$src"; find . -name "*.SH" -print)`
1988 0) set x `(cd "$src"; echo *.SH)`; shift;;
1990 if test ! -f "$src/$1"; then
1996 while test $name; do
1997 if test ! -d "$name"; then
1998 create="$name $create";
1999 name=`echo $name | sed -e "s|^[^/]*$||"`;
2000 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
2005 for file in $create; do
2014 dir=`expr X$file : 'X\(.*\)/'`
2015 file=`expr X$file : 'X.*/\(.*\)'`
2016 (cd "$dir" && . ./$file)
2026 dir=`expr X$file : 'X\(.*\)/'`
2027 file=`expr X$file : 'X.*/\(.*\)'`
2028 (set x $dir; shift; eval $mkdir_p)
2029 sh <"$src/$dir/$file"
2038 if test -f "$src/config_h.SH"; then
2039 if test ! -f config.h; then
2040 : oops, they left it out of MANIFEST, probably, so do it anyway.
2041 . "$src/config_h.SH"
2046 : extract files and exit if asked to do so
2047 case "$extractsh" in
2049 case "$realsilent" in
2053 case "$config_sh" in
2054 '') config_sh='config.sh';;
2057 echo "Fetching answers from $config_sh..."
2064 echo "Extraction done."
2069 : Eunice requires " " instead of "", can you believe it
2072 echo "Beginning of configuration questions for $package."
2074 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
2076 : first determine how to suppress newline on echo command
2078 echo "Checking echo to see how to suppress newlines..."
2079 (echo "hi there\c" ; echo " ") >.echotmp
2080 if $contains c .echotmp >/dev/null 2>&1 ; then
2091 echo $n "The star should be here-->$c"
2095 : Now test for existence of everything in MANIFEST
2097 if test -f "$rsrc/MANIFEST"; then
2098 echo "First let's make sure your kit is complete. Checking..." >&4
2099 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
2100 (split -l 50 2>/dev/null || split -50)
2103 for filelist in x??; do
2104 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
2105 >/dev/null 2>>"$tmppwd/missing")
2107 if test -s missing; then
2111 THIS PACKAGE SEEMS TO BE INCOMPLETE.
2113 You have the option of continuing the configuration process, despite the
2114 distinct possibility that your kit is damaged, by typing 'y'es. If you
2115 do, don't blame me if something goes wrong. I advise you to type 'n'o
2116 and contact the author (perlbug@perl.org).
2119 echo $n "Continue? [n] $c" >&4
2123 echo "Continuing..." >&4
2127 echo "ABORTING..." >&4
2132 echo "Looks good..."
2135 echo "There is no MANIFEST file. I hope your kit is complete !"
2139 : Find the appropriate value for a newline for tr
2140 if test -n "$DJGPP"; then
2143 if test X"$trnl" = X; then
2144 case "`echo foo | tr '\n' x 2>/dev/null`" in
2148 if test X"$trnl" = X; then
2149 case "`echo foo | tr '\012' x 2>/dev/null`" in
2150 foox) trnl='\012' ;;
2153 if test X"$trnl" = X; then
2154 case "`echo foo | tr '\r\n' xy 2>/dev/null`" in
2155 fooxy) trnl='\n\r' ;;
2158 if test X"$trnl" = X; then
2161 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
2167 : compute the number of columns on the terminal for proper question formatting
2172 : set up the echo used in my read
2173 myecho="case \"\$xxxm\" in
2174 '') echo $n \"\$rp $c\" >&4;;
2176 '') echo $n \"[\$xxxm] $c\";;
2178 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
2180 echo $n \"[\$xxxm] $c\" >&4
2182 echo $n \"\$rp [\$xxxm] $c\" >&4
2188 : now set up to do reads with possible shell escape and default assignment
2194 case "\$fastread" in
2195 yes) case "\$dflt" in
2198 case "\$silent-\$rp" in
2203 *) case "\$silent" in
2204 true) case "\$rp" in
2209 while expr "X\$ans" : "X!" >/dev/null; do
2213 aok=''; eval "ans=\\"\$answ\\"" && aok=y
2221 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
2230 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
2235 echo "(OK, I'll run with -d after this question.)" >&4
2238 echo "*** Sorry, \$1 not supported yet." >&4
2248 echo "*** Substitution done -- please confirm."
2250 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
2255 echo "*** Error -- try again."
2262 case "\$ans\$xxxm\$nostick" in
2274 : create .config dir to save info across Configure sessions
2275 test -d ../.config || mkdir ../.config
2276 cat >../.config/README <<EOF
2277 This directory created by Configure to save information that should
2278 persist across sessions for $package.
2280 You may safely delete it if you wish.
2283 : See if we are using a devel version and want that
2284 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
2287 usedevel="$define" ;;
2288 *) case "$xversion" in
2291 *** WHOA THERE!!! ***
2293 This is an UNSTABLE DEVELOPMENT release.
2294 The version of this $package distribution is $xversion, that is, odd,
2295 (as opposed to even) and that signifies a development release.
2296 If you want a maintenance release, you want an even-numbered version.
2298 Do ***NOT*** install this into production use.
2299 Data corruption and crashes are possible.
2301 It is most seriously suggested that you do not continue any further
2302 unless you want to help in developing and debugging Perl.
2304 If you *still* want to build perl, you can answer 'y' now,
2305 or pass -Dusedevel to Configure.
2308 rp='Do you really want to continue?'
2312 [yY]) echo >&4 "Okay, continuing."
2313 usedevel="$define" ;;
2314 *) echo >&4 "Okay, bye."
2325 case "$versiononly" in
2326 '') versiononly="$define" ;;
2328 case "$installusrbinperl" in
2329 '') installusrbinperl="$undef" ;;
2334 : general instructions
2337 user=`(logname) 2>/dev/null`
2339 '') user=`whoami 2>&1`;;
2341 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2344 rp='Would you like to see the instructions?'
2355 This installation shell script will examine your system and ask you questions
2356 to determine how the perl5 package should be installed. If you get
2357 stuck on a question, you may use a ! shell escape to start a subshell or
2358 execute a command. Many of the questions will have default answers in square
2359 brackets; typing carriage return will give you the default.
2361 On some of the questions which ask for file or directory names you are allowed
2362 to use the ~name construct to specify the login directory belonging to "name",
2363 even if you don't have a shell which knows about that. Questions where this is
2364 allowed will be marked "(~name ok)".
2368 dflt='Type carriage return to continue'
2372 The prompter used in this script allows you to use shell variables and
2373 backticks in your answers. You may use $1, $2, etc... to refer to the words
2374 in the default answer, as if the default line was a set of arguments given to a
2375 script shell. This means you may also use $* to repeat the whole default line,
2376 so you do not have to re-type everything to add something to the default.
2378 Every time there is a substitution, you will have to confirm. If there is an
2379 error (e.g. an unmatched backtick), the default answer will remain unchanged
2380 and you will be prompted again.
2382 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2383 the questions and use the computed defaults (or the previous answers if there
2384 was already a config.sh file). Type 'Configure -h' for a list of options.
2385 You may also start interactively and then answer '& -d' at any prompt to turn
2386 on the non-interactive behaviour for the remainder of the execution.
2392 Much effort has been expended to ensure that this shell script will run on any
2393 Unix system. If despite that it blows up on yours, your best bet is to edit
2394 Configure and run it again. If you can't run Configure for some reason,
2395 you'll have to generate a config.sh file by hand. Whatever problems you
2396 have, let me (perlbug@perl.org) know how I blew it.
2398 This installation script affects things in two ways:
2400 1) it may do direct variable substitutions on some of the files included
2402 2) it builds a config.h file for inclusion in C programs. You may edit
2403 any of these files as the need arises after running this script.
2405 If you make a mistake on a question, there is no easy way to back up to it
2406 currently. The easiest thing to do is to edit config.sh and rerun all the SH
2407 files. Configure will offer to let you do this before it runs the SH files.
2410 dflt='Type carriage return to continue'
2412 case "$firsttime" in
2413 true) echo $user >>../.config/instruct;;
2417 : Set 'sysroot' to change the logical root directory to your headers and libraries see man gcc
2418 : This is primarily meant for cross-compile environments, and may fail to be useful in other cases
2419 if test "X$sysroot" = X; then
2424 echo "Using $sysroot to find your headers and libraries, adding to ccflags"
2425 # _sysroot is used in places where we need --sysroot=foo
2426 # but using the rest of the flags could cause issues.
2427 _sysroot="--sysroot=$sysroot";
2431 ccflags="$ccflags $_sysroot"
2436 ldflags="$ldflags $_sysroot"
2441 cppflags="$cppflags $_sysroot"
2443 # lddlflags updated below in lddlflags section;
2444 # same with cccdlflags
2448 # Adjust some defaults to also use $sysroot
2449 for var in xlibpth loclibpth locincpth glibpth; do
2452 for path in $xxx; do
2453 eval $var=\"\$$var $sysroot$path\"
2459 : find out where common programs are
2461 echo "Locating common programs..." >&4
2474 if test -d \$dir/\$thing; then
2480 for thisthing in \$dir/\$thing; do
2481 : just loop through to pick last item
2483 if test -f \$thisthing; then
2486 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2489 elif test -f \$dir/\$thing.exe; then
2490 if test -n "$DJGPP"; then
2491 echo \$dir/\$thing.exe
2492 elif test "$eunicefix" != ":"; then
2493 : on Eunice apparently
2546 pth=`echo $PATH | sed -e "s/$p_/ /g"`
2547 pth="$pth $sysroot/lib $sysroot/usr/lib"
2548 for file in $loclist; do
2552 if test -f "$xxx"; then
2555 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2556 xxx=`./loc $file $file $pth`
2559 '') xxx=`./loc $file $file $pth`;;
2560 *) xxx=`./loc $xxx $xxx $pth`;;
2562 eval $file=$xxx$_exe
2566 echo $file is in $xxx.
2569 echo $file is in $xxx.
2572 echo "I don't know where '$file' is, and my life depends on it." >&4
2573 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2579 echo "Don't worry if any of the following aren't found..."
2581 for file in $trylist; do
2585 if test -f "$xxx"; then
2588 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2589 xxx=`./loc $file $file $pth`
2592 '') xxx=`./loc $file $file $pth`;;
2593 *) xxx=`./loc $xxx $xxx $pth`;;
2595 eval $file=$xxx$_exe
2599 echo $file is in $xxx.
2602 echo $file is in $xxx.
2605 echo "I don't see $file out there, $say."
2612 echo "Substituting grep for egrep."
2619 *) if $less -R </dev/null >/dev/null 2>&1; then
2620 echo "Substituting less -R for less."
2628 echo "Substituting cp for ln."
2637 echo "I can't find make or gmake, and my life depends on it." >&4
2638 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2646 *) # We can't have osname yet.
2647 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2648 # Assume that gmake, if found, is definitely GNU make
2649 # and prefer it over the system make.
2650 echo "Substituting gmake for make."
2658 echo "Hopefully test is built into your sh."
2661 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2662 echo "Using the test built into your sh."
2670 echo "Hopefully echo is built into your sh."
2675 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2676 $echo $n "hi there$c" >foo1
2677 echo $n "hi there$c" >foo2
2678 if cmp foo1 foo2 >/dev/null 2>&1; then
2679 echo "They are compatible. In fact, they may be identical."
2686 They are not compatible! You are probably running ksh on a non-USG system.
2687 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2688 have echo built in and we may have to run some Bourne shell scripts. That
2689 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2692 $echo $n "The star should be here-->$c"
2699 # This question was auctioned at YAPC::Europe-2007 in Vienna
2700 # I never promised you could answer it. I only auctioned the question.
2702 The following message is sponsored by
2704 Dresden.pm<--The stars should be here.
2706 Dear Perl user, system administrator or package
2707 maintainer, the Perl community sends greetings to
2708 you. Do you (emblematical) greet back [Y/n]? n
2712 : Check what type of C compiler we use
2716 cat <<'EOSC' >>trygcc
2721 int main(int argc, char *argv[]) {
2725 if $cc -o try $ccflags $ldflags try.c; then
2728 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2734 # Skip this test because it gives a false match on output like:
2735 # ./trygcc: line 23: cc: command not found
2736 # case "`$cc -v -c try.c 2>&1`" in
2737 # *gcc*) trygcc=no ;;
2739 if $test X"$trygcc" = Xyes; then
2740 if gcc -o try -c try.c; then
2742 echo "You seem to have a working gcc, though." >&4
2743 # Switching compilers may undo the work of hints files.
2744 # The most common problem is -D_REENTRANT for threads.
2745 # This heuristic catches that case, but gets false positives
2746 # if -Dusethreads was not actually specified. Better to
2747 # bail out here with a useful message than fail
2748 # mysteriously later. Should we perhaps just try to
2749 # re-invoke Configure -Dcc=gcc config_args ?
2750 if $test -f usethreads.cbu; then
2753 *** However, any setting of the C compiler flags (e.g. for thread support)
2754 *** will be lost. It may be necessary for you to restart Configure and
2755 *** add -Dcc=gcc to your Configure command line.
2758 rp="Would you like to go ahead and try gcc anyway?"
2761 rp="Would you like to use it?"
2764 if $test -f myread; then
2767 if $test -f UU/myread; then
2770 echo "Cannot find myread, sorry. Aborting." >&2
2775 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2788 cat <<'EOSC' >>checkcc
2793 int main(int argc, char *argv[]) {
2797 if $cc -o try $ccflags $ldflags try.c; then
2800 if $test X"$despair" = Xyes; then
2801 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2804 You need to find a working C compiler.
2805 Either (purchase and) install the C compiler supplied by your OS vendor,
2806 or for a free C compiler try http://gcc.gnu.org/
2807 I cannot continue any further, aborting.
2816 : determine whether symbolic links are supported
2819 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2820 echo "Symbolic links are supported." >&4
2823 echo "Symbolic links are NOT supported." >&4
2828 : determine whether symbolic links are supported
2832 echo "Checking how to test for symbolic links..." >&4
2834 if $test "X$issymlink" = X; then
2836 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2837 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2839 if test $? = 0; then
2842 echo "Your builtin 'test -h' may be broken." >&4
2845 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2848 if test -f "$p/$test"; then
2857 echo "Trying external '$test -h'." >&4
2858 issymlink="$test -h"
2859 if $test ! -h sym >/dev/null 2>&1; then
2860 echo "External '$test -h' is broken, too." >&4
2868 if $test "X$issymlink" = X; then
2869 if $test -L sym 2>/dev/null; then
2870 issymlink="$test -L"
2871 echo "The builtin '$test -L' worked." >&4
2874 if $test "X$issymlink" != X; then
2875 echo "You can test for symbolic links with '$issymlink'." >&4
2877 echo "I do not know how you can test for symbolic links." >&4
2881 *) echo "No symbolic links, so not testing for their testing..." >&4
2885 : Make symlinks util
2886 case "$mksymlinks" in
2889 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2892 *) case "$lns:$issymlink" in
2893 *"ln"*" -s:"*"test -"?)
2894 echo "Creating the symbolic links..." >&4
2896 awk '{print $1}' $src/MANIFEST | sed -e 's:/\([^/]*\)$: \1:' |
2906 print "# dir = ", dir, "file = ", file
2907 mf[dir] = mf[dir]" "source"/"dir"/"file;
2910 if (d != ".") { print("mkdir -p "d) }
2911 print("ln -sf "mf[d]" "d);
2913 }' source="$src" > UU/mksymlinks.$$
2917 if test ! -d t/base; then
2918 echo "Failed to create the subdirectories. Aborting." >&4
2922 if test ! -f t/base/lex.t; then
2923 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
2926 if test ! -f win32/win32.c; then
2927 echo "Failed to create the symlinks (win32/win32.c missing). Aborting." >&4
2932 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2940 : Check for Cross-Compilation
2941 if $test "X$targethost" = "X"; then
2944 if $test "X$targetenv" = "X"; then
2947 case "$usecrosscompile" in
2949 $echo "Cross-compiling..."
2952 *-gcc*|*-g++*) # A cross-compiling gcc, probably.
2953 # arm-linux-androideabi-gcc -> arm-linux-androideabi
2954 # x86_64-w64-mingw32-gcc.exe -> x86_64-w64-mingw32
2955 targetarch=`$echo $cc|$sed 's/-g[c\+][c\+].*$//'`
2956 ar=`$echo $cc|$sed 's/-g[c\+][c\+]/-ar/'`
2957 # leave out ld, choosing it is more complex
2958 nm=`$echo $cc|$sed 's/-g[c\+][c\+]/-nm/'`
2959 ranlib=`$echo $cc|$sed 's/-g[c\+][c\+]/-ranlib/'`
2960 # We are in a weird spot. Just before us, some values
2961 # were 'saved', to be restored after the hints are
2962 # run. This means that the changes we made to ar,
2963 # nm and ranlib will get reverted.
2964 # To avoid that, we hijack the saving mechanism and
2965 # have it save our new values.
2966 for file in ar nm ranlib; do
2968 eval $file=$xxx$_exe
2973 case "$targetarch" in
2974 '') echo "Targetarch not defined." >&4; croak=y ;;
2975 *) echo "Using targetarch $targetarch." >&4 ;;
2977 case "$targethost" in
2978 '') echo "Targethost not defined." >&4; croak=n ;;
2979 *) echo "Using targethost $targethost." >&4
2984 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
2986 : compile a host miniperl and generate_uudmap, unless we got passed them
2987 if $test "X$hostperl" = X; then
2988 echo "Building host miniperl and generate_uudmap binaries" >&4
2996 $src/Configure -des -Dusedevel -Dmksymlinks
2998 case "$hostgenerate" in
2999 '') $make generate_uudmap
3000 hostgenerate=$src/host/generate_uudmap
3002 "$undef") hostgenerate=''
3005 hostperl=$src/host/miniperl
3008 hostosname=`$hostperl -le 'print $^O'`
3011 usecrosscompile="$undef"
3015 : Define -Dtargethost=somecomputer to run compiled tests on another machine
3016 case "$targethost" in
3017 '') echo "Checking for cross-compile" >&4
3018 case "$usecrosscompile$multiarch" in
3019 *$define*) echo "Skipping the try tests in the rest of Configure as no targethost was defined when cross-compiling" >&4
3020 if [ -f Makefile ]; then
3022 echo "Now you must ensure config.sh, config.h and the generated headers exist and run a $make."
3024 echo "Configure done."
3028 *) echo "No targethost for running compiler tests against defined, running locally" >&4
3035 *) echo "Using targethost $targethost." >&4
3037 /*) run=$src/Cross/run
3038 targetmkdir=$src/Cross/mkdir
3040 from=$src/Cross/from
3042 *) pwd=`$test -f ../Configure & cd ..; pwd`
3044 targetmkdir=$pwd/Cross/mkdir
3046 from=$pwd/Cross/from
3049 case "$targetrun" in
3050 '') targetrun=ssh ;;
3055 case "$targetfrom" in
3056 '') targetfrom=scp ;;
3060 from=$from-$targetfrom
3061 case "$targetdir" in
3063 echo "Guessing targetdir $targetdir." >&4
3066 case "$targetuser" in
3068 echo "Guessing targetuser $targetuser." >&4
3071 case "$targetport" in
3073 echo "Guessing targetport $targetport." >&4
3076 case "$targetfrom" in
3080 case "$targetrun" in
3100 '') cwd=$targetdir ;;
3105 $targetrun -p $targetport -l $targetuser $targethost "cd \$cwd && \$env \$exe \$@"
3111 *) echo "Unknown targetrun '$targetrun'" >&4
3115 case "$targetmkdir" in
3117 cat >$targetmkdir <<EOF
3119 $targetrun -p $targetport -l $targetuser $targethost "mkdir -p \$@"
3121 $chmod a+rx $targetmkdir
3123 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
3135 $targetmkdir \`dirname \$f\`
3136 $targetto -P $targetport -r $q \$f $targetuser@$targethost:\$f 2>/dev/null || exit 1
3139 $targetmkdir $targetdir/\`dirname \$f\`
3140 $targetto -P $targetport -r $q \$f $targetuser@$targethost:$targetdir/\$f 2>/dev/null || exit 1
3153 $mkdir -p $targetdir/\`dirname \$f\`
3154 $cp \$f $targetdir/\$f || exit 1
3157 $targetmkdir $targetdir/\`dirname \$f\`
3158 $cp \$f $targetdir/\$f || exit 1
3165 *) echo "Unknown targetto '$targetto'" >&4
3169 case "$targetfrom" in
3176 $targetfrom -P $targetport $q $targetuser@$targethost:$targetdir/\$f . || exit 1
3181 cp) cat >$from <<EOF
3186 cp $targetdir/\$f . || exit 1
3191 *) echo "Unknown targetfrom '$targetfrom'" >&4
3195 if $test ! -f $run; then
3196 echo "Target 'run' script '$run' not found." >&4
3200 if $test ! -f $to; then
3201 echo "Target 'to' script '$to' not found." >&4
3205 if $test ! -f $from; then
3206 echo "Target 'from' script '$from' not found." >&4
3210 if $test ! -f $run -o ! -f $to -o ! -f $from; then
3214 Using '$run' for remote execution,
3215 and '$from' and '$to'
3216 for remote file transfer.
3222 usecrosscompile="$undef"
3227 : see whether [:lower:] and [:upper:] are supported character classes
3229 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`"-"`echo AbyZ | $tr '[:upper:]' '[:lower:]' 2>/dev/null`" in
3231 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
3235 *) # There is a discontinuity in EBCDIC between 'R' and 'S'
3236 # (0xd9 and 0xe2), therefore that is a nice testing point.
3237 if test "X$up" = X -o "X$low" = X; then
3238 case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in
3244 if test "X$up" = X -o "X$low" = X; then
3245 case "`echo RS | $tr R-S r-s 2>/dev/null`" in
3251 if test "X$up" = X -o "X$low" = X; then
3252 case "`echo RS | od -x 2>/dev/null`" in
3254 echo "Hey, this might be EBCDIC." >&4
3255 if test "X$up" = X -o "X$low" = X; then
3256 case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
3257 rs) up='[A-IJ-RS-Z]'
3262 if test "X$up" = X -o "X$low" = X; then
3263 case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
3273 case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in
3275 echo "Using $up and $low to convert case." >&4
3278 echo "I don't know how to translate letters from upper to lower case." >&4
3279 echo "Your tr is not acting any way I know of." >&4
3283 : set up the translation script tr, must be called with ./tr of course
3287 '[A-Z][a-z]') exec $tr '$up' '$low';;
3288 '[a-z][A-Z]') exec $tr '$low' '$up';;
3295 : Try to determine whether config.sh was made on this system
3296 case "$config_sh" in
3298 myuname=`$uname -a 2>/dev/null`
3299 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
3300 # Downcase everything to avoid ambiguity.
3301 # Remove slashes and single quotes so we can use parts of this in
3302 # directory and file names.
3303 # Remove newlines so myuname is sane to use elsewhere.
3304 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
3305 # because the A-Z/a-z are not consecutive.
3306 myuname=`echo $myuname | $sed -e "s,['/],,g" | \
3307 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
3308 newmyuname="$myuname"
3310 case "$knowitall" in
3312 if test -f ../config.sh; then
3313 if $contains myuname= ../config.sh >/dev/null 2>&1; then
3314 eval "`grep myuname= ../config.sh`"
3316 if test "X$myuname" = "X$newmyuname"; then
3324 : Get old answers from old config file if Configure was run on the
3325 : same system, otherwise use the hints.
3328 if test -f config.sh; then
3330 rp="I see a config.sh file. Shall I use it to set the defaults?"
3333 n*|N*) echo "OK, I'll ignore it."
3334 mv config.sh config.sh.old
3335 myuname="$newmyuname"
3337 *) echo "Fetching default answers from your old config.sh file..." >&4
3345 : Older versions did not always set $sh. Catch re-use of such
3355 if test ! -f config.sh; then
3358 First time through, eh? I have some defaults handy for some systems
3359 that need some extra help getting the Configure answers right:
3362 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
3364 : Half the following guesses are probably wrong... If you have better
3365 : tests or hints, please send them to perlbug@perl.org
3366 : The metaconfig authors would also appreciate a copy...
3367 $test -f /irix && osname=irix
3368 $test -f /xenix && osname=sco_xenix
3369 $test -f /dynix && osname=dynix
3370 $test -f /dnix && osname=dnix
3371 $test -f /lynx.os && osname=lynxos
3372 $test -f /unicos && osname=unicos && osvers=`$uname -r`
3373 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
3374 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
3375 $test -f /bin/mips && /bin/mips && osname=mips
3376 $test -d /usr/apollo/bin && osname=apollo
3377 $test -f /etc/saf/_sactab && osname=svr4
3378 $test -d /usr/include/minix && osname=minix && osvers=`$uname -r`
3379 $test -f /system/gnu_library/bin/ar.pm && osname=vos
3380 $test -f /sys/utilities/MultiView && osname=amigaos
3381 if $test -d /MachTen -o -d /MachTen_Folder; then
3383 if $test -x /sbin/version; then
3384 osvers=`/sbin/version | $awk '{print $2}' |
3385 $sed -e 's/[A-Za-z]$//'`
3386 elif $test -x /usr/etc/version; then
3387 osvers=`/usr/etc/version | $awk '{print $2}' |
3388 $sed -e 's/[A-Za-z]$//'`
3394 $test -f /sys/posix.dll &&
3395 $test -f /usr/bin/what &&
3396 set X `/usr/bin/what /sys/posix.dll` &&
3397 $test "$3" = UWIN &&
3401 if $test -f $uname; then
3409 umips) osname=umips ;;
3412 [23]100) osname=mips ;;
3414 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
3415 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
3418 elif $test -f /etc/kconfig; then
3420 if test "$lns" = "$ln -s"; then
3422 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3424 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
3431 if test -n "$DJGPP"; then
3440 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3442 # oslevel can fail with:
3443 # oslevel: Unable to acquire lock.
3444 *not\ found) osvers="$4"."$3" ;;
3445 '<3240'|'<>3240') osvers=3.2.0 ;;
3446 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3447 '=3250'|'>3250') osvers=3.2.5 ;;
3451 bitrig) osname=bitrig
3454 bsd386) osname=bsd386
3457 cygwin*) osname=cygwin
3460 *dc.osx) osname=dcosx
3466 domainos) osname=apollo
3472 dragonfly) osname=dragonfly
3475 dynixptx*) osname=dynixptx
3476 osvers=`echo "$4"|sed 's/^v//'`
3478 freebsd) osname=freebsd
3480 genix) osname=genix ;;
3484 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
3497 $test -f /system/lib/libandroid.so && osname=linux-android
3504 netbsd*) osname=netbsd
3507 news-os) osvers="$3"
3509 4*) osname=newsos4 ;;
3513 nonstop-ux) osname=nonstopux ;;
3514 openbsd) osname=openbsd
3520 POSIX-BC | posix-bc ) osname=posix-bc
3523 powerux | power_ux | powermax_os | powermaxos | \
3524 powerunix | power_unix) osname=powerux
3530 solaris) osname=solaris
3532 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3539 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3543 titanos) osname=titanos
3552 ultrix) osname=ultrix
3555 osf1|mls+) case "$5" in
3558 osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
3561 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3564 hp*) osname=hp_osf1 ;;
3565 mips) osname=mips_osf1 ;;
3568 # UnixWare 7.1.2 is known as Open UNIX 8
3569 openunix|unixware) osname=svr5
3577 $2) case "$osname" in
3581 : svr4.x or possibly later
3591 if test -f /stand/boot ; then
3592 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
3593 if test -n "$INITPROG" -a -f "$INITPROG"; then
3594 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3595 if test -n "$isesix"; then
3603 *) if test -f /etc/systemid; then
3605 set `echo $3 | $sed 's/\./ /g'` $4
3606 if $test -f $src/hints/sco_$1_$2_$3.sh; then
3608 elif $test -f $src/hints/sco_$1_$2.sh; then
3610 elif $test -f $src/hints/sco_$1.sh; then
3615 '') : Still unknown. Probably a generic Sys V.
3624 *) case "$osname" in
3625 '') : Still unknown. Probably a generic BSD.
3633 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3634 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3635 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3638 $rm -f UU/kernel.what
3639 elif test -d c:/. -o -n "$is_os2" ; then
3646 case "$targetarch" in
3649 case "$targetarch" in
3651 # Will load qnx.sh, which should change osname to nto
3656 # Catch arm-linux-androideabi, mipsel-linux-android,
3657 # and i686-linux-android
3658 osname=linux-android
3662 # Something like arm-linux-gnueabihf is really just
3669 # XXX perhaps we should just assume
3670 # osvers to be 2, or maybe take the value
3671 # from targetarch. Using $run before the
3672 # hints are run is somewhat icky.
3673 set X `$run $uname -a 2>/dev/null`
3676 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3681 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3688 : Now look for a hint file osname_osvers, unless one has been
3689 : specified already.
3692 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
3693 : Also try without trailing minor version numbers.
3694 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3695 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3696 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3697 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
3700 *) case "$osvers" in
3703 *) if $test -f $src/hints/$file.sh ; then
3705 elif $test -f $src/hints/$xfile.sh ; then
3707 elif $test -f $src/hints/$xxfile.sh ; then
3709 elif $test -f $src/hints/$xxxfile.sh ; then
3711 elif $test -f $src/hints/$xxxxfile.sh ; then
3713 elif $test -f "$src/hints/${osname}.sh" ; then
3722 if $test -f Policy.sh ; then
3725 none) dflt="Policy" ;;
3726 *) dflt="Policy $dflt" ;;
3731 dflt=`echo $hintfile | $sed 's/\.sh$//'`
3735 if $test -f Policy.sh ; then
3738 There's also a Policy hint file available, which should make the
3739 site-specific (policy) questions easier to answer.
3746 You may give one or more space-separated answers, or "none" if appropriate.
3747 If you have a handcrafted Policy.sh file or a Policy.sh file generated by a
3748 previous run of Configure, you may specify it as well as or instead of
3749 OS-specific hints. If hints are provided for your OS, you should use them:
3750 although Perl can probably be built without hints on many platforms, using
3751 hints often improve performance and may enable features that Configure can't
3752 set up on its own. If there are no hints that match your OS, specify "none";
3753 DO NOT give a wrong version or a wrong OS.
3757 rp="Which of these apply, if any?"
3760 for file in $tans; do
3761 if $test X$file = XPolicy -a -f Policy.sh; then
3763 $cat Policy.sh >> UU/config.sh
3764 elif $test -f $src/hints/$file.sh; then
3765 . $src/hints/$file.sh
3766 $cat $src/hints/$file.sh >> UU/config.sh
3767 elif $test X"$tans" = X -o X"$tans" = Xnone ; then
3770 : Give one chance to correct a possible typo.
3771 echo "$file.sh does not exist"
3773 rp="hint to use instead?"
3775 for file in $ans; do
3776 if $test -f "$src/hints/$file.sh"; then
3777 . $src/hints/$file.sh
3778 $cat $src/hints/$file.sh >> UU/config.sh
3779 elif $test X$ans = X -o X$ans = Xnone ; then
3782 echo "$file.sh does not exist -- ignored."
3789 : Remember our hint file for later.
3790 if $test -f "$src/hints/$file.sh" ; then
3800 echo "Fetching default answers from $config_sh..." >&4
3804 cp $config_sh config.sh 2>/dev/null
3816 : Restore computed paths
3817 for file in $loclist $trylist; do
3818 eval $file="\$_$file"
3823 Configure uses the operating system name and version to set some defaults.
3824 The default value is probably right if the name rings a bell. Otherwise,
3825 since spelling matters for me, either accept the default or answer "none"
3832 ''|' '|none) dflt=none ;;
3833 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
3836 *) dflt="$osname" ;;
3838 rp="Operating system name?"
3842 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
3848 ''|' '|none) dflt=none ;;
3849 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
3850 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
3852 ''|' ') dflt=none ;;
3857 *) dflt="$osvers" ;;
3859 rp="Operating system version?"
3869 : who configured the system
3870 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
3873 cf_by=`(logname) 2>/dev/null`
3876 cf_by=`(whoami) 2>/dev/null`
3878 "") cf_by=unknown ;;
3883 : decide how portable to be. Allow command line overrides.
3884 case "$d_portable" in
3886 *) d_portable="$define" ;;
3889 : set up shell script to do ~ expansion
3895 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3898 if $test -f /bin/csh; then
3899 /bin/csh -f -c "glob \$1"
3904 name=\`$expr x\$1 : '..\([^/]*\)'\`
3905 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3906 if $test ! -d "\$dir"; then
3908 echo "\$me: can't locate home directory for: \$name" >&2
3913 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3929 : now set up to get a file name
3933 cat <<'EOSC' >>getfile
3949 : getfile will accept an answer from the comma-separated list
3950 : enclosed in parentheses even if it does not meet other criteria.
3951 expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3952 fn=`echo $fn | sed 's/(.*)//'`
3958 loc_file=`expr $fn : '.*:\(.*\)'`
3959 fn=`expr $fn : '\(.*\):.*'`
3967 */*) fullpath=true;;
3976 *e*) exp_file=true;;
3979 *p*) nopath_ok=true;;
3984 *d*) type='Directory';;
3985 *l*) type='Locate';;
3990 Locate) what='File';;
3995 case "$d_portable" in
4003 while test "$type"; do
4008 true) rp="$rp (~name ok)";;
4011 if test -f UU/getfile.ok && \
4012 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
4031 value=`UU/filexp $ans`
4034 if test "$ans" != "$value"; then
4035 echo "(That expands to $value on this system.)"
4049 /*) value="$ansexp" ;;
4050 [a-zA-Z]:/*) value="$ansexp" ;;
4055 echo "I shall only accept a full path name, as in /bin/ls." >&4
4056 echo "Use a ! shell escape if you wish to check pathnames." >&4
4059 echo "Please give a full path name, starting with slash." >&4
4062 echo "Note that using ~name is ok provided it expands well." >&4
4075 for fp in $gfpth; do
4076 if test "X$fp" = X.; then
4081 if test -f "$pf"; then
4083 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
4085 echo "($value is not a plain file, but that's ok.)"
4088 if test X"$type" = X; then
4095 for fp in $gfpth; do
4096 if test "X$fp" = X.; then
4101 direxp="$fp/$ansexp"
4103 if test -d "$direxp"; then
4111 if test -d "$ansexp"; then
4112 echo "(Looking for $loc_file in directory $value.)"
4113 value="$value/$loc_file"
4114 ansexp="$ansexp/$loc_file"
4116 if test -f "$ansexp"; then
4119 case "$nopath_ok" in
4120 true) case "$value" in
4122 *) echo "Assuming $value will be in people's path."
4138 if test "$fastread" = yes; then
4143 rp="$what $value doesn't exist. Use that name anyway?"
4162 test "X$gfpthkeep" != Xy && gfpth=""
4165 : determine root of directory hierarchy where package will be installed.
4168 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
4171 dflt=`echo "$prefix" | sed 's/.$//'`
4179 By default, $package will be installed in $dflt/bin, manual pages
4180 under $dflt/man, etc..., i.e. with $dflt as prefix for all
4181 installation directories. Typically this is something like /usr/local.
4182 If you wish to have binaries under /usr/bin but other parts of the
4183 installation under /usr/local, that's ok: you will be prompted
4184 separately for each of the installation directories, the prefix being
4185 only used to set the defaults.
4189 rp='Installation prefix to use?'
4197 *) oldprefix="$prefix";;
4204 : allow them to override the AFS root
4207 *) afsroot=$afsroot ;;
4213 $define|true) afs=true ;;
4214 $undef|false) afs=false ;;
4215 *) if $test -d $afsroot; then
4223 echo "AFS may be running... I'll be extra cautious then..." >&4
4225 echo "AFS does not seem to be running..." >&4
4228 : determine installation prefix for where package is to be installed.
4232 Since you are running AFS, I need to distinguish the directory in which
4233 files will reside from the directory in which they are installed (and from
4234 which they are presumably copied to the former directory by occult means).
4237 case "$installprefix" in
4238 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
4239 *) dflt="$installprefix";;
4244 In some special cases, particularly when building $package for distribution,
4245 it is convenient to distinguish the directory in which files should be
4246 installed from the directory ($prefix) in which they will
4247 eventually reside. For most users, these two directories are the same.
4250 case "$installprefix" in
4252 *) dflt=$installprefix;;
4256 rp='What installation prefix should I use for installing files?'
4258 installprefix="$ans"
4259 installprefixexp="$ansexp"
4261 : Perform the prefixexp/installprefixexp correction if necessary
4262 cat <<EOS >installprefix
4265 cat <<'EOSC' >>installprefix
4266 : Change installation prefix, if necessary.
4267 if $test X"$prefix" != X"$installprefix"; then
4268 eval "install${prefixvar}=\`echo \$${prefixvar}exp | sed \"s#^\$prefixexp#\$installprefixexp#\"\`"
4270 eval "install${prefixvar}=\"\$${prefixvar}exp\""
4273 chmod +x installprefix
4274 $eunicefix installprefix
4276 : Set variables such as privlib and privlibexp from the output of ./getfile
4277 : performing the prefixexp/installprefixexp correction if necessary.
4278 cat <<EOS >setprefixvar
4281 cat <<'EOSC' >>setprefixvar
4282 eval "${prefixvar}=\"\$ans\""
4283 eval "${prefixvar}exp=\"\$ansexp\""
4286 chmod +x setprefixvar
4287 $eunicefix setprefixvar
4289 : set up the script used to warn in case of inconsistency
4298 '') echo "The $hint value for \$$var on this machine was \"$was\"!" >&4
4300 *) echo "Hmm. Based on the hints in hints/$hintfile.sh, " >&4
4301 echo "the $hint value for \$$var on this machine was \"$was\"!" >&4
4306 echo "*** WHOA THERE!!! ***" >&4
4307 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
4310 rp=" Keep the $hint value?"
4313 y) td=$was; tu=$was;;
4317 : function used to set '$1' to '$val'
4318 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
4320 $define$undef) . ./whoa; eval "$var=\$td";;
4321 $undef$define) . ./whoa; eval "$var=\$tu";;
4322 *) eval "$var=$val";;
4325 : get the patchlevel
4327 echo "Getting the current patchlevel..." >&4
4328 if $test -r $rsrc/patchlevel.h;then
4329 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
4330 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
4331 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4332 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
4333 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
4334 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
4335 perl_patchlevel=`egrep ',"(MAINT|SMOKE)[0-9][0-9]*"' $rsrc/patchlevel.h|tail -1|sed 's/[^0-9]//g'`
4344 $echo "(You do not have patchlevel.h. Eek.)"
4346 : Define a handy string here to avoid duplication in myconfig.SH and configpm.
4347 version_patchlevel_string="version $patchlevel subversion $subversion"
4348 case "$perl_patchlevel" in
4350 *) perl_patchlevel=`echo $perl_patchlevel | sed 's/.* //'`
4351 version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel"
4355 $echo "(You have $package $version_patchlevel_string.)"
4359 : XXX Should be a Configure test for double-dots in filenames.
4360 version=`echo $revision $patchlevel $subversion | \
4361 $awk '{ printf "%d_%d_%d", $1, $2, $3 }'`
4362 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4363 $awk '{ printf "%d_%d_%d", $1, $2, $3 }'`
4366 version=`echo $revision $patchlevel $subversion | \
4367 $awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
4368 api_versionstring=`echo $api_revision $api_version $api_subversion | \
4369 $awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
4372 : Special case the 5.005_xx maintenance series, which used 5.005
4373 : without any subversion label as a subdirectory in $sitelib
4374 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
4375 api_versionstring='5.005'
4378 : Do we want threads support and if so, what type
4379 case "$usethreads" in
4380 $define|true|[yY]*) dflt='y';;
4381 *) # Catch case where user specified ithreads or 5005threads but
4382 # forgot -Dusethreads (A.D. 4/2002)
4383 case "$useithreads$use5005threads" in
4384 *$define*) dflt='y';;
4391 Perl can be built to offer a form of threading support on some systems
4392 To do so, Configure can be run with -Dusethreads.
4394 Note that Perl built with threading support runs slightly slower
4395 and uses slightly more memory than plain Perl.
4397 If this doesn't make any sense to you, just accept the default '$dflt'.
4399 rp='Build a threading Perl?'
4402 y|Y) val="$define" ;;
4408 if $test $patchlevel -lt 9; then
4409 case "$usethreads" in
4411 : Default to ithreads unless overridden on command line or with
4414 case "$use5005threads" in
4416 echo "5.005 threads are no longer supported"
4420 case "$useithreads" in
4421 $undef|false|[nN]*) dflt='n';;
4423 rp='Use the newer interpreter-based ithreads?'
4426 y|Y) val="$define" ;;
4431 : Now set use5005threads to the opposite value.
4432 case "$useithreads" in
4433 $define) val="$undef" ;;
4440 useithreads="$undef"
4441 use5005threads="$undef"
4445 case "$useithreads$use5005threads" in
4449 You cannot have both the ithreads and the 5.005 threads enabled
4450 at the same time. Disabling the 5.005 threads since they are
4451 much less stable than the ithreads.
4454 use5005threads="$undef"
4459 : perl-5.9.x and later
4461 if test X"$usethreads" = "X$define"; then
4462 case "$use5005threads" in
4466 5.005 threads has been removed for 5.10. Perl will be built using ithreads.
4473 use5005threads="$undef"
4474 useithreads="$usethreads"
4477 case "$d_oldpthreads" in
4478 '') : Configure tests would be welcome here. For now, assume undef.
4480 *) val="$d_oldpthreads" ;;
4486 : Look for a hint-file generated 'call-back-unit'. If the
4487 : user has specified that a threading perl is to be built,
4488 : we may need to set or change some other defaults.
4489 if $test -f usethreads.cbu; then
4490 echo "Your platform has some specific hints regarding threaded builds, using them..."
4493 case "$usethreads" in
4494 "$define"|true|[yY]*)
4496 (Your platform does not have any specific hints for threaded builds.
4497 Assuming POSIX threads, then.)
4503 : Check if multiplicity is required
4506 Perl can be built so that multiple Perl interpreters can coexist
4507 within the same Perl executable.
4510 case "$useithreads" in
4513 This multiple interpreter support is required for interpreter-based threads.
4517 *) case "$usemultiplicity" in
4518 $define|true|[yY]*) dflt='y';;
4522 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
4523 rp='Build Perl for multiplicity?'
4526 y|Y) val="$define" ;;
4534 : Check if morebits is requested
4535 case "$usemorebits" in
4536 "$define"|true|[yY]*)
4537 use64bitint="$define"
4538 uselongdouble="$define"
4539 usemorebits="$define"
4541 *) usemorebits="$undef"
4545 : Determine the C compiler to be used
4551 rp="Use which C compiler?"
4555 : See whether they have no cc but they do have gcc
4557 if $test -f cc.cbu; then
4562 : make some quick guesses about what we are up against
4564 $echo $n "Hmm... $c"
4574 $cat $sysroot/usr/include/signal.h $sysroot/usr/include/sys/signal.h >foo 2>/dev/null
4575 if test -f /osf_boot || $contains 'OSF/1' $sysroot/usr/include/ctype.h >/dev/null 2>&1
4577 echo "Looks kind of like an OSF/1 system, but we'll see..."
4579 elif test `echo abc | $tr a-z A-Z` = Abc ; then
4580 xxx=`./loc addbib blurfl $pth`
4581 if $test -f $xxx; then
4582 echo "Looks kind of like a USG system with BSD features, but we'll see..."
4586 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
4587 echo "Looks kind of like an extended USG system, but we'll see..."
4589 echo "Looks kind of like a USG system, but we'll see..."
4593 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
4594 echo "Looks kind of like a BSD system, but we'll see..."
4598 echo "Looks kind of like a Version 7 system, but we'll see..."
4601 case "$eunicefix" in
4604 There is, however, a strange, musty smell in the air that reminds me of
4605 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
4609 : it so happens the Eunice I know will not run shell scripts in Unix format
4613 echo "Congratulations. You aren't running Eunice."
4617 : Detect OS2. The p_ variable is set above in the Head.U unit.
4618 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
4619 : semicolon as a patch separator
4624 I have the feeling something is not exactly right, however...don't tell me...
4625 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
4626 (Or you may be running DOS with DJGPP.)
4631 if test -f /xenix; then
4632 echo "Actually, this looks more like a XENIX system..."
4637 echo "It's not Xenix..."
4642 if test -f /venix; then
4643 echo "Actually, this looks more like a VENIX system..."
4650 echo "Nor is it Venix..."
4653 chmod +x bsd usg v7 osf1 eunice xenix venix os2
4654 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
4657 : Check if we are using GNU gcc and what its version is
4659 echo "Checking for GNU cc in disguise and/or its version number..." >&4
4663 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
4665 printf("%s\n", __VERSION__);
4667 printf("%s\n", "1");
4673 if $cc -o try $ccflags $ldflags try.c; then
4674 gccversion=`$run ./try`
4675 case "$gccversion" in
4676 '') echo "You are not using GNU cc." ;;
4677 *) echo "You are using GNU cc $gccversion."
4683 echo "*** WHOA THERE!!! ***" >&4
4684 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
4685 case "$knowitall" in
4687 echo " You'd better start hunting for one and let me know about it." >&4
4693 case "$gccversion" in
4694 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
4696 case "$gccversion" in
4697 '') gccosandvers='' ;;
4698 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
4699 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
4701 case "$gccosandvers" in
4702 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
4703 $osname$osvers) ;; # looking good
4704 $osname*) cat <<EOM >&4
4706 *** WHOA THERE!!! ***
4708 Your gcc has not been compiled for the exact release of
4709 your operating system ($gccosandvers versus $osname$osvers).
4711 In general it is a good idea to keep gcc synchronized with
4712 the operating system because otherwise serious problems
4713 may ensue when trying to compile software, like Perl.
4715 I'm trying to be optimistic here, though, and will continue.
4716 If later during the configuration and build icky compilation
4717 problems appear (headerfile conflicts being the most common
4718 manifestation), I suggest reinstalling the gcc to match
4719 your operating system release.
4723 *) gccosandvers='' ;; # failed to parse, better be silent
4731 # gcc 3.* complain about adding -Idirectories that they already know about,
4732 # so we will take those off from locincpth.
4733 case "$gccversion" in
4735 echo "main(){}">try.c
4736 for incdir in $locincpth; do
4737 warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \
4738 grep '^c[cp]p*[01]: warning: changing search order '`
4739 if test "X$warn" != X; then
4740 locincpth=`echo " $locincpth " | sed "s! $incdir ! !"`
4746 # gcc 4.9 by default does some optimizations that break perl.
4747 # see ticket 121505.
4749 # The -fwrapv disables those optimizations (and probably others,) so
4750 # for gcc 4.9 (and later, since the optimizations probably won't go
4751 # away), add -fwrapv unless the user requests -fno-wrapv, which
4752 # disables -fwrapv, or if the user requests -fsanitize=undefined,
4753 # which turns the overflows -fwrapv ignores into runtime errors.
4754 case "$gccversion" in
4755 4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
4757 *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
4758 *) ccflags="$ccflags -fwrapv" ;;
4762 : What should the include directory be ?
4763 : Use sysroot if set, so findhdr looks in the right place.
4765 $echo $n "Hmm... $c"
4766 dflt="$sysroot/usr/include"
4769 if $test -f /bin/mips && /bin/mips; then
4770 echo "Looks like a MIPS system..."
4771 $cat >usr.c <<'EOCP'
4772 #ifdef SYSTYPE_BSD43
4776 if $cc $cppflags -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
4777 dflt='/bsd43/usr/include'
4781 mips_type='System V'
4783 $rm -f usr.c usr.out
4784 echo "and you're compiling with the $mips_type compiler and libraries."
4788 echo "Doesn't look like a MIPS system."
4798 case "$xxx_prompt" in
4801 rp='Where are the include files you want to use?'
4809 : see how we invoke the C preprocessor
4811 echo "Now, how can we feed standard input to your C preprocessor..." >&4
4812 cat <<'EOT' >testcpp.c
4818 if test ! -f cppstdin; then
4819 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
4820 # AIX cc -E doesn't show the absolute headerfile
4821 # locations but we'll cheat by using the -M flag.
4822 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
4824 echo 'cat >.$$.c; '"$cc $cppflags"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
4827 echo "Keeping your $hint cppstdin wrapper."
4830 wrapper=`pwd`/cppstdin
4834 if $test "X$cppstdin" != "X" && \
4835 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
4836 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4838 echo "You used to use $cppstdin $cppminus so we'll use that again."
4840 '') echo "But let's see if we can live without a wrapper..." ;;
4842 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
4843 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4845 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
4848 echo "(However, $cpprun $cpplast does not work, let's see...)"
4856 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
4863 elif echo 'Maybe "'"$cc"' -E" will work...'; \
4864 $cc -E <testcpp.c >testcpp.out 2>&1; \
4865 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4866 echo "Yup, it does."
4867 x_cpp="$cc $cppflags -E"
4869 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
4870 $cc -E - <testcpp.c >testcpp.out 2>&1; \
4871 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4872 echo "Yup, it does."
4873 x_cpp="$cc $cppflags -E"
4875 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
4876 $cc -P <testcpp.c >testcpp.out 2>&1; \
4877 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4878 echo "Yipee, that works!"
4879 x_cpp="$cc $cppflags -P"
4881 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
4882 $cc -P - <testcpp.c >testcpp.out 2>&1; \
4883 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4884 echo "At long last!"
4885 x_cpp="$cc $cppflags -P"
4887 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
4888 $cpp <testcpp.c >testcpp.out 2>&1; \
4889 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4891 x_cpp="$cpp $cppflags"
4893 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
4894 $cpp - <testcpp.c >testcpp.out 2>&1; \
4895 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4896 echo "Hooray, it works! I was beginning to wonder."
4897 x_cpp="$cpp $cppflags"
4899 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
4900 $wrapper <testcpp.c >testcpp.out 2>&1; \
4901 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4907 rp="No dice. I can't find a C preprocessor. Name one:"
4911 $x_cpp <testcpp.c >testcpp.out 2>&1
4912 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
4913 echo "OK, that will do." >&4
4915 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
4930 echo "Perhaps can we force $cc -E using a wrapper..."
4931 if $wrapper <testcpp.c >testcpp.out 2>&1; \
4932 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
4938 echo "Nope, we'll have to live without it..."
4952 "$wrapper"|'cppstdin') ;;
4953 *) $rm -f $wrapper;;
4955 $rm -f testcpp.c testcpp.out
4957 : Adjust cppfilter for path component separator
4959 vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
4960 os2) cppfilter="sed -e 's|\\\\\\\\|/|g' |" ;; # path component separator is \
4964 : Use gcc to determine libpth and incpth
4965 # If using gcc or clang, we can get better values for libpth, incpth
4966 # and usrinc directly from the compiler.
4967 # Note that ccname for clang is also gcc.
4970 $echo 'extern int foo;' > try.c
4971 set X `$cppstdin -v try.c 2>&1 | $awk '/^#include </,/^End of search /'|$cppfilter $grep '/include'`
4973 if $test $# -gt 0; then
4975 incpth="`$echo $incpth|$sed 's/^ //'`"
4977 j="`$echo $i|$sed 's,/include$,/lib,'`"
4978 if $test -d $j; then
4982 libpth="`$echo $libpth|$sed 's/^ //'`"
4983 for xxx in $libpth $loclibpth $plibpth $glibpth; do
4984 if $test -d $xxx; then
4987 *) libpth="$libpth $xxx";;
4994 '') for i in $incpth; do
4995 if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
5003 case "$usecrosscompile" in
5006 '') echo "Incpth not defined." >&4; croak=y ;;
5007 *) echo "Using incpth '$incpth'." >&4 ;;
5010 '') echo "Libpth not defined." >&4; croak=y ;;
5011 *) echo "Using libpth '$libpth'." >&4 ;;
5014 '') echo "Usrinc not defined." >&4; croak=y ;;
5015 *) echo "Using usrinc $usrinc." >&4 ;;
5019 if test "X$sysroot" = X; then
5020 echo "Cannot continue, aborting." >&4; exit 1
5022 echo "Cross-compiling using sysroot $sysroot, failing to guess inc/lib paths is not fatal" >&4
5031 : Default value for incpth is just usrinc
5033 '') incpth="$usrinc";;
5036 : Set private lib path
5039 plibpth="$incpath/usr/lib $sysroot/usr/local/lib $sysroot/usr/ccs/lib"
5044 '') dlist="$loclibpth $plibpth $glibpth";;
5045 *) dlist="$libpth";;
5048 : Now check and see which directories actually exist, avoiding duplicates
5051 if $test -d $xxx; then
5054 *) libpth="$libpth $xxx";;
5060 Some systems have incompatible or broken versions of libraries. Among
5061 the directories listed in the question below, please remove any you
5062 know not to be holding relevant libraries, and add any that are needed.
5063 Say "none" for none.
5067 if test "X$sysroot" != X; then
5069 You have set sysroot to $sysroot, please supply the directories excluding sysroot
5082 rp="Directories to use for library searches?"
5089 : compute shared library extension
5092 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
5102 On some systems, shared libraries may be available. Answer 'none' if
5103 you want to suppress searching of shared libraries for the remainder
5104 of this configuration.
5107 rp='What is the file extension used for shared libraries?'
5111 : Does target system insist that shared library basenames are unique
5114 Some dynamic loaders assume that the *basename* of shared library filenames
5115 are globally unique. We'll default this to undef as we assume your system
5116 is not this weird. Set to defined if you're on one of them.
5121 rp='Make shared library basenames unique?'
5124 y|Y) val="$define" ;;
5127 set d_libname_unique
5130 : Define several unixisms.
5131 : Hints files or command line option can be used to override them.
5132 : The convoluted testing is in case hints files set either the old
5135 '') case "$exe_ext" in
5137 *) _exe="$exe_ext" ;;
5142 '') case "$lib_ext" in
5149 '') case "$obj_ext" in
5156 '') case "$path_sep" in
5167 rm_try="$rm -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*"
5169 : Which makefile gets called first. This is used by make depend.
5170 case "$firstmakefile" in
5171 '') firstmakefile='makefile';;
5174 : Check is we will use socks
5176 $define|true|[yY]*) dflt='y';;
5181 Perl can be built to use the SOCKS proxy protocol library. To do so,
5182 Configure must be run with -Dusesocks. If you use SOCKS you also need
5183 to use the PerlIO abstraction layer, this will be implicitly selected.
5185 If this doesn't make any sense to you, just accept the default '$dflt'.
5187 rp='Build Perl for SOCKS?'
5190 y|Y) val="$define" ;;
5196 : Check for uselongdouble support
5198 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
5201 case "$uselongdouble" in
5202 $define|true|[yY]*) dflt='y';;
5207 Perl can be built to take advantage of long doubles which
5208 (if available) may give more accuracy and range for floating point numbers.
5210 If this doesn't make any sense to you, just accept the default '$dflt'.
5212 rp='Try to use long doubles if available?'
5215 y|Y) val="$define" ;;
5221 case "$uselongdouble" in
5222 true|[yY]*) uselongdouble="$define" ;;
5225 : Look for a hint-file generated 'call-back-unit'. If the
5226 : user has specified that long doubles should be used,
5227 : we may need to set or change some other defaults.
5228 if $test -f uselongdouble.cbu; then
5229 echo "Your platform has some specific hints regarding long doubles, using them..."
5230 . ./uselongdouble.cbu
5232 case "$uselongdouble" in
5235 (Your platform does not have any specific hints for long doubles.)
5241 : Check if quadmath is requested
5242 case "$usequadmath" in
5243 "$define"|true|[yY]*) usequadmath="$define" ;;
5244 *) usequadmath="$undef" ;;
5247 : Fail if both uselongdouble and usequadmath are requested
5248 case "$usequadmath:$uselongdouble" in
5252 *** You requested the use of the quadmath library and use
5253 *** of long doubles.
5255 *** Please select one or the other.
5261 : Looking for optional libraries
5263 echo "Checking for optional libraries..." >&4
5268 case "$libswanted" in
5269 '') libswanted='c_s';;
5272 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
5274 case "$usecbacktrace" in
5275 "$define") libswanted="$libswanted bfd" ;;
5277 case "$usequadmath" in
5278 "$define") libswanted="$libswanted quadmath" ;;
5284 for thisdir in $libpth $xlibpth; do
5285 test -d $thisdir && libspath="$libspath $thisdir"
5287 for thislib in $libswanted; do
5288 for thisdir in $libspath; do
5290 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
5291 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
5292 $test -f "$xxx" && eval $libscheck
5293 $test -f "$xxx" && libstyle=shared
5294 xxx=`ls $thisdir/lib$thislib.[0-9].$so 2>/dev/null|sed -n '$p'`
5295 $test -f "$xxx" && eval $libscheck
5296 $test -f "$xxx" && libstyle=shared
5298 if test ! -f "$xxx"; then
5299 xxx=$thisdir/lib$thislib.$so
5300 $test -f "$xxx" && eval $libscheck
5301 $test -f "$xxx" && libstyle=shared
5303 if test ! -f "$xxx"; then
5304 xxx=$thisdir/lib$thislib$_a
5305 $test -f "$xxx" && eval $libscheck
5306 $test -f "$xxx" && libstyle=static
5308 if test ! -f "$xxx"; then
5309 xxx=$thisdir/$thislib$_a
5310 $test -f "$xxx" && eval $libscheck
5311 $test -f "$xxx" && libstyle=static
5313 if test ! -f "$xxx"; then
5314 xxx=$thisdir/lib${thislib}_s$_a
5315 $test -f "$xxx" && eval $libscheck
5316 $test -f "$xxx" && libstyle=static
5317 $test -f "$xxx" && thislib=${thislib}_s
5319 if test ! -f "$xxx"; then
5320 xxx=$thisdir/Slib$thislib$_a
5321 $test -f "$xxx" && eval $libscheck
5322 $test -f "$xxx" && libstyle=static
5324 if $test -f "$xxx"; then
5326 shared) echo "Found -l$thislib (shared)." ;;
5327 static) echo "Found -l$thislib." ;;
5328 *) echo "Found -l$thislib ($libstyle)." ;;
5332 *) dflt="$dflt -l$thislib"
5333 libsfound="$libsfound $xxx"
5335 libsfiles="$libsfiles $yyy"
5336 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
5337 case " $libsdirs " in
5339 *) libsdirs="$libsdirs $yyy" ;;
5346 if $test ! -f "$xxx"; then
5347 echo "No -l$thislib."
5358 ' '|'') dflt='none';;
5363 In order to compile $package on your machine, a number of libraries
5364 are usually needed. Include any other special libraries here as well.
5365 Say "none" for none. The default list is almost always right.
5369 rp="What libraries to use?"
5376 : determine optimization, if desired, or use for debug flag also
5378 ' '|$undef) dflt='none';;
5380 *) dflt="$optimize";;
5384 By default, $package compiles with the -O flag to use the optimizer.
5385 Alternately, you might want to use the symbolic debugger, which uses
5386 the -g flag (on traditional Unix systems). Either flag can be
5387 specified here. To use neither flag, specify the word "none".
5390 rp="What optimizer/debugger flag should be used?"
5394 'none') optimize=" ";;
5397 : Check what DEBUGGING is required from the command line
5398 : -DEBUGGING or -DDEBUGGING or
5399 : -DEBUGGING=both = -g + -DDEBUGGING
5400 : -DEBUGGING=-g or -Doptimize=-g = -g
5401 : -DEBUGGING=none or -UDEBUGGING =
5402 : -DEBUGGING=old or -DEBUGGING=default = ? $optimize
5405 *) DEBUGGING=$EBUGGING ;;
5408 case "$DEBUGGING" in
5412 *) optimize="$optimize -g" ;;
5416 *-g*) set `echo "X $optimize " | sed 's/ -g / /'`
5424 case "$DEBUGGING" in
5425 both|$define) dflt='-DDEBUGGING'
5428 : argument order is deliberate, as the flag will start with - which set could
5429 : think is an option
5430 checkccflag='check=$1; flag=$2; callback=$3;
5432 echo "Checking if your compiler accepts $flag" 2>&1;
5433 [ "X$sysroot" != "X" ] && echo "For sysroot = $sysroot";
5434 echo "int main(void) { return 0; }" > gcctest.c;
5435 if $cc $_sysroot -O2 $flag -o gcctest gcctest.c 2>gcctest.out && $run ./gcctest; then
5436 echo "Yes, it does." 2>&1;
5437 if $test -s gcctest.out ; then
5438 echo "But your platform does not like it:";
5443 echo "Leaving current flags $ccflags alone." 2>&1
5445 *) dflt="$dflt $flag";
5451 echo "Nope, it does not, but that is ok." 2>&1;
5455 : We will not override a previous value, but we might want to
5456 : augment a hint file
5458 default|recommended)
5459 case "$gccversion" in
5460 1*) dflt="$dflt -fpcc-struct-return" ;;
5462 case "$optimize:$DEBUGGING" in
5463 *-g*:old) dflt="$dflt -DDEBUGGING";;
5465 case "$gccversion" in
5466 2*) if $test -d /etc/conf/kconfig.d &&
5467 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
5469 # Interactive Systems (ISC) POSIX mode.
5474 case "$gccversion" in
5477 ?*) set strict-aliasing -fno-strict-aliasing
5481 # For gcc, adding -pipe speeds up compilations for some, but apparently
5482 # some assemblers can't read from stdin. (It also slows down compilations
5483 # in other cases, but those are apparently rarer these days.) AD 5/2004.
5484 case "$gccversion" in
5490 # on x86_64 (at least) we require an extra library (libssp) in the
5491 # link command line. This library is not named, so I infer that it is
5492 # an implementation detail that may change. Hence the safest approach
5493 # is to add the flag to the flags passed to the compiler at link time,
5494 # as that way the compiler can do the right implementation dependant
5497 amigaos) ;; # -fstack-protector builds but doesn't work
5498 *) case "$gccversion" in
5499 ?*) set stack-protector-strong -fstack-protector-strong
5502 *-fstack-protector-strong*) ;; # It got added.
5503 *) # Try the plain/older -fstack-protector.
5504 set stack-protector -fstack-protector
5515 case "$mips_type" in
5516 *BSD*|'') inclwanted="$locincpth $usrinc";;
5517 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
5519 for thisincl in $inclwanted; do
5520 if $test -d $thisincl; then
5521 if $test x$thisincl != x$usrinc; then
5523 *" -I$thisincl "*);;
5524 *) dflt="$dflt -I$thisincl ";;
5530 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
5532 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
5540 *) dflt="$dflt -D$2";;
5544 set signal.h LANGUAGE_C; eval $inctest
5548 ccflags="$ccflags -DSOCKS"
5553 default|recommended) dflt="$ccflags $dflt" ;;
5554 *) dflt="$ccflags";;
5563 Your C compiler may want other flags. For this question you should include
5564 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
5565 but you should NOT include libraries or ld flags like -lwhatever. If you
5566 want $package to honor its debug switch, you should include -DDEBUGGING here.
5567 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
5569 To use no flags, specify the word "none".
5575 rp="Any additional cc flags?"
5582 : the following weeds options from ccflags that are of no interest to cpp
5584 '') cppflags="$ccflags" ;;
5585 *) set X $ccflags; shift
5586 case " $cppflags " in
5587 *" $1 "*) ;; # Try to avoid doubling the cppflags.
5588 *) cppflags="$cppflags $ccflags" ;;
5592 case "$gccversion" in
5593 1*) cppflags="$cppflags -D__GNUC__"
5595 case "$mips_type" in
5597 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
5603 echo "Let me guess what the preprocessor flags are..." >&4
5617 *) ftry="$previous $flag";;
5619 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
5620 >cpp1.out 2>/dev/null && \
5621 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
5622 >cpp2.out 2>/dev/null && \
5623 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
5624 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
5626 cppflags="$cppflags $ftry"
5636 *-*) echo "They appear to be: $cppflags";;
5638 $rm -f cpp.c cpp?.out
5642 : flags used in final linking phase
5644 '') if ./venix; then
5650 *-posix*) dflt="$dflt -posix" ;;
5653 *) dflt="$ldflags";;
5655 # See note above about -fstack-protector
5657 *-fstack-protector-strong*)
5659 *-fstack-protector-strong*) ;; # Don't add it again
5660 *) dflt="$dflt -fstack-protector-strong" ;;
5663 *-fstack-protector*)
5665 *-fstack-protector*) ;; # Don't add it again
5666 *) dflt="$dflt -fstack-protector" ;;
5671 : Try to guess additional flags to pick up local libraries.
5672 for thislibdir in $libpth; do
5673 case " $loclibpth " in
5676 *"-L$thislibdir "*) ;;
5677 *) dflt="$dflt -L$thislibdir" ;;
5689 Your C linker may need flags. For this question you should
5690 include -L/whatever and any other flags used by the C linker, but you
5691 should NOT include libraries like -lwhatever.
5693 Make sure you include the appropriate -L/path flags if your C linker
5694 does not normally search all of the directories you specified above,
5697 To use no flags, specify the word "none".
5701 rp="Any additional ld flags (NOT including libraries)?"
5707 rmlist="$rmlist pdp11"
5711 echo "Checking your choice of C compiler and flags for coherency..." >&4
5712 $cat > try.c <<'EOF'
5714 int main() { printf("Ok\n"); return(0); }
5716 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
5718 $cat >try.msg <<'EOM'
5719 I've tried to compile and run the following simple program:
5722 $cat try.c >> try.msg
5724 $cat >> try.msg <<EOM
5731 and I got the following output:
5735 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
5736 if $sh -c "$run ./try " >>try.msg 2>&1; then
5740 *) echo 'The program compiled OK, but produced no output.' >> try.msg ;;
5743 echo "The program compiled OK, but exited with status $?." >>try.msg
5744 rp="You have a problem. Shall I abort Configure"
5748 echo "I can't compile the test program." >>try.msg
5749 rp="You have a BIG problem. Shall I abort Configure"
5755 case "$knowitall" in
5757 echo "(The supplied flags or libraries might be incorrect.)"
5765 *) echo "Ok. Stopping Configure." >&4
5770 n) echo "OK, that should do.";;
5772 $rm_try gcctest gcctest.out
5774 : define a shorthand compile call
5778 case "$usedevel" in $define|true|[yY]*) if $test ! -f "${mc_file}.c"; then
5779 echo "Internal Configure script bug - compiler test file ${mc_file}.c is missing. Please report this to perlbug@perl.org" >&4;
5783 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
5784 : define a shorthand compile call for compilations that should be ok.
5788 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
5790 : stub, used only to satisfy other units
5793 : check for lengths of integral types
5797 echo "Checking to see how big your integers are..." >&4
5806 printf("intsize=%d;\n", (int)sizeof(int));
5807 printf("longsize=%d;\n", (int)sizeof(long));
5808 printf("shortsize=%d;\n", (int)sizeof(short));
5813 if eval $compile_ok && $run ./try > /dev/null; then
5815 echo "Your integers are $intsize bytes long."
5816 echo "Your long integers are $longsize bytes long."
5817 echo "Your short integers are $shortsize bytes long."
5821 Help! I can't compile and run the intsize test program: please enlighten me!
5822 (This is probably a misconfiguration in your system or libraries, and
5823 you really ought to fix it. Still, I'll try anyway.)
5827 rp="What is the size of an integer (in bytes)?"
5831 rp="What is the size of a long integer (in bytes)?"
5835 rp="What is the size of a short integer (in bytes)?"
5843 : check for long long
5845 echo "Checking to see if you have long long..." >&4
5846 echo 'int main() { long long x = 7; return 0; }' > try.c
5848 if eval $compile; then
5850 echo "You have long long."
5853 echo "You do not have long long."
5859 : check for length of long long
5860 case "${d_longlong}${longlongsize}" in
5863 echo "Checking to see how big your long longs are..." >&4
5864 $cat >try.c <<'EOCP'
5868 printf("%d\n", (int)sizeof(long long));
5873 if eval $compile_ok; then
5874 longlongsize=`$run ./try`
5875 echo "Your long longs are $longlongsize bytes long."
5879 echo "(I can't seem to compile the test program. Guessing...)"
5880 rp="What is the size of a long long (in bytes)?"
5884 if $test "X$longsize" = "X$longlongsize"; then
5885 echo "(That isn't any different from an ordinary long.)"
5891 : determine filename position in cpp output
5893 echo "Computing filename position in cpp output for #include directives..." >&4
5895 amigaos) fieldn=3 ;; # Workaround for a bug in abc (pdksh).
5900 vos) testaccess=-e ;;
5903 echo '#include <stdio.h>' > foo.c
5906 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5907 $grep '^[ ]*#.*stdio\.h' | \
5908 while read cline; do
5911 while $test \$# -gt 0; do
5912 if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
5917 pos=\`expr \$pos + 1\`
5931 *) pos="${fieldn}th";;
5933 echo "Your cpp writes the filename in the $pos field of the line."
5935 : locate header file
5940 for usrincdir in $incpth
5942 if test -f \$usrincdir/\$wanted; then
5943 echo "\$usrincdir/\$wanted"
5947 awkprg='{ print \$$fieldn }'
5948 echo "#include <\$wanted>" > foo\$\$.c
5949 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5950 $cppfilter $grep "^[ ]*#.*\$wanted" | \
5951 while read cline; do
5952 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5954 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5955 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5960 # status = 0: grep returned 0 lines, case statement not executed
5961 # status = 1: headerfile found
5962 # status = 2: while loop executed, no headerfile found
5966 if test \$status -eq 1; then
5973 : define an alternate in-header-list? function
5974 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5975 cont=true; xxf="echo \"<\$1> found.\" >&4";
5976 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5977 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5979 case $# in 4) instead=instead;; *) instead="at last";; esac;
5980 while $test "$cont"; do
5982 var=$2; eval "was=\$$2";
5983 if $test "$xxx" && $test -r "$xxx";
5985 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5988 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5989 set $yyy; shift; shift; yyy=$@;
5990 case $# in 0) cont="";;
5991 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5992 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5993 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5994 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5998 do set $yyy; var=$2; eval "was=\$$2";
5999 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
6000 set $yyy; shift; shift; yyy=$@;
6003 : see if inttypes.h is available
6004 : we want a real compile instead of Inhdr because some systems
6005 : have an inttypes.h which includes non-existent headers
6008 #include <inttypes.h>
6010 static int32_t foo32 = 0x12345678;
6014 if eval $compile; then
6015 echo "<inttypes.h> found." >&4
6018 echo "<inttypes.h> NOT found." >&4
6027 echo "Checking to see if you have int64_t..." >&4
6029 #include <sys/types.h>
6030 #$i_inttypes I_INTTYPES
6032 #include <inttypes.h>
6034 int main() { int64_t x = 7; }
6037 if eval $compile; then
6039 echo "You have int64_t."
6042 echo "You do not have int64_t."
6048 : Check if 64bit ints have a quad type
6050 echo "Checking which 64-bit integer type we could use..." >&4
6056 val='"unsigned int"'
6061 *) case "$longsize" in
6065 val='"unsigned long"'
6070 *) case "$d_longlong:$longlongsize" in
6075 val='"unsigned long long"'
6080 *) case "$d_int64_t" in
6099 '') echo "Alas, no 64-bit integer types in sight." >&4
6102 *) echo "We could use '$quadtype' for 64-bit integers." >&4
6107 : Do we want 64bit support
6108 case "$uselonglong" in
6109 "$define"|true|[yY]*)
6112 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
6114 use64bitint="$define"
6117 case "$use64bits" in
6118 "$define"|true|[yY]*)
6121 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
6123 use64bitint="$define"
6126 case "$use64bitints" in
6127 "$define"|true|[yY]*)
6130 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
6132 use64bitint="$define"
6135 case "$use64bitsint" in
6136 "$define"|true|[yY]*)
6139 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
6141 use64bitint="$define"
6144 case "$uselonglongs" in
6145 "$define"|true|[yY]*)
6148 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
6150 use64bitint="$define"
6153 case "$use64bitsall" in
6154 "$define"|true|[yY]*)
6157 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
6159 use64bitall="$define"
6164 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
6166 case "$use64bitall" in
6167 "$define"|true|[yY]*) use64bitint="$define" ;;
6173 You have natively 64-bit long integers.
6177 *) case "$use64bitint" in
6178 "$define"|true|[yY]*) dflt='y';;
6187 Perl can be built to take advantage of 64-bit integer types
6188 on some systems. To do so, Configure can be run with -Duse64bitint.
6189 Choosing this option will most probably introduce binary incompatibilities.
6191 If this doesn't make any sense to you, just accept the default '$dflt'.
6192 (The default has been chosen based on your configuration.)
6194 rp='Try to use 64-bit integers, if available?'
6197 [yY]*) val="$define" ;;
6205 case "$use64bitall" in
6206 "$define"|true|[yY]*) dflt='y' ;;
6207 *) case "$longsize" in
6215 You may also choose to try maximal 64-bitness. It means using as much
6216 64-bitness as possible on the platform. This in turn means even more
6217 binary incompatibilities. On the other hand, your platform may not
6218 have any more 64-bitness available than what you already have chosen.
6220 If this doesn't make any sense to you, just accept the default '$dflt'.
6221 (The default has been chosen based on your configuration.)
6223 rp='Try to use maximal 64-bit support, if available?'
6226 [yY]*) val="$define" ;;
6231 case "$use64bitall" in
6233 case "$use64bitint" in
6237 Since you have chosen a maximally 64-bit build, I'm also turning on
6238 the use of 64-bit integers.
6240 use64bitint="$define" ;;
6245 : Look for a hint-file generated 'call-back-unit'. If the
6246 : user has specified that a 64-bit perl is to be built,
6247 : we may need to set or change some other defaults.
6248 if $test -f use64bitint.cbu; then
6249 echo "Your platform has some specific hints regarding 64-bit integers, using them..."
6252 case "$use64bitint" in
6253 "$define"|true|[yY]*)
6254 : This test was common to all the OpenBSD forks, and seems harmless for
6257 echo "Checking if your C library has broken 64-bit functions..." >&4
6260 typedef $uquadtype myULL;
6267 {4294967303.15, 4294967303ULL},
6268 {4294967294.2, 4294967294ULL},
6269 {4294967295.7, 4294967295ULL},
6272 for (p = test; p->u; p++) {
6273 myULL x = (myULL)p->d;
6284 if eval $compile_ok; then
6285 libcquad=`$run ./try`
6286 echo "Your C library's 64-bit functions are $libcquad."
6288 echo "(I can't seem to compile the test program.)"
6289 echo "Assuming that your C library's 64-bit functions are ok."
6298 *** You have a C library with broken 64-bit functions.
6299 *** 64-bit support does not work reliably in this configuration.
6300 *** Please rerun Configure without -Duse64bitint and/or -Dusemorebits.
6301 *** Cannot continue, aborting.
6308 4) case "$archname64" in
6309 '') archname64=64int ;;
6316 : Look for a hint-file generated 'call-back-unit'. If the
6317 : user has specified that a maximally 64-bit perl is to be built,
6318 : we may need to set or change some other defaults.
6319 if $test -f use64bitall.cbu; then
6320 echo "Your platform has some specific hints regarding 64-bit builds, using them..."
6323 case "$use64bitall" in
6324 "$define"|true|[yY]*)
6326 4) case "$archname64" in
6327 ''|64int) archname64=64all ;;
6334 case "$d_quad:$use64bitint" in
6338 *** You have chosen to use 64-bit integers,
6339 *** but none can be found.
6340 *** Please rerun Configure without -Duse64bitint and/or -Dusemorebits.
6341 *** Cannot continue, aborting.
6348 : Check if we are using the GNU C library
6350 echo "Checking for GNU C Library..." >&4
6352 /* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
6353 alone are insufficient to distinguish different versions, such as
6354 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
6355 libc version 2.1.0. A. Dougherty, June 3, 2002.
6361 # ifdef __GLIBC_MINOR__
6362 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 && !defined(__cplusplus)
6363 # include <gnu/libc-version.h>
6364 printf("%s\n", gnu_get_libc_version());
6366 printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
6369 printf("%d\n", __GLIBC__);
6378 if eval $compile_ok && $run ./try > glibc.ver; then
6380 gnulibc_version=`$cat glibc.ver`
6381 echo "You are using the GNU C Library version $gnulibc_version"
6385 echo "You are not using the GNU C Library"
6391 : see if nm is to be used to determine whether a symbol is defined or not
6395 case "$d_gnulibc" in
6398 echo "nm probably won't work on the GNU C Library." >&4
6404 if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
6406 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
6407 echo "'nm' won't be sufficient on this system." >&4
6413 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
6414 if $test $dflt -gt 20; then
6424 true|$define) dflt=y;;
6431 I can use $nm to extract the symbols from your C libraries. This
6432 is a time consuming task which may generate huge output on the disk (up
6433 to 3 megabytes) but that should make the symbols extraction faster. The
6434 alternative is to skip the 'nm' extraction part and to compile a small
6435 test program instead to determine whether each symbol is present. If
6436 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
6437 this may be the best solution.
6439 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
6442 rp="Shall I use $nm to extract C symbols from the libraries?"
6445 [Nn]*) usenm=false;;
6454 : nm options which may be necessary
6456 '') if $test -f /mach_boot; then
6458 elif $test -d /usr/ccs/lib; then
6459 nm_opt='-p' # Solaris (and SunOS?)
6460 elif $test -f /dgux; then
6462 elif $test -f /lib64/rld; then
6463 nm_opt='-p' # 64-bit Irix
6469 : nm options which may be necessary for shared libraries but illegal
6470 : for archive libraries. Thank you, Linux.
6471 case "$nm_so_opt" in
6472 '') case "$myuname" in
6474 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
6475 nm_so_opt='--dynamic'
6482 : Figure out where the libc is located
6485 : get list of predefined functions in a handy place
6490 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
6496 *) for thislib in $libs; do
6499 : Handle C library specially below.
6502 thislib=`echo $thislib | $sed -e 's/^-l//'`
6503 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
6505 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
6507 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
6509 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
6511 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
6513 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
6515 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
6520 libnames="$libnames $try"
6522 *) libnames="$libnames $thislib" ;;
6531 for xxx in $libpth; do
6532 $test -r $1 || set $xxx/libc.$so
6533 : The messy sed command sorts on library version numbers.
6535 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
6536 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
6538 s/[0-9][0-9]*/0000&/g
6539 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
6542 $sort | $sed -e 's/^.* //'`
6545 $test -r $1 || set $sysroot/usr/ccs/lib/libc.$so
6546 $test -r $1 || set $sysroot/lib/libsys_s$_a
6552 if $test -r "$1"; then
6553 echo "Your (shared) C library seems to be in $1."
6555 elif $test -r /lib/libc && $test -r /lib/clib; then
6556 echo "Your C library seems to be in both /lib/clib and /lib/libc."
6558 libc='/lib/clib /lib/libc'
6559 if $test -r /lib/syslib; then
6560 echo "(Your math library is in /lib/syslib.)"
6561 libc="$libc /lib/syslib"
6563 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
6564 echo "Your C library seems to be in $libc, as you said before."
6565 elif $test -r $incpath/usr/lib/libc$_a; then
6566 libc=$incpath/usr/lib/libc$_a;
6567 echo "Your C library seems to be in $libc. That's fine."
6568 elif $test -r /lib/libc$_a; then
6570 echo "Your C library seems to be in $libc. You're normal."
6572 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
6574 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
6575 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
6576 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
6578 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
6580 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
6583 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
6585 if $test -r "$tans"; then
6586 echo "Your C library seems to be in $tans, of all places."
6592 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
6596 If the guess above is wrong (which it might be if you're using a strange
6597 compiler, or your machine supports multiple models), you can override it here.
6602 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
6604 I can't seem to find your C library. I've looked in the following places:
6607 $sed 's/^/ /' libpath
6610 None of these seems to contain your C library. I need to get its name...
6615 rp='Where is your C library?'
6620 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
6621 set X `cat libnames`
6624 case $# in 1) xxx=file; esac
6625 echo "Extracting names from the following $xxx for later perusal:" >&4
6627 $sed 's/^/ /' libnames >&4
6629 $echo $n "This may take a while...$c" >&4
6633 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
6634 *) $nm $nm_opt $file 2>/dev/null;;
6639 $grep fprintf libc.tmp > libc.ptf
6640 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
6641 xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
6643 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *//p'";\
6645 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6647 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
6649 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6651 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
6653 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6655 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
6657 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6659 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
6661 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6663 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
6665 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6667 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
6668 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
6670 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6672 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
6674 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6676 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
6678 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6680 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
6682 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6684 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
6686 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6688 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
6690 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6692 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
6694 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6696 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
6698 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
6701 $nm -p $* 2>/dev/null >libc.tmp
6702 $grep fprintf libc.tmp > libc.ptf
6703 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
6704 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
6710 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
6712 if $ar t $libc > libc.tmp && \
6713 $contains '^fprintf$' libc.tmp >/dev/null 2>&1
6715 for thisname in $libnames $libc; do
6716 $ar t $thisname >>libc.tmp
6718 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
6720 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
6721 for thisname in $libnames $libc; do
6722 $ar tv $thisname >>libc.tmp
6723 emximp -o tmp.imp $thisname \
6725 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
6726 < tmp.imp >>libc.tmp
6729 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
6732 echo "$ar didn't seem to work right." >&4
6733 echo "Maybe this is a Cray...trying bld instead..." >&4
6735 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list &&
6738 for thisname in $libnames; do
6740 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
6741 $ar t $thisname >>libc.tmp
6745 echo "That didn't work either. Giving up." >&4
6755 echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4
6756 dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list
6758 *) if $test -f /lib/syscalls.exp; then
6760 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
6761 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' \
6762 /lib/syscalls.exp >>libc.list
6768 $rm -f libnames libpath
6770 : Check if we are using C++
6772 echo "Checking for C++..." >&4
6773 $cat >try.c <<'EOCP'
6785 if eval $compile_ok && $run ./try; then
6787 echo "You are using a C++ compiler."
6790 echo "You are not using a C++ compiler."
6796 : is a C symbol defined?
6799 -v) tf=libc.tmp; tdc="";;
6800 -a) tf=libc.tmp; tdc="[]";;
6801 *) tlook="^$1\$"; tf=libc.list; tdc="()";;
6803 case "$d_cplusplus" in
6804 $define) extern_C="extern \"C\"" ;;
6805 *) extern_C="extern" ;;
6808 case "$reuseval-$4" in
6810 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
6815 if $test "$runnm" = true; then
6816 if $contains $tlook $tf >/dev/null 2>&1; then
6818 elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
6819 echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main(int argc, char **argv) { if(p() && p() != (void *)argv[0]) return(0); else return(1); }"> try.c;
6820 $cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true;
6821 $test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; };
6825 echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main(int argc, char **argv) { if(p() && p() != (void *)argv[0]) return(0); else return(1); }"> try.c;
6826 $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
6832 $define) tval=true;;
6839 : define an is-in-libc? function
6840 inlibc='echo " "; td=$define; tu=$undef;
6841 sym=$1; var=$2; eval "was=\$$2";
6843 case "$reuseval$was" in
6853 echo "$sym() found." >&4;
6854 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
6856 echo "$sym() NOT found." >&4;
6857 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
6861 $define) echo "$sym() found." >&4;;
6862 *) echo "$sym() NOT found." >&4;;
6866 : check for length of double
6868 case "$doublesize" in
6870 echo "Checking to see how big your double precision numbers are..." >&4
6879 printf("%d\n", (int)sizeof(double));
6884 if eval $compile_ok; then
6885 doublesize=`$run ./try`
6886 echo "Your double is $doublesize bytes long."
6889 echo "(I can't seem to compile the test program. Guessing...)"
6890 rp="What is the size of a double precision number (in bytes)?"
6898 : check for long doubles
6900 echo "Checking to see if you have long double..." >&4
6901 echo 'int main() { long double x = 7.0; }' > try.c
6903 if eval $compile; then
6905 echo "You have long double."
6908 echo "You do not have long double."
6914 : see if ldexpl exists
6918 : check for length of long double
6919 case "${d_longdbl}${longdblsize}" in
6922 echo "Checking to see how big your long doubles are..." >&4
6923 $cat >try.c <<'EOCP'
6927 printf("%d\n", sizeof(long double));
6932 if eval $compile; then
6933 longdblsize=`$run ./try`
6934 echo "Your long doubles are $longdblsize bytes long."
6938 echo "(I can't seem to compile the test program. Guessing...)" >&4
6939 rp="What is the size of a long double (in bytes)?"
6943 if $test "X$doublesize" = "X$longdblsize"; then
6944 echo "That isn't any different from an ordinary double."
6945 echo "I'll keep your setting anyway, but you may see some"
6946 echo "harmless compilation warnings."
6952 $echo "Checking the kind of long doubles you have..." >&4
6953 case "$d_longdbl" in
6957 #define LONGDBLSIZE $longdblsize
6958 #define DOUBLESIZE $doublesize
6964 static const long double d = -0.1L;
6966 unsigned const char* b = (unsigned const char*)(&d);
6967 #if DOUBLESIZE == LONGDBLSIZE
6968 printf("0\n"); /* if it floats like double */
6971 #if (LDBL_MANT_DIG == 113 || FLT128_MANT_DIG == 113) && LONGDBLSIZE == 16
6972 if (b[0] == 0x9A && b[1] == 0x99 && b[15] == 0xBF) {
6973 /* IEEE 754 128-bit little-endian */
6977 if (b[0] == 0xBF && b[14] == 0x99 && b[15] == 0x9A) {
6978 /* IEEE 128-bit big-endian, e.g. solaris sparc */
6983 /* For alignment 32-bit platforms have the 80 bits in 12 bytes,
6984 * while 64-bits platforms have it in 16 bytes. The trailing bytes
6985 * cannot be trusted. */
6986 #if LDBL_MANT_DIG == 64 && (LONGDBLSIZE == 16 || LONGDBLSIZE == 12)
6987 if (b[0] == 0xCD && b[9] == 0xBF) {
6988 /* x86 80-bit little-endian, sizeof 12 (ILP32, Solaris x86)
6989 * or 16 (LP64, Linux and OS X), 4 or 6 bytes of padding.
6990 * Also known as "extended precision". */
6994 if (b[0] == 0xBF && b[9] == 0xCD) {
6995 /* Is there ever big-endian 80-bit, really?
6997 * The Motorola 68881 had another "extended precision" format:
6998 * sign:1 exp:15 zero:16 integer:1 mantissa:63
6999 * for total of 96 bits of bytes. The zero bits were unused.
7000 * See "M68000 FAMILY PROGRAMMER’S REFERENCE MANUAL" for more details.
7001 * If it ever becomes relevant, this format should be allocated
7002 * a new doublekind code since it's quite different from the Intel x87.
7008 #if (LDBL_MANT_DIG == 106 || LDBL_MANT_DIG == 107) && LONGDBLSIZE == 16
7009 /* software "double double", the 106 is 53+53.
7010 * but irix thinks it is 107. */
7011 if (b[0] == 0x9A && b[7] == 0x3C && b[8] == 0x9A && b[15] == 0xBF) {
7012 /* double double 128-bit fully little-endian,
7013 * little-endian doubles in little-endian order,
7014 * 9a 99 99 99 99 99 59 3c 9a 99 99 99 99 99 b9 bf */
7018 if (b[0] == 0xBF && b[7] == 0x9A && b[8] == 0x3C && b[15] == 0x9A) {
7019 /* double double 128-bit fully big-endian,
7020 * big-endian doubles in big-endian order,
7021 * e.g. PPC/Power and MIPS:
7022 * bf b9 99 99 99 99 99 9a 3c 59 99 99 99 99 99 9a */
7026 if (b[0] == 0x9A && b[7] == 0xBF && b[8] == 0x9A && b[15] == 0x3C) {
7027 /* double double 128-bit mixed endian.
7028 * little-endian doubles in big-endian order,
7030 * 9a 99 99 99 99 99 b9 bf 9a 99 99 99 99 99 59 3c */
7034 if (b[0] == 0x3C && b[7] == 0x9A && b[8] == 0xBF && b[15] == 0x9A) {
7035 /* double double 128-bit mixed endian,
7036 * big-endian doubles in little-endian order,
7037 * 3c 59 99 99 99 99 99 9a bf b9 99 99 99 99 99 9a */
7042 /* We are largely making this up because it may well be
7043 * that the VAX format H was never made available to C,
7044 * only to Fortran. */
7045 #if LONGDBLSIZE == 16 && defined(__vax__)
7046 if (b[0] == 0xFD && b[15] == 0x99) {
7047 /* VAX format H, PDP-11 mixed endian. */
7052 printf("-1\n"); /* unknown */
7057 if eval $compile; then
7058 longdblkind=`$run ./try`
7065 case "$longdblkind" in
7066 0) echo "Your long doubles are doubles." >&4 ;;
7067 1) echo "You have IEEE 754 128-bit little endian long doubles." >&4 ;;
7068 2) echo "You have IEEE 754 128-bit big endian long doubles." >&4 ;;
7069 3) echo "You have x86 80-bit little endian long doubles." >& 4 ;;
7070 4) echo "You have x86 80-bit big endian long doubles." >& 4 ;;
7071 5) echo "You have 128-bit fully little-endian double-double long doubles (64-bit LEs in LE)." >& 4 ;;
7072 6) echo "You have 128-bit fully big-endian double-double long doubles (64-bit BEs in BE)." >& 4 ;;
7073 7) echo "You have 128-bit mixed-endian double-double long doubles (64-bit LEs in BE)." >& 4 ;;
7074 8) echo "You have 128-bit mixed-endian double-double long doubles (64-bit BEs in LE)." >& 4 ;;
7075 9) echo "You have 128-bit PDP-style mixed-endian long doubles (VAX format H)." >& 4 ;;
7076 *) echo "Cannot figure out your long double." >&4 ;;
7078 d_long_double_style_ieee=$undef
7079 d_long_double_style_ieee_std=$undef
7080 d_long_double_style_ieee_extended=$undef
7081 d_long_double_style_ieee_doubledouble=$undef
7082 d_long_double_style_vax=$undef
7083 case "$longdblkind" in
7084 1|2|3|4|5|6|7|8) d_long_double_style_ieee=$define ;;
7086 case "$longdblkind" in
7087 1|2) d_long_double_style_ieee_std=$define ;;
7089 case "$longdblkind" in
7090 3|4) d_long_double_style_ieee_extended=$define ;;
7092 case "$longdblkind" in
7093 5|6|7|8) d_long_double_style_ieee_doubledouble=$define ;;
7095 case "$longdblkind" in
7096 9) d_long_double_style_vax=$define ;;
7100 : determine the architecture name
7102 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
7103 tarch=`arch`"-$osname"
7104 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
7105 if uname -m > tmparch 2>&1 ; then
7106 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
7107 -e 's/$/'"-$osname/" tmparch`
7115 case "$myarchname" in
7118 echo "(Your architecture name used to be $myarchname.)"
7122 case "$targetarch" in
7124 *) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
7129 *) dflt="$archname";;
7131 rp='What is your architecture name'
7135 : optionally add API version to the architecture for versioned archlibs
7136 case "$useversionedarchname" in
7137 $define|true|[yY]*) dflt='y';;
7140 rp='Add the Perl API version to your archname?'
7143 y|Y) useversionedarchname="$define" ;;
7144 *) useversionedarchname="$undef" ;;
7146 case "$useversionedarchname" in
7149 *-$api_versionstring)
7150 echo "...and architecture name already has -$api_versionstring" >&4
7153 archname="$archname-$api_versionstring"
7154 echo "...setting architecture name to $archname." >&4
7160 case "$usethreads" in
7162 echo "Threads selected." >&4
7164 *-thread*) echo "...and architecture name already has -thread." >&4
7166 *) archname="$archname-thread"
7167 echo "...setting architecture name to $archname." >&4
7172 case "$usemultiplicity" in
7174 echo "Multiplicity selected." >&4
7176 *-multi*) echo "...and architecture name already has -multi." >&4
7178 *) archname="$archname-multi"
7179 echo "...setting architecture name to $archname." >&4
7184 case "$use64bitint$use64bitall" in
7186 case "$archname64" in
7188 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
7191 case "$use64bitint" in
7192 "$define") echo "64 bit integers selected." >&4 ;;
7194 case "$use64bitall" in
7195 "$define") echo "Maximal 64 bitness selected." >&4 ;;
7198 *-$archname64*) echo "...and architecture name already has $archname64." >&4
7200 *) archname="$archname-$archname64"
7201 echo "...setting architecture name to $archname." >&4
7207 case "$uselongdouble" in
7209 echo "Long doubles selected." >&4
7210 case "$longdblsize" in
7212 echo "...but long doubles are equal to doubles, not changing architecture name." >&4
7216 *-ld*) echo "...and architecture name already has -ld." >&4
7218 *) archname="$archname-ld"
7219 echo "...setting architecture name to $archname." >&4
7226 case "$usequadmath" in
7228 echo "quadmath selected." >&4
7230 *-quadmath*) echo "...and architecture name already has -quadmath." >&4
7232 *) archname="$archname-quadmath"
7233 echo "...setting architecture name to $archname." >&4
7238 if $test -f archname.cbu; then
7239 echo "Your platform has some specific hints for architecture name, using them..."
7243 : set the prefixit variable, to compute a suitable default value
7244 prefixit='case "$3" in
7246 case "$oldprefix" in
7247 "") eval "$1=\"\$$2\"";;
7254 ""|" ") eval "$1=\"\$$2\"";;
7260 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
7262 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
7263 /*-$oldprefix/*|\~*-$oldprefix/*)
7264 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
7265 *) eval "$1=\"\$$2\"";;
7269 : determine installation style
7270 : For now, try to deduce it from prefix unless it is already set.
7271 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
7272 case "$installstyle" in
7273 '') case "$prefix" in
7274 *perl*) dflt='lib';;
7275 *) dflt='lib/perl5' ;;
7278 *) dflt="$installstyle" ;;
7280 : Probably not worth prompting for this since we prompt for all
7281 : the directories individually, and the prompt would be too long and
7285 : determine where public executables go
7290 rp='Pathname where the public executables will reside?'
7292 if $test "X$ansexp" != "X$binexp"; then
7296 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
7297 : XXX If this is fixed, also fix the "start perl" hunk below, which relies on
7298 : this via initialinstalllocation
7301 case "$userelocatableinc" in
7302 $define|true|[yY]*) dflt='y' ;;
7307 Would you like to build Perl so that the installation is relocatable, so that
7308 library paths in @INC are determined relative to the path of the perl binary?
7309 This is not advised for system Perl installs, or if you need to run setid
7310 scripts or scripts under taint mode.
7312 If this doesn't make any sense to you, just accept the default '$dflt'.
7314 rp='Use relocatable @INC?'
7317 y|Y) val="$define" ;;
7320 set userelocatableinc
7323 initialinstalllocation="$binexp"
7324 : Default prefix is now "up one level from where the binaries are"
7325 case "$userelocatableinc" in
7331 installprefixexp=".../.."
7335 : determine where private library files go
7336 : Usual default is /usr/local/lib/perl5/$version.
7337 : Also allow things like /opt/perl/lib/$version, since
7338 : /opt/perl/lib/perl5... would be redundant.
7339 : The default "style" setting is made in installstyle.U
7340 case "$installstyle" in
7341 *lib/perl5*) set dflt privlib lib/$package/$version ;;
7342 *) set dflt privlib lib/$version ;;
7347 There are some auxiliary files for $package that need to be put into a
7348 private library directory that is accessible by everyone.
7353 rp='Pathname where the private library files will reside?'
7358 : set the prefixup variable, to restore leading tilda escape
7359 prefixup='case "$prefixexp" in
7361 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
7364 : determine where public architecture dependent libraries go
7367 : privlib default is /usr/local/lib/$package/$version
7368 : archlib default is /usr/local/lib/$package/$version/$archname
7369 : privlib may have an optional trailing /share.
7370 tdflt=`echo $privlib | $sed 's,/share$,,'`
7371 tdflt=$tdflt/$archname
7380 $spackage contains architecture-dependent library files. If you are
7381 sharing libraries in a heterogeneous environment, you might store
7382 these files in a separate location. Otherwise, you can just include
7383 them with the rest of the public library files.
7388 rp='Where do you want to put the public architecture-dependent libraries?'
7392 if $test X"$archlib" = X"$privlib"; then
7398 : see if setuid scripts can be secure
7401 Some kernels have a bug that prevents setuid #! scripts from being
7402 secure. Some sites have disabled setuid #! scripts because of this.
7404 First let's decide if your kernel supports secure setuid #! scripts.
7405 (If setuid #! scripts would be secure but have been disabled anyway,
7406 don't say that they are secure if asked.)
7411 if $test -d /dev/fd; then
7412 echo "#!$ls" >reflect
7413 chmod +x,u+s reflect
7414 ./reflect >flect 2>&1
7415 if $contains "/dev/fd" flect >/dev/null; then
7416 echo "Congratulations, your kernel has secure setuid scripts!" >&4
7420 If you are not sure if they are secure, I can check but I'll need a
7421 username and password different from the one you are using right now.
7422 If you don't have such a username or don't want me to test, simply
7426 rp='Other username to test security of setuid scripts with?'
7431 case "$d_suidsafe" in
7432 '') echo "I'll assume setuid scripts are *not* secure." >&4
7435 echo "Well, the $hint value is *not* secure." >&4
7437 *) echo "Well, the $hint value *is* secure." >&4
7442 $rm -f reflect flect
7443 echo "#!$ls" >reflect
7444 chmod +x,u+s reflect
7447 echo '"su" will (probably) prompt you for '"$ans's password."
7448 su $ans -c './reflect >flect'
7449 if $contains "/dev/fd" flect >/dev/null; then
7450 echo "Okay, it looks like setuid scripts are secure." >&4
7453 echo "I don't think setuid scripts are secure." >&4
7458 rp='Does your kernel have *secure* setuid scripts?'
7461 [yY]*) val="$define";;
7466 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
7467 echo "(That's for file descriptors, not floppy disks.)"
7473 $rm -f reflect flect
7475 : now see if they want to do setuid emulation
7476 if $test $patchlevel -lt 11; then
7479 case "$d_suidsafe" in
7482 echo "No need to emulate SUID scripts since they are secure here." >&4
7486 Some systems have disabled setuid scripts, especially systems where
7487 setuid scripts cannot be secure. On systems where setuid scripts have
7488 been disabled, the setuid/setgid bits on scripts are currently
7489 useless. It is possible for $package to detect those bits and emulate
7490 setuid/setgid in a secure fashion. This emulation will only work if
7491 setuid scripts have been disabled in your kernel.
7495 "$define") dflt=y ;;
7498 rp="Do you want to do setuid/setgid emulation?"
7501 [yY]*) val="$define";;
7513 SUID emulation has been removed for 5.12
7514 Please re-run Configure without -Dd_dosuid
7523 : Find perl5.005 or later.
7524 echo "Looking for a previously installed perl5.005 or later... "
7526 '') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
7527 : Check if this perl is recent and can load a simple module
7528 if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7531 elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
7541 '') echo "None found. That's ok.";;
7542 *) echo "Using $perl5." ;;
7545 : Set the siteprefix variables
7548 After $package is installed, you may wish to install various
7549 add-on modules and utilities. Typically, these add-ons will
7550 be installed under $prefix with the rest
7551 of this package. However, you may wish to install such add-ons
7552 elsewhere under a different prefix.
7554 If you do not wish to put everything under a single prefix, that's
7555 ok. You will be prompted for the individual locations; this siteprefix
7556 is only used to suggest the defaults.
7558 The default should be fine for most people.
7562 rp='Installation prefix to use for add-on modules and utilities?'
7563 : XXX Here might be another good place for an installstyle setting.
7564 case "$siteprefix" in
7566 *) dflt=$siteprefix ;;
7569 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7571 case "$siteprefix" in
7575 *) oldsiteprefix="$prefix";;
7580 siteprefixexp="$ansexp"
7582 : determine where site specific libraries go.
7583 : Usual default is /usr/local/lib/perl5/site_perl/$version
7584 : The default "style" setting is made in installstyle.U
7585 : XXX No longer works with Prefixit stuff.
7586 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7588 '') case "$installstyle" in
7589 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
7590 *) dflt=$siteprefix/lib/site_$prog/$version ;;
7598 The installation process will create a directory for
7599 site-specific extensions and modules. Most users find it convenient
7600 to place all site-specific files in this directory rather than in the
7601 main distribution directory.
7605 rp='Pathname for the site-specific library files?'
7609 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
7611 : Determine list of previous versions to include in @INC
7612 $cat > getverlist <<EOPL
7615 \$api_versionstring = "$api_versionstring";
7616 \$version = "$version";
7617 \$stem = "$sitelib_stem";
7618 \$archname = "$archname";
7620 $cat >> getverlist <<'EOPL'
7621 # The list found is store twice for each entry: the original name, and
7622 # the binary broken down version as pack "sss", so sorting is easy and
7623 # unambiguous. This will work for all versions that have a maximum of
7624 # three digit groups, separate by '.'s or '_'s. Names are extended with
7625 # ".0.0" to ensure at least three elements for the pack.
7626 # -- H.Merijn Brand (m)'06 23-10-2006
7628 # Can't have leading @ because metaconfig interprets it as a command!
7629 ;@inc_version_list=();
7630 # XXX Redo to do opendir/readdir?
7633 ;@candidates = map {
7634 [ $_, pack "sss", split m/[._]/, "$_.0.0" ] } glob("5.*");
7635 ;@candidates = sort { $a->[1] cmp $b->[1]} @candidates;
7641 ($pversion, $aversion, $vsn5005) = map {
7642 pack "sss", split m/[._]/, "$_.0.0" } $version, $api_versionstring, "5.005";
7643 foreach $d (@candidates) {
7644 if ($d->[1] lt $pversion) {
7645 if ($d->[1] ge $aversion) {
7646 unshift(@inc_version_list, grep { -d } $d->[0]."/$archname", $d->[0]);
7648 elsif ($d->[1] ge $vsn5005) {
7649 unshift(@inc_version_list, grep { -d } $d->[0]);
7653 # Skip newer version. I.e. don't look in
7654 # 5.7.0 if we're installing 5.6.1.
7658 if (@inc_version_list) {
7659 print join(' ', @inc_version_list);
7662 # Blank space to preserve value for next Configure run.
7667 case "$inc_version_list" in
7668 '') if test -x "$perl5$exe_ext"; then
7669 dflt=`$perl5 getverlist`
7674 $undef) dflt='none' ;;
7675 *) eval dflt=\"$inc_version_list\" ;;
7678 ''|' ') dflt=none ;;
7685 In order to ease the process of upgrading, this version of perl
7686 can be configured to use modules built and installed with earlier
7687 versions of perl that were installed under $prefix. Specify here
7688 the list of earlier versions that this version of perl should check.
7689 If Configure detected no earlier versions of perl installed under
7690 $prefix, then the list will be empty. Answer 'none' to tell perl
7691 to not search earlier versions.
7693 The default should almost always be sensible, so if you're not sure,
7694 just accept the default.
7697 rp='List of earlier versions to include in @INC?'
7700 [Nn]one|''|' '|$undef) inc_version_list=' ' ;;
7701 *) inc_version_list="$ans" ;;
7703 case "$inc_version_list" in
7705 inc_version_list_init='0'
7706 d_inc_version_list="$undef"
7708 *) inc_version_list_init=`echo $inc_version_list |
7709 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
7710 d_inc_version_list="$define"
7715 : see if malloc/malloc.h has to be included
7716 set malloc/malloc.h i_mallocmalloc
7719 : see if this is a malloc.h system
7720 : we want a real compile instead of Inhdr because some systems have a
7721 : malloc.h that just gives a compile error saying to use stdlib.h instead
7726 #$i_mallocmalloc I_MALLOCMALLOC
7727 #ifdef I_MALLOCMALLOC
7728 # include <malloc/malloc.h>
7731 int main () { return 0; }
7734 if eval $compile; then
7735 echo "<malloc.h> found." >&4
7738 echo "<malloc.h> NOT found." >&4
7745 : check for length of pointer
7749 echo "Checking to see how big your pointers are..." >&4
7758 printf("%d\n", (int)sizeof(void *));
7763 if eval $compile_ok; then
7764 ptrsize=`$run ./try`
7765 echo "Your pointers are $ptrsize bytes long."
7768 echo "(I can't seem to compile the test program. Guessing...)" >&4
7769 rp="What is the size of a pointer (in bytes)?"
7776 case "$use64bitall" in
7777 "$define"|true|[yY]*)
7781 *** You have chosen a maximally 64-bit build,
7782 *** but your pointers are only 4 bytes wide.
7783 *** Please rerun Configure without -Duse64bitall.
7788 *** Since you have quads, you could possibly try with -Duse64bitint.
7793 *** Cannot continue, aborting.
7803 : determine whether to use malloc wrapping
7805 case "$usemallocwrap" in
7806 [yY]*|true|$define) dflt='y' ;;
7807 [nN]*|false|$undef) dflt='n' ;;
7808 *) case "$usedevel" in
7809 [yY]*|true|$define) dflt='y' ;;
7814 rp="Do you wish to wrap malloc calls to protect against potential overflows?"
7816 usemallocwrap="$ans"
7819 usemallocwrap="$define" ;;
7821 usemallocwrap="$undef" ;;
7824 : determine which malloc to compile in
7826 case "$usemymalloc" in
7827 [yY]*|true|$define) dflt='y' ;;
7828 [nN]*|false|$undef) dflt='n' ;;
7829 *) case "$ptrsize" in
7833 if test "$useithreads" = "$define"; then dflt='n'; fi
7836 rp="Do you wish to attempt to use the malloc that comes with $package?"
7842 mallocsrc='malloc.c'
7843 mallocobj="malloc$_o"
7844 d_mymalloc="$define"
7847 : Remove malloc from list of libraries to use
7848 echo "Removing unneeded -lmalloc from library list" >&4
7849 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
7852 echo "libs = $libs" >&4
7864 : compute the return types of malloc and free
7866 $cat >malloc.c <<END
7870 #include <sys/types.h>
7884 case "$malloctype" in
7886 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
7893 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
7897 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
7904 echo "Your system uses $freetype free(), it would seem." >&4
7906 : determine where site specific architecture-dependent libraries go.
7907 : sitelib default is /usr/local/lib/perl5/site_perl/$version
7908 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
7909 : sitelib may have an optional trailing /share.
7911 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
7912 dflt="$dflt/$archname"
7917 set sitearch sitearch none
7921 The installation process will also create a directory for
7922 architecture-dependent site-specific extensions and modules.
7926 rp='Pathname for the site-specific architecture-dependent library files?'
7930 if $test X"$sitearch" = X"$sitelib"; then
7933 d_sitearch="$define"
7936 : Set the vendorprefix variables
7939 The installation process will also create a directory for
7940 vendor-supplied add-ons. Vendors who supply perl with their system
7941 may find it convenient to place all vendor-supplied files in this
7942 directory rather than in the main distribution directory. This will
7943 ease upgrades between binary-compatible maintenance versions of perl.
7945 Of course you may also use these directories in whatever way you see
7946 fit. For example, you might use them to access modules shared over a
7947 company-wide network.
7949 The default answer should be fine for most people.
7950 This causes further questions about vendor add-ons to be skipped
7951 and no vendor-specific directories will be configured for perl.
7954 rp='Do you want to configure vendor-specific add-on directories?'
7955 case "$usevendorprefix" in
7956 define|true|[yY]*) dflt=y ;;
7957 *) : User may have set vendorprefix directly on Configure command line.
7958 case "$vendorprefix" in
7967 rp='Installation prefix to use for vendor-supplied add-ons?'
7968 case "$vendorprefix" in
7969 '') dflt="$prefix" ;;
7970 *) dflt=$vendorprefix ;;
7973 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
7975 case "$vendorprefix" in
7979 *) oldvendorprefix="$prefix";;
7983 usevendorprefix="$define"
7985 vendorprefixexp="$ansexp"
7987 *) usevendorprefix="$undef"
7993 : Set the vendorlib variables
7994 case "$vendorprefix" in
7995 '') d_vendorlib="$undef"
7999 *) d_vendorlib="$define"
8000 : determine where vendor-supplied modules go.
8001 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
8002 case "$vendorlib" in
8004 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
8005 case "$installstyle" in
8006 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
8007 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
8010 *) dflt="$vendorlib"
8014 rp='Pathname for the vendor-supplied library files?'
8017 vendorlibexp="$ansexp"
8020 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
8024 : Set the vendorarch variables
8025 case "$vendorprefix" in
8026 '') d_vendorarch="$undef"
8030 *) d_vendorarch="$define"
8031 : determine where vendor-supplied architecture-dependent libraries go.
8032 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
8033 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
8034 : vendorlib may have an optional trailing /share.
8035 case "$vendorarch" in
8036 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
8037 dflt="$dflt/$archname"
8039 *) dflt="$vendorarch" ;;
8042 rp='Pathname for vendor-supplied architecture-dependent files?'
8045 vendorarchexp="$ansexp"
8048 prefixvar=vendorarch
8050 if $test X"$vendorarch" = X"$vendorlib"; then
8051 d_vendorarch="$undef"
8053 d_vendorarch="$define"
8056 : Final catch-all directories to search
8059 Lastly, you can have perl look in other directories for extensions and
8060 modules in addition to those already specified.
8061 These directories will be searched after
8065 test X"$vendorlib" != "X" && echo ' ' $vendorlib
8066 test X"$vendorarch" != "X" && echo ' ' $vendorarch
8068 case "$otherlibdirs" in
8069 ''|' ') dflt='none' ;;
8070 *) dflt="$otherlibdirs" ;;
8073 Enter a colon-separated set of extra paths to include in perl's @INC
8074 search path, or enter 'none' for no extra paths.
8078 rp='Colon-separated list of additional directories for perl to search?'
8081 ' '|''|none) otherlibdirs=' ' ;;
8082 *) otherlibdirs="$ans" ;;
8084 case "$otherlibdirs" in
8088 set d_perl_otherlibdirs
8092 dflt_dtrace='/usr/sbin/dtrace'
8093 $test -x /usr/bin/dtrace && dflt_dtrace='/usr/bin/dtrace'
8097 Perl can be built to support DTrace on platforms that support it.
8098 DTrace is a diagnosis and performance analysis tool from Sun.
8100 If this doesn't make any sense to you, just accept the default.
8104 case "$usedtrace" in
8110 dflt_dtrace=$usedtrace
8117 rp='Support DTrace if available?'
8120 y|Y) val="$define" ;;
8126 test "X$usedtrace" != "X$define" && break
8129 rp='Where is the dtrace executable?'
8138 if $dtrace -h -s ../perldtrace.d \
8139 -o perldtrace.tmp >/dev/null 2>&1 \
8140 && rm -f perldtrace.tmp
8143 echo "Good: your $dtrace knows about the -h flag."
8147 *** $me: Fatal Error: $dtrace doesn't support -h flag
8149 *** Your installed dtrace doesn't support the -h switch to compile a D
8150 *** program into a C header. Can't continue.
8162 *** $me: Fatal Error: $dtrace not found.
8169 echo "*** $dtrace was not found."
8175 : See if we want extra modules installed
8182 Perl can be built with extra modules or bundles of modules which
8183 will be fetched from the CPAN and installed alongside Perl.
8185 Notice that you will need access to the CPAN; either via the Internet,
8186 or a local copy, for example a CD-ROM or a local CPAN mirror. (You will
8187 be asked later to configure the CPAN.pm module which will in turn do
8188 the installation of the rest of the extra modules or bundles.)
8190 Notice also that if the modules require any external software such as
8191 libraries and headers (the libz library and the zlib.h header for the
8192 Compress::Zlib module, for example) you MUST have any such software
8193 already installed, this configuration process will NOT install such
8196 If this doesn't make any sense to you, just accept the default '$dflt'.
8198 rp='Install any extra modules (y or n)?'
8204 Please list any extra modules or bundles to be installed from CPAN,
8205 with spaces between the names. The names can be in any format the
8206 'install' command of CPAN.pm will understand. (Answer 'none',
8207 without the quotes, to install no extra modules or bundles.)
8217 $rm -f ../extras.lst
8219 *) echo "(Saving the list of extras for later...)"
8220 echo "$extras" > ../extras.lst
8228 : determine where html pages for programs go
8229 set html1dir html1dir none
8233 If you wish to install html files for programs in $spackage, indicate
8234 the appropriate directory here. To skip installing html files,
8238 ''|none|$undef|' ') dflt=none ;;
8239 *) dflt=$html1dir ;;
8242 rp="Directory for the main $spackage html pages?"
8246 : Use ' ' for none so value is preserved next time through Configure
8247 $test X"$html1dir" = "X" && html1dir=' '
8249 : determine where html pages for libraries and modules go
8250 set html3dir html3dir none
8254 If you wish to install html files for modules associated with $spackage,
8255 indicate the appropriate directory here. To skip installing html files,
8258 : There is no obvious default. If they have specified html1dir, then
8259 : try to key off that, possibly changing .../html1 into .../html3.
8261 '') html3dir=`echo "$html1dir" | $sed 's/1$/3$/'` ;;
8262 *) dflt=$html3dir ;;
8265 rp="Directory for the $spackage module html pages?"
8269 : Use ' ' for none so value is preserved next time through Configure
8270 $test X"$html3dir" = "X" && html3dir=' '
8272 : determine whether to install perl also as /usr/bin/perl
8275 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
8277 Many scripts expect perl to be installed as /usr/bin/perl.
8279 If you want to, I can install the perl you are about to compile
8280 as /usr/bin/perl (in addition to $bin/perl).
8282 if test -f /usr/bin/perl; then
8285 However, please note that because you already have a /usr/bin/perl,
8286 overwriting that with a new Perl would very probably cause problems.
8287 Therefore I'm assuming you don't want to do that (unless you insist).
8290 case "$installusrbinperl" in
8291 "$define"|[yY]*) dflt='y';;
8297 Since you don't have a /usr/bin/perl I'm assuming creating one is okay.
8300 case "$installusrbinperl" in
8301 "$undef"|[nN]*) dflt='n';;
8305 rp="Do you want to install perl as /usr/bin/perl?"
8308 [yY]*) val="$define";;
8314 set installusrbinperl
8317 : see if dlopen exists
8319 xxx_ccflags="$ccflags"
8321 : with g++ one needs -shared to get is-in-libc to work for dlopen
8322 case "$gccversion" in
8325 *) case "$d_cplusplus" in
8326 "$define") ccflags="$ccflags -shared" ;;
8333 ccflags="$xxx_ccflags"
8335 : see if this is a unistd.h system
8336 set unistd.h i_unistd
8339 : determine which dynamic loading, if any, to compile in
8341 dldir="ext/DynaLoader"
8354 $define) dflt='y' ;;
8356 : Does a dl_xxx.xs file exist for this operating system
8357 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
8360 rp="Do you wish to use dynamic loading?"
8367 '') if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
8368 dflt="$dldir/dl_${osname}.xs"
8369 elif $test "$d_dlopen" = "$define" ; then
8370 dflt="$dldir/dl_dlopen.xs"
8375 *) dflt="$dldir/$dlsrc"
8378 echo "The following dynamic loading files are available:"
8379 : Can not go over to $dldir because getfile has path hard-coded in.
8380 tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
8381 rp="Source file to use for dynamic loading"
8387 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
8391 Some systems may require passing special flags to $cc -c to
8392 compile modules that will be used to create a shared library.
8393 To use no flags, say "none".
8396 case "$cccdlflags" in
8397 '') case "$gccversion" in
8398 '') case "$osname" in
8400 irix*) dflt='-KPIC' ;;
8401 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
8402 sunos) dflt='-pic' ;;
8406 *) case "$osname" in
8407 darwin) dflt='none' ;;
8408 *linux*|svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
8413 *) dflt="$cccdlflags" ;;
8420 # If -Dsysroot was specified, now's the time to add it
8422 if test "X$sysroot" != X; then
8423 case "$gccversion" in
8428 dflt="$dflt --sysroot=$sysroot" ;;
8438 rp="Any special flags to pass to $cc -c to compile shared library modules?"
8441 none) cccdlflags=' ' ;;
8442 *) cccdlflags="$ans" ;;
8447 Some systems use ld to create libraries that can be dynamically loaded,
8448 while other systems (such as those using ELF) use $cc.
8452 : Determine if this is ELF
8454 /* Test for whether ELF binaries are produced */
8466 int i = open("a.out",O_RDONLY);
8469 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
8470 exit(0); /* succeed (yes, it is ELF) */
8474 if $cc $ccflags $ldflags -o a.out try.c >/dev/null 2>&1 && $run ./a.out; then
8480 '') if $test $bin_ELF = "$define"; then
8482 You appear to have ELF support. I'll use $cc to build dynamic libraries.
8486 echo "I'll use ld to build dynamic libraries."
8494 rp="What command should be used to create dynamic libraries?"
8500 Some systems may require passing special flags to $ld to create a
8501 library that can be dynamically loaded. If your ld flags include
8502 -L/other/path options to locate libraries outside your loader's normal
8503 search path, you may need to specify those -L options here as well. To
8504 use no flags, say "none".
8507 case "$lddlflags" in
8508 '') case "$osname" in
8509 haiku) dflt='-shared' ;;
8511 case "$gccversion" in
8512 '') dflt="$dflt +vnocompatwarnings" ;;
8515 *linux*|irix*|gnu*) dflt="-shared $optimize" ;;
8516 solaris) # See [perl #66604].
8517 # On Solaris 11, gcc -m64 on amd64
8518 # appears not to understand -G. gcc versions at
8519 # least as old as 3.4.3 support -shared, so just
8520 # use that with Solaris 11 and later, but keep
8521 # the old behavior for older Solaris versions.
8522 case "$gccversion" in
8524 *) case "$osvers" in
8525 2.?|2.10) dflt='-G' ;;
8526 *) dflt='-shared' ;;
8531 sunos) dflt='-assert nodefinitions' ;;
8532 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
8536 *) dflt="$lddlflags" ;;
8539 : Only do this for gcc, since, for example, qcc has no concept
8541 if $test "X$sysroot" != X; then
8542 case "$gccversion" in
8544 *) dflt="$dflt --sysroot $sysroot" ;;
8548 : Try to guess additional flags to pick up local libraries.
8549 : Be careful not to append to a plain 'none'
8553 for thisflag in $ldflags; do
8558 *) dflt="$dflt $thisflag" ;;
8565 ''|' ') dflt='none' ;;
8569 *-fstack-protector-strong*)
8571 *-fstack-protector-strong*) ;; # Don't add it again
8572 *) dflt="$dflt -fstack-protector-strong" ;;
8575 *-fstack-protector*)
8577 *-fstack-protector*) ;; # Don't add it again
8578 *) dflt="$dflt -fstack-protector" ;;
8583 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
8586 none) lddlflags=' ' ;;
8587 *) lddlflags="$ans" ;;
8592 Some systems may require passing special flags to $cc to indicate that
8593 the resulting executable will use dynamic linking. To use no flags,
8597 case "$ccdlflags" in
8598 '') case "$osname" in
8599 *linux*|hpux|gnu*) dflt='-Wl,-E' ;;
8600 sunos) dflt='none' ;;
8604 *) dflt="$ccdlflags" ;;
8606 rp="Any special flags to pass to $cc to use dynamic linking?"
8609 none) ccdlflags=' ' ;;
8610 *) ccdlflags="$ans" ;;
8622 ld_can_script="$undef"
8623 case "$bin_ELF$usedl" in
8625 # Abuse try.h and a.out names for neat cleanup
8637 if $cc $cccdlflags $ccdlflags $ccflags \
8638 $ldflags $lddlflags -o a.out try.c \
8639 -Wl,--version-script=try.h >/dev/null 2>&1 \
8640 && $test -s a.out ; then
8641 echo "ld supports scripting" >&4
8642 ld_can_script="$define"
8644 echo "ld does not support scripting" >&4
8650 : Do we want a shared libperl?
8654 # No dynamic loading being used, so don't bother even to prompt.
8657 *) case "$useshrplib" in
8658 '') case "$osname" in
8659 svr4*|nonstopux|dgux|dynixptx|esix|powerux|haiku|cygwin*)
8661 also='Building a shared libperl is required for dynamic loading to work on your system.'
8675 The perl executable is normally obtained by linking perlmain.c with
8676 libperl${_a}, any static extensions (usually just DynaLoader), and
8677 any other libraries needed on this system (such as -lm, etc.). Since
8678 your system supports dynamic loading, it is probably possible to build
8679 a shared libperl.$so. If you will have more than one executable linked
8680 to libperl.$so, this will significantly reduce the size of each
8681 executable, but it may have a noticeable effect on performance. The
8682 default is probably sensible for your system.
8686 rp="Build a shared libperl.$so (y/n)"
8690 useshrplib='true' ;;
8691 *) useshrplib='false' ;;
8696 case "$useshrplib" in
8698 case "$userelocatableinc" in
8700 echo "Cannot build with both -Duserelocatableinc and -Duseshrplib" >&4
8701 echo "See INSTALL for an explanation why that won't work." >&4
8707 # Figure out a good name for libperl.so. Since it gets stored in
8708 # a version-specific architecture-dependent library, the version
8709 # number isn't really that important, except for making cc/ld happy.
8711 # A name such as libperl.so.10.1
8712 majmin="libperl.$so.$patchlevel.$subversion"
8713 # A name such as libperl.so.100
8714 majonly=`echo $patchlevel $subversion |
8715 $awk '{printf "%d%02d", $1, $2}'`
8716 majonly=libperl.$so.$majonly
8717 # I'd prefer to keep the os-specific stuff here to a minimum, and
8718 # rely on figuring it out from the naming of libc.
8719 case "${osname}${osvers}" in
8720 *linux*|gnu*) # ld won't link with a bare -lperl otherwise.
8723 cygwin*) # ld links now against the dll directly
8724 majmin="cygperl5_${patchlevel}_${subversion}.${so}"
8725 majonly=`echo $patchlevel $subversion |
8726 $awk '{printf "%03d%03d", $1, $2}'`
8727 majonly=cygperl5.$majonly.$so
8730 *) # Try to guess based on whether libc has major.minor.
8732 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
8733 *libc.$so.[0-9]*) dflt=$majonly ;;
8734 *) dflt=libperl.$so ;;
8744 I need to select a good name for the shared libperl. If your system uses
8745 library names with major and minor numbers, then you might want something
8746 like $majmin. Alternatively, if your system uses a single version
8747 number for shared libraries, then you might want to use $majonly.
8748 Or, your system might be quite happy with a simple libperl.$so.
8750 Since the shared libperl will get installed into a version-specific
8751 architecture-dependent directory, the version number of the shared perl
8752 library probably isn't important, so the default should be o.k.
8755 rp='What name do you want to give to the shared libperl?'
8758 echo "Ok, I'll use $libperl"
8761 libperl="libperl${_a}"
8765 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
8769 WARNING: Use of the shrpdir variable for the installation location of
8770 the shared $libperl is not supported. It was never documented and
8771 will not work in this version. Let me (perlbug@perl.org)
8772 know of any problems this may cause.
8778 But your current setting of $shrpdir is
8779 the default anyway, so it's harmless.
8784 Further, your current attempted setting of $shrpdir
8785 conflicts with the value of $archlibexp/CORE
8786 that installperl will use.
8793 # How will the perl executable find the installed shared $libperl?
8794 # Add $xxx to ccdlflags.
8795 # If we can't figure out a command-line option, use $shrpenv to
8796 # set env LD_RUN_PATH. The main perl makefile uses this.
8797 shrpdir=$archlibexp/CORE
8800 if "$useshrplib"; then
8803 # We'll set it in Makefile.SH...
8808 freebsd|minix|mirbsd|netbsd|openbsd|interix|dragonfly|bitrig)
8809 xxx="-Wl,-R$shrpdir"
8811 bsdos|linux|irix*|dec_osf|gnu*|haiku)
8812 xxx="-Wl,-rpath,$shrpdir"
8815 # hpux doesn't like the default, either.
8816 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
8819 # cygwin needs only ldlibpth
8822 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
8828 # Only add $xxx if it isn't already in ccdlflags.
8829 case " $ccdlflags " in
8831 *) ccdlflags="$ccdlflags $xxx"
8834 Adding $xxx to the flags
8835 passed to $ld so that the perl executable will find the
8836 installed shared $libperl.
8844 # Fix ccdlflags in AIX for building external extensions.
8845 # (For building Perl itself bare -bE:perl.exp is needed,
8846 # Makefile.SH takes care of this.)
8848 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
8850 # Respect a hint or command-line value.
8852 '') shrpenv="$tmp_shrpenv" ;;
8854 case "$ldlibpthname" in
8855 '') ldlibpthname=LD_LIBRARY_PATH ;;
8856 none) ldlibpthname='' ;;
8859 : determine where manual pages are on this system
8863 syspath='/usr/share/man/man1 /usr/man/man1'
8864 syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
8865 syspath="$syspath /usr/man/u_man/man1"
8866 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
8867 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
8868 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
8869 sysman=`./loc . /usr/man/man1 $syspath`
8872 if $test -d "$sysman"; then
8873 echo "System manual is in $sysman." >&4
8875 echo "Could not find manual pages in source form." >&4
8878 : determine where manual pages go
8879 set man1dir man1dir none
8883 $spackage has manual pages available in source form.
8887 echo "However, you don't have nroff, so they're probably useless to you."
8889 '') man1dir="none";;
8892 echo "If you don't want the manual sources installed, answer 'none'."
8897 lookpath="$prefixexp/share/man/man1"
8898 lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
8899 lookpath="$lookpath $prefixexp/man/p_man/man1"
8900 lookpath="$lookpath $prefixexp/man/u_man/man1"
8901 lookpath="$lookpath $prefixexp/man/man.1"
8903 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
8904 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
8914 rp="Where do the main $spackage manual pages (source) go?"
8916 if $test "X$man1direxp" != "X$ansexp"; then
8927 : What suffix to use on installed man pages
8934 rp="What suffix should be used for the main $spackage man pages?"
8936 '') case "$man1dir" in
8950 *) dflt="$man1ext";;
8957 : see if we can have long filenames
8959 first=123456789abcdef
8961 if (echo hi >$first) 2>/dev/null; then
8962 if $test -f 123456789abcde; then
8963 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
8966 echo 'You can have filenames longer than 14 characters.'>&4
8971 You can't have filenames longer than 14 chars.
8972 You can't even think about them!
8978 $rm -rf 123456789abcde*
8980 : determine where library module manual pages go
8981 set man3dir man3dir none
8985 $spackage has manual pages for many of the library modules.
8991 However, you don't have nroff, so they're probably useless to you.
8994 '') man3dir="none";;
8998 case "$d_flexfnam" in
9001 However, your system can't handle the long file names like File::Basename.3.
9004 '') man3dir="none";;
9008 echo "If you don't want the manual sources installed, answer 'none'."
9009 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
9011 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
9012 if $test -d "$privlib/man/man3"; then
9015 WARNING: Previous versions of perl installed man3 pages into
9016 $privlib/man/man3. This version will suggest a
9017 new default of $dflt.
9021 rp='Do you wish to preserve the old behavior?(y/n)'
9024 y*) dflt="$privlib/man/man3" ;;
9029 *) dflt="$man3dir" ;;
9036 rp="Where do the $package library man pages (source) go?"
9046 : What suffix to use on installed man pages
9052 rp="What suffix should be used for the $package library man pages?"
9054 '') case "$man3dir" in
9068 *) dflt="$man3ext";;
9075 : see if we have to deal with yellow pages, now NIS.
9076 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
9082 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
9090 rp='Are you getting the hosts file via yellow pages?'
9093 y*) hostcat='ypcat hosts';;
9094 *) hostcat='cat /etc/hosts';;
9100 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
9103 '') test -f /etc/group && groupcat='cat /etc/group';;
9106 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
9109 : now get the host name
9111 echo "Figuring out host name..." >&4
9112 case "$myhostname" in
9114 echo 'Maybe "hostname" will work...'
9115 if tans=`sh -c hostname 2>&1` ; then
9123 if $test "$cont"; then
9125 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
9126 if tans=`cat /etc/systemid 2>&1` ; then
9128 phostname='cat /etc/systemid'
9129 echo "Whadyaknow. Xenix always was a bit strange..."
9132 elif $test -r /etc/systemid; then
9133 echo "(What is a non-Xenix system doing with /etc/systemid?)"
9136 if $test "$cont"; then
9137 echo 'No, maybe "uuname -l" will work...'
9138 if tans=`sh -c 'uuname -l' 2>&1` ; then
9140 phostname='uuname -l'
9142 echo 'Strange. Maybe "uname -n" will work...'
9143 if tans=`sh -c 'uname -n' 2>&1` ; then
9145 phostname='uname -n'
9147 echo 'Oh well, maybe I can mine it out of whoami.h...'
9148 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
9149 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
9150 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
9152 case "$myhostname" in
9153 '') echo "Does this machine have an identity crisis or something?"
9156 echo "Well, you said $myhostname before..."
9157 phostname='echo $myhostname';;
9163 case "$myhostname" in
9164 '') myhostname=noname ;;
9166 : you do not want to know about this
9171 if $test "$myhostname" ; then
9173 rp='Your host name appears to be "'$myhostname'".'" Right?"
9181 : bad guess or no guess
9182 while $test "X$myhostname" = X ; do
9184 rp="Please type the (one word) name of your host:"
9189 : translate upper to lower if necessary
9190 case "$myhostname" in
9192 echo "(Normalizing case in your host name)"
9193 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
9197 case "$myhostname" in
9199 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
9200 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
9201 echo "(Trimming domain name from host name--host name is now $myhostname)"
9203 *) case "$mydomain" in
9206 test "X$hostcat" = "Xypcat hosts" &&
9207 ypmatch "$myhostname" hosts 2>/dev/null |\
9208 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
9211 test "X$hostcat" != "X" &&
9212 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
9213 /[ ]$myhostname[ . ]/p" > hosts
9216 if $test -f hosts; then
9217 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
9218 END { print sum }" hosts` = x1 || tmp_re="[ ]"
9219 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
9220 hosts | $sort | $uniq | \
9221 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
9222 case `$echo X$dflt` in
9223 X*\ *) echo "(Several hosts in the database matched hostname)"
9226 X.) echo "(You do not have fully-qualified names in the hosts database)"
9230 echo "(I cannot locate a hosts database anywhere)"
9235 tans=`./loc resolv.conf X /etc /usr/etc`
9236 if $test -f "$tans"; then
9237 echo "(Attempting domain name extraction from $tans)"
9238 dflt=.`$sed -n -e 's/ / /g' \
9239 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
9242 .) dflt=.`$sed -n -e 's/ / /g' \
9243 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
9251 .) echo "(No help from resolv.conf either -- attempting clever guess)"
9252 dflt=.`sh -c domainname 2>/dev/null`
9255 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
9259 case "$dflt$osname" in
9260 .os390) echo "(Attempting domain name extraction from //'SYS1.TCPPARMS(TCPDATA)')"
9261 dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "//'SYS1.TCPPARMS(TCPDATA)'" 2>/dev/null`
9265 .) echo "(Lost all hope -- silly guess then)"
9271 *) dflt="$mydomain";;
9275 rp="What is your domain name?"
9285 : translate upper to lower if necessary
9288 echo "(Normalizing case in your domain name)"
9289 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
9293 : a little sanity check here
9294 case "$phostname" in
9297 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
9298 $myhostname$mydomain|$myhostname) ;;
9300 case "$phostname" in
9302 echo "(That doesn't agree with your whoami.h file, by the way.)"
9305 echo "(That doesn't agree with your $phostname command, by the way.)"
9313 : determine the e-mail address of the user who is running us
9316 I need to get your e-mail address in Internet format if possible, i.e.
9317 something like user@host.domain. Please answer accurately since I have
9318 no easy means to double check it. The default value provided below
9319 is most probably close to reality but may not be valid from outside
9320 your organization...
9324 while test "$cont"; do
9325 case "$MAILDOMAIN" in
9327 if $test -s /etc/mailname; then
9328 maildomain=`$cat /etc/mailname`
9330 maildomain="$myhostname$mydomain"
9333 *) maildomain="$MAILDOMAIN";;
9336 '') dflt="$cf_by@$maildomain";;
9337 *) dflt="$cf_email";;
9339 rp='What is your e-mail address?'
9345 rp='Address does not look like an Internet one. Use it anyway?'
9359 : Ask e-mail of administrator
9362 If you or somebody else will be maintaining perl at your site, please
9363 fill in the correct e-mail address here so that they may be contacted
9364 if necessary. Currently, the "perlbug" program included with perl
9365 will send mail to this address in addition to perlbug@perl.org. You may
9366 enter "none" for no administrator.
9369 case "$perladmin" in
9370 '') dflt="$cf_email";;
9371 *) dflt="$perladmin";;
9373 rp='Perl administrator e-mail address'
9377 : determine whether to use a version number suffix for installed binaries
9380 Do you want to use a version number suffix for installed binaries? This
9381 will install 'perl$version' instead of 'perl', and likewise for other
9382 binaries like 'perldoc' and 'cpan'. This allows many versions of perl
9383 to be installed side-by-side. Unless you are a developer, you probably
9384 do *not* want to do this.
9386 case "$versiononly" in
9387 "$define"|[Yy]*|true) dflt='y' ;;
9390 rp="Do you want to use a version number suffix for installed binaries?"
9393 [yY]*) val="$define";;
9399 case "$versiononly" in
9400 "$define") inc_version_list=''
9401 inc_version_list_init=0
9405 : figure out how to guarantee perl startup
9406 : XXX Note that this currently takes advantage of the bug that binexp ignores
9407 : the Configure -Dinstallprefix setting, which in turn means that under
9408 : relocatable @INC, initialinstalllocation is what binexp started as.
9409 case "$startperl" in
9411 case "$sharpbang" in
9415 I can use the #! construct to start perl on your system. This will
9416 make startup of perl scripts faster, but may cause problems if you
9417 want to share those scripts and perl is not in a standard place
9418 ($initialinstalllocation/perl) on all your platforms. The alternative
9419 is to force a shell by starting the script with a single ':' character.
9422 case "$versiononly" in
9423 "$define") dflt="$initialinstalllocation/perl$version";;
9424 *) dflt="$initialinstalllocation/perl";;
9426 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
9429 none) startperl=": # use perl";;
9430 *) startperl="#!$ans"
9431 if $test 30 -lt `echo "$ans" | wc -c`; then
9434 WARNING: Some systems limit the #! command to 32 characters.
9435 If you experience difficulty running Perl scripts with #!, try
9436 installing Perl in a directory with a shorter pathname.
9442 *) startperl=": # use perl"
9447 echo "I'll use $startperl to start perl scripts."
9449 : figure best path for perl in scripts
9452 case "$versiononly" in
9453 "$define") perlpath="$initialinstalllocation/perl$version";;
9454 *) perlpath="$initialinstalllocation/perl";;
9456 case "$startperl" in
9461 I will use the "eval 'exec'" idiom to start Perl on your system.
9462 I can use the full path of your Perl binary for this purpose, but
9463 doing so may cause problems if you want to share those scripts and
9464 Perl is not always in a standard place ($initialinstalllocation/perl).
9467 dflt="$initialinstalllocation/perl"
9468 rp="What path shall I use in \"eval 'exec'\"?"
9475 case "$startperl" in
9477 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
9480 : determine where public executable scripts go
9481 set scriptdir scriptdir
9483 case "$scriptdir" in
9486 : guess some guesses
9487 $test -d /usr/share/scripts && dflt=/usr/share/scripts
9488 $test -d /usr/share/bin && dflt=/usr/share/bin
9489 $test -d /usr/local/script && dflt=/usr/local/script
9490 $test -d /usr/local/scripts && dflt=/usr/local/scripts
9491 $test -d $prefixexp/script && dflt=$prefixexp/script
9495 *) dflt="$scriptdir"
9500 Some installations have a separate directory just for executable scripts so
9501 that they can mount it across multiple architectures but keep the scripts in
9502 one spot. You might, for example, have a subdirectory of /usr/share for this.
9503 Or you might just lump your scripts in with all your other executables.
9507 rp='Where do you keep publicly executable scripts?'
9509 if $test "X$ansexp" != "X$scriptdirexp"; then
9515 : A little fix up for an irregularly named variable.
9516 installscript="$installscriptdir"
9518 : determine where add-on public executables go
9520 '') dflt=$siteprefix/bin ;;
9524 rp='Pathname where the add-on public executables should be installed?'
9529 : determine where add-on html pages go
9530 : There is no standard location, so try to copy the previously-selected
9531 : directory structure for the core html pages.
9532 case "$sitehtml1dir" in
9533 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$siteprefix#"` ;;
9534 *) dflt=$sitehtml1dir ;;
9537 ''|' ') dflt=none ;;
9540 rp='Pathname where the site-specific html pages should be installed?'
9542 prefixvar=sitehtml1dir
9545 : determine where add-on library html pages go
9546 : There is no standard location, so try to copy the previously-selected
9547 : directory structure for the core html pages.
9548 case "$sitehtml3dir" in
9549 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$siteprefix#"` ;;
9550 *) dflt=$sitehtml3dir ;;
9553 ''|' ') dflt=none ;;
9556 rp='Pathname where the site-specific library html pages should be installed?'
9558 prefixvar=sitehtml3dir
9561 : determine where add-on manual pages go
9562 case "$siteman1dir" in
9563 '') dflt=`echo $man1dir | $sed "s#^$prefix#$siteprefix#"` ;;
9564 *) dflt=$siteman1dir ;;
9567 ''|' ') dflt=none ;;
9570 rp='Pathname where the site-specific manual pages should be installed?'
9572 prefixvar=siteman1dir
9575 : determine where add-on library man pages go
9576 case "$siteman3dir" in
9577 '') dflt=`echo $man3dir | $sed "s#^$prefix#$siteprefix#"` ;;
9578 *) dflt=$siteman3dir ;;
9581 ''|' ') dflt=none ;;
9584 rp='Pathname where the site-specific library manual pages should be installed?'
9586 prefixvar=siteman3dir
9589 : determine where add-on public executable scripts go
9590 case "$sitescript" in
9591 '') dflt=$siteprefix/script
9592 $test -d $dflt || dflt=$sitebin ;;
9593 *) dflt="$sitescript" ;;
9596 rp='Pathname where add-on public executable scripts should be installed?'
9598 prefixvar=sitescript
9601 : see if backtrace exists
9602 set backtrace d_backtrace
9605 : add flags if using c backtrace
9606 case "$usecbacktrace" in
9607 "") usecbacktrace=$undef ;;
9609 case "$d_backtrace" in
9611 case " $ccflags " in
9612 *" -DUSE_C_BACKTRACE "*) ;; # Already there.
9613 *) ccflags="$ccflags -DUSE_C_BACKTRACE -g" ;;
9617 echo "This system does not support backtrace" >&4
9618 usecbacktrace=$undef
9624 : Check if faststdio is requested and available
9625 case "$usefaststdio" in
9626 $define|true|[yY]*|'')
9627 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
9637 Perl can be built to use 'fast stdio', which means using the stdio
9638 library but also directly manipulating the stdio buffers to enable
9639 faster I/O. Using stdio is better for backward compatibility (especially
9640 for Perl extensions), but on the other hand since Perl 5.8 the 'perlio'
9641 interface has been preferred instead of stdio.
9643 If this doesn't make any sense to you, just accept the default '$dflt'.
9645 rp='Use the "fast stdio" if available?'
9648 y|Y) val="$define" ;;
9654 : define an is-a-typedef? function
9655 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
9657 "") inclist="sys/types.h";;
9659 eval "varval=\$$var";
9663 for inc in $inclist; do
9664 echo "#include <$inc>" >>temp.c;
9666 echo "#ifdef $type" >> temp.c;
9667 echo "printf(\"We have $type\");" >> temp.c;
9668 echo "#endif" >> temp.c;
9669 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
9670 if $contains $type temp.E >/dev/null 2>&1; then
9676 *) eval "$var=\$varval";;
9679 : define an is-a-typedef? function that prompts if the type is not available.
9680 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
9682 "") inclist="sys/types.h";;
9684 eval "varval=\$$var";
9688 for inc in $inclist; do
9689 echo "#include <$inc>" >>temp.c;
9691 echo "#ifdef $type" >> temp.c;
9692 echo "printf(\"We have $type\");" >> temp.c;
9693 echo "#endif" >> temp.c;
9694 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
9696 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
9697 if $contains $type temp.E >/dev/null 2>&1; then
9698 echo "$type found." >&4;
9701 echo "$type NOT found." >&4;
9707 *) eval "$var=\$varval";;
9710 : see what type lseek is declared as in the kernel
9711 rp="What is the type used for lseek's offset on this system?"
9712 set off_t lseektype long stdio.h sys/types.h
9716 echo "Checking to see how big your file offsets are..." >&4
9718 #include <sys/types.h>
9722 printf("%d\n", (int)sizeof($lseektype));
9727 if eval $compile_ok; then
9728 lseeksize=`$run ./try`
9729 echo "Your file offsets are $lseeksize bytes long."
9733 echo "(I can't seem to compile the test program. Guessing...)"
9734 rp="What is the size of your file offsets (in bytes)?"
9740 : see what type file positions are declared as in the library
9741 rp="What is the type for file position used by fsetpos()?"
9742 set fpos_t fpostype long stdio.h sys/types.h
9745 : Check size for Fpos_t
9748 *_t) zzz="$fpostype" ;;
9751 echo "Checking the size of $zzz..." >&4
9753 #include <sys/types.h>
9760 printf("%d\n", (int)sizeof($fpostype));
9765 if eval $compile_ok; then
9769 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9772 echo "Your $zzz is $fpossize bytes long."
9778 echo "(I can't compile the test program. Guessing...)" >&4
9779 rp="What is the size of your file positions (in bytes)?"
9784 : Check for large file support
9785 # Backward compatibility (uselfs is deprecated).
9787 "$define"|true|[yY]*)
9790 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
9792 uselargefiles="$define"
9796 case "$lseeksize:$fpossize" in
9799 You can have files larger than 2 gigabytes.
9802 *) case "$uselargefiles" in
9803 "$undef"|false|[nN]*) dflt='n' ;;
9808 Perl can be built to understand large files (files larger than 2 gigabytes)
9809 on some systems. To do so, Configure can be run with -Duselargefiles.
9811 If this doesn't make any sense to you, just accept the default '$dflt'.
9813 rp='Try to understand large files, if available?'
9816 y|Y) val="$define" ;;
9823 : Look for a hint-file generated 'call-back-unit'. If the
9824 : user has specified that a large files perl is to be built,
9825 : we may need to set or change some other defaults.
9826 if $test -f uselargefiles.cbu; then
9827 echo "Your platform has some specific hints regarding large file builds, using them..."
9828 . ./uselargefiles.cbu
9830 case "$uselargefiles" in
9832 if $test -f uselargefiles.cbu; then
9834 echo "Rechecking to see how big your file offsets are..." >&4
9836 #include <sys/types.h>
9840 printf("%d\n", (int)sizeof($lseektype));
9845 if eval $compile_ok; then
9846 lseeksize=`$run ./try`
9847 $echo "Your file offsets are now $lseeksize bytes long."
9851 echo "(I can't seem to compile the test program. Guessing...)"
9852 rp="What is the size of your file offsets (in bytes)?"
9857 *_t) zzz="$fpostype" ;;
9860 $echo $n "Rechecking the size of $zzz...$c" >&4
9862 #include <sys/types.h>
9869 printf("%d\n", (int)sizeof($fpostype));
9874 if eval $compile_ok; then
9879 echo "(I can't execute the test program--guessing $fpossize.)" >&4
9882 echo " $fpossize bytes." >&4
9888 echo "(I can't compile the test program. Guessing...)" >&4
9889 rp="What is the size of your file positions (in bytes)?"
9898 : Check if we want perlio
9901 : Set the vendorbin variables
9902 case "$vendorprefix" in
9903 '') d_vendorbin="$undef"
9907 *) d_vendorbin="$define"
9908 : determine where vendor-supplied executables go.
9909 case "$vendorbin" in
9910 '') dflt=$vendorprefix/bin ;;
9911 *) dflt="$vendorbin" ;;
9914 rp='Pathname for the vendor-supplied executables directory?'
9917 vendorbinexp="$ansexp"
9923 : Set the vendorhtml1dir variables
9924 case "$vendorprefix" in
9925 '') vendorhtml1dir=''
9926 vendorhtml1direxp=''
9928 *) : determine where vendor-supplied html pages go.
9929 : There is no standard location, so try to copy the previously-selected
9930 : directory structure for the core html pages.
9931 : XXX Better default suggestions would be welcome.
9932 case "$vendorhtml1dir" in
9933 '') dflt=`echo "$html1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9934 *) dflt=$vendorhtml1dir ;;
9937 ''|' ') dflt=none ;;
9940 rp='Pathname for the vendor-supplied html pages?'
9942 vendorhtml1dir="$ans"
9943 vendorhtml1direxp="$ansexp"
9946 : Use ' ' for none so value is preserved next time through Configure
9947 $test X"$vendorhtml1dir" = "X" && vendorhtml1dir=' '
9948 prefixvar=vendorhtml1dir
9951 : Set the vendorhtml3dir variables
9952 case "$vendorprefix" in
9953 '') vendorhtml3dir=''
9954 vendorhtml3direxp=''
9956 *) : determine where vendor-supplied module html pages go.
9957 : There is no standard location, so try to copy the previously-selected
9958 : directory structure for the core html pages.
9959 : XXX Better default suggestions would be welcome.
9960 case "$vendorhtml3dir" in
9961 '') dflt=`echo "$html3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9962 *) dflt=$vendorhtml3dir ;;
9965 ''|' ') dflt=none ;;
9968 rp='Pathname for the vendor-supplied html pages?'
9970 vendorhtml3dir="$ans"
9971 vendorhtml3direxp="$ansexp"
9974 : Use ' ' for none so value is preserved next time through Configure
9975 $test X"$vendorhtml3dir" = "X" && vendorhtml3dir=' '
9976 prefixvar=vendorhtml3dir
9979 : Set the vendorman1dir variables
9980 case "$vendorprefix" in
9981 '') vendorman1dir=''
9984 *) : determine where vendor-supplied manual pages go.
9985 case "$vendorman1dir" in
9986 '') dflt=`echo "$man1dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
9987 *) dflt=$vendorman1dir ;;
9990 ''|' ') dflt=none ;;
9993 rp='Pathname for the vendor-supplied manual section 1 pages?'
9995 vendorman1dir="$ans"
9996 vendorman1direxp="$ansexp"
9999 : Use ' ' for none so value is preserved next time through Configure
10000 $test X"$vendorman1dir" = "X" && vendorman1dir=' '
10001 prefixvar=vendorman1dir
10004 : Set the vendorman3dir variables
10005 case "$vendorprefix" in
10006 '') vendorman3dir=''
10007 vendorman3direxp=''
10009 *) : determine where vendor-supplied module manual pages go.
10010 case "$vendorman3dir" in
10011 '') dflt=`echo "$man3dir" | $sed "s#^$prefix#$vendorprefix#"` ;;
10012 *) dflt=$vendorman3dir ;;
10015 ''|' ') dflt=none ;;
10018 rp='Pathname for the vendor-supplied manual section 3 pages?'
10020 vendorman3dir="$ans"
10021 vendorman3direxp="$ansexp"
10024 : Use ' ' for none so value is preserved next time through Configure
10025 $test X"$vendorman3dir" = "X" && vendorman3dir=' '
10026 prefixvar=vendorman3dir
10029 : Set the vendorscript variables
10030 case "$vendorprefix" in
10031 '') d_vendorscript="$undef"
10035 *) d_vendorscript="$define"
10036 : determine where vendor-supplied scripts go.
10037 case "$vendorscript" in
10038 '') dflt=$vendorprefix/script
10039 $test -d $dflt || dflt=$vendorbin ;;
10040 *) dflt="$vendorscript" ;;
10044 The installation process will create a directory for
10045 vendor-supplied scripts.
10049 rp='Pathname for the vendor-supplied scripts directory?'
10051 vendorscript="$ans"
10052 vendorscriptexp="$ansexp"
10055 prefixvar=vendorscript
10058 : see if qgcvt exists
10062 : Check what kind of doubles your system has
10063 $echo "Checking the kind of doubles you have..." >&4
10065 #$i_stdlib I_STDLIB
10066 #define DOUBLESIZE $doublesize
10068 #include <stdlib.h>
10071 static const double d = -0.1;
10073 unsigned const char* b = (unsigned const char*)(&d);
10074 #if DOUBLESIZE == 4
10075 if (b[0] == 0xCD && b[3] == 0xBD) {
10076 /* IEEE 754 32-bit little-endian */
10080 if (b[0] == 0xBD && b[3] == 0xCD) {
10081 /* IEEE 754 32-bit big-endian */
10085 if (b[0] == 0xCC && b[3] == 0xCC) {
10086 /* VAX format F, 32-bit PDP-style mixed endian. */
10090 if (b[0] == 0xC0 && b[3] == 0x9A) {
10091 /* IBM single 32-bit */
10096 #if DOUBLESIZE == 8
10097 if (b[0] == 0x9A && b[7] == 0xBF) {
10098 /* IEEE 754 64-bit little-endian */
10102 if (b[0] == 0xBF && b[7] == 0x9A) {
10103 /* IEEE 754 64-bit big-endian */
10107 if (b[0] == 0x99 && b[3] == 0xBF && b[4] == 0x9A && b[7] == 0x99) {
10108 /* ARM mixed endian: two little-endian 32-bit floats, in big endian order:
10109 * 4 5 6 7 0 1 2 3 (MSB = 7, LSB = 0)
10110 * 99 99 b9 bf 9a 99 99 99 */
10114 if (b[0] == 0x99 && b[3] == 0x9A && b[4] == 0xBF && b[7] == 0x99) {
10115 /* The opposite of case 7, mixed endian: two big-endian 32-bit floats,
10116 * in little endian order: 3 2 1 0 7 6 5 4 (MSB = 7, LSB = 0)
10117 * 99 99 99 9a bf b9 99 99 */
10121 if (b[0] == 0xCC && b[7] == 0xCC) {
10122 /* VAX format D, 64-bit PDP-style mixed endian. */
10126 if (b[0] == 0xD9 && b[7] == 0x99) {
10127 /* VAX format G, 64-bit PDP-style mixed endian. */
10131 if (b[0] == 0xC0 && b[7] == 0x9A) {
10132 /* IBM double 64-bit */
10136 if (b[0] == 0xBF && b[7] == 0xCD) {
10137 /* CRAY single 64-bit */
10142 #if DOUBLESIZE == 16
10143 if (b[0] == 0x9A && b[15] == 0xBF) {
10144 /* IEEE 754 128-bit little-endian */
10148 if (b[0] == 0xBF && b[15] == 0x9A) {
10149 /* IEEE 754 128-bit big-endian */
10154 /* Then there are old mainframe/miniframe formats like IBM and CRAY.
10155 * Whether those environments can still build Perl is debatable. */
10156 printf("-1\n"); /* unknown */
10161 if eval $compile; then
10162 doublekind=`$run ./try`
10166 case "$doublekind" in
10167 1) echo "You have IEEE 754 32-bit little endian doubles." >&4 ;;
10168 2) echo "You have IEEE 754 32-bit big endian doubles." >&4 ;;
10169 3) echo "You have IEEE 754 64-bit little endian doubles." >&4 ;;
10170 4) echo "You have IEEE 754 64-bit big endian doubles." >&4 ;;
10171 5) echo "You have IEEE 754 128-bit little endian doubles." >&4 ;;
10172 6) echo "You have IEEE 754 128-bit big endian doubles." >&4 ;;
10173 7) echo "You have IEEE 754 64-bit mixed endian doubles (32-bit LEs in BE)." >&4 ;;
10174 8) echo "You have IEEE 754 64-bit mixed endian doubles (32-bit BEs in LE)." >&4 ;;
10175 9) echo "You have VAX format F 32-bit PDP-style mixed endian doubles." >&4 ;;
10176 10) echo "You have VAX format D 64-bit PDP-style mixed endian doubles." >&4 ;;
10177 11) echo "You have VAX format G 64-bit PDP-style mixed endian doubles." >&4 ;;
10178 12) echo "You have IBM short 32-bit doubles." >&4 ;;
10179 13) echo "You have IBM long 64-bit doubles." >&4 ;;
10180 14) echo "You have Cray single 64-bit doubles." >&4 ;;
10181 *) echo "Cannot figure out your double. You Cyber, or something?" >&4 ;;
10183 d_double_style_ieee=$undef
10184 d_double_style_vax=$undef
10185 d_double_style_ibm=$undef
10186 d_double_style_cray=$undef
10187 case "$doublekind" in
10188 1|2|3|4|5|6|7|8) d_double_style_ieee=$define ;;
10189 9|10|11) d_double_style_vax=$define ;;
10190 12|13) d_double_style_ibm=$define ;;
10191 14) d_double_style_cray=$define ;;
10193 case "$d_double_style_ieee" in
10195 d_double_has_inf=$define
10196 d_double_has_nan=$define
10197 d_double_has_negative_zero=$define
10198 d_double_has_subnormals=$define
10201 d_double_has_inf=$undef
10202 d_double_has_nan=$undef
10203 d_double_has_negative_zero=$undef
10204 d_double_has_subnormals=$undef
10209 : Check print/scan long double stuff
10212 if $test X"$d_longdbl" = X"$define"; then
10214 echo "Checking how to print long doubles..." >&4
10216 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
10217 $cat >try.c <<'EOCP'
10218 #include <sys/types.h>
10221 double d = 123.456;
10222 printf("%.3f\n", d);
10226 if eval $compile; then
10230 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
10231 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
10232 echo "We will use %f."
10238 if $test X"$sPRIfldbl" = X; then
10239 $cat >try.c <<'EOCP'
10240 #include <sys/types.h>
10243 long double d = 123.456;
10244 printf("%.3Lf\n", d);
10248 if eval $compile; then
10252 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
10253 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
10254 echo "We will use %Lf."
10260 if $test X"$sPRIfldbl" = X; then
10261 $cat >try.c <<'EOCP'
10262 #include <sys/types.h>
10265 long double d = 123.456;
10266 printf("%.3llf\n", d);
10270 if eval $compile; then
10274 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
10275 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
10276 echo "We will use %llf."
10282 if $test X"$sPRIfldbl" = X; then
10283 $cat >try.c <<'EOCP'
10284 #include <sys/types.h>
10287 long double d = 123.456;
10288 printf("%.3lf\n", d);
10292 if eval $compile; then
10296 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
10297 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
10298 echo "We will use %lf."
10304 if $test X"$sPRIfldbl" = X; then
10305 echo "Cannot figure out how to print long doubles." >&4
10307 sSCNfldbl=$sPRIfldbl # expect consistency
10314 case "$sPRIfldbl" in
10315 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
10316 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
10317 d_SCNfldbl="$undef";
10319 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
10320 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
10321 d_SCNfldbl="$define";
10325 : Before committing on uselongdouble, see whether that looks sane.
10326 if $test "$uselongdouble" = "$define"; then
10329 echo "Checking if your long double math functions work right..." >&4
10334 printf("%"$sPRIgldbl"\n", sqrtl(logl(expl(cosl(sinl(0.0L))))+powl(2.0L, 3.0L)));
10337 case "$osname:$gccversion" in
10338 aix:) saveccflags="$ccflags"
10339 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
10342 if eval $compile_ok; then
10346 3) echo "Your long double math functions are working correctly." >&4 ;;
10347 *) echo "Your long double math functions are broken, not using long doubles." >&4
10348 uselongdouble=$undef
10352 case "$osname:$gccversion" in
10353 aix:) ccflags="$saveccflags" ;; # restore
10357 : Check how to convert floats to strings.
10359 if test "X$d_Gconvert" = X; then
10362 echo "Checking for an efficient way to convert floats to strings."
10364 case "$uselongdouble" in
10365 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
10367 case "$d_longdbl" in
10368 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
10370 case "$d_PRIgldbl" in
10371 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
10374 #ifdef TRY_gconvert
10375 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
10376 char *myname = "gconvert";
10379 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
10380 char *myname = "gcvt";
10383 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
10384 char *myname = "qgcvt";
10385 #define DOUBLETYPE long double
10388 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
10389 #ifdef HAS_PRIgldbl
10390 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
10392 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
10395 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
10397 char *myname = "sprintf";
10401 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
10402 #define DOUBLETYPE long double
10404 #define DOUBLETYPE double
10410 #$i_stdlib I_STDLIB
10412 #include <stdlib.h>
10414 #include <string.h>
10416 int checkit(char *expect, char *got)
10418 if (strcmp(expect, got)) {
10419 printf("%s oddity: Expected %s, got %s\n",
10420 myname, expect, got);
10430 /* This must be 1st test on (which?) platform */
10431 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
10432 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
10433 checkit("0.1", buf);
10435 Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
10436 checkit("0.01", buf);
10438 Gconvert((DOUBLETYPE)0.001, 8, 0, buf);
10439 checkit("0.001", buf);
10441 Gconvert((DOUBLETYPE)0.0001, 8, 0, buf);
10442 checkit("0.0001", buf);
10444 Gconvert((DOUBLETYPE)0.00009, 8, 0, buf);
10445 if (strlen(buf) > 5)
10446 checkit("9e-005", buf); /* for Microsoft ?? */
10448 checkit("9e-05", buf);
10450 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
10453 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
10454 checkit("1.1", buf);
10456 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
10457 checkit("1.01", buf);
10459 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
10460 checkit("1.001", buf);
10462 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
10463 checkit("1.0001", buf);
10465 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
10466 checkit("1.00001", buf);
10468 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
10469 checkit("1.000001", buf);
10471 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
10474 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
10475 checkit("-1", buf);
10477 /* Some Linux gcvt's give 1.e+5 here. */
10478 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
10479 checkit("100000", buf);
10481 /* Some Linux gcvt's give -1.e+5 here. */
10482 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
10483 checkit("-100000", buf);
10485 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
10486 checkit("123.456", buf);
10488 /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */
10489 Gconvert((DOUBLETYPE)1e34, 8, 0, buf);
10490 /* 34 should be enough to scare even long double
10491 * places into using the e notation. */
10492 if (strlen(buf) > 5)
10493 checkit("1e+034", buf); /* for Microsoft */
10495 checkit("1e+34", buf);
10497 /* For Perl, if you add additional tests here, also add them to
10498 * t/base/num.t for benefit of platforms not using Configure or
10499 * overriding d_Gconvert */
10504 : first add preferred functions to our list
10506 for xxx_convert in $gconvert_preference; do
10507 case $xxx_convert in
10508 gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;;
10509 *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;;
10512 : then add any others
10513 for xxx_convert in gconvert gcvt sprintf; do
10514 case "$xxx_list" in
10516 *) xxx_list="$xxx_list $xxx_convert" ;;
10520 case "$d_longdbl$uselongdouble" in
10522 : again, add preferred functions to our list first
10524 for xxx_convert in $gconvert_ld_preference; do
10525 case $xxx_convert in
10526 qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
10527 *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;;
10530 : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt
10531 for xxx_convert in qgcvt sprintf $xxx_list; do
10532 case "$xxx_ld_list" in
10533 $xxx_convert*|*" $xxx_convert"*) ;;
10534 *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;;
10537 : if sprintf cannot do long doubles, move it to the end
10538 if test "$d_PRIgldbl" != "$define"; then
10539 xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf"
10541 : if no qgcvt, remove it
10542 if test "$d_qgcvt" != "$define"; then
10543 xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`"
10546 xxx_list="$xxx_ld_list"
10550 for xxx_convert in $xxx_list; do
10551 echo "Trying $xxx_convert..."
10552 $rm -f try try$_o core
10553 set try -DTRY_$xxx_convert
10554 if eval $compile; then
10555 echo "$xxx_convert() found." >&4
10556 if $run ./try; then
10557 echo "I'll use $xxx_convert to convert floats into a string." >&4
10560 echo "...But $xxx_convert didn't work as I expected."
10564 echo "$xxx_convert NOT found." >&4
10568 if test X$xxx_convert = X; then
10569 echo "*** WHOA THERE!!! ***" >&4
10570 echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4
10571 xxx_convert=sprintf
10574 case "$xxx_convert" in
10575 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
10576 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
10577 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
10578 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
10579 "$define$define$define")
10580 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
10581 "$define$define$undef")
10582 d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;;
10583 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
10591 : see if _fwalk exists
10595 : see if accept4 exists
10596 set accept4 d_accept4
10599 : Initialize h_fcntl
10602 : Initialize h_sysfile
10605 : access call always available on UNIX
10606 set access d_access
10609 : locate the flags for 'access()'
10610 case "$d_access" in
10613 $cat >access.c <<EOCP
10614 #include <sys/types.h>
10619 #include <sys/file.h>
10622 #include <unistd.h>
10624 #$i_stdlib I_STDLIB
10626 #include <stdlib.h>
10632 : check sys/file.h first, no particular reason here
10633 if $test `./findhdr sys/file.h` && \
10634 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
10636 echo "<sys/file.h> defines the *_OK access constants." >&4
10637 elif $test `./findhdr fcntl.h` && \
10638 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
10640 echo "<fcntl.h> defines the *_OK access constants." >&4
10641 elif $test `./findhdr unistd.h` && \
10642 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
10643 echo "<unistd.h> defines the *_OK access constants." >&4
10645 echo "I can't find the four *_OK access constants--I'll use mine." >&4
10651 : see if accessx exists
10652 set accessx d_accessx
10655 : see if acosh exists
10659 : see if aintl exists
10663 : see if alarm exists
10667 : see if 64bit time functions exists
10669 set ctime64 d_ctime64
10672 set localtime64 d_localtime64
10675 set gmtime64 d_gmtime64
10678 set mktime64 d_mktime64
10681 set difftime64 d_difftime64
10684 set asctime64 d_asctime64
10687 : see if POSIX threads are available
10688 set pthread.h i_pthread
10691 : define a function to check prototypes
10692 $cat > protochk <<EOSH
10695 optimize="$optimize"
10699 usethreads=$usethreads
10700 i_pthread=$i_pthread
10701 pthread_h_first=$pthread_h_first
10704 $cat >> protochk <<'EOSH'
10709 while test $# -ge 2; do
10711 $define) echo "#include <$2>" >> try.c ;;
10712 literal) echo "$2" >> try.c ;;
10714 # Extra magic for the benefit of systems that need pthread.h
10715 # to be included early to correctly detect threadsafe functions.
10716 # Such functions must guarantee themselves, though, that the usethreads
10717 # and i_pthread have been defined, before calling protochk.
10718 if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
10719 echo "#include <pthread.h>" >> try.c
10724 cat >> try.c <<'EOCP'
10725 #define _(args) args
10727 echo "$foo" >> try.c
10728 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
10729 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
10735 $eunicefix protochk
10737 : Define hasproto macro for Configure internal use
10738 hasproto='varname=$1; func=$2; shift; shift;
10739 while $test $# -ge 2; do
10741 $define) echo "#include <$2>";;
10742 literal) echo "$2" ;;
10746 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
10747 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
10748 echo "$func() prototype found.";
10751 echo "$func() prototype NOT found.";
10758 : see if sys/types.h has to be included
10759 set sys/types.h i_systypes
10762 : see if sys/select.h has to be included
10763 set sys/select.h i_sysselct
10766 : Define hasfield macro for Configure internal use
10767 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
10768 while $test $# -ge 2; do
10770 $define) echo "#include <$2>";;
10774 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
10776 if eval $compile; then
10785 : see if we should include sys/time.h
10788 if test "X$timeincl" = X; then
10789 echo "Testing to see if we should include <sys/time.h>." >&4
10790 $echo $n "I'm now running the test program...$c"
10792 #include <sys/types.h>
10795 #ifdef SYSTIMEKERNEL
10798 #include <sys/time.h>
10801 #include <sys/select.h>
10803 #$i_stdlib I_STDLIB
10805 #include <stdlib.h>
10811 struct timeval bar;
10814 struct timezone tzp;
10816 if (foo.tm_sec == foo.tm_sec)
10819 if (bar.tv_sec == bar.tv_sec)
10826 for s_timezone in '-DS_TIMEZONE' ''; do
10828 for s_timeval in '-DS_TIMEVAL' ''; do
10829 for i_systimek in '' '-DSYSTIMEKERNEL'; do
10830 for i_systime in '-DI_SYSTIME' ''; do
10833 set try $i_systime $i_systimek $sysselect $s_timeval $s_timezone
10834 if eval $compile; then
10835 set X $i_systime $i_systimek $sysselect $s_timeval
10839 $echo $n "Succeeded with $flags$c"
10850 *SYSTIMEKERNEL*) i_systimek="$define"
10851 timeincl=`./findhdr sys/time.h`
10852 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
10853 *) i_systimek="$undef";;
10856 *I_SYSTIME*) i_systime="$define"
10857 timeincl=`./findhdr sys/time.h`" $timeincl"
10858 echo "We'll include <sys/time.h>." >&4;;
10859 *) i_systime="$undef";;
10863 : see if struct tm knows about tm_zone
10864 case "$i_systime$i_time" in
10867 echo "Checking to see if your struct tm has tm_zone field..." >&4
10868 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h
10876 case "$d_tm_tm_zone" in
10877 "$define") echo "Yes, it does." ;;
10878 *) echo "No, it doesn't." ;;
10880 : see if struct tm knows about tm_gmtoff
10881 case "$i_systime$i_time" in
10884 echo "Checking to see if your struct tm has tm_gmtoff field..." >&4
10885 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h
10893 case "$d_tm_tm_gmtoff" in
10894 "$define") echo "Yes, it does." ;;
10895 *) echo "No, it doesn't." ;;
10898 : see if asctime_r exists
10899 set asctime_r d_asctime_r
10901 case "$d_asctime_r" in
10903 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
10904 case "$d_asctime_r_proto:$usethreads" in
10905 ":define") d_asctime_r_proto=define
10906 set d_asctime_r_proto asctime_r $hdrs
10910 case "$d_asctime_r_proto" in
10912 case "$asctime_r_proto" in
10913 ''|0) try='char* asctime_r(const struct tm*, char*);'
10914 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SB ;;
10916 case "$asctime_r_proto" in
10917 ''|0) try='char* asctime_r(const struct tm*, char*, int);'
10918 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SBI ;;
10920 case "$asctime_r_proto" in
10921 ''|0) try='int asctime_r(const struct tm*, char*);'
10922 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SB ;;
10924 case "$asctime_r_proto" in
10925 ''|0) try='int asctime_r(const struct tm*, char*, int);'
10926 ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SBI ;;
10928 case "$asctime_r_proto" in
10929 ''|0) d_asctime_r=undef
10931 echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
10932 * ) case "$asctime_r_proto" in
10933 REENTRANT_PROTO*) ;;
10934 *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;;
10936 echo "Prototype: $try" ;;
10939 *) case "$usethreads" in
10940 define) echo "asctime_r has no prototype, not using it." >&4 ;;
10947 *) asctime_r_proto=0
10951 : see if asinh exists
10955 : see if atanh exists
10959 : see if atolf exists
10963 : see if atoll exists
10967 : Look for GCC-style attribute format
10968 case "$d_attribute_format" in
10971 echo "Checking whether your compiler can handle __attribute__((format)) ..." >&4
10972 $cat >attrib.c <<'EOCP'
10974 void my_special_printf(char* pat,...) __attribute__((__format__(__printf__,1,2)));
10976 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
10977 if $contains 'warning' attrib.out >/dev/null 2>&1; then
10978 echo "Your C compiler doesn't support __attribute__((format))."
10981 echo "Your C compiler supports __attribute__((format))."
10985 echo "Your C compiler doesn't seem to understand __attribute__ at all."
10989 *) val="$d_attribute_format" ;;
10991 set d_attribute_format
10995 : Look for GCC-style attribute format with null format allowed
10996 case "$d_printf_format_null" in
10997 '') case "$d_attribute_format" in
11000 echo "Checking whether your compiler allows __printf__ format to be null ..." >&4
11001 $cat >attrib.c <<EOCP
11003 #$i_stdlib I_STDLIB
11005 #include <stdlib.h>
11007 #$i_inttypes I_INTTYPES
11009 #include <inttypes.h>
11012 #define intptr_t int
11014 int null_printf (char* pat,...) __attribute__((__format__(__printf__,1,2)));
11015 int null_printf (char* pat,...) { return (int)(intptr_t)pat; }
11016 int main () { exit(null_printf(NULL)); }
11018 if $cc $ccflags -o attrib attrib.c >attrib.out 2>&1 ; then
11019 : run the executable in case it produces a run-time warning
11020 if $run ./attrib >>attrib.out 2>&1; then
11021 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11022 echo "Your C compiler doesn't allow __printf__ format to be null."
11025 echo "Your C compiler allows __printf__ format to be null."
11029 echo "Your C compiler executable failed with __printf__ format null."
11033 echo "Your C compiler fails with __printf__ format null."
11040 *) val="$d_printf_format_null" ;;
11042 set d_printf_format_null
11046 : Look for GCC-style attribute malloc
11047 case "$d_attribute_malloc" in
11050 echo "Checking whether your compiler can handle __attribute__((malloc)) ..." >&4
11051 $cat >attrib.c <<'EOCP'
11053 char *go_get_some_memory( int how_many_bytes ) __attribute__((malloc));
11055 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11056 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11057 echo "Your C compiler doesn't support __attribute__((malloc))."
11060 echo "Your C compiler supports __attribute__((malloc))."
11064 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11068 *) val="$d_attribute_malloc" ;;
11070 set d_attribute_malloc
11074 : Look for GCC-style attribute nonnull
11075 case "$d_attribute_nonnull" in
11078 echo "Checking whether your compiler can handle __attribute__((nonnull(1))) ..." >&4
11079 $cat >attrib.c <<'EOCP'
11081 void do_something (char *some_pointer,...) __attribute__((nonnull(1)));
11083 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11084 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11085 echo "Your C compiler doesn't support __attribute__((nonnull))."
11088 echo "Your C compiler supports __attribute__((nonnull))."
11092 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11096 *) val="$d_attribute_nonnull" ;;
11098 set d_attribute_nonnull
11102 : Look for GCC-style attribute noreturn
11103 case "$d_attribute_noreturn" in
11106 echo "Checking whether your compiler can handle __attribute__((noreturn)) ..." >&4
11107 $cat >attrib.c <<'EOCP'
11109 void fall_over_dead( void ) __attribute__((noreturn));
11111 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11112 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11113 echo "Your C compiler doesn't support __attribute__((noreturn))."
11116 echo "Your C compiler supports __attribute__((noreturn))."
11120 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11124 *) val="$d_attribute_noreturn" ;;
11126 set d_attribute_noreturn
11130 : Look for GCC-style attribute pure
11131 case "$d_attribute_pure" in
11134 echo "Checking whether your compiler can handle __attribute__((pure)) ..." >&4
11135 $cat >attrib.c <<'EOCP'
11137 int square( int n ) __attribute__((pure));
11139 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11140 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11141 echo "Your C compiler doesn't support __attribute__((pure))."
11144 echo "Your C compiler supports __attribute__((pure))."
11148 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11152 *) val="$d_attribute_pure" ;;
11154 set d_attribute_pure
11158 : Look for GCC-style attribute unused
11159 case "$d_attribute_unused" in
11162 echo "Checking whether your compiler can handle __attribute__((unused)) ..." >&4
11163 $cat >attrib.c <<'EOCP'
11165 int do_something( int dummy __attribute__((unused)), int n );
11167 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11168 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11169 echo "Your C compiler doesn't support __attribute__((unused))."
11172 echo "Your C compiler supports __attribute__((unused))."
11176 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11180 *) val="$d_attribute_unused" ;;
11182 set d_attribute_unused
11186 : Look for GCC-style attribute deprecated
11187 case "$d_attribute_deprecated" in
11190 echo "Checking whether your compiler can handle __attribute__((deprecated)) ..." >&4
11191 $cat >attrib.c <<'EOCP'
11193 int I_am_deprecated(void) __attribute__((deprecated));
11195 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11196 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11197 echo "Your C compiler doesn't support __attribute__((deprecated))."
11200 echo "Your C compiler supports __attribute__((deprecated))."
11204 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11208 *) val="$d_attribute_deprecated" ;;
11210 set d_attribute_deprecated
11214 : Look for GCC-style attribute warn_unused_result
11215 case "$d_attribute_warn_unused_result" in
11218 echo "Checking whether your compiler can handle __attribute__((warn_unused_result)) ..." >&4
11219 $cat >attrib.c <<'EOCP'
11221 int I_will_not_be_ignored(void) __attribute__((warn_unused_result));
11223 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
11224 if $contains 'warning' attrib.out >/dev/null 2>&1; then
11225 echo "Your C compiler doesn't support __attribute__((warn_unused_result))."
11228 echo "Your C compiler supports __attribute__((warn_unused_result))."
11232 echo "Your C compiler doesn't seem to understand __attribute__ at all."
11236 *) val="$d_attribute_warn_unused_result" ;;
11238 set d_attribute_warn_unused_result
11242 : see if getpgrp exists
11243 set getpgrp d_getpgrp
11246 case "$d_getpgrp" in
11249 echo "Checking to see which flavor of getpgrp is in use..."
11251 #$i_unistd I_UNISTD
11252 #include <sys/types.h>
11254 # include <unistd.h>
11256 #$i_stdlib I_STDLIB
11258 #include <stdlib.h>
11262 if (getuid() == 0) {
11263 printf("(I see you are running Configure as super-user...)\n");
11266 #ifdef TRY_BSD_PGRP
11267 if (getpgrp(1) == 0)
11276 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
11277 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
11279 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
11280 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
11283 echo "I can't seem to compile and run the test program."
11285 xxx="a USG one, i.e. you use getpgrp()."
11287 # SVR4 systems can appear rather BSD-ish.
11288 case "$i_unistd" in
11290 xxx="a BSD one, i.e. you use getpgrp(pid)."
11294 xxx="probably a USG one, i.e. you use getpgrp()."
11299 echo "Assuming your getpgrp is $xxx" >&4
11308 : see if setpgrp exists
11309 set setpgrp d_setpgrp
11312 case "$d_setpgrp" in
11315 echo "Checking to see which flavor of setpgrp is in use..."
11317 #$i_unistd I_UNISTD
11318 #include <sys/types.h>
11320 # include <unistd.h>
11322 #$i_stdlib I_STDLIB
11324 #include <stdlib.h>
11328 if (getuid() == 0) {
11329 printf("(I see you are running Configure as super-user...)\n");
11332 #ifdef TRY_BSD_PGRP
11333 if (-1 == setpgrp(1, 1))
11336 if (setpgrp() != -1)
11342 if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
11343 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
11345 elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
11346 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
11349 echo "(I can't seem to compile and run the test program.)"
11351 xxx="a USG one, i.e. you use setpgrp()."
11353 # SVR4 systems can appear rather BSD-ish.
11354 case "$i_unistd" in
11356 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
11360 xxx="probably a USG one, i.e. you use setpgrp()."
11365 echo "Assuming your setpgrp is $xxx" >&4
11374 : Look for GCC-style __builtin_add_overflow
11375 case "$d_builtin_add_overflow" in
11378 echo "Checking whether your compiler can handle __builtin_add_overflow ..." >&4
11379 $cat >try.c <<'EOCP'
11381 const unsigned int uint_max = ~0u;
11382 int target_int = 0;
11383 if (__builtin_add_overflow(1, 2, &target_int) || target_int != 3) {
11386 if (!__builtin_add_overflow((int)(uint_max >> 1), 1, &target_int)) {
11389 if (!__builtin_add_overflow(uint_max, -1, &target_int)) {
11396 if eval $compile && $run ./try; then
11397 echo "Your C compiler supports __builtin_add_overflow."
11400 echo "Your C compiler doesn't seem to understand __builtin_add_overflow."
11404 *) val="$d_builtin_add_overflow" ;;
11407 set d_builtin_add_overflow
11411 : Look for GCC-style __builtin_sub_overflow
11412 case "$d_builtin_sub_overflow" in
11415 echo "Checking whether your compiler can handle __builtin_sub_overflow ..." >&4
11416 $cat >try.c <<'EOCP'
11418 const unsigned int uint_max = ~0u;
11419 int target_int = 0;
11420 if (__builtin_sub_overflow(1, -2, &target_int) || target_int != 3) {
11423 if (!__builtin_sub_overflow(-(int)(uint_max >> 1), 2, &target_int)) {
11426 if (!__builtin_sub_overflow(uint_max, 1, &target_int)) {
11433 if eval $compile && $run ./try; then
11434 echo "Your C compiler supports __builtin_sub_overflow."
11437 echo "Your C compiler doesn't seem to understand __builtin_sub_overflow."
11441 *) val="$d_builtin_sub_overflow" ;;
11444 set d_builtin_sub_overflow
11448 : Look for GCC-style __builtin_mul_overflow
11449 case "$d_builtin_mul_overflow" in
11452 echo "Checking whether your compiler can handle __builtin_mul_overflow ..." >&4
11453 $cat >try.c <<'EOCP'
11455 const unsigned int uint_max = ~0u;
11456 int target_int = 0;
11457 if (__builtin_mul_overflow(2, 3, &target_int) || target_int != 6) {
11460 if (!__builtin_mul_overflow((int)(uint_max >> 1), 2, &target_int)) {
11463 if (!__builtin_mul_overflow(uint_max, 1, &target_int)) {
11470 if eval $compile && $run ./try; then
11471 echo "Your C compiler supports __builtin_mul_overflow."
11474 echo "Your C compiler doesn't seem to understand __builtin_mul_overflow."
11478 *) val="$d_builtin_mul_overflow" ;;
11481 set d_builtin_mul_overflow
11485 : Look for GCC-style __builtin_choose_expr
11486 case "$d_builtin_choose_expr" in
11489 echo "Checking whether your compiler can handle __builtin_choose_expr ..." >&4
11490 $cat >try.c <<'EOCP'
11491 #include <assert.h>
11492 #include <stdlib.h>
11495 #define SYRINX(x) __builtin_choose_expr( x, (1056*2), (103*50) )
11498 assert( SYRINX(1) == 2112 );
11499 assert( SYRINX(1) != 5150 );
11500 assert( SYRINX(0) == 5150 );
11501 assert( SYRINX(0) != 2112 );
11502 puts( "All good!" );
11508 if eval $compile && $run ./try; then
11509 echo "Your C compiler supports __builtin_choose_expr."
11512 echo "Your C compiler doesn't seem to understand __builtin_choose_expr."
11516 *) val="$d_builtin_choose_expr" ;;
11519 set d_builtin_choose_expr
11523 : Look for GCC-style __builtin_expect
11524 case "$d_builtin_expect" in
11527 echo "Checking whether your compiler can handle __builtin_expect ..." >&4
11528 $cat >try.c <<'EOCP'
11531 if ( __builtin_expect(n, 0) ) n = 1;
11532 /* Remember shell exit code truth is 0, C truth is non-zero */
11537 if eval $compile && $run ./try; then
11538 echo "Your C compiler supports __builtin_expect."
11541 echo "Your C compiler doesn't seem to understand __builtin_expect."
11545 *) val="$d_builtin_expect" ;;
11548 set d_builtin_expect
11552 : see if the Compiler supports C99 variadic macros
11553 echo "Checking for C99 variadic macros." >&4
11556 #include <stdarg.h>
11558 #define foo(buffer, format, ...) sprintf(buffer, format, __VA_ARGS__)
11562 foo(buf, "%d %g %.*s", 123, 456.0, (int)3, "789fail");
11568 if eval $compile && $run ./try 2>&1 >/dev/null; then
11569 case "`$run ./try`" in
11571 echo "You have C99 variadic macros." >&4
11572 d_c99_variadic_macros="$define"
11575 echo "You don't have functional C99 variadic macros." >&4
11576 d_c99_variadic_macros="$undef"
11580 echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4
11581 d_c99_variadic_macros="$undef"
11585 : see if signal is declared as pointer to function returning int or void
11587 xxx=`./findhdr signal.h`
11588 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
11589 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
11590 echo "You have int (*signal())() instead of void." >&4
11592 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
11593 echo "You have void (*signal())()." >&4
11595 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
11596 echo "You have int (*signal())() instead of void." >&4
11598 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
11599 echo "You have void (*signal())()." >&4
11602 case "$d_voidsig" in
11604 echo "I can't determine whether signal handler returns void or int..." >&4
11606 rp="What type does your signal handler return?"
11609 v*) val="$define";;
11613 echo "As you already told me, signal handler returns void." >&4
11616 *) echo "As you already told me, signal handler returns int." >&4
11623 case "$d_voidsig" in
11624 "$define") signal_t="void";;
11625 *) signal_t="int";;
11629 : check for ability to cast large floats to 32-bit ints.
11631 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
11632 if $test "$intsize" -ge 4; then
11639 #$i_stdlib I_STDLIB
11641 #include <stdlib.h>
11643 #include <sys/types.h>
11644 #include <signal.h>
11645 $signal_t blech(int s) { exit(3); }
11652 signal(SIGFPE, blech);
11654 /* Don't let compiler optimize the test away. Store the number
11655 in a writable string for gcc to pass to sscanf under HP-UX.
11657 sprintf(str, "2147483647");
11658 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
11662 /* x86 processors will probably give 0x8000 0000, which is a
11663 sign change. We don't want that. We want to mimic SPARC
11664 behavior here, which is to preserve the sign and give
11667 if (i32 != ($xxx) f)
11673 if eval $compile_ok; then
11674 $run ./try 2>/dev/null
11677 echo "(I can't seem to compile the test program--assuming it can't)"
11682 echo "Yup, it can."
11685 echo "Nope, it can't."
11692 : check for ability to cast negative floats to unsigned
11694 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
11697 #$i_stdlib I_STDLIB
11699 #include <stdlib.h>
11701 #include <sys/types.h>
11702 #include <signal.h>
11703 $signal_t blech(int s) { exit(7); }
11704 $signal_t blech_in_list(int s) { exit(4); }
11705 unsigned long dummy_long(unsigned long p) { return p; }
11706 unsigned int dummy_int(unsigned int p) { return p; }
11707 unsigned short dummy_short(unsigned short p) { return p; }
11711 unsigned long along;
11713 unsigned short ashort;
11717 /* Frustrate gcc-2.7.2's optimizer which failed this test with
11718 a direct f = -123. assignment. gcc-2.8.0 reportedly
11719 optimized the whole file away
11721 /* Store the number in a writable string for gcc to pass to
11722 sscanf under HP-UX.
11724 sprintf(str, "-123");
11725 sscanf(str, "%lf", &f); /* f = -123.; */
11727 signal(SIGFPE, blech);
11728 along = (unsigned long)f;
11729 aint = (unsigned int)f;
11730 ashort = (unsigned short)f;
11731 if (along != (unsigned long)-123)
11733 if (aint != (unsigned int)-123)
11735 if (ashort != (unsigned short)-123)
11737 sprintf(str, "1073741824.");
11738 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
11741 along = (unsigned long)f;
11742 if (along != 0x80000000)
11746 along = (unsigned long)f;
11747 if (along != 0x7fffffff)
11751 along = (unsigned long)f;
11752 if (along != 0x80000001)
11756 signal(SIGFPE, blech_in_list);
11757 sprintf(str, "123.");
11758 sscanf(str, "%lf", &f); /* f = 123.; */
11759 along = dummy_long((unsigned long)f);
11760 aint = dummy_int((unsigned int)f);
11761 ashort = dummy_short((unsigned short)f);
11762 if (along != (unsigned long)123)
11764 if (aint != (unsigned int)123)
11766 if (ashort != (unsigned short)123)
11773 if eval $compile_ok; then
11774 $run ./try 2>/dev/null
11777 echo "(I can't seem to compile the test program--assuming it can't)"
11780 case "$castflags" in
11782 echo "Yup, it can."
11785 echo "Nope, it can't."
11792 : see if cbrt exists
11796 : see if chown exists
11800 : see if chroot exists
11801 set chroot d_chroot
11804 : see if chsize exists
11805 set chsize d_chsize
11808 : see if class exists
11812 : see if clearenv exists
11813 set clearenv d_clearenv
11816 : Define hasstruct macro for Configure internal use
11817 hasstruct='varname=$1; struct=$2; shift; shift;
11818 while $test $# -ge 2; do
11820 $define) echo "#include <$2>";;
11824 echo "int main () { struct $struct foo; }" >> try.c;
11826 if eval $compile; then
11835 : see whether socket exists
11839 $echo $n "Hmm... $c" >&4
11840 if set socket val -f d_socket; eval $csym; $val; then
11841 echo "Looks like you have Berkeley networking support." >&4
11843 if set setsockopt val -f; eval $csym; $val; then
11846 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
11847 d_oldsock="$define"
11850 if $contains socklib libc.list >/dev/null 2>&1; then
11851 echo "Looks like you have Berkeley networking support." >&4
11853 : we will have to assume that it supports the 4.2 BSD interface
11856 echo "You don't have Berkeley networking in libc$_a..." >&4
11857 if test "X$d_socket" = "X$define"; then
11858 echo "...but you seem to believe that you have sockets." >&4
11860 for net in net socket
11862 if test -f $sysroot/usr/lib/lib$net$_a; then
11863 ( ($nm $nm_opt $sysroot/usr/lib/lib$net$_a | eval $nm_extract) || \
11864 $ar t $sysroot/usr/lib/lib$net$_a) 2>/dev/null >> libc.list
11865 if $contains socket libc.list >/dev/null 2>&1; then
11870 echo "...but the Wollongong group seems to have hacked it in." >&4
11871 sockethdr="-I$sysroot/usr/netinclude"
11874 echo "Found Berkeley sockets interface in lib$net." >&4
11875 if $contains setsockopt libc.list >/dev/null 2>&1; then
11878 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
11879 d_oldsock="$define"
11885 if test "X$d_socket" != "X$define"; then
11886 echo "or anywhere else I see." >&4
11894 : see if socketpair exists
11895 set socketpair d_sockpair
11900 echo "Checking the availability sa_len in the sock struct ..." >&4
11902 #include <sys/types.h>
11903 #include <sys/socket.h>
11905 struct sockaddr sa;
11906 return (sa.sa_len);
11910 set try; if eval $compile; then
11913 set d_sockaddr_sa_len; eval $setvar
11917 echo "Checking the availability struct sockaddr_in6 ..." >&4
11919 #include <sys/types.h>
11920 #include <sys/socket.h>
11921 #include <netinet/in.h>
11923 struct sockaddr_in6 sin6;
11924 return (sin6.sin6_family);
11928 set try; if eval $compile; then
11931 set d_sockaddr_in6; eval $setvar
11935 echo "Checking the availability sin6_scope_id in struct sockaddr_in6 ..." >&4
11937 #include <sys/types.h>
11938 #include <sys/socket.h>
11939 #include <netinet/in.h>
11941 struct sockaddr_in6 sin6;
11942 return (sin6.sin6_scope_id);
11946 set try; if eval $compile; then
11949 set d_sin6_scope_id; eval $setvar
11953 echo "Checking the availability struct ip_mreq ..." >&4
11955 #include <sys/types.h>
11956 #include <sys/socket.h>
11957 #include <netinet/in.h>
11959 struct ip_mreq mreq;
11960 return (mreq.imr_multiaddr.s_addr);
11964 set try; if eval $compile; then
11967 set d_ip_mreq; eval $setvar
11971 echo "Checking the availability struct ip_mreq_source ..." >&4
11973 #include <sys/types.h>
11974 #include <sys/socket.h>
11975 #include <netinet/in.h>
11977 struct ip_mreq_source mreq;
11978 return (mreq.imr_multiaddr.s_addr);
11982 set try; if eval $compile; then
11985 set d_ip_mreq_source; eval $setvar
11989 echo "Checking the availability struct ipv6_mreq ..." >&4
11991 #include <sys/types.h>
11992 #include <sys/socket.h>
11993 #include <netinet/in.h>
11995 struct ipv6_mreq mreq;
11996 return (mreq.ipv6mr_interface);
12000 set try; if eval $compile; then
12003 set d_ipv6_mreq; eval $setvar
12007 echo "Checking the availability struct ipv6_mreq_source ..." >&4
12009 #include <sys/types.h>
12010 #include <sys/socket.h>
12011 #include <netinet/in.h>
12013 struct ipv6_mreq_source mreq;
12014 return (mreq.imr_multiaddr.s_addr);
12018 set try; if eval $compile; then
12021 set d_ipv6_mreq_source; eval $setvar
12025 echo "Checking the availability of certain socket constants..." >&4
12026 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
12027 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
12029 #include <sys/types.h>
12030 #include <sys/socket.h>
12036 set try; if eval $compile; then
12039 set d_${enum}; eval $setvar
12043 : see if this is a sys/uio.h system
12044 set sys/uio.h i_sysuio
12047 : Check for cmsghdr support
12049 echo "Checking to see if your system supports struct cmsghdr..." >&4
12050 set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
12052 case "$d_cmsghdr_s" in
12053 "$define") echo "Yes, it does." ;;
12054 *) echo "No, it doesn't." ;;
12057 : see if copysign exists
12058 set copysign d_copysign
12061 : see if copysignl exists
12062 set copysignl d_copysignl
12065 : see if crypt exists
12070 $define) cryptlib='' ;;
12071 *) if set crypt val -f d_crypt; eval $csym; $val; then
12072 echo 'crypt() found.' >&4
12076 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
12077 if $test -z "$cryptlib"; then
12078 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
12082 if $test -z "$cryptlib"; then
12083 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
12087 if $test -z "$cryptlib"; then
12088 cryptlib=`./loc libcrypt$_a "" $libpth`
12092 if $test -z "$cryptlib"; then
12093 echo 'crypt() NOT found.' >&4
12104 : see if this is a crypt.h system
12105 set crypt.h i_crypt
12108 : see if crypt_r exists
12109 set crypt_r d_crypt_r
12111 case "$d_crypt_r" in
12113 hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h"
12114 case "$d_crypt_r_proto:$usethreads" in
12115 ":define") d_crypt_r_proto=define
12116 set d_crypt_r_proto crypt_r $hdrs
12120 case "$d_crypt_r_proto" in
12122 case "$crypt_r_proto" in
12123 ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
12124 ./protochk "$extern_C $try" $hdrs && crypt_r_proto=B_CCS ;;
12126 case "$crypt_r_proto" in
12127 ''|0) try='char* crypt_r(const char*, const char*, CRYPTD*);'
12128 ./protochk "$extern_C $try" $hdrs && crypt_r_proto=B_CCD ;;
12130 case "$crypt_r_proto" in
12131 ''|0) d_crypt_r=undef
12133 echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
12134 * ) case "$crypt_r_proto" in
12135 REENTRANT_PROTO*) ;;
12136 *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;;
12138 echo "Prototype: $try" ;;
12141 *) case "$usethreads" in
12142 define) echo "crypt_r has no prototype, not using it." >&4 ;;
12153 : get csh whereabouts
12155 'csh') val="$undef" ;;
12156 *) val="$define" ;;
12160 : Respect a hint or command line value for full_csh.
12161 case "$full_csh" in
12162 '') full_csh=$csh ;;
12165 : see if ctermid exists
12166 set ctermid d_ctermid
12169 : see if ctermid_r exists
12170 set ctermid_r d_ctermid_r
12172 case "$d_ctermid_r" in
12174 hdrs="$i_systypes sys/types.h define stdio.h "
12175 case "$d_ctermid_r_proto:$usethreads" in
12176 ":define") d_ctermid_r_proto=define
12177 set d_ctermid_r_proto ctermid_r $hdrs
12181 case "$d_ctermid_r_proto" in
12183 case "$ctermid_r_proto" in
12184 ''|0) try='char* ctermid_r(char*);'
12185 ./protochk "$extern_C $try" $hdrs && ctermid_r_proto=B_B ;;
12187 case "$ctermid_r_proto" in
12188 ''|0) d_ctermid_r=undef
12190 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
12191 * ) case "$ctermid_r_proto" in
12192 REENTRANT_PROTO*) ;;
12193 *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;;
12195 echo "Prototype: $try" ;;
12198 *) case "$usethreads" in
12199 define) echo "ctermid_r has no prototype, not using it." >&4 ;;
12206 *) ctermid_r_proto=0
12210 : see if ctime_r exists
12211 set ctime_r d_ctime_r
12213 case "$d_ctime_r" in
12215 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
12216 case "$d_ctime_r_proto:$usethreads" in
12217 ":define") d_ctime_r_proto=define
12218 set d_ctime_r_proto ctime_r $hdrs
12222 case "$d_ctime_r_proto" in
12224 case "$ctime_r_proto" in
12225 ''|0) try='char* ctime_r(const time_t*, char*);'
12226 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=B_SB ;;
12228 case "$ctime_r_proto" in
12229 ''|0) try='char* ctime_r(const time_t*, char*, int);'
12230 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=B_SBI ;;
12232 case "$ctime_r_proto" in
12233 ''|0) try='int ctime_r(const time_t*, char*);'
12234 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=I_SB ;;
12236 case "$ctime_r_proto" in
12237 ''|0) try='int ctime_r(const time_t*, char*, int);'
12238 ./protochk "$extern_C $try" $hdrs && ctime_r_proto=I_SBI ;;
12240 case "$ctime_r_proto" in
12241 ''|0) d_ctime_r=undef
12243 echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
12244 * ) case "$ctime_r_proto" in
12245 REENTRANT_PROTO*) ;;
12246 *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
12248 echo "Prototype: $try" ;;
12251 *) case "$usethreads" in
12252 define) echo "ctime_r has no prototype, not using it." >&4 ;;
12263 : see if cuserid exists
12264 set cuserid d_cuserid
12267 : see if dbm.h is available
12268 : see if dbmclose exists
12269 set dbmclose d_dbmclose
12272 case "$d_dbmclose" in
12282 *) set rpcsvc/dbm.h i_rpcsvcdbm
12287 *) echo "We won't be including <dbm.h>"
12297 : see if prototype for dbminit is available
12299 set d_dbminitproto dbminit $i_dbm dbm.h
12302 : see if difftime exists
12303 set difftime d_difftime
12306 : see if this is a dirent system
12308 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
12310 echo "<dirent.h> found." >&4
12313 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
12314 echo "<sys/dir.h> found." >&4
12317 xinc=`./findhdr sys/ndir.h`
12319 echo "<dirent.h> NOT found." >&4
12324 : Look for type of directory structure.
12326 $cppstdin $cppflags $cppminus < "$xinc" > try.c
12328 case "$direntrytype" in
12330 case "$i_dirent" in
12331 $define) guess1='struct dirent' ;;
12332 *) guess1='struct direct' ;;
12335 *) guess1="$direntrytype"
12340 'struct dirent') guess2='struct direct' ;;
12341 *) guess2='struct dirent' ;;
12344 if $contains "$guess1" try.c >/dev/null 2>&1; then
12345 direntrytype="$guess1"
12346 echo "Your directory entries are $direntrytype." >&4
12347 elif $contains "$guess2" try.c >/dev/null 2>&1; then
12348 direntrytype="$guess2"
12349 echo "Your directory entries seem to be $direntrytype." >&4
12351 echo "I don't recognize your system's directory entries." >&4
12352 rp="What type is used for directory entries on this system?"
12355 direntrytype="$ans"
12359 : see if the directory entry stores field length
12361 $cppstdin $cppflags $cppminus < "$xinc" > try.c
12362 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
12363 echo "Good, your directory entry keeps length information in d_namlen." >&4
12366 echo "Your directory entry does not know about the d_namlen field." >&4
12373 : Look for DIR.dd_fd
12374 case "$i_dirent" in
12376 echo "Checking to see if DIR has a dd_fd member variable" >&4
12378 #$i_stdlib I_STDLIB
12380 #include <stdlib.h>
12382 #include <dirent.h>
12392 if eval $compile; then
12393 echo "Yes, it does."
12396 echo "No, it does not."
12401 echo "You don't have a <dirent.h>, so not checking for dd_fd." >&4
12409 : see if this is an sysdir system
12410 set sys/dir.h i_sysdir
12413 : see if this is an sysndir system
12414 set sys/ndir.h i_sysndir
12419 $cat >dirfd.c <<EOM
12421 #$i_stdlib I_STDLIB
12423 #include <stdlib.h>
12425 #$i_dirent I_DIRENT /**/
12426 #$i_sysdir I_SYS_DIR /**/
12427 #$i_sysndir I_SYS_NDIR /**/
12428 #$i_systypes I_SYS_TYPES /**/
12429 #if defined(I_SYS_TYPES)
12430 #include <sys/types.h>
12432 #if defined(I_DIRENT)
12433 #include <dirent.h>
12436 #include <sys/ndir.h>
12439 #include <sys/dir.h>
12444 DIR *dirp = opendir(".");
12445 if (dirfd(dirp) >= 0)
12453 if eval $compile; then
12457 $define) echo "dirfd() found." >&4 ;;
12458 *) echo "dirfd() NOT found." >&4 ;;
12464 : see if dladdr exists
12465 set dladdr d_dladdr
12468 : see if dlerror exists
12471 set dlerror d_dlerror
12475 : see if dlfcn is available
12476 set dlfcn.h i_dlfcn
12479 : Check what extension to use for shared libs
12484 On a few systems, the dynamically loaded modules that perl generates and uses
12485 will need a different extension than shared libs. The default will probably
12491 *) dflt="$dlext" ;;
12493 rp='What is the extension of dynamically loaded modules'
12502 : Check if dlsym need a leading underscore
12508 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
12509 $cat >dyna.c <<'EOM'
12516 #$i_stdlib I_STDLIB
12518 #include <stdlib.h>
12522 #include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
12524 #include <sys/types.h>
12529 extern int fred() ;
12538 int mode = RTLD_LAZY ;
12540 handle = dlopen("./dyna.$dlext", mode) ;
12541 if (handle == NULL) {
12546 symbol = dlsym(handle, "fred") ;
12547 if (symbol == NULL) {
12548 /* try putting a leading underscore */
12549 symbol = dlsym(handle, "_fred") ;
12550 if (symbol == NULL) {
12563 : Call the object file tmp-dyna.o in case dlext=o.
12564 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
12565 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
12566 $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
12567 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
12570 1) echo "Test program failed using dlopen." >&4
12571 echo "Perhaps you should not use dynamic loading." >&4;;
12572 2) echo "Test program failed using dlsym." >&4
12573 echo "Perhaps you should not use dynamic loading." >&4;;
12574 3) echo "dlsym needs a leading underscore" >&4
12576 4) echo "dlsym doesn't need a leading underscore." >&4;;
12579 echo "I can't compile and run the test program." >&4
12580 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
12585 $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
12590 : see if drand48_r exists
12591 set drand48_r d_drand48_r
12593 case "$d_drand48_r" in
12595 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
12596 case "$d_drand48_r_proto:$usethreads" in
12597 ":define") d_drand48_r_proto=define
12598 set d_drand48_r_proto drand48_r $hdrs
12602 case "$d_drand48_r_proto" in
12604 case "$drand48_r_proto" in
12605 ''|0) try='int drand48_r(struct drand48_data*, double*);'
12606 ./protochk "$extern_C $try" $hdrs && drand48_r_proto=I_ST ;;
12608 case "$drand48_r_proto" in
12609 ''|0) d_drand48_r=undef
12611 echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
12612 * ) case "$drand48_r_proto" in
12613 REENTRANT_PROTO*) ;;
12614 *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;;
12616 echo "Prototype: $try" ;;
12619 *) case "$usethreads" in
12620 define) echo "drand48_r has no prototype, not using it." >&4 ;;
12627 *) drand48_r_proto=0
12631 : see if prototype for drand48 is available
12633 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
12636 : see if dup2 exists
12640 : see if dup3 exists
12644 : see if this is an xlocale.h system
12645 set xlocale.h i_xlocale
12648 : see if newlocale exists
12649 set newlocale d_newlocale
12652 : see if freelocale exists
12653 set freelocale d_freelocale
12656 : see if uselocale exists
12657 set uselocale d_uselocale
12660 : see if duplocale exists
12661 set duplocale d_duplocale
12664 : see if querylocale exists
12665 set querylocale d_querylocale
12668 : see if eaccess exists
12669 set eaccess d_eaccess
12672 : see if endgrent exists
12673 set endgrent d_endgrent
12676 : see if this is an grp system
12682 xxx=`./findhdr grp.h`
12683 $cppstdin $cppflags $cppminus < $xxx >$$.h
12685 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
12697 set d_grpasswd; eval $setvar
12701 : see if endgrent_r exists
12702 set endgrent_r d_endgrent_r
12704 case "$d_endgrent_r" in
12706 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
12707 case "$d_endgrent_r_proto:$usethreads" in
12708 ":define") d_endgrent_r_proto=define
12709 set d_endgrent_r_proto endgrent_r $hdrs
12713 case "$d_endgrent_r_proto" in
12715 case "$endgrent_r_proto" in
12716 ''|0) try='int endgrent_r(FILE**);'
12717 ./protochk "$extern_C $try" $hdrs && endgrent_r_proto=I_H ;;
12719 case "$endgrent_r_proto" in
12720 ''|0) try='void endgrent_r(FILE**);'
12721 ./protochk "$extern_C $try" $hdrs && endgrent_r_proto=V_H ;;
12723 case "$endgrent_r_proto" in
12724 ''|0) d_endgrent_r=undef
12726 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
12727 * ) case "$endgrent_r_proto" in
12728 REENTRANT_PROTO*) ;;
12729 *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
12731 echo "Prototype: $try" ;;
12734 *) case "$usethreads" in
12735 define) echo "endgrent_r has no prototype, not using it." >&4 ;;
12742 *) endgrent_r_proto=0
12746 : see if endhostent exists
12747 set endhostent d_endhent
12750 : see if this is a netdb.h system
12751 set netdb.h i_netdb
12754 : see if endhostent_r exists
12755 set endhostent_r d_endhostent_r
12757 case "$d_endhostent_r" in
12759 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12760 case "$d_endhostent_r_proto:$usethreads" in
12761 ":define") d_endhostent_r_proto=define
12762 set d_endhostent_r_proto endhostent_r $hdrs
12766 case "$d_endhostent_r_proto" in
12768 case "$endhostent_r_proto" in
12769 ''|0) try='int endhostent_r(struct hostent_data*);'
12770 ./protochk "$extern_C $try" $hdrs && endhostent_r_proto=I_D ;;
12772 case "$endhostent_r_proto" in
12773 ''|0) try='void endhostent_r(struct hostent_data*);'
12774 ./protochk "$extern_C $try" $hdrs && endhostent_r_proto=V_D ;;
12776 case "$endhostent_r_proto" in
12777 ''|0) d_endhostent_r=undef
12778 endhostent_r_proto=0
12779 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
12780 * ) case "$endhostent_r_proto" in
12781 REENTRANT_PROTO*) ;;
12782 *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;;
12784 echo "Prototype: $try" ;;
12787 *) case "$usethreads" in
12788 define) echo "endhostent_r has no prototype, not using it." >&4 ;;
12790 d_endhostent_r=undef
12791 endhostent_r_proto=0
12795 *) endhostent_r_proto=0
12799 : see if endnetent exists
12800 set endnetent d_endnent
12803 : see if endnetent_r exists
12804 set endnetent_r d_endnetent_r
12806 case "$d_endnetent_r" in
12808 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12809 case "$d_endnetent_r_proto:$usethreads" in
12810 ":define") d_endnetent_r_proto=define
12811 set d_endnetent_r_proto endnetent_r $hdrs
12815 case "$d_endnetent_r_proto" in
12817 case "$endnetent_r_proto" in
12818 ''|0) try='int endnetent_r(struct netent_data*);'
12819 ./protochk "$extern_C $try" $hdrs && endnetent_r_proto=I_D ;;
12821 case "$endnetent_r_proto" in
12822 ''|0) try='void endnetent_r(struct netent_data*);'
12823 ./protochk "$extern_C $try" $hdrs && endnetent_r_proto=V_D ;;
12825 case "$endnetent_r_proto" in
12826 ''|0) d_endnetent_r=undef
12827 endnetent_r_proto=0
12828 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
12829 * ) case "$endnetent_r_proto" in
12830 REENTRANT_PROTO*) ;;
12831 *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;;
12833 echo "Prototype: $try" ;;
12836 *) case "$usethreads" in
12837 define) echo "endnetent_r has no prototype, not using it." >&4 ;;
12839 d_endnetent_r=undef
12840 endnetent_r_proto=0
12844 *) endnetent_r_proto=0
12848 : see if endprotoent exists
12849 set endprotoent d_endpent
12852 : see if endprotoent_r exists
12853 set endprotoent_r d_endprotoent_r
12855 case "$d_endprotoent_r" in
12857 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
12858 case "$d_endprotoent_r_proto:$usethreads" in
12859 ":define") d_endprotoent_r_proto=define
12860 set d_endprotoent_r_proto endprotoent_r $hdrs
12864 case "$d_endprotoent_r_proto" in
12866 case "$endprotoent_r_proto" in
12867 ''|0) try='int endprotoent_r(struct protoent_data*);'
12868 ./protochk "$extern_C $try" $hdrs && endprotoent_r_proto=I_D ;;
12870 case "$endprotoent_r_proto" in
12871 ''|0) try='void endprotoent_r(struct protoent_data*);'
12872 ./protochk "$extern_C $try" $hdrs && endprotoent_r_proto=V_D ;;
12874 case "$endprotoent_r_proto" in
12875 ''|0) d_endprotoent_r=undef
12876 endprotoent_r_proto=0
12877 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
12878 * ) case "$endprotoent_r_proto" in
12879 REENTRANT_PROTO*) ;;
12880 *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;;
12882 echo "Prototype: $try" ;;
12885 *) case "$usethreads" in
12886 define) echo "endprotoent_r has no prototype, not using it." >&4 ;;
12888 d_endprotoent_r=undef
12889 endprotoent_r_proto=0
12893 *) endprotoent_r_proto=0
12897 : see if endpwent exists
12898 set endpwent d_endpwent
12901 : see if this is a pwd.h system
12907 xxx=`./findhdr pwd.h`
12908 $cppstdin $cppflags $cppminus < $xxx >$$.h
12910 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
12918 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
12926 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
12934 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
12942 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
12950 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
12958 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
12966 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
12978 set d_pwquota; eval $setvar
12979 set d_pwage; eval $setvar
12980 set d_pwchange; eval $setvar
12981 set d_pwclass; eval $setvar
12982 set d_pwexpire; eval $setvar
12983 set d_pwcomment; eval $setvar
12984 set d_pwgecos; eval $setvar
12985 set d_pwpasswd; eval $setvar
12989 : see if endpwent_r exists
12990 set endpwent_r d_endpwent_r
12992 case "$d_endpwent_r" in
12994 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
12995 case "$d_endpwent_r_proto:$usethreads" in
12996 ":define") d_endpwent_r_proto=define
12997 set d_endpwent_r_proto endpwent_r $hdrs
13001 case "$d_endpwent_r_proto" in
13003 case "$endpwent_r_proto" in
13004 ''|0) try='int endpwent_r(FILE**);'
13005 ./protochk "$extern_C $try" $hdrs && endpwent_r_proto=I_H ;;
13007 case "$endpwent_r_proto" in
13008 ''|0) try='void endpwent_r(FILE**);'
13009 ./protochk "$extern_C $try" $hdrs && endpwent_r_proto=V_H ;;
13011 case "$endpwent_r_proto" in
13012 ''|0) d_endpwent_r=undef
13014 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
13015 * ) case "$endpwent_r_proto" in
13016 REENTRANT_PROTO*) ;;
13017 *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;;
13019 echo "Prototype: $try" ;;
13022 *) case "$usethreads" in
13023 define) echo "endpwent_r has no prototype, not using it." >&4 ;;
13030 *) endpwent_r_proto=0
13034 : see if endservent exists
13035 set endservent d_endsent
13038 : see if endservent_r exists
13039 set endservent_r d_endservent_r
13041 case "$d_endservent_r" in
13043 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
13044 case "$d_endservent_r_proto:$usethreads" in
13045 ":define") d_endservent_r_proto=define
13046 set d_endservent_r_proto endservent_r $hdrs
13050 case "$d_endservent_r_proto" in
13052 case "$endservent_r_proto" in
13053 ''|0) try='int endservent_r(struct servent_data*);'
13054 ./protochk "$extern_C $try" $hdrs && endservent_r_proto=I_D ;;
13056 case "$endservent_r_proto" in
13057 ''|0) try='void endservent_r(struct servent_data*);'
13058 ./protochk "$extern_C $try" $hdrs && endservent_r_proto=V_D ;;
13060 case "$endservent_r_proto" in
13061 ''|0) d_endservent_r=undef
13062 endservent_r_proto=0
13063 echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
13064 * ) case "$endservent_r_proto" in
13065 REENTRANT_PROTO*) ;;
13066 *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;;
13068 echo "Prototype: $try" ;;
13071 *) case "$usethreads" in
13072 define) echo "endservent_r has no prototype, not using it." >&4 ;;
13074 d_endservent_r=undef
13075 endservent_r_proto=0
13079 *) endservent_r_proto=0
13083 : Locate the flags for 'open()'
13086 #include <sys/types.h>
13091 #include <sys/file.h>
13093 #$i_stdlib I_STDLIB
13095 #include <stdlib.h>
13106 : check sys/file.h first to get FREAD on Sun
13107 if $test `./findhdr sys/file.h` && \
13108 set try -DI_SYS_FILE && eval $compile; then
13110 echo "<sys/file.h> defines the O_* constants..." >&4
13111 if $run ./try; then
13112 echo "and you have the 3 argument form of open()." >&4
13115 echo "but not the 3 argument form of open(). Oh, well." >&4
13118 elif $test `./findhdr fcntl.h` && \
13119 set try -DI_FCNTL && eval $compile; then
13121 echo "<fcntl.h> defines the O_* constants..." >&4
13122 if $run ./try; then
13123 echo "and you have the 3 argument form of open()." >&4
13126 echo "but not the 3 argument form of open(). Oh, well." >&4
13131 echo "I can't find the O_* constant definitions! You got problems." >&4
13137 : see if this is a sys/file.h system
13142 : do we need to include sys/file.h ?
13146 if $h_sysfile; then
13148 echo "We'll be including <sys/file.h>." >&4
13151 echo "We won't be including <sys/file.h>." >&4
13161 : see if fcntl.h is there
13166 : see if we can include fcntl.h
13172 echo "We'll be including <fcntl.h>." >&4
13175 if $h_sysfile; then
13176 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
13178 echo "We won't be including <fcntl.h>." >&4
13190 : see if fork exists
13194 : see if pipe exists
13198 : check for non-blocking I/O stuff
13199 case "$h_sysfile" in
13200 true) echo "#include <sys/file.h>" > head.c;;
13203 true) echo "#include <fcntl.h>" > head.c;;
13204 *) echo "#include <sys/fcntl.h>" > head.c;;
13209 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
13210 case "$o_nonblock" in
13212 $cat head.c > try.c
13213 $cat >>try.c <<EOCP
13215 #$i_stdlib I_STDLIB
13217 #include <stdlib.h>
13225 printf("O_NONBLOCK\n");
13229 printf("O_NDELAY\n");
13233 printf("FNDELAY\n");
13240 if eval $compile_ok; then
13241 o_nonblock=`$run ./try`
13242 case "$o_nonblock" in
13243 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
13244 *) echo "Seems like we can use $o_nonblock.";;
13247 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
13250 *) echo "Using $hint value $o_nonblock.";;
13255 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
13258 case "$d_fork:$d_pipe:$d_alarm" in
13259 define:define:define)
13260 $cat head.c > try.c
13261 $cat >>try.c <<EOCP
13263 #include <sys/types.h>
13264 #include <signal.h>
13266 #$i_stdlib I_STDLIB
13268 #include <stdlib.h>
13274 #define MY_O_NONBLOCK $o_nonblock
13275 #ifndef errno /* XXX need better Configure test */
13278 #$i_unistd I_UNISTD
13280 #include <unistd.h>
13282 #include <string.h>
13283 $signal_t blech(int x) { exit(3); }
13285 $cat >> try.c <<'EOCP'
13294 ret = pipe(pd); /* Down: child -> parent */
13297 ret = pipe(pu); /* Up: parent -> child */
13301 close(pd[1]); /* Parent reads from pd[0] */
13302 close(pu[0]); /* Parent writes (blocking) to pu[1] */
13304 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
13309 signal(SIGALRM, blech);
13311 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
13313 sprintf(string, "%d\n", ret);
13314 ret = write(2, string, strlen(string));
13315 if (ret != strlen(string))
13319 if (errno == EAGAIN) {
13320 printf("EAGAIN\n");
13325 if (errno == EWOULDBLOCK)
13326 printf("EWOULDBLOCK\n");
13329 ret = write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
13332 sleep(2); /* Give it time to close our pipe */
13334 ret = read(pd[0], buf, 1); /* Should read EOF */
13336 sprintf(string, "%d\n", ret);
13337 ret = write(4, string, strlen(string));
13338 if (ret != strlen(string))
13343 close(pd[0]); /* We write to pd[1] */
13344 close(pu[1]); /* We read from pu[0] */
13345 ret = read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
13348 close(pd[1]); /* Pipe pd is now fully closed! */
13349 exit(0); /* Bye bye, thank you for playing! */
13353 if eval $compile_ok; then
13354 echo "$startsh" >mtry
13355 echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry
13357 $run ./mtry >/dev/null 2>&1
13359 0) eagain=`$cat try.out`;;
13360 1) echo "Could not perform non-blocking setting!";;
13361 2) echo "I did a successful read() for something that was not there!";;
13362 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
13363 4) echo "Could not find F_SETFL!";;
13364 *) echo "Something terribly wrong happened during testing.";;
13366 rd_nodata=`$cat try.ret`
13367 echo "A read() system call with no data present returns $rd_nodata."
13368 case "$rd_nodata" in
13371 echo "(That's peculiar, fixing that to be -1.)"
13377 echo "Forcing errno EAGAIN on read() with no data available."
13381 echo "Your read() sets errno to $eagain when no data is available."
13384 status=`$cat try.err`
13386 0) echo "And it correctly returns 0 to signal EOF.";;
13387 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
13388 *) echo "However, your read() returns '$status' on EOF??";;
13391 if test "$status" = "$rd_nodata"; then
13392 echo "WARNING: you can't distinguish between EOF and no data!"
13396 echo "I can't compile the test program--assuming errno EAGAIN will do."
13400 *) echo "Can't figure out how to test this--assuming errno EAGAIN will do."
13409 echo "Using $hint value $eagain."
13410 echo "Your read() returns $rd_nodata when no data is present."
13411 case "$d_eofnblk" in
13412 "$define") echo "And you can see EOF because read() returns 0.";;
13413 "$undef") echo "But you can't see EOF status from read() returned value.";;
13415 echo "(Assuming you can't see EOF status from read anyway.)"
13421 $rm_try head.c mtry
13423 : see if erf exists
13427 : see if erfc exists
13431 : see if exp2 exists
13435 : see if expm1 exists
13439 : see if _ptr and _cnt from stdio act std
13442 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
13443 echo "(Looks like you have stdio.h from BSD.)"
13444 case "$stdio_ptr" in
13445 '') stdio_ptr='((fp)->_p)'
13448 *) ptr_lval=$d_stdio_ptr_lval;;
13450 case "$stdio_cnt" in
13451 '') stdio_cnt='((fp)->_r)'
13454 *) cnt_lval=$d_stdio_cnt_lval;;
13456 case "$stdio_base" in
13457 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
13459 case "$stdio_bufsiz" in
13460 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
13462 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
13463 echo "(Looks like you have stdio.h from Linux.)"
13464 case "$stdio_ptr" in
13465 '') stdio_ptr='((fp)->_IO_read_ptr)'
13468 *) ptr_lval=$d_stdio_ptr_lval;;
13470 case "$stdio_cnt" in
13471 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
13474 *) cnt_lval=$d_stdio_cnt_lval;;
13476 case "$stdio_base" in
13477 '') stdio_base='((fp)->_IO_read_base)';;
13479 case "$stdio_bufsiz" in
13480 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
13483 case "$stdio_ptr" in
13484 '') stdio_ptr='((fp)->_ptr)'
13487 *) ptr_lval=$d_stdio_ptr_lval;;
13489 case "$stdio_cnt" in
13490 '') stdio_cnt='((fp)->_cnt)'
13493 *) cnt_lval=$d_stdio_cnt_lval;;
13495 case "$stdio_base" in
13496 '') stdio_base='((fp)->_base)';;
13498 case "$stdio_bufsiz" in
13499 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
13503 : test whether _ptr and _cnt really work
13504 echo "Checking how std your stdio is..." >&4
13507 #$i_stdlib I_STDLIB
13509 #include <stdlib.h>
13511 #define FILE_ptr(fp) $stdio_ptr
13512 #define FILE_cnt(fp) $stdio_cnt
13514 FILE *fp = fopen("try.c", "r");
13517 18 <= FILE_cnt(fp) &&
13518 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
13526 if eval $compile && $to try.c; then
13527 if $run ./try; then
13528 echo "Your stdio acts pretty std."
13531 echo "Your stdio isn't very std."
13534 echo "Your stdio doesn't appear very std."
13538 # glibc 2.2.90 and above apparently change stdio streams so Perl's
13539 # direct buffer manipulation no longer works. The Configure tests
13540 # should be changed to correctly detect this, but until then,
13541 # the following check should at least let perl compile and run.
13542 # (This quick fix should be updated before 5.8.1.)
13543 # To be defensive, reject all unknown versions, and all versions > 2.2.9.
13544 # A. Dougherty, June 3, 2002.
13545 case "$d_gnulibc" in
13547 case "$gnulibc_version" in
13551 *) echo "But I will not snoop inside glibc $gnulibc_version stdio buffers."
13560 : Can _ptr be used as an lvalue?
13561 case "$d_stdstdio$ptr_lval" in
13562 $define$define) val=$define ;;
13565 set d_stdio_ptr_lval
13568 : Can _cnt be used as an lvalue?
13569 case "$d_stdstdio$cnt_lval" in
13570 $define$define) val=$define ;;
13573 set d_stdio_cnt_lval
13577 : test whether setting _ptr sets _cnt as a side effect
13578 d_stdio_ptr_lval_sets_cnt="$undef"
13579 d_stdio_ptr_lval_nochange_cnt="$undef"
13580 case "$d_stdio_ptr_lval$d_stdstdio" in
13582 echo "Checking to see what happens if we set the stdio ptr..." >&4
13585 /* Can we scream? */
13586 /* Eat dust sed :-) */
13587 /* In the buffer space, no one can hear you scream. */
13588 #$i_stdlib I_STDLIB
13590 #include <stdlib.h>
13592 #define FILE_ptr(fp) $stdio_ptr
13593 #define FILE_cnt(fp) $stdio_cnt
13594 #include <sys/types.h>
13596 FILE *fp = fopen("try.c", "r");
13601 puts("Fail even to read");
13604 c = getc(fp); /* Read away the first # */
13606 puts("Fail even to read");
13610 18 <= FILE_cnt(fp) &&
13611 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
13613 puts("Fail even to read");
13616 ptr = (char*) FILE_ptr(fp);
13617 cnt = (size_t)FILE_cnt(fp);
13619 FILE_ptr(fp) += 42;
13621 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
13622 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
13625 if (FILE_cnt(fp) <= 20) {
13626 printf ("Fail (<20 chars to test)");
13629 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
13630 puts("Fail compare");
13633 if (cnt == FILE_cnt(fp)) {
13634 puts("Pass_unchanged");
13637 if (FILE_cnt(fp) == (cnt - 42)) {
13638 puts("Pass_changed");
13641 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
13647 if eval $compile && $to try.c; then
13648 case `$run ./try` in
13650 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
13651 d_stdio_ptr_lval_sets_cnt="$define" ;;
13653 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
13654 d_stdio_ptr_lval_nochange_cnt="$define" ;;
13656 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
13658 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
13661 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
13667 : see if _base is also standard
13669 case "$d_stdstdio" in
13673 #$i_stdlib I_STDLIB
13675 #include <stdlib.h>
13677 #define FILE_base(fp) $stdio_base
13678 #define FILE_bufsiz(fp) $stdio_bufsiz
13680 FILE *fp = fopen("try.c", "r");
13683 19 <= FILE_bufsiz(fp) &&
13684 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
13691 if eval $compile && $to try.c; then
13692 if $run ./try; then
13693 echo "And its _base field acts std."
13696 echo "But its _base field isn't std."
13699 echo "However, it seems to be lacking the _base field."
13707 : see if fast_stdio exists
13709 case "$d_stdstdio:$d_stdio_ptr_lval" in
13711 case "$d_stdio_cnt_lval$d_stdio_ptr_lval_sets_cnt" in
13713 echo "You seem to have 'fast stdio' to directly manipulate the stdio buffers." >& 4
13722 : see if fchdir exists
13723 set fchdir d_fchdir
13726 : see if fchmod exists
13727 set fchmod d_fchmod
13730 : check for openat, unlinkat, renameat, linkat, fchmodat
13731 set openat d_openat
13734 set unlinkat d_unlinkat
13737 set renameat d_renameat
13740 set linkat d_linkat
13743 set fchmodat d_fchmodat
13746 : see if fchown exists
13747 set fchown d_fchown
13750 : see if this is an fcntl system
13754 : See if fcntl-based locking works.
13757 #$i_stdlib I_STDLIB
13759 #include <stdlib.h>
13761 #include <unistd.h>
13763 #include <signal.h>
13764 $signal_t blech(int x) { exit(3); }
13766 #if defined(F_SETLK) && defined(F_SETLKW)
13767 struct flock flock;
13769 fd = open("try.c", O_RDONLY);
13770 flock.l_type = F_RDLCK;
13771 flock.l_whence = SEEK_SET;
13772 flock.l_start = flock.l_len = 0;
13773 signal(SIGALRM, blech);
13775 retval = fcntl(fd, F_SETLK, &flock);
13777 (retval < 0 ? exit(2) : exit(0));
13783 echo "Checking if fcntl-based file locking works... "
13787 if eval $compile_ok; then
13788 if $run ./try; then
13789 echo "Yes, it seems to work."
13792 echo "Nope, it didn't work."
13797 *** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
13798 *** This is (almost) impossible.
13799 *** If your NFS lock daemons are not feeling well, something like
13800 *** this may happen, please investigate. Cannot continue, aborting.
13808 echo "I'm unable to compile the test program, so I'll assume not."
13813 echo "Nope, since you don't even have fcntl()."
13816 set d_fcntl_can_lock
13820 : check for fd_set items
13823 Checking to see how well your C compiler handles fd_set and friends ...
13826 #$i_stdlib I_STDLIB
13828 #include <stdlib.h>
13830 #$i_systime I_SYS_TIME
13831 #$i_sysselct I_SYS_SELECT
13832 #$d_socket HAS_SOCKET
13833 #include <sys/types.h>
13835 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
13838 #include <sys/time.h>
13840 #ifdef I_SYS_SELECT
13841 #include <sys/select.h>
13850 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
13858 if eval $compile; then
13859 d_fds_bits="$define"
13861 echo "Well, your system knows about the normal fd_set typedef..." >&4
13862 if $run ./try; then
13863 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
13864 d_fd_macros="$define"
13867 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
13869 d_fd_macros="$undef"
13873 Hmm, your compiler has some difficulty with fd_set. Checking further...
13876 if eval $compile; then
13877 d_fds_bits="$undef"
13879 echo "Well, your system has some sort of fd_set available..." >&4
13880 if $run ./try; then
13881 echo "and you have the normal fd_set macros." >&4
13882 d_fd_macros="$define"
13885 but not the normal fd_set macros! Gross! More work for me...
13887 d_fd_macros="$undef"
13890 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
13892 d_fds_bits="$undef"
13893 d_fd_macros="$undef"
13898 : see if fdclose exists
13899 set fdclose d_fdclose
13902 : see if fdim exists
13906 : see if fegetround exists
13907 set fegetround d_fegetround
13910 : see if fgetpos exists
13911 set fgetpos d_fgetpos
13914 : see if finite exists
13915 set finite d_finite
13918 : see if finitel exists
13919 set finitel d_finitel
13922 : see if flock exists
13926 : see if prototype for flock is available
13928 set d_flockproto flock $i_sysfile sys/file.h
13931 : see if fma exists
13935 : see if fmax exists
13939 : see if fmin exists
13943 : see if fp_class exists
13944 set fp_class d_fp_class
13947 : check for fpclassify
13948 echo "Checking to see if you have fpclassify..." >&4
13951 int main() { return fpclassify(1.0) == FP_NORMAL ? 0 : 1; }
13954 if eval $compile; then
13956 echo "You have fpclassify."
13959 echo "You do not have fpclassify."
13965 : see if fp_classify exists
13966 set fp_classify d_fp_classify
13969 : see if fp_classl exists
13970 set fp_classl d_fp_classl
13973 : see if pathconf exists
13974 set pathconf d_pathconf
13977 : see if fpathconf exists
13978 set fpathconf d_fpathconf
13981 : see if fpclass exists
13982 set fpclass d_fpclass
13985 : see if fpclassl exists
13986 set fpclassl d_fpclassl
13989 : see if fpgetround exists
13990 set fpgetround d_fpgetround
13993 : check for fpos64_t
13995 echo "Checking to see if you have fpos64_t..." >&4
13998 int main() { fpos64_t x = 7; }
14001 if eval $compile; then
14003 echo "You have fpos64_t."
14006 echo "You do not have fpos64_t."
14007 case "$fpossize" in
14008 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
14015 : see if frexpl exists
14016 set frexpl d_frexpl
14019 : see if this is a sys/param system
14020 set sys/param.h i_sysparam
14023 : see if this is a sys/mount.h system
14024 set sys/mount.h i_sysmount
14027 : Check for fs_data_s
14029 echo "Checking to see if your system supports struct fs_data..." >&4
14030 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
14032 case "$d_fs_data_s" in
14033 "$define") echo "Yes, it does." ;;
14034 *) echo "No, it doesn't." ;;
14037 : see if fseeko exists
14038 set fseeko d_fseeko
14040 case "$longsize" in
14041 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
14044 : see if fsetpos exists
14045 set fsetpos d_fsetpos
14048 : see if fstatfs exists
14049 set fstatfs d_fstatfs
14052 : see if statvfs exists
14053 set statvfs d_statvfs
14056 : see if fstatvfs exists
14057 set fstatvfs d_fstatvfs
14060 : see if fsync exists
14064 : see if ftello exists
14065 set ftello d_ftello
14067 case "$longsize" in
14068 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
14071 : check for a working futimes
14074 echo "Checking if you have a working futimes()" >&4
14077 #include <sys/time.h>
14084 fd = open ("try.c", O_RDWR);
14085 if (-1 == fd) exit (1);
14086 rv = futimes (fd, NULL);
14087 exit (rv == -1 ? errno : 0);
14091 if eval $compile; then
14095 0) echo "Yes, you have" >&4
14096 d_futimes="$define"
14098 *) echo "No, you have futimes, but it isn't working ($rc) (probably harmless)" >&4
14102 echo "No, it does not (probably harmless)" >&4
14106 : look for gai_strerror
14108 $cat >try.c <<'EOCP'
14109 #include <sys/types.h>
14110 #include <sys/socket.h>
14114 return (gai_strerror (0) ? 0 : 1);
14119 if eval $compile; then
14122 0) echo "A working gai_strerror() found." >&4
14124 *) echo "gai_strerror() found, but it doesn't work" >&4
14128 echo "gai_strerror() NOT found." >&4
14134 : see if ndbm.h is available
14137 : Compatibility location for RedHat 7.1
14138 set gdbm/ndbm.h i_gdbmndbm
14140 : Compatibility location for Debian 4.0
14141 set gdbm-ndbm.h i_gdbm_ndbm
14145 if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then
14146 : see if dbm_open exists
14147 set dbm_open d_dbm_open
14149 case "$d_dbm_open" in
14152 i_gdbmndbm="$undef"
14153 i_gdbm_ndbm="$undef"
14154 echo "We won't be including <ndbm.h>"
14164 ndbm_hdr_protochk='name=$1; hdr=$2;
14165 eval "ihdr=\$""i_$name";
14167 if $test "$ihdr" = "$define"; then
14168 $echo "Checking if your <$hdr> uses prototypes..." >&4;
14169 case "$d_cplusplus" in
14170 $define) ./protochk "$extern_C void dbm_close(DBM *);" literal "extern \"C\" {" $ihdr $hdr literal "}" && val="$define" ;;
14171 *) ./protochk "$extern_C void dbm_close(int, int);" $ihdr $hdr || val="$define" ;;
14174 $define) $echo "Your <$hdr> seems to have prototypes";;
14175 *) $echo "Your <$hdr> does not seem to have prototypes";;
14178 set "d_${name}_h_uses_prototypes";
14182 eval $ndbm_hdr_protochk
14183 set gdbmndbm gdbm/ndbm.h
14184 eval $ndbm_hdr_protochk
14185 set gdbm_ndbm gdbm-ndbm.h
14186 eval $ndbm_hdr_protochk
14188 : see if getaddrinfo exists
14189 set getaddrinfo d_getaddrinfo
14192 : see if getcwd exists
14193 set getcwd d_getcwd
14196 : see if getespwnam exists
14197 set getespwnam d_getespwnam
14200 : see if getfsstat exists
14201 set getfsstat d_getfsstat
14204 : see if getgrent exists
14205 set getgrent d_getgrent
14208 : see if getgrent_r exists
14209 set getgrent_r d_getgrent_r
14211 case "$d_getgrent_r" in
14213 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14214 case "$d_getgrent_r_proto:$usethreads" in
14215 ":define") d_getgrent_r_proto=define
14216 set d_getgrent_r_proto getgrent_r $hdrs
14220 case "$d_getgrent_r_proto" in
14222 case "$getgrent_r_proto" in
14223 ''|0) try='int getgrent_r(struct group*, char*, size_t, struct group**);'
14224 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBWR ;;
14226 case "$getgrent_r_proto" in
14227 ''|0) try='int getgrent_r(struct group*, char*, int, struct group**);'
14228 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBIR ;;
14230 case "$getgrent_r_proto" in
14231 ''|0) try='struct group* getgrent_r(struct group*, char*, size_t);'
14232 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=S_SBW ;;
14234 case "$getgrent_r_proto" in
14235 ''|0) try='struct group* getgrent_r(struct group*, char*, int);'
14236 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=S_SBI ;;
14238 case "$getgrent_r_proto" in
14239 ''|0) try='int getgrent_r(struct group*, char*, int);'
14240 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBI ;;
14242 case "$getgrent_r_proto" in
14243 ''|0) try='int getgrent_r(struct group*, char*, int, FILE**);'
14244 ./protochk "$extern_C $try" $hdrs && getgrent_r_proto=I_SBIH ;;
14246 case "$getgrent_r_proto" in
14247 ''|0) d_getgrent_r=undef
14249 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
14250 * ) case "$getgrent_r_proto" in
14251 REENTRANT_PROTO*) ;;
14252 *) getgrent_r_proto="REENTRANT_PROTO_$getgrent_r_proto" ;;
14254 echo "Prototype: $try" ;;
14257 *) case "$usethreads" in
14258 define) echo "getgrent_r has no prototype, not using it." >&4 ;;
14265 *) getgrent_r_proto=0
14269 : see if getgrgid_r exists
14270 set getgrgid_r d_getgrgid_r
14272 case "$d_getgrgid_r" in
14274 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14275 case "$d_getgrgid_r_proto:$usethreads" in
14276 ":define") d_getgrgid_r_proto=define
14277 set d_getgrgid_r_proto getgrgid_r $hdrs
14281 case "$d_getgrgid_r_proto" in
14283 case "$getgrgid_r_proto" in
14284 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**);'
14285 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBWR ;;
14287 case "$getgrgid_r_proto" in
14288 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int, struct group**);'
14289 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBIR ;;
14291 case "$getgrgid_r_proto" in
14292 ''|0) try='int getgrgid_r(gid_t, struct group*, char*, int);'
14293 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=I_TSBI ;;
14295 case "$getgrgid_r_proto" in
14296 ''|0) try='struct group* getgrgid_r(gid_t, struct group*, char*, int);'
14297 ./protochk "$extern_C $try" $hdrs && getgrgid_r_proto=S_TSBI ;;
14299 case "$getgrgid_r_proto" in
14300 ''|0) d_getgrgid_r=undef
14302 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
14303 * ) case "$getgrgid_r_proto" in
14304 REENTRANT_PROTO*) ;;
14305 *) getgrgid_r_proto="REENTRANT_PROTO_$getgrgid_r_proto" ;;
14307 echo "Prototype: $try" ;;
14310 *) case "$usethreads" in
14311 define) echo "getgrgid_r has no prototype, not using it." >&4 ;;
14318 *) getgrgid_r_proto=0
14322 : see if getgrnam_r exists
14323 set getgrnam_r d_getgrnam_r
14325 case "$d_getgrnam_r" in
14327 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
14328 case "$d_getgrnam_r_proto:$usethreads" in
14329 ":define") d_getgrnam_r_proto=define
14330 set d_getgrnam_r_proto getgrnam_r $hdrs
14334 case "$d_getgrnam_r_proto" in
14336 case "$getgrnam_r_proto" in
14337 ''|0) try='int getgrnam_r(const char*, struct group*, char*, size_t, struct group**);'
14338 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBWR ;;
14340 case "$getgrnam_r_proto" in
14341 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int, struct group**);'
14342 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBIR ;;
14344 case "$getgrnam_r_proto" in
14345 ''|0) try='struct group* getgrnam_r(const char*, char*, int);'
14346 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=S_CBI ;;
14348 case "$getgrnam_r_proto" in
14349 ''|0) try='int getgrnam_r(const char*, struct group*, char*, int);'
14350 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=I_CSBI ;;
14352 case "$getgrnam_r_proto" in
14353 ''|0) try='struct group* getgrnam_r(const char*, struct group*, char*, int);'
14354 ./protochk "$extern_C $try" $hdrs && getgrnam_r_proto=S_CSBI ;;
14356 case "$getgrnam_r_proto" in
14357 ''|0) d_getgrnam_r=undef
14359 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
14360 * ) case "$getgrnam_r_proto" in
14361 REENTRANT_PROTO*) ;;
14362 *) getgrnam_r_proto="REENTRANT_PROTO_$getgrnam_r_proto" ;;
14364 echo "Prototype: $try" ;;
14367 *) case "$usethreads" in
14368 define) echo "getgrnam_r has no prototype, not using it." >&4 ;;
14375 *) getgrnam_r_proto=0
14379 : see if gethostbyaddr exists
14380 set gethostbyaddr d_gethbyaddr
14383 : see if gethostbyname exists
14384 set gethostbyname d_gethbyname
14387 : see if gethostent exists
14388 set gethostent d_gethent
14391 : see how we will look up host name
14394 if set gethostname val -f d_gethname; eval $csym; $val; then
14395 echo 'gethostname() found.' >&4
14396 d_gethname="$define"
14399 if set uname val -f d_uname; eval $csym; $val; then
14402 uname() was found, but you're running xenix, and older versions of xenix
14403 have a broken uname(). If you don't really know whether your xenix is old
14404 enough to have a broken system call, use the default answer.
14409 "$define") dflt=n;;
14411 rp='Is your uname() broken?'
14414 n*) d_uname="$define"; call=uname;;
14417 echo 'uname() found.' >&4
14424 case "$d_gethname" in
14425 '') d_gethname="$undef";;
14428 '') d_uname="$undef";;
14430 case "$d_uname$d_gethname" in
14435 Every now and then someone has a $call() that lies about the hostname
14436 but can't be fixed for political or economic reasons. If you wish, I can
14437 pretend $call() isn't there and maybe compute hostname at run-time
14438 thanks to the '$phostname' command.
14441 rp="Shall I ignore $call() from now on?"
14444 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
14447 case "$phostname" in
14448 '') aphostname='';;
14449 *) case "$aphostname" in
14451 *) set X $phostname
14455 file=`./loc $file $file $pth`
14456 aphostname=`echo $file $*`
14461 case "$d_uname$d_gethname" in
14464 case "$phostname" in
14466 echo "There will be no way for $package to get your hostname." >&4;;
14468 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
14472 case "$d_phostname" in
14473 '') d_phostname="$undef";;
14476 : see if gethostbyaddr_r exists
14477 set gethostbyaddr_r d_gethostbyaddr_r
14479 case "$d_gethostbyaddr_r" in
14481 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14482 case "$d_gethostbyaddr_r_proto:$usethreads" in
14483 ":define") d_gethostbyaddr_r_proto=define
14484 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
14488 case "$d_gethostbyaddr_r_proto" in
14490 case "$gethostbyaddr_r_proto" in
14491 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
14492 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
14494 case "$gethostbyaddr_r_proto" in
14495 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
14496 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
14498 case "$gethostbyaddr_r_proto" in
14499 ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
14500 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
14502 case "$gethostbyaddr_r_proto" in
14503 ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
14504 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
14506 case "$gethostbyaddr_r_proto" in
14507 ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
14508 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
14510 case "$gethostbyaddr_r_proto" in
14511 ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
14512 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
14514 case "$gethostbyaddr_r_proto" in
14515 ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
14516 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
14518 case "$gethostbyaddr_r_proto" in
14519 ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
14520 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
14522 case "$gethostbyaddr_r_proto" in
14523 ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
14524 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
14526 case "$gethostbyaddr_r_proto" in
14527 ''|0) try='int gethostbyaddr_r(const char*, int, int);'
14528 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
14530 case "$gethostbyaddr_r_proto" in
14531 ''|0) try='int gethostbyaddr_r(const void*, socklen_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
14532 ./protochk "$extern_C $try" $hdrs && gethostbyaddr_r_proto=I_TsISBWRE ;;
14534 case "$gethostbyaddr_r_proto" in
14535 ''|0) d_gethostbyaddr_r=undef
14536 gethostbyaddr_r_proto=0
14537 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
14538 * ) case "$gethostbyaddr_r_proto" in
14539 REENTRANT_PROTO*) ;;
14540 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
14542 echo "Prototype: $try" ;;
14545 *) case "$usethreads" in
14546 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
14548 d_gethostbyaddr_r=undef
14549 gethostbyaddr_r_proto=0
14553 *) gethostbyaddr_r_proto=0
14557 : see if gethostbyname_r exists
14558 set gethostbyname_r d_gethostbyname_r
14560 case "$d_gethostbyname_r" in
14562 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14563 case "$d_gethostbyname_r_proto:$usethreads" in
14564 ":define") d_gethostbyname_r_proto=define
14565 set d_gethostbyname_r_proto gethostbyname_r $hdrs
14569 case "$d_gethostbyname_r_proto" in
14571 case "$gethostbyname_r_proto" in
14572 ''|0) try='int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);'
14573 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=I_CSBWRE ;;
14575 case "$gethostbyname_r_proto" in
14576 ''|0) try='struct hostent* gethostbyname_r(const char*, struct hostent*, char*, int, int*);'
14577 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=S_CSBIE ;;
14579 case "$gethostbyname_r_proto" in
14580 ''|0) try='int gethostbyname_r(const char*, struct hostent*, struct hostent_data*);'
14581 ./protochk "$extern_C $try" $hdrs && gethostbyname_r_proto=I_CSD ;;
14583 case "$gethostbyname_r_proto" in
14584 ''|0) d_gethostbyname_r=undef
14585 gethostbyname_r_proto=0
14586 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
14587 * ) case "$gethostbyname_r_proto" in
14588 REENTRANT_PROTO*) ;;
14589 *) gethostbyname_r_proto="REENTRANT_PROTO_$gethostbyname_r_proto" ;;
14591 echo "Prototype: $try" ;;
14594 *) case "$usethreads" in
14595 define) echo "gethostbyname_r has no prototype, not using it." >&4 ;;
14597 d_gethostbyname_r=undef
14598 gethostbyname_r_proto=0
14602 *) gethostbyname_r_proto=0
14606 : see if gethostent_r exists
14607 set gethostent_r d_gethostent_r
14609 case "$d_gethostent_r" in
14611 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14612 case "$d_gethostent_r_proto:$usethreads" in
14613 ":define") d_gethostent_r_proto=define
14614 set d_gethostent_r_proto gethostent_r $hdrs
14618 case "$d_gethostent_r_proto" in
14620 case "$gethostent_r_proto" in
14621 ''|0) try='int gethostent_r(struct hostent*, char*, size_t, struct hostent**, int*);'
14622 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBWRE ;;
14624 case "$gethostent_r_proto" in
14625 ''|0) try='int gethostent_r(struct hostent*, char*, int, int*);'
14626 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBIE ;;
14628 case "$gethostent_r_proto" in
14629 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int, int*);'
14630 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=S_SBIE ;;
14632 case "$gethostent_r_proto" in
14633 ''|0) try='struct hostent* gethostent_r(struct hostent*, char*, int);'
14634 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=S_SBI ;;
14636 case "$gethostent_r_proto" in
14637 ''|0) try='int gethostent_r(struct hostent*, char*, int);'
14638 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SBI ;;
14640 case "$gethostent_r_proto" in
14641 ''|0) try='int gethostent_r(struct hostent*, struct hostent_data*);'
14642 ./protochk "$extern_C $try" $hdrs && gethostent_r_proto=I_SD ;;
14644 case "$gethostent_r_proto" in
14645 ''|0) d_gethostent_r=undef
14646 gethostent_r_proto=0
14647 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
14648 * ) case "$gethostent_r_proto" in
14649 REENTRANT_PROTO*) ;;
14650 *) gethostent_r_proto="REENTRANT_PROTO_$gethostent_r_proto" ;;
14652 echo "Prototype: $try" ;;
14655 *) case "$usethreads" in
14656 define) echo "gethostent_r has no prototype, not using it." >&4 ;;
14658 d_gethostent_r=undef
14659 gethostent_r_proto=0
14663 *) gethostent_r_proto=0
14667 : see if prototypes for various gethostxxx netdb.h functions are available
14669 set d_gethostprotos gethostent $i_netdb netdb.h
14672 : see if getitimer exists
14673 set getitimer d_getitimer
14676 : see if getlogin exists
14677 set getlogin d_getlogin
14680 : see if getlogin_r exists
14681 set getlogin_r d_getlogin_r
14683 case "$d_getlogin_r" in
14685 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
14686 case "$d_getlogin_r_proto:$usethreads" in
14687 ":define") d_getlogin_r_proto=define
14688 set d_getlogin_r_proto getlogin_r $hdrs
14692 case "$d_getlogin_r_proto" in
14694 case "$getlogin_r_proto" in
14695 ''|0) try='int getlogin_r(char*, size_t);'
14696 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=I_BW ;;
14698 case "$getlogin_r_proto" in
14699 ''|0) try='int getlogin_r(char*, int);'
14700 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=I_BI ;;
14702 case "$getlogin_r_proto" in
14703 ''|0) try='char* getlogin_r(char*, size_t);'
14704 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=B_BW ;;
14706 case "$getlogin_r_proto" in
14707 ''|0) try='char* getlogin_r(char*, int);'
14708 ./protochk "$extern_C $try" $hdrs && getlogin_r_proto=B_BI ;;
14710 case "$getlogin_r_proto" in
14711 ''|0) d_getlogin_r=undef
14713 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
14714 * ) case "$getlogin_r_proto" in
14715 REENTRANT_PROTO*) ;;
14716 *) getlogin_r_proto="REENTRANT_PROTO_$getlogin_r_proto" ;;
14718 echo "Prototype: $try" ;;
14721 *) case "$usethreads" in
14722 define) echo "getlogin_r has no prototype, not using it." >&4 ;;
14729 *) getlogin_r_proto=0
14733 : see if getmnt exists
14734 set getmnt d_getmnt
14737 : see if getmntent exists
14738 set getmntent d_getmntent
14741 : see if getnameinfo exists
14742 set getnameinfo d_getnameinfo
14745 : see if getnetbyaddr exists
14746 set getnetbyaddr d_getnbyaddr
14749 : see if getnetbyname exists
14750 set getnetbyname d_getnbyname
14753 : see if getnetent exists
14754 set getnetent d_getnent
14757 : see if getnetbyaddr_r exists
14758 set getnetbyaddr_r d_getnetbyaddr_r
14760 case "$d_getnetbyaddr_r" in
14762 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14763 case "$d_getnetbyaddr_r_proto:$usethreads" in
14764 ":define") d_getnetbyaddr_r_proto=define
14765 set d_getnetbyaddr_r_proto getnetbyaddr_r $hdrs
14769 case "$d_getnetbyaddr_r_proto" in
14771 case "$getnetbyaddr_r_proto" in
14772 ''|0) try='int getnetbyaddr_r(unsigned long, int, struct netent*, char*, size_t, struct netent**, int*);'
14773 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_UISBWRE ;;
14775 case "$getnetbyaddr_r_proto" in
14776 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, char*, int);'
14777 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_LISBI ;;
14779 case "$getnetbyaddr_r_proto" in
14780 ''|0) try='struct netent* getnetbyaddr_r(in_addr_t, int, struct netent*, char*, int);'
14781 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=S_TISBI ;;
14783 case "$getnetbyaddr_r_proto" in
14784 ''|0) try='struct netent* getnetbyaddr_r(long, int, struct netent*, char*, int);'
14785 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=S_LISBI ;;
14787 case "$getnetbyaddr_r_proto" in
14788 ''|0) try='int getnetbyaddr_r(in_addr_t, int, struct netent*, struct netent_data*);'
14789 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_TISD ;;
14791 case "$getnetbyaddr_r_proto" in
14792 ''|0) try='int getnetbyaddr_r(long, int, struct netent*, struct netent_data*);'
14793 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_LISD ;;
14795 case "$getnetbyaddr_r_proto" in
14796 ''|0) try='int getnetbyaddr_r(int, int, struct netent*, struct netent_data*);'
14797 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;;
14799 case "$getnetbyaddr_r_proto" in
14800 ''|0) try='int getnetbyaddr_r(uint32_t, int, struct netent*, char*, size_t, struct netent**, int*);'
14801 ./protochk "$extern_C $try" $hdrs && getnetbyaddr_r_proto=I_uISBWRE ;;
14803 case "$getnetbyaddr_r_proto" in
14804 ''|0) d_getnetbyaddr_r=undef
14805 getnetbyaddr_r_proto=0
14806 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
14807 * ) case "$getnetbyaddr_r_proto" in
14808 REENTRANT_PROTO*) ;;
14809 *) getnetbyaddr_r_proto="REENTRANT_PROTO_$getnetbyaddr_r_proto" ;;
14811 echo "Prototype: $try" ;;
14814 *) case "$usethreads" in
14815 define) echo "getnetbyaddr_r has no prototype, not using it." >&4 ;;
14817 d_getnetbyaddr_r=undef
14818 getnetbyaddr_r_proto=0
14822 *) getnetbyaddr_r_proto=0
14826 : see if getnetbyname_r exists
14827 set getnetbyname_r d_getnetbyname_r
14829 case "$d_getnetbyname_r" in
14831 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14832 case "$d_getnetbyname_r_proto:$usethreads" in
14833 ":define") d_getnetbyname_r_proto=define
14834 set d_getnetbyname_r_proto getnetbyname_r $hdrs
14838 case "$d_getnetbyname_r_proto" in
14840 case "$getnetbyname_r_proto" in
14841 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, size_t, struct netent**, int*);'
14842 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSBWRE ;;
14844 case "$getnetbyname_r_proto" in
14845 ''|0) try='int getnetbyname_r(const char*, struct netent*, char*, int);'
14846 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSBI ;;
14848 case "$getnetbyname_r_proto" in
14849 ''|0) try='struct netent* getnetbyname_r(const char*, struct netent*, char*, int);'
14850 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=S_CSBI ;;
14852 case "$getnetbyname_r_proto" in
14853 ''|0) try='int getnetbyname_r(const char*, struct netent*, struct netent_data*);'
14854 ./protochk "$extern_C $try" $hdrs && getnetbyname_r_proto=I_CSD ;;
14856 case "$getnetbyname_r_proto" in
14857 ''|0) d_getnetbyname_r=undef
14858 getnetbyname_r_proto=0
14859 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
14860 * ) case "$getnetbyname_r_proto" in
14861 REENTRANT_PROTO*) ;;
14862 *) getnetbyname_r_proto="REENTRANT_PROTO_$getnetbyname_r_proto" ;;
14864 echo "Prototype: $try" ;;
14867 *) case "$usethreads" in
14868 define) echo "getnetbyname_r has no prototype, not using it." >&4 ;;
14870 d_getnetbyname_r=undef
14871 getnetbyname_r_proto=0
14875 *) getnetbyname_r_proto=0
14879 : see if getnetent_r exists
14880 set getnetent_r d_getnetent_r
14882 case "$d_getnetent_r" in
14884 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14885 case "$d_getnetent_r_proto:$usethreads" in
14886 ":define") d_getnetent_r_proto=define
14887 set d_getnetent_r_proto getnetent_r $hdrs
14891 case "$d_getnetent_r_proto" in
14893 case "$getnetent_r_proto" in
14894 ''|0) try='int getnetent_r(struct netent*, char*, size_t, struct netent**, int*);'
14895 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBWRE ;;
14897 case "$getnetent_r_proto" in
14898 ''|0) try='int getnetent_r(struct netent*, char*, int, int*);'
14899 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBIE ;;
14901 case "$getnetent_r_proto" in
14902 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int, int*);'
14903 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=S_SBIE ;;
14905 case "$getnetent_r_proto" in
14906 ''|0) try='struct netent* getnetent_r(struct netent*, char*, int);'
14907 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=S_SBI ;;
14909 case "$getnetent_r_proto" in
14910 ''|0) try='int getnetent_r(struct netent*, char*, int);'
14911 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SBI ;;
14913 case "$getnetent_r_proto" in
14914 ''|0) try='int getnetent_r(struct netent*, struct netent_data*);'
14915 ./protochk "$extern_C $try" $hdrs && getnetent_r_proto=I_SD ;;
14917 case "$getnetent_r_proto" in
14918 ''|0) d_getnetent_r=undef
14919 getnetent_r_proto=0
14920 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
14921 * ) case "$getnetent_r_proto" in
14922 REENTRANT_PROTO*) ;;
14923 *) getnetent_r_proto="REENTRANT_PROTO_$getnetent_r_proto" ;;
14925 echo "Prototype: $try" ;;
14928 *) case "$usethreads" in
14929 define) echo "getnetent_r has no prototype, not using it." >&4 ;;
14931 d_getnetent_r=undef
14932 getnetent_r_proto=0
14936 *) getnetent_r_proto=0
14940 : see if prototypes for various getnetxxx netdb.h functions are available
14942 set d_getnetprotos getnetent $i_netdb netdb.h
14945 : see if getpagesize exists
14946 set getpagesize d_getpagsz
14949 : Optional checks for getprotobyname and getprotobynumber
14951 : see if getprotobyname exists
14952 set getprotobyname d_getpbyname
14955 : see if getprotobynumber exists
14956 set getprotobynumber d_getpbynumber
14959 : see if getprotoent exists
14960 set getprotoent d_getpent
14963 : see if getpgid exists
14964 set getpgid d_getpgid
14967 : see if getpgrp2 exists
14968 set getpgrp2 d_getpgrp2
14971 : see if getppid exists
14972 set getppid d_getppid
14975 : see if getpriority exists
14976 set getpriority d_getprior
14979 : see if getprotobyname_r exists
14980 set getprotobyname_r d_getprotobyname_r
14982 case "$d_getprotobyname_r" in
14984 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
14985 case "$d_getprotobyname_r_proto:$usethreads" in
14986 ":define") d_getprotobyname_r_proto=define
14987 set d_getprotobyname_r_proto getprotobyname_r $hdrs
14991 case "$d_getprotobyname_r_proto" in
14993 case "$getprotobyname_r_proto" in
14994 ''|0) try='int getprotobyname_r(const char*, struct protoent*, char*, size_t, struct protoent**);'
14995 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=I_CSBWR ;;
14997 case "$getprotobyname_r_proto" in
14998 ''|0) try='struct protoent* getprotobyname_r(const char*, struct protoent*, char*, int);'
14999 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=S_CSBI ;;
15001 case "$getprotobyname_r_proto" in
15002 ''|0) try='int getprotobyname_r(const char*, struct protoent*, struct protoent_data*);'
15003 ./protochk "$extern_C $try" $hdrs && getprotobyname_r_proto=I_CSD ;;
15005 case "$getprotobyname_r_proto" in
15006 ''|0) d_getprotobyname_r=undef
15007 getprotobyname_r_proto=0
15008 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
15009 * ) case "$getprotobyname_r_proto" in
15010 REENTRANT_PROTO*) ;;
15011 *) getprotobyname_r_proto="REENTRANT_PROTO_$getprotobyname_r_proto" ;;
15013 echo "Prototype: $try" ;;
15016 *) case "$usethreads" in
15017 define) echo "getprotobyname_r has no prototype, not using it." >&4 ;;
15019 d_getprotobyname_r=undef
15020 getprotobyname_r_proto=0
15024 *) getprotobyname_r_proto=0
15028 : see if getprotobynumber_r exists
15029 set getprotobynumber_r d_getprotobynumber_r
15031 case "$d_getprotobynumber_r" in
15033 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15034 case "$d_getprotobynumber_r_proto:$usethreads" in
15035 ":define") d_getprotobynumber_r_proto=define
15036 set d_getprotobynumber_r_proto getprotobynumber_r $hdrs
15040 case "$d_getprotobynumber_r_proto" in
15042 case "$getprotobynumber_r_proto" in
15043 ''|0) try='int getprotobynumber_r(int, struct protoent*, char*, size_t, struct protoent**);'
15044 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=I_ISBWR ;;
15046 case "$getprotobynumber_r_proto" in
15047 ''|0) try='struct protoent* getprotobynumber_r(int, struct protoent*, char*, int);'
15048 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=S_ISBI ;;
15050 case "$getprotobynumber_r_proto" in
15051 ''|0) try='int getprotobynumber_r(int, struct protoent*, struct protoent_data*);'
15052 ./protochk "$extern_C $try" $hdrs && getprotobynumber_r_proto=I_ISD ;;
15054 case "$getprotobynumber_r_proto" in
15055 ''|0) d_getprotobynumber_r=undef
15056 getprotobynumber_r_proto=0
15057 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
15058 * ) case "$getprotobynumber_r_proto" in
15059 REENTRANT_PROTO*) ;;
15060 *) getprotobynumber_r_proto="REENTRANT_PROTO_$getprotobynumber_r_proto" ;;
15062 echo "Prototype: $try" ;;
15065 *) case "$usethreads" in
15066 define) echo "getprotobynumber_r has no prototype, not using it." >&4 ;;
15068 d_getprotobynumber_r=undef
15069 getprotobynumber_r_proto=0
15073 *) getprotobynumber_r_proto=0
15077 : see if getprotoent_r exists
15078 set getprotoent_r d_getprotoent_r
15080 case "$d_getprotoent_r" in
15082 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15083 case "$d_getprotoent_r_proto:$usethreads" in
15084 ":define") d_getprotoent_r_proto=define
15085 set d_getprotoent_r_proto getprotoent_r $hdrs
15089 case "$d_getprotoent_r_proto" in
15091 case "$getprotoent_r_proto" in
15092 ''|0) try='int getprotoent_r(struct protoent*, char*, size_t, struct protoent**);'
15093 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SBWR ;;
15095 case "$getprotoent_r_proto" in
15096 ''|0) try='int getprotoent_r(struct protoent*, char*, int);'
15097 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SBI ;;
15099 case "$getprotoent_r_proto" in
15100 ''|0) try='struct protoent* getprotoent_r(struct protoent*, char*, int);'
15101 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=S_SBI ;;
15103 case "$getprotoent_r_proto" in
15104 ''|0) try='int getprotoent_r(struct protoent*, struct protoent_data*);'
15105 ./protochk "$extern_C $try" $hdrs && getprotoent_r_proto=I_SD ;;
15107 case "$getprotoent_r_proto" in
15108 ''|0) d_getprotoent_r=undef
15109 getprotoent_r_proto=0
15110 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
15111 * ) case "$getprotoent_r_proto" in
15112 REENTRANT_PROTO*) ;;
15113 *) getprotoent_r_proto="REENTRANT_PROTO_$getprotoent_r_proto" ;;
15115 echo "Prototype: $try" ;;
15118 *) case "$usethreads" in
15119 define) echo "getprotoent_r has no prototype, not using it." >&4 ;;
15121 d_getprotoent_r=undef
15122 getprotoent_r_proto=0
15126 *) getprotoent_r_proto=0
15130 : see if prototypes for various getprotoxxx netdb.h functions are available
15132 set d_getprotoprotos getprotoent $i_netdb netdb.h
15135 : see if getprpwnam exists
15136 set getprpwnam d_getprpwnam
15139 : see if getpwent exists
15140 set getpwent d_getpwent
15143 : see if getpwent_r exists
15144 set getpwent_r d_getpwent_r
15146 case "$d_getpwent_r" in
15148 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
15149 case "$d_getpwent_r_proto:$usethreads" in
15150 ":define") d_getpwent_r_proto=define
15151 set d_getpwent_r_proto getpwent_r $hdrs
15155 case "$d_getpwent_r_proto" in
15157 case "$getpwent_r_proto" in
15158 ''|0) try='int getpwent_r(struct passwd*, char*, size_t, struct passwd**);'
15159 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBWR ;;
15161 case "$getpwent_r_proto" in
15162 ''|0) try='int getpwent_r(struct passwd*, char*, int, struct passwd**);'
15163 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBIR ;;
15165 case "$getpwent_r_proto" in
15166 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, size_t);'
15167 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=S_SBW ;;
15169 case "$getpwent_r_proto" in
15170 ''|0) try='struct passwd* getpwent_r(struct passwd*, char*, int);'
15171 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=S_SBI ;;
15173 case "$getpwent_r_proto" in
15174 ''|0) try='int getpwent_r(struct passwd*, char*, int);'
15175 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBI ;;
15177 case "$getpwent_r_proto" in
15178 ''|0) try='int getpwent_r(struct passwd*, char*, int, FILE**);'
15179 ./protochk "$extern_C $try" $hdrs && getpwent_r_proto=I_SBIH ;;
15181 case "$getpwent_r_proto" in
15182 ''|0) d_getpwent_r=undef
15184 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
15185 * ) case "$getpwent_r_proto" in
15186 REENTRANT_PROTO*) ;;
15187 *) getpwent_r_proto="REENTRANT_PROTO_$getpwent_r_proto" ;;
15189 echo "Prototype: $try" ;;
15192 *) case "$usethreads" in
15193 define) echo "getpwent_r has no prototype, not using it." >&4 ;;
15200 *) getpwent_r_proto=0
15204 : see if getpwnam_r exists
15205 set getpwnam_r d_getpwnam_r
15207 case "$d_getpwnam_r" in
15209 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
15210 case "$d_getpwnam_r_proto:$usethreads" in
15211 ":define") d_getpwnam_r_proto=define
15212 set d_getpwnam_r_proto getpwnam_r $hdrs
15216 case "$d_getpwnam_r_proto" in
15218 case "$getpwnam_r_proto" in
15219 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);'
15220 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBWR ;;
15222 case "$getpwnam_r_proto" in
15223 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int, struct passwd**);'
15224 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBIR ;;
15226 case "$getpwnam_r_proto" in
15227 ''|0) try='struct passwd* getpwnam_r(const char*, struct passwd*, char*, int);'
15228 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=S_CSBI ;;
15230 case "$getpwnam_r_proto" in
15231 ''|0) try='int getpwnam_r(const char*, struct passwd*, char*, int);'
15232 ./protochk "$extern_C $try" $hdrs && getpwnam_r_proto=I_CSBI ;;
15234 case "$getpwnam_r_proto" in
15235 ''|0) d_getpwnam_r=undef
15237 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
15238 * ) case "$getpwnam_r_proto" in
15239 REENTRANT_PROTO*) ;;
15240 *) getpwnam_r_proto="REENTRANT_PROTO_$getpwnam_r_proto" ;;
15242 echo "Prototype: $try" ;;
15245 *) case "$usethreads" in
15246 define) echo "getpwnam_r has no prototype, not using it." >&4 ;;
15253 *) getpwnam_r_proto=0
15257 : see if getpwuid_r exists
15258 set getpwuid_r d_getpwuid_r
15260 case "$d_getpwuid_r" in
15262 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
15263 case "$d_getpwuid_r_proto:$usethreads" in
15264 ":define") d_getpwuid_r_proto=define
15265 set d_getpwuid_r_proto getpwuid_r $hdrs
15269 case "$d_getpwuid_r_proto" in
15271 case "$getpwuid_r_proto" in
15272 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
15273 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
15275 case "$getpwuid_r_proto" in
15276 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
15277 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
15279 case "$getpwuid_r_proto" in
15280 ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
15281 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
15283 case "$getpwuid_r_proto" in
15284 ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
15285 ./protochk "$extern_C $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
15287 case "$getpwuid_r_proto" in
15288 ''|0) d_getpwuid_r=undef
15290 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
15291 * ) case "$getpwuid_r_proto" in
15292 REENTRANT_PROTO*) ;;
15293 *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
15295 echo "Prototype: $try" ;;
15298 *) case "$usethreads" in
15299 define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
15306 *) getpwuid_r_proto=0
15310 : Optional checks for getsbyname and getsbyport
15312 : see if getservbyname exists
15313 set getservbyname d_getsbyname
15316 : see if getservbyport exists
15317 set getservbyport d_getsbyport
15320 : see if getservent exists
15321 set getservent d_getsent
15324 : see if getservbyname_r exists
15325 set getservbyname_r d_getservbyname_r
15327 case "$d_getservbyname_r" in
15329 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15330 case "$d_getservbyname_r_proto:$usethreads" in
15331 ":define") d_getservbyname_r_proto=define
15332 set d_getservbyname_r_proto getservbyname_r $hdrs
15336 case "$d_getservbyname_r_proto" in
15338 case "$getservbyname_r_proto" in
15339 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, char*, size_t, struct servent**);'
15340 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=I_CCSBWR ;;
15342 case "$getservbyname_r_proto" in
15343 ''|0) try='struct servent* getservbyname_r(const char*, const char*, struct servent*, char*, int);'
15344 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=S_CCSBI ;;
15346 case "$getservbyname_r_proto" in
15347 ''|0) try='int getservbyname_r(const char*, const char*, struct servent*, struct servent_data*);'
15348 ./protochk "$extern_C $try" $hdrs && getservbyname_r_proto=I_CCSD ;;
15350 case "$getservbyname_r_proto" in
15351 ''|0) d_getservbyname_r=undef
15352 getservbyname_r_proto=0
15353 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
15354 * ) case "$getservbyname_r_proto" in
15355 REENTRANT_PROTO*) ;;
15356 *) getservbyname_r_proto="REENTRANT_PROTO_$getservbyname_r_proto" ;;
15358 echo "Prototype: $try" ;;
15361 *) case "$usethreads" in
15362 define) echo "getservbyname_r has no prototype, not using it." >&4 ;;
15364 d_getservbyname_r=undef
15365 getservbyname_r_proto=0
15369 *) getservbyname_r_proto=0
15373 : see if getservbyport_r exists
15374 set getservbyport_r d_getservbyport_r
15376 case "$d_getservbyport_r" in
15378 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15379 case "$d_getservbyport_r_proto:$usethreads" in
15380 ":define") d_getservbyport_r_proto=define
15381 set d_getservbyport_r_proto getservbyport_r $hdrs
15385 case "$d_getservbyport_r_proto" in
15387 case "$getservbyport_r_proto" in
15388 ''|0) try='int getservbyport_r(int, const char*, struct servent*, char*, size_t, struct servent**);'
15389 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=I_ICSBWR ;;
15391 case "$getservbyport_r_proto" in
15392 ''|0) try='struct servent* getservbyport_r(int, const char*, struct servent*, char*, int);'
15393 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=S_ICSBI ;;
15395 case "$getservbyport_r_proto" in
15396 ''|0) try='int getservbyport_r(int, const char*, struct servent*, struct servent_data*);'
15397 ./protochk "$extern_C $try" $hdrs && getservbyport_r_proto=I_ICSD ;;
15399 case "$getservbyport_r_proto" in
15400 ''|0) d_getservbyport_r=undef
15401 getservbyport_r_proto=0
15402 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
15403 * ) case "$getservbyport_r_proto" in
15404 REENTRANT_PROTO*) ;;
15405 *) getservbyport_r_proto="REENTRANT_PROTO_$getservbyport_r_proto" ;;
15407 echo "Prototype: $try" ;;
15410 *) case "$usethreads" in
15411 define) echo "getservbyport_r has no prototype, not using it." >&4 ;;
15413 d_getservbyport_r=undef
15414 getservbyport_r_proto=0
15418 *) getservbyport_r_proto=0
15422 : see if getservent_r exists
15423 set getservent_r d_getservent_r
15425 case "$d_getservent_r" in
15427 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
15428 case "$d_getservent_r_proto:$usethreads" in
15429 ":define") d_getservent_r_proto=define
15430 set d_getservent_r_proto getservent_r $hdrs
15434 case "$d_getservent_r_proto" in
15436 case "$getservent_r_proto" in
15437 ''|0) try='int getservent_r(struct servent*, char*, size_t, struct servent**);'
15438 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SBWR ;;
15440 case "$getservent_r_proto" in
15441 ''|0) try='int getservent_r(struct servent*, char*, int);'
15442 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SBI ;;
15444 case "$getservent_r_proto" in
15445 ''|0) try='struct servent* getservent_r(struct servent*, char*, int);'
15446 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=S_SBI ;;
15448 case "$getservent_r_proto" in
15449 ''|0) try='int getservent_r(struct servent*, struct servent_data*);'
15450 ./protochk "$extern_C $try" $hdrs && getservent_r_proto=I_SD ;;
15452 case "$getservent_r_proto" in
15453 ''|0) d_getservent_r=undef
15454 getservent_r_proto=0
15455 echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
15456 * ) case "$getservent_r_proto" in
15457 REENTRANT_PROTO*) ;;
15458 *) getservent_r_proto="REENTRANT_PROTO_$getservent_r_proto" ;;
15460 echo "Prototype: $try" ;;
15463 *) case "$usethreads" in
15464 define) echo "getservent_r has no prototype, not using it." >&4 ;;
15466 d_getservent_r=undef
15467 getservent_r_proto=0
15471 *) getservent_r_proto=0
15475 : see if prototypes for various getservxxx netdb.h functions are available
15477 set d_getservprotos getservent $i_netdb netdb.h
15480 : see if getspnam exists
15481 set getspnam d_getspnam
15484 : see if this is a shadow.h system
15485 set shadow.h i_shadow
15488 : see if getspnam_r exists
15489 set getspnam_r d_getspnam_r
15491 case "$d_getspnam_r" in
15493 hdrs="$i_systypes sys/types.h define stdio.h $i_shadow shadow.h"
15494 case "$d_getspnam_r_proto:$usethreads" in
15495 ":define") d_getspnam_r_proto=define
15496 set d_getspnam_r_proto getspnam_r $hdrs
15500 case "$d_getspnam_r_proto" in
15502 case "$getspnam_r_proto" in
15503 ''|0) try='int getspnam_r(const char*, struct spwd*, char*, size_t, struct spwd**);'
15504 ./protochk "$extern_C $try" $hdrs && getspnam_r_proto=I_CSBWR ;;
15506 case "$getspnam_r_proto" in
15507 ''|0) try='struct spwd* getspnam_r(const char*, struct spwd*, char*, int);'
15508 ./protochk "$extern_C $try" $hdrs && getspnam_r_proto=S_CSBI ;;
15510 case "$getspnam_r_proto" in
15511 ''|0) d_getspnam_r=undef
15513 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
15514 * ) case "$getspnam_r_proto" in
15515 REENTRANT_PROTO*) ;;
15516 *) getspnam_r_proto="REENTRANT_PROTO_$getspnam_r_proto" ;;
15518 echo "Prototype: $try" ;;
15521 *) case "$usethreads" in
15522 define) echo "getspnam_r has no prototype, not using it." >&4 ;;
15529 *) getspnam_r_proto=0
15533 : see if gettimeofday or ftime exists
15534 set gettimeofday d_gettimeod
15536 case "$d_gettimeod" in
15542 val="$undef"; set d_ftime; eval $setvar
15545 case "$d_gettimeod$d_ftime" in
15548 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
15552 : see if gmtime_r exists
15553 set gmtime_r d_gmtime_r
15555 case "$d_gmtime_r" in
15557 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
15558 case "$d_gmtime_r_proto:$usethreads" in
15559 ":define") d_gmtime_r_proto=define
15560 set d_gmtime_r_proto gmtime_r $hdrs
15564 case "$d_gmtime_r_proto" in
15566 case "$gmtime_r_proto" in
15567 ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);'
15568 ./protochk "$extern_C $try" $hdrs && gmtime_r_proto=S_TS ;;
15570 case "$gmtime_r_proto" in
15571 ''|0) try='int gmtime_r(const time_t*, struct tm*);'
15572 ./protochk "$extern_C $try" $hdrs && gmtime_r_proto=I_TS ;;
15574 case "$gmtime_r_proto" in
15575 ''|0) d_gmtime_r=undef
15577 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
15578 * ) case "$gmtime_r_proto" in
15579 REENTRANT_PROTO*) ;;
15580 *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;;
15582 echo "Prototype: $try" ;;
15585 *) case "$usethreads" in
15586 define) echo "gmtime_r has no prototype, not using it." >&4 ;;
15593 *) gmtime_r_proto=0
15597 : see if hasmntopt exists
15598 set hasmntopt d_hasmntopt
15601 : see if this is a netinet/in.h or sys/in.h system
15602 set netinet/in.h i_niin sys/in.h i_sysin
15605 : see if arpa/inet.h has to be included
15606 set arpa/inet.h i_arpainet
15609 : see if htonl --and friends-- exists
15614 : Maybe they are macros.
15617 $cat >htonl.c <<EOM
15619 #include <sys/types.h>
15620 #$i_niin I_NETINET_IN
15622 #$i_arpainet I_ARPA_INET
15623 #ifdef I_NETINET_IN
15624 #include <netinet/in.h>
15627 #include <sys/in.h>
15630 #include <arpa/inet.h>
15633 printf("Defined as a macro.");
15636 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
15637 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
15639 echo "But it seems to be defined as a macro." >&4
15647 : see if hypot exists
15651 : see if ilogb exists
15655 : see if ilogbl exists
15656 set ilogbl d_ilogbl
15659 : check whether inet_aton exists
15660 set inet_aton d_inetaton
15663 : see if inet_ntop exists
15664 set inet_ntop d_inetntop
15667 : see if inet_pton exists
15668 set inet_pton d_inetpton
15673 $cat >isascii.c <<EOCP
15676 #$i_stdlib I_STDLIB
15678 #include <stdlib.h>
15689 if eval $compile; then
15690 echo "isascii() found." >&4
15693 echo "isascii() NOT found." >&4
15702 $cat >isblank.c <<'EOCP'
15713 if $cc $ccflags $ldflags -o isblank isblank.c $libs >/dev/null 2>&1 ; then
15714 echo "isblank() found." >&4
15717 echo "isblank() NOT found." >&4
15724 : check for isfinite
15725 echo "Checking to see if you have isfinite..." >&4
15728 int main() { return isfinite(0.0); }
15731 if eval $compile; then
15733 echo "You have isfinite."
15736 echo "You do not have isfinite."
15742 : see if isfinitel exists
15743 set isfinitel d_isfinitel
15747 echo "Checking to see if you have isinf..." >&4
15750 int main() { return isinf(0.0); }
15753 if eval $compile; then
15755 echo "You have isinf."
15758 echo "You do not have isinf."
15764 : see if isinfl exists
15765 set isinfl d_isinfl
15769 echo "Checking to see if you have isless..." >&4
15772 int main() { return isless(0.0); }
15775 if eval $compile; then
15777 echo "You have isless."
15780 echo "You do not have isless."
15787 echo "Checking to see if you have isnan..." >&4
15790 int main() { return isnan(0.0); }
15793 if eval $compile; then
15795 echo "You have isnan."
15798 echo "You do not have isnan."
15804 : see if isnanl exists
15805 set isnanl d_isnanl
15808 : check for isnormal
15809 echo "Checking to see if you have isnormal..." >&4
15812 int main() { return isnormal(0.0); }
15815 if eval $compile; then
15817 echo "You have isnormal."
15820 echo "You do not have isnormal."
15830 : see if j0l exists
15834 : see if killpg exists
15835 set killpg d_killpg
15838 : see if localeconv exists
15839 set localeconv d_locconv
15842 : see if libc has the POSIX.1-2008 currency locale rules
15843 case "$d_locconv:$d_lc_monetary_2008" in
15846 #include <locale.h>
15848 struct lconv *lc = localeconv();
15849 char int_p_cs_precedes = lc->int_p_cs_precedes;
15854 if eval $compile; then
15855 d_lc_monetary_2008="$define"
15857 d_lc_monetary_2008="$undef"
15863 : see if lchown exists
15865 $cat > try.c <<'EOCP'
15866 /* System header to define __stub macros and hopefully few prototypes,
15867 which can conflict with char lchown(); below. */
15868 #include <assert.h>
15869 /* Override any gcc2 internal prototype to avoid an error. */
15870 /* We use char because int might match the return type of a gcc2
15871 builtin and then its argument prototype would still apply. */
15874 /* The GNU C library defines this for functions which it implements
15875 to always fail with ENOSYS. Some functions are actually named
15876 something starting with __ and the normal name is an alias. */
15877 #if defined (__stub_lchown) || defined (__stub___lchown)
15885 if eval $compile; then
15886 $echo "lchown() found." >&4
15889 $echo "lchown() NOT found." >&4
15895 : See if number of significant digits in a double precision number is known
15897 $cat >ldbl_dig.c <<EOM
15898 #include <limits.h>
15901 printf("Contains LDBL_DIG");
15904 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
15905 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
15906 echo "LDBL_DIG found." >&4
15909 echo "LDBL_DIG NOT found." >&4
15916 : see if lgamma exists
15917 set lgamma d_lgamma
15920 : see if lgamma_r exists
15921 set lgamma_r d_lgamma_r
15924 : check to see if math.h defines _LIB_VERSION
15925 d_libm_lib_version="$undef"
15927 echo "Checking to see if your libm supports _LIB_VERSION..." >&4
15929 #include <unistd.h>
15931 int main (int argc, char *argv[])
15933 printf ("%d\n", _LIB_VERSION);
15938 if eval $compile; then
15940 echo "Yes, it does ($foo)" >&4
15941 d_libm_lib_version="$define"
15943 echo "No, it does not (probably harmless)" >&4
15947 : see if link exists
15951 : see if llrint exists
15952 set llrint d_llrint
15955 : see if llrintl exists
15956 set llrintl d_llrintl
15959 : see if llround exists
15960 set llround d_llround
15963 : see if llroundl exists
15964 set llroundl d_llroundl
15967 : see if localeconv_l exists
15968 set localeconv_l d_localeconv_l
15971 : see if localtime_r exists
15972 set localtime_r d_localtime_r
15974 case "$d_localtime_r" in
15976 hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h $i_systime sys/time.h"
15977 case "$d_localtime_r_proto:$usethreads" in
15978 ":define") d_localtime_r_proto=define
15979 set d_localtime_r_proto localtime_r $hdrs
15983 case "$d_localtime_r_proto" in
15985 case "$localtime_r_proto" in
15986 ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);'
15987 ./protochk "$extern_C $try" $hdrs && localtime_r_proto=S_TS ;;
15989 case "$localtime_r_proto" in
15990 ''|0) try='int localtime_r(const time_t*, struct tm*);'
15991 ./protochk "$extern_C $try" $hdrs && localtime_r_proto=I_TS ;;
15993 case "$localtime_r_proto" in
15994 ''|0) d_localtime_r=undef
15995 localtime_r_proto=0
15996 echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
15997 * ) case "$localtime_r_proto" in
15998 REENTRANT_PROTO*) ;;
15999 *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;;
16001 echo "Prototype: $try" ;;
16004 *) case "$usethreads" in
16005 define) echo "localtime_r has no prototype, not using it." >&4 ;;
16007 d_localtime_r=undef
16008 localtime_r_proto=0
16012 *) localtime_r_proto=0
16016 : see if localtime_r calls tzset
16017 case "$localtime_r_proto" in
16020 /* Does our libc's localtime_r call tzset ?
16021 * return 0 if so, 1 otherwise.
16023 #$i_systypes I_SYS_TYPES
16024 #$i_unistd I_UNISTD
16026 #$i_stdlib I_STDLIB
16027 #$i_malloc I_MALLOC
16029 # include <sys/types.h>
16032 # include <unistd.h>
16038 #include <stdlib.h>
16040 #include <string.h>
16042 # include <malloc.h>
16046 time_t t = time(0L);
16047 char w_tz[]="TZ" "=GMT+5",
16048 e_tz[]="TZ" "=GMT-5",
16049 *tz_e = (char*)malloc(16),
16050 *tz_w = (char*)malloc(16);
16051 struct tm tm_e, tm_w;
16052 memset(&tm_e,'\0',sizeof(struct tm));
16053 memset(&tm_w,'\0',sizeof(struct tm));
16058 localtime_r(&t, &tm_e);
16061 localtime_r(&t, &tm_w);
16063 if( memcmp(&tm_e, &tm_w, sizeof(struct tm)) == 0 )
16069 if eval $compile; then
16070 if $run ./try; then
16071 d_localtime_r_needs_tzset=undef;
16073 d_localtime_r_needs_tzset=define;
16076 d_localtime_r_needs_tzset=undef;
16080 d_localtime_r_needs_tzset=undef;
16085 : see if lockf exists
16089 : see if log1p exists
16093 : see if log2 exists
16097 : see if logb exists
16101 : see if lrint exists
16105 : see if lrintl exists
16106 set lrintl d_lrintl
16109 : see if lround exists
16110 set lround d_lround
16113 : see if lroundl exists
16114 set lroundl d_lroundl
16117 : see if prototype for lseek is available
16119 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
16122 : see if lstat exists
16126 : see if madvise exists
16127 set madvise d_madvise
16130 : see if malloc_size exists
16131 set malloc_size d_malloc_size
16134 : see if malloc_size_good exists
16135 set malloc_good_size d_malloc_good_size
16138 : see if mblen exists
16142 : see if mbrlen exists
16143 set mbrlen d_mbrlen
16146 : see if mbrtowc exists
16147 set mbrtowc d_mbrtowc
16150 : see if mbstowcs exists
16151 set mbstowcs d_mbstowcs
16154 : see if mbtowc exists
16155 set mbtowc d_mbtowc
16158 : see if memmem exists
16159 : We need both a prototype in string.h and the symbol in libc.
16162 xx1="#$d_gnulibc HAS_GNULIBC"
16163 xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
16164 xx3='# define _GNU_SOURCE'
16166 set d_memmem_proto memmem literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
16168 case "$d_memmem_proto" in
16169 define) # see if memmem exists
16170 set memmem d_memmem
16179 : see if memrchr exists
16180 : We need both a prototype in string.h and the symbol in libc.
16183 xx1="#$d_gnulibc HAS_GNULIBC"
16184 xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
16185 xx3='# define _GNU_SOURCE'
16187 set d_memrchr_proto memrchr literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
16189 case "$d_memrchr_proto" in
16190 define) # see if memrchr exists
16191 set memrchr d_memrchr
16200 : see if mkdir exists
16204 : see if mkdtemp exists
16205 set mkdtemp d_mkdtemp
16208 : see if mkfifo exists
16209 set mkfifo d_mkfifo
16212 : see if mkostemp exists
16213 set mkostemp d_mkostemp
16216 : see if mkstemp exists
16217 set mkstemp d_mkstemp
16220 : see if mkstemps exists
16221 set mkstemps d_mkstemps
16224 : see if mktime exists
16225 set mktime d_mktime
16228 : see if sys/mman.h has to be included
16229 set sys/mman.h i_sysmman
16232 : see if mmap exists
16235 : see what shmat returns
16236 : default to something harmless
16238 case "$i_sysmman$d_mmap" in
16240 $cat >mmap.c <<'END'
16241 #include <sys/mman.h>
16244 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
16249 echo "and it returns ($mmaptype)." >&4
16253 : see if sqrtl exists
16257 : see if scalbnl exists
16258 set scalbnl d_scalbnl
16261 : see if truncl exists
16262 set truncl d_truncl
16265 : see if modfl exists
16269 : see if prototype for modfl is available
16271 set d_modflproto modfl define math.h
16274 if $test "$uselongdouble" = "$define"; then
16276 if $test "$d_sqrtl" != "$define"; then
16277 message="$message sqrtl"
16279 if $test "$d_modfl" != "$define"; then
16280 if $test "$d_truncl:$d_copysignl" = "$define:$define"; then
16281 echo "You have both truncl and copysignl, so I can emulate modfl."
16283 if $test "$d_aintl:$d_copysignl" = "$define:$define"; then
16284 echo "You have both aintl and copysignl, so I can emulate modfl."
16286 message="$message modfl"
16290 if $test "$d_frexpl" != "$define"; then
16291 if $test "$d_ilogbl:$d_scalbnl" = "$define:$define"; then
16292 echo "You have both ilogbl and scalbnl, so I can emulate frexpl."
16294 message="$message frexpl"
16297 if $test "$d_ldexpl" != "$define"; then
16298 message="$message ldexpl"
16301 if $test "$message" != ""; then
16304 *** You requested the use of long doubles but you do not seem to have
16305 *** the following mathematical functions needed for long double support:
16307 *** Please rerun Configure without -Duselongdouble and/or -Dusemorebits.
16308 *** Cannot continue, aborting.
16316 : see if mprotect exists
16317 set mprotect d_mprotect
16320 : see if msgctl exists
16321 set msgctl d_msgctl
16324 : see if msgget exists
16325 set msgget d_msgget
16328 : see if msgsnd exists
16329 set msgsnd d_msgsnd
16332 : see if msgrcv exists
16333 set msgrcv d_msgrcv
16336 : see how much of the 'msg*(2)' library is present.
16339 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
16340 *"$undef"*) h_msg=false;;
16344 case "`ipcs 2>&1`" in
16345 "SVID messages"*"not configured"*)
16346 echo "Your $osname does not have the msg*(2) configured." >&4
16349 set msgctl d_msgctl
16351 set msgget d_msgget
16353 set msgsnd d_msgsnd
16355 set msgrcv d_msgrcv
16361 : we could also check for sys/ipc.h ...
16362 if $h_msg && $test `./findhdr sys/msg.h`; then
16363 echo "You have the full msg*(2) library." >&4
16366 echo "You don't have the full msg*(2) library." >&4
16372 : Check for msghdr_s
16374 echo "Checking to see if your system supports struct msghdr..." >&4
16375 set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
16377 case "$d_msghdr_s" in
16378 "$define") echo "Yes, it does." ;;
16379 *) echo "No, it doesn't." ;;
16382 : see if msync exists
16386 : see if munmap exists
16387 set munmap d_munmap
16390 : see if nan exists
16394 : see if nanosleep exists
16395 set nanosleep d_nanosleep
16398 : see if nearbyint exists
16399 set nearbyint d_nearbyint
16402 : see if nextafter exists
16403 set nextafter d_nextafter
16406 : see if nexttoward exists
16407 set nexttoward d_nexttoward
16410 : see if nice exists
16414 : see if this is a langinfo.h system
16415 set langinfo.h i_langinfo
16418 : see if nl_langinfo exists
16419 set nl_langinfo d_nl_langinfo
16422 : see if this is a quadmath.h system
16423 set quadmath.h i_quadmath
16426 : Check basic sizes
16428 $echo "Choosing the C types to be used for Perl's internal types..." >&4
16430 case "$use64bitint:$d_quad:$quadtype" in
16433 uvtype="$uquadtype"
16438 uvtype="unsigned long"
16444 case "$uselongdouble:$d_longdbl" in
16446 nvtype="long double"
16447 nvsize=$longdblsize
16454 case "$usequadmath:$i_quadmath" in
16456 nvtype="__float128"
16462 *** You requested the use of the quadmath library, but you
16463 *** do not seem to have the quadmath library installed.
16464 *** Cannot continue, aborting.
16470 define:*) $cat <<EOM >&4
16472 *** You requested the use of the quadmath library, but you
16473 *** do not seem to have the required header, <quadmath.h>.
16475 case "$gccversion" in
16478 *** Your gcc looks a bit old:
16484 *** You are not running a gcc.
16489 *** For the quadmath library you need at least gcc 4.6.
16490 *** Cannot continue, aborting.
16496 $echo "(IV will be "$ivtype", $ivsize bytes)"
16497 $echo "(UV will be "$uvtype", $uvsize bytes)"
16498 $echo "(NV will be "$nvtype", $nvsize bytes)"
16501 #$i_inttypes I_INTTYPES
16503 #include <inttypes.h>
16508 int8_t i = INT8_MAX;
16509 uint8_t u = UINT8_MAX;
16510 printf("int8_t\n");
16513 int16_t i = INT16_MAX;
16514 uint16_t u = UINT16_MAX;
16515 printf("int16_t\n");
16518 int32_t i = INT32_MAX;
16519 uint32_t u = UINT32_MAX;
16520 printf("int32_t\n");
16525 i8type="signed char"
16526 u8type="unsigned char"
16531 '') case "$shortsize" in
16533 u16type="unsigned short"
16541 '') set try -DINT16
16542 if eval $compile; then
16543 case "`$run ./try`" in
16555 '') if $test $shortsize -ge 2; then
16557 u16type="unsigned short"
16565 '') case "$longsize" in
16567 u32type="unsigned long"
16571 *) case "$intsize" in
16573 u32type="unsigned int"
16583 '') set try -DINT32
16584 if eval $compile; then
16585 case "`$run ./try`" in
16597 '') if $test $intsize -ge 4; then
16599 u32type="unsigned int"
16607 '') case "$d_quad:$quadtype" in
16609 i64type="$quadtype"
16610 u64type="$uquadtype"
16618 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
16621 #$i_stdlib I_STDLIB
16623 #include <stdlib.h>
16625 #include <sys/types.h>
16626 #include <signal.h>
16628 /* volatile so that the compiler has to store it out to memory */
16629 volatile int bletched = 0;
16630 $signal_t blech(int s) { bletched = 1; }
16635 int n = 8 * $uvsize;
16638 signal(SIGFPE, blech);
16641 for (i = 0; i < n; i++) {
16642 u = u << 1 | ($uvtype)1;
16644 if (($uvtype)d != u)
16648 d = ($nvtype)(u - 1);
16649 if (($uvtype)d != (u - 1))
16656 printf("%d\n", ((i == n) ? -n : i));
16662 d_nv_preserves_uv="$undef"
16663 if eval $compile; then
16664 nv_preserves_uv_bits="`$run ./try`"
16666 case "$nv_preserves_uv_bits" in
16668 nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
16669 $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1
16670 d_nv_preserves_uv="$define"
16672 [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1
16673 d_nv_preserves_uv="$undef" ;;
16674 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
16675 nv_preserves_uv_bits="0" ;;
16679 $echo "Checking to find the largest integer value your NVs can hold..." >&4
16683 typedef $nvtype NV;
16690 while(count < 256) {
16691 /* volatile so that the compiler has to store it out to memory */
16692 volatile NV up = value + 1.0;
16693 volatile NV negated = -value;
16694 volatile NV down = negated - 1.0;
16695 volatile NV got_up = up - value;
16696 int up_good = got_up == 1.0;
16697 int got_down = down - negated;
16698 int down_good = got_down == -1.0;
16700 if (down_good != up_good) {
16702 "Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n",
16703 up_good, (double) got_up, down_good, (double) got_down,
16704 count, (double) value);
16711 fputs("256.0", stdout);
16714 fputs("2.0", stdout);
16720 fputs("*", stdout);
16726 fprintf(stderr, "Cannot overflow integer range, even at 2**%d (%.20f)\n",
16727 count, (double) value);
16733 nv_overflows_integers_at='0'
16734 if eval $compile; then
16740 The largest integer your NVs can preserve is equal to $xxx
16742 nv_overflows_integers_at="$xxx"
16745 Cannot determine the largest integer value your NVs can hold, unexpected output
16752 Cannot determine the largest integer value your NVs can hold
16759 $echo "Checking whether NV 0.0 is all bits zero in memory..." >&4
16762 #$i_stdlib I_STDLIB
16764 #include <stdlib.h>
16766 #include <string.h>
16767 #include <sys/types.h>
16768 #include <signal.h>
16770 /* volatile so that the compiler has to store it out to memory */
16771 volatile int bletched = 0;
16772 $signal_t blech(int s) { bletched = 1; }
16775 int checkit($nvtype d, const char *where) {
16777 unsigned char *p = (unsigned char *)v;
16778 unsigned char *end = p + sizeof(d);
16787 p = (unsigned char *)v;
16788 printf("No - %s: 0x", where);
16790 printf ("%02X", *p++);
16795 int main(int argc, char **argv) {
16798 fail += checkit(d, "0.0");
16800 /* The compiler shouldn't be assuming that bletched is 0 */
16803 fail += checkit(d, "bleched");
16806 signal(SIGFPE, blech);
16809 /* Paranoia - the compiler should have no way of knowing that ANSI says
16810 that argv[argc] will always be NULL. Actually, if it did assume this it
16811 would be buggy, as this is C and main() can be called from elsewhere in
16813 d = argv[argc] ? 1 : 0;
16816 printf("Odd argv[argc]=%p, d=%g\n", argv[argc], d);
16819 fail += checkit(d, "ternary");
16821 memset(&d, sizeof(d), argv[argc] ? 1 : 0);
16824 printf("No - memset doesn't give 0.0\n");
16825 /* This might just blow up: */
16826 printf("(gives %g)\n", d);
16832 printf("No - something bleched\n");
16837 printf("No - %d fail(s)\n", fail);
16846 d_nv_zero_is_allbits_zero="$undef"
16847 if eval $compile; then
16853 0.0 is represented as all bits zero in memory
16855 d_nv_zero_is_allbits_zero="$define"
16858 0.0 is not represented as all bits zero in memory
16860 d_nv_zero_is_allbits_zero="$undef"
16865 0.0 is not represented as all bits zero in memory
16867 d_nv_zero_is_allbits_zero="$undef"
16873 : check for off64_t
16875 echo "Checking to see if you have off64_t..." >&4
16877 #include <sys/types.h>
16878 #include <unistd.h>
16879 int main() { off64_t x = 7; }
16882 if eval $compile; then
16884 echo "You have off64_t."
16887 echo "You do not have off64_t."
16888 case "$lseeksize" in
16889 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
16896 : how to create joinable pthreads
16897 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
16899 echo "Checking what constant to use for creating joinable pthreads..." >&4
16900 $cat >try.c <<'EOCP'
16901 #include <pthread.h>
16903 int detachstate = JOINABLE;
16906 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
16907 if eval $compile; then
16908 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
16909 val="$undef" # Yes, undef.
16910 set d_old_pthread_create_joinable
16913 set old_pthread_create_joinable
16916 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
16917 if eval $compile; then
16918 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
16920 set d_old_pthread_create_joinable
16922 val=PTHREAD_CREATE_UNDETACHED
16923 set old_pthread_create_joinable
16926 set try -DJOINABLE=__UNDETACHED
16927 if eval $compile; then
16928 echo "You seem to use __UNDETACHED." >&4
16930 set d_old_pthread_create_joinable
16933 set old_pthread_create_joinable
16936 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
16938 set d_old_pthread_create_joinable
16941 set old_pthread_create_joinable
16948 d_old_pthread_create_joinable="$undef"
16949 old_pthread_create_joinable=""
16952 : see if pause exists
16956 : see if pipe2 exists
16960 : see if poll exists
16964 : see if prctl exists
16968 : see if prctl supports PR_SET_NAME
16969 d_prctl_set_name=$undef
16974 #include <unistd.h>
16976 #include <sys/prctl.h>
16978 int main (int argc, char *argv[])
16980 return (prctl (PR_SET_NAME, "Test"));
16984 if eval $compile_ok && $run ./try; then
16985 echo "Your prctl (PR_SET_NAME, ...) works"
16986 d_prctl_set_name=$define
16992 : see if readlink exists
16993 set readlink d_readlink
16996 : Check if there is a /proc symlink to the abs path of
16997 : the executing program. We will honor hints of d_procselfexe=$undef
16998 : or procselfexe being non-empty, otherwise will try to determine both
16999 : if we have readlink.
17000 : AmigaOS will attempt to mount proc: aka /proc, if /proc/... is
17001 : referenced, and AmigaOS does not have a proc filesystem anyway.
17004 if $test "X$d_procselfexe" = Xundef; then
17006 elif $test "X$procselfexe" != X -a "X$procselfexe" != 'X '; then
17008 elif $test "X$d_readlink" = Xdefine; then
17009 : NetBSD first as /proc/self is a symlink to /proc/curproc,
17010 : and it feels more tidy to avoid an extra level of symlink
17011 set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
17012 while test $# -gt 0; do
17015 if $issymlink $try; then
17016 $ls -l $try > reflect
17017 if $contains /`basename $ls` reflect >/dev/null 2>&1; then
17018 echo "You have $type-like $try."
17019 procselfexe='"'$try'"'
17021 : This will break out of the loop
17031 : backward compatibility for d_hvfork
17032 if test X$d_hvfork != X; then
17033 d_vfork="$d_hvfork"
17036 : see if there is a vfork
17041 d_pseudofork=$undef
17043 : Ok, but do we want to use it. vfork is reportedly unreliable in
17044 : perl on Solaris 2.x, and probably elsewhere.
17048 case "$usevfork" in
17054 Perl can only use a vfork() that doesn't suffer from strict
17055 restrictions on calling functions or modifying global data in
17056 the child. For example, glibc-2.1 contains such a vfork()
17057 that is unsuitable. If your system provides a proper fork()
17058 call, chances are that you do NOT want perl to use vfork().
17061 rp="Do you still want to use vfork()?"
17066 echo "Ok, we won't use vfork()."
17075 $define) usevfork='true';;
17076 *) usevfork='false';;
17079 : see whether the pthread_atfork exists
17081 #include <pthread.h>
17084 #ifdef PTHREAD_ATFORK
17085 pthread_atfork(NULL,NULL,NULL);
17090 : see if pthread_atfork exists
17091 set try -DPTHREAD_ATFORK
17092 if eval $compile; then
17097 case "$usethreads" in
17100 $define) echo 'pthread_atfork found.' >&4 ;;
17101 *) echo 'pthread_atfork NOT found.' >&4 ;;
17104 set d_pthread_atfork
17107 : see if pthread_attr_setscope exists
17108 set pthread_attr_setscope d_pthread_attr_setscope
17111 : see whether the various POSIXish _yields exist
17113 #include <pthread.h>
17119 #ifdef PTHREAD_YIELD
17122 #ifdef PTHREAD_YIELD_NULL
17123 pthread_yield(NULL);
17129 : see if sched_yield exists
17130 set try -DSCHED_YIELD
17131 if eval $compile; then
17133 sched_yield='sched_yield()'
17137 case "$usethreads" in
17140 $define) echo 'sched_yield() found.' >&4 ;;
17141 *) echo 'sched_yield() NOT found.' >&4 ;;
17147 : see if pthread_yield exists
17148 set try -DPTHREAD_YIELD
17149 if eval $compile; then
17151 case "$sched_yield" in
17152 '') sched_yield='pthread_yield()' ;;
17155 set try -DPTHREAD_YIELD_NULL
17156 if eval $compile; then
17158 case "$sched_yield" in
17159 '') sched_yield='pthread_yield(NULL)' ;;
17165 case "$usethreads" in
17168 $define) echo 'pthread_yield() found.' >&4 ;;
17169 *) echo 'pthread_yield() NOT found.' >&4 ;;
17173 set d_pthread_yield
17175 case "$sched_yield" in
17176 '') sched_yield=undef ;;
17180 : check for ptrdiff_t
17182 echo "Checking to see if you have ptrdiff_t..." >&4
17184 #include <stddef.h>
17185 int main() { ptrdiff_t x = 7; }
17188 if eval $compile; then
17190 echo "You have ptrdiff_t."
17193 echo "You do not have ptrdiff_t."
17199 : see if random_r exists
17200 set random_r d_random_r
17202 case "$d_random_r" in
17204 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
17205 case "$d_random_r_proto:$usethreads" in
17206 ":define") d_random_r_proto=define
17207 set d_random_r_proto random_r $hdrs
17211 case "$d_random_r_proto" in
17213 case "$random_r_proto" in
17214 ''|0) try='int random_r(int*, struct random_data*);'
17215 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_iS ;;
17217 case "$random_r_proto" in
17218 ''|0) try='int random_r(long*, struct random_data*);'
17219 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_lS ;;
17221 case "$random_r_proto" in
17222 ''|0) try='int random_r(struct random_data*, int32_t*);'
17223 ./protochk "$extern_C $try" $hdrs && random_r_proto=I_St ;;
17225 case "$random_r_proto" in
17226 ''|0) d_random_r=undef
17228 echo "Disabling random_r, cannot determine prototype." >&4 ;;
17229 * ) case "$random_r_proto" in
17230 REENTRANT_PROTO*) ;;
17231 *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;;
17233 echo "Prototype: $try" ;;
17236 *) case "$usethreads" in
17237 define) echo "random_r has no prototype, not using it." >&4 ;;
17244 *) random_r_proto=0
17248 : see if readdir and friends exist
17249 set readdir d_readdir
17251 set seekdir d_seekdir
17253 set telldir d_telldir
17255 set rewinddir d_rewinddir
17258 : see if readdir64_r exists
17259 set readdir64_r d_readdir64_r
17261 case "$d_readdir64_r" in
17263 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
17264 case "$d_readdir64_r_proto:$usethreads" in
17265 ":define") d_readdir64_r_proto=define
17266 set d_readdir64_r_proto readdir64_r $hdrs
17270 case "$d_readdir64_r_proto" in
17272 case "$readdir64_r_proto" in
17273 ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);'
17274 ./protochk "$extern_C $try" $hdrs && readdir64_r_proto=I_TSR ;;
17276 case "$readdir64_r_proto" in
17277 ''|0) try='int readdir64_r(DIR*, struct dirent64*);'
17278 ./protochk "$extern_C $try" $hdrs && readdir64_r_proto=I_TS ;;
17280 case "$readdir64_r_proto" in
17281 ''|0) d_readdir64_r=undef
17282 readdir64_r_proto=0
17283 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
17284 * ) case "$readdir64_r_proto" in
17285 REENTRANT_PROTO*) ;;
17286 *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;;
17288 echo "Prototype: $try" ;;
17291 *) case "$usethreads" in
17292 define) echo "readdir64_r has no prototype, not using it." >&4 ;;
17294 d_readdir64_r=undef
17295 readdir64_r_proto=0
17299 *) readdir64_r_proto=0
17303 : see if readdir_r exists
17304 set readdir_r d_readdir_r
17306 case "$d_readdir_r" in
17308 hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h"
17309 case "$d_readdir_r_proto:$usethreads" in
17310 ":define") d_readdir_r_proto=define
17311 set d_readdir_r_proto readdir_r $hdrs
17315 case "$d_readdir_r_proto" in
17317 case "$readdir_r_proto" in
17318 ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);'
17319 ./protochk "$extern_C $try" $hdrs && readdir_r_proto=I_TSR ;;
17321 case "$readdir_r_proto" in
17322 ''|0) try='int readdir_r(DIR*, struct dirent*);'
17323 ./protochk "$extern_C $try" $hdrs && readdir_r_proto=I_TS ;;
17325 case "$readdir_r_proto" in
17326 ''|0) d_readdir_r=undef
17328 echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
17329 * ) case "$readdir_r_proto" in
17330 REENTRANT_PROTO*) ;;
17331 *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;;
17333 echo "Prototype: $try" ;;
17336 *) case "$usethreads" in
17337 define) echo "readdir_r has no prototype, not using it." >&4 ;;
17344 *) readdir_r_proto=0
17348 : see if readv exists
17352 : see if recvmsg exists
17353 set recvmsg d_recvmsg
17356 : see if regcomp, regcmp, or re_comp exist, for regular pattern matching
17358 if set regcomp val -f d_regcomp; eval $csym; $val; then
17359 echo 'regcomp() found.' >&4
17360 d_regcomp="$define"
17363 elif set regcmp val -f d_regcmp; eval $csym; $val; then
17364 echo 'regcmp() found.' >&4
17368 elif set re_comp val -f d_re_comp; eval $csym; $val; then
17369 echo 're_comp() found, assuming re_exec() also exists.' >&4
17370 d_re_comp="$define"
17375 No regcomp(), regcmp() nor re_comp() found !! No regular pattern matching.
17382 : see if remainder exists
17383 set remainder d_remainder
17386 : see if remquo exists
17387 set remquo d_remquo
17390 : see if rename exists
17391 set rename d_rename
17394 : see if rint exists
17398 : see if rmdir exists
17402 : see if round exists
17406 : see if prototype for sbrk is available
17408 set d_sbrkproto sbrk $i_unistd unistd.h
17411 : see if scalbn exists
17412 set scalbn d_scalbn
17415 : see if select exists
17416 set select d_select
17419 : see if semctl exists
17420 set semctl d_semctl
17423 : see if semget exists
17424 set semget d_semget
17427 : see if semop exists
17431 : see how much of the 'sem*(2)' library is present.
17434 case "$d_semctl$d_semget$d_semop" in
17435 *"$undef"*) h_sem=false;;
17439 case "`ipcs 2>&1`" in
17440 "SVID messages"*"not configured"*)
17441 echo "Your $osname does not have the sem*(2) configured." >&4
17444 set semctl d_semctl
17446 set semget d_semget
17454 : we could also check for sys/ipc.h ...
17455 if $h_sem && $test `./findhdr sys/sem.h`; then
17456 echo "You have the full sem*(2) library." >&4
17459 echo "You don't have the full sem*(2) library." >&4
17465 : see whether sys/sem.h defines union semun
17467 $cat > try.c <<'END'
17468 #include <sys/types.h>
17469 #include <sys/ipc.h>
17470 #include <sys/sem.h>
17471 int main () { union semun semun; semun.buf = 0; }
17474 if eval $compile; then
17475 echo "You have union semun in <sys/sem.h>." >&4
17478 echo "You do not have union semun in <sys/sem.h>." >&4
17485 : see how to do semctl IPC_STAT
17489 $cat > tryh.h <<END
17492 # define S_IRUSR S_IREAD
17493 # define S_IWUSR S_IWRITE
17494 # define S_IXUSR S_IEXEC
17496 # define S_IRUSR 0400
17497 # define S_IWUSR 0200
17498 # define S_IXUSR 0100
17500 # define S_IRGRP (S_IRUSR>>3)
17501 # define S_IWGRP (S_IWUSR>>3)
17502 # define S_IXGRP (S_IXUSR>>3)
17503 # define S_IROTH (S_IRUSR>>6)
17504 # define S_IWOTH (S_IWUSR>>6)
17505 # define S_IXOTH (S_IXUSR>>6)
17508 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
17509 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
17510 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
17513 : see whether semctl IPC_STAT can use union semun
17514 case "$d_semctl_semun" in
17518 #include <sys/types.h>
17519 #include <sys/ipc.h>
17520 #include <sys/sem.h>
17521 #include <sys/stat.h>
17528 #$d_union_semun HAS_UNION_SEMUN
17531 #ifndef HAS_UNION_SEMUN
17534 struct semid_ds *buf;
17535 unsigned short *array;
17541 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
17542 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
17544 struct semid_ds argbuf;
17547 st = semctl(sem, 0, IPC_STAT, arg);
17551 # endif /* IPC_STAT */
17552 printf("semctl IPC_STAT failed: errno = %d\n", errno);
17554 if (semctl(sem, 0, IPC_RMID, arg) != 0)
17555 # endif /* IPC_RMID */
17556 printf("semctl IPC_RMID failed: errno = %d\n", errno);
17558 #endif /* IPC_PRIVATE && ... */
17559 printf("semget failed: errno = %d\n", errno);
17564 if eval $compile; then
17567 semun) val="$define" ;;
17575 case "$d_semctl_semun" in
17577 echo "You can use union semun for semctl IPC_STAT." >&4
17580 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
17585 : see whether semctl IPC_STAT can use struct semid_ds pointer
17586 case "$d_semctl_semid_ds" in
17589 $cat > try.c <<'END'
17590 #include <sys/types.h>
17591 #include <sys/ipc.h>
17592 #include <sys/sem.h>
17593 #include <sys/stat.h>
17602 #ifndef HAS_UNION_SEMUN
17605 struct semid_ds *buf;
17606 unsigned short *array;
17610 struct semid_ds argbuf;
17613 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
17614 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
17618 st = semctl(sem, 0, IPC_STAT, arg);
17620 printf("semid_ds\n");
17622 # endif /* IPC_STAT */
17623 printf("semctl IPC_STAT failed: errno = %d\n", errno);
17625 if (semctl(sem, 0, IPC_RMID, arg) != 0)
17626 # endif /* IPC_RMID */
17627 printf("semctl IPC_RMID failed: errno = %d\n", errno);
17629 #endif /* IPC_PRIVATE && ... */
17630 printf("semget failed: errno = %d\n", errno);
17636 if eval $compile; then
17639 semid_ds) val="$define" ;;
17643 set d_semctl_semid_ds
17647 case "$d_semctl_semid_ds" in
17649 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
17651 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
17657 # We do not have the full sem*(2) library, so assume we can not
17663 set d_semctl_semid_ds
17669 : see if sendmsg exists
17670 set sendmsg d_sendmsg
17673 : see if setegid exists
17674 set setegid d_setegid
17677 : see if seteuid exists
17678 set seteuid d_seteuid
17681 : see if setgrent exists
17682 set setgrent d_setgrent
17685 : see if setgrent_r exists
17686 set setgrent_r d_setgrent_r
17688 case "$d_setgrent_r" in
17690 hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
17691 case "$d_setgrent_r_proto:$usethreads" in
17692 ":define") d_setgrent_r_proto=define
17693 set d_setgrent_r_proto setgrent_r $hdrs
17697 case "$d_setgrent_r_proto" in
17699 case "$setgrent_r_proto" in
17700 ''|0) try='int setgrent_r(FILE**);'
17701 ./protochk "$extern_C $try" $hdrs && setgrent_r_proto=I_H ;;
17703 case "$setgrent_r_proto" in
17704 ''|0) try='void setgrent_r(FILE**);'
17705 ./protochk "$extern_C $try" $hdrs && setgrent_r_proto=V_H ;;
17707 case "$setgrent_r_proto" in
17708 ''|0) d_setgrent_r=undef
17710 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
17711 * ) case "$setgrent_r_proto" in
17712 REENTRANT_PROTO*) ;;
17713 *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;;
17715 echo "Prototype: $try" ;;
17718 *) case "$usethreads" in
17719 define) echo "setgrent_r has no prototype, not using it." >&4 ;;
17726 *) setgrent_r_proto=0
17730 : see if sethostent exists
17731 set sethostent d_sethent
17734 : see if sethostent_r exists
17735 set sethostent_r d_sethostent_r
17737 case "$d_sethostent_r" in
17739 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
17740 case "$d_sethostent_r_proto:$usethreads" in
17741 ":define") d_sethostent_r_proto=define
17742 set d_sethostent_r_proto sethostent_r $hdrs
17746 case "$d_sethostent_r_proto" in
17748 case "$sethostent_r_proto" in
17749 ''|0) try='int sethostent_r(int, struct hostent_data*);'
17750 ./protochk "$extern_C $try" $hdrs && sethostent_r_proto=I_ID ;;
17752 case "$sethostent_r_proto" in
17753 ''|0) try='void sethostent_r(int, struct hostent_data*);'
17754 ./protochk "$extern_C $try" $hdrs && sethostent_r_proto=V_ID ;;
17756 case "$sethostent_r_proto" in
17757 ''|0) d_sethostent_r=undef
17758 sethostent_r_proto=0
17759 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
17760 * ) case "$sethostent_r_proto" in
17761 REENTRANT_PROTO*) ;;
17762 *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;;
17764 echo "Prototype: $try" ;;
17767 *) case "$usethreads" in
17768 define) echo "sethostent_r has no prototype, not using it." >&4 ;;
17770 d_sethostent_r=undef
17771 sethostent_r_proto=0
17775 *) sethostent_r_proto=0
17779 : see if setitimer exists
17780 set setitimer d_setitimer
17783 : see if setlinebuf exists
17784 set setlinebuf d_setlinebuf
17787 : see if setlocale exists
17788 set setlocale d_setlocale
17791 : see if locale.h is available
17792 set locale.h i_locale
17795 : see if setlocale_r exists
17796 set setlocale_r d_setlocale_r
17798 case "$d_setlocale_r" in
17800 hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h"
17801 case "$d_setlocale_r_proto:$usethreads" in
17802 ":define") d_setlocale_r_proto=define
17803 set d_setlocale_r_proto setlocale_r $hdrs
17807 case "$d_setlocale_r_proto" in
17809 case "$setlocale_r_proto" in
17810 ''|0) try='int setlocale_r(int, const char*, char*, int);'
17811 ./protochk "$extern_C $try" $hdrs && setlocale_r_proto=I_ICBI ;;
17813 case "$setlocale_r_proto" in
17814 ''|0) d_setlocale_r=undef
17815 setlocale_r_proto=0
17816 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
17817 * ) case "$setlocale_r_proto" in
17818 REENTRANT_PROTO*) ;;
17819 *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;;
17821 echo "Prototype: $try" ;;
17824 *) case "$usethreads" in
17825 define) echo "setlocale_r has no prototype, not using it." >&4 ;;
17827 d_setlocale_r=undef
17828 setlocale_r_proto=0
17832 *) setlocale_r_proto=0
17836 : see if setnetent exists
17837 set setnetent d_setnent
17840 : see if setnetent_r exists
17841 set setnetent_r d_setnetent_r
17843 case "$d_setnetent_r" in
17845 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
17846 case "$d_setnetent_r_proto:$usethreads" in
17847 ":define") d_setnetent_r_proto=define
17848 set d_setnetent_r_proto setnetent_r $hdrs
17852 case "$d_setnetent_r_proto" in
17854 case "$setnetent_r_proto" in
17855 ''|0) try='int setnetent_r(int, struct netent_data*);'
17856 ./protochk "$extern_C $try" $hdrs && setnetent_r_proto=I_ID ;;
17858 case "$setnetent_r_proto" in
17859 ''|0) try='void setnetent_r(int, struct netent_data*);'
17860 ./protochk "$extern_C $try" $hdrs && setnetent_r_proto=V_ID ;;
17862 case "$setnetent_r_proto" in
17863 ''|0) d_setnetent_r=undef
17864 setnetent_r_proto=0
17865 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
17866 * ) case "$setnetent_r_proto" in
17867 REENTRANT_PROTO*) ;;
17868 *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;;
17870 echo "Prototype: $try" ;;
17873 *) case "$usethreads" in
17874 define) echo "setnetent_r has no prototype, not using it." >&4 ;;
17876 d_setnetent_r=undef
17877 setnetent_r_proto=0
17881 *) setnetent_r_proto=0
17885 : see if setprotoent exists
17886 set setprotoent d_setpent
17889 : see if setpgid exists
17890 set setpgid d_setpgid
17893 : see if setpgrp2 exists
17894 set setpgrp2 d_setpgrp2
17897 : see if setpriority exists
17898 set setpriority d_setprior
17901 : see if setproctitle exists
17902 set setproctitle d_setproctitle
17905 : see if setprotoent_r exists
17906 set setprotoent_r d_setprotoent_r
17908 case "$d_setprotoent_r" in
17910 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
17911 case "$d_setprotoent_r_proto:$usethreads" in
17912 ":define") d_setprotoent_r_proto=define
17913 set d_setprotoent_r_proto setprotoent_r $hdrs
17917 case "$d_setprotoent_r_proto" in
17919 case "$setprotoent_r_proto" in
17920 ''|0) try='int setprotoent_r(int, struct protoent_data*);'
17921 ./protochk "$extern_C $try" $hdrs && setprotoent_r_proto=I_ID ;;
17923 case "$setprotoent_r_proto" in
17924 ''|0) try='void setprotoent_r(int, struct protoent_data*);'
17925 ./protochk "$extern_C $try" $hdrs && setprotoent_r_proto=V_ID ;;
17927 case "$setprotoent_r_proto" in
17928 ''|0) d_setprotoent_r=undef
17929 setprotoent_r_proto=0
17930 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
17931 * ) case "$setprotoent_r_proto" in
17932 REENTRANT_PROTO*) ;;
17933 *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;;
17935 echo "Prototype: $try" ;;
17938 *) case "$usethreads" in
17939 define) echo "setprotoent_r has no prototype, not using it." >&4 ;;
17941 d_setprotoent_r=undef
17942 setprotoent_r_proto=0
17946 *) setprotoent_r_proto=0
17950 : see if setpwent exists
17951 set setpwent d_setpwent
17954 : see if setpwent_r exists
17955 set setpwent_r d_setpwent_r
17957 case "$d_setpwent_r" in
17959 hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
17960 case "$d_setpwent_r_proto:$usethreads" in
17961 ":define") d_setpwent_r_proto=define
17962 set d_setpwent_r_proto setpwent_r $hdrs
17966 case "$d_setpwent_r_proto" in
17968 case "$setpwent_r_proto" in
17969 ''|0) try='int setpwent_r(FILE**);'
17970 ./protochk "$extern_C $try" $hdrs && setpwent_r_proto=I_H ;;
17972 case "$setpwent_r_proto" in
17973 ''|0) try='void setpwent_r(FILE**);'
17974 ./protochk "$extern_C $try" $hdrs && setpwent_r_proto=V_H ;;
17976 case "$setpwent_r_proto" in
17977 ''|0) d_setpwent_r=undef
17979 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
17980 * ) case "$setpwent_r_proto" in
17981 REENTRANT_PROTO*) ;;
17982 *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;;
17984 echo "Prototype: $try" ;;
17987 *) case "$usethreads" in
17988 define) echo "setpwent_r has no prototype, not using it." >&4 ;;
17995 *) setpwent_r_proto=0
17999 : see if setregid exists
18000 set setregid d_setregid
18002 set setresgid d_setresgid
18005 : see if setreuid exists
18006 set setreuid d_setreuid
18008 set setresuid d_setresuid
18011 : see if setrgid exists
18012 set setrgid d_setrgid
18015 : see if setruid exists
18016 set setruid d_setruid
18019 : see if setservent exists
18020 set setservent d_setsent
18023 : see if setservent_r exists
18024 set setservent_r d_setservent_r
18026 case "$d_setservent_r" in
18028 hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
18029 case "$d_setservent_r_proto:$usethreads" in
18030 ":define") d_setservent_r_proto=define
18031 set d_setservent_r_proto setservent_r $hdrs
18035 case "$d_setservent_r_proto" in
18037 case "$setservent_r_proto" in
18038 ''|0) try='int setservent_r(int, struct servent_data*);'
18039 ./protochk "$extern_C $try" $hdrs && setservent_r_proto=I_ID ;;
18041 case "$setservent_r_proto" in
18042 ''|0) try='void setservent_r(int, struct servent_data*);'
18043 ./protochk "$extern_C $try" $hdrs && setservent_r_proto=V_ID ;;
18045 case "$setservent_r_proto" in
18046 ''|0) d_setservent_r=undef
18047 setservent_r_proto=0
18048 echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
18049 * ) case "$setservent_r_proto" in
18050 REENTRANT_PROTO*) ;;
18051 *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;;
18053 echo "Prototype: $try" ;;
18056 *) case "$usethreads" in
18057 define) echo "setservent_r has no prototype, not using it." >&4 ;;
18059 d_setservent_r=undef
18060 setservent_r_proto=0
18064 *) setservent_r_proto=0
18068 : see if setsid exists
18069 set setsid d_setsid
18072 : see if setvbuf exists
18073 set setvbuf d_setvbuf
18076 : see if shmctl exists
18077 set shmctl d_shmctl
18080 : see if shmget exists
18081 set shmget d_shmget
18084 : see if shmat exists
18087 : see what shmat returns
18090 $cat >shmat.c <<'END'
18091 #include <sys/shm.h>
18094 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
18099 echo "and it returns ($shmattype)." >&4
18100 : see if a prototype for shmat is available
18101 xxx=`./findhdr sys/shm.h`
18102 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
18103 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
18114 set d_shmatprototype
18117 : see if shmdt exists
18121 : see how much of the 'shm*(2)' library is present.
18124 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
18125 *"$undef"*) h_shm=false;;
18129 case "`ipcs 2>&1`" in
18130 "SVID shared memory"*"not configured"*)
18131 echo "Your $osname does not have the shm*(2) configured." >&4
18134 set shmctl d_shmctl
18136 set shmget d_shmget
18146 : we could also check for sys/ipc.h ...
18147 if $h_shm && $test `./findhdr sys/shm.h`; then
18148 echo "You have the full shm*(2) library." >&4
18151 echo "You don't have the full shm*(2) library." >&4
18157 : see if we have sigaction
18159 if set sigaction val -f d_sigaction; eval $csym; $val; then
18160 echo 'sigaction() found.' >&4
18163 #include <sys/types.h>
18164 #include <signal.h>
18165 #$i_stdlib I_STDLIB
18167 #include <stdlib.h>
18171 struct sigaction act, oact;
18173 oact.sa_handler = 0;
18174 /* so that act and oact are used */
18175 exit(act.sa_flags == 0 && oact.sa_handler == 0);
18179 if eval $compile_ok; then
18182 echo "But you don't seem to have a usable struct sigaction." >&4
18186 echo 'sigaction NOT found.' >&4
18189 set d_sigaction; eval $setvar
18192 : see what type pids are declared as in the kernel
18193 rp="What is the type of process ids on this system?"
18194 set pid_t pidtype int stdio.h sys/types.h
18197 : see what type uids are declared as in the kernel
18199 echo "Looking for the type for user ids returned by getuid()."
18200 set uid_t uidtype xxx stdio.h sys/types.h
18204 xxx=`./findhdr sys/user.h`
18205 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
18207 unsigned) dflt="$1 $2" ;;
18211 *) dflt="$uidtype";;
18214 uid_t) echo "uid_t found." ;;
18215 *) rp="What is the type for user ids returned by getuid()?"
18221 : Define hasfield_t macro for Configure internal use
18222 hasfield_t='varname=$1; struct=$2; type=$3; field=$4; shift; shift; shift; shift;
18223 while $test $# -ge 2; do
18225 $define) echo "#include <$2>";;
18229 echo "int main () { $struct foo; $type bar = foo.$field; }" >> try.c;
18231 if eval $compile; then
18240 : see what siginfo fields we have
18241 case "$d_sigaction" in
18243 echo "Checking if your siginfo_t has si_errno field...">&4
18244 set d_siginfo_si_errno siginfo_t int si_errno $d_sigaction signal.h
18247 echo "Checking if your siginfo_t has si_pid field...">&4
18248 set d_siginfo_si_pid siginfo_t $pidtype si_pid $d_sigaction signal.h
18251 echo "Checking if your siginfo_t has si_uid field...">&4
18252 set d_siginfo_si_uid siginfo_t $uidtype si_uid $d_sigaction signal.h
18255 echo "Checking if your siginfo_t has si_addr field...">&4
18256 set d_siginfo_si_addr siginfo_t "void *" si_addr $d_sigaction signal.h
18259 echo "Checking if your siginfo_t has si_status field...">&4
18260 set d_siginfo_si_status siginfo_t int si_status $d_sigaction signal.h
18263 echo "Checking if your siginfo_t has si_band field...">&4
18264 set d_siginfo_si_band siginfo_t long si_band $d_sigaction signal.h
18267 echo "Checking if your siginfo_t has si_value field...">&4
18268 set d_siginfo_si_value siginfo_t "union sigval" si_value $d_sigaction signal.h
18271 echo "Checking if your siginfo_t has si_fd field...">&4
18272 set d_siginfo_si_fd siginfo_t int si_fd $d_sigaction signal.h
18277 d_siginfo_si_errno="$undef"
18278 d_siginfo_si_pid="$undef"
18279 d_siginfo_si_uid="$undef"
18280 d_siginfo_si_addr="$undef"
18281 d_siginfo_si_status="$undef"
18282 d_siginfo_si_band="$undef"
18283 d_siginfo_si_value="$undef"
18284 d_siginfo_si_fd="$undef"
18288 : see if this is a sunmath.h system
18289 set sunmath.h i_sunmath
18292 : see if signbit exists
18293 $echo $n "Checking to see if you have signbit() available to work on $nvtype... $c" >&4
18295 #$i_sunmath I_SUNMATH
18297 #ifdef I_SUNMATH /* Solaris special math library */
18298 # include <sunmath.h>
18301 int main(int argc, char **argv)
18305 if ((signbit(x) == 0) && (signbit(y) != 0))
18313 if eval $compile; then
18314 if $run ./try; then
18318 $echo "Signbit seems to be available, but doesn't work as I expected."
18319 $echo "I won't use it." >&4
18330 : see if sigprocmask exists
18331 set sigprocmask d_sigprocmask
18334 : see if sigsetjmp exists
18336 case "$d_sigsetjmp" in
18339 #include <setjmp.h>
18340 #$i_stdlib I_STDLIB
18342 #include <stdlib.h>
18348 if (sigsetjmp(env,1))
18351 siglongjmp(env, 1);
18356 if eval $compile; then
18357 if $run ./try >/dev/null 2>&1; then
18358 echo "POSIX sigsetjmp found." >&4
18362 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
18368 echo "sigsetjmp not found." >&4
18372 *) val="$d_sigsetjmp"
18373 case "$d_sigsetjmp" in
18374 $define) echo "POSIX sigsetjmp found." >&4;;
18375 $undef) echo "sigsetjmp not found." >&4;;
18383 : see if snprintf exists
18384 set snprintf d_snprintf
18387 : see if vsnprintf exists
18388 set vsnprintf d_vsnprintf
18391 case "$d_snprintf-$d_vsnprintf" in
18394 Checking whether your snprintf() and vsnprintf() work okay...
18396 $cat >try.c <<'EOCP'
18397 /* v?snprintf testing logic courtesy of Russ Allbery.
18398 * According to C99:
18399 * - if the buffer is too short it still must be \0-terminated
18400 * - if the buffer is too short the potentially required length
18401 * must be returned and not -1
18402 * - if the buffer is NULL the potentially required length
18403 * must be returned and not -1 or core dump
18406 #include <stdarg.h>
18410 int test (char *format, ...)
18415 va_start (args, format);
18416 count = vsnprintf (buf, sizeof buf, format, args);
18423 return ((test ("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0'
18424 && snprintf (NULL, 0, "%s", "abcd") == 4) ? 0 : 1);
18428 if eval $compile; then
18431 0) echo "Your snprintf() and vsnprintf() seem to be working okay." ;;
18433 Your snprintf() and snprintf() don't seem to be working okay.
18435 d_snprintf="$undef"
18436 d_vsnprintf="$undef"
18440 echo "(I can't seem to compile the test program--assuming they don't)"
18441 d_snprintf="$undef"
18442 d_vsnprintf="$undef"
18448 : see if sockatmark exists
18449 set sockatmark d_sockatmark
18452 : see if prototype for sockatmark is available
18454 set d_sockatmarkproto sockatmark $d_socket sys/socket.h
18457 : see if socks5_init exists
18458 set socks5_init d_socks5_init
18461 : see if srand48_r exists
18462 set srand48_r d_srand48_r
18464 case "$d_srand48_r" in
18466 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
18467 case "$d_srand48_r_proto:$usethreads" in
18468 ":define") d_srand48_r_proto=define
18469 set d_srand48_r_proto srand48_r $hdrs
18473 case "$d_srand48_r_proto" in
18475 case "$srand48_r_proto" in
18476 ''|0) try='int srand48_r(long, struct drand48_data*);'
18477 ./protochk "$extern_C $try" $hdrs && srand48_r_proto=I_LS ;;
18479 case "$srand48_r_proto" in
18480 ''|0) d_srand48_r=undef
18482 echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
18483 * ) case "$srand48_r_proto" in
18484 REENTRANT_PROTO*) ;;
18485 *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;;
18487 echo "Prototype: $try" ;;
18490 *) case "$usethreads" in
18491 define) echo "srand48_r has no prototype, not using it." >&4 ;;
18498 *) srand48_r_proto=0
18502 : see if srandom_r exists
18503 set srandom_r d_srandom_r
18505 case "$d_srandom_r" in
18507 hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h"
18508 case "$d_srandom_r_proto:$usethreads" in
18509 ":define") d_srandom_r_proto=define
18510 set d_srandom_r_proto srandom_r $hdrs
18514 case "$d_srandom_r_proto" in
18516 case "$srandom_r_proto" in
18517 ''|0) try='int srandom_r(unsigned int, struct random_data*);'
18518 ./protochk "$extern_C $try" $hdrs && srandom_r_proto=I_TS ;;
18520 case "$srandom_r_proto" in
18521 ''|0) d_srandom_r=undef
18523 echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
18524 * ) case "$srandom_r_proto" in
18525 REENTRANT_PROTO*) ;;
18526 *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;;
18528 echo "Prototype: $try" ;;
18531 *) case "$usethreads" in
18532 define) echo "srandom_r has no prototype, not using it." >&4 ;;
18539 *) srandom_r_proto=0
18543 : see if prototype for setresgid is available
18545 set d_sresgproto setresgid $i_unistd unistd.h
18548 : see if prototype for setresuid is available
18550 set d_sresuproto setresuid $i_unistd unistd.h
18553 : see if stat exists
18557 : see if sys/stat.h is available
18558 set sys/stat.h i_sysstat
18561 : see if stat knows about block sizes
18563 echo "Checking to see if your struct stat has st_blocks field..." >&4
18564 set d_statblks stat st_blocks $i_sysstat sys/stat.h
18567 : see if this is a sys/vfs.h system
18568 set sys/vfs.h i_sysvfs
18571 : see if this is a sys/statfs.h system
18572 set sys/statfs.h i_sysstatfs
18575 : Check for statfs_s
18577 echo "Checking to see if your system supports struct statfs..." >&4
18578 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
18580 case "$d_statfs_s" in
18581 "$define") echo "Yes, it does." ;;
18582 *) echo "No, it doesn't." ;;
18585 : see if struct statfs knows about f_flags
18586 case "$d_statfs_s" in
18589 echo "Checking to see if your struct statfs has f_flags field..." >&4
18590 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
18594 set d_statfs_f_flags
18598 case "$d_statfs_f_flags" in
18599 "$define") echo "Yes, it does." ;;
18600 *) echo "No, it doesn't." ;;
18603 : see what flavor, if any, of static inline is supported
18605 echo "Checking to see if your system supports static inline..."
18606 $cat > try.c <<'EOCP'
18607 #include <stdlib.h>
18608 extern int f_via_a(int x);
18609 extern int f_via_b(int x);
18610 int main(int argc, char **argv)
18619 return EXIT_SUCCESS;
18622 return EXIT_FAILURE;
18626 $cat > a.c <<'EOCP'
18627 static INLINE int f(int x) {
18638 $cat > b.c <<'EOCP'
18639 extern int f(int x);
18647 # Respect a hint (or previous) value for perl_static_inline, if there is one.
18648 case "$perl_static_inline" in
18649 '') # Check the various possibilities, and break out on success.
18650 # For gcc, prefer __inline__, which will still permit
18651 # cflags.SH to add in -ansi.
18652 case "$gccversion" in
18653 '') xxx="inline __inline__ __inline _inline";;
18654 *) xxx="__inline__ inline __inline _inline";;
18656 for inline in $xxx; do
18657 set try -DINLINE=$inline a.c
18658 if eval $compile && $run ./try; then
18659 # Now make sure there is no external linkage of static
18661 set try -DINLINE=$inline -DUSE_B a.c b.c
18662 if eval $compile && $run ./try; then
18663 $echo "Your compiler supports static $inline, " >&4
18664 $echo "but it also creates an external definition," >&4
18665 $echo "so I won't use it." >&4
18668 $echo "Your compiler supports static $inline." >&4
18670 perl_static_inline="static $inline";
18674 $echo "Your compiler does NOT support static $inline." >&4
18679 *inline*) # Some variant of inline exists.
18680 echo "Keeping your $hint value of $perl_static_inline."
18683 static) # No inline capabilities
18684 echo "Keeping your $hint value of $perl_static_inline."
18687 *) # Unrecognized previous value -- blindly trust the supplied
18688 # value and hope it makes sense. Use old value for
18689 # d_static_inline, if there is one.
18690 echo "Keeping your $hint value of $perl_static_inline."
18691 case "$d_static_inline" in
18693 *) val=$d_static_inline ;;
18697 # Fallback to plain 'static' if nothing worked.
18698 case "$perl_static_inline" in
18700 perl_static_inline="static"
18704 set d_static_inline
18706 $rm -f a.[co] b.[co]
18709 : Check stream access
18711 Checking how to access stdio streams by file descriptor number...
18713 case "$stdio_stream_array" in
18714 '') $cat >try.c <<EOCP
18717 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
18721 for s in _iob __iob __sF
18723 set try -DSTDIO_STREAM_ARRAY=$s
18724 if eval $compile; then
18725 case "`$run ./try`" in
18726 yes) stdio_stream_array=$s; break ;;
18732 case "$stdio_stream_array" in
18734 I can't figure out how to access stdio streams by file descriptor number.
18736 d_stdio_stream_array="$undef"
18739 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
18741 d_stdio_stream_array="$define"
18745 : see if strcoll exists
18746 set strcoll d_strcoll
18749 : see if strerror_l exists
18750 set strerror_l d_strerror_l
18753 : see if strerror_r exists
18754 set strerror_r d_strerror_r
18756 case "$d_strerror_r" in
18758 hdrs="$i_systypes sys/types.h define stdio.h define string.h"
18759 case "$d_strerror_r_proto:$usethreads" in
18760 ":define") d_strerror_r_proto=define
18761 set d_strerror_r_proto strerror_r $hdrs
18765 case "$d_strerror_r_proto" in
18767 case "$strerror_r_proto" in
18768 ''|0) try='int strerror_r(int, char*, size_t);'
18769 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=I_IBW ;;
18771 case "$strerror_r_proto" in
18772 ''|0) try='int strerror_r(int, char*, int);'
18773 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=I_IBI ;;
18775 case "$strerror_r_proto" in
18776 ''|0) try='char* strerror_r(int, char*, size_t);'
18777 ./protochk "$extern_C $try" $hdrs && strerror_r_proto=B_IBW ;;
18779 case "$strerror_r_proto" in
18780 ''|0) d_strerror_r=undef
18782 echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
18783 * ) case "$strerror_r_proto" in
18784 REENTRANT_PROTO*) ;;
18785 *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
18787 echo "Prototype: $try" ;;
18790 *) case "$usethreads" in
18791 define) echo "strerror_r has no prototype, not using it." >&4 ;;
18798 *) strerror_r_proto=0
18802 : see if strftime exists
18803 set strftime d_strftime
18806 : see if strlcat exists
18807 : We need both a prototype in string.h and the symbol in libc.
18810 xx1="#$d_gnulibc HAS_GNULIBC"
18811 xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
18812 xx3='# define _GNU_SOURCE'
18814 set d_strlcat_proto strlcat literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
18816 case "$d_strlcat_proto" in
18817 define) # see if strlcat exists
18818 set strlcat d_strlcat
18827 : see if strlcpy exists
18828 : We need both a prototype in string.h and the symbol in libc.
18831 xx1="#$d_gnulibc HAS_GNULIBC"
18832 xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
18833 xx3='# define _GNU_SOURCE'
18835 set d_strlcpy_proto strlcpy literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
18837 case "$d_strlcpy_proto" in
18838 define) # see if strlcpy exists
18839 set strlcpy d_strlcpy
18848 : see if strnlen exists
18849 set strnlen d_strnlen
18852 : see if strtod exists
18853 set strtod d_strtod
18856 : see if strtod_l exists
18857 set strtod_l d_strtod_l
18860 : see if strtol exists
18861 set strtol d_strtol
18864 : see if strtold exists
18865 set strtold d_strtold
18868 : see if strtold_l exists
18869 set strtold_l d_strtold_l
18872 : see if strtoll exists
18873 set strtoll d_strtoll
18876 case "$d_longlong-$d_strtoll" in
18879 Checking whether your strtoll() works okay...
18881 $cat >try.c <<'EOCP'
18884 #define strtoll __strtoll
18887 #define strtoll _strtoll
18890 extern long long int strtoll(char *s, char **, int);
18891 static int bad = 0;
18892 int check(char *s, long long ell, int een) {
18895 gll = strtoll(s, 0, 10);
18896 if (!((gll == ell) && (errno == een)))
18900 check(" 1", 1LL, 0);
18901 check(" 0", 0LL, 0);
18902 check("-1", -1LL, 0);
18903 check("-9223372036854775808", -9223372036854775808LL, 0);
18904 check("-9223372036854775808", -9223372036854775808LL, 0);
18905 check(" 9223372036854775807", 9223372036854775807LL, 0);
18906 check("-9223372036854775808", -9223372036854775808LL, 0);
18907 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
18908 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
18914 if eval $compile; then
18917 ok) echo "Your strtoll() seems to be working okay." ;;
18919 Your strtoll() doesn't seem to be working okay.
18925 echo "(I can't seem to compile the test program--assuming it doesn't)"
18931 : see if strtoq exists
18932 set strtoq d_strtoq
18935 : see if strtoul exists
18936 set strtoul d_strtoul
18939 case "$d_strtoul" in
18942 Checking whether your strtoul() works okay...
18944 $cat >try.c <<'EOCP'
18947 extern unsigned long int strtoul(char *s, char **, int);
18948 static int bad = 0;
18949 void check(char *s, unsigned long eul, int een) {
18952 gul = strtoul(s, 0, 10);
18953 if (!((gul == eul) && (errno == een)))
18957 check(" 1", 1L, 0);
18958 check(" 0", 0L, 0);
18960 case "$longsize" in
18962 $cat >>try.c <<'EOCP'
18963 check("18446744073709551615", 18446744073709551615UL, 0);
18964 check("18446744073709551616", 18446744073709551615UL, ERANGE);
18965 #if 0 /* strtoul() for /^-/ strings is undefined. */
18966 check("-1", 18446744073709551615UL, 0);
18967 check("-18446744073709551614", 2, 0);
18968 check("-18446744073709551615", 1, 0);
18969 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
18970 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
18975 $cat >>try.c <<'EOCP'
18976 check("4294967295", 4294967295UL, 0);
18977 check("4294967296", 4294967295UL, ERANGE);
18978 #if 0 /* strtoul() for /^-/ strings is undefined. */
18979 check("-1", 4294967295UL, 0);
18980 check("-4294967294", 2, 0);
18981 check("-4294967295", 1, 0);
18982 check("-4294967296", 4294967295UL, ERANGE);
18983 check("-4294967297", 4294967295UL, ERANGE);
18988 : Should we write these tests to be more portable by sprintf-ing
18989 : ~0 and then manipulating that char string as input for strtol?
18992 $cat >>try.c <<'EOCP'
18999 if eval $compile; then
19000 case "`$run ./try`" in
19001 ok) echo "Your strtoul() seems to be working okay." ;;
19003 Your strtoul() doesn't seem to be working okay.
19009 echo "(I can't seem to compile the test program--assuming it doesn't)"
19015 : see if strtoull exists
19016 set strtoull d_strtoull
19019 case "$d_longlong-$d_strtoull" in
19022 Checking whether your strtoull() works okay...
19024 $cat >try.c <<'EOCP'
19027 #define strtoull __strtoull
19030 extern unsigned long long int strtoull(char *s, char **, int);
19031 static int bad = 0;
19032 int check(char *s, long long eull, int een) {
19035 gull = strtoull(s, 0, 10);
19036 if (!((gull == eull) && (errno == een)))
19040 check(" 1", 1LL, 0);
19041 check(" 0", 0LL, 0);
19042 check("18446744073709551615", 18446744073709551615ULL, 0);
19043 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
19044 #if 0 /* strtoull() for /^-/ strings is undefined. */
19045 check("-1", 18446744073709551615ULL, 0);
19046 check("-18446744073709551614", 2LL, 0);
19047 check("-18446744073709551615", 1LL, 0);
19048 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
19049 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
19056 if eval $compile; then
19057 case "`$run ./try`" in
19058 ok) echo "Your strtoull() seems to be working okay." ;;
19060 Your strtoull() doesn't seem to be working okay.
19062 d_strtoull="$undef"
19066 echo "(I can't seem to compile the test program--assuming it doesn't)"
19067 d_strtoull="$undef"
19072 : see if strtouq exists
19073 set strtouq d_strtouq
19076 case "$d_strtouq" in
19079 Checking whether your strtouq() works okay...
19081 $cat >try.c <<'EOCP'
19084 extern unsigned long long int strtouq(char *s, char **, int);
19085 static int bad = 0;
19086 void check(char *s, unsigned long long eull, int een) {
19087 unsigned long long gull;
19089 gull = strtouq(s, 0, 10);
19090 if (!((gull == eull) && (errno == een)))
19094 check(" 1", 1LL, 0);
19095 check(" 0", 0LL, 0);
19096 check("18446744073709551615", 18446744073709551615ULL, 0);
19097 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
19098 #if 0 /* strtouq() for /^-/ strings is undefined. */
19099 check("-1", 18446744073709551615ULL, 0);
19100 check("-18446744073709551614", 2LL, 0);
19101 check("-18446744073709551615", 1LL, 0);
19102 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
19103 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
19111 if eval $compile; then
19112 case "`$run ./try`" in
19113 ok) echo "Your strtouq() seems to be working okay." ;;
19115 Your strtouq() doesn't seem to be working okay.
19121 echo "(I can't seem to compile the test program--assuming it doesn't)"
19127 : see if strxfrm exists
19128 set strxfrm d_strxfrm
19131 : see if symlink exists
19132 set symlink d_symlink
19135 : see if syscall exists
19136 set syscall d_syscall
19139 : see if prototype for syscall is available
19141 set d_syscallproto syscall $i_unistd unistd.h
19144 : see if sysconf exists
19145 set sysconf d_sysconf
19148 : see if sys_errlist[] exists
19150 if test "X$d_syserrlst" = X; then
19151 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
19152 echo "You have sys_errlist[], so we could roll our own strerror."
19153 d_syserrlst="$define"
19155 echo "You don't have sys_errlist[], so strerror() is welcome."
19156 d_syserrlst="$undef"
19160 : see if system exists
19161 set system d_system
19164 : see if tcgetpgrp exists
19165 set tcgetpgrp d_tcgetpgrp
19168 : see if tcsetpgrp exists
19169 set tcsetpgrp d_tcsetpgrp
19172 : see if prototype for telldir is available
19174 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
19177 : see if tgamma exists
19178 set tgamma d_tgamma
19181 : check for thread_safe_nl_langinfo_l item
19184 Checking to see if you have nl_langinfo_l() and that it is thread-safe
19187 #$i_stdlib I_STDLIB
19189 # include <stdlib.h>
19191 #include <string.h>
19192 #$i_langinfo I_LANGINFO
19194 # include <langinfo.h>
19196 #$i_pthread I_PTHREAD
19198 # include <pthread.h>
19200 #$i_locale I_LOCALE
19202 # include <locale.h>
19206 thread_start(void * arg)
19208 nl_langinfo(RADIXCHAR);
19212 char * main_buffer;
19213 char save_main_buffer[1000];
19214 pthread_t subthread;
19215 pthread_attr_t attr;
19217 main_buffer = nl_langinfo_l(CODESET, newlocale(LC_ALL_MASK, "C", 0));
19219 /* If too large for our generous allowance, just assume we don't have
19221 if (strlen(main_buffer) >= sizeof(save_main_buffer)) {
19225 strcpy(save_main_buffer, main_buffer);
19227 if (pthread_attr_init(&attr) != 0) {
19231 if (pthread_create(&subthread, &attr, thread_start, NULL) != 0) {
19235 if (pthread_join(subthread, NULL) != 0) {
19239 exit(! (strcmp(main_buffer, save_main_buffer) == 0));
19242 case "$usethreads" in
19245 if eval $compile; then
19246 echo "Your system has nl_langinfo_l()..." >&4
19247 if $run ./try; then
19248 echo "and it is thread-safe (just as I'd hoped)." >&4
19249 d_thread_safe_nl_langinfo_l="$define"
19250 echo "$d_thread_safe_nl_langinfo_l" >&4
19252 echo "but it isn't thread-safe, so we won't use it." >&4
19255 echo "your system does not have nl_langinfo_l()" >&4
19258 *) echo "Since threads aren't selected, we won't bother looking for nl_langinfo_l()" >&4
19260 if test X"$d_thread_safe_nl_langinfo_l" = X; then
19261 d_thread_safe_nl_langinfo_l="$undef"
19265 : see if time exists
19267 if test "X$d_time" = X -o X"$timetype" = X; then
19268 if set time val -f d_time; eval $csym; $val; then
19269 echo 'time() found.' >&4
19271 rp="What is the type returned by time() on this system?"
19272 set time_t timetype long stdio.h sys/types.h
19275 echo 'time() not found, hope that will do.' >&4
19283 : see if timegm exists
19284 set timegm d_timegm
19287 : see if this is a sys/times.h system
19288 set sys/times.h i_systimes
19291 : see if times exists
19293 if set times val -f d_times; eval $csym; $val; then
19294 echo 'times() found.' >&4
19297 case "$i_systimes" in
19298 "$define") inc='sys/times.h';;
19300 rp="What is the type returned by times() on this system?"
19301 set clock_t clocktype long stdio.h sys/types.h $inc
19304 echo 'times() NOT found, hope that will do.' >&4
19309 : see if tmpnam_r exists
19310 set tmpnam_r d_tmpnam_r
19312 case "$d_tmpnam_r" in
19314 hdrs="$i_systypes sys/types.h define stdio.h "
19315 case "$d_tmpnam_r_proto:$usethreads" in
19316 ":define") d_tmpnam_r_proto=define
19317 set d_tmpnam_r_proto tmpnam_r $hdrs
19321 case "$d_tmpnam_r_proto" in
19323 case "$tmpnam_r_proto" in
19324 ''|0) try='char* tmpnam_r(char*);'
19325 ./protochk "$extern_C $try" $hdrs && tmpnam_r_proto=B_B ;;
19327 case "$tmpnam_r_proto" in
19328 ''|0) d_tmpnam_r=undef
19330 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
19331 * ) case "$tmpnam_r_proto" in
19332 REENTRANT_PROTO*) ;;
19333 *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;;
19335 echo "Prototype: $try" ;;
19338 *) case "$usethreads" in
19339 define) echo "tmpnam_r has no prototype, not using it." >&4 ;;
19346 *) tmpnam_r_proto=0
19350 : see if trunc exists
19354 : see if truncate exists
19355 set truncate d_truncate
19358 : see if ttyname_r exists
19359 set ttyname_r d_ttyname_r
19361 case "$d_ttyname_r" in
19363 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
19364 case "$d_ttyname_r_proto:$usethreads" in
19365 ":define") d_ttyname_r_proto=define
19366 set d_ttyname_r_proto ttyname_r $hdrs
19370 case "$d_ttyname_r_proto" in
19372 case "$ttyname_r_proto" in
19373 ''|0) try='int ttyname_r(int, char*, size_t);'
19374 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=I_IBW ;;
19376 case "$ttyname_r_proto" in
19377 ''|0) try='int ttyname_r(int, char*, int);'
19378 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=I_IBI ;;
19380 case "$ttyname_r_proto" in
19381 ''|0) try='char* ttyname_r(int, char*, int);'
19382 ./protochk "$extern_C $try" $hdrs && ttyname_r_proto=B_IBI ;;
19384 case "$ttyname_r_proto" in
19385 ''|0) d_ttyname_r=undef
19387 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
19388 * ) case "$ttyname_r_proto" in
19389 REENTRANT_PROTO*) ;;
19390 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
19392 echo "Prototype: $try" ;;
19395 *) case "$usethreads" in
19396 define) echo "ttyname_r has no prototype, not using it." >&4 ;;
19403 *) ttyname_r_proto=0
19407 : see if tzname[] exists
19409 if set tzname val -a d_tzname; eval $csym; $val; then
19411 echo 'tzname[] found.' >&4
19414 echo 'tzname[] NOT found.' >&4
19419 : Check if is a multiplatform env
19421 darwin) multiarch="$define" ;;
19423 case "$multiarch" in
19424 ''|[nN]*) multiarch="$undef" ;;
19427 : check for ordering of bytes in a UV
19429 case "$multiarch" in
19432 You seem to be doing a multiarchitecture build,
19433 skipping the byteorder check.
19439 case "$byteorder" in
19442 In the following, larger digits indicate more significance. A big-endian
19443 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
19444 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
19445 machines may have weird orders like 3412. A Cray will report 87654321,
19446 an Alpha will report 12345678. If the test program works the default is
19448 I'm now running the test program...
19452 #$i_stdlib I_STDLIB
19454 #include <stdlib.h>
19456 #include <sys/types.h>
19457 typedef $uvtype UV;
19467 u.l = (((UV)0x08070605) << 32) | (UV)0x04030201;
19469 u.l = (UV)0x04030201;
19470 for (i = 0; i < $uvsize; i++)
19471 printf("%c", u.c[i]+'0');
19478 if eval $compile && $run ./try > /dev/null; then
19481 [1-4][1-4][1-4][1-4]|12345678|87654321)
19482 echo "(The test program ran ok.)"
19483 echo "byteorder=$dflt"
19486 ????|????????) echo "(The test program ran ok.)" ;;
19487 *) echo "(The test program didn't run right for some reason.)" ;;
19492 (I can't seem to compile the test program. Guessing big-endian...)
19495 case "$xxx_prompt" in
19497 rp="What is the order of bytes in $uvtype?"
19510 : Checking 32bit alignedness
19513 Checking to see whether you can access character data unalignedly...
19515 case "$d_u32align" in
19516 '') $cat >try.c <<EOCP
19518 #$i_stdlib I_STDLIB
19520 #include <stdlib.h>
19522 #define U32 $u32type
19523 #define BYTEORDER 0x$byteorder
19525 #include <signal.h>
19527 $signal_t bletch(int s) { exit(4); }
19530 #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
19531 volatile U8 buf[8];
19535 if (sizeof(U32) != 4) {
19536 printf("sizeof(U32) is not 4, but %d\n", sizeof(U32));
19543 signal(SIGBUS, bletch);
19555 for (i = 0; i < 4; i++) {
19556 up = (U32*)(buf + i);
19557 if (! ((*up == 1 << (8*i)) || /* big-endian */
19558 (*up == 1 << (8*(3-i))) /* little-endian */
19562 printf("read failed (%x)\n", *up);
19568 for (i = 0; i < 4; i++) {
19569 up = (U32*)(buf + i);
19571 if (*up != 0xBeef) {
19572 printf("write failed (%x)\n", *up);
19586 if eval $compile_ok; then
19587 echo "(Testing for character data alignment may crash the test. That's okay.)" >&4
19588 $run ./try 2>&1 >/dev/null
19591 You can access character data pretty unalignedly.
19593 d_u32align="$undef"
19596 It seems that you must access character data in an aligned manner.
19598 d_u32align="$define"
19602 rp='Can you access character data at unaligned addresses?'
19606 [yY]*) d_u32align="$undef" ;;
19607 *) d_u32align="$define" ;;
19614 : see if ualarm exists
19615 set ualarm d_ualarm
19618 : see if umask exists
19622 : see if unordered exists
19623 set unordered d_unordered
19626 : see if unsetenv exists
19627 set unsetenv d_unsetenv
19630 : see if usleep exists
19631 set usleep d_usleep
19634 : see if prototype for usleep is available
19636 set d_usleepproto usleep $i_unistd unistd.h
19639 : see if ustat exists
19643 : see if closedir exists
19644 set closedir d_closedir
19647 case "$d_closedir" in
19650 echo "Checking whether closedir() returns a status..." >&4
19652 #$i_dirent I_DIRENT /**/
19653 #$i_sysdir I_SYS_DIR /**/
19654 #$i_sysndir I_SYS_NDIR /**/
19655 #$i_systypes I_SYS_TYPES /**/
19657 #if defined(I_SYS_TYPES)
19658 #include <sys/types.h>
19660 #if defined(I_DIRENT)
19661 #include <dirent.h>
19664 #include <sys/ndir.h>
19667 #include <sys/dir.h>
19671 int main() { return closedir(opendir(".")); }
19674 if eval $compile_ok; then
19675 if $run ./try > /dev/null 2>&1 ; then
19676 echo "Yes, it does."
19679 echo "No, it doesn't."
19683 echo "(I can't seem to compile the test program--assuming it doesn't)"
19691 set d_void_closedir
19695 : see if there is a wait4
19699 : see if waitpid exists
19700 set waitpid d_waitpid
19705 $cat >try.c <<'EOCP'
19711 return (wcscmp (s, s) ? 1 : 0);
19716 if eval $compile; then
19719 0) echo "A working wcscmp() found." >&4
19721 *) echo "wcscmp() found, but it doesn't work" >&4
19725 echo "wcscmp() NOT found." >&4
19731 : see if wcstombs exists
19732 set wcstombs d_wcstombs
19737 $cat >try.c <<'EOCP'
19742 wchar_t dst[4], *src = L" ";
19744 return (wcsxfrm (dst, src, 1) ? errno ? errno : 0 : 1);
19749 if eval $compile; then
19752 0) echo "A working wcsxfrm() found." >&4
19754 *) echo "wcsxfrm() found, but it doesn't work" >&4
19758 echo "wcsxfrm() NOT found." >&4
19764 : see if wctomb exists
19765 set wctomb d_wctomb
19768 : see if writev exists
19769 set writev d_writev
19772 : check for alignment requirements
19774 case "$alignbytes" in
19775 '') echo "Checking alignment constraints..." >&4
19784 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
19789 if eval $compile_ok; then
19793 echo "(I can't seem to compile the test program...)"
19795 case "$multiarch" in
19797 : The usual safe value is 8, but Darwin with -Duselongdouble
19798 : needs 16. Hence, we will take 8 as a minimum, but allow
19799 : Configure to pick a larger value if needed.
19800 if $test "$dflt" -lt 8; then
19802 echo "Setting alignment to 8 for multiarch support.">&4
19807 *) dflt="$alignbytes"
19810 rp="Doubles must be aligned on a how-many-byte boundary?"
19815 : set the base revision
19818 : length of character in bytes. Is always 1, otherwise it is not C
19819 : This used to be a test using sizeof
19822 : Check for the number of bits in a character
19823 case "$charbits" in
19824 '') echo "Checking how long a character is (in bits)..." >&4
19831 for (c = 1, n = 0; c; c <<= 1, n++) ;
19832 printf ("%d\n", n);
19837 if eval $compile_ok; then
19841 echo "(I can't seem to compile the test program. Guessing...)"
19848 rp="What is the length of a character (in bits)?"
19852 case "$charbits" in
19855 Your system has an unsigned character size of $charbits bits, which
19856 is rather unusual (normally it is 8 bits). Perl likely will not work
19857 correctly on your system, with subtle bugs in various places.
19859 rp='Do you really want to continue?'
19863 [yY]) echo >&4 "Okay, continuing." ;;
19868 : how do we concatenate cpp tokens here?
19870 echo "Checking to see how your cpp does stuff like concatenate tokens..." >&4
19871 $cat >cpp_stuff.c <<'EOCP'
19872 #define RCAT(a,b)a/**/b
19873 #define ACAT(a,b)a ## b
19877 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
19878 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
19879 echo "Oh! Smells like ANSI's been here." >&4
19880 echo "We can catify or stringify, separately or together!"
19882 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
19883 echo "Ah, yes! The good old days!" >&4
19884 echo "However, in the good old days we don't know how to stringify and"
19885 echo "catify at the same time."
19889 Hmm, I don't seem to be able to concatenate tokens with your cpp.
19890 You're going to have to edit the values of CAT[2-5] in config.h...
19892 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
19896 : see if this is a db.h system
19902 : Check db version.
19904 echo "Checking Berkeley DB version ..." >&4
19906 #include <sys/types.h>
19908 #$i_stdlib I_STDLIB
19910 #include <stdlib.h>
19913 int main(int argc, char *argv[])
19915 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
19916 int Major, Minor, Patch ;
19917 unsigned long Version ;
19918 (void)db_version(&Major, &Minor, &Patch) ;
19920 printf("%d %d %d %d %d %d\n",
19921 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
19922 Major, Minor, Patch);
19925 printf("You have Berkeley DB Version 2 or greater.\n");
19927 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
19928 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
19929 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
19930 Major, Minor, Patch) ;
19932 /* check that db.h & libdb are compatible */
19933 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
19934 printf("db.h and libdb are incompatible.\n") ;
19938 printf("db.h and libdb are compatible.\n") ;
19940 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
19941 + DB_VERSION_PATCH ;
19943 /* needs to be >= 2.3.4 */
19944 if (Version < 2003004) {
19945 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
19946 printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
19952 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
19957 printf("You have Berkeley DB Version 1.\n");
19958 exit(0); /* DB version < 2: the coast is clear. */
19960 exit(1); /* <db.h> not Berkeley DB? */
19966 if eval $compile_ok && $run ./try; then
19967 echo 'Looks OK.' >&4
19969 db_version_major=$1
19970 db_version_minor=$2
19971 db_version_patch=$3
19973 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
19977 : Remove db from list of libraries to use
19978 echo "Removing unusable -ldb from library list" >&4
19979 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
19982 echo "libs = $libs" >&4
19992 : Check the return type needed for hash
19994 echo "Checking return type needed for hash for Berkeley DB ..." >&4
19996 #include <sys/types.h>
19999 #ifndef DB_VERSION_MAJOR
20000 u_int32_t hash_cb (const void* ptr, size_t size)
20007 info.hash = hash_cb;
20011 if $cc $ccflags -c try.c >try.out 2>&1 ; then
20012 if $contains warning try.out >>/dev/null 2>&1 ; then
20015 db_hashtype='u_int32_t'
20018 : XXX Maybe we should just give up here.
20019 db_hashtype=u_int32_t
20021 echo "Help: I can't seem to compile the db test program." >&4
20022 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
20025 echo "Your version of Berkeley DB uses $db_hashtype for hash."
20027 *) db_hashtype=u_int32_t
20032 : Check the return type needed for prefix
20034 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
20036 #include <sys/types.h>
20039 #ifndef DB_VERSION_MAJOR
20040 size_t prefix_cb (const DBT *key1, const DBT *key2)
20047 info.prefix = prefix_cb;
20051 if $cc $ccflags -c try.c >try.out 2>&1 ; then
20052 if $contains warning try.out >>/dev/null 2>&1 ; then
20053 db_prefixtype='int'
20055 db_prefixtype='size_t'
20058 db_prefixtype='size_t'
20059 : XXX Maybe we should just give up here.
20061 echo "Help: I can't seem to compile the db test program." >&4
20062 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
20065 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
20067 *) db_prefixtype='size_t'
20071 : Include . in @INC
20074 Historically Perl has provided a final fallback of the current working
20075 directory '.' when searching for a library. This, however, can lead to
20076 problems when a Perl program which loads optional modules is called from
20077 a shared directory. This can lead to executing unexpected code.
20081 # When changing to exclude by default:
20082 case "$default_inc_excludes_dot" in
20083 $undef|false|[nN]*) dflt="n" ;;
20086 # To turn exclude off by default:
20087 #case "$default_inc_excludes_dot" in
20088 # $define|true|[yY]*) dflt="y" ;;
20092 rp='Exclude '.' from @INC by default? '
20095 [nN]|undef) default_inc_excludes_dot="$undef" ;;
20096 *) default_inc_excludes_dot="$define" ;;
20099 : Check what kind of inf/nan your system has
20100 $echo "Checking the kind of infinities and nans you have..." >&4
20101 $echo "(The following tests may crash. That's okay.)" >&4
20103 #define DOUBLESIZE $doublesize
20104 #$d_longdbl HAS_LONG_DOUBLE
20105 #ifdef HAS_LONG_DOUBLE
20106 #define LONG_DOUBLESIZE $longdblsize
20107 #define LONG_DOUBLEKIND $longdblkind
20110 #include <string.h>
20112 /* Note that whether the sign bit is on or off
20113 * for NaN depends on the CPU/FPU, and possibly
20114 * can be affected by the build toolchain.
20116 * For example for older MIPS and HP-PA 2.0 the quiet NaN is:
20117 * 0x7f, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
20118 * 0x7f, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
20119 * (respectively) as opposed to the more usual
20120 * 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
20122 * Pre-IEEE-754 floating point format do not even have inf/nan support
20123 * at all. They might have a "max" value (DBL_MAX), which may be deadly
20124 * to even mention, causing immediate SIGFPE or equivalent: this is
20125 * the case with VAX floating point, for example.
20127 static void bytes(void *v, unsigned int n) {
20128 unsigned char *p = (unsigned char *)v;
20130 for (i = 0; i < n; i++) {
20131 printf("0x%02x%s", p[i], i < n - 1 ? ", " : "\n");
20134 int main(int argc, char *argv[]) {
20135 /* We cannot use 1.0/0.0 and 0.0/0.0 (with L suffixes for long double)
20136 * because some compilers are 'smart' and not only warn but refuse to
20137 * compile such 'illegal' values. */
20138 double dinf = exp(1e9);
20139 double dnan = sqrt(-1.0);
20140 #ifdef HAS_LONG_DOUBLE
20141 long double ldinf = (long double)exp(1e9);
20142 long double ldnan = (long double)sqrt(-1.0);
20143 # if LONG_DOUBLEKIND == 3 || LONG_DOUBLEKIND == 4
20144 /* the 80-bit long doubles might have garbage in their excess bytes */
20145 memset((char *)&ldinf + 10, '\0', LONG_DOUBLESIZE - 10);
20146 memset((char *)&ldnan + 10, '\0', LONG_DOUBLESIZE - 10);
20149 switch (argv[1][0]) {
20150 case '1': bytes(&dinf, sizeof(dinf)); break;
20151 case '2': bytes(&dnan, sizeof(dnan)); break;
20152 case '3': bytes(&ldinf, sizeof(ldinf)); break;
20153 case '4': bytes(&ldnan, sizeof(ldnan)); break;
20161 if eval $compile; then
20162 doubleinfbytes=`$run ./try 1`
20163 doublenanbytes=`$run ./try 2`
20164 case "$d_longdbl" in
20166 longdblinfbytes=`$run ./try 3`
20167 longdblnanbytes=`$run ./try 4`
20171 # Defaults in case the above test program failed.
20172 case "$doublekind" in
20173 1) # IEEE 754 32-bit LE
20174 doubleinfbytes='0x00, 0x00, 0xf0, 0x7f'
20175 doublenanbytes='0x00, 0x00, 0xf8, 0x7f'
20177 2) # IEEE 754 32-bit BE
20178 doubleinfbytes='0x7f, 0xf0, 0x00, 0x00'
20179 doublenanbytes='0x7f, 0xf8, 0x00, 0x00'
20181 3) # IEEE 754 64-bit LE
20182 doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'
20183 doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f'
20185 4) # IEEE 754 64-bit BE
20186 doubleinfbytes='0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20187 doublenanbytes='0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20189 5) # IEEE 754 128-bit LE
20190 doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'
20191 doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f'
20193 6) # IEEE 754 128-bit BE
20194 doubleinfbytes='0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20195 doublenanbytes='0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20197 7) # IEEE 754 64-bit mixed: 32-bit LEs in BE
20198 doubleinfbytes='0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00'
20199 doublenanbytes='0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00'
20201 8) # IEEE 754 64-bit mixed: 32-bit BEs in LE
20202 doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00'
20203 doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00'
20205 9|10|11|12|13|14) # VAX/Cray/IBM floating point formats, no inf/nan.
20206 doubleinfbytes=$undef
20207 doublenanbytes=$undef
20210 doubleinfbytes=$undef
20211 doublenanbytes=$undef
20214 case "$longdblkind" in
20215 1) # IEEE 754 128-bit LE
20216 longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f'
20217 longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f'
20219 2) # IEEE 754 128-bit BE
20220 longdblinfbytes='0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20221 longdblnanbytes='0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20223 3) # IEEE 754 80-bit LE, 12 or 16 bytes (x86)
20224 case "$longdblsize" in
20225 12) # x86 32-bit (96 bits, or 4 x 32, or 12 x 8)
20226 longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00'
20227 longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00'
20230 longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20231 longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20234 longdblinfbytes=$undef
20235 longdblnanbytes=$undef
20239 4) # IEEE 754 80-bit BE, 12 or 16 bytes
20240 case "$longdblsize" in
20241 12) # 32-bit system
20242 longdblinfbytes='0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20243 longdblnanbytes='0x7f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20245 16) # 64-bit system
20246 longdblinfbytes='0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20247 longdblnanbytes='0x7f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20250 longdblinfbytes=$undef
20251 longdblnanbytes=$undef
20255 5) # 128-bit LE-LE "double double"
20256 longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'
20257 longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f'
20259 6) # 128-bit BE-BE "double double"
20260 longdblinfbytes='0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20261 longdblnanbytes='0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20263 7) # 128-bit LE-BE "double double"
20264 longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20265 longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20267 8) # 128-bit BE-LE "double double"
20268 longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20269 longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
20271 9|10|11|12|13|14) # VAX/Cray/IBM floating point formats, no inf/nan.
20272 longdblinfbytes=$undef
20273 longdblnanbytes=$undef
20276 longdblinfbytes=$undef
20277 longdblnanbytes=$undef
20281 # In case the program crashed the values are empty, turn them undef.
20282 case "$doubleinfbytes" in
20283 '') doubleinfbytes=$undef ;;
20285 case "$doublenanbytes" in
20286 '') doublenanbytes=$undef ;;
20288 case "$longdblinfbytes" in
20289 '') longdblinfbytes=$undef ;;
20291 case "$longdblnanbytes" in
20292 '') longdblnanbytes=$undef ;;
20296 : Check the length of the double mantissa
20297 $echo "Checking how many mantissa bits your doubles have..." >&4
20299 #$i_sunmath I_SUNMATH
20302 # include <sunmath.h>
20304 #ifdef DBL_MANT_DIG
20305 # define BITS (DBL_MANT_DIG - 1) /* the implicit bit does not count */
20308 int main(int argc, char *argv[]) {
20310 printf("%d\n", BITS);
20316 if eval $compile; then
20317 doublemantbits=`$run ./try`
20319 doublemantbits="$undef"
20323 : Check the length of the longdouble mantissa
20324 $echo "Checking how many mantissa bits your long doubles have..." >&4
20326 #$i_sunmath I_SUNMATH
20329 # include <sunmath.h>
20331 #$d_longdbl HAS_LONG_DOUBLE
20332 #if defined(HAS_LONG_DOUBLE) && defined(LDBL_MANT_DIG)
20333 # if ($longdblkind == 3) || ($longdblkind == 4) /* 80-bit extended precision */
20334 /* This format has no implicit bit. Beware, however, that for
20335 * this format the bare LDBL_MANT_DIG is misleading for inf/nan:
20336 * the top three bits are used for inf (100) / qnan (11x) / snan (101),
20337 * and the top bit must have been one since 387, zero is plain invalid.
20338 * For normal fp values, the LDBL_MANT_DIG is fine, though. */
20339 # define BITS LDBL_MANT_DIG
20340 # elif ($longdblkind == 5 || $longdblkind == 6 || $longdblkind == 7 || $longdblkind == 8) /* double double */
20341 /* LDBL_MANT_DIG of 106 (twice 53) would be logical, but for some
20342 * reason e.g. Irix thinks 107. But in any case, we want only
20343 * the number of real bits, the implicit bits are of no interest. */
20344 # define BITS 2 * (DBL_MANT_DIG - 1)
20346 # define BITS (LDBL_MANT_DIG - 1) /* the implicit bit does not count */
20350 int main(int argc, char *argv[]) {
20352 printf("%d\n", BITS);
20358 if eval $compile; then
20359 longdblmantbits=`$run ./try`
20361 longdblmantbits="$undef"
20365 : Check the length of the NV mantissa
20366 $echo "Checking how many mantissa bits your NVs have..." >&4
20367 if test "X$usequadmath" = "X$define"; then
20368 nvmantbits=112 # 128-1-15
20370 if test "X$nvsize" = "X$doublesize"; then
20371 nvmantbits="$doublemantbits"
20373 if test "X$nvsize" = "X$longdblsize"; then
20374 nvmantbits="$longdblmantbits"
20376 nvmantbits="$undef"
20381 : How can we generate normalized random numbers ?
20383 echo "Using our internal random number implementation..." >&4
20386 *-Dmy_rand=*|*-Dmy_srand=*)
20387 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
20388 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
20389 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
20390 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
20394 randfunc=Perl_drand48
20395 drand01="Perl_drand48()"
20396 seedfunc="Perl_drand48_init"
20400 : Probe whether dtrace builds an object, as newer Illumos requires an input
20401 : object file that uses at least one of the probes defined in the .d file
20402 case "$usedtrace" in
20404 case "$dtracexnolibs" in
20405 $define|true|[yY]*)
20406 dtracexnolibs=$define
20407 $dtrace -h -xnolibs -s ../perldtrace.d -o perldtrace.h
20410 if $dtrace -h -xnolibs -s ../perldtrace.d -o perldtrace.h 2>&1 ; then
20411 dtracexnolibs=$define
20412 echo "Your dtrace accepts -xnolibs"
20413 elif $dtrace -h -s ../perldtrace.d -o perldtrace.h 2>&1 ; then
20414 dtracexnolibs=$undef
20415 echo "Your dtrace doesn't accept -xnolibs"
20417 echo "Your dtrace doesn't work at all, try building without dtrace support" >&4
20422 dtracexnolibs=$undef
20423 $dtrace -h -s ../perldtrace.d -o perldtrace.h
20426 case $dtracexnolibs in
20427 $define) xnolibs=-xnolibs ;;
20431 case "$dtraceobject" in
20432 $define|true|[yY]*)
20433 dtraceobject=$define
20437 #include "perldtrace.h"
20439 PERL_LOADED_FILE("dummy");
20443 dtraceobject=$undef
20444 if $cc -c -o try.o $optimize $ccflags try.c \
20445 && $dtrace -G $xnolibs -s ../perldtrace.d try.o >/dev/null 2>&1; then
20446 dtraceobject=$define
20447 echo "Your dtrace builds an object file"
20450 *) dtraceobject=$undef ;;
20452 $rm_try perldtrace.o perldtrace.h
20455 : Determine if this is an EBCDIC system
20457 echo "Determining whether or not we are on an EBCDIC system..." >&4
20458 $cat >try.c <<'EOM'
20461 if ('M'==0xd4) return 0;
20468 if eval $compile_ok; then
20469 if $run ./try; then
20470 echo "You seem to speak EBCDIC." >&4
20473 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
20476 echo "I'm unable to compile the test program." >&4
20477 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
20483 : Check how to flush
20486 Checking how to flush all pending stdio output...
20488 # I only know how to find the first 32 possibly open files on SunOS.
20489 # See also hints/sunos_4_1.sh and util.c --AD
20491 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
20493 $cat >>try.c <<EOCP
20495 #$i_stdlib I_STDLIB
20497 #include <stdlib.h>
20499 #$i_unistd I_UNISTD
20501 # include <unistd.h>
20503 #$d_sysconf HAS_SYSCONF
20504 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
20505 #ifdef HAS_STDIO_STREAM_ARRAY
20506 # define STDIO_STREAM_ARRAY $stdio_stream_array
20511 p = fopen("try.out", "w");
20515 # ifdef TRY_FPRINTF
20519 #ifdef TRY_FFLUSH_NULL
20522 #ifdef TRY_FFLUSH_ALL
20524 long open_max = -1;
20525 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
20526 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
20528 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
20529 open_max = sysconf(_SC_OPEN_MAX);
20532 open_max = FOPEN_MAX;
20535 open_max = OPEN_MAX;
20544 # ifdef HAS_STDIO_STREAM_ARRAY
20545 if (open_max > 0) {
20547 for (i = 0; i < open_max; i++)
20548 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
20549 STDIO_STREAM_ARRAY[i]._file < open_max &&
20550 STDIO_STREAM_ARRAY[i]._flag)
20551 fflush(&STDIO_STREAM_ARRAY[i]);
20559 : first we have to find out how _not_ to flush
20561 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
20563 set try -DTRY_FPUTC
20564 if eval $compile; then
20565 $run ./try 2>/dev/null
20568 if $test ! -s try.out -a "X$code" = X42; then
20574 set try -DTRY_FPRINTF
20575 if eval $compile; then
20576 $run ./try 2>/dev/null
20579 if $test ! -s try.out -a "X$code" = X42; then
20580 output=-DTRY_FPRINTF
20586 : check for fflush NULL behavior
20587 case "$fflushNULL" in
20588 '') set try -DTRY_FFLUSH_NULL $output
20589 if eval $compile; then
20590 $run ./try 2>/dev/null
20593 if $test -s try.out -a "X$code" = X42; then
20594 fflushNULL="`$cat try.out`"
20596 if $test "X$code" != X42; then
20598 (If this test failed, don't worry, we'll try another method shortly.)
20603 $rm -f core try.core core.try.*
20604 case "$fflushNULL" in
20606 Your fflush(NULL) works okay for output streams.
20607 Let's see if it clobbers input pipes...
20609 # As of mid-March 2000 all versions of Solaris appear to have a stdio
20610 # bug that improperly flushes the input end of pipes. So we avoid the
20611 # autoflush on fork/system/exec support for now. :-(
20612 $cat >tryp.c <<EOCP
20615 main(int argc, char **argv)
20621 while ((i = getc(stdin)) != -1
20622 && (*bp++ = i) != '\n'
20623 && bp < &buf[1024])
20626 fprintf(stdout, "%s", buf);
20634 fflushNULL="$define"
20636 if eval $compile; then
20638 # Copy the .c file to the remote host ($to is an ssh-alike if targethost is set)
20639 if $test "X$targethost" != X; then
20642 $run "cat tryp.c | ./tryp " 2>/dev/null > tryp.out
20644 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
20646 if cmp tryp.c tryp.out >/dev/null 2>&1; then
20648 fflush(NULL) seems to behave okay with input streams.
20650 fflushNULL="$define"
20653 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
20655 fflushNULL="$undef"
20658 $rm -f core tryp.c tryp.core core.tryp.*
20661 Your fflush(NULL) isn't working (contrary to ANSI C).
20663 fflushNULL="$undef"
20666 Cannot figure out whether your fflush(NULL) works or not.
20667 I'm assuming it doesn't (contrary to ANSI C).
20669 fflushNULL="$undef"
20673 $define|true|[yY]*)
20674 fflushNULL="$define"
20677 fflushNULL="$undef"
20680 : check explicit looping only if NULL did not work, and if the pipe
20681 : bug does not show up on an explicit flush too
20682 case "$fflushNULL" in
20684 $cat >tryp.c <<EOCP
20687 main(int argc, char **argv)
20693 while ((i = getc(stdin)) != -1
20694 && (*bp++ = i) != '\n'
20695 && bp < &buf[1024])
20698 fprintf(stdout, "%s", buf);
20707 if eval $compile; then
20709 if $test "X$targethost" != X; then
20712 $run "cat tryp.c | ./tryp " 2>/dev/null > tryp.out
20714 $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
20716 if cmp tryp.c tryp.out >/dev/null 2>&1; then
20718 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
20720 : now check for fflushall behaviour
20721 case "$fflushall" in
20722 '') set try -DTRY_FFLUSH_ALL $output
20723 if eval $compile; then
20725 (Now testing the other method--but note that this also may fail.)
20727 $run ./try 2>/dev/null
20730 if $test -s try.out -a "X$code" = X42; then
20731 fflushall="`$cat try.out`"
20735 case "$fflushall" in
20737 Whew. Flushing explicitly all the stdio streams works.
20739 fflushall="$define"
20742 Sigh. Flushing explicitly all the stdio streams doesn't work.
20747 Cannot figure out whether flushing stdio streams explicitly works or not.
20748 I'm assuming it doesn't.
20754 "$define"|true|[yY]*)
20755 fflushall="$define"
20763 All is futile. Even fflush(stdin) clobbers input pipes!
20770 $rm -f core tryp.c tryp.core core.tryp.*
20772 *) fflushall="$undef"
20776 case "$fflushNULL$fflushall" in
20779 OK, I give up. I cannot figure out how to flush pending stdio output.
20780 We won't be flushing handles at all before fork/exec/popen.
20786 : Store the full pathname to the ar program for use in the C program
20787 : Respect a hint or command line value for full_ar.
20792 : Store the full pathname to the sed program for use in the C program
20795 : see what type gids are declared as in the kernel
20797 echo "Looking for the type for group ids returned by getgid()."
20798 set gid_t gidtype xxx stdio.h sys/types.h
20802 xxx=`./findhdr sys/user.h`
20803 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
20805 unsigned) dflt="$1 $2" ;;
20809 *) dflt="$gidtype";;
20812 gid_t) echo "gid_t found." ;;
20813 *) rp="What is the type for group ids returned by getgid()?"
20819 : Check the size of GID
20822 *_t) zzz="$gidtype" ;;
20825 echo "Checking the size of $zzz..." >&4
20827 #include <sys/types.h>
20829 #$i_stdlib I_STDLIB
20831 #include <stdlib.h>
20834 printf("%d\n", (int)sizeof($gidtype));
20839 if eval $compile_ok; then
20843 echo "(I can't execute the test program--guessing $gidsize.)" >&4
20846 echo "Your $zzz is $gidsize bytes long."
20851 echo "(I can't compile the test program--guessing $gidsize.)" >&4
20854 : Check if GID is signed
20857 *_t) zzz="$gidtype" ;;
20860 echo "Checking the sign of $zzz..." >&4
20862 #include <sys/types.h>
20873 if eval $compile; then
20877 echo "(I can't execute the test program--guessing unsigned.)" >&4
20881 1) echo "Your $zzz is unsigned." ;;
20882 -1) echo "Your $zzz is signed." ;;
20888 echo "(I can't compile the test program--guessing unsigned.)" >&4
20891 : Check 64bit sizes
20894 if $test X"$quadtype" != X; then
20896 echo "Checking how to print 64-bit integers..." >&4
20898 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
20899 $cat >try.c <<'EOCP'
20900 #include <sys/types.h>
20903 int q = 12345678901;
20904 printf("%ld\n", q);
20908 if eval $compile; then
20912 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
20913 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
20914 echo "We will use %d."
20920 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
20921 $cat >try.c <<'EOCP'
20922 #include <sys/types.h>
20925 long q = 12345678901;
20926 printf("%ld\n", q);
20930 if eval $compile; then
20934 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
20935 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
20936 echo "We will use %ld."
20942 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
20943 $cat >try.c <<'EOCP'
20944 #include <sys/types.h>
20945 #include <inttypes.h>
20948 int64_t q = 12345678901;
20949 printf("%" PRId64 "\n", q);
20953 if eval $compile; then
20957 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
20958 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
20959 echo "We will use the C9X style."
20965 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
20967 #include <sys/types.h>
20970 $quadtype q = 12345678901;
20971 printf("%Ld\n", q);
20975 if eval $compile; then
20979 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
20980 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
20981 echo "We will use %Ld."
20987 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
20988 $cat >try.c <<'EOCP'
20989 #include <sys/types.h>
20992 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
20993 printf("%lld\n", q);
20997 if eval $compile; then
21001 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
21002 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
21003 echo "We will use the %lld style."
21009 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
21011 #include <sys/types.h>
21014 $quadtype q = 12345678901;
21015 printf("%qd\n", q);
21019 if eval $compile; then
21023 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
21024 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
21025 echo "We will use %qd."
21031 if $test X"$sPRId64" = X; then
21032 echo "Cannot figure out how to print 64-bit integers." >&4
21039 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
21040 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
21042 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
21043 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
21047 : Check format strings for internal types
21049 $echo "Checking the format strings to be used for Perl's internal types..." >&4
21051 if $test X"$ivsize" = X8; then
21052 ivdformat="$sPRId64"
21053 uvuformat="$sPRIu64"
21054 uvoformat="$sPRIo64"
21055 uvxformat="$sPRIx64"
21056 uvXUformat="$sPRIXU64"
21058 if $test X"$ivsize" = X"$longsize"; then
21065 if $test X"$ivsize" = X"$intsize"; then
21073 if $test X"$ivsize" = X"$shortsize"; then
21084 if $test X"$usequadmath" = X"$define"; then
21092 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
21093 nveformat="$sPRIeldbl"
21094 nvfformat="$sPRIfldbl"
21095 nvgformat="$sPRIgldbl"
21096 nvEUformat="$sPRIEUldbl"
21097 nvFUformat="$sPRIFUldbl"
21098 nvGUformat="$sPRIGUldbl"
21109 case "$ivdformat" in
21110 '') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
21115 : Check format string for GID
21118 $echo "Checking the format string to be used for gids..." >&4
21121 -1) if $test X"$gidsize" = X"$ivsize"; then
21122 gidformat="$ivdformat"
21124 if $test X"$gidsize" = X"$longsize"; then
21127 if $test X"$gidsize" = X"$intsize"; then
21130 if $test X"$gidsize" = X"$shortsize"; then
21137 *) if $test X"$gidsize" = X"$uvsize"; then
21138 gidformat="$uvuformat"
21140 if $test X"$gidsize" = X"$longsize"; then
21143 if $test X"$gidsize" = X"$intsize"; then
21146 if $test X"$gidsize" = X"$shortsize"; then
21155 : see if getgroups exists
21156 set getgroups d_getgrps
21159 : see if setgroups exists
21160 set setgroups d_setgrps
21163 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
21165 case "$d_getgrps$d_setgrps" in
21167 case "$groupstype" in
21168 '') dflt="$gidtype" ;;
21169 *) dflt="$groupstype" ;;
21172 What type of pointer is the second argument to getgroups() and setgroups()?
21173 Usually this is the same as group ids, $gidtype, but not always.
21176 rp='What type pointer is the second argument to getgroups() and setgroups()?'
21180 *) groupstype="$gidtype";;
21183 : check whether make sets MAKE
21185 echo "Checking if your $make program sets \$(MAKE)..." >&4
21186 case "$make_set_make" in
21188 $sed 's/^X //' > testmake.mak << 'EOF'
21190 X @echo 'maketemp="$(MAKE)"'
21192 case "`$make -f testmake.mak 2>/dev/null`" in
21193 *maketemp=*) make_set_make='#' ;;
21194 *) make_set_make="MAKE=$make" ;;
21196 $rm -f testmake.mak
21199 case "$make_set_make" in
21200 '#') echo "Yup, it does.";;
21201 *) echo "Nope, it doesn't.";;
21204 : see what type is used for mode_t
21205 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
21206 set mode_t modetype int stdio.h sys/types.h
21209 : see if we need va_copy
21212 #include <stdarg.h>
21214 #include <stdlib.h>
21215 #include <signal.h>
21218 ivfprintf(FILE *f, const char *fmt, va_list *valp)
21220 return vfprintf(f, fmt, *valp);
21224 myvfprintf(FILE *f, const char *fmt, va_list val)
21226 return ivfprintf(f, fmt, &val);
21230 myprintf(char *fmt, ...)
21233 va_start(val, fmt);
21234 return myvfprintf(stdout, fmt, val);
21238 main(int ac, char **av)
21240 signal(SIGSEGV, exit);
21242 myprintf("%s%cs all right, then\n", "that", '\'');
21247 if eval $compile && $run ./try 2>&1 >/dev/null; then
21248 case "`$run ./try`" in
21249 "that's all right, then")
21255 yes) echo "It seems that you don't need va_copy()." >&4
21256 need_va_copy="$undef"
21258 *) echo "It seems that va_copy() or similar will be needed." >&4
21259 need_va_copy="$define"
21264 : see what type is used for size_t
21265 rp="What is the type used for the length parameter for string functions?"
21266 set size_t sizetype 'unsigned int' stdio.h sys/types.h
21269 : check for type of arguments to gethostbyaddr.
21270 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
21271 case "$d_gethbyaddr" in
21275 Checking to see what type of arguments are accepted by gethostbyaddr().
21277 hdrs="$define sys/types.h
21278 $d_socket sys/socket.h
21279 $i_niin netinet/in.h
21281 $i_unistd unistd.h"
21282 : The first arg can 'char *' or 'void *'
21283 : The second arg is some of integral type
21284 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
21285 for yyy in size_t long int; do
21286 case "$netdb_host_type" in
21287 '') try="$extern_C struct hostent *gethostbyaddr($xxx, $yyy, int);"
21288 if ./protochk "$try" $hdrs; then
21289 echo "Your system accepts $xxx for the first arg."
21290 echo "...and $yyy for the second arg."
21291 netdb_host_type="$xxx"
21292 netdb_hlen_type="$yyy"
21298 : In case none of those worked, prompt the user.
21299 case "$netdb_host_type" in
21300 '') rp='What is the type for the 1st argument to gethostbyaddr?'
21303 netdb_host_type=$ans
21304 rp='What is the type for the 2nd argument to gethostbyaddr?'
21307 netdb_hlen_type=$ans
21311 *) : no gethostbyaddr, so pick harmless defaults
21312 netdb_host_type='char *'
21313 netdb_hlen_type="$sizetype"
21316 # Remove the "const" if needed. -- but then we'll have a
21318 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
21321 : check for type of argument to gethostbyname.
21322 if test "X$netdb_name_type" = X ; then
21323 case "$d_gethbyname" in
21327 Checking to see what type of argument is accepted by gethostbyname().
21329 hdrs="$define sys/types.h
21330 $d_socket sys/socket.h
21331 $i_niin netinet/in.h
21333 $i_unistd unistd.h"
21334 for xxx in "const char *" "char *"; do
21335 case "$netdb_name_type" in
21336 '') try="$extern_C struct hostent *gethostbyname($xxx);"
21337 if ./protochk "$try" $hdrs; then
21338 echo "Your system accepts $xxx."
21339 netdb_name_type="$xxx"
21344 : In case none of those worked, prompt the user.
21345 case "$netdb_name_type" in
21346 '') rp='What is the type for the 1st argument to gethostbyname?'
21349 netdb_name_type=$ans
21353 *) : no gethostbyname, so pick harmless default
21354 netdb_name_type='char *'
21359 : check for type of 1st argument to getnetbyaddr.
21360 if test "X$netdb_net_type" = X ; then
21361 case "$d_getnbyaddr" in
21365 Checking to see what type of 1st argument is accepted by getnetbyaddr().
21367 hdrs="$define sys/types.h
21368 $d_socket sys/socket.h
21369 $i_niin netinet/in.h
21371 $i_unistd unistd.h"
21372 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
21373 case "$netdb_net_type" in
21374 '') try="$extern_C struct netent *getnetbyaddr($xxx, int);"
21375 if ./protochk "$try" $hdrs; then
21376 echo "Your system accepts $xxx."
21377 netdb_net_type="$xxx"
21382 : In case none of those worked, prompt the user.
21383 case "$netdb_net_type" in
21384 '') rp='What is the type for the 1st argument to getnetbyaddr?'
21387 netdb_net_type=$ans
21391 *) : no getnetbyaddr, so pick harmless default
21392 netdb_net_type='long'
21396 : locate the preferred pager for this system
21403 [a-zA-Z]:/*) dflt=$pg;;
21407 [a-zA-Z]:/*) dflt=$more;;
21411 [a-zA-Z]:/*) dflt=$less;;
21414 '') dflt=/usr/ucb/more;;
21422 rp='What pager is used on your system?'
21426 : see if ar generates random libraries by itself
21428 echo "Checking how to generate random libraries on your machine..." >&4
21429 echo 'int bar1() { return bar2(); }' > bar1.c
21430 echo 'int bar2() { return 2; }' > bar2.c
21432 #$i_stdlib I_STDLIB
21434 #include <stdlib.h>
21436 int main() { printf("%d\n", bar1()); exit(0); }
21438 $cc $ccflags -c bar1.c >/dev/null 2>&1
21439 $cc $ccflags -c bar2.c >/dev/null 2>&1
21440 $cc $ccflags -c foo.c >/dev/null 2>&1
21441 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
21442 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
21443 $run ./foobar >/dev/null 2>&1; then
21444 echo "$ar appears to generate random libraries itself."
21446 if [ "X$ranlib" = "X" ]; then
21449 elif $ar s bar$_a >/dev/null 2>&1 &&
21450 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
21451 $run ./foobar >/dev/null 2>&1; then
21452 echo "a table of contents needs to be added with '$ar s'."
21455 elif $ar ts bar$_a >/dev/null 2>&1 &&
21456 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
21457 $run ./foobar >/dev/null 2>&1; then
21458 echo "a table of contents needs to be added with '$ar ts'."
21465 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
21466 $test -f $ranlib || ranlib=''
21469 if $test -n "$ranlib"; then
21470 echo "your system has '$ranlib'; we'll use that."
21473 echo "your system doesn't seem to support random libraries"
21474 echo "so we'll use lorder and tsort to order the libraries."
21481 : Check the max offset that gmtime and localtime accept
21482 echo "Checking max offsets that gmtime () accepts"
21484 case "$sGMTIME_min/$sGMTIME_max" in
21487 #include <sys/types.h>
21495 void gm_check (time_t t, int min_year, int max_year)
21498 if ( tmp == NULL ||
21499 /* Check tm_year overflow */
21500 tmp->tm_year < min_year || tmp->tm_year > max_year)
21511 gm_check (MAXLONG, 69, 0x7fffffff);
21513 if (tmp == NULL || tmp->tm_year < 0) {
21514 for (i = 63; i >= 0; i--) {
21515 time_t x = pt | ((time_t)1 << i);
21516 if (x < 0 || x < pt) continue;
21517 gm_check (x, 69, 0x7fffffff);
21520 printf ("sGMTIME_max=%ld\n", pt);
21529 gm_check (MINLONG, -1900, 70);
21532 for (i = 36; i >= 0; i--) {
21533 time_t x = pt - ((time_t)1 << i);
21534 if (x > 0) continue;
21535 gm_check (x, -1900, 70);
21538 printf ("sGMTIME_min=%ld\n", pt);
21542 int main (int argc, char *argv[])
21544 /* fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t)); */
21551 if eval $compile; then
21552 eval `$run ./try 2>/dev/null`
21554 echo "Cannot determine sGMTIME_max and sGMTIME_min." >&4
21560 echo "Checking max offsets that localtime () accepts"
21562 case "$sLOCALTIME_min/$sLOCALTIME_max" in
21565 #include <sys/types.h>
21573 void local_check (time_t t, int min_year, int max_year)
21575 if (sizeof (time_t) > 4 && t > 0x7ffffffffffff000LL)
21578 tmp = localtime (&t);
21579 if ( tmp == NULL ||
21580 /* Check tm_year overflow */
21581 tmp->tm_year < min_year || tmp->tm_year > max_year)
21585 } /* local_check */
21592 local_check (MAXLONG, 69, 0x7fffffff);
21594 if (tmp == NULL || tmp->tm_year < 0) {
21595 for (i = 63; i >= 0; i--) {
21596 time_t x = pt | ((time_t)1 << i);
21597 if (x < 0 || x < pt) continue;
21598 local_check (x, 69, 0x7fffffff);
21601 printf ("sLOCALTIME_max=%ld\n", pt);
21610 local_check (MINLONG, -1900, 70);
21613 for (i = 36; i >= 0; i--) {
21614 time_t x = pt - ((time_t)1 << i);
21615 if (x > 0) continue;
21616 local_check (x, -1900, 70);
21619 printf ("sLOCALTIME_min=%ld\n", pt);
21623 int main (int argc, char *argv[])
21631 if eval $compile; then
21632 eval `$run ./try 2>/dev/null`
21634 echo "Cannot determine sLOCALTIME_max and sLOCALTIME_min." >&4
21640 : check for type of arguments to select.
21641 case "$selecttype" in
21642 '') case "$d_select" in
21646 Checking to see what type of arguments are accepted by select().
21648 hdrs="$define sys/types.h
21649 $i_systime sys/time.h
21650 $i_sysselct sys/select.h
21651 $d_socket sys/socket.h"
21652 : The first arg can be int, unsigned, or size_t
21653 : The last arg may or may not be 'const'
21655 : void pointer has been seen but using that
21656 : breaks the selectminbits test
21657 for xxx in 'fd_set *' 'int *'; do
21658 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
21659 for tmo in 'struct timeval *' 'const struct timeval *'; do
21661 '') try="$extern_C select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
21662 if ./protochk "$try" $hdrs; then
21663 echo "Your system accepts $xxx."
21672 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
21673 case "$d_fd_set" in
21674 $define) dflt="fd_set *" ;;
21683 *) : no select, so pick a harmless default
21690 : check for the select 'width'
21691 case "$selectminbits" in
21692 '') safebits=`expr $ptrsize \* 8`
21693 case "$d_select" in
21697 Checking to see on how many bits at a time your select() operates...
21700 #include <sys/types.h>
21702 #$i_systime I_SYS_TIME
21703 #$i_systimek I_SYS_TIME_KERNEL
21708 # ifdef I_SYS_TIME_KERNEL
21711 # include <sys/time.h>
21712 # ifdef I_SYS_TIME_KERNEL
21716 #$i_sysselct I_SYS_SELECT
21717 #ifdef I_SYS_SELECT
21718 #include <sys/select.h>
21720 #$d_socket HAS_SOCKET
21722 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
21725 #$i_stdlib I_STDLIB
21727 #include <stdlib.h>
21730 #define S sizeof(*(b))
21732 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
21733 #define NBITS (NBYTES * 8)
21735 char *s = (char *)malloc(NBYTES);
21744 fp = fopen("try.c", "r");
21750 b = ($selecttype)s;
21751 for (i = 0; i < NBITS; i++)
21755 select(fd + 1, b, 0, 0, &t);
21756 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
21758 printf("%d\n", i + 1);
21763 if eval $compile_ok; then
21764 selectminbits=`$run ./try 2>/dev/null`
21765 case "$selectminbits" in
21767 Cannot figure out on how many bits at a time your select() operates.
21768 I'll play safe and guess it is $safebits bits.
21770 selectminbits=$safebits
21771 bits="$safebits bits"
21774 *) bits="$selectminbits bits" ;;
21776 echo "Your select() operates on $bits at a time." >&4
21778 rp='What is the minimum number of bits your select() operates on?'
21779 case "$byteorder" in
21780 12345678) dflt=64 ;;
21786 selectminbits="$val"
21790 *) : no select, so pick a harmless default
21791 selectminbits=$safebits
21797 : Trace out the files included by signal.h, then look for SIGxxx names.
21798 case "$sig_num_init" in
21800 if [ "X$fieldn" = X ]; then
21801 : Just make some guesses. We check them later.
21802 xxx="$sysroot/usr/include/signal.h $sysroot/usr/include/sys/signal.h"
21804 xxx=`echo '#include <signal.h>' |
21805 $cppstdin $cppminus $cppflags 2>/dev/null |
21806 $grep '^[ ]*#.*include' |
21807 $awk "{print \\$$fieldn}" | $sed 's!"!!g' |\
21808 $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
21811 for xx in $xxx /dev/null ; do
21812 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
21814 case "$xxxfiles" in
21815 '') xxxfiles=`./findhdr signal.h` ;;
21818 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
21819 print substr($2, 4, 20)
21821 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
21822 print substr($3, 4, 20)
21824 : Append some common names just in case the awk scan failed.
21825 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
21826 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
21827 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
21828 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
21829 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
21831 : generate a few handy files for later
21832 $cat > signal.c <<EOCP
21833 #include <sys/types.h>
21834 #include <signal.h>
21835 #$i_stdlib I_STDLIB
21837 #include <stdlib.h>
21842 /* Strange style to avoid deeply-nested #if/#else/#endif */
21845 # define NSIG (_NSIG)
21851 # define NSIG (SIGMAX+1)
21857 # define NSIG (SIG_MAX+1)
21863 # define NSIG (_SIG_MAX+1)
21869 # define NSIG (MAXSIG+1)
21875 # define NSIG (MAX_SIG+1)
21880 # ifdef SIGARRAYSIZE
21881 # define NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */
21887 # define NSIG (_sys_nsig) /* Solaris 2.5 */
21891 /* Default to some arbitrary number that's big enough to get most
21892 of the common signals.
21898 printf("NSIG %d\n", NSIG);
21904 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
21906 printf "#ifdef SIG"; printf $1; printf "\n"
21907 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
21908 printf $1; printf ");\n"
21912 printf "#endif /* JUST_NSIG */\n";
21913 printf "exit(0);\n}\n";
21916 $cat >signal.awk <<'EOP'
21917 BEGIN { ndups = 0 }
21918 $1 ~ /^NSIG$/ { nsig = $2 }
21919 ($1 !~ /^NSIG$/) && (NF == 2) && ($2 ~ /^[0-9][0-9]*$/) {
21920 if ($2 > maxsig) { maxsig = $2 }
21921 if (sig_name[$2]) {
21922 dup_name[ndups] = $1
21923 dup_num[ndups] = $2
21935 printf("NSIG %d\n", nsig);
21936 for (n = 1; n < nsig; n++) {
21938 printf("%s %d\n", sig_name[n], sig_num[n])
21941 printf("NUM%d %d\n", n, n)
21944 for (n = 0; n < ndups; n++) {
21945 printf("%s %d\n", dup_name[n], dup_num[n])
21949 $cat >signal_cmd <<EOS
21951 if $test -s signal.lst; then
21952 echo "Using your existing signal.lst file"
21957 $cat >>signal_cmd <<'EOS'
21960 if eval $compile_ok; then
21961 $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) |\
21962 $uniq | $awk -f signal.awk >signal.lst
21964 echo "(I can't seem be able to compile the whole test program)" >&4
21965 echo "(I'll try it in little pieces.)" >&4
21966 set signal -DJUST_NSIG
21967 if eval $compile_ok; then
21968 $run ./signal$_exe > signal.nsg
21971 echo "I can't seem to figure out how many signals you have." >&4
21972 echo "Guessing 50." >&4
21973 echo 'NSIG 50' > signal.nsg
21975 : Now look at all the signal names, one at a time.
21976 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
21977 $cat > signal.c <<EOCP
21978 #include <sys/types.h>
21979 #include <signal.h>
21982 printf("$xx %d\n", SIG${xx});
21987 if eval $compile; then
21988 echo "SIG${xx} found."
21989 $run ./signal$_exe >> signal.ls1
21991 echo "SIG${xx} NOT found."
21994 if $test -s signal.ls1; then
21995 $cat signal.nsg signal.ls1 |
21996 $sort -n | $uniq | $awk -f signal.awk >signal.lst
22000 if $test -s signal.lst; then
22003 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
22004 echo 'kill -l' >signal
22005 set X `csh -f <signal`
22009 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
22011 echo $@ | $tr ' ' $trnl | \
22012 $awk '{ printf "%s %d\n", $1, ++s; }
22013 END { printf "NSIG %d\n", ++s }' >signal.lst
22015 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
22017 chmod a+x signal_cmd
22018 $eunicefix signal_cmd
22022 : generate list of signal names
22023 case "$sig_num_init" in
22026 case "$sig_name_init" in
22028 *) case "$sig_num_init" in
22029 ''|*,*) doinit=yes ;;
22034 echo "Generating a list of signal names and numbers..." >&4
22036 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
22037 sig_name=`$awk 'BEGIN { printf "ZERO " }
22038 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
22039 sig_num=`$awk 'BEGIN { printf "0 " }
22040 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
22041 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
22042 !/^NSIG/ { printf "\"%s\", ", $1 }
22043 END { printf "0\n" }' signal.lst`
22044 sig_num_init=`$awk 'BEGIN { printf "0, " }
22045 !/^NSIG/ { printf "%d, ", $2}
22046 END { printf "0\n"}' signal.lst`
22049 echo "The following $sig_count signals are available:"
22051 echo $sig_name | $awk \
22052 'BEGIN { linelen = 0 }
22054 for (i = 1; i <= NF; i++) {
22055 name = "SIG" $i " "
22056 linelen = linelen + length(name)
22057 if (linelen > 70) {
22059 linelen = length(name)
22065 sig_size=`echo $sig_name | awk '{print NF}'`
22066 $rm -f signal signal.c signal.awk signal.lst signal_cmd
22070 : Check size of size
22072 case "$sizetype" in
22073 *_t) zzz="$sizetype" ;;
22074 *) zzz="filesize" ;;
22076 echo "Checking the size of $zzz..." >&4
22078 #include <sys/types.h>
22080 #$i_stdlib I_STDLIB
22082 #include <stdlib.h>
22085 printf("%d\n", (int)sizeof($sizetype));
22090 if eval $compile_ok; then
22094 echo "(I can't execute the test program--guessing $sizesize.)" >&4
22097 echo "Your $zzz size is $sizesize bytes."
22102 echo "(I can't compile the test program--guessing $sizesize.)" >&4
22105 : check for socklen_t
22107 echo "Checking to see if you have socklen_t..." >&4
22109 #include <sys/types.h>
22110 #$d_socket HAS_SOCKET
22112 #include <sys/socket.h>
22114 int main() { socklen_t x = 16; }
22117 if eval $compile; then
22119 echo "You have socklen_t."
22122 echo "You do not have socklen_t."
22123 case "$sizetype" in
22124 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
22131 : see if this is a socks.h system
22132 set socks.h i_socks
22135 : check for type of the size argument to socket calls
22136 case "$d_socket" in
22140 Checking to see what type is the last argument of accept().
22143 case "$d_socklen_t" in
22144 "$define") yyy="$yyy socklen_t"
22146 yyy="$yyy $sizetype int long unsigned"
22147 for xxx in $yyy; do
22148 case "$socksizetype" in
22149 '') try="$extern_C int accept(int, struct sockaddr *, $xxx *);"
22150 case "$usesocks" in
22152 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
22153 echo "Your system accepts '$xxx *' for the last argument of accept()."
22154 socksizetype="$xxx"
22157 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
22158 echo "Your system accepts '$xxx *' for the last argument of accept()."
22159 socksizetype="$xxx"
22166 : In case none of those worked, prompt the user.
22167 case "$socksizetype" in
22168 '') rp='What is the type for socket address structure sizes?'
22175 *) : no sockets, so pick relatively harmless default
22180 : see what type is used for signed size_t
22181 set ssize_t ssizetype int stdio.h sys/types.h
22186 #$i_stdlib I_STDLIB
22188 #include <stdlib.h>
22190 #include <sys/types.h>
22191 #define Size_t $sizetype
22192 #define SSize_t $dflt
22195 if (sizeof(Size_t) == sizeof(SSize_t))
22197 else if (sizeof(Size_t) == sizeof(int))
22206 if eval $compile_ok && $run ./try > /dev/null; then
22207 ssizetype=`$run ./try`
22208 echo "I'll be using $ssizetype for functions returning a byte count." >&4
22211 Help! I can't compile and run the ssize_t test program: please enlighten me!
22212 (This is probably a misconfiguration in your system or libraries, and
22213 you really ought to fix it. Still, I'll try anyway.)
22215 I need a type that is the same size as $sizetype, but is guaranteed to
22216 be signed. Common values are ssize_t, int and long.
22219 rp="What signed type is the same size as $sizetype?"
22225 : Check the size of st_ino
22227 $echo "Checking the size of st_ino..." >&4
22228 $cat > try.c <<EOCP
22229 #include <sys/stat.h>
22231 #$i_stdlib I_STDLIB
22233 #include <stdlib.h>
22237 printf("%d\n", (int)sizeof(st.st_ino));
22242 if eval $compile_ok; then
22246 $echo "(I can't execute the test program--guessing $st_ino_size.)" >&4
22248 *) st_ino_size=$val
22249 $echo "Your st_ino is $st_ino_size bytes long."
22254 $echo "(I can't compile the test program--guessing $st_ino_size.)" >&4
22258 : Check if st_ino is signed
22260 $echo "Checking the sign of st_ino..." >&4
22261 $cat > try.c <<EOCP
22262 #include <sys/stat.h>
22267 if (foo.st_ino < 0)
22274 if eval $compile; then
22278 $echo "(I can't execute the test program--guessing unsigned.)" >&4
22280 *) st_ino_sign=$val
22281 case "$st_ino_sign" in
22282 1) $echo "Your st_ino is unsigned." ;;
22283 -1) $echo "Your st_ino is signed." ;;
22289 $echo "(I can't compile the test program--guessing unsigned.)" >&4
22293 : see what type of char stdio uses.
22295 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
22296 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
22297 echo "Your stdio uses unsigned chars." >&4
22298 stdchar="unsigned char"
22300 echo "Your stdio uses signed chars." >&4
22305 : Check size of UID
22308 *_t) zzz="$uidtype" ;;
22311 echo "Checking the size of $zzz..." >&4
22313 #include <sys/types.h>
22315 #$i_stdlib I_STDLIB
22317 #include <stdlib.h>
22320 printf("%d\n", (int)sizeof($uidtype));
22325 if eval $compile_ok; then
22329 echo "(I can't execute the test program--guessing $uidsize.)" >&4
22332 echo "Your $zzz is $uidsize bytes long."
22337 echo "(I can't compile the test program--guessing $uidsize.)" >&4
22340 : Check if UID is signed
22343 *_t) zzz="$uidtype" ;;
22346 echo "Checking the sign of $zzz..." >&4
22348 #include <sys/types.h>
22359 if eval $compile; then
22363 echo "(I can't execute the test program--guessing unsigned.)" >&4
22367 1) echo "Your $zzz is unsigned." ;;
22368 -1) echo "Your $zzz is signed." ;;
22374 echo "(I can't compile the test program--guessing unsigned.)" >&4
22377 : Check format string for UID
22379 $echo "Checking the format string to be used for uids..." >&4
22382 -1) if $test X"$uidsize" = X"$ivsize"; then
22383 uidformat="$ivdformat"
22385 if $test X"$uidsize" = X"$longsize"; then
22388 if $test X"$uidsize" = X"$intsize"; then
22391 if $test X"$uidsize" = X"$shortsize"; then
22398 *) if $test X"$uidsize" = X"$uvsize"; then
22399 uidformat="$uvuformat"
22401 if $test X"$uidsize" = X"$longsize"; then
22404 if $test X"$uidsize" = X"$intsize"; then
22407 if $test X"$uidsize" = X"$shortsize"; then
22416 : Determine if we can use sysctl with KERN_PROC_PATHNAME to find executing program
22418 echo "Determining whether we can use sysctl with KERN_PROC_PATHNAME to find executing program..." >&4
22419 $cat >try.c <<'EOM'
22420 /* Intentionally a long probe as I'd like to sanity check that the exact
22421 approach is going to work, as thinking it will work, but only having it
22422 part working at runtime is worse than not having it. */
22424 #include <sys/types.h>
22425 #include <sys/sysctl.h>
22426 #include <sys/param.h>
22428 #include <string.h>
22429 #include <stdlib.h>
22430 #include <unistd.h>
22433 main(int argc, char **argv) {
22435 char *argv_leaf = strrchr(argv[0], '/');
22441 mib[1] = KERN_PROC;
22442 mib[2] = KERN_PROC_PATHNAME;
22446 fprintf(stderr, "Can't locate / in '%s'\n", argv[0]);
22450 if (sysctl(mib, 4, NULL, &size, NULL, 0)) {
22455 if (size < strlen(argv_leaf) + 1) {
22456 fprintf(stderr, "size %lu is too short for a path\n",
22457 (unsigned long) size);
22461 if (size > MAXPATHLEN * MAXPATHLEN) {
22462 fprintf(stderr, "size %lu is too long for a path\n",
22463 (unsigned long) size);
22467 buffer = (char *)malloc(size);
22473 if (sysctl(mib, 4, buffer, &size, NULL, 0)) {
22478 if (strlen(buffer) + 1 != size) {
22479 fprintf(stderr, "size != strlen(buffer) + 1 (%lu != %lu)\n",
22480 (unsigned long)size, (unsigned long)strlen(buffer) + 1);
22485 if (*buffer != '/') {
22486 fprintf(stderr, "Not an absolute path: '%s'\n", buffer);
22490 if (strstr(buffer, "/./")) {
22491 fprintf(stderr, "Contains /./: '%s'\n", buffer);
22495 if (strstr(buffer, "/../")) {
22496 fprintf(stderr, "Contains /../: '%s'\n", buffer);
22500 buffer_leaf = strrchr(buffer, '/');
22501 if (strcmp(buffer_leaf, argv_leaf) != 0) {
22502 fprintf(stderr, "Leafnames differ: '%s' vs '%s'\n", argv[0], buffer);
22514 if eval $compile; then
22515 if $run ./try; then
22516 echo "You can use sysctl with KERN_PROC_PATHNAME to find the executing program." >&4
22519 echo "Nope, sysctl with KERN_PROC_PATHNAME doesn't work here." >&4
22523 echo "I'm unable to compile the test program." >&4
22524 echo "I'll assume no sysctl with KERN_PROC_PATHNAME here." >&4
22528 set usekernprocpathname
22531 : Determine if we can use _NSGetExecutablePath to find executing program
22533 echo "Determining whether we can use _NSGetExecutablePath to find executing program..." >&4
22534 $cat >try.c <<'EOM'
22535 /* Intentionally a long probe as I'd like to sanity check that the exact
22536 approach is going to work, as thinking it will work, but only having it
22537 part working at runtime is worse than not having it. */
22538 #include <mach-o/dyld.h>
22540 #include <stdlib.h>
22541 #include <sys/param.h>
22542 #include <string.h>
22545 main(int argc, char **argv) {
22547 uint32_t size = sizeof(buf);
22551 char *argv_leaf = strrchr(argv[0], '/');
22555 fprintf(stderr, "Can't locate / in '%s'\n", argv[0]);
22559 _NSGetExecutablePath(buf, &size);
22560 if (size > MAXPATHLEN * MAXPATHLEN) {
22561 fprintf(stderr, "_NSGetExecutablePath size %u is too long for a path\n",
22562 (unsigned int) size);
22566 buffer = (char *)malloc(size);
22572 result = _NSGetExecutablePath(buffer, &size);
22574 fprintf(stderr, "_NSGetExecutablePath returned %i for a size of %u\n",
22575 result, (unsigned int) size);
22579 tidied = realpath(buffer, NULL);
22581 perror("realpath");
22587 if (*tidied != '/') {
22588 fprintf(stderr, "Not an absolute path: '%s'\n", tidied);
22592 if (strstr(tidied, "/./")) {
22593 fprintf(stderr, "Contains /./: '%s'\n", tidied);
22597 if (strstr(tidied, "/../")) {
22598 fprintf(stderr, "Contains /../: '%s'\n", tidied);
22602 tidied_leaf = strrchr(tidied, '/');
22603 if (strcmp(tidied_leaf, argv_leaf) != 0) {
22604 fprintf(stderr, "Leafnames differ: '%s' vs '%s'\n", argv[0], tidied);
22616 if eval $compile; then
22617 if $run ./try; then
22618 echo "You can use _NSGetExecutablePath to find the executing program." >&4
22621 echo "Nope, _NSGetExecutablePath doesn't work here." >&4
22624 echo "I'm unable to compile the test program." >&4
22625 echo "I'll assume no _NSGetExecutablePath here." >&4
22628 set usensgetexecutablepath
22631 : Check if site customization support was requested
22632 case "$usesitecustomize" in
22633 $define|true|[Yy]*)
22634 usesitecustomize="$define"
22637 usesitecustomize="$undef"
22641 : determine compiler compiler
22650 if $test -f "$byacc$_exe"; then
22652 comp="byacc or $comp"
22654 if $test -f "$bison$_exe"; then
22655 comp="$comp or bison -y"
22657 rp="Which compiler compiler ($comp) shall I use?"
22666 echo "(Adding -y option to bison to get yacc-compatible behavior.)"
22672 : see if this is a bfd.h system
22676 : see if this is an execinfo.h system
22677 set execinfo.h i_execinfo
22680 : see if this is a fenv.h system
22684 : see if this is a fp.h system
22688 : see if this is a fp_class.h system
22689 set fp_class.h i_fp_class
22692 : see if gdbm.h is available
22697 : see if gdbm_open exists
22698 set gdbm_open d_gdbm_open
22700 case "$d_gdbm_open" in
22703 echo "We won't be including <gdbm.h>"
22712 : see if this is a ieeefp.h system
22713 case "$i_ieeefp" in
22714 '' ) set ieeefp.h i_ieeefp
22719 : see if this is a libutil.h system
22720 set libutil.h i_libutil
22723 : see if mach cthreads are available
22724 if test "X$usethreads" = "X$define"; then
22725 set mach/cthreads.h i_machcthr
22728 i_machcthr="$undef"
22731 : see if this is a mntent.h system
22732 set mntent.h i_mntent
22735 : see if net/errno.h is available
22737 set net/errno.h val
22740 : Unfortunately, it causes problems on some systems. Arrgh.
22743 cat > try.c <<'EOM'
22746 #include <net/errno.h>
22752 if $cc $ccflags -c try.c >/dev/null 2>&1; then
22753 echo "We'll be including <net/errno.h>." >&4
22755 echo "We won't be including <net/errno.h>." >&4
22764 : see if netinet/tcp.h is available
22765 set netinet/tcp.h i_netinettcp
22768 : see if this is a poll.h system
22772 : see if this is a prot.h system
22776 : Preprocessor symbols
22778 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
22779 $cat <<'EOSH' > Cppsym.know
22780 a29k aarch64 ABI64 aegis AES_SOURCE AIX AIX32 AIX370 AIX41 AIX42
22781 AIX43 aixpc AIX_SOURCE alliant ALL_SOURCE alpha AM29000 am29000
22782 AMD64 amd64 amiga AMIGAOS AMIX ansi ANSI_C_SOURCE apollo arch_ppc
22783 arch_pwr ardent ARM ARM32 atarist att386 att3b
22784 BeOS BIG_ENDIAN BIT_MSF BSD bsd bsd43 bsd4_2 BSD4_3 bsd4_3 bsd4_4
22785 BSDCOMPAT bsdi BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES bull
22786 byteorder byte_order
22787 c cadmus clang clipper CMU COFF COMPILER_VERSION concurrent
22788 convex cpu CRAY cray CRAYMPP ctix CX_UX CYGWIN
22789 DECC DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO Dynix DynixPTX
22790 ELF encore EPI EXTENSIONS
22791 FAVOR_BSD FILE_OFFSET_BITS FORTIFY_SOURCE FreeBSD
22792 GCC_NEW_VARARGS gcos gcx gimpel GLIBC GLIBC_MINOR GNUC GNUC_MINOR
22793 GNU_LIBRARY GNU_SOURCE GO32 gould GOULD_PN
22794 H3050R H3050RX hbullx20 hcx host_mips hp200 hp300 HP700 hp700
22795 hp800 hp9000 hp9000s200 hp9000s300 hp9000s400
22796 hp9000s700 hp9000s800 hp9k8 hppa hpux HPUX_SOURCE hp_osf
22797 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960 IA32 IA64
22798 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
22799 INLINE_INTRINSICS INT64 INTEL interdata INTRINSICS is68k itanium
22801 LANGUAGE_C LARGEFILE64_SOURCE LARGEFILE_SOURCE LARGE_FILE_API
22802 LFS64_LARGEFILE LFS_LARGEFILE LIBCATAMOUNT Linux LITTLE_ENDIAN
22803 LONG64 LONGDOUBLE LONGLONG LONG_DOUBLE LONG_LONG LP64 luna
22805 M68000 m68k m88100 m88k M88KBCS_TARGET MACH machine MachTen
22806 MATH_HAS_NO_SIDE_EFFECTS mc300 mc500 mc68000 mc68010 mc68020
22807 mc68030 mc68040 mc68060 mc68k mc68k32 mc700 mc88000 mc88100
22808 merlin mert MiNT mips MIPSEB MIPSEL MIPS_FPSET MIPS_ISA MIPS_SIM
22809 MIPS_SZINT MIPS_SZLONG MIPS_SZPTR MODERN_C motorola mpeix MSDOS
22810 MTXINU MULTIMAX MVS mvs M_AMD64 M_ARM M_ARMT M_COFF M_I186 M_I286
22811 M_I386 M_I8086 M_I86 M_I86SM M_IA64 M_IX86 M_PPC M_SYS3 M_SYS5
22812 M_SYSIII M_SYSV M_UNIX M_X86 M_XENIX
22813 n16 ncl_el ncl_mr NetBSD news1500 news1700 news1800 news1900
22814 news3700 news700 news800 news900 NeXT NLS nonstopux ns16000
22815 ns32000 ns32016 ns32332 ns32k nsc32000
22816 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
22817 PARAGON parisc pa_risc PA_RISC1_1 PA_RISC2_0 pc532 pdp11 PGC PIC
22818 plexus PORTAR posix POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
22819 POSIX_C_SOURCE POSIX_SOURCE POWER powerpc ppc PROTOTYPES PWB pyr
22821 R3000 REENTRANT RES Rhapsody RISC6000 riscix riscos RT
22822 S390 S390x SA110 SCO scs sequent sgi SGI_SOURCE SH SH3 sinix
22823 SIZE_INT SIZE_LONG SIZE_PTR SOCKETS_SOURCE SOCKET_SOURCE sony
22824 sonyrisc sony_news sparc sparclite sparcv8 sparcv9 spectrum
22825 stardent stdc STDC_EXT stratos sun sun3 sun386 Sun386i svr3 svr4
22826 SVR4_2 SVR4_SOURCE svr5 SX system SYSTYPE_BSD SYSTYPE_BSD43
22827 SYSTYPE_BSD44 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3
22828 SYSV4 SYSV5 sysV68 sysV88
22829 Tek4132 Tek4300 thumb thw_370 thw_intel thw_rs6000 titan TM3200
22830 TM5400 TM5600 tower tower32 tower32_200 tower32_600 tower32_700
22831 tower32_800 tower32_850 tss
22832 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5 ultrix UMAXV UnicomPBB
22833 UnicomPBD UNICOS UNICOSMK unix UNIX95 UNIX99 unixpc unos USE_BSD
22834 USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE
22835 USE_LARGEFILE64 USE_MISC USE_POSIX USE_POSIX199309
22836 USE_POSIX199506 USE_POSIX2 USE_REENTRANT USE_SVID USE_UNIX98
22837 USE_XOPEN USE_XOPEN_EXTENDED USGr4 USGr4_2 UTek Utek UTS UWIN
22839 vax venix VMESA vms
22840 x86_64 xenix Xenix286 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2
22841 XPG2_EXTENDED XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
22844 # Maybe put other stuff here too.
22845 ./tr '-' '_' <<EOSH >>Cppsym.know
22848 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
22849 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
22850 $cat Cppsym.know > Cppsym.c
22851 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
22852 $rm -f Cppsym.a Cppsym.b Cppsym.c
22853 cat <<EOSH > Cppsym
22855 if $test \$# -gt 0; then
22856 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
22857 if $test -s Cppsym.got; then
22864 $tr " " "$trnl" | ./Cppsym.try
22870 cat <<EOSH > Cppsym.try
22872 cat <<'EOCP' > try.c
22875 #define STRINGIFY(a) "a"
22877 #if cpp_stuff == 42
22878 #define StGiFy(a) #a
22879 #define STRINGIFY(a) StGiFy(a)
22881 #if $cpp_stuff != 1 && $cpp_stuff != 42
22882 # include "Bletch: How does this C preprocessor stringify macros?"
22888 cat <<'EOSH' >> Cppsym.try
22890 printf "#ifdef %s\nprintf(\"%s=%%s\\n\", STRINGIFY(%s));\n#endif\n", $1, $1, $1
22891 printf "#ifdef _%s\nprintf(\"_%s=%%s\\n\", STRINGIFY(_%s));\n#endif\n", $1, $1, $1
22892 printf "#ifdef __%s\nprintf(\"__%s=%%s\\n\", STRINGIFY(__%s));\n#endif\n", $1, $1, $1
22893 printf "#ifdef __%s__\nprintf(\"__%s__=%%s\\n\", STRINGIFY(__%s__));\n#endif\n", $1, $1, $1
22895 echo 'return 0;}' >> try.c
22897 cat <<EOSH >> Cppsym.try
22899 case "$osname-$gccversion" in
22900 irix-) ccflags="\$ccflags -woff 1178" ;;
22901 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
22903 $cc -o try -Dcpp_stuff=$cpp_stuff $optimize \$ccflags $ldflags try.c $libs 2>/dev/null && $run ./try | $sed 's/ /\\\\ /g'
22905 chmod +x Cppsym.try
22906 $eunicefix Cppsym.try
22907 ./Cppsym < Cppsym.know | $sort | $uniq > Cppsym.true
22908 : Add in any Linux cpp "predefined macros":
22909 case "$osname::$gccversion" in
22910 *linux*::*.*|*gnukfreebsd*::*.*|gnu::*.*)
22912 rm -f $tHdrH'.h' $tHdrH
22914 # Filter out macro arguments, such as Linux's __INT8_C(c)
22915 if $cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
22916 sed -e 's/#define[\ \ ]*//;s/[\ \ ].*$//' -e 's/(.*//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
22917 if [ -s $tHdrH'_cppsym.real' ]; then
22918 cat $tHdrH'_cppsym.real' Cppsym.know | sort | uniq | ./Cppsym | sort | uniq > Cppsym.true
22921 rm -f $tHdrH'.h' $tHdrH'_cppsym.h' $tHdrH'_cppsym.real'
22924 : now check the C compiler for additional symbols
22925 postprocess_cc_v=''
22927 aix) postprocess_cc_v="|$tr , ' '" ;;
22934 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
22937 -D*) echo "\$i" | $sed 's/^-D//';;
22938 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
22943 postprocess_cc_v=''
22946 ./ccsym > ccsym1.raw
22947 if $test -s ccsym1.raw; then
22948 $sort ccsym1.raw | $uniq >ccsym.raw
22950 mv ccsym1.raw ccsym.raw
22953 $awk '/\=/ { print $0; next }
22954 { print $0"=1" }' ccsym.raw >ccsym.list
22955 $comm -13 Cppsym.true ccsym.list >ccsym.own
22956 $comm -12 Cppsym.true ccsym.list >ccsym.com
22957 $comm -23 Cppsym.true ccsym.list >ccsym.cpp
22959 if $test -z ccsym.raw; then
22960 echo "Your C compiler doesn't seem to define any symbols!" >&4
22962 echo "However, your C preprocessor defines the following symbols:"
22965 cppsymbols=`$cat Cppsym.true`
22966 cppsymbols=`echo $cppsymbols`
22967 cppccsymbols="$cppsymbols"
22969 if $test -s ccsym.com; then
22970 echo "Your C compiler and pre-processor define these symbols:"
22971 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
22974 cppccsymbols=`$cat ccsym.com`
22975 cppccsymbols=`echo $cppccsymbols`
22976 $test "$silent" || sleep 1
22978 if $test -s ccsym.cpp; then
22979 $test "$also" && echo " "
22980 echo "Your C pre-processor ${also}defines the following symbols:"
22981 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
22983 cppsymbols=`$cat ccsym.cpp`
22984 cppsymbols=`echo $cppsymbols`
22985 $test "$silent" || sleep 1
22987 if $test -s ccsym.own; then
22988 $test "$also" && echo " "
22989 echo "Your C compiler ${also}defines the following cpp symbols:"
22990 $sed -e 's/\(..*\)=1/\1/' ccsym.own
22991 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
22992 ccsymbols=`$cat ccsym.own`
22993 ccsymbols=`echo $ccsymbols`
22994 $test "$silent" || sleep 1
22998 : add -D_FORTIFY_SOURCE if feasible and not already there
22999 case "$gccversion" in
23000 [456789].*) case "$optimize$ccflags" in
23001 *-O*) case "$ccflags$cppsymbols" in
23002 *_FORTIFY_SOURCE=*) # Don't add it again.
23003 echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4
23005 *) echo "Adding -D_FORTIFY_SOURCE=2 to ccflags..." >&4
23006 ccflags="$ccflags -D_FORTIFY_SOURCE=2"
23010 *) echo "You have gcc 4.* or later but not optimizing, not adding -D_FORTIFY_SOURCE." >&4
23014 *) echo "You seem not to have gcc 4.* or later, not adding -D_FORTIFY_SOURCE." >&4
23018 : script used to emit important warnings
23021 if test \$# -gt 0; then
23026 echo "*** WARNING:" >&4
23027 sed -e 's/^/*** /' <msg >&4
23029 cat msg >>config.msg
23030 echo " " >>config.msg
23036 : see if this is a termio system
23040 if $test `./findhdr termios.h`; then
23041 set tcsetattr i_termios
23047 "$define") echo "You have POSIX termios.h... good!" >&4;;
23048 *) if ./Cppsym pyr; then
23049 case "`$run /bin/universe`" in
23050 ucb) if $test `./findhdr sgtty.h`; then
23052 echo "<sgtty.h> found." >&4
23054 echo "System is pyramid with BSD universe."
23055 ./warn "<sgtty.h> not found--you could have problems."
23057 *) if $test `./findhdr termio.h`; then
23059 echo "<termio.h> found." >&4
23061 echo "System is pyramid with USG universe."
23062 ./warn "<termio.h> not found--you could have problems."
23066 if $test `./findhdr termio.h`; then
23067 echo "<termio.h> found." >&4
23069 elif $test `./findhdr sgtty.h`; then
23070 echo "<sgtty.h> found." >&4
23073 ./warn "Neither <termio.h> nor <sgtty.h> found--cross fingers!"
23076 if $test `./findhdr sgtty.h`; then
23077 echo "<sgtty.h> found." >&4
23079 elif $test `./findhdr termio.h`; then
23080 echo "<termio.h> found." >&4
23083 ./warn "Neither <sgtty.h> nor <termio.h> found--cross fingers!"
23087 set i_termio; eval $setvar
23088 val=$val2; set i_sgtty; eval $setvar
23089 val=$val3; set i_termios; eval $setvar
23091 : see if stdbool is available
23092 : we want a real compile instead of Inhdr because some Solaris systems
23093 : have stdbool.h, but it can only be used if the compiler indicates it
23094 : is sufficiently c99-compliant.
23098 #include <stdbool.h>
23103 int main(int argc, char **argv)
23109 if eval $compile; then
23110 echo "<stdbool.h> found." >&4
23113 echo "<stdbool.h> NOT found." >&4
23120 : see if stdint is available
23121 set stdint.h i_stdint
23124 : see if sys/access.h is available
23125 set sys/access.h i_sysaccess
23128 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
23129 set sys/filio.h i_sysfilio
23132 if $test `./findhdr sys/ioctl.h`; then
23134 echo '<sys/ioctl.h> found.' >&4
23137 if $test $i_sysfilio = "$define"; then
23138 echo '<sys/ioctl.h> NOT found.' >&4
23140 $test $i_sgtty = "$define" && xxx="sgtty.h"
23141 $test $i_termio = "$define" && xxx="termio.h"
23142 $test $i_termios = "$define" && xxx="termios.h"
23143 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
23149 : see if socket ioctl defs are in sys/sockio.h
23151 xxx=`./findhdr sys/sockio.h`
23152 if $test "$xxx"; then
23153 if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
23155 echo "You have socket ioctls defined in <sys/sockio.h>." >&4
23158 echo "No socket ioctls found in <sys/sockio.h>." >&4
23163 <sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
23169 : see if this is a syslog.h system
23170 set syslog.h i_syslog
23173 : see if this is a sys/mode.h system
23174 set sys/mode.h i_sysmode
23177 : see if there is a sys/poll.h file
23178 set sys/poll.h i_syspoll
23181 : see if sys/resource.h has to be included
23182 set sys/resource.h i_sysresrc
23185 : see if sys/security.h is available
23186 set sys/security.h i_syssecrt
23189 : see if this is a sys/statvfs.h system
23190 set sys/statvfs.h i_sysstatvfs
23193 : see if this is a sys/un.h system
23194 set sys/un.h i_sysun
23197 : see if this is a sys/utsname.h system
23198 set sys/utsname.h i_sysutsname
23201 : see if this is a syswait system
23202 set sys/wait.h i_syswait
23205 : see if this is a ustat.h system
23206 set ustat.h i_ustat
23209 : see if this is an utime system
23210 set utime.h i_utime
23213 : see if this is a vfork system
23216 set vfork.h i_vfork
23224 : see if wchar.h is present
23225 set wchar.h i_wchar
23230 echo "Looking for extensions..." >&4
23231 : If we are using the old config.sh, nonxs_extensions and xs_extensions may
23232 : contain old or inaccurate or duplicate values.
23233 nonxs_extensions=''
23235 : We do not use find because it might not be available.
23236 : We do not just use MANIFEST because the user may have dropped
23237 : some additional extensions into the source tree and expect them
23240 : Function to recursively find available extensions, ignoring DynaLoader
23241 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
23242 : In 5.10.1 and later, extensions are stored in directories
23243 : like File-Glob instead of the older File/Glob/.
23247 DynaLoader|dynaload) ;;
23249 this_ext=`echo "$xxx" | $sed -e s/-/\\\//g`;
23250 case "$this_ext" in
23251 Scalar/List/Utils) this_ext="List/Util" ;;
23252 PathTools) this_ext="Cwd" ;;
23254 echo " $xs_extensions $nonxs_extensions" > "$tdir/$$.tmp";
23255 if $contains " $this_ext " "$tdir/$$.tmp"; then
23257 echo "Duplicate directories detected for extension $xxx" >&4;
23258 echo "Configure cannot correctly recover from this - shall I abort?" >&4;
23259 case "$knowitall" in
23267 echo "Ok. Stopping Configure." >&4;
23268 echo "Please remove the duplicate directory (e.g. using git clean) and then re-run Configure" >&4;
23271 echo "Ok. You will need to correct config.sh before running make." >&4;
23273 $ls -1 "$xxx" > "$tdir/$$.tmp";
23274 if $contains "\.xs$" "$tdir/$$.tmp" > /dev/null 2>&1; then
23275 xs_extensions="$xs_extensions $this_ext";
23276 elif $contains "\.c$" "$tdir/$$.tmp" > /dev/null 2>&1; then
23277 xs_extensions="$xs_extensions $this_ext";
23278 elif $test -d "$xxx"; then
23279 nonxs_extensions="$nonxs_extensions $this_ext";
23281 $rm -f "$tdir/$$.tmp";
23289 eval $find_extensions
23293 eval $find_extensions
23297 eval $find_extensions
23298 set X $xs_extensions
23300 xs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
23301 set X $nonxs_extensions
23303 nonxs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
23305 known_extensions=`echo $nonxs_extensions $xs_extensions | tr ' ' $trnl | $sort | tr $trnl ' '`
23307 : Now see which are supported on this system.
23309 for xxx in $xs_extensions ; do
23313 amigaos) avail_ext="$avail_ext $xxx" ;;
23318 $define) avail_ext="$avail_ext $xxx" ;;
23321 GDBM_File|gdbm_fil)
23323 $define) avail_ext="$avail_ext $xxx" ;;
23327 : XXX Do we need a useipcsysv variable here
23328 case "${d_msg}${d_sem}${d_shm}" in
23329 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
23332 NDBM_File|ndbm_fil)
23335 case "$osname-$use64bitint" in
23338 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
23341 *) avail_ext="$avail_ext $xxx" ;;
23346 ODBM_File|odbm_fil)
23347 case "${i_dbm}${i_rpcsvcdbm}" in
23349 case "$d_cplusplus" in
23350 define) ;; # delete as a function name will not work
23351 *) case "$osname-$use64bitint" in
23354 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
23357 *) avail_ext="$avail_ext $xxx" ;;
23365 case "$useopcode" in
23366 true|define|y) avail_ext="$avail_ext $xxx" ;;
23370 case "$useposix" in
23371 true|define|y) avail_ext="$avail_ext $xxx" ;;
23375 case "$d_socket" in
23376 true|$define|y) avail_ext="$avail_ext $xxx" ;;
23379 I18N/Langinfo|langinfo)
23380 case "$uselanginfo" in
23381 true|define|y) avail_ext="$avail_ext $xxx" ;;
23384 Sys/Syslog|sys/syslog)
23386 amigaos) ;; # not really very useful on AmigaOS
23388 : XXX syslog requires socket
23389 case "$d_socket" in
23390 true|$define|y) avail_ext="$avail_ext $xxx" ;;
23396 case "$usethreads" in
23398 case "$use5005threads" in
23399 $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;;
23403 threads|threads/shared)
23404 # threads and threads::shared are special cases.
23405 # To stop people from asking "Perl 5.8.0 was supposed
23406 # to have this new fancy threads implementation but my
23407 # perl doesn't have it" and from people trying to
23408 # (re)install the threads module using CPAN.pm and
23409 # CPAN.pm then offering to reinstall Perl 5.8.0,
23410 # the threads.pm and threads/shared.pm will always be
23411 # there, croaking informatively ("you need to rebuild
23412 # all of Perl with threads, sorry") when threads haven't
23413 # been compiled in.
23415 avail_ext="$avail_ext $xxx"
23421 cygwin) avail_ext="$avail_ext $xxx" ;;
23424 XS/APItest|xs/apitest)
23425 # This is just for testing. Skip it unless we have dynamic loading.
23428 $define) avail_ext="$avail_ext $xxx" ;;
23431 XS/Typemap|xs/typemap)
23432 # This is just for testing. Skip it unless we have dynamic loading.
23434 $define) avail_ext="$avail_ext $xxx" ;;
23437 *) avail_ext="$avail_ext $xxx"
23446 case "$onlyextensions" in
23448 *) keepextensions=''
23449 echo "You have requested that only certain extensions be included..." >&4
23450 for i in $onlyextensions; do
23451 case " $avail_ext " in
23453 echo "Keeping extension $i."
23454 keepextensions="$keepextensions $i"
23456 *) echo "Ignoring extension $i." ;;
23459 avail_ext="$keepextensions"
23463 case "$noextensions" in
23465 *) keepextensions=''
23466 echo "You have requested that certain extensions be ignored..." >&4
23467 for i in $avail_ext; do
23468 case " $noextensions " in
23469 *" $i "*) echo "Ignoring extension $i." ;;
23470 *) echo "Keeping extension $i.";
23471 keepextensions="$keepextensions $i"
23475 avail_ext="$keepextensions"
23479 : Now see which nonxs extensions are supported on this system.
23480 : For now assume all are.
23482 for xxx in $nonxs_extensions ; do
23486 *) nonxs_ext="$nonxs_ext $xxx"
23498 A number of extensions are supplied with $package. You may choose to
23499 compile these extensions for dynamic loading (the default), compile
23500 them into the $package executable (static loading), or not include
23501 them at all. Answer "none" to include no extensions.
23502 Note that DynaLoader is always built and need not be mentioned here.
23505 case "$dynamic_ext" in
23507 : Exclude those listed in static_ext
23509 for xxx in $avail_ext; do
23510 case " $static_ext " in
23512 *) dflt="$dflt $xxx" ;;
23519 *) dflt="$dynamic_ext"
23520 # Perhaps we are reusing an old out-of-date config.sh.
23523 if test X"$dynamic_ext" != X"$avail_ext"; then
23525 NOTICE: Your previous config.sh list may be incorrect.
23526 The extensions now available to you are
23528 but the default list from your previous config.sh is
23540 rp="What extensions do you wish to load dynamically?"
23543 none) dynamic_ext=' ' ;;
23544 *) dynamic_ext="$ans" ;;
23547 case "$static_ext" in
23549 : Exclude those already listed in dynamic linking
23551 for xxx in $avail_ext; do
23552 case " $dynamic_ext " in
23554 *) dflt="$dflt $xxx" ;;
23561 *) dflt="$static_ext"
23568 rp="What extensions do you wish to load statically?"
23571 none) static_ext=' ' ;;
23572 *) static_ext="$ans" ;;
23577 A number of extensions are supplied with $package. Answer "none"
23578 to include no extensions.
23579 Note that DynaLoader is always built and need not be mentioned here.
23582 case "$static_ext" in
23583 '') dflt="$avail_ext" ;;
23584 *) dflt="$static_ext"
23585 # Perhaps we are reusing an old out-of-date config.sh.
23588 if test X"$static_ext" != X"$avail_ext"; then
23590 NOTICE: Your previous config.sh list may be incorrect.
23591 The extensions now available to you are
23593 but the default list from your previous config.sh is
23602 : Exclude those that are not xs extensions
23606 rp="What extensions do you wish to include?"
23609 none) static_ext=' ' ;;
23610 *) static_ext="$ans" ;;
23615 # Encode is a special case. If we are building Encode as a static
23616 # extension, we need to explicitly list its subextensions as well.
23617 # For other nested extensions, this is handled automatically by
23618 # the appropriate Makefile.PL.
23619 case " $static_ext " in
23620 *" Encode "*) # Add the subextensions of Encode
23622 for xxx in `ls Encode/*/Makefile.PL|awk -F/ '{print $2}'`; do
23623 static_ext="$static_ext Encode/$xxx"
23624 known_extensions="$known_extensions Encode/$xxx"
23630 set X $dynamic_ext $static_ext $nonxs_ext
23634 # Sanity check: We require an extension suitable for use with
23635 # AnyDBM_File, as well as Fcntl and IO. (Failure to have these
23636 # should show up as failures in the test suite, but it's helpful to
23637 # catch them now.) The 'extensions' list is normally sorted
23638 # alphabetically, so we need to accept either
23639 # DB_File ... Fcntl ... IO ....
23640 # or something like
23641 # Fcntl ... NDBM_File ... IO ....
23642 case " $extensions" in
23643 *"_File "*" Fcntl "*" IO "*) ;; # DB_File
23644 *" Fcntl "*"_File "*" IO "*) ;; # GDBM_File
23645 *" Fcntl "*" IO "*"_File "*) ;; # NDBM_File
23646 *) echo "WARNING: Extensions DB_File or *DBM_File, Fcntl, and IO not configured." >&4
23647 echo "WARNING: The Perl you are building will be quite crippled." >& 4
23651 : Remove libraries needed only for extensions
23652 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
23653 : The exception is SunOS 4.x, which needs them.
23654 case "${osname}X${osvers}" in
23658 *) case "$usedl" in
23659 $define|true|[yY]*)
23660 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
23664 *) perllibs="$libs"
23670 : Remove build directory name from cppstdin so it can be used from
23671 : either the present location or the final installed location.
23673 : Get out of the UU directory to get correct path name.
23675 case "$cppstdin" in
23677 echo "Stripping down cppstdin path name"
23683 : end of configuration questions
23685 echo "End of configuration questions."
23688 : back to where it started
23689 if test -d ../UU; then
23693 : configuration may be unconditionally patched via a 'config.arch' file
23694 if $test -f config.arch; then
23695 echo "I see a config.arch file, loading it." >&4
23699 : configuration may be patched via a 'config.over' file
23700 if $test -f config.over; then
23703 rp='I see a config.over file. Do you wish to load it?'
23706 n*) echo "OK, I'll ignore it.";;
23708 echo "Configuration override changes have been loaded."
23713 : in case they want portability, strip down executable paths
23714 case "$d_portable" in
23717 echo "Stripping down executable paths..." >&4
23718 for file in $loclist $trylist; do
23720 eval $file=`basename $temp`
23725 : create config.sh file
23727 echo "Creating config.sh..." >&4
23728 $spitshell <<EOT >config.sh
23731 # This file was produced by running the Configure script. It holds all the
23732 # definitions figured out by Configure. Should you modify one of these values,
23733 # do not forget to propagate your changes by running "Configure -der". You may
23734 # instead choose to run each of the .SH files by yourself, or "Configure -S".
23737 # Package name : $package
23738 # Source directory : $src
23739 # Configuration time: $cf_time
23740 # Configured by : $cf_by
23741 # Target system : $myuname
23744 : Add in command line options if available
23745 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
23747 $spitshell <<EOT >>config.sh
23756 Revision='$Revision'
23764 alignbytes='$alignbytes'
23765 aphostname='$aphostname'
23766 api_revision='$api_revision'
23767 api_subversion='$api_subversion'
23768 api_version='$api_version'
23769 api_versionstring='$api_versionstring'
23772 archlibexp='$archlibexp'
23773 archname64='$archname64'
23774 archname='$archname'
23775 archobjs='$archobjs'
23776 asctime_r_proto='$asctime_r_proto'
23785 byteorder='$byteorder'
23787 castflags='$castflags'
23790 cccdlflags='$cccdlflags'
23791 ccdlflags='$ccdlflags'
23793 ccflags_uselargefiles='$ccflags_uselargefiles'
23795 ccsymbols='$ccsymbols'
23796 ccversion='$ccversion'
23798 cf_email='$cf_email'
23800 charbits='$charbits'
23801 charsize='$charsize'
23805 clocktype='$clocktype'
23807 compress='$compress'
23808 contains='$contains'
23812 cpp_stuff='$cpp_stuff'
23813 cppccsymbols='$cppccsymbols'
23814 cppflags='$cppflags'
23816 cppminus='$cppminus'
23818 cppstdin='$cppstdin'
23819 cppsymbols='$cppsymbols'
23820 crypt_r_proto='$crypt_r_proto'
23821 cryptlib='$cryptlib'
23823 ctermid_r_proto='$ctermid_r_proto'
23824 ctime_r_proto='$ctime_r_proto'
23825 d_Gconvert='$d_Gconvert'
23826 d_PRIEUldbl='$d_PRIEUldbl'
23827 d_PRIFUldbl='$d_PRIFUldbl'
23828 d_PRIGUldbl='$d_PRIGUldbl'
23829 d_PRIXU64='$d_PRIXU64'
23830 d_PRId64='$d_PRId64'
23831 d_PRIeldbl='$d_PRIeldbl'
23832 d_PRIfldbl='$d_PRIfldbl'
23833 d_PRIgldbl='$d_PRIgldbl'
23834 d_PRIi64='$d_PRIi64'
23835 d_PRIo64='$d_PRIo64'
23836 d_PRIu64='$d_PRIu64'
23837 d_PRIx64='$d_PRIx64'
23838 d_SCNfldbl='$d_SCNfldbl'
23839 d__fwalk='$d__fwalk'
23840 d_accept4='$d_accept4'
23841 d_access='$d_access'
23842 d_accessx='$d_accessx'
23846 d_archlib='$d_archlib'
23847 d_asctime64='$d_asctime64'
23848 d_asctime_r='$d_asctime_r'
23853 d_attribute_deprecated='$d_attribute_deprecated'
23854 d_attribute_format='$d_attribute_format'
23855 d_attribute_malloc='$d_attribute_malloc'
23856 d_attribute_nonnull='$d_attribute_nonnull'
23857 d_attribute_noreturn='$d_attribute_noreturn'
23858 d_attribute_pure='$d_attribute_pure'
23859 d_attribute_unused='$d_attribute_unused'
23860 d_attribute_warn_unused_result='$d_attribute_warn_unused_result'
23861 d_backtrace='$d_backtrace'
23863 d_bsdgetpgrp='$d_bsdgetpgrp'
23864 d_bsdsetpgrp='$d_bsdsetpgrp'
23865 d_builtin_add_overflow='$d_builtin_add_overflow'
23866 d_builtin_choose_expr='$d_builtin_choose_expr'
23867 d_builtin_expect='$d_builtin_expect'
23868 d_builtin_mul_overflow='$d_builtin_mul_overflow'
23869 d_builtin_sub_overflow='$d_builtin_sub_overflow'
23870 d_c99_variadic_macros='$d_c99_variadic_macros'
23871 d_casti32='$d_casti32'
23872 d_castneg='$d_castneg'
23875 d_chroot='$d_chroot'
23876 d_chsize='$d_chsize'
23878 d_clearenv='$d_clearenv'
23879 d_closedir='$d_closedir'
23880 d_cmsghdr_s='$d_cmsghdr_s'
23881 d_copysign='$d_copysign'
23882 d_copysignl='$d_copysignl'
23883 d_cplusplus='$d_cplusplus'
23885 d_crypt_r='$d_crypt_r'
23887 d_ctermid='$d_ctermid'
23888 d_ctermid_r='$d_ctermid_r'
23889 d_ctime64='$d_ctime64'
23890 d_ctime_r='$d_ctime_r'
23891 d_cuserid='$d_cuserid'
23892 d_dbminitproto='$d_dbminitproto'
23893 d_difftime64='$d_difftime64'
23894 d_difftime='$d_difftime'
23895 d_dir_dd_fd='$d_dir_dd_fd'
23897 d_dirnamlen='$d_dirnamlen'
23898 d_dladdr='$d_dladdr'
23899 d_dlerror='$d_dlerror'
23900 d_dlopen='$d_dlopen'
23901 d_dlsymun='$d_dlsymun'
23902 d_dosuid='$d_dosuid'
23903 d_double_has_inf='$d_double_has_inf'
23904 d_double_has_nan='$d_double_has_nan'
23905 d_double_has_negative_zero='$d_double_has_negative_zero'
23906 d_double_has_subnormals='$d_double_has_subnormals'
23907 d_double_style_cray='$d_double_style_cray'
23908 d_double_style_ibm='$d_double_style_ibm'
23909 d_double_style_ieee='$d_double_style_ieee'
23910 d_double_style_vax='$d_double_style_vax'
23911 d_drand48_r='$d_drand48_r'
23912 d_drand48proto='$d_drand48proto'
23915 d_duplocale='$d_duplocale'
23916 d_eaccess='$d_eaccess'
23917 d_endgrent='$d_endgrent'
23918 d_endgrent_r='$d_endgrent_r'
23919 d_endhent='$d_endhent'
23920 d_endhostent_r='$d_endhostent_r'
23921 d_endnent='$d_endnent'
23922 d_endnetent_r='$d_endnetent_r'
23923 d_endpent='$d_endpent'
23924 d_endprotoent_r='$d_endprotoent_r'
23925 d_endpwent='$d_endpwent'
23926 d_endpwent_r='$d_endpwent_r'
23927 d_endsent='$d_endsent'
23928 d_endservent_r='$d_endservent_r'
23929 d_eofnblk='$d_eofnblk'
23932 d_eunice='$d_eunice'
23935 d_faststdio='$d_faststdio'
23936 d_fchdir='$d_fchdir'
23937 d_fchmod='$d_fchmod'
23938 d_fchmodat='$d_fchmodat'
23939 d_fchown='$d_fchown'
23941 d_fcntl_can_lock='$d_fcntl_can_lock'
23942 d_fd_macros='$d_fd_macros'
23943 d_fd_set='$d_fd_set'
23944 d_fdclose='$d_fdclose'
23946 d_fds_bits='$d_fds_bits'
23947 d_fegetround='$d_fegetround'
23948 d_fgetpos='$d_fgetpos'
23949 d_finite='$d_finite'
23950 d_finitel='$d_finitel'
23951 d_flexfnam='$d_flexfnam'
23953 d_flockproto='$d_flockproto'
23958 d_fp_class='$d_fp_class'
23959 d_fp_classify='$d_fp_classify'
23960 d_fp_classl='$d_fp_classl'
23961 d_fpathconf='$d_fpathconf'
23962 d_fpclass='$d_fpclass'
23963 d_fpclassify='$d_fpclassify'
23964 d_fpclassl='$d_fpclassl'
23965 d_fpgetround='$d_fpgetround'
23966 d_fpos64_t='$d_fpos64_t'
23967 d_freelocale='$d_freelocale'
23968 d_frexpl='$d_frexpl'
23969 d_fs_data_s='$d_fs_data_s'
23970 d_fseeko='$d_fseeko'
23971 d_fsetpos='$d_fsetpos'
23972 d_fstatfs='$d_fstatfs'
23973 d_fstatvfs='$d_fstatvfs'
23975 d_ftello='$d_ftello'
23977 d_futimes='$d_futimes'
23978 d_gai_strerror='$d_gai_strerror'
23979 d_gdbm_ndbm_h_uses_prototypes='$d_gdbm_ndbm_h_uses_prototypes'
23980 d_gdbmndbm_h_uses_prototypes='$d_gdbmndbm_h_uses_prototypes'
23981 d_getaddrinfo='$d_getaddrinfo'
23982 d_getcwd='$d_getcwd'
23983 d_getespwnam='$d_getespwnam'
23984 d_getfsstat='$d_getfsstat'
23985 d_getgrent='$d_getgrent'
23986 d_getgrent_r='$d_getgrent_r'
23987 d_getgrgid_r='$d_getgrgid_r'
23988 d_getgrnam_r='$d_getgrnam_r'
23989 d_getgrps='$d_getgrps'
23990 d_gethbyaddr='$d_gethbyaddr'
23991 d_gethbyname='$d_gethbyname'
23992 d_gethent='$d_gethent'
23993 d_gethname='$d_gethname'
23994 d_gethostbyaddr_r='$d_gethostbyaddr_r'
23995 d_gethostbyname_r='$d_gethostbyname_r'
23996 d_gethostent_r='$d_gethostent_r'
23997 d_gethostprotos='$d_gethostprotos'
23998 d_getitimer='$d_getitimer'
23999 d_getlogin='$d_getlogin'
24000 d_getlogin_r='$d_getlogin_r'
24001 d_getmnt='$d_getmnt'
24002 d_getmntent='$d_getmntent'
24003 d_getnameinfo='$d_getnameinfo'
24004 d_getnbyaddr='$d_getnbyaddr'
24005 d_getnbyname='$d_getnbyname'
24006 d_getnent='$d_getnent'
24007 d_getnetbyaddr_r='$d_getnetbyaddr_r'
24008 d_getnetbyname_r='$d_getnetbyname_r'
24009 d_getnetent_r='$d_getnetent_r'
24010 d_getnetprotos='$d_getnetprotos'
24011 d_getpagsz='$d_getpagsz'
24012 d_getpbyname='$d_getpbyname'
24013 d_getpbynumber='$d_getpbynumber'
24014 d_getpent='$d_getpent'
24015 d_getpgid='$d_getpgid'
24016 d_getpgrp2='$d_getpgrp2'
24017 d_getpgrp='$d_getpgrp'
24018 d_getppid='$d_getppid'
24019 d_getprior='$d_getprior'
24020 d_getprotobyname_r='$d_getprotobyname_r'
24021 d_getprotobynumber_r='$d_getprotobynumber_r'
24022 d_getprotoent_r='$d_getprotoent_r'
24023 d_getprotoprotos='$d_getprotoprotos'
24024 d_getprpwnam='$d_getprpwnam'
24025 d_getpwent='$d_getpwent'
24026 d_getpwent_r='$d_getpwent_r'
24027 d_getpwnam_r='$d_getpwnam_r'
24028 d_getpwuid_r='$d_getpwuid_r'
24029 d_getsbyname='$d_getsbyname'
24030 d_getsbyport='$d_getsbyport'
24031 d_getsent='$d_getsent'
24032 d_getservbyname_r='$d_getservbyname_r'
24033 d_getservbyport_r='$d_getservbyport_r'
24034 d_getservent_r='$d_getservent_r'
24035 d_getservprotos='$d_getservprotos'
24036 d_getspnam='$d_getspnam'
24037 d_getspnam_r='$d_getspnam_r'
24038 d_gettimeod='$d_gettimeod'
24039 d_gmtime64='$d_gmtime64'
24040 d_gmtime_r='$d_gmtime_r'
24041 d_gnulibc='$d_gnulibc'
24042 d_grpasswd='$d_grpasswd'
24043 d_hasmntopt='$d_hasmntopt'
24047 d_ilogbl='$d_ilogbl'
24048 d_inc_version_list='$d_inc_version_list'
24049 d_inetaton='$d_inetaton'
24050 d_inetntop='$d_inetntop'
24051 d_inetpton='$d_inetpton'
24052 d_int64_t='$d_int64_t'
24053 d_ip_mreq='$d_ip_mreq'
24054 d_ip_mreq_source='$d_ip_mreq_source'
24055 d_ipv6_mreq='$d_ipv6_mreq'
24056 d_ipv6_mreq_source='$d_ipv6_mreq_source'
24057 d_isascii='$d_isascii'
24058 d_isblank='$d_isblank'
24059 d_isfinite='$d_isfinite'
24060 d_isfinitel='$d_isfinitel'
24062 d_isinfl='$d_isinfl'
24063 d_isless='$d_isless'
24065 d_isnanl='$d_isnanl'
24066 d_isnormal='$d_isnormal'
24069 d_killpg='$d_killpg'
24070 d_lc_monetary_2008='$d_lc_monetary_2008'
24071 d_lchown='$d_lchown'
24072 d_ldbl_dig='$d_ldbl_dig'
24073 d_ldexpl='$d_ldexpl'
24074 d_lgamma='$d_lgamma'
24075 d_lgamma_r='$d_lgamma_r'
24076 d_libm_lib_version='$d_libm_lib_version'
24077 d_libname_unique='$d_libname_unique'
24079 d_linkat='$d_linkat'
24080 d_llrint='$d_llrint'
24081 d_llrintl='$d_llrintl'
24082 d_llround='$d_llround'
24083 d_llroundl='$d_llroundl'
24084 d_localeconv_l='$d_localeconv_l'
24085 d_localtime64='$d_localtime64'
24086 d_localtime_r='$d_localtime_r'
24087 d_localtime_r_needs_tzset='$d_localtime_r_needs_tzset'
24088 d_locconv='$d_locconv'
24093 d_long_double_style_ieee='$d_long_double_style_ieee'
24094 d_long_double_style_ieee_doubledouble='$d_long_double_style_ieee_doubledouble'
24095 d_long_double_style_ieee_extended='$d_long_double_style_ieee_extended'
24096 d_long_double_style_ieee_std='$d_long_double_style_ieee_std'
24097 d_long_double_style_vax='$d_long_double_style_vax'
24098 d_longdbl='$d_longdbl'
24099 d_longlong='$d_longlong'
24101 d_lrintl='$d_lrintl'
24102 d_lround='$d_lround'
24103 d_lroundl='$d_lroundl'
24104 d_lseekproto='$d_lseekproto'
24106 d_madvise='$d_madvise'
24107 d_malloc_good_size='$d_malloc_good_size'
24108 d_malloc_size='$d_malloc_size'
24110 d_mbrlen='$d_mbrlen'
24111 d_mbrtowc='$d_mbrtowc'
24112 d_mbstowcs='$d_mbstowcs'
24113 d_mbtowc='$d_mbtowc'
24114 d_memmem='$d_memmem'
24115 d_memrchr='$d_memrchr'
24117 d_mkdtemp='$d_mkdtemp'
24118 d_mkfifo='$d_mkfifo'
24119 d_mkostemp='$d_mkostemp'
24120 d_mkstemp='$d_mkstemp'
24121 d_mkstemps='$d_mkstemps'
24122 d_mktime64='$d_mktime64'
24123 d_mktime='$d_mktime'
24126 d_modflproto='$d_modflproto'
24127 d_mprotect='$d_mprotect'
24129 d_msg_ctrunc='$d_msg_ctrunc'
24130 d_msg_dontroute='$d_msg_dontroute'
24131 d_msg_oob='$d_msg_oob'
24132 d_msg_peek='$d_msg_peek'
24133 d_msg_proxy='$d_msg_proxy'
24134 d_msgctl='$d_msgctl'
24135 d_msgget='$d_msgget'
24136 d_msghdr_s='$d_msghdr_s'
24137 d_msgrcv='$d_msgrcv'
24138 d_msgsnd='$d_msgsnd'
24140 d_munmap='$d_munmap'
24141 d_mymalloc='$d_mymalloc'
24143 d_nanosleep='$d_nanosleep'
24145 d_ndbm_h_uses_prototypes='$d_ndbm_h_uses_prototypes'
24146 d_nearbyint='$d_nearbyint'
24147 d_newlocale='$d_newlocale'
24148 d_nextafter='$d_nextafter'
24149 d_nexttoward='$d_nexttoward'
24151 d_nl_langinfo='$d_nl_langinfo'
24152 d_nv_preserves_uv='$d_nv_preserves_uv'
24153 d_nv_zero_is_allbits_zero='$d_nv_zero_is_allbits_zero'
24154 d_off64_t='$d_off64_t'
24155 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
24156 d_oldpthreads='$d_oldpthreads'
24157 d_oldsock='$d_oldsock'
24159 d_openat='$d_openat'
24160 d_pathconf='$d_pathconf'
24162 d_perl_otherlibdirs='$d_perl_otherlibdirs'
24163 d_phostname='$d_phostname'
24167 d_portable='$d_portable'
24169 d_prctl_set_name='$d_prctl_set_name'
24170 d_printf_format_null='$d_printf_format_null'
24171 d_procselfexe='$d_procselfexe'
24172 d_pseudofork='$d_pseudofork'
24173 d_pthread_atfork='$d_pthread_atfork'
24174 d_pthread_attr_setscope='$d_pthread_attr_setscope'
24175 d_pthread_yield='$d_pthread_yield'
24176 d_ptrdiff_t='$d_ptrdiff_t'
24178 d_pwchange='$d_pwchange'
24179 d_pwclass='$d_pwclass'
24180 d_pwcomment='$d_pwcomment'
24181 d_pwexpire='$d_pwexpire'
24182 d_pwgecos='$d_pwgecos'
24183 d_pwpasswd='$d_pwpasswd'
24184 d_pwquota='$d_pwquota'
24187 d_querylocale='$d_querylocale'
24188 d_random_r='$d_random_r'
24189 d_re_comp='$d_re_comp'
24190 d_readdir64_r='$d_readdir64_r'
24191 d_readdir='$d_readdir'
24192 d_readdir_r='$d_readdir_r'
24193 d_readlink='$d_readlink'
24195 d_recvmsg='$d_recvmsg'
24196 d_regcmp='$d_regcmp'
24197 d_regcomp='$d_regcomp'
24198 d_remainder='$d_remainder'
24199 d_remquo='$d_remquo'
24200 d_rename='$d_rename'
24201 d_renameat='$d_renameat'
24202 d_rewinddir='$d_rewinddir'
24206 d_sbrkproto='$d_sbrkproto'
24207 d_scalbn='$d_scalbn'
24208 d_scalbnl='$d_scalbnl'
24209 d_sched_yield='$d_sched_yield'
24210 d_scm_rights='$d_scm_rights'
24211 d_seekdir='$d_seekdir'
24212 d_select='$d_select'
24214 d_semctl='$d_semctl'
24215 d_semctl_semid_ds='$d_semctl_semid_ds'
24216 d_semctl_semun='$d_semctl_semun'
24217 d_semget='$d_semget'
24219 d_sendmsg='$d_sendmsg'
24220 d_setegid='$d_setegid'
24221 d_seteuid='$d_seteuid'
24222 d_setgrent='$d_setgrent'
24223 d_setgrent_r='$d_setgrent_r'
24224 d_setgrps='$d_setgrps'
24225 d_sethent='$d_sethent'
24226 d_sethostent_r='$d_sethostent_r'
24227 d_setitimer='$d_setitimer'
24228 d_setlinebuf='$d_setlinebuf'
24229 d_setlocale='$d_setlocale'
24230 d_setlocale_r='$d_setlocale_r'
24231 d_setnent='$d_setnent'
24232 d_setnetent_r='$d_setnetent_r'
24233 d_setpent='$d_setpent'
24234 d_setpgid='$d_setpgid'
24235 d_setpgrp2='$d_setpgrp2'
24236 d_setpgrp='$d_setpgrp'
24237 d_setprior='$d_setprior'
24238 d_setproctitle='$d_setproctitle'
24239 d_setprotoent_r='$d_setprotoent_r'
24240 d_setpwent='$d_setpwent'
24241 d_setpwent_r='$d_setpwent_r'
24242 d_setregid='$d_setregid'
24243 d_setresgid='$d_setresgid'
24244 d_setresuid='$d_setresuid'
24245 d_setreuid='$d_setreuid'
24246 d_setrgid='$d_setrgid'
24247 d_setruid='$d_setruid'
24248 d_setsent='$d_setsent'
24249 d_setservent_r='$d_setservent_r'
24250 d_setsid='$d_setsid'
24251 d_setvbuf='$d_setvbuf'
24254 d_shmatprototype='$d_shmatprototype'
24255 d_shmctl='$d_shmctl'
24257 d_shmget='$d_shmget'
24258 d_sigaction='$d_sigaction'
24259 d_siginfo_si_addr='$d_siginfo_si_addr'
24260 d_siginfo_si_band='$d_siginfo_si_band'
24261 d_siginfo_si_errno='$d_siginfo_si_errno'
24262 d_siginfo_si_fd='$d_siginfo_si_fd'
24263 d_siginfo_si_pid='$d_siginfo_si_pid'
24264 d_siginfo_si_status='$d_siginfo_si_status'
24265 d_siginfo_si_uid='$d_siginfo_si_uid'
24266 d_siginfo_si_value='$d_siginfo_si_value'
24267 d_signbit='$d_signbit'
24268 d_sigprocmask='$d_sigprocmask'
24269 d_sigsetjmp='$d_sigsetjmp'
24270 d_sin6_scope_id='$d_sin6_scope_id'
24271 d_sitearch='$d_sitearch'
24272 d_snprintf='$d_snprintf'
24273 d_sockaddr_in6='$d_sockaddr_in6'
24274 d_sockaddr_sa_len='$d_sockaddr_sa_len'
24275 d_sockatmark='$d_sockatmark'
24276 d_sockatmarkproto='$d_sockatmarkproto'
24277 d_socket='$d_socket'
24278 d_socklen_t='$d_socklen_t'
24279 d_sockpair='$d_sockpair'
24280 d_socks5_init='$d_socks5_init'
24282 d_srand48_r='$d_srand48_r'
24283 d_srandom_r='$d_srandom_r'
24284 d_sresgproto='$d_sresgproto'
24285 d_sresuproto='$d_sresuproto'
24287 d_statblks='$d_statblks'
24288 d_statfs_f_flags='$d_statfs_f_flags'
24289 d_statfs_s='$d_statfs_s'
24290 d_static_inline='$d_static_inline'
24291 d_statvfs='$d_statvfs'
24292 d_stdio_cnt_lval='$d_stdio_cnt_lval'
24293 d_stdio_ptr_lval='$d_stdio_ptr_lval'
24294 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
24295 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
24296 d_stdio_stream_array='$d_stdio_stream_array'
24297 d_stdiobase='$d_stdiobase'
24298 d_stdstdio='$d_stdstdio'
24299 d_strcoll='$d_strcoll'
24300 d_strerror_l='$d_strerror_l'
24301 d_strerror_r='$d_strerror_r'
24302 d_strftime='$d_strftime'
24303 d_strlcat='$d_strlcat'
24304 d_strlcpy='$d_strlcpy'
24305 d_strnlen='$d_strnlen'
24306 d_strtod='$d_strtod'
24307 d_strtod_l='$d_strtod_l'
24308 d_strtol='$d_strtol'
24309 d_strtold='$d_strtold'
24310 d_strtold_l='$d_strtold_l'
24311 d_strtoll='$d_strtoll'
24312 d_strtoq='$d_strtoq'
24313 d_strtoul='$d_strtoul'
24314 d_strtoull='$d_strtoull'
24315 d_strtouq='$d_strtouq'
24316 d_strxfrm='$d_strxfrm'
24317 d_suidsafe='$d_suidsafe'
24318 d_symlink='$d_symlink'
24319 d_syscall='$d_syscall'
24320 d_syscallproto='$d_syscallproto'
24321 d_sysconf='$d_sysconf'
24322 d_sysernlst='$d_sysernlst'
24323 d_syserrlst='$d_syserrlst'
24324 d_system='$d_system'
24325 d_tcgetpgrp='$d_tcgetpgrp'
24326 d_tcsetpgrp='$d_tcsetpgrp'
24327 d_telldir='$d_telldir'
24328 d_telldirproto='$d_telldirproto'
24329 d_tgamma='$d_tgamma'
24330 d_thread_safe_nl_langinfo_l='$d_thread_safe_nl_langinfo_l'
24332 d_timegm='$d_timegm'
24334 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
24335 d_tm_tm_zone='$d_tm_tm_zone'
24336 d_tmpnam_r='$d_tmpnam_r'
24338 d_truncate='$d_truncate'
24339 d_truncl='$d_truncl'
24340 d_ttyname_r='$d_ttyname_r'
24341 d_tzname='$d_tzname'
24342 d_u32align='$d_u32align'
24343 d_ualarm='$d_ualarm'
24346 d_union_semun='$d_union_semun'
24347 d_unlinkat='$d_unlinkat'
24348 d_unordered='$d_unordered'
24349 d_unsetenv='$d_unsetenv'
24350 d_uselocale='$d_uselocale'
24351 d_usleep='$d_usleep'
24352 d_usleepproto='$d_usleepproto'
24354 d_vendorarch='$d_vendorarch'
24355 d_vendorbin='$d_vendorbin'
24356 d_vendorlib='$d_vendorlib'
24357 d_vendorscript='$d_vendorscript'
24359 d_void_closedir='$d_void_closedir'
24360 d_voidsig='$d_voidsig'
24361 d_voidtty='$d_voidtty'
24362 d_vsnprintf='$d_vsnprintf'
24364 d_waitpid='$d_waitpid'
24365 d_wcscmp='$d_wcscmp'
24366 d_wcstombs='$d_wcstombs'
24367 d_wcsxfrm='$d_wcsxfrm'
24368 d_wctomb='$d_wctomb'
24369 d_writev='$d_writev'
24372 db_hashtype='$db_hashtype'
24373 db_prefixtype='$db_prefixtype'
24374 db_version_major='$db_version_major'
24375 db_version_minor='$db_version_minor'
24376 db_version_patch='$db_version_patch'
24377 default_inc_excludes_dot='$default_inc_excludes_dot'
24378 direntrytype='$direntrytype'
24381 doubleinfbytes='$doubleinfbytes'
24382 doublekind='$doublekind'
24383 doublemantbits='$doublemantbits'
24384 doublenanbytes='$doublenanbytes'
24385 doublesize='$doublesize'
24387 drand48_r_proto='$drand48_r_proto'
24389 dtraceobject='$dtraceobject'
24390 dtracexnolibs='$dtracexnolibs'
24391 dynamic_ext='$dynamic_ext'
24397 endgrent_r_proto='$endgrent_r_proto'
24398 endhostent_r_proto='$endhostent_r_proto'
24399 endnetent_r_proto='$endnetent_r_proto'
24400 endprotoent_r_proto='$endprotoent_r_proto'
24401 endpwent_r_proto='$endpwent_r_proto'
24402 endservent_r_proto='$endservent_r_proto'
24403 eunicefix='$eunicefix'
24406 extensions='$extensions'
24407 extern_C='$extern_C'
24409 fflushNULL='$fflushNULL'
24410 fflushall='$fflushall'
24412 firstmakefile='$firstmakefile'
24414 fpossize='$fpossize'
24415 fpostype='$fpostype'
24416 freetype='$freetype'
24419 full_csh='$full_csh'
24420 full_sed='$full_sed'
24421 gccansipedantic='$gccansipedantic'
24422 gccosandvers='$gccosandvers'
24423 gccversion='$gccversion'
24424 getgrent_r_proto='$getgrent_r_proto'
24425 getgrgid_r_proto='$getgrgid_r_proto'
24426 getgrnam_r_proto='$getgrnam_r_proto'
24427 gethostbyaddr_r_proto='$gethostbyaddr_r_proto'
24428 gethostbyname_r_proto='$gethostbyname_r_proto'
24429 gethostent_r_proto='$gethostent_r_proto'
24430 getlogin_r_proto='$getlogin_r_proto'
24431 getnetbyaddr_r_proto='$getnetbyaddr_r_proto'
24432 getnetbyname_r_proto='$getnetbyname_r_proto'
24433 getnetent_r_proto='$getnetent_r_proto'
24434 getprotobyname_r_proto='$getprotobyname_r_proto'
24435 getprotobynumber_r_proto='$getprotobynumber_r_proto'
24436 getprotoent_r_proto='$getprotoent_r_proto'
24437 getpwent_r_proto='$getpwent_r_proto'
24438 getpwnam_r_proto='$getpwnam_r_proto'
24439 getpwuid_r_proto='$getpwuid_r_proto'
24440 getservbyname_r_proto='$getservbyname_r_proto'
24441 getservbyport_r_proto='$getservbyport_r_proto'
24442 getservent_r_proto='$getservent_r_proto'
24443 getspnam_r_proto='$getspnam_r_proto'
24444 gidformat='$gidformat'
24450 gmtime_r_proto='$gmtime_r_proto'
24451 gnulibc_version='$gnulibc_version'
24453 groupcat='$groupcat'
24454 groupstype='$groupstype'
24457 h_sysfile='$h_sysfile'
24460 hostgenerate='$hostgenerate'
24461 hostosname='$hostosname'
24462 hostperl='$hostperl'
24463 html1dir='$html1dir'
24464 html1direxp='$html1direxp'
24465 html3dir='$html3dir'
24466 html3direxp='$html3direxp'
24475 i_arpainet='$i_arpainet'
24477 i_bsdioctl='$i_bsdioctl'
24481 i_dirent='$i_dirent'
24483 i_execinfo='$i_execinfo'
24487 i_fp_class='$i_fp_class'
24489 i_gdbm_ndbm='$i_gdbm_ndbm'
24490 i_gdbmndbm='$i_gdbmndbm'
24492 i_ieeefp='$i_ieeefp'
24493 i_inttypes='$i_inttypes'
24494 i_langinfo='$i_langinfo'
24495 i_libutil='$i_libutil'
24496 i_locale='$i_locale'
24497 i_machcthr='$i_machcthr'
24498 i_malloc='$i_malloc'
24499 i_mallocmalloc='$i_mallocmalloc'
24500 i_mntent='$i_mntent'
24503 i_neterrno='$i_neterrno'
24504 i_netinettcp='$i_netinettcp'
24508 i_pthread='$i_pthread'
24510 i_quadmath='$i_quadmath'
24511 i_rpcsvcdbm='$i_rpcsvcdbm'
24513 i_shadow='$i_shadow'
24515 i_stdbool='$i_stdbool'
24516 i_stdint='$i_stdint'
24517 i_stdlib='$i_stdlib'
24518 i_sunmath='$i_sunmath'
24519 i_sysaccess='$i_sysaccess'
24520 i_sysdir='$i_sysdir'
24521 i_sysfile='$i_sysfile'
24522 i_sysfilio='$i_sysfilio'
24524 i_sysioctl='$i_sysioctl'
24525 i_syslog='$i_syslog'
24526 i_sysmman='$i_sysmman'
24527 i_sysmode='$i_sysmode'
24528 i_sysmount='$i_sysmount'
24529 i_sysndir='$i_sysndir'
24530 i_sysparam='$i_sysparam'
24531 i_syspoll='$i_syspoll'
24532 i_sysresrc='$i_sysresrc'
24533 i_syssecrt='$i_syssecrt'
24534 i_sysselct='$i_sysselct'
24535 i_syssockio='$i_syssockio'
24536 i_sysstat='$i_sysstat'
24537 i_sysstatfs='$i_sysstatfs'
24538 i_sysstatvfs='$i_sysstatvfs'
24539 i_systime='$i_systime'
24540 i_systimek='$i_systimek'
24541 i_systimes='$i_systimes'
24542 i_systypes='$i_systypes'
24543 i_sysuio='$i_sysuio'
24545 i_sysutsname='$i_sysutsname'
24546 i_sysvfs='$i_sysvfs'
24547 i_syswait='$i_syswait'
24548 i_termio='$i_termio'
24549 i_termios='$i_termios'
24551 i_unistd='$i_unistd'
24556 i_xlocale='$i_xlocale'
24557 ignore_versioned_solibs='$ignore_versioned_solibs'
24558 inc_version_list='$inc_version_list'
24559 inc_version_list_init='$inc_version_list_init'
24563 initialinstalllocation='$initialinstalllocation'
24564 installarchlib='$installarchlib'
24565 installbin='$installbin'
24566 installhtml1dir='$installhtml1dir'
24567 installhtml3dir='$installhtml3dir'
24568 installman1dir='$installman1dir'
24569 installman3dir='$installman3dir'
24570 installprefix='$installprefix'
24571 installprefixexp='$installprefixexp'
24572 installprivlib='$installprivlib'
24573 installscript='$installscript'
24574 installsitearch='$installsitearch'
24575 installsitebin='$installsitebin'
24576 installsitehtml1dir='$installsitehtml1dir'
24577 installsitehtml3dir='$installsitehtml3dir'
24578 installsitelib='$installsitelib'
24579 installsiteman1dir='$installsiteman1dir'
24580 installsiteman3dir='$installsiteman3dir'
24581 installsitescript='$installsitescript'
24582 installstyle='$installstyle'
24583 installusrbinperl='$installusrbinperl'
24584 installvendorarch='$installvendorarch'
24585 installvendorbin='$installvendorbin'
24586 installvendorhtml1dir='$installvendorhtml1dir'
24587 installvendorhtml3dir='$installvendorhtml3dir'
24588 installvendorlib='$installvendorlib'
24589 installvendorman1dir='$installvendorman1dir'
24590 installvendorman3dir='$installvendorman3dir'
24591 installvendorscript='$installvendorscript'
24593 issymlink='$issymlink'
24594 ivdformat='$ivdformat'
24597 known_extensions='$known_extensions'
24600 ld_can_script='$ld_can_script'
24601 lddlflags='$lddlflags'
24603 ldflags_uselargefiles='$ldflags_uselargefiles'
24604 ldlibpthname='$ldlibpthname'
24611 libsdirs='$libsdirs'
24612 libsfiles='$libsfiles'
24613 libsfound='$libsfound'
24614 libspath='$libspath'
24615 libswanted='$libswanted'
24616 libswanted_uselargefiles='$libswanted_uselargefiles'
24622 localtime_r_proto='$localtime_r_proto'
24623 locincpth='$locincpth'
24624 loclibpth='$loclibpth'
24625 longdblinfbytes='$longdblinfbytes'
24626 longdblkind='$longdblkind'
24627 longdblmantbits='$longdblmantbits'
24628 longdblnanbytes='$longdblnanbytes'
24629 longdblsize='$longdblsize'
24630 longlongsize='$longlongsize'
24631 longsize='$longsize'
24635 lseeksize='$lseeksize'
24636 lseektype='$lseektype'
24640 make_set_make='$make_set_make'
24641 mallocobj='$mallocobj'
24642 mallocsrc='$mallocsrc'
24643 malloctype='$malloctype'
24645 man1direxp='$man1direxp'
24648 man3direxp='$man3direxp'
24650 mips_type='$mips_type'
24651 mistrustnm='$mistrustnm'
24653 mmaptype='$mmaptype'
24654 modetype='$modetype'
24656 multiarch='$multiarch'
24658 myarchname='$myarchname'
24659 mydomain='$mydomain'
24660 myhostname='$myhostname'
24663 need_va_copy='$need_va_copy'
24664 netdb_hlen_type='$netdb_hlen_type'
24665 netdb_host_type='$netdb_host_type'
24666 netdb_name_type='$netdb_name_type'
24667 netdb_net_type='$netdb_net_type'
24670 nm_so_opt='$nm_so_opt'
24671 nonxs_ext='$nonxs_ext'
24673 nvEUformat='$nvEUformat'
24674 nvFUformat='$nvFUformat'
24675 nvGUformat='$nvGUformat'
24676 nv_overflows_integers_at='$nv_overflows_integers_at'
24677 nv_preserves_uv_bits='$nv_preserves_uv_bits'
24678 nveformat='$nveformat'
24679 nvfformat='$nvfformat'
24680 nvgformat='$nvgformat'
24681 nvmantbits='$nvmantbits'
24684 o_nonblock='$o_nonblock'
24686 old_pthread_create_joinable='$old_pthread_create_joinable'
24687 optimize='$optimize'
24688 orderlib='$orderlib'
24691 otherlibdirs='$otherlibdirs'
24695 patchlevel='$patchlevel'
24696 path_sep='$path_sep'
24699 perl_patchlevel='$perl_patchlevel'
24700 perl_static_inline='$perl_static_inline'
24701 perladmin='$perladmin'
24702 perllibs='$perllibs'
24703 perlpath='$perlpath'
24705 phostname='$phostname'
24711 prefixexp='$prefixexp'
24713 privlibexp='$privlibexp'
24714 procselfexe='$procselfexe'
24716 quadkind='$quadkind'
24717 quadtype='$quadtype'
24718 randbits='$randbits'
24719 randfunc='$randfunc'
24720 random_r_proto='$random_r_proto'
24721 randseedtype='$randseedtype'
24723 rd_nodata='$rd_nodata'
24724 readdir64_r_proto='$readdir64_r_proto'
24725 readdir_r_proto='$readdir_r_proto'
24726 revision='$revision'
24732 sGMTIME_max='$sGMTIME_max'
24733 sGMTIME_min='$sGMTIME_min'
24734 sLOCALTIME_max='$sLOCALTIME_max'
24735 sLOCALTIME_min='$sLOCALTIME_min'
24736 sPRIEUldbl='$sPRIEUldbl'
24737 sPRIFUldbl='$sPRIFUldbl'
24738 sPRIGUldbl='$sPRIGUldbl'
24739 sPRIXU64='$sPRIXU64'
24741 sPRIeldbl='$sPRIeldbl'
24742 sPRIfldbl='$sPRIfldbl'
24743 sPRIgldbl='$sPRIgldbl'
24748 sSCNfldbl='$sSCNfldbl'
24749 sched_yield='$sched_yield'
24750 scriptdir='$scriptdir'
24751 scriptdirexp='$scriptdirexp'
24753 seedfunc='$seedfunc'
24754 selectminbits='$selectminbits'
24755 selecttype='$selecttype'
24756 sendmail='$sendmail'
24757 setgrent_r_proto='$setgrent_r_proto'
24758 sethostent_r_proto='$sethostent_r_proto'
24759 setlocale_r_proto='$setlocale_r_proto'
24760 setnetent_r_proto='$setnetent_r_proto'
24761 setprotoent_r_proto='$setprotoent_r_proto'
24762 setpwent_r_proto='$setpwent_r_proto'
24763 setservent_r_proto='$setservent_r_proto'
24766 sharpbang='$sharpbang'
24767 shmattype='$shmattype'
24768 shortsize='$shortsize'
24771 sig_count='$sig_count'
24772 sig_name='$sig_name'
24773 sig_name_init='$sig_name_init'
24775 sig_num_init='$sig_num_init'
24776 sig_size='$sig_size'
24777 signal_t='$signal_t'
24778 sitearch='$sitearch'
24779 sitearchexp='$sitearchexp'
24781 sitebinexp='$sitebinexp'
24782 sitehtml1dir='$sitehtml1dir'
24783 sitehtml1direxp='$sitehtml1direxp'
24784 sitehtml3dir='$sitehtml3dir'
24785 sitehtml3direxp='$sitehtml3direxp'
24787 sitelib_stem='$sitelib_stem'
24788 sitelibexp='$sitelibexp'
24789 siteman1dir='$siteman1dir'
24790 siteman1direxp='$siteman1direxp'
24791 siteman3dir='$siteman3dir'
24792 siteman3direxp='$siteman3direxp'
24793 siteprefix='$siteprefix'
24794 siteprefixexp='$siteprefixexp'
24795 sitescript='$sitescript'
24796 sitescriptexp='$sitescriptexp'
24797 sizesize='$sizesize'
24798 sizetype='$sizetype'
24802 sockethdr='$sockethdr'
24803 socketlib='$socketlib'
24804 socksizetype='$socksizetype'
24806 spackage='$spackage'
24807 spitshell='$spitshell'
24808 srand48_r_proto='$srand48_r_proto'
24809 srandom_r_proto='$srandom_r_proto'
24811 ssizetype='$ssizetype'
24812 st_ino_sign='$st_ino_sign'
24813 st_ino_size='$st_ino_size'
24814 startperl='$startperl'
24816 static_ext='$static_ext'
24818 stdio_base='$stdio_base'
24819 stdio_bufsiz='$stdio_bufsiz'
24820 stdio_cnt='$stdio_cnt'
24821 stdio_filbuf='$stdio_filbuf'
24822 stdio_ptr='$stdio_ptr'
24823 stdio_stream_array='$stdio_stream_array'
24824 strerror_r_proto='$strerror_r_proto'
24826 subversion='$subversion'
24831 targetarch='$targetarch'
24832 targetdir='$targetdir'
24833 targetenv='$targetenv'
24834 targethost='$targethost'
24835 targetmkdir='$targetmkdir'
24836 targetport='$targetport'
24837 targetsh='$targetsh'
24841 timeincl='$timeincl'
24842 timetype='$timetype'
24843 tmpnam_r_proto='$tmpnam_r_proto'
24849 ttyname_r_proto='$ttyname_r_proto'
24858 uidformat='$uidformat'
24864 uquadtype='$uquadtype'
24865 use5005threads='$use5005threads'
24866 use64bitall='$use64bitall'
24867 use64bitint='$use64bitint'
24868 usecbacktrace='$usecbacktrace'
24869 usecrosscompile='$usecrosscompile'
24870 usedevel='$usedevel'
24872 usedtrace='$usedtrace'
24873 usefaststdio='$usefaststdio'
24874 useithreads='$useithreads'
24875 usekernprocpathname='$usekernprocpathname'
24876 uselanginfo='$uselanginfo'
24877 uselargefiles='$uselargefiles'
24878 uselongdouble='$uselongdouble'
24879 usemallocwrap='$usemallocwrap'
24880 usemorebits='$usemorebits'
24881 usemultiplicity='$usemultiplicity'
24882 usemymalloc='$usemymalloc'
24884 usensgetexecutablepath='$usensgetexecutablepath'
24885 useopcode='$useopcode'
24886 useperlio='$useperlio'
24887 useposix='$useposix'
24888 usequadmath='$usequadmath'
24889 usereentrant='$usereentrant'
24890 userelocatableinc='$userelocatableinc'
24891 useshrplib='$useshrplib'
24892 usesitecustomize='$usesitecustomize'
24893 usesocks='$usesocks'
24894 usethreads='$usethreads'
24895 usevendorprefix='$usevendorprefix'
24896 useversionedarchname='$useversionedarchname'
24897 usevfork='$usevfork'
24900 uvXUformat='$uvXUformat'
24901 uvoformat='$uvoformat'
24904 uvuformat='$uvuformat'
24905 uvxformat='$uvxformat'
24906 vendorarch='$vendorarch'
24907 vendorarchexp='$vendorarchexp'
24908 vendorbin='$vendorbin'
24909 vendorbinexp='$vendorbinexp'
24910 vendorhtml1dir='$vendorhtml1dir'
24911 vendorhtml1direxp='$vendorhtml1direxp'
24912 vendorhtml3dir='$vendorhtml3dir'
24913 vendorhtml3direxp='$vendorhtml3direxp'
24914 vendorlib='$vendorlib'
24915 vendorlib_stem='$vendorlib_stem'
24916 vendorlibexp='$vendorlibexp'
24917 vendorman1dir='$vendorman1dir'
24918 vendorman1direxp='$vendorman1direxp'
24919 vendorman3dir='$vendorman3dir'
24920 vendorman3direxp='$vendorman3direxp'
24921 vendorprefix='$vendorprefix'
24922 vendorprefixexp='$vendorprefixexp'
24923 vendorscript='$vendorscript'
24924 vendorscriptexp='$vendorscriptexp'
24926 version_patchlevel_string='$version_patchlevel_string'
24927 versiononly='$versiononly'
24931 yaccflags='$yaccflags'
24936 : add special variables
24937 $test -f $src/patchlevel.h && \
24938 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
24939 echo "PERL_PATCHLEVEL='$perl_patchlevel'" >>config.sh
24940 echo "PERL_CONFIG_SH=true" >>config.sh
24942 : propagate old symbols
24943 if $test -f UU/config.sh; then
24944 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
24945 $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \
24946 config.sh config.sh UU/oldconfig.sh |\
24947 $sort | $uniq -u >UU/oldsyms
24948 set X `$cat UU/oldsyms`
24954 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
24956 echo ": Variables propagated from previous config.sh file." >>config.sh
24957 for sym in `$cat UU/oldsyms`; do
24958 echo " Propagating $hint variable "'$'"$sym..."
24959 eval 'tmp="$'"${sym}"'"'
24961 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
24967 : preserve RCS keywords in files with variable substitution, grrr
24970 : Finish up by extracting the .SH files
24973 echo "Stopping at your request, leaving temporary files around."
24983 If you'd like to make any changes to the config.sh file before I begin
24984 to configure things, do it as a shell escape now (e.g. !vi config.sh).
24987 rp="Press return or use a shell escape to edit config.sh:"
24992 *) : in case they cannot read
24993 sh 1>&4 -c "$ans";;
24998 : if this fails, just run all the .SH files by hand
25007 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
25014 Now you need to generate make dependencies by running "$make depend".
25015 You might prefer to run it in background: "$make depend > makedepend.out &"
25016 It can take a while, so you might not want to run it right now.
25021 rp="Run $make depend now?"
25025 $make depend && echo "Now you must run '$make'."
25028 echo "You must run '$make depend' then '$make'."
25031 elif test -f [Mm]akefile; then
25033 echo "Now you must run a $make."
25035 echo "Configure done."
25038 if $test -f Policy.sh; then
25041 If you compile $package on a different machine or from a different object
25042 directory, copy the Policy.sh file from this object directory to the
25043 new one before you run Configure -- this will help you with most of
25044 the policy defaults.
25048 if $test -f UU/config.msg; then
25049 echo "Hmm. I also noted the following information while running:"
25051 $cat UU/config.msg >&4
25053 $rm -f kit*isdone ark*isdone