3 # If these # comments don't work, trim them. Don't worry about any other
4 # shell scripts, Configure will trim # comments from them for you.
6 # (If you are trying to port this package to a machine without sh,
7 # I would suggest you have a look at the prototypical config_h.SH file
8 # and edit it to reflect your system. Some packages may include samples
9 # of config.h for certain machines, so you might look for one of those.)
11 # Yes, you may rip this off to use in other distribution packages. This
12 # script belongs to the public domain and cannot be copyrighted.
14 # (Note: this Configure script was generated automatically. Rather than
15 # working with this copy of Configure, you may wish to get metaconfig.
16 # The dist-3.0 package (which contains metaconfig) was posted in
17 # comp.sources.misc and is available on CPAN under authors/id/RAM so
18 # you may fetch it yourself from your nearest archive site.)
21 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
23 # Generated on Thu Dec 21 18:12:08 EET 2000 [metaconfig 3.0 PL70]
24 # (with additional metaconfig patches by perlbug@perl.org)
29 SCO csh still thinks true is false. Write to SCO today and tell them that next
30 year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
32 (Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
33 we'd have to do is go in and swap the && and || tokens, wherever they are.)
35 [End of diatribe. We now return you to your regularly scheduled programming...]
39 OOPS! You naughty creature! You didn't run Configure with sh!
40 I will attempt to remedy the situation by running sh for you...
44 true || exec sh $0 $argv:q
46 (exit $?0) || cat c2$$
47 (exit $?0) || exec sh $0 $argv:q
50 : compute my invocation name
54 me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
59 : Proper separator for the PATH environment variable
61 : On OS/2 this directory should exist if this is not floppy only system :-]
62 if test -d c:/. ; then
63 if test -n "$OS2_SHELL"; then
65 PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
66 OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
67 elif test -n "$DJGPP"; then
73 paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
74 paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
75 paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
76 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
77 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
78 paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
79 paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
80 paths="$paths /sbin /usr/sbin /usr/libexec"
86 *) test -d $p && PATH=$PATH$p_$p ;;
93 : shall we be using ksh?
99 if (PATH=.; alias -x) >/dev/null 2>&1; then
102 if test -f /hp-ux -a -f /bin/ksh; then
103 needksh='to avoid sh bug in "here document" expansion'
105 if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
106 if test X`/usr/bin/uname -v` = X4; then
107 avoidksh="to avoid AIX 4's /bin/sh"
111 if test -f /osf_boot -a -f /usr/sbin/setld; then
112 if test X`/usr/bin/uname -s` = XOSF1; then
113 avoidksh="to avoid Digital UNIX' ksh"
115 unset BIN_SH # if this is 'xpg4' sh will start up ksh
118 case "$inksh/$needksh" in
125 case "$inksh/$avoidksh" in
131 case "$inksh/$needksh-$avoidksh-" in
134 (I see you are using the Korn shell. Some ksh's blow up on $me,
135 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
141 echo "(Feeding myself to $newsh $reason.)"
143 Configure|*/Configure) exec $newsh $0 "$@";;
144 *) exec $newsh Configure "$@";;
149 : if needed set CDPATH to a harmless value that is not chatty
150 : avoid bash 2.02 problems with empty CDPATH.
154 *bash*) CDPATH='.' ;;
159 : Configure runs within the UU subdirectory
160 test -d UU || mkdir UU
465 d_old_pthread_create_joinable=''
466 old_pthread_create_joinable=''
544 d_stdio_ptr_lval_nochange_cnt=''
545 d_stdio_ptr_lval_sets_cnt=''
717 inc_version_list_init=''
736 ignore_versioned_solibs=''
795 d_perl_otherlibdirs=''
812 d_nv_preserves_uv_bits=''
910 d_stdio_stream_array=''
911 stdio_stream_array=''
921 ccflags_uselargefiles=''
922 ldflags_uselargefiles=''
923 libswanted_uselargefiles=''
966 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
969 : We must find out about Eunice early
971 if test -f /etc/unixtovms; then
972 eunicefix=/etc/unixtovms
974 if test -f /etc/unixtovms.exe; then
975 eunicefix=/etc/unixtovms.exe
982 : set useposix=false in your hint file to disable the POSIX extension.
984 : set useopcode=false in your hint file to disable the Opcode extension.
986 : Trailing extension. Override this in a hint file, if needed.
988 : Extra object files, if any, needed on this platform.
991 : Possible local include directories to search.
992 : Set locincpth to "" in a hint file to defeat local include searches.
993 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
994 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
996 : no include file wanted by default
1000 : change the next line if compiling for Xenix/286 on Xenix/386
1001 xlibpth='/usr/lib/386 /lib/386'
1002 : Possible local library directories to search.
1003 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1004 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1006 : general looking path for locating libraries
1007 glibpth="/lib /usr/lib $xlibpth"
1008 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1009 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1010 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1012 : Private path used by Configure to find libraries. Its value
1013 : is prepended to libpth. This variable takes care of special
1014 : machines, like the mips. Usually, it should be empty.
1017 : default library list
1019 : some systems want to use only the non-versioned libso:s
1020 ignore_versioned_solibs=''
1022 ccflags_uselargefiles=''
1023 ldflags_uselargefiles=''
1024 libswanted_uselargefiles=''
1025 : set usemultiplicity on the Configure command line to enable multiplicity.
1026 : set usesocks on the Configure command line to enable socks.
1027 : set usethreads on the Configure command line to enable threads.
1028 : full support for void wanted by default
1031 : List of libraries we want.
1032 : If anyone needs -lnet, put it in a hint file.
1033 libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
1034 libswanted="$libswanted dld ld sun m c cposix posix"
1035 libswanted="$libswanted ndir dir crypt sec"
1036 libswanted="$libswanted ucb bsd BSD PW x iconv util"
1037 : We probably want to search /usr/shlib before most other libraries.
1038 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1039 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1040 glibpth="/usr/shlib $glibpth"
1041 : Do not use vfork unless overridden by a hint file.
1044 : Find the basic shell for Bourne shell scripts
1048 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1051 if test -f "$xxx"; then
1054 : Build up a list and do a single loop so we can 'break' out.
1055 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1056 for xxx in sh bash ksh pdksh ash; do
1058 try="$try ${p}/${xxx}"
1062 if test -f "$xxx"; then
1065 elif test -f "$xxx.exe"; then
1076 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1078 Usually it's in /bin/sh. How did you even get this far?
1079 Please contact me (Perl Maintainers) at perlbug@perl.org and
1080 we'll try to straighten this all out.
1086 : see if sh knows # comments
1087 if `$sh -c '#' >/dev/null 2>&1`; then
1091 test -f $xcat || xcat=/usr/bin/cat
1096 if test -s today; then
1099 echo "#! $xcat" > try
1103 if test -s today; then
1111 echo "Your $sh doesn't grok # comments--I will strip them later on."
1114 echo "exec grep -v '^[ ]*#'" >spitshell
1116 $eunicefix spitshell
1117 spitshell=`pwd`/spitshell
1119 echo "I presume that if # doesn't work, #! won't work either!"
1124 : figure out how to guarantee sh startup
1126 '') startsh=${sharpbang}${sh} ;;
1138 : echo "Yup, it does."
1140 echo "Hmm... '$startsh' does not guarantee sh startup..."
1141 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1146 : Save command line options in file UU/cmdline.opt for later use in
1147 : generating config.sh.
1148 cat > cmdline.opt <<EOSH
1149 # Configure command line arguments.
1156 cat >>cmdline.opt <<EOSH
1157 config_arg$argn='$arg'
1159 argn=`expr $argn + 1`
1162 : produce awk script to parse command line options
1163 cat >options.awk <<'EOF'
1165 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1167 len = length(optstr);
1168 for (i = 1; i <= len; i++) {
1169 c = substr(optstr, i, 1);
1170 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1181 if (substr(str, 1, 1) != "-") {
1182 printf("'%s'\n", str);
1186 for (i = 2; i <= len; i++) {
1187 c = substr(str, i, 1);
1189 printf("-%s\n", substr(str, i));
1195 printf("'%s'\n", substr(str, i + 1));
1208 : process the command line options
1209 set X `for arg in "$@"; do echo "X$arg"; done |
1210 sed -e s/X// | awk -f options.awk`
1215 : set up default values
1225 rm -f optdef.sh posthint.sh
1226 cat >optdef.sh <<EOS
1232 while test $# -gt 0; do
1234 -d) shift; fastread=yes;;
1235 -e) shift; alldone=cont;;
1239 if test -r "$1"; then
1242 echo "$me: cannot read config file $1." >&2
1247 -h) shift; error=true;;
1248 -r) shift; reuseval=true;;
1249 -s) shift; silent=true; realsilent=true;;
1250 -E) shift; alldone=exit;;
1251 -K) shift; knowitall=true;;
1252 -O) shift; override=true;;
1253 -S) shift; silent=true; extractsh=true;;
1258 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1259 echo "$me: ignoring -D $1" >&2
1262 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1263 *) echo "$1='define'" >> optdef.sh;;
1270 *=) echo "$1" >> optdef.sh;;
1272 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1273 echo "$me: ignoring -U $1" >&2
1275 *) echo "$1='undef'" >> optdef.sh;;
1286 *=*) zzz=`echo $yyy|sed 's!=.*!!'`
1290 zzz=" "`echo $yyy|sed 's!^[^=]*=!!'`
1291 yyy=`echo $yyy|sed 's!=.*!!'` ;;
1297 *:*) xxx=`echo $yyy|sed 's!:.*!!'`
1298 yyy=`echo $yyy|sed 's!^[^:]*:!!'`
1299 zzz=`echo $yyy|sed 's!^[^=]*=!!'`
1300 yyy=`echo $yyy|sed 's!=.*!!'` ;;
1301 *) xxx=`echo $yyy|sed 's!:.*!!'`
1302 yyy=`echo $yyy|sed 's!^[^:]*:!!'` ;;
1308 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1310 echo "$yyy=''" >> posthint.sh ;;
1315 echo "$yyy='$zzz'" >> posthint.sh ;;
1317 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1319 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1324 echo "$yyy=$zzz" >> posthint.sh ;;
1325 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1329 -V) echo "$me generated by metaconfig 3.0 PL70." >&2
1332 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1340 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1341 [-U symbol] [-U symbol=] [-A command:symbol...]
1342 -d : use defaults for all answers.
1343 -e : go on without questioning past the production of config.sh.
1344 -f : specify an alternate default configuration file.
1345 -h : print this help message and exit (with an error status).
1346 -r : reuse C symbols value if possible (skips costly nm extraction).
1347 -s : silent mode, only echoes questions and essential information.
1348 -D : define symbol to have some value:
1349 -D symbol symbol gets the value 'define'
1350 -D symbol=value symbol gets the value 'value'
1351 -E : stop at the end of questions, after having produced config.sh.
1352 -K : do not use unless you know what you are doing.
1353 -O : let -D and -U override definitions from loaded configuration file.
1354 -S : perform variable substitutions on all .SH files (can mix with -f)
1355 -U : undefine symbol:
1356 -U symbol symbol gets the value 'undef'
1357 -U symbol= symbol gets completely empty
1358 -A : manipulate symbol after the platform specific hints have been applied:
1359 -A symbol=value append " "value to symbol
1360 -A append:symbol=value append value to symbol
1361 -A define:symbol=value define symbol to have value
1362 -A clear:symbol define symbol to be ''
1363 -A define:symbol define symbol to be 'define'
1364 -A eval:symbol=value define symbol to be eval of value
1365 -A prepend:symbol=value prepend value to symbol
1366 -A undef:symbol define symbol to be 'undef'
1367 -A undef:symbol= define symbol to be ''
1368 -V : print version number and exit (with a zero status).
1375 case "$fastread$alldone" in
1378 case "$extractsh" in
1381 if test ! -t 0; then
1382 echo "Say 'sh Configure', not 'sh <Configure'"
1392 true) exec 1>/dev/null;;
1395 : run the defines and the undefines, if any, but leave the file out there...
1398 : create the posthint manipulation script and leave the file out there...
1403 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1404 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1405 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1406 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1407 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1410 : Some greps do not return status, grrr.
1411 echo "grimblepritz" >grimble
1412 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1414 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1420 : the following should work in any shell
1424 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1425 cat >contains <<'EOSS'
1426 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1431 : Find the path to the source tree
1434 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1437 *) src=`cd ../$src && pwd` ;;
1450 if test -f $rsrc/Configure && \
1451 $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
1453 : found it, so we are ok.
1456 for src in . .. ../.. ../../.. ../../../..; do
1457 if test -f ../$src/Configure && \
1458 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1469 Sorry, I can't seem to locate the source dir for $package. Please start
1470 Configure with an explicit path -- i.e. /some/path/Configure.
1478 echo "Sources for $package found in \"$src\"." >&4
1482 : script used to extract .SH files with variable substitutions
1483 cat >extract <<'EOS'
1485 echo "Doing variable substitutions on .SH files..."
1486 if test -f $src/MANIFEST; then
1487 set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH$'`
1489 echo "(Looking for .SH files under the source directory.)"
1490 set x `(cd $src; find . -name "*.SH" -print)`
1494 0) set x `(cd $src; echo *.SH)`; shift;;
1496 if test ! -f $src/$1; then
1502 while test $name; do
1503 if test ! -d "$name"; then
1504 create="$name $create";
1505 name=`echo $name | sed -e "s|^[^/]*$||"`;
1506 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1511 for file in $create; do
1520 dir=`expr X$file : 'X\(.*\)/'`
1521 file=`expr X$file : 'X.*/\(.*\)'`
1522 (cd $dir && . ./$file)
1532 dir=`expr X$file : 'X\(.*\)/'`
1533 file=`expr X$file : 'X.*/\(.*\)'`
1534 (set x $dir; shift; eval $mkdir_p)
1544 if test -f $src/config_h.SH; then
1545 if test ! -f config.h; then
1546 : oops, they left it out of MANIFEST, probably, so do it anyway.
1552 : extract files and exit if asked to do so
1553 case "$extractsh" in
1555 case "$realsilent" in
1559 case "$config_sh" in
1560 '') config_sh='config.sh';;
1563 echo "Fetching answers from $config_sh..."
1566 test "$override" && . ./optdef.sh
1575 : Eunice requires " " instead of "", can you believe it
1578 echo "Beginning of configuration questions for $package."
1580 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1582 : first determine how to suppress newline on echo command
1584 echo "Checking echo to see how to suppress newlines..."
1585 (echo "hi there\c" ; echo " ") >.echotmp
1586 if $contains c .echotmp >/dev/null 2>&1 ; then
1597 echo $n "The star should be here-->$c"
1601 : Now test for existence of everything in MANIFEST
1603 if test -f $rsrc/MANIFEST; then
1604 echo "First let's make sure your kit is complete. Checking..." >&4
1605 awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50
1608 for filelist in x??; do
1609 (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
1611 if test -s missing; then
1615 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1617 You have the option of continuing the configuration process, despite the
1618 distinct possibility that your kit is damaged, by typing 'y'es. If you
1619 do, don't blame me if something goes wrong. I advise you to type 'n'o
1620 and contact the author (perlbug@perl.org).
1623 echo $n "Continue? [n] $c" >&4
1627 echo "Continuing..." >&4
1631 echo "ABORTING..." >&4
1636 echo "Looks good..."
1639 echo "There is no MANIFEST file. I hope your kit is complete !"
1644 : Find the appropriate value for a newline for tr
1645 if test -n "$DJGPP"; then
1648 if test X"$trnl" = X; then
1649 case "`echo foo|tr '\n' x 2>/dev/null`" in
1653 if test X"$trnl" = X; then
1654 case "`echo foo|tr '\012' x 2>/dev/null`" in
1655 foox) trnl='\012' ;;
1658 if test X"$trnl" = X; then
1661 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1667 : compute the number of columns on the terminal for proper question formatting
1672 : set up the echo used in my read
1673 myecho="case \"\$xxxm\" in
1674 '') echo $n \"\$rp $c\" >&4;;
1676 '') echo $n \"[\$xxxm] $c\";;
1678 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
1680 echo $n \"[\$xxxm] $c\" >&4
1682 echo $n \"\$rp [\$xxxm] $c\" >&4
1688 : now set up to do reads with possible shell escape and default assignment
1694 case "\$fastread" in
1695 yes) case "\$dflt" in
1698 case "\$silent-\$rp" in
1703 *) case "\$silent" in
1704 true) case "\$rp" in
1709 while expr "X\$ans" : "X!" >/dev/null; do
1713 aok=''; eval "ans=\\"\$answ\\"" && aok=y
1721 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
1730 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
1735 echo "(OK, I'll run with -d after this question.)" >&4
1738 echo "*** Sorry, \$1 not supported yet." >&4
1748 echo "*** Substitution done -- please confirm."
1750 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
1755 echo "*** Error -- try again."
1762 case "\$ans\$xxxm\$nostick" in
1774 : create .config dir to save info across Configure sessions
1775 test -d ../.config || mkdir ../.config
1776 cat >../.config/README <<EOF
1777 This directory created by Configure to save information that should
1778 persist across sessions for $package.
1780 You may safely delete it if you wish.
1783 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
1785 $define|true|[yY]*) ;;
1786 *) case "$xversion" in
1789 *** WHOA THERE!!! ***
1791 This is an UNSTABLE DEVELOPMENT release.
1792 The version of this $package distribution is $xversion, that is, odd,
1793 (as opposed to even) and that signifies a development release.
1794 If you want a maintenance release, you want an even-numbered version.
1796 Do ***NOT*** install this into production use.
1797 Data corruption and crashes are possible.
1799 It is most seriously suggested that you do not continue any further
1800 unless you want to help in developing and debugging Perl.
1803 rp='Do you really want to continue?'
1807 [yY]) echo >&4 "Okay, continuing." ;;
1808 *) echo >&4 "Okay, bye."
1817 : general instructions
1820 user=`(logname) 2>/dev/null`
1822 '') user=`whoami 2>&1`;;
1824 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
1827 rp='Would you like to see the instructions?'
1838 This installation shell script will examine your system and ask you questions
1839 to determine how the perl5 package should be installed. If you get
1840 stuck on a question, you may use a ! shell escape to start a subshell or
1841 execute a command. Many of the questions will have default answers in square
1842 brackets; typing carriage return will give you the default.
1844 On some of the questions which ask for file or directory names you are allowed
1845 to use the ~name construct to specify the login directory belonging to "name",
1846 even if you don't have a shell which knows about that. Questions where this is
1847 allowed will be marked "(~name ok)".
1851 dflt='Type carriage return to continue'
1855 The prompter used in this script allows you to use shell variables and
1856 backticks in your answers. You may use $1, $2, etc... to refer to the words
1857 in the default answer, as if the default line was a set of arguments given to a
1858 script shell. This means you may also use $* to repeat the whole default line,
1859 so you do not have to re-type everything to add something to the default.
1861 Everytime there is a substitution, you will have to confirm. If there is an
1862 error (e.g. an unmatched backtick), the default answer will remain unchanged
1863 and you will be prompted again.
1865 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
1866 the questions and use the computed defaults (or the previous answers if there
1867 was already a config.sh file). Type 'Configure -h' for a list of options.
1868 You may also start interactively and then answer '& -d' at any prompt to turn
1869 on the non-interactive behaviour for the remainder of the execution.
1875 Much effort has been expended to ensure that this shell script will run on any
1876 Unix system. If despite that it blows up on yours, your best bet is to edit
1877 Configure and run it again. If you can't run Configure for some reason,
1878 you'll have to generate a config.sh file by hand. Whatever problems you
1879 have, let me (perlbug@perl.org) know how I blew it.
1881 This installation script affects things in two ways:
1883 1) it may do direct variable substitutions on some of the files included
1885 2) it builds a config.h file for inclusion in C programs. You may edit
1886 any of these files as the need arises after running this script.
1888 If you make a mistake on a question, there is no easy way to back up to it
1889 currently. The easiest thing to do is to edit config.sh and rerun all the SH
1890 files. Configure will offer to let you do this before it runs the SH files.
1893 dflt='Type carriage return to continue'
1895 case "$firsttime" in
1896 true) echo $user >>../.config/instruct;;
1900 : find out where common programs are
1902 echo "Locating common programs..." >&4
1915 if test -d \$dir/\$thing; then
1921 for thisthing in \$dir/\$thing; do
1922 : just loop through to pick last item
1924 if test -f \$thisthing; then
1927 elif test -f \$dir/\$thing.exe; then
1928 if test -n "$DJGPP"; then
1929 echo \$dir/\$thing.exe
1931 : on Eunice apparently
1981 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1982 pth="$pth /lib /usr/lib"
1983 for file in $loclist; do
1987 if test -f "$xxx"; then
1990 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
1991 xxx=`./loc $file $file $pth`
1994 '') xxx=`./loc $file $file $pth`;;
1995 *) xxx=`./loc $xxx $xxx $pth`;;
2001 echo $file is in $xxx.
2004 echo $file is in $xxx.
2007 echo "I don't know where '$file' is, and my life depends on it." >&4
2008 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2014 echo "Don't worry if any of the following aren't found..."
2016 for file in $trylist; do
2020 if test -f "$xxx"; then
2023 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2024 xxx=`./loc $file $file $pth`
2027 '') xxx=`./loc $file $file $pth`;;
2028 *) xxx=`./loc $xxx $xxx $pth`;;
2034 echo $file is in $xxx.
2037 echo $file is in $xxx.
2040 echo "I don't see $file out there, $say."
2047 echo "Substituting grep for egrep."
2053 echo "Substituting cp for ln."
2059 echo "Hopefully test is built into your sh."
2062 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2063 echo "Using the test built into your sh."
2071 echo "Hopefully echo is built into your sh."
2076 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2077 $echo $n "hi there$c" >foo1
2078 echo $n "hi there$c" >foo2
2079 if cmp foo1 foo2 >/dev/null 2>&1; then
2080 echo "They are compatible. In fact, they may be identical."
2087 They are not compatible! You are probably running ksh on a non-USG system.
2088 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2089 have echo built in and we may have to run some Bourne shell scripts. That
2090 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2093 $echo $n "The star should be here-->$c"
2103 cat <<'EOSC' >>checkcc
2108 int main(int argc, char *argv[]) {
2112 if $cc -o try $ccflags try.c; then
2115 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2121 case "`$cc -v -c try.c 2>&1`" in
2124 if $test X"$trygcc" = Xyes; then
2125 if gcc -o try -c try.c; then
2127 echo "You seem to have a working gcc, though." >&4
2128 rp="Would you like to use it?"
2130 if $test -f myread; then
2133 if $test -f UU/myread; then
2136 echo "Cannot find myread, sorry. Aborting." >&2
2141 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no ;;
2145 if $test X"$despair" = Xyes; then
2147 You need to find a working C compiler.
2148 Either (purchase and) install the C compiler supplied by your OS vendor,
2149 or for a free C compiler try http://gcc.gnu.org/
2150 I cannot continue any further, aborting.
2160 : determine whether symbolic links are supported
2163 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2164 echo "Symbolic links are supported." >&4
2167 echo "Symbolic links are NOT supported." >&4
2172 : determine whether symbolic links are supported
2176 echo "Checking how to test for symbolic links..." >&4
2178 if $test "X$issymlink" = X; then
2179 if $test -h sym 2>/dev/null; then
2183 if $test "X$issymlink" = X; then
2184 if $test -L sym 2>/dev/null; then
2188 if $test "X$issymlink" != X; then
2189 echo "You can test for symbolic links with $issymlink." >&4
2191 echo "I do not know how you can test for symbolic links." >&4
2195 *) echo "No symbolic links, so not testing for their testing..." >&4
2201 case "$mksymlinks" in
2204 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2207 *) case "$lns:$issymlink" in
2209 echo "Creating the symbolic links..." >&4
2210 echo "(First creating the subdirectories...)" >&4
2212 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2214 test -z "$directory" && break
2218 if test ! -d t/base; then
2219 echo "Failed to create the subdirectories. Aborting." >&4
2222 echo "(Then creating the symlinks...)" >&4
2223 awk '{print $1}' $src/MANIFEST | while true; do
2225 test -z "$filename" && break
2226 if test -f $filename; then
2227 if test $issymlink $filename; then
2231 if test -f $filename; then
2232 echo "$filename already exists, not symlinking."
2234 ln -s $src/$filename $filename
2238 if test ! -f t/base/commonsense.t; then
2239 echo "Failed to create the symlinks. Aborting." >&4
2244 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2252 : see whether [:lower:] and [:upper:] are supported character classes
2254 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2256 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2260 *) # There is a discontinuity in EBCDIC between 'I' and 'J'
2261 # (0xc9 and 0xd1), therefore that is a nice testing point.
2262 if test "X$up" = X -o "X$low" = X; then
2263 case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
2269 if test "X$up" = X -o "X$low" = X; then
2270 case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
2276 if test "X$up" = X -o "X$low" = X; then
2277 case "`echo IJ | od -x 2>/dev/null`" in
2279 echo "Hey, this might be EBCDIC." >&4
2280 if test "X$up" = X -o "X$low" = X; then
2281 case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2282 ij) up='[A-IJ-RS-Z]'
2287 if test "X$up" = X -o "X$low" = X; then
2288 case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2298 case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
2300 echo "Using $up and $low to convert case." >&4
2303 echo "I don't know how to translate letters from upper to lower case." >&4
2304 echo "Your tr is not acting any way I know of." >&4
2308 : set up the translation script tr, must be called with ./tr of course
2312 '[A-Z][a-z]') exec $tr '$up' '$low';;
2313 '[a-z][A-Z]') exec $tr '$low' '$up';;
2320 : Try to determine whether config.sh was made on this system
2321 case "$config_sh" in
2323 myuname=`$uname -a 2>/dev/null`
2324 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2325 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2326 # because the A-Z/a-z are not consecutive.
2327 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2328 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2329 newmyuname="$myuname"
2331 case "$knowitall" in
2333 if test -f ../config.sh; then
2334 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2335 eval "`grep myuname= ../config.sh`"
2337 if test "X$myuname" = "X$newmyuname"; then
2345 : Get old answers from old config file if Configure was run on the
2346 : same system, otherwise use the hints.
2349 if test -f config.sh; then
2351 rp="I see a config.sh file. Shall I use it to set the defaults?"
2354 n*|N*) echo "OK, I'll ignore it."
2355 mv config.sh config.sh.old
2356 myuname="$newmyuname"
2358 *) echo "Fetching default answers from your old config.sh file..." >&4
2366 : Older versions did not always set $sh. Catch re-use of such
2376 if test ! -f config.sh; then
2379 First time through, eh? I have some defaults handy for some systems
2380 that need some extra help getting the Configure answers right:
2383 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2385 : Half the following guesses are probably wrong... If you have better
2386 : tests or hints, please send them to perlbug@perl.org
2387 : The metaconfig authors would also appreciate a copy...
2388 $test -f /irix && osname=irix
2389 $test -f /xenix && osname=sco_xenix
2390 $test -f /dynix && osname=dynix
2391 $test -f /dnix && osname=dnix
2392 $test -f /lynx.os && osname=lynxos
2393 $test -f /unicos && osname=unicos && osvers=`$uname -r`
2394 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
2395 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
2396 $test -f /bin/mips && /bin/mips && osname=mips
2397 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
2398 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
2399 $test -d /usr/apollo/bin && osname=apollo
2400 $test -f /etc/saf/_sactab && osname=svr4
2401 $test -d /usr/include/minix && osname=minix
2402 if $test -d /MachTen -o -d /MachTen_Folder; then
2404 if $test -x /sbin/version; then
2405 osvers=`/sbin/version | $awk '{print $2}' |
2406 $sed -e 's/[A-Za-z]$//'`
2407 elif $test -x /usr/etc/version; then
2408 osvers=`/usr/etc/version | $awk '{print $2}' |
2409 $sed -e 's/[A-Za-z]$//'`
2415 $test -f /sys/posix.dll &&
2416 $test -f /usr/bin/what &&
2417 set X `/usr/bin/what /sys/posix.dll` &&
2418 $test "$3" = UWIN &&
2422 if $test -f $uname; then
2430 umips) osname=umips ;;
2433 [23]100) osname=mips ;;
2434 next*) osname=next ;;
2436 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
2437 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
2440 elif $test -f /etc/kconfig; then
2442 if test "$lns" = "$ln -s"; then
2444 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
2446 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
2453 if test -n "$DJGPP"; then
2462 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
2464 'not found') osvers="$4"."$3" ;;
2465 '<3240'|'<>3240') osvers=3.2.0 ;;
2466 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
2467 '=3250'|'>3250') osvers=3.2.5 ;;
2471 bsd386) osname=bsd386
2474 cygwin*) osname=cygwin
2477 *dc.osx) osname=dcosx
2483 domainos) osname=apollo
2489 dynixptx*) osname=dynixptx
2490 osvers=`echo "$4"|sed 's/^v//'`
2492 freebsd) osname=freebsd
2494 genix) osname=genix ;;
2496 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
2512 netbsd*) osname=netbsd
2515 news-os) osvers="$3"
2517 4*) osname=newsos4 ;;
2521 next*) osname=next ;;
2522 nonstop-ux) osname=nonstopux ;;
2523 POSIX-BC | posix-bc ) osname=posix-bc
2526 powerux | power_ux | powermax_os | powermaxos | \
2527 powerunix | power_unix) osname=powerux
2533 solaris) osname=solaris
2535 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
2542 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
2546 titanos) osname=titanos
2555 ultrix) osname=ultrix
2558 osf1|mls+) case "$5" in
2561 osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
2564 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
2567 hp*) osname=hp_osf1 ;;
2568 mips) osname=mips_osf1 ;;
2571 unixware) osname=svr5
2577 $2) case "$osname" in
2581 : svr4.x or possibly later
2591 if test -f /stand/boot ; then
2592 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
2593 if test -n "$INITPROG" -a -f "$INITPROG"; then
2594 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
2595 if test -n "$isesix"; then
2603 *) if test -f /etc/systemid; then
2605 set `echo $3 | $sed 's/\./ /g'` $4
2606 if $test -f $src/hints/sco_$1_$2_$3.sh; then
2608 elif $test -f $src/hints/sco_$1_$2.sh; then
2610 elif $test -f $src/hints/sco_$1.sh; then
2615 '') : Still unknown. Probably a generic Sys V.
2624 *) case "$osname" in
2625 '') : Still unknown. Probably a generic BSD.
2633 if test -f /vmunix -a -f $src/hints/news_os.sh; then
2634 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
2635 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
2638 $rm -f UU/kernel.what
2639 elif test -d c:/.; then
2646 : Now look for a hint file osname_osvers, unless one has been
2647 : specified already.
2650 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
2651 : Also try without trailing minor version numbers.
2652 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
2653 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
2654 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
2655 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
2658 *) case "$osvers" in
2661 *) if $test -f $src/hints/$file.sh ; then
2663 elif $test -f $src/hints/$xfile.sh ; then
2665 elif $test -f $src/hints/$xxfile.sh ; then
2667 elif $test -f $src/hints/$xxxfile.sh ; then
2669 elif $test -f $src/hints/$xxxxfile.sh ; then
2671 elif $test -f "$src/hints/${osname}.sh" ; then
2680 if $test -f Policy.sh ; then
2683 none) dflt="Policy" ;;
2684 *) dflt="Policy $dflt" ;;
2689 dflt=`echo $hintfile | $sed 's/\.sh$//'`
2693 if $test -f Policy.sh ; then
2696 There's also a Policy hint file available, which should make the
2697 site-specific (policy) questions easier to answer.
2704 You may give one or more space-separated answers, or "none" if appropriate.
2705 A well-behaved OS will have no hints, so answering "none" or just "Policy"
2706 is a good thing. DO NOT give a wrong version or a wrong OS.
2710 rp="Which of these apply, if any?"
2713 for file in $tans; do
2714 if $test X$file = XPolicy -a -f Policy.sh; then
2716 $cat Policy.sh >> UU/config.sh
2717 elif $test -f $src/hints/$file.sh; then
2718 . $src/hints/$file.sh
2719 $cat $src/hints/$file.sh >> UU/config.sh
2720 elif $test X$tans = X -o X$tans = Xnone ; then
2723 : Give one chance to correct a possible typo.
2724 echo "$file.sh does not exist"
2726 rp="hint to use instead?"
2728 for file in $ans; do
2729 if $test -f "$src/hints/$file.sh"; then
2730 . $src/hints/$file.sh
2731 $cat $src/hints/$file.sh >> UU/config.sh
2732 elif $test X$ans = X -o X$ans = Xnone ; then
2735 echo "$file.sh does not exist -- ignored."
2742 : Remember our hint file for later.
2743 if $test -f "$src/hints/$file.sh" ; then
2753 echo "Fetching default answers from $config_sh..." >&4
2757 cp $config_sh config.sh 2>/dev/null
2767 test "$override" && . ./optdef.sh
2769 : Restore computed paths
2770 for file in $loclist $trylist; do
2771 eval $file="\$_$file"
2776 Configure uses the operating system name and version to set some defaults.
2777 The default value is probably right if the name rings a bell. Otherwise,
2778 since spelling matters for me, either accept the default or answer "none"
2785 ''|' '|none) dflt=none ;;
2786 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
2789 *) dflt="$osname" ;;
2791 rp="Operating system name?"
2795 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
2801 ''|' '|none) dflt=none ;;
2802 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
2803 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
2805 ''|' ') dflt=none ;;
2810 *) dflt="$osvers" ;;
2812 rp="Operating system version?"
2822 : who configured the system
2823 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
2824 cf_by=`(logname) 2>/dev/null`
2827 cf_by=`(whoami) 2>/dev/null`
2829 "") cf_by=unknown ;;
2833 : set up the script used to warn in case of inconsistency
2840 echo "*** WHOA THERE!!! ***" >&4
2841 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
2842 rp=" Keep the $hint value?"
2845 y) td=$was; tu=$was;;
2849 : function used to set $1 to $val
2850 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
2852 $define$undef) . ./whoa; eval "$var=\$td";;
2853 $undef$define) . ./whoa; eval "$var=\$tu";;
2854 *) eval "$var=$val";;
2857 case "$usethreads" in
2858 $define|true|[yY]*) dflt='y';;
2863 Perl can be built to take advantage of threads on some systems.
2864 To do so, Configure can be run with -Dusethreads.
2866 Note that threading is a highly experimental feature, and
2867 some known race conditions still remain. If you choose to try
2868 it, be very sure to not actually deploy it for production
2869 purposes. README.threads has more details, and is required
2870 reading if you enable threads.
2872 If this doesn't make any sense to you, just accept the default '$dflt'.
2874 rp='Build a threading Perl?'
2877 y|Y) val="$define" ;;
2883 case "$usethreads" in
2887 As of 5.5.640, Perl has two different internal threading implementations,
2888 the 5.005 version (5005threads) and an interpreter-based version
2889 (ithreads) that has one interpreter per thread. Both are very
2890 experimental. This arrangement exists to help developers work out
2891 which one is better.
2893 If you're a casual user, you probably don't want interpreter-threads
2894 at this time. There doesn't yet exist a way to create threads from
2895 within Perl in this model, i.e., "use Thread;" will NOT work.
2897 : Default to ithreads unless overridden on command line or with
2900 case "$use5005threads" in
2901 $define|true|[yY]*) dflt='n';;
2903 case "$useithreads" in
2904 $undef|false|[nN]*) dflt='n';;
2906 rp='Use interpreter-based ithreads?'
2909 y|Y) val="$define" ;;
2914 : Now set use5005threads to the opposite value.
2915 case "$useithreads" in
2916 $define) val="$undef" ;;
2923 useithreads="$undef"
2924 use5005threads="$undef"
2928 case "$d_oldpthreads" in
2929 '') : Configure tests would be welcome here. For now, assume undef.
2931 *) val="$d_oldpthreads" ;;
2937 case "$usethreads" in
2938 "$define"|true|[yY]*)
2939 : Look for a hint-file generated 'call-back-unit'. If the
2940 : user has specified that a threading perl is to be built,
2941 : we may need to set or change some other defaults.
2942 if $test -f usethreads.cbu; then
2943 echo "Your platform has some specific hints for threaded builds, using them..."
2947 (Your platform doesn't have any specific hints for threaded builds.
2948 Assuming POSIX threads, then.)
2956 Perl can be built so that multiple Perl interpreters can coexist
2957 within the same Perl executable.
2960 case "$useithreads" in
2963 This multiple interpreter support is required for interpreter-based threads.
2967 *) case "$usemultiplicity" in
2968 $define|true|[yY]*) dflt='y';;
2972 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
2973 rp='Build Perl for multiplicity?'
2976 y|Y) val="$define" ;;
2984 : make some quick guesses about what we are up against
2986 $echo $n "Hmm... $c"
2996 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
2997 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
2999 echo "Looks kind of like an OSF/1 system, but we'll see..."
3001 elif test `echo abc | $tr a-z A-Z` = Abc ; then
3002 xxx=`./loc addbib blurfl $pth`
3003 if $test -f $xxx; then
3004 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3008 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3009 echo "Looks kind of like an extended USG system, but we'll see..."
3011 echo "Looks kind of like a USG system, but we'll see..."
3015 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3016 echo "Looks kind of like a BSD system, but we'll see..."
3020 echo "Looks kind of like a Version 7 system, but we'll see..."
3023 case "$eunicefix" in
3026 There is, however, a strange, musty smell in the air that reminds me of
3027 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3031 : it so happens the Eunice I know will not run shell scripts in Unix format
3035 echo "Congratulations. You aren't running Eunice."
3039 : Detect OS2. The p_ variable is set above in the Head.U unit.
3040 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
3041 : semicolon as a patch separator
3046 I have the feeling something is not exactly right, however...don't tell me...
3047 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3048 (Or you may be running DOS with DJGPP.)
3053 if test -f /xenix; then
3054 echo "Actually, this looks more like a XENIX system..."
3059 echo "It's not Xenix..."
3064 if test -f /venix; then
3065 echo "Actually, this looks more like a VENIX system..."
3072 echo "Nor is it Venix..."
3075 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3076 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3083 rp="Use which C compiler?"
3086 : Look for a hint-file generated 'call-back-unit'. Now that the
3087 : user has specified the compiler, we may need to set or change some
3089 if $test -f cc.cbu; then
3095 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3096 $cat >gccvers.c <<EOM
3101 printf("%s\n", __VERSION__);
3103 printf("%s\n", "1");
3109 if $cc -o gccvers $ldflags gccvers.c; then
3110 gccversion=`./gccvers`
3111 case "$gccversion" in
3112 '') echo "You are not using GNU cc." ;;
3113 *) echo "You are using GNU cc $gccversion."
3119 echo "*** WHOA THERE!!! ***" >&4
3120 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3121 case "$knowitall" in
3123 echo " You'd better start hunting for one and let me know about it." >&4
3129 case "$gccversion" in
3130 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3132 case "$gccversion" in
3133 '') gccosandvers='' ;;
3134 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3135 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3137 case "$gccosandvers" in
3138 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3139 $osname$osvers) ;; # looking good
3140 $osname*) cat <<EOM >&4
3142 *** WHOA THERE!!! ***
3144 Your gcc has not been compiled for the exact release of
3145 your operating system ($gccosandvers versus $osname$osvers).
3147 In general it is a good idea to keep gcc synchronized with
3148 the operating system because otherwise serious problems
3149 may ensue when trying to compile software, like Perl.
3151 I'm trying to be optimistic here, though, and will continue.
3152 If later during the configuration and build icky compilation
3153 problems appear (headerfile conflicts being the most common
3154 manifestation), I suggest reinstalling the gcc to match
3155 your operating system release.
3159 *) gccosandvers='' ;; # failed to parse, better be silent
3167 : see how we invoke the C preprocessor
3169 echo "Now, how can we feed standard input to your C preprocessor..." >&4
3170 cat <<'EOT' >testcpp.c
3176 if test ! -f cppstdin; then
3177 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
3178 # AIX cc -E doesn't show the absolute headerfile
3179 # locations but we'll cheat by using the -M flag.
3180 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
3182 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
3185 echo "Keeping your $hint cppstdin wrapper."
3188 wrapper=`pwd`/cppstdin
3192 if $test "X$cppstdin" != "X" && \
3193 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
3194 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
3196 echo "You used to use $cppstdin $cppminus so we'll use that again."
3198 '') echo "But let's see if we can live without a wrapper..." ;;
3200 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
3201 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
3203 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
3206 echo "(However, $cpprun $cpplast does not work, let's see...)"
3214 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
3221 elif echo 'Maybe "'"$cc"' -E" will work...'; \
3222 $cc -E <testcpp.c >testcpp.out 2>&1; \
3223 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3224 echo "Yup, it does."
3227 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
3228 $cc -E - <testcpp.c >testcpp.out 2>&1; \
3229 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3230 echo "Yup, it does."
3233 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
3234 $cc -P <testcpp.c >testcpp.out 2>&1; \
3235 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3236 echo "Yipee, that works!"
3239 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
3240 $cc -P - <testcpp.c >testcpp.out 2>&1; \
3241 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3242 echo "At long last!"
3245 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
3246 $cpp <testcpp.c >testcpp.out 2>&1; \
3247 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3251 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
3252 $cpp - <testcpp.c >testcpp.out 2>&1; \
3253 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3254 echo "Hooray, it works! I was beginning to wonder."
3257 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
3258 $wrapper <testcpp.c >testcpp.out 2>&1; \
3259 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3265 rp="No dice. I can't find a C preprocessor. Name one:"
3269 $x_cpp <testcpp.c >testcpp.out 2>&1
3270 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3271 echo "OK, that will do." >&4
3273 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
3288 echo "Perhaps can we force $cc -E using a wrapper..."
3289 if $wrapper <testcpp.c >testcpp.out 2>&1; \
3290 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
3296 echo "Nope, we'll have to live without it..."
3310 "$wrapper"|'cppstdin') ;;
3311 *) $rm -f $wrapper;;
3313 $rm -f testcpp.c testcpp.out
3315 : decide how portable to be. Allow command line overrides.
3316 case "$d_portable" in
3318 *) d_portable="$define" ;;
3321 : set up shell script to do ~ expansion
3327 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3330 if $test -f /bin/csh; then
3331 /bin/csh -f -c "glob \$1"
3336 name=\`$expr x\$1 : '..\([^/]*\)'\`
3337 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3338 if $test ! -d "\$dir"; then
3340 echo "\$me: can't locate home directory for: \$name" >&2
3345 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3361 : now set up to get a file name
3365 cat <<'EOSC' >>getfile
3381 expr $fn : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3382 fn=`echo $fn | sed 's/(.*)//'`
3388 loc_file=`expr $fn : '.*:\(.*\)'`
3389 fn=`expr $fn : '\(.*\):.*'`
3397 */*) fullpath=true;;
3406 *e*) exp_file=true;;
3409 *p*) nopath_ok=true;;
3414 *d*) type='Directory';;
3415 *l*) type='Locate';;
3420 Locate) what='File';;
3425 case "$d_portable" in
3433 while test "$type"; do
3438 true) rp="$rp (~name ok)";;
3441 if test -f UU/getfile.ok && \
3442 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3461 value=`UU/filexp $ans`
3464 if test "$ans" != "$value"; then
3465 echo "(That expands to $value on this system.)"
3479 /*) value="$ansexp" ;;
3480 [a-zA-Z]:/*) value="$ansexp" ;;
3485 echo "I shall only accept a full path name, as in /bin/ls." >&4
3486 echo "Use a ! shell escape if you wish to check pathnames." >&4
3489 echo "Please give a full path name, starting with slash." >&4
3492 echo "Note that using ~name is ok provided it expands well." >&4
3505 for fp in $gfpth; do
3506 if test "X$fp" = X.; then
3511 if test -f "$pf"; then
3513 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
3515 echo "($value is not a plain file, but that's ok.)"
3518 if test X"$type" = X; then
3525 for fp in $gfpth; do
3526 if test "X$fp" = X.; then
3531 direxp="$fp/$ansexp"
3533 if test -d "$direxp"; then
3541 if test -d "$ansexp"; then
3542 echo "(Looking for $loc_file in directory $value.)"
3543 value="$value/$loc_file"
3544 ansexp="$ansexp/$loc_file"
3546 if test -f "$ansexp"; then
3549 case "$nopath_ok" in
3550 true) case "$value" in
3552 *) echo "Assuming $value will be in people's path."
3568 if test "$fastread" = yes; then
3573 rp="$what $value doesn't exist. Use that name anyway?"
3592 test "X$gfpthkeep" != Xy && gfpth=""
3595 : What should the include directory be ?
3597 $echo $n "Hmm... $c"
3601 if $test -f /bin/mips && /bin/mips; then
3602 echo "Looks like a MIPS system..."
3603 $cat >usr.c <<'EOCP'
3604 #ifdef SYSTYPE_BSD43
3608 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
3609 dflt='/bsd43/usr/include'
3613 mips_type='System V'
3615 $rm -f usr.c usr.out
3616 echo "and you're compiling with the $mips_type compiler and libraries."
3620 echo "Doesn't look like a MIPS system."
3630 case "$xxx_prompt" in
3633 rp='Where are the include files you want to use?'
3641 : Set private lib path
3644 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
3649 '') dlist="$loclibpth $plibpth $glibpth";;
3650 *) dlist="$libpth";;
3653 : Now check and see which directories actually exist, avoiding duplicates
3657 if $test -d $xxx; then
3660 *) libpth="$libpth $xxx";;
3666 Some systems have incompatible or broken versions of libraries. Among
3667 the directories listed in the question below, please remove any you
3668 know not to be holding relevant libraries, and add any that are needed.
3669 Say "none" for none.
3680 rp="Directories to use for library searches?"
3687 : compute shared library extension
3690 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
3700 On some systems, shared libraries may be available. Answer 'none' if
3701 you want to suppress searching of shared libraries for the remainder
3702 of this configuration.
3705 rp='What is the file extension used for shared libraries?'
3709 : Define several unixisms.
3710 : Hints files or command line option can be used to override them.
3711 : The convoluted testing is in case hints files set either the old
3714 '') case "$exe_ext" in
3716 *) _exe="$exe_ext" ;;
3721 '') case "$lib_ext" in
3728 '') case "$obj_ext" in
3735 '') case "$path_sep" in
3746 : Which makefile gets called first. This is used by make depend.
3747 case "$firstmakefile" in
3748 '') firstmakefile='makefile';;
3752 $define|true|[yY]*) dflt='y';;
3757 Perl can be built to use the SOCKS proxy protocol library. To do so,
3758 Configure must be run with -Dusesocks. If you use SOCKS you also need
3759 to use the PerlIO abstraction layer, this will be implicitly selected.
3761 If this doesn't make any sense to you, just accept the default '$dflt'.
3763 rp='Build Perl for SOCKS?'
3766 y|Y) val="$define" ;;
3773 $define|true|[yY]*) useperlio="$define";;
3776 : Looking for optional libraries
3778 echo "Checking for optional libraries..." >&4
3783 case "$libswanted" in
3784 '') libswanted='c_s';;
3787 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
3793 for thisdir in $libpth $xlibpth; do
3794 test -d $thisdir && libspath="$libspath $thisdir"
3796 for thislib in $libswanted; do
3797 for thisdir in $libspath; do
3799 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
3800 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|tail -1`
3801 $test -f "$xxx" && eval $libscheck
3802 $test -f "$xxx" && libstyle=shared
3804 if test ! -f "$xxx"; then
3805 xxx=$thisdir/lib$thislib.$so
3806 $test -f "$xxx" && eval $libscheck
3807 $test -f "$xxx" && libstyle=shared
3809 if test ! -f "$xxx"; then
3810 xxx=$thisdir/lib$thislib$_a
3811 $test -f "$xxx" && eval $libscheck
3812 $test -f "$xxx" && libstyle=static
3814 if test ! -f "$xxx"; then
3815 xxx=$thisdir/$thislib$_a
3816 $test -f "$xxx" && eval $libscheck
3817 $test -f "$xxx" && libstyle=static
3819 if test ! -f "$xxx"; then
3820 xxx=$thisdir/lib${thislib}_s$_a
3821 $test -f "$xxx" && eval $libscheck
3822 $test -f "$xxx" && libstyle=static
3823 $test -f "$xxx" && thislib=${thislib}_s
3825 if test ! -f "$xxx"; then
3826 xxx=$thisdir/Slib$thislib$_a
3827 $test -f "$xxx" && eval $libscheck
3828 $test -f "$xxx" && libstyle=static
3830 if $test -f "$xxx"; then
3832 shared) echo "Found -l$thislib (shared)." ;;
3833 static) echo "Found -l$thislib." ;;
3834 *) echo "Found -l$thislib ($libstyle)." ;;
3838 *) dflt="$dflt -l$thislib"
3839 libsfound="$libsfound $xxx"
3841 libsfiles="$libsfiles $yyy"
3842 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
3843 case " $libsdirs " in
3845 *) libsdirs="$libsdirs $yyy" ;;
3852 if $test ! -f "$xxx"; then
3853 echo "No -l$thislib."
3864 ' '|'') dflt='none';;
3869 In order to compile $package on your machine, a number of libraries
3870 are usually needed. Include any other special libraries here as well.
3871 Say "none" for none. The default list is almost always right.
3875 rp="What libraries to use?"
3882 : determine optimization, if desired, or use for debug flag also
3884 ' '|$undef) dflt='none';;
3886 *) dflt="$optimize";;
3890 By default, $package compiles with the -O flag to use the optimizer.
3891 Alternately, you might want to use the symbolic debugger, which uses
3892 the -g flag (on traditional Unix systems). Either flag can be
3893 specified here. To use neither flag, specify the word "none".
3896 rp="What optimizer/debugger flag should be used?"
3900 'none') optimize=" ";;
3904 : We will not override a previous value, but we might want to
3905 : augment a hint file
3907 default|recommended)
3908 case "$gccversion" in
3909 1*) dflt='-fpcc-struct-return' ;;
3912 *-g*) dflt="$dflt -DDEBUGGING";;
3914 case "$gccversion" in
3915 2*) if test -d /etc/conf/kconfig.d &&
3916 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
3922 case "$gccversion" in
3926 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
3927 echo 'int main(void) { return 0; }' > gcctest.c
3928 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
3929 echo "Yes, it does." 2>&1
3932 echo "Leaving current flags $ccflags alone." 2>&1
3934 *) dflt="$dflt -fno-strict-aliasing" ;;
3937 echo "Nope, it doesn't, but that's ok." 2>&1
3944 case "$mips_type" in
3945 *BSD*|'') inclwanted="$locincpth $usrinc";;
3946 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
3948 for thisincl in $inclwanted; do
3949 if $test -d $thisincl; then
3950 if $test x$thisincl != x$usrinc; then
3952 *" -I$thisincl "*);;
3953 *) dflt="$dflt -I$thisincl ";;
3959 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
3961 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
3969 *) dflt="$dflt -D$2";;
3973 set signal.h LANGUAGE_C; eval $inctest
3977 ccflags="$ccflags -DSOCKS"
3982 default|recommended) dflt="$ccflags $dflt" ;;
3983 *) dflt="$ccflags";;
3992 Your C compiler may want other flags. For this question you should include
3993 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
3994 but you should NOT include libraries or ld flags like -lwhatever. If you
3995 want $package to honor its debug switch, you should include -DDEBUGGING here.
3996 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
3998 To use no flags, specify the word "none".
4004 rp="Any additional cc flags?"
4011 : the following weeds options from ccflags that are of no interest to cpp
4013 case "$gccversion" in
4014 1*) cppflags="$cppflags -D__GNUC__"
4016 case "$mips_type" in
4018 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4024 echo "Let me guess what the preprocessor flags are..." >&4
4038 *) ftry="$previous $flag";;
4040 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4041 >cpp1.out 2>/dev/null && \
4042 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4043 >cpp2.out 2>/dev/null && \
4044 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4045 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4047 cppflags="$cppflags $ftry"
4057 *-*) echo "They appear to be: $cppflags";;
4059 $rm -f cpp.c cpp?.out
4063 : flags used in final linking phase
4065 '') if ./venix; then
4071 *-posix*) dflt="$dflt -posix" ;;
4074 *) dflt="$ldflags";;
4077 : Try to guess additional flags to pick up local libraries.
4078 for thislibdir in $libpth; do
4079 case " $loclibpth " in
4082 *"-L$thislibdir "*) ;;
4083 *) dflt="$dflt -L$thislibdir" ;;
4095 Your C linker may need flags. For this question you should
4096 include -L/whatever and any other flags used by the C linker, but you
4097 should NOT include libraries like -lwhatever.
4099 Make sure you include the appropriate -L/path flags if your C linker
4100 does not normally search all of the directories you specified above,
4103 To use no flags, specify the word "none".
4107 rp="Any additional ld flags (NOT including libraries)?"
4113 rmlist="$rmlist pdp11"
4117 echo "Checking your choice of C compiler and flags for coherency..." >&4
4118 $cat > try.c <<'EOF'
4120 int main() { printf("Ok\n"); exit(0); }
4122 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
4124 $cat >try.msg <<'EOM'
4125 I've tried to compile and run the following simple program:
4128 $cat try.c >> try.msg
4130 $cat >> try.msg <<EOM
4137 and I got the following output:
4141 if sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
4142 if sh -c './try' >>try.msg 2>&1; then
4146 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4149 cat >> try.msg <<'EOQS'
4150 If $libs contains -lsfio, and sfio is mis-configured, then it
4151 sometimes (apparently) runs and exits with a 0 status, but with no
4152 output! It may have to do with sfio's use of _exit vs. exit.
4155 rp="You have a big problem. Shall I abort Configure"
4162 echo "The program compiled OK, but exited with status $?." >>try.msg
4163 rp="You have a problem. Shall I abort Configure"
4167 echo "I can't compile the test program." >>try.msg
4168 rp="You have a BIG problem. Shall I abort Configure"
4174 case "$knowitall" in
4176 echo "(The supplied flags or libraries might be incorrect.)"
4184 *) echo "Ok. Stopping Configure." >&4
4189 n) echo "OK, that should do.";;
4191 $rm -f try try.* core
4193 : define an is-a-typedef? function
4194 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
4196 "") inclist="sys/types.h";;
4198 eval "varval=\$$var";
4202 for inc in $inclist; do
4203 echo "#include <$inc>" >>temp.c;
4205 echo "#ifdef $type" >> temp.c;
4206 echo "printf(\"We have $type\");" >> temp.c;
4207 echo "#endif" >> temp.c;
4208 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
4209 if $contains $type temp.E >/dev/null 2>&1; then
4215 *) eval "$var=\$varval";;
4218 : define an is-a-typedef? function that prompts if the type is not available.
4219 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
4221 "") inclist="sys/types.h";;
4223 eval "varval=\$$var";
4227 for inc in $inclist; do
4228 echo "#include <$inc>" >>temp.c;
4230 echo "#ifdef $type" >> temp.c;
4231 echo "printf(\"We have $type\");" >> temp.c;
4232 echo "#endif" >> temp.c;
4233 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
4235 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
4236 if $contains $type temp.E >/dev/null 2>&1; then
4237 echo "$type found." >&4;
4240 echo "$type NOT found." >&4;
4246 *) eval "$var=\$varval";;
4249 : define a shorthand compile call
4253 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
4254 : define a shorthand compile call for compilations that should be ok.
4258 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
4260 : check for lengths of integral types
4264 echo "Checking to see how big your integers are..." >&4
4265 $cat >intsize.c <<'EOCP'
4269 printf("intsize=%d;\n", (int)sizeof(int));
4270 printf("longsize=%d;\n", (int)sizeof(long));
4271 printf("shortsize=%d;\n", (int)sizeof(short));
4276 if eval $compile_ok && ./intsize > /dev/null; then
4278 echo "Your integers are $intsize bytes long."
4279 echo "Your long integers are $longsize bytes long."
4280 echo "Your short integers are $shortsize bytes long."
4284 Help! I can't compile and run the intsize test program: please enlighten me!
4285 (This is probably a misconfiguration in your system or libraries, and
4286 you really ought to fix it. Still, I'll try anyway.)
4290 rp="What is the size of an integer (in bytes)?"
4294 rp="What is the size of a long integer (in bytes)?"
4298 rp="What is the size of a short integer (in bytes)?"
4304 $rm -f intsize intsize.*
4306 : see what type lseek is declared as in the kernel
4307 rp="What is the type used for lseek's offset on this system?"
4308 set off_t lseektype long stdio.h sys/types.h
4312 echo "Checking to see how big your file offsets are..." >&4
4314 #include <sys/types.h>
4318 printf("%d\n", (int)sizeof($lseektype));
4323 if eval $compile_ok; then
4325 echo "Your file offsets are $lseeksize bytes long."
4329 echo "(I can't seem to compile the test program. Guessing...)"
4330 rp="What is the size of your file offsets (in bytes)?"
4336 : see what type file positions are declared as in the library
4337 rp="What is the type for file position used by fsetpos()?"
4338 set fpos_t fpostype long stdio.h sys/types.h
4343 *_t) zzz="$fpostype" ;;
4346 echo "Checking the size of $zzz..." >&4
4348 #include <sys/types.h>
4351 printf("%d\n", (int)sizeof($fpostype));
4356 if eval $compile_ok; then
4360 echo "(I can't execute the test program--guessing $fpossize.)" >&4
4363 echo "Your $zzz is $fpossize bytes long."
4369 echo "(I can't compile the test program. Guessing...)" >&4
4370 rp="What is the size of your file positions (in bytes)?"
4377 # Backward compatibility (uselfs is deprecated).
4379 "$define"|true|[yY]*)
4382 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
4384 uselargefiles="$define"
4388 case "$lseeksize:$fpossize" in
4391 You can have files larger than 2 gigabytes.
4394 *) case "$uselargefiles" in
4395 "$undef"|false|[nN]*) dflt='n' ;;
4400 Perl can be built to understand large files (files larger than 2 gigabytes)
4401 on some systems. To do so, Configure can be run with -Duselargefiles.
4403 If this doesn't make any sense to you, just accept the default '$dflt'.
4405 rp='Try to understand large files, if available?'
4408 y|Y) val="$define" ;;
4415 case "$uselargefiles" in
4417 : Look for a hint-file generated 'call-back-unit'. If the
4418 : user has specified that a large files perl is to be built,
4419 : we may need to set or change some other defaults.
4420 if $test -f uselargefiles.cbu; then
4421 echo "Your platform has some specific hints for large file builds, using them..."
4422 . ./uselargefiles.cbu
4424 echo "Rechecking to see how big your file offsets are..." >&4
4426 #include <sys/types.h>
4430 printf("%d\n", (int)sizeof($lseektype));
4435 if eval $compile_ok; then
4437 $echo "Your file offsets are now $lseeksize bytes long."
4441 echo "(I can't seem to compile the test program. Guessing...)"
4442 rp="What is the size of your file offsets (in bytes)?"
4447 *_t) zzz="$fpostype" ;;
4450 $echo $n "Rechecking the size of $zzz...$c" >&4
4452 #include <sys/types.h>
4455 printf("%d\n", (int)sizeof($fpostype));
4460 if eval $compile_ok; then
4465 echo "(I can't execute the test program--guessing $fpossize.)" >&4
4468 echo " $fpossize bytes." >&4
4474 echo "(I can't compile the test program. Guessing...)" >&4
4475 rp="What is the size of your file positions (in bytes)?"
4485 case "$usemorebits" in
4486 "$define"|true|[yY]*)
4487 use64bitint="$define"
4488 uselongdouble="$define"
4489 usemorebits="$define"
4491 *) usemorebits="$undef"
4496 case "$uselonglong" in
4497 "$define"|true|[yY]*)
4500 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
4502 use64bitint="$define"
4505 case "$use64bits" in
4506 "$define"|true|[yY]*)
4509 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
4511 use64bitint="$define"
4514 case "$use64bitints" in
4515 "$define"|true|[yY]*)
4518 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
4520 use64bitint="$define"
4523 case "$use64bitsint" in
4524 "$define"|true|[yY]*)
4527 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
4529 use64bitint="$define"
4532 case "$uselonglongs" in
4533 "$define"|true|[yY]*)
4536 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
4538 use64bitint="$define"
4541 case "$use64bitsall" in
4542 "$define"|true|[yY]*)
4545 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
4547 use64bitall="$define"
4552 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
4554 case "$use64bitall" in
4555 "$define"|true|[yY]*) use64bitint="$define" ;;
4561 You have natively 64-bit long integers.
4565 *) case "$use64bitint" in
4566 "$define"|true|[yY]*) dflt='y';;
4571 Perl can be built to take advantage of 64-bit integer types
4572 on some systems. To do so, Configure can be run with -Duse64bitint.
4573 Choosing this option will most probably introduce binary incompatibilities.
4575 If this doesn't make any sense to you, just accept the default '$dflt'.
4577 rp='Try to use 64-bit integers, if available?'
4580 [yY]*) val="$define" ;;
4588 case "$use64bitall" in
4589 "$define"|true|[yY]*) dflt='y' ;;
4590 *) case "$longsize" in
4598 You may also choose to try maximal 64-bitness. It means using as much
4599 64-bitness as possible on the platform. This in turn means even more
4600 binary incompatibilities. On the other hand, your platform may not
4601 have any more 64-bitness available than what you already have chosen.
4603 If this doesn't make any sense to you, just accept the default '$dflt'.
4605 rp='Try to use maximal 64-bit support, if available?'
4608 [yY]*) val="$define" ;;
4613 case "$use64bitall" in
4615 case "$use64bitint" in
4619 Since you have chosen a maximally 64-bit build, I'm also turning on
4620 the use of 64-bit integers.
4622 use64bitint="$define" ;;
4627 case "$use64bitint" in
4628 "$define"|true|[yY]*)
4629 : Look for a hint-file generated 'call-back-unit'. If the
4630 : user has specified that a 64-bit perl is to be built,
4631 : we may need to set or change some other defaults.
4632 if $test -f use64bitint.cbu; then
4633 echo "Your platform has some specific hints for 64-bit integers, using them..."
4637 4) case "$archname64" in
4638 '') archname64=64int ;;
4645 case "$use64bitall" in
4646 "$define"|true|[yY]*)
4647 : Look for a hint-file generated 'call-back-unit'. If the
4648 : user has specified that a maximally 64-bit perl is to be built,
4649 : we may need to set or change some other defaults.
4650 if $test -f use64bitall.cbu; then
4651 echo "Your platform has some specific hints for 64-bit builds, using them..."
4655 4) case "$archname64" in
4656 ''|64int) archname64=64all ;;
4664 echo "Checking for GNU C Library..." >&4
4665 cat >gnulibc.c <<EOM
4677 if eval $compile_ok && ./gnulibc; then
4679 echo "You are using the GNU C Library"
4682 echo "You are not using the GNU C Library"
4688 : see if nm is to be used to determine whether a symbol is defined or not
4692 case "$d_gnulibc" in
4695 echo "nm probably won't work on the GNU C Library." >&4
4701 if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
4703 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
4704 echo "'nm' won't be sufficient on this sytem." >&4
4710 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
4711 if $test $dflt -gt 20; then
4721 true|$define) dflt=y;;
4728 I can use $nm to extract the symbols from your C libraries. This
4729 is a time consuming task which may generate huge output on the disk (up
4730 to 3 megabytes) but that should make the symbols extraction faster. The
4731 alternative is to skip the 'nm' extraction part and to compile a small
4732 test program instead to determine whether each symbol is present. If
4733 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
4734 this may be the best solution.
4736 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
4739 rp="Shall I use $nm to extract C symbols from the libraries?"
4742 [Nn]*) usenm=false;;
4751 : nm options which may be necessary
4753 '') if $test -f /mach_boot; then
4755 elif $test -d /usr/ccs/lib; then
4756 nm_opt='-p' # Solaris (and SunOS?)
4757 elif $test -f /dgux; then
4759 elif $test -f /lib64/rld; then
4760 nm_opt='-p' # 64-bit Irix
4766 : nm options which may be necessary for shared libraries but illegal
4767 : for archive libraries. Thank you, Linux.
4768 case "$nm_so_opt" in
4769 '') case "$myuname" in
4771 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
4772 nm_so_opt='--dynamic'
4781 : get list of predefined functions in a handy place
4786 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
4793 *) for thislib in $libs; do
4796 : Handle C library specially below.
4799 thislib=`echo $thislib | $sed -e 's/^-l//'`
4800 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
4802 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
4804 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
4806 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
4808 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
4810 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
4812 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
4817 libnames="$libnames $try"
4819 *) libnames="$libnames $thislib" ;;
4828 for xxx in $libpth; do
4829 $test -r $1 || set $xxx/libc.$so
4830 : The messy sed command sorts on library version numbers.
4832 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
4833 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
4835 s/[0-9][0-9]*/0000&/g
4836 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
4839 $sort | $sed -e 's/^.* //'`
4842 $test -r $1 || set /usr/ccs/lib/libc.$so
4843 $test -r $1 || set /lib/libsys_s$_a
4849 if $test -r "$1"; then
4850 echo "Your (shared) C library seems to be in $1."
4852 elif $test -r /lib/libc && $test -r /lib/clib; then
4853 echo "Your C library seems to be in both /lib/clib and /lib/libc."
4855 libc='/lib/clib /lib/libc'
4856 if $test -r /lib/syslib; then
4857 echo "(Your math library is in /lib/syslib.)"
4858 libc="$libc /lib/syslib"
4860 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
4861 echo "Your C library seems to be in $libc, as you said before."
4862 elif $test -r $incpath/usr/lib/libc$_a; then
4863 libc=$incpath/usr/lib/libc$_a;
4864 echo "Your C library seems to be in $libc. That's fine."
4865 elif $test -r /lib/libc$_a; then
4867 echo "Your C library seems to be in $libc. You're normal."
4869 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
4871 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
4872 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
4873 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
4875 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
4877 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
4880 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
4882 if $test -r "$tans"; then
4883 echo "Your C library seems to be in $tans, of all places."
4889 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
4893 If the guess above is wrong (which it might be if you're using a strange
4894 compiler, or your machine supports multiple models), you can override it here.
4899 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
4901 I can't seem to find your C library. I've looked in the following places:
4904 $sed 's/^/ /' libpath
4907 None of these seems to contain your C library. I need to get its name...
4912 rp='Where is your C library?'
4917 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
4918 set X `cat libnames`
4921 case $# in 1) xxx=file; esac
4922 echo "Extracting names from the following $xxx for later perusal:" >&4
4924 $sed 's/^/ /' libnames >&4
4926 $echo $n "This may take a while...$c" >&4
4930 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
4931 *) $nm $nm_opt $file 2>/dev/null;;
4936 $grep fprintf libc.tmp > libc.ptf
4937 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
4938 xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
4940 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
4942 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4944 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
4946 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4948 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
4950 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4952 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
4954 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4956 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
4958 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4960 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
4962 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4964 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
4965 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
4967 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4969 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
4971 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4973 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
4975 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4977 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
4979 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4981 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
4983 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4985 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
4987 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4989 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
4991 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4993 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
4995 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4998 $nm -p $* 2>/dev/null >libc.tmp
4999 $grep fprintf libc.tmp > libc.ptf
5000 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
5001 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
5007 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
5009 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
5010 for thisname in $libnames $libc; do
5011 $ar t $thisname >>libc.tmp
5013 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
5015 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
5016 # Repeat libc to extract forwarders to DLL entries too
5017 for thisname in $libnames $libc; do
5018 $ar tv $thisname >>libc.tmp
5019 # Revision 50 of EMX has bug in $ar.
5020 # it will not extract forwarders to DLL entries
5021 # Use emximp which will extract exactly them.
5022 emximp -o tmp.imp $thisname \
5024 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
5025 < tmp.imp >>libc.tmp
5028 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
5031 echo "$ar didn't seem to work right." >&4
5032 echo "Maybe this is a Cray...trying bld instead..." >&4
5033 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
5035 for thisname in $libnames; do
5037 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
5038 $ar t $thisname >>libc.tmp
5042 echo "That didn't work either. Giving up." >&4
5049 if $test -f /lib/syscalls.exp; then
5051 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
5052 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*$/\1/p' /lib/syscalls.exp >>libc.list
5056 $rm -f libnames libpath
5058 : is a C symbol defined?
5061 -v) tf=libc.tmp; tc=""; tdc="";;
5062 -a) tf=libc.tmp; tc="[0]"; tdc="[]";;
5063 *) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
5066 case "$reuseval-$4" in
5068 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
5074 if $contains $tlook $tf >/dev/null 2>&1;
5079 echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
5080 if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1;
5088 $define) tval=true;;
5094 : define an is-in-libc? function
5095 inlibc='echo " "; td=$define; tu=$undef;
5096 sym=$1; var=$2; eval "was=\$$2";
5098 case "$reuseval$was" in
5108 echo "$sym() found." >&4;
5109 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
5111 echo "$sym() NOT found." >&4;
5112 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
5116 $define) echo "$sym() found." >&4;;
5117 *) echo "$sym() NOT found." >&4;;
5121 : see if sqrtl exists
5126 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
5129 case "$uselongdouble" in
5130 $define|true|[yY]*) dflt='y';;
5135 Perl can be built to take advantage of long doubles which
5136 (if available) may give more accuracy and range for floating point numbers.
5138 If this doesn't make any sense to you, just accept the default '$dflt'.
5140 rp='Try to use long doubles if available?'
5143 y|Y) val="$define" ;;
5149 case "$uselongdouble" in
5150 true|[yY]*) uselongdouble="$define" ;;
5153 case "$uselongdouble" in
5155 : Look for a hint-file generated 'call-back-unit'. If the
5156 : user has specified that long doubles should be used,
5157 : we may need to set or change some other defaults.
5158 if $test -f uselongdouble.cbu; then
5159 echo "Your platform has some specific hints for long doubles, using them..."
5160 . ./uselongdouble.cbu
5163 (Your platform doesn't have any specific hints for long doubles.)
5169 case "$uselongdouble:$d_sqrtl" in
5173 *** You requested the use of long doubles but you do not seem to have
5174 *** the mathematic functions for long doubles. I'm disabling the use
5175 *** of long doubles.
5178 uselongdouble=$undef
5182 : check for length of double
5184 case "$doublesize" in
5186 echo "Checking to see how big your double precision numbers are..." >&4
5187 $cat >try.c <<'EOCP'
5191 printf("%d\n", (int)sizeof(double));
5196 if eval $compile_ok; then
5198 echo "Your double is $doublesize bytes long."
5201 echo "(I can't seem to compile the test program. Guessing...)"
5202 rp="What is the size of a double precision number (in bytes)?"
5210 : check for long doubles
5212 echo "Checking to see if you have long double..." >&4
5213 echo 'int main() { long double x = 7.0; }' > try.c
5215 if eval $compile; then
5217 echo "You have long double."
5220 echo "You do not have long double."
5226 : check for length of long double
5227 case "${d_longdbl}${longdblsize}" in
5230 echo "Checking to see how big your long doubles are..." >&4
5231 $cat >try.c <<'EOCP'
5235 printf("%d\n", sizeof(long double));
5240 if eval $compile; then
5241 longdblsize=`./try$exe_ext`
5242 echo "Your long doubles are $longdblsize bytes long."
5246 echo "(I can't seem to compile the test program. Guessing...)" >&4
5247 rp="What is the size of a long double (in bytes)?"
5251 if $test "X$doublesize" = "X$longdblsize"; then
5252 echo "(That isn't any different from an ordinary double.)"
5258 : determine the architecture name
5260 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
5261 tarch=`arch`"-$osname"
5262 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
5263 if uname -m > tmparch 2>&1 ; then
5264 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
5265 -e 's/$/'"-$osname/" tmparch`
5273 case "$myarchname" in
5276 echo "(Your architecture name used to be $myarchname.)"
5283 *) dflt="$archname";;
5285 rp='What is your architecture name'
5288 case "$usethreads" in
5290 echo "Threads selected." >&4
5292 *-thread*) echo "...and architecture name already has -thread." >&4
5294 *) archname="$archname-thread"
5295 echo "...setting architecture name to $archname." >&4
5300 case "$usemultiplicity" in
5302 echo "Multiplicity selected." >&4
5304 *-multi*) echo "...and architecture name already has -multi." >&4
5306 *) archname="$archname-multi"
5307 echo "...setting architecture name to $archname." >&4
5312 case "$use64bitint$use64bitall" in
5314 case "$archname64" in
5316 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
5319 case "$use64bitint" in
5320 "$define") echo "64 bit integers selected." >&4 ;;
5322 case "$use64bitall" in
5323 "$define") echo "Maximal 64 bitness selected." >&4 ;;
5326 *-$archname64*) echo "...and architecture name already has $archname64." >&4
5328 *) archname="$archname-$archname64"
5329 echo "...setting architecture name to $archname." >&4
5335 case "$uselongdouble" in
5337 echo "Long doubles selected." >&4
5338 case "$longdblsize" in
5340 "...but long doubles are equal to doubles, not changing architecture name." >&4
5344 *-ld*) echo "...and architecture name already has -ld." >&4
5346 *) archname="$archname-ld"
5347 echo "...setting architecture name to $archname." >&4
5355 : determine root of directory hierarchy where package will be installed.
5358 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
5366 By default, $package will be installed in $dflt/bin, manual pages
5367 under $dflt/man, etc..., i.e. with $dflt as prefix for all
5368 installation directories. Typically this is something like /usr/local.
5369 If you wish to have binaries under /usr/bin but other parts of the
5370 installation under /usr/local, that's ok: you will be prompted
5371 separately for each of the installation directories, the prefix being
5372 only used to set the defaults.
5376 rp='Installation prefix to use?'
5384 *) oldprefix="$prefix";;
5394 $define|true) afs=true ;;
5395 $undef|false) afs=false ;;
5396 *) if test -d /afs; then
5404 echo "AFS may be running... I'll be extra cautious then..." >&4
5406 echo "AFS does not seem to be running..." >&4
5409 : determine installation prefix for where package is to be installed.
5413 Since you are running AFS, I need to distinguish the directory in which
5414 files will reside from the directory in which they are installed (and from
5415 which they are presumably copied to the former directory by occult means).
5418 case "$installprefix" in
5419 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
5420 *) dflt="$installprefix";;
5425 In some special cases, particularly when building $package for distribution,
5426 it is convenient to distinguish between the directory in which files should
5427 be installed from the directory ($prefix) in which they
5428 will eventually reside. For most users, these two directories are the same.
5431 case "$installprefix" in
5433 *) dflt=$installprefix;;
5437 rp='What installation prefix should I use for installing files?'
5439 installprefix="$ans"
5440 installprefixexp="$ansexp"
5442 : set the prefixit variable, to compute a suitable default value
5443 prefixit='case "$3" in
5445 case "$oldprefix" in
5446 "") eval "$1=\"\$$2\"";;
5453 ""|" ") eval "$1=\"\$$2\"";;
5459 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
5461 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
5462 /*-$oldprefix/*|\~*-$oldprefix/*)
5463 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
5464 *) eval "$1=\"\$$2\"";;
5469 : get the patchlevel
5471 echo "Getting the current patchlevel..." >&4
5472 if $test -r $rsrc/patchlevel.h;then
5473 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
5474 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
5475 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
5476 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
5477 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
5478 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
5487 $echo "(You have $package version $patchlevel subversion $subversion.)"
5490 : XXX Should be a Configure test for double-dots in filenames.
5491 version=`echo $revision $patchlevel $subversion | \
5492 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
5493 api_versionstring=`echo $api_revision $api_version $api_subversion | \
5494 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
5497 version=`echo $revision $patchlevel $subversion | \
5498 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
5499 api_versionstring=`echo $api_revision $api_version $api_subversion | \
5500 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
5503 : Special case the 5.005_xx maintenance series, which used 5.005
5504 : without any subversion label as a subdirectory in $sitelib
5505 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
5506 api_versionstring='5.005'
5509 : determine installation style
5510 : For now, try to deduce it from prefix unless it is already set.
5511 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
5512 case "$installstyle" in
5513 '') case "$prefix" in
5514 *perl*) dflt='lib';;
5515 *) dflt='lib/perl5' ;;
5518 *) dflt="$installstyle" ;;
5520 : Probably not worth prompting for this since we prompt for all
5521 : the directories individually, and the prompt would be too long and
5525 : determine where private library files go
5526 : Usual default is /usr/local/lib/perl5/$version.
5527 : Also allow things like /opt/perl/lib/$version, since
5528 : /opt/perl/lib/perl5... would be redundant.
5529 : The default "style" setting is made in installstyle.U
5530 case "$installstyle" in
5531 *lib/perl5*) set dflt privlib lib/$package/$version ;;
5532 *) set dflt privlib lib/$version ;;
5537 There are some auxiliary files for $package that need to be put into a
5538 private library directory that is accessible by everyone.
5542 rp='Pathname where the private library files will reside?'
5545 privlibexp="$ansexp"
5546 : Change installation prefix, if necessary.
5547 if $test X"$prefix" != X"$installprefix"; then
5548 installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
5550 installprivlib="$privlibexp"
5553 : set the prefixup variable, to restore leading tilda escape
5554 prefixup='case "$prefixexp" in
5556 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
5559 : determine where public architecture dependent libraries go
5562 : privlib default is /usr/local/lib/$package/$version
5563 : archlib default is /usr/local/lib/$package/$version/$archname
5564 : privlib may have an optional trailing /share.
5565 tdflt=`echo $privlib | $sed 's,/share$,,'`
5566 tdflt=$tdflt/$archname
5575 $spackage contains architecture-dependent library files. If you are
5576 sharing libraries in a heterogeneous environment, you might store
5577 these files in a separate location. Otherwise, you can just include
5578 them with the rest of the public library files.
5582 rp='Where do you want to put the public architecture-dependent libraries?'
5585 archlibexp="$ansexp"
5586 if $test X"$archlib" = X"$privlib"; then
5591 : Change installation prefix, if necessary.
5592 if $test X"$prefix" != X"$installprefix"; then
5593 installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
5595 installarchlib="$archlibexp"
5599 : Binary compatibility with 5.005 is not possible for builds
5600 : with advanced features
5601 case "$usethreads$usemultiplicity" in
5603 bincompat5005="$undef"
5604 d_bincompat5005="$undef"
5608 This version of Perl can be compiled for binary compatibility with 5.005.
5609 If you decide to do so, you will be able to continue using most of the
5610 extensions that were compiled for Perl 5.005.
5613 case "$bincompat5005$d_bincompat5005" in
5614 *"$undef"*) dflt=n ;;
5617 rp='Binary compatibility with Perl 5.005?'
5620 y*) val="$define" ;;
5625 case "$d_bincompat5005" in
5627 bincompat5005="$define"
5629 *) bincompat5005="$undef"
5630 d_bincompat5005="$undef"
5637 : see if setuid scripts can be secure
5640 Some kernels have a bug that prevents setuid #! scripts from being
5641 secure. Some sites have disabled setuid #! scripts because of this.
5643 First let's decide if your kernel supports secure setuid #! scripts.
5644 (If setuid #! scripts would be secure but have been disabled anyway,
5645 don't say that they are secure if asked.)
5650 if $test -d /dev/fd; then
5651 echo "#!$ls" >reflect
5652 chmod +x,u+s reflect
5653 ./reflect >flect 2>&1
5654 if $contains "/dev/fd" flect >/dev/null; then
5655 echo "Congratulations, your kernel has secure setuid scripts!" >&4
5659 If you are not sure if they are secure, I can check but I'll need a
5660 username and password different from the one you are using right now.
5661 If you don't have such a username or don't want me to test, simply
5665 rp='Other username to test security of setuid scripts with?'
5670 case "$d_suidsafe" in
5671 '') echo "I'll assume setuid scripts are *not* secure." >&4
5674 echo "Well, the $hint value is *not* secure." >&4
5676 *) echo "Well, the $hint value *is* secure." >&4
5681 $rm -f reflect flect
5682 echo "#!$ls" >reflect
5683 chmod +x,u+s reflect
5686 echo '"su" will (probably) prompt you for '"$ans's password."
5687 su $ans -c './reflect >flect'
5688 if $contains "/dev/fd" flect >/dev/null; then
5689 echo "Okay, it looks like setuid scripts are secure." >&4
5692 echo "I don't think setuid scripts are secure." >&4
5697 rp='Does your kernel have *secure* setuid scripts?'
5700 [yY]*) val="$define";;
5705 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
5706 echo "(That's for file descriptors, not floppy disks.)"
5712 $rm -f reflect flect
5714 : now see if they want to do setuid emulation
5717 case "$d_suidsafe" in
5720 echo "No need to emulate SUID scripts since they are secure here." >& 4
5724 Some systems have disabled setuid scripts, especially systems where
5725 setuid scripts cannot be secure. On systems where setuid scripts have
5726 been disabled, the setuid/setgid bits on scripts are currently
5727 useless. It is possible for $package to detect those bits and emulate
5728 setuid/setgid in a secure fashion. This emulation will only work if
5729 setuid scripts have been disabled in your kernel.
5733 "$define") dflt=y ;;
5736 rp="Do you want to do setuid/setgid emulation?"
5739 [yY]*) val="$define";;
5747 : determine filename position in cpp output
5749 echo "Computing filename position in cpp output for #include directives..." >&4
5750 echo '#include <stdio.h>' > foo.c
5753 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5754 $grep '^[ ]*#.*stdio\.h' | \
5755 while read cline; do
5758 while $test \$# -gt 0; do
5759 if $test -r \`echo \$1 | $tr -d '"'\`; then
5764 pos=\`expr \$pos + 1\`
5776 *) pos="${fieldn}th";;
5778 echo "Your cpp writes the filename in the $pos field of the line."
5780 : locate header file
5785 for usrincdir in $usrinc
5787 if test -f \$usrincdir/\$wanted; then
5788 echo "\$usrincdir/\$wanted"
5792 awkprg='{ print \$$fieldn }'
5793 echo "#include <\$wanted>" > foo\$\$.c
5794 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5795 $grep "^[ ]*#.*\$wanted" | \
5796 while read cline; do
5797 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5799 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5800 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5805 # status = 0: grep returned 0 lines, case statement not executed
5806 # status = 1: headerfile found
5807 # status = 2: while loop executed, no headerfile found
5811 if test \$status -eq 1; then
5818 : define an alternate in-header-list? function
5819 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5820 cont=true; xxf="echo \"<\$1> found.\" >&4";
5821 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5822 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5824 case $# in 4) instead=instead;; *) instead="at last";; esac;
5825 while $test "$cont"; do
5827 var=$2; eval "was=\$$2";
5828 if $test "$xxx" && $test -r "$xxx";
5830 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5833 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5834 set $yyy; shift; shift; yyy=$@;
5835 case $# in 0) cont="";;
5836 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5837 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5838 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5839 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5843 do set $yyy; var=$2; eval "was=\$$2";
5844 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5845 set $yyy; shift; shift; yyy=$@;
5848 : see if this is a malloc.h system
5849 set malloc.h i_malloc
5852 : see if stdlib is available
5853 set stdlib.h i_stdlib
5856 : determine which malloc to compile in
5858 case "$usemymalloc" in
5859 ''|[yY]*|true|$define) dflt='y' ;;
5862 rp="Do you wish to attempt to use the malloc that comes with $package?"
5868 mallocsrc='malloc.c'
5869 mallocobj="malloc$_o"
5870 d_mymalloc="$define"
5873 : Remove malloc from list of libraries to use
5874 echo "Removing unneeded -lmalloc from library list" >&4
5875 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
5878 echo "libs = $libs" >&4
5890 : compute the return types of malloc and free
5892 $cat >malloc.c <<END
5896 #include <sys/types.h>
5910 case "$malloctype" in
5912 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
5919 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
5923 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
5930 echo "Your system uses $freetype free(), it would seem." >&4
5934 After $package is installed, you may wish to install various
5935 add-on modules and utilities. Typically, these add-ons will
5936 be installed under $prefix with the rest
5937 of this package. However, you may wish to install such add-ons
5938 elsewhere under a different prefix.
5940 If you do not wish to put everything under a single prefix, that's
5941 ok. You will be prompted for the individual locations; this siteprefix
5942 is only used to suggest the defaults.
5944 The default should be fine for most people.
5948 rp='Installation prefix to use for add-on modules and utilities?'
5949 : XXX Here might be another good place for an installstyle setting.
5950 case "$siteprefix" in
5952 *) dflt=$siteprefix ;;
5955 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
5957 case "$siteprefix" in
5961 *) oldsiteprefix="$prefix";;
5966 siteprefixexp="$ansexp"
5968 : determine where site specific libraries go.
5969 : Usual default is /usr/local/lib/perl5/site_perl/$version
5970 : The default "style" setting is made in installstyle.U
5971 : XXX No longer works with Prefixit stuff.
5972 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
5974 '') case "$installstyle" in
5975 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
5976 *) dflt=$siteprefix/lib/site_$prog/$version ;;
5984 The installation process will create a directory for
5985 site-specific extensions and modules. Most users find it convenient
5986 to place all site-specific files in this directory rather than in the
5987 main distribution directory.
5991 rp='Pathname for the site-specific library files?'
5994 sitelibexp="$ansexp"
5995 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
5996 : Change installation prefix, if necessary.
5997 if $test X"$prefix" != X"$installprefix"; then
5998 installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
6000 installsitelib="$sitelibexp"
6003 : determine where site specific architecture-dependent libraries go.
6004 : sitelib default is /usr/local/lib/perl5/site_perl/$version
6005 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
6006 : sitelib may have an optional trailing /share.
6008 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
6009 dflt="$dflt/$archname"
6014 set sitearch sitearch none
6018 The installation process will also create a directory for
6019 architecture-dependent site-specific extensions and modules.
6023 rp='Pathname for the site-specific architecture-dependent library files?'
6026 sitearchexp="$ansexp"
6027 : Change installation prefix, if necessary.
6028 if $test X"$prefix" != X"$installprefix"; then
6029 installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
6031 installsitearch="$sitearchexp"
6036 The installation process will also create a directory for
6037 vendor-supplied add-ons. Vendors who supply perl with their system
6038 may find it convenient to place all vendor-supplied files in this
6039 directory rather than in the main distribution directory. This will
6040 ease upgrades between binary-compatible maintenance versions of perl.
6042 Of course you may also use these directories in whatever way you see
6043 fit. For example, you might use them to access modules shared over a
6044 company-wide network.
6046 The default answer should be fine for most people.
6047 This causes further questions about vendor add-ons to be skipped
6048 and no vendor-specific directories will be configured for perl.
6051 rp='Do you want to configure vendor-specific add-on directories?'
6052 case "$usevendorprefix" in
6053 define|true|[yY]*) dflt=y ;;
6054 *) : User may have set vendorprefix directly on Configure command line.
6055 case "$vendorprefix" in
6064 rp='Installation prefix to use for vendor-supplied add-ons?'
6065 case "$vendorprefix" in
6067 *) dflt=$vendorprefix ;;
6070 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6072 case "$vendorprefix" in
6076 *) oldvendorprefix="$prefix";;
6080 usevendorprefix="$define"
6082 vendorprefixexp="$ansexp"
6084 *) usevendorprefix="$undef"
6090 case "$vendorprefix" in
6091 '') d_vendorlib="$undef"
6095 *) d_vendorlib="$define"
6096 : determine where vendor-supplied modules go.
6097 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
6098 case "$vendorlib" in
6100 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6101 case "$installstyle" in
6102 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
6103 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
6106 *) dflt="$vendorlib"
6110 rp='Pathname for the vendor-supplied library files?'
6113 vendorlibexp="$ansexp"
6116 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
6117 : Change installation prefix, if necessary.
6118 if $test X"$prefix" != X"$installprefix"; then
6119 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
6121 installvendorlib="$vendorlibexp"
6124 case "$vendorprefix" in
6125 '') d_vendorarch="$undef"
6129 *) d_vendorarch="$define"
6130 : determine where vendor-supplied architecture-dependent libraries go.
6131 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
6132 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
6133 : vendorlib may have an optional trailing /share.
6134 case "$vendorarch" in
6135 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
6136 dflt="$dflt/$archname"
6138 *) dflt="$vendorarch" ;;
6141 rp='Pathname for vendor-supplied architecture-dependent files?'
6144 vendorarchexp="$ansexp"
6147 : Change installation prefix, if necessary.
6148 if $test X"$prefix" != X"$installprefix"; then
6149 installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
6151 installvendorarch="$vendorarchexp"
6154 : Final catch-all directories to search
6157 Lastly, you can have perl look in other directories for extensions and
6158 modules in addition to those already specified.
6159 These directories will be searched after
6163 test X"$vendorlib" != "X" && echo ' ' $vendorlib
6164 test X"$vendorarch" != "X" && echo ' ' $vendorarch
6166 case "$otherlibdirs" in
6167 ''|' ') dflt='none' ;;
6168 *) dflt="$otherlibdirs" ;;
6171 Enter a colon-separated set of extra paths to include in perl's @INC
6172 search path, or enter 'none' for no extra paths.
6176 rp='Colon-separated list of additional directories for perl to search?'
6179 ' '|''|none) otherlibdirs=' ' ;;
6180 *) otherlibdirs="$ans" ;;
6182 case "$otherlibdirs" in
6186 set d_perl_otherlibdirs
6189 : Cruising for prototypes
6191 echo "Checking out function prototypes..." >&4
6192 $cat >prototype.c <<'EOCP'
6193 int main(int argc, char *argv[]) {
6196 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
6197 echo "Your C compiler appears to support function prototypes."
6200 echo "Your C compiler doesn't seem to understand function prototypes."
6207 case "$prototype" in
6209 *) ansi2knr='ansi2knr'
6214 This version of $package can only be compiled by a compiler that
6215 understands function prototypes. Unfortunately, your C compiler
6217 doesn't seem to understand them. Sorry about that.
6219 If GNU cc is available for your system, perhaps you could try that instead.
6221 Eventually, we hope to support building Perl with pre-ANSI compilers.
6222 If you would like to help in that effort, please contact <perlbug@perl.org>.
6224 Aborting Configure now.
6230 : determine where public executables go
6235 rp='Pathname where the public executables will reside?'
6237 if $test "X$ansexp" != "X$binexp"; then
6242 : Change installation prefix, if necessary.
6243 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
6244 if $test X"$prefix" != X"$installprefix"; then
6245 installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
6247 installbin="$binexp"
6250 : Find perl5.005 or later.
6251 echo "Looking for a previously installed perl5.005 or later... "
6253 '') for tdir in `echo "$binexp:$PATH" | $sed "s/$path_sep/ /g"`; do
6254 : Check if this perl is recent and can load a simple module
6255 if $test -x $tdir/perl && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6258 elif $test -x $tdir/perl5 && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6268 '') echo "None found. That's ok.";;
6269 *) echo "Using $perl5." ;;
6272 : Determine list of previous versions to include in @INC
6273 $cat > getverlist <<EOPL
6276 \$api_versionstring = "$api_versionstring";
6277 \$version = "$version";
6278 \$stem = "$sitelib_stem";
6279 \$archname = "$archname";
6281 $cat >> getverlist <<'EOPL'
6282 # Can't have leading @ because metaconfig interprets it as a command!
6283 ;@inc_version_list=();
6284 # XXX Redo to do opendir/readdir?
6287 ;@candidates = glob("5.*");
6293 # XXX ToDo: These comparisons must be reworked when two-digit
6294 # subversions come along, so that 5.7.10 compares as greater than
6295 # 5.7.3! By that time, hope that 5.6.x is sufficiently
6296 # widespread that we can use the built-in version vectors rather
6297 # than reinventing them here. For 5.6.0, however, we must
6298 # assume this script will likely be run by 5.005_0x. --AD 1/2000.
6299 foreach $d (@candidates) {
6300 if ($d lt $version) {
6301 if ($d ge $api_versionstring) {
6302 unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
6304 elsif ($d ge "5.005") {
6305 unshift(@inc_version_list, grep { -d } $d);
6309 # Skip newer version. I.e. don't look in
6310 # 5.7.0 if we're installing 5.6.1.
6314 if (@inc_version_list) {
6315 print join(' ', @inc_version_list);
6318 # Blank space to preserve value for next Configure run.
6323 case "$inc_version_list" in
6324 '') if test -x "$perl5"; then
6325 dflt=`$perl5 getverlist`
6330 $undef) dflt='none' ;;
6331 *) dflt="$inc_version_list" ;;
6334 ''|' ') dflt=none ;;
6337 5.005) case "$bincompat5005" in
6338 $define|true|[yY]*) ;;
6345 In order to ease the process of upgrading, this version of perl
6346 can be configured to use modules built and installed with earlier
6347 versions of perl that were installed under $prefix. Specify here
6348 the list of earlier versions that this version of perl should check.
6349 If Configure detected no earlier versions of perl installed under
6350 $prefix, then the list will be empty. Answer 'none' to tell perl
6351 to not search earlier versions.
6353 The default should almost always be sensible, so if you're not sure,
6354 just accept the default.
6357 rp='List of earlier versions to include in @INC?'
6360 [Nn]one|''|' ') inc_version_list=' ' ;;
6361 *) inc_version_list="$ans" ;;
6363 case "$inc_version_list" in
6365 inc_version_list_init='0';;
6366 *) inc_version_list_init=`echo $inc_version_list |
6367 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
6372 : determine whether to install perl also as /usr/bin/perl
6375 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
6377 Many scripts expect perl to be installed as /usr/bin/perl.
6378 I can install the perl you are about to compile also as /usr/bin/perl
6379 (in addition to $installbin/perl).
6381 case "$installusrbinperl" in
6382 "$undef"|[nN]*) dflt='n';;
6385 rp="Do you want to install perl as /usr/bin/perl?"
6388 [yY]*) val="$define";;
6394 set installusrbinperl
6397 : see if dld is available
6401 : see if dlopen exists
6408 : determine which dynamic loading, if any, to compile in
6410 dldir="ext/DynaLoader"
6423 $define) dflt='y' ;;
6426 $define) dflt='y' ;;
6428 : Does a dl_xxx.xs file exist for this operating system
6429 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
6432 rp="Do you wish to use dynamic loading?"
6439 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
6440 dflt="$dldir/dl_${osname}.xs"
6441 elif $test "$d_dlopen" = "$define" ; then
6442 dflt="$dldir/dl_dlopen.xs"
6443 elif $test "$i_dld" = "$define" ; then
6444 dflt="$dldir/dl_dld.xs"
6449 *) dflt="$dldir/$dlsrc"
6452 echo "The following dynamic loading files are available:"
6453 : Can not go over to $dldir because getfile has path hard-coded in.
6454 tdir=`pwd`; cd $rsrc; $ls -C $dldir/dl*.xs; cd $tdir
6455 rp="Source file to use for dynamic loading"
6461 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
6465 Some systems may require passing special flags to $cc -c to
6466 compile modules that will be used to create a shared library.
6467 To use no flags, say "none".
6470 case "$cccdlflags" in
6471 '') case "$gccversion" in
6472 '') case "$osname" in
6474 next) dflt='none' ;;
6475 irix*) dflt='-KPIC' ;;
6476 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
6477 sunos) dflt='-pic' ;;
6481 *) case "$osname" in
6482 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
6487 *) dflt="$cccdlflags" ;;
6489 rp="Any special flags to pass to $cc -c to compile shared library modules?"
6492 none) cccdlflags=' ' ;;
6493 *) cccdlflags="$ans" ;;
6498 Some systems use ld to create libraries that can be dynamically loaded,
6499 while other systems (such as those using ELF) use $cc.
6503 '') $cat >try.c <<'EOM'
6504 /* Test for whether ELF binaries are produced */
6509 int i = open("a.out",O_RDONLY);
6512 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
6513 exit(0); /* succeed (yes, it's ELF) */
6518 if $cc $ccflags try.c >/dev/null 2>&1 && ./a.out; then
6520 You appear to have ELF support. I'll use $cc to build dynamic libraries.
6524 echo "I'll use ld to build dynamic libraries."
6533 rp="What command should be used to create dynamic libraries?"
6539 Some systems may require passing special flags to $ld to create a
6540 library that can be dynamically loaded. If your ld flags include
6541 -L/other/path options to locate libraries outside your loader's normal
6542 search path, you may need to specify those -L options here as well. To
6543 use no flags, say "none".
6546 case "$lddlflags" in
6547 '') case "$osname" in
6548 beos) dflt='-nostart' ;;
6550 case "$gccversion" in
6551 '') dflt="$dflt +vnocompatwarnings" ;;
6554 linux|irix*) dflt='-shared' ;;
6555 next) dflt='none' ;;
6556 solaris) dflt='-G' ;;
6557 sunos) dflt='-assert nodefinitions' ;;
6558 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
6562 *) dflt="$lddlflags" ;;
6565 : Try to guess additional flags to pick up local libraries.
6566 : Be careful not to append to a plain 'none'
6570 for thisflag in $ldflags; do
6575 *) dflt="$dflt $thisflag" ;;
6582 ''|' ') dflt='none' ;;
6585 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
6588 none) lddlflags=' ' ;;
6589 *) lddlflags="$ans" ;;
6594 Some systems may require passing special flags to $cc to indicate that
6595 the resulting executable will use dynamic linking. To use no flags,
6599 case "$ccdlflags" in
6600 '') case "$osname" in
6601 hpux) dflt='-Wl,-E' ;;
6602 linux) dflt='-rdynamic' ;;
6603 next) dflt='none' ;;
6604 sunos) dflt='none' ;;
6608 *) dflt="$ccdlflags" ;;
6610 rp="Any special flags to pass to $cc to use dynamic linking?"
6613 none) ccdlflags=' ' ;;
6614 *) ccdlflags="$ans" ;;
6628 # No dynamic loading being used, so don't bother even to prompt.
6631 *) case "$useshrplib" in
6632 '') case "$osname" in
6633 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
6635 also='Building a shared libperl is required for dynamic loading to work on your system.'
6640 also='Building a shared libperl is needed for MAB support.'
6658 The perl executable is normally obtained by linking perlmain.c with
6659 libperl${_a}, any static extensions (usually just DynaLoader), and
6660 any other libraries needed on this system (such as -lm, etc.). Since
6661 your system supports dynamic loading, it is probably possible to build
6662 a shared libperl.$so. If you will have more than one executable linked
6663 to libperl.$so, this will significantly reduce the size of each
6664 executable, but it may have a noticeable affect on performance. The
6665 default is probably sensible for your system.
6669 rp="Build a shared libperl.$so (y/n)"
6673 useshrplib='true' ;;
6674 *) useshrplib='false' ;;
6679 case "$useshrplib" in
6683 # Figure out a good name for libperl.so. Since it gets stored in
6684 # a version-specific architecture-dependent library, the version
6685 # number isn't really that important, except for making cc/ld happy.
6687 # A name such as libperl.so.3.1
6688 majmin="libperl.$so.$patchlevel.$subversion"
6689 # A name such as libperl.so.301
6690 majonly=`echo $patchlevel $subversion |
6691 $awk '{printf "%d%02d", $1, $2}'`
6692 majonly=libperl.$so.$majonly
6693 # I'd prefer to keep the os-specific stuff here to a minimum, and
6694 # rely on figuring it out from the naming of libc.
6695 case "${osname}${osvers}" in
6698 # XXX How handle the --version stuff for MAB?
6700 linux*) # ld won't link with a bare -lperl otherwise.
6703 cygwin*) # include version
6704 dflt=`echo libperl$version | sed -e 's/\./_/g'`$lib_ext
6706 *) # Try to guess based on whether libc has major.minor.
6708 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
6709 *libc.$so.[0-9]*) dflt=$majonly ;;
6710 *) dflt=libperl.$so ;;
6720 I need to select a good name for the shared libperl. If your system uses
6721 library names with major and minor numbers, then you might want something
6722 like $majmin. Alternatively, if your system uses a single version
6723 number for shared libraries, then you might want to use $majonly.
6724 Or, your system might be quite happy with a simple libperl.$so.
6726 Since the shared libperl will get installed into a version-specific
6727 architecture-dependent directory, the version number of the shared perl
6728 library probably isn't important, so the default should be o.k.
6731 rp='What name do you want to give to the shared libperl?'
6734 echo "Ok, I'll use $libperl"
6737 libperl="libperl${_a}"
6741 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
6745 WARNING: Use of the shrpdir variable for the installation location of
6746 the shared $libperl is not supported. It was never documented and
6747 will not work in this version. Let me (perlbug@perl.org)
6748 know of any problems this may cause.
6754 But your current setting of $shrpdir is
6755 the default anyway, so it's harmless.
6760 Further, your current attempted setting of $shrpdir
6761 conflicts with the value of $archlibexp/CORE
6762 that installperl will use.
6769 # How will the perl executable find the installed shared $libperl?
6770 # Add $xxx to ccdlflags.
6771 # If we can't figure out a command-line option, use $shrpenv to
6772 # set env LD_RUN_PATH. The main perl makefile uses this.
6773 shrpdir=$archlibexp/CORE
6776 if "$useshrplib"; then
6779 # We'll set it in Makefile.SH...
6785 xxx="-Wl,-R$shrpdir"
6787 linux|irix*|dec_osf)
6788 xxx="-Wl,-rpath,$shrpdir"
6791 # next doesn't like the default...
6794 # beos doesn't like the default, either.
6797 # hpux doesn't like the default, either.
6798 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
6801 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
6807 # Only add $xxx if it isn't already in ccdlflags.
6808 case " $ccdlflags " in
6810 *) ccdlflags="$ccdlflags $xxx"
6813 Adding $xxx to the flags
6814 passed to $ld so that the perl executable will find the
6815 installed shared $libperl.
6823 # Fix ccdlflags in AIX for building external extensions.
6824 # (For building Perl itself bare -bE:perl.exp is needed,
6825 # Makefile.SH takes care of this.)
6827 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
6829 # Respect a hint or command-line value.
6831 '') shrpenv="$tmp_shrpenv" ;;
6833 case "$ldlibpthname" in
6834 '') ldlibpthname=LD_LIBRARY_PATH ;;
6835 none) ldlibpthname='' ;;
6838 : determine where manual pages are on this system
6842 syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
6843 syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
6844 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
6845 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
6846 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
6847 sysman=`./loc . /usr/man/man1 $syspath`
6850 if $test -d "$sysman"; then
6851 echo "System manual is in $sysman." >&4
6853 echo "Could not find manual pages in source form." >&4
6856 : determine where manual pages go
6857 set man1dir man1dir none
6861 $spackage has manual pages available in source form.
6865 echo "However, you don't have nroff, so they're probably useless to you."
6867 '') man1dir="none";;
6870 echo "If you don't want the manual sources installed, answer 'none'."
6875 lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
6876 lookpath="$lookpath $prefixexp/man/p_man/man1"
6877 lookpath="$lookpath $prefixexp/man/u_man/man1"
6878 lookpath="$lookpath $prefixexp/man/man.1"
6880 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
6881 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
6891 rp="Where do the main $spackage manual pages (source) go?"
6893 if $test "X$man1direxp" != "X$ansexp"; then
6897 man1direxp="$ansexp"
6903 : Change installation prefix, if necessary.
6904 if $test X"$prefix" != X"$installprefix"; then
6905 installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
6907 installman1dir="$man1direxp"
6910 : What suffix to use on installed man pages
6917 rp="What suffix should be used for the main $spackage man pages?"
6919 '') case "$man1dir" in
6933 *) dflt="$man1ext";;
6940 : see if we can have long filenames
6942 first=123456789abcdef
6944 if (echo hi >$first) 2>/dev/null; then
6945 if $test -f 123456789abcde; then
6946 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
6949 echo 'You can have filenames longer than 14 characters.'>&4
6954 You can't have filenames longer than 14 chars.
6955 You can't even think about them!
6961 $rm -rf 123456789abcde*
6963 : determine where library module manual pages go
6964 set man3dir man3dir none
6968 $spackage has manual pages for many of the library modules.
6974 However, you don't have nroff, so they're probably useless to you.
6977 '') man3dir="none";;
6981 case "$d_flexfnam" in
6984 However, your system can't handle the long file names like File::Basename.3.
6987 '') man3dir="none";;
6991 echo "If you don't want the manual sources installed, answer 'none'."
6992 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6994 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
6995 if $test -d "$privlib/man/man3"; then
6998 WARNING: Previous versions of perl installed man3 pages into
6999 $privlib/man/man3. This version will suggest a
7000 new default of $dflt.
7004 rp='Do you wish to preserve the old behavior?(y/n)'
7007 y*) dflt="$privlib/man/man3" ;;
7012 *) dflt="$man3dir" ;;
7019 rp="Where do the $package library man pages (source) go?"
7022 man3direxp="$ansexp"
7028 : Change installation prefix, if necessary.
7029 if $test X"$prefix" != X"$installprefix"; then
7030 installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
7032 installman3dir="$man3direxp"
7035 : What suffix to use on installed man pages
7041 rp="What suffix should be used for the $package library man pages?"
7043 '') case "$man3dir" in
7057 *) dflt="$man3ext";;
7064 : see if we have to deal with yellow pages, now NIS.
7065 if $test -d /usr/etc/yp || $test -d /etc/yp; then
7066 if $test -f /usr/etc/nibindd; then
7068 echo "I'm fairly confident you're on a NeXT."
7070 rp='Do you get the hosts file via NetInfo?'
7079 y*) hostcat='nidump hosts .';;
7080 *) case "$hostcat" in
7081 nidump*) hostcat='';;
7091 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
7099 rp='Are you getting the hosts file via yellow pages?'
7102 y*) hostcat='ypcat hosts';;
7103 *) hostcat='cat /etc/hosts';;
7109 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
7112 '') test -f /etc/group && groupcat='cat /etc/group';;
7115 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
7118 : now get the host name
7120 echo "Figuring out host name..." >&4
7121 case "$myhostname" in
7123 echo 'Maybe "hostname" will work...'
7124 if tans=`sh -c hostname 2>&1` ; then
7132 if $test "$cont"; then
7134 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
7135 if tans=`cat /etc/systemid 2>&1` ; then
7137 phostname='cat /etc/systemid'
7138 echo "Whadyaknow. Xenix always was a bit strange..."
7141 elif $test -r /etc/systemid; then
7142 echo "(What is a non-Xenix system doing with /etc/systemid?)"
7145 if $test "$cont"; then
7146 echo 'No, maybe "uuname -l" will work...'
7147 if tans=`sh -c 'uuname -l' 2>&1` ; then
7149 phostname='uuname -l'
7151 echo 'Strange. Maybe "uname -n" will work...'
7152 if tans=`sh -c 'uname -n' 2>&1` ; then
7154 phostname='uname -n'
7156 echo 'Oh well, maybe I can mine it out of whoami.h...'
7157 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
7158 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
7159 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
7161 case "$myhostname" in
7162 '') echo "Does this machine have an identity crisis or something?"
7165 echo "Well, you said $myhostname before..."
7166 phostname='echo $myhostname';;
7172 : you do not want to know about this
7177 if $test "$myhostname" ; then
7179 rp='Your host name appears to be "'$myhostname'".'" Right?"
7187 : bad guess or no guess
7188 while $test "X$myhostname" = X ; do
7190 rp="Please type the (one word) name of your host:"
7195 : translate upper to lower if necessary
7196 case "$myhostname" in
7198 echo "(Normalizing case in your host name)"
7199 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
7203 case "$myhostname" in
7205 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
7206 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
7207 echo "(Trimming domain name from host name--host name is now $myhostname)"
7209 *) case "$mydomain" in
7212 test "X$hostcat" = "Xypcat hosts" &&
7213 ypmatch "$myhostname" hosts 2>/dev/null |\
7214 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
7217 test "X$hostcat" != "X" &&
7218 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
7219 /[ ]$myhostname[ . ]/p" > hosts
7222 if $test -f hosts; then
7223 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
7224 END { print sum }" hosts` = x1 || tmp_re="[ ]"
7225 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
7226 hosts | $sort | $uniq | \
7227 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
7228 case `$echo X$dflt` in
7229 X*\ *) echo "(Several hosts in the database matched hostname)"
7232 X.) echo "(You do not have fully-qualified names in the hosts database)"
7236 echo "(I cannot locate a hosts database anywhere)"
7241 tans=`./loc resolv.conf X /etc /usr/etc`
7242 if $test -f "$tans"; then
7243 echo "(Attempting domain name extraction from $tans)"
7244 dflt=.`$sed -n -e 's/ / /g' \
7245 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
7246 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
7248 .) dflt=.`$sed -n -e 's/ / /g' \
7249 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
7250 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
7257 .) echo "(No help from resolv.conf either -- attempting clever guess)"
7258 dflt=.`sh -c domainname 2>/dev/null`
7261 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
7266 .) echo "(Lost all hope -- silly guess then)"
7272 *) dflt="$mydomain";;
7276 rp="What is your domain name?"
7286 : translate upper to lower if necessary
7289 echo "(Normalizing case in your domain name)"
7290 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
7294 : a little sanity check here
7295 case "$phostname" in
7298 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
7299 $myhostname$mydomain|$myhostname) ;;
7301 case "$phostname" in
7303 echo "(That doesn't agree with your whoami.h file, by the way.)"
7306 echo "(That doesn't agree with your $phostname command, by the way.)"
7316 I need to get your e-mail address in Internet format if possible, i.e.
7317 something like user@host.domain. Please answer accurately since I have
7318 no easy means to double check it. The default value provided below
7319 is most probably close to reality but may not be valid from outside
7320 your organization...
7324 while test "$cont"; do
7326 '') dflt="$cf_by@$myhostname$mydomain";;
7327 *) dflt="$cf_email";;
7329 rp='What is your e-mail address?'
7335 rp='Address does not look like an Internet one. Use it anyway?'
7351 If you or somebody else will be maintaining perl at your site, please
7352 fill in the correct e-mail address here so that they may be contacted
7353 if necessary. Currently, the "perlbug" program included with perl
7354 will send mail to this address in addition to perlbug@perl.org. You may
7355 enter "none" for no administrator.
7358 case "$perladmin" in
7359 '') dflt="$cf_email";;
7360 *) dflt="$perladmin";;
7362 rp='Perl administrator e-mail address'
7366 : determine whether to only install version-specific parts.
7369 Do you want to install only the version-specific parts of the perl
7370 distribution? Usually you do *not* want to do this.
7372 case "$versiononly" in
7373 "$define"|[Yy]*|true) dflt='y' ;;
7376 rp="Do you want to install only the version-specific parts of perl?"
7379 [yY]*) val="$define";;
7385 : figure out how to guarantee perl startup
7386 case "$startperl" in
7388 case "$sharpbang" in
7392 I can use the #! construct to start perl on your system. This will
7393 make startup of perl scripts faster, but may cause problems if you
7394 want to share those scripts and perl is not in a standard place
7395 ($binexp/perl) on all your platforms. The alternative is to force
7396 a shell by starting the script with a single ':' character.
7399 case "$versiononly" in
7400 "$define") dflt="$binexp/perl$version";;
7401 *) dflt="$binexp/perl";;
7403 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
7406 none) startperl=": # use perl";;
7407 *) startperl="#!$ans"
7408 if $test 30 -lt `echo "$ans" | wc -c`; then
7411 WARNING: Some systems limit the #! command to 32 characters.
7412 If you experience difficulty running Perl scripts with #!, try
7413 installing Perl in a directory with a shorter pathname.
7419 *) startperl=": # use perl"
7424 echo "I'll use $startperl to start perl scripts."
7426 : figure best path for perl in scripts
7429 perlpath="$binexp/perl"
7430 case "$startperl" in
7435 I will use the "eval 'exec'" idiom to start Perl on your system.
7436 I can use the full path of your Perl binary for this purpose, but
7437 doing so may cause problems if you want to share those scripts and
7438 Perl is not always in a standard place ($binexp/perl).
7442 rp="What path shall I use in \"eval 'exec'\"?"
7449 case "$startperl" in
7451 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
7454 : determine where public executable scripts go
7455 set scriptdir scriptdir
7457 case "$scriptdir" in
7460 : guess some guesses
7461 $test -d /usr/share/scripts && dflt=/usr/share/scripts
7462 $test -d /usr/share/bin && dflt=/usr/share/bin
7463 $test -d /usr/local/script && dflt=/usr/local/script
7464 $test -d /usr/local/scripts && dflt=/usr/local/scripts
7465 $test -d $prefixexp/script && dflt=$prefixexp/script
7469 *) dflt="$scriptdir"
7474 Some installations have a separate directory just for executable scripts so
7475 that they can mount it across multiple architectures but keep the scripts in
7476 one spot. You might, for example, have a subdirectory of /usr/share for this.
7477 Or you might just lump your scripts in with all your other executables.
7481 rp='Where do you keep publicly executable scripts?'
7483 if $test "X$ansexp" != "X$scriptdirexp"; then
7487 scriptdirexp="$ansexp"
7488 : Change installation prefix, if necessary.
7489 if $test X"$prefix" != X"$installprefix"; then
7490 installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
7492 installscript="$scriptdirexp"
7495 : determine where add-on public executables go
7497 '') dflt=$siteprefix/bin ;;
7501 rp='Pathname where the add-on public executables should be installed?'
7504 sitebinexp="$ansexp"
7505 : Change installation prefix, if necessary.
7506 if $test X"$prefix" != X"$installprefix"; then
7507 installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
7509 installsitebin="$sitebinexp"
7512 case "$useperlio" in
7513 $define|true|[yY]*) dflt='y';;
7518 Previous version of $package used the standard IO mechanisms as
7519 defined in <stdio.h>. Versions 5.003_02 and later of perl allow
7520 alternate IO mechanisms via the PerlIO abstraction layer, but the
7521 stdio mechanism is still the default. This abstraction layer can
7522 use AT&T's sfio (if you already have sfio installed) or regular stdio.
7523 Using PerlIO with sfio may cause problems with some extension modules.
7525 If this doesn't make any sense to you, just accept the default '$dflt'.
7527 rp='Use the experimental PerlIO abstraction layer?'
7534 echo "Ok, doing things the stdio way."
7543 case "$useperlio" in
7544 $define|true|[yY]*) ;;
7547 You are using the SOCKS proxy protocol library which means that you
7548 should also use the PerlIO layer. You may be headed for trouble.
7557 case "$vendorprefix" in
7558 '') d_vendorbin="$undef"
7562 *) d_vendorbin="$define"
7563 : determine where vendor-supplied executables go.
7564 case "$vendorbin" in
7565 '') dflt=$vendorprefix/bin ;;
7566 *) dflt="$vendorbin" ;;
7569 rp='Pathname for the vendor-supplied executables directory?'
7572 vendorbinexp="$ansexp"
7575 : Change installation prefix, if necessary.
7576 if $test X"$prefix" != X"$installprefix"; then
7577 installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
7579 installvendorbin="$vendorbinexp"
7582 : see if qgcvt exists
7588 if $test X"$d_longdbl" = X"$define"; then
7590 echo "Checking how to print long doubles..." >&4
7592 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
7593 $cat >try.c <<'EOCP'
7594 #include <sys/types.h>
7598 printf("%.3f\n", d);
7602 if eval $compile; then
7606 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
7607 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
7608 echo "We will use %f."
7614 if $test X"$sPRIfldbl" = X; then
7615 $cat >try.c <<'EOCP'
7616 #include <sys/types.h>
7619 long double d = 123.456;
7620 printf("%.3llf\n", d);
7624 if eval $compile; then
7628 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
7629 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
7630 echo "We will use %llf."
7636 if $test X"$sPRIfldbl" = X; then
7637 $cat >try.c <<'EOCP'
7638 #include <sys/types.h>
7641 long double d = 123.456;
7642 printf("%.3Lf\n", d);
7646 if eval $compile; then
7650 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
7651 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
7652 echo "We will use %Lf."
7658 if $test X"$sPRIfldbl" = X; then
7659 $cat >try.c <<'EOCP'
7660 #include <sys/types.h>
7663 long double d = 123.456;
7664 printf("%.3lf\n", d);
7668 if eval $compile; then
7672 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
7673 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
7674 echo "We will use %lf."
7680 if $test X"$sPRIfldbl" = X; then
7681 echo "Cannot figure out how to print long doubles." >&4
7683 sSCNfldbl=$sPRIfldbl # expect consistency
7690 case "$sPRIfldbl" in
7691 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
7692 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
7693 d_SCNfldbl="$undef";
7695 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
7696 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
7697 d_SCNfldbl="$define";
7701 : Check how to convert floats to strings.
7703 echo "Checking for an efficient way to convert floats to strings."
7705 case "$uselongdouble" in
7706 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
7708 case "$d_longdbl" in
7709 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
7711 case "$d_PRIgldbl" in
7712 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
7716 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
7717 char *myname = "gconvert";
7720 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
7721 char *myname = "gcvt";
7724 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
7725 char *myname = "qgcvt";
7726 #define DOUBLETYPE long double
7729 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && defined(HAS_PRIgldbl)
7730 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
7732 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
7734 char *myname = "sprintf";
7738 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
7739 #define DOUBLETYPE long double
7741 #define DOUBLETYPE double
7747 #define I_STDLIB $i_stdlib
7753 checkit(expect, got)
7757 if (strcmp(expect, got)) {
7758 printf("%s oddity: Expected %s, got %s\n",
7759 myname, expect, got);
7769 /* This must be 1st test on (which?) platform */
7770 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
7771 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
7772 checkit("0.1", buf);
7774 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
7777 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
7778 checkit("1.1", buf);
7780 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
7781 checkit("1.01", buf);
7783 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
7784 checkit("1.001", buf);
7786 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
7787 checkit("1.0001", buf);
7789 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
7790 checkit("1.00001", buf);
7792 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
7793 checkit("1.000001", buf);
7795 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
7798 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
7801 /* Some Linux gcvt's give 1.e+5 here. */
7802 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
7803 checkit("100000", buf);
7805 /* Some Linux gcvt's give -1.e+5 here. */
7806 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
7807 checkit("-100000", buf);
7809 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
7810 checkit("123.456", buf);
7815 case "$d_Gconvert" in
7816 gconvert*) xxx_list='gconvert gcvt sprintf' ;;
7817 gcvt*) xxx_list='gcvt gconvert sprintf' ;;
7818 sprintf*) xxx_list='sprintf gconvert gcvt' ;;
7819 *) xxx_list='gconvert gcvt sprintf' ;;
7822 case "$d_longdbl$uselongdouble$d_PRIgldbl" in
7823 "$define$define$define")
7824 # for long doubles prefer first qgcvt, then sprintf
7825 xxx_list="`echo $xxx_list|sed s/sprintf//`"
7826 xxx_list="sprintf $xxx_list"
7828 "$define") xxx_list="qgcvt $xxx_list" ;;
7833 for xxx_convert in $xxx_list; do
7834 echo "Trying $xxx_convert..."
7836 set try -DTRY_$xxx_convert
7837 if eval $compile; then
7838 echo "$xxx_convert() found." >&4
7840 echo "I'll use $xxx_convert to convert floats into a string." >&4
7843 echo "...But $xxx_convert didn't work as I expected."
7846 echo "$xxx_convert NOT found." >&4
7850 case "$xxx_convert" in
7851 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
7852 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
7853 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
7854 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
7855 "$define$define$define")
7856 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
7857 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
7862 : see if _fwalk exists
7866 : Initialize h_fcntl
7869 : Initialize h_sysfile
7872 : access call always available on UNIX
7876 : locate the flags for 'access()'
7880 $cat >access.c <<'EOCP'
7881 #include <sys/types.h>
7886 #include <sys/file.h>
7895 : check sys/file.h first, no particular reason here
7896 if $test `./findhdr sys/file.h` && \
7897 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
7899 echo "<sys/file.h> defines the *_OK access constants." >&4
7900 elif $test `./findhdr fcntl.h` && \
7901 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
7903 echo "<fcntl.h> defines the *_OK access constants." >&4
7904 elif $test `./findhdr unistd.h` && \
7905 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
7906 echo "<unistd.h> defines the *_OK access constants." >&4
7908 echo "I can't find the four *_OK access constants--I'll use mine." >&4
7914 : see if accessx exists
7915 set accessx d_accessx
7918 : see if alarm exists
7922 : see if atolf exists
7926 : see if atoll exists
7930 : Look for GNU-cc style attribute checking
7932 echo "Checking whether your compiler can handle __attribute__ ..." >&4
7933 $cat >attrib.c <<'EOCP'
7935 void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
7937 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
7938 if $contains 'warning' attrib.out >/dev/null 2>&1; then
7939 echo "Your C compiler doesn't fully support __attribute__."
7942 echo "Your C compiler supports __attribute__."
7946 echo "Your C compiler doesn't seem to understand __attribute__ at all."
7953 : see if bcmp exists
7957 : see if bcopy exists
7961 : see if this is a unistd.h system
7962 set unistd.h i_unistd
7965 : see if getpgrp exists
7966 set getpgrp d_getpgrp
7969 case "$d_getpgrp" in
7972 echo "Checking to see which flavor of getpgrp is in use..."
7975 #include <sys/types.h>
7977 # include <unistd.h>
7981 if (getuid() == 0) {
7982 printf("(I see you are running Configure as super-user...)\n");
7986 if (getpgrp(1) == 0)
7995 if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
7996 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
7998 elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
7999 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
8002 echo "I can't seem to compile and run the test program."
8004 xxx="a USG one, i.e. you use getpgrp()."
8006 # SVR4 systems can appear rather BSD-ish.
8009 xxx="a BSD one, i.e. you use getpgrp(pid)."
8013 xxx="probably a USG one, i.e. you use getpgrp()."
8018 echo "Assuming your getpgrp is $xxx" >&4
8027 : see if setpgrp exists
8028 set setpgrp d_setpgrp
8031 case "$d_setpgrp" in
8034 echo "Checking to see which flavor of setpgrp is in use..."
8037 #include <sys/types.h>
8039 # include <unistd.h>
8043 if (getuid() == 0) {
8044 printf("(I see you are running Configure as super-user...)\n");
8048 if (-1 == setpgrp(1, 1))
8051 if (setpgrp() != -1)
8057 if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
8058 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
8060 elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
8061 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
8064 echo "(I can't seem to compile and run the test program.)"
8066 xxx="a USG one, i.e. you use setpgrp()."
8068 # SVR4 systems can appear rather BSD-ish.
8071 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
8075 xxx="probably a USG one, i.e. you use setpgrp()."
8080 echo "Assuming your setpgrp is $xxx" >&4
8088 : see if bzero exists
8092 : see if signal is declared as pointer to function returning int or void
8094 xxx=`./findhdr signal.h`
8095 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
8096 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
8097 echo "You have int (*signal())() instead of void." >&4
8099 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
8100 echo "You have void (*signal())()." >&4
8102 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
8103 echo "You have int (*signal())() instead of void." >&4
8105 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
8106 echo "You have void (*signal())()." >&4
8109 case "$d_voidsig" in
8111 echo "I can't determine whether signal handler returns void or int..." >&4
8113 rp="What type does your signal handler return?"
8120 echo "As you already told me, signal handler returns void." >&4
8123 *) echo "As you already told me, signal handler returns int." >&4
8130 case "$d_voidsig" in
8131 "$define") signal_t="void";;
8136 : check for ability to cast large floats to 32-bit ints.
8138 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
8139 if $test "$intsize" -ge 4; then
8146 #include <sys/types.h>
8148 $signal_t blech(s) int s; { exit(3); }
8155 signal(SIGFPE, blech);
8157 /* Don't let compiler optimize the test away. Store the number
8158 in a writable string for gcc to pass to sscanf under HP/UX.
8160 sprintf(str, "2147483647");
8161 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
8165 /* x86 processors will probably give 0x8000 0000, which is a
8166 sign change. We don't want that. We want to mimic SPARC
8167 behavior here, which is to preserve the sign and give
8170 if (i32 != ($xxx) f)
8176 if eval $compile_ok; then
8180 echo "(I can't seem to compile the test program--assuming it can't)"
8188 echo "Nope, it can't."
8195 : check for ability to cast negative floats to unsigned
8197 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
8200 #include <sys/types.h>
8202 $signal_t blech(s) int s; { exit(7); }
8203 $signal_t blech_in_list(s) int s; { exit(4); }
8204 unsigned long dummy_long(p) unsigned long p; { return p; }
8205 unsigned int dummy_int(p) unsigned int p; { return p; }
8206 unsigned short dummy_short(p) unsigned short p; { return p; }
8210 unsigned long along;
8212 unsigned short ashort;
8216 /* Frustrate gcc-2.7.2's optimizer which failed this test with
8217 a direct f = -123. assignment. gcc-2.8.0 reportedly
8218 optimized the whole file away
8220 /* Store the number in a writable string for gcc to pass to
8223 sprintf(str, "-123");
8224 sscanf(str, "%lf", &f); /* f = -123.; */
8226 signal(SIGFPE, blech);
8227 along = (unsigned long)f;
8228 aint = (unsigned int)f;
8229 ashort = (unsigned short)f;
8230 if (along != (unsigned long)-123)
8232 if (aint != (unsigned int)-123)
8234 if (ashort != (unsigned short)-123)
8236 sprintf(str, "1073741824.");
8237 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
8240 along = (unsigned long)f;
8241 if (along != 0x80000000)
8245 along = (unsigned long)f;
8246 if (along != 0x7fffffff)
8250 along = (unsigned long)f;
8251 if (along != 0x80000001)
8255 signal(SIGFPE, blech_in_list);
8256 sprintf(str, "123.");
8257 sscanf(str, "%lf", &f); /* f = 123.; */
8258 along = dummy_long((unsigned long)f);
8259 aint = dummy_int((unsigned int)f);
8260 ashort = dummy_short((unsigned short)f);
8261 if (along != (unsigned long)123)
8263 if (aint != (unsigned int)123)
8265 if (ashort != (unsigned short)123)
8272 if eval $compile_ok; then
8276 echo "(I can't seem to compile the test program--assuming it can't)"
8279 case "$castflags" in
8284 echo "Nope, it can't."
8291 : see if vprintf exists
8293 if set vprintf val -f d_vprintf; eval $csym; $val; then
8294 echo 'vprintf() found.' >&4
8296 $cat >vprintf.c <<'EOF'
8297 #include <varargs.h>
8299 int main() { xxx("foo"); }
8308 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
8312 if eval $compile && ./vprintf; then
8313 echo "Your vsprintf() returns (int)." >&4
8316 echo "Your vsprintf() returns (char*)." >&4
8320 echo 'vprintf() NOT found.' >&4
8330 : see if chown exists
8334 : see if chroot exists
8338 : see if chsize exists
8342 : check for const keyword
8344 echo 'Checking to see if your C compiler knows about "const"...' >&4
8345 $cat >const.c <<'EOCP'
8346 typedef struct spug { int drokk; } spug;
8353 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
8355 echo "Yup, it does."
8358 echo "Nope, it doesn't."
8363 : see if crypt exists
8365 if set crypt val -f d_crypt; eval $csym; $val; then
8366 echo 'crypt() found.' >&4
8370 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
8371 if $test -z "$cryptlib"; then
8372 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
8376 if $test -z "$cryptlib"; then
8377 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
8381 if $test -z "$cryptlib"; then
8382 cryptlib=`./loc libcrypt$_a "" $libpth`
8386 if $test -z "$cryptlib"; then
8387 echo 'crypt() NOT found.' >&4
8396 : get csh whereabouts
8398 'csh') val="$undef" ;;
8403 : Respect a hint or command line value for full_csh.
8405 '') full_csh=$csh ;;
8408 : see if cuserid exists
8409 set cuserid d_cuserid
8412 : see if this is a limits.h system
8413 set limits.h i_limits
8416 : see if this is a float.h system
8420 : See if number of significant digits in a double precision number is known
8422 $cat >dbl_dig.c <<EOM
8432 printf("Contains DBL_DIG");
8435 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
8436 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
8437 echo "DBL_DIG found." >&4
8440 echo "DBL_DIG NOT found." >&4
8447 : see if difftime exists
8448 set difftime d_difftime
8451 : see if this is a dirent system
8453 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
8455 echo "<dirent.h> found." >&4
8458 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
8459 echo "<sys/dir.h> found." >&4
8462 xinc=`./findhdr sys/ndir.h`
8464 echo "<dirent.h> NOT found." >&4
8469 : Look for type of directory structure.
8471 $cppstdin $cppflags $cppminus < "$xinc" > try.c
8473 case "$direntrytype" in
8476 $define) guess1='struct dirent' ;;
8477 *) guess1='struct direct' ;;
8480 *) guess1="$direntrytype"
8485 'struct dirent') guess2='struct direct' ;;
8486 *) guess2='struct dirent' ;;
8489 if $contains "$guess1" try.c >/dev/null 2>&1; then
8490 direntrytype="$guess1"
8491 echo "Your directory entries are $direntrytype." >&4
8492 elif $contains "$guess2" try.c >/dev/null 2>&1; then
8493 direntrytype="$guess2"
8494 echo "Your directory entries seem to be $direntrytype." >&4
8496 echo "I don't recognize your system's directory entries." >&4
8497 rp="What type is used for directory entries on this system?"
8505 : see if the directory entry stores field length
8507 $cppstdin $cppflags $cppminus < "$xinc" > try.c
8508 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
8509 echo "Good, your directory entry keeps length information in d_namlen." >&4
8512 echo "Your directory entry does not know about the d_namlen field." >&4
8519 : see if dlerror exists
8522 set dlerror d_dlerror
8526 : see if dlfcn is available
8534 On a few systems, the dynamically loaded modules that perl generates and uses
8535 will need a different extension than shared libs. The default will probably
8543 rp='What is the extension of dynamically loaded modules'
8552 : Check if dlsym need a leading underscore
8558 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
8559 $cat >dyna.c <<'EOM'
8568 #include <dlfcn.h> /* the dynamic linker include file for Sunos/Solaris */
8570 #include <sys/types.h>
8584 int mode = RTLD_LAZY ;
8586 handle = dlopen("./dyna.$dlext", mode) ;
8587 if (handle == NULL) {
8592 symbol = dlsym(handle, "fred") ;
8593 if (symbol == NULL) {
8594 /* try putting a leading underscore */
8595 symbol = dlsym(handle, "_fred") ;
8596 if (symbol == NULL) {
8609 : Call the object file tmp-dyna.o in case dlext=o.
8610 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
8611 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
8612 $ld -o dyna.$dlext $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
8613 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1; then
8616 1) echo "Test program failed using dlopen." >&4
8617 echo "Perhaps you should not use dynamic loading." >&4;;
8618 2) echo "Test program failed using dlsym." >&4
8619 echo "Perhaps you should not use dynamic loading." >&4;;
8620 3) echo "dlsym needs a leading underscore" >&4
8622 4) echo "dlsym doesn't need a leading underscore." >&4;;
8625 echo "I can't compile and run the test program." >&4
8626 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
8631 $rm -f fred fred.? dyna.$dlext dyna.? tmp-dyna.?
8636 hasproto='varname=$1; func=$2; shift; shift;
8637 while $test $# -ge 2; do
8639 $define) echo "#include <$2>";;
8643 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
8644 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
8645 echo "$func() prototype found.";
8648 echo "$func() prototype NOT found.";
8653 $rm -f try.c tryout.c'
8655 : see if prototype for drand48 is available
8657 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
8660 : see if dup2 exists
8664 : see if eaccess exists
8665 set eaccess d_eaccess
8668 : see if endgrent exists
8669 set endgrent d_endgrent
8672 : see if endhostent exists
8673 set endhostent d_endhent
8676 : see if endnetent exists
8677 set endnetent d_endnent
8680 : see if endprotoent exists
8681 set endprotoent d_endpent
8684 : see if endpwent exists
8685 set endpwent d_endpwent
8688 : see if endservent exists
8689 set endservent d_endsent
8692 : Locate the flags for 'open()'
8694 $cat >open3.c <<'EOCP'
8695 #include <sys/types.h>
8700 #include <sys/file.h>
8711 : check sys/file.h first to get FREAD on Sun
8712 if $test `./findhdr sys/file.h` && \
8713 set open3 -DI_SYS_FILE && eval $compile; then
8715 echo "<sys/file.h> defines the O_* constants..." >&4
8717 echo "and you have the 3 argument form of open()." >&4
8720 echo "but not the 3 argument form of open(). Oh, well." >&4
8723 elif $test `./findhdr fcntl.h` && \
8724 set open3 -DI_FCNTL && eval $compile; then
8726 echo "<fcntl.h> defines the O_* constants..." >&4
8728 echo "and you have the 3 argument form of open()." >&4
8731 echo "but not the 3 argument form of open(). Oh, well." >&4
8736 echo "I can't find the O_* constant definitions! You got problems." >&4
8742 : see which of string.h or strings.h is needed
8744 strings=`./findhdr string.h`
8745 if $test "$strings" && $test -r "$strings"; then
8746 echo "Using <string.h> instead of <strings.h>." >&4
8750 strings=`./findhdr strings.h`
8751 if $test "$strings" && $test -r "$strings"; then
8752 echo "Using <strings.h> instead of <string.h>." >&4
8754 echo "No string header found -- You'll surely have problems." >&4
8760 "$undef") strings=`./findhdr strings.h`;;
8761 *) strings=`./findhdr string.h`;;
8764 : check for non-blocking I/O stuff
8765 case "$h_sysfile" in
8766 true) echo "#include <sys/file.h>" > head.c;;
8769 true) echo "#include <fcntl.h>" > head.c;;
8770 *) echo "#include <sys/fcntl.h>" > head.c;;
8775 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
8776 case "$o_nonblock" in
8779 $cat >>try.c <<'EOCP'
8783 printf("O_NONBLOCK\n");
8787 printf("O_NDELAY\n");
8791 printf("FNDELAY\n");
8798 if eval $compile_ok; then
8800 case "$o_nonblock" in
8801 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
8802 *) echo "Seems like we can use $o_nonblock.";;
8805 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
8808 *) echo "Using $hint value $o_nonblock.";;
8810 $rm -f try try.* .out core
8813 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
8819 #include <sys/types.h>
8822 #define MY_O_NONBLOCK $o_nonblock
8823 #ifndef errno /* XXX need better Configure test */
8834 #include <strings.h>
8836 $signal_t blech(x) int x; { exit(3); }
8838 $cat >> try.c <<'EOCP'
8846 pipe(pd); /* Down: child -> parent */
8847 pipe(pu); /* Up: parent -> child */
8850 close(pd[1]); /* Parent reads from pd[0] */
8851 close(pu[0]); /* Parent writes (blocking) to pu[1] */
8852 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
8854 signal(SIGALRM, blech);
8856 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
8858 sprintf(string, "%d\n", ret);
8859 write(2, string, strlen(string));
8862 if (errno == EAGAIN) {
8868 if (errno == EWOULDBLOCK)
8869 printf("EWOULDBLOCK\n");
8872 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
8873 sleep(2); /* Give it time to close our pipe */
8875 ret = read(pd[0], buf, 1); /* Should read EOF */
8877 sprintf(string, "%d\n", ret);
8878 write(3, string, strlen(string));
8882 close(pd[0]); /* We write to pd[1] */
8883 close(pu[1]); /* We read from pu[0] */
8884 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
8885 close(pd[1]); /* Pipe pd is now fully closed! */
8886 exit(0); /* Bye bye, thank you for playing! */
8890 if eval $compile_ok; then
8891 echo "$startsh" >mtry
8892 echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
8894 ./mtry >/dev/null 2>&1
8896 0) eagain=`$cat try.out`;;
8897 1) echo "Could not perform non-blocking setting!";;
8898 2) echo "I did a successful read() for something that was not there!";;
8899 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
8900 *) echo "Something terribly wrong happened during testing.";;
8902 rd_nodata=`$cat try.ret`
8903 echo "A read() system call with no data present returns $rd_nodata."
8904 case "$rd_nodata" in
8907 echo "(That's peculiar, fixing that to be -1.)"
8913 echo "Forcing errno EAGAIN on read() with no data available."
8917 echo "Your read() sets errno to $eagain when no data is available."
8920 status=`$cat try.err`
8922 0) echo "And it correctly returns 0 to signal EOF.";;
8923 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
8924 *) echo "However, your read() returns '$status' on EOF??";;
8927 if test "$status" = "$rd_nodata"; then
8928 echo "WARNING: you can't distinguish between EOF and no data!"
8932 echo "I can't compile the test program--assuming errno EAGAIN will do."
8939 echo "Using $hint value $eagain."
8940 echo "Your read() returns $rd_nodata when no data is present."
8941 case "$d_eofnblk" in
8942 "$define") echo "And you can see EOF because read() returns 0.";;
8943 "$undef") echo "But you can't see EOF status from read() returned value.";;
8945 echo "(Assuming you can't see EOF status from read anyway.)"
8951 $rm -f try try.* .out core head.c mtry
8953 : see if fchmod exists
8957 : see if fchown exists
8961 : see if this is an fcntl system
8966 : See if fcntl-based locking works.
8967 $cat >try.c <<'EOCP'
8972 #if defined(F_SETLK) && defined(F_SETLKW)
8975 fd = open("try.c", O_RDONLY);
8976 flock.l_type = F_RDLCK;
8977 flock.l_whence = SEEK_SET;
8978 flock.l_start = flock.l_len = 0;
8979 retval = fcntl(fd, F_SETLK, &flock);
8981 (retval < 0 ? exit(2) : exit(0));
8987 echo "Checking if fcntl-based file locking works... "
8991 if eval $compile_ok; then
8993 echo "Yes, it seems to work."
8996 echo "Nope, it didn't work."
9000 echo "I'm unable to compile the test program, so I'll assume not."
9005 echo "Nope, since you don't even have fcntl()."
9008 set d_fcntl_can_lock
9013 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9014 while $test $# -ge 2; do
9016 $define) echo "#include <$2>";;
9020 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9022 if eval $compile; then
9033 : see whether socket exists
9035 $echo $n "Hmm... $c" >&4
9036 if set socket val -f d_socket; eval $csym; $val; then
9037 echo "Looks like you have Berkeley networking support." >&4
9039 if set setsockopt val -f; eval $csym; $val; then
9042 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
9046 if $contains socklib libc.list >/dev/null 2>&1; then
9047 echo "Looks like you have Berkeley networking support." >&4
9049 : we will have to assume that it supports the 4.2 BSD interface
9052 echo "You don't have Berkeley networking in libc$_a..." >&4
9053 if test "X$d_socket" = "X$define"; then
9054 echo "...but you seem to believe that you have sockets." >&4
9056 for net in net socket
9058 if test -f /usr/lib/lib$net$_a; then
9059 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
9060 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
9061 if $contains socket libc.list >/dev/null 2>&1; then
9066 echo "...but the Wollongong group seems to have hacked it in." >&4
9067 sockethdr="-I/usr/netinclude"
9070 echo "Found Berkeley sockets interface in lib$net." >& 4
9071 if $contains setsockopt libc.list >/dev/null 2>&1; then
9074 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
9081 if test "X$d_socket" != "X$define"; then
9082 echo "or anywhere else I see." >&4
9090 : see if socketpair exists
9091 set socketpair d_sockpair
9096 echo "Checking the availability of certain socket constants..." >& 4
9097 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
9098 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
9100 #include <sys/types.h>
9101 #include <sys/socket.h>
9107 set try; if eval $compile; then
9110 set d_${enum}; eval $setvar
9114 : see if sys/select.h has to be included
9115 set sys/select.h i_sysselct
9118 : see if we should include time.h, sys/time.h, or both
9120 if test "X$timeincl" = X; then
9121 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9122 $echo $n "I'm now running the test program...$c"
9123 $cat >try.c <<'EOCP'
9124 #include <sys/types.h>
9129 #ifdef SYSTIMEKERNEL
9132 #include <sys/time.h>
9135 #include <sys/select.h>
9144 struct timezone tzp;
9146 if (foo.tm_sec == foo.tm_sec)
9149 if (bar.tv_sec == bar.tv_sec)
9156 for s_timezone in '-DS_TIMEZONE' ''; do
9158 for s_timeval in '-DS_TIMEVAL' ''; do
9159 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9160 for i_time in '' '-DI_TIME'; do
9161 for i_systime in '-DI_SYSTIME' ''; do
9164 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9165 if eval $compile; then
9166 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9170 $echo $n "Succeeded with $flags$c"
9182 *SYSTIMEKERNEL*) i_systimek="$define"
9183 timeincl=`./findhdr sys/time.h`
9184 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9185 *) i_systimek="$undef";;
9188 *I_TIME*) i_time="$define"
9189 timeincl=`./findhdr time.h`" $timeincl"
9190 echo "We'll include <time.h>." >&4;;
9191 *) i_time="$undef";;
9194 *I_SYSTIME*) i_systime="$define"
9195 timeincl=`./findhdr sys/time.h`" $timeincl"
9196 echo "We'll include <sys/time.h>." >&4;;
9197 *) i_systime="$undef";;
9202 : check for fd_set items
9205 Checking to see how well your C compiler handles fd_set and friends ...
9207 $cat >fd_set.c <<EOCP
9208 #$i_systime I_SYS_TIME
9209 #$i_sysselct I_SYS_SELECT
9210 #$d_socket HAS_SOCKET
9211 #include <sys/types.h>
9213 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
9216 #include <sys/time.h>
9219 #include <sys/select.h>
9228 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
9235 set fd_set -DTRYBITS
9236 if eval $compile; then
9237 d_fds_bits="$define"
9239 echo "Well, your system knows about the normal fd_set typedef..." >&4
9241 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
9242 d_fd_macros="$define"
9245 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
9247 d_fd_macros="$undef"
9251 Hmm, your compiler has some difficulty with fd_set. Checking further...
9254 if eval $compile; then
9257 echo "Well, your system has some sort of fd_set available..." >&4
9259 echo "and you have the normal fd_set macros." >&4
9260 d_fd_macros="$define"
9263 but not the normal fd_set macros! Gross! More work for me...
9265 d_fd_macros="$undef"
9268 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
9271 d_fd_macros="$undef"
9276 : see if fgetpos exists
9277 set fgetpos d_fgetpos
9280 : see if flock exists
9284 : see if fork exists
9288 : see if pathconf exists
9289 set pathconf d_pathconf
9292 : see if fpathconf exists
9293 set fpathconf d_fpathconf
9297 : check for fpos64_t
9299 echo "Checking to see if you have fpos64_t..." >&4
9302 int main() { fpos64_t x = 7; }
9305 if eval $compile; then
9307 echo "You have fpos64_t."
9310 echo "You do not have fpos64_t."
9312 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
9319 : see if frexpl exists
9323 hasstruct='varname=$1; struct=$2; shift; shift;
9324 while $test $# -ge 2; do
9326 $define) echo "#include <$2>";;
9330 echo "int main () { struct $struct foo; }" >> try.c;
9332 if eval $compile; then
9341 : see if this is a sys/param system
9342 set sys/param.h i_sysparam
9345 : see if this is a sys/mount.h system
9346 set sys/mount.h i_sysmount
9349 : see if sys/types.h has to be included
9350 set sys/types.h i_systypes
9355 echo "Checking to see if your system supports struct fs_data..." >&4
9356 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
9358 case "$d_fs_data_s" in
9359 "$define") echo "Yes, it does." ;;
9360 *) echo "No, it doesn't." ;;
9363 : see if fseeko exists
9367 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
9370 : see if fsetpos exists
9371 set fsetpos d_fsetpos
9375 : see if fstatfs exists
9376 set fstatfs d_fstatfs
9380 : see if statvfs exists
9381 set statvfs d_statvfs
9384 : see if fstatvfs exists
9385 set fstatvfs d_fstatvfs
9389 : see if fsync exists
9393 : see if ftello exists
9397 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
9400 : see if getcwd exists
9404 : see if getespwnam exists
9405 set getespwnam d_getespwnam
9409 : see if getfsstat exists
9410 set getfsstat d_getfsstat
9413 : see if getgrent exists
9414 set getgrent d_getgrent
9417 : see if gethostbyaddr exists
9418 set gethostbyaddr d_gethbyaddr
9421 : see if gethostbyname exists
9422 set gethostbyname d_gethbyname
9425 : see if gethostent exists
9426 set gethostent d_gethent
9429 : see how we will look up host name
9432 if set gethostname val -f d_gethname; eval $csym; $val; then
9433 echo 'gethostname() found.' >&4
9434 d_gethname="$define"
9437 if set uname val -f d_uname; eval $csym; $val; then
9440 uname() was found, but you're running xenix, and older versions of xenix
9441 have a broken uname(). If you don't really know whether your xenix is old
9442 enough to have a broken system call, use the default answer.
9449 rp='Is your uname() broken?'
9452 n*) d_uname="$define"; call=uname;;
9455 echo 'uname() found.' >&4
9462 case "$d_gethname" in
9463 '') d_gethname="$undef";;
9466 '') d_uname="$undef";;
9468 case "$d_uname$d_gethname" in
9473 Every now and then someone has a $call() that lies about the hostname
9474 but can't be fixed for political or economic reasons. If you wish, I can
9475 pretend $call() isn't there and maybe compute hostname at run-time
9476 thanks to the '$phostname' command.
9479 rp="Shall I ignore $call() from now on?"
9482 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
9485 case "$phostname" in
9487 *) case "$aphostname" in
9493 file=`./loc $file $file $pth`
9494 aphostname=`echo $file $*`
9499 case "$d_uname$d_gethname" in
9502 case "$phostname" in
9504 echo "There will be no way for $package to get your hostname." >&4;;
9506 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
9510 case "$d_phostname" in
9511 '') d_phostname="$undef";;
9514 : see if this is a netdb.h system
9518 : see if prototypes for various gethostxxx netdb.h functions are available
9520 set d_gethostprotos gethostent $i_netdb netdb.h
9523 : see if getlogin exists
9524 set getlogin d_getlogin
9527 : see if getmnt exists
9531 : see if getmntent exists
9532 set getmntent d_getmntent
9535 : see if getnetbyaddr exists
9536 set getnetbyaddr d_getnbyaddr
9539 : see if getnetbyname exists
9540 set getnetbyname d_getnbyname
9543 : see if getnetent exists
9544 set getnetent d_getnent
9547 : see if prototypes for various getnetxxx netdb.h functions are available
9549 set d_getnetprotos getnetent $i_netdb netdb.h
9552 : see if getpagesize exists
9553 set getpagesize d_getpagsz
9557 : see if getprotobyname exists
9558 set getprotobyname d_getpbyname
9561 : see if getprotobynumber exists
9562 set getprotobynumber d_getpbynumber
9565 : see if getprotoent exists
9566 set getprotoent d_getpent
9569 : see if getpgid exists
9570 set getpgid d_getpgid
9573 : see if getpgrp2 exists
9574 set getpgrp2 d_getpgrp2
9577 : see if getppid exists
9578 set getppid d_getppid
9581 : see if getpriority exists
9582 set getpriority d_getprior
9585 : see if prototypes for various getprotoxxx netdb.h functions are available
9587 set d_getprotoprotos getprotoent $i_netdb netdb.h
9590 : see if getprpwnam exists
9591 set getprpwnam d_getprpwnam
9594 : see if getpwent exists
9595 set getpwent d_getpwent
9599 : see if getservbyname exists
9600 set getservbyname d_getsbyname
9603 : see if getservbyport exists
9604 set getservbyport d_getsbyport
9607 : see if getservent exists
9608 set getservent d_getsent
9611 : see if prototypes for various getservxxx netdb.h functions are available
9613 set d_getservprotos getservent $i_netdb netdb.h
9616 : see if getspnam exists
9617 set getspnam d_getspnam
9620 : see if gettimeofday or ftime exists
9621 set gettimeofday d_gettimeod
9623 case "$d_gettimeod" in
9629 val="$undef"; set d_ftime; eval $setvar
9632 case "$d_gettimeod$d_ftime" in
9635 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
9639 : see if this is an grp system
9645 xxx=`./findhdr grp.h`
9646 $cppstdin $cppflags $cppminus < $xxx >$$.h
9648 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
9660 set d_grpasswd; eval $setvar
9664 : see if hasmntopt exists
9665 set hasmntopt d_hasmntopt
9668 : see if this is a netinet/in.h or sys/in.h system
9669 set netinet/in.h i_niin sys/in.h i_sysin
9672 : see if arpa/inet.h has to be included
9673 set arpa/inet.h i_arpainet
9676 : see if htonl --and friends-- exists
9681 : Maybe they are macros.
9686 #include <sys/types.h>
9687 #$i_niin I_NETINET_IN
9689 #$i_arpainet I_ARPA_INET
9691 #include <netinet/in.h>
9697 #include <arpa/inet.h>
9700 printf("Defined as a macro.");
9703 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
9704 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
9706 echo "But it seems to be defined as a macro." >&4
9714 : see if iconv exists
9720 if set index val -f; eval $csym; $val; then
9721 if set strchr val -f d_strchr; eval $csym; $val; then
9722 if $contains strchr "$strings" >/dev/null 2>&1 ; then
9725 echo "strchr() found." >&4
9729 echo "index() found." >&4
9734 echo "index() found." >&4
9737 if set strchr val -f d_strchr; eval $csym; $val; then
9740 echo "strchr() found." >&4
9742 echo "No index() or strchr() found!" >&4
9747 set d_strchr; eval $setvar
9749 set d_index; eval $setvar
9751 : check whether inet_aton exists
9752 set inet_aton d_inetaton
9755 : see if inttypes.h is available
9756 : we want a real compile instead of Inhdr because some systems
9757 : have an inttypes.h which includes non-existent headers
9760 #include <inttypes.h>
9762 static int32_t foo32 = 0x12345678;
9766 if eval $compile; then
9767 echo "<inttypes.h> found." >&4
9770 echo "<inttypes.h> NOT found." >&4
9779 echo "Checking to see if you have int64_t..." >&4
9781 #include <sys/types.h>
9782 #$i_inttypes I_INTTYPES
9784 #include <inttypes.h>
9786 int main() { int64_t x = 7; }
9789 if eval $compile; then
9791 echo "You have int64_t."
9794 echo "You do not have int64_t."
9802 $cat >isascii.c <<'EOCP'
9814 if eval $compile; then
9815 echo "isascii() found." >&4
9818 echo "isascii() NOT found." >&4
9825 : see if isnan exists
9829 : see if isnanl exists
9833 : see if killpg exists
9837 : see if lchown exists
9839 $cat > try.c <<'EOCP'
9840 /* System header to define __stub macros and hopefully few prototypes,
9841 which can conflict with char lchown(); below. */
9843 /* Override any gcc2 internal prototype to avoid an error. */
9844 /* We use char because int might match the return type of a gcc2
9845 builtin and then its argument prototype would still apply. */
9848 /* The GNU C library defines this for functions which it implements
9849 to always fail with ENOSYS. Some functions are actually named
9850 something starting with __ and the normal name is an alias. */
9851 #if defined (__stub_lchown) || defined (__stub___lchown)
9859 if eval $compile; then
9860 $echo "lchown() found." >&4
9863 $echo "lchown() NOT found." >&4
9869 : See if number of significant digits in a double precision number is known
9871 $cat >ldbl_dig.c <<EOM
9881 printf("Contains LDBL_DIG");
9884 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
9885 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
9886 echo "LDBL_DIG found." >&4
9889 echo "LDBL_DIG NOT found." >&4
9896 : see if link exists
9900 : see if localeconv exists
9901 set localeconv d_locconv
9904 : see if lockf exists
9908 : check for long long
9910 echo "Checking to see if you have long long..." >&4
9911 echo 'int main() { long long x = 7; return 0; }' > try.c
9913 if eval $compile; then
9915 echo "You have long long."
9918 echo "You do not have long long."
9924 : check for length of long long
9925 case "${d_longlong}${longlongsize}" in
9928 echo "Checking to see how big your long longs are..." >&4
9929 $cat >try.c <<'EOCP'
9933 printf("%d\n", (int)sizeof(long long));
9938 if eval $compile_ok; then
9939 longlongsize=`./try$exe_ext`
9940 echo "Your long longs are $longlongsize bytes long."
9944 echo "(I can't seem to compile the test program. Guessing...)"
9945 rp="What is the size of a long long (in bytes)?"
9949 if $test "X$longsize" = "X$longlongsize"; then
9950 echo "(That isn't any different from an ordinary long.)"
9956 : see if prototype for lseek is available
9958 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
9961 : see if lstat exists
9965 : see if madvise exists
9966 set madvise d_madvise
9969 : see if mblen exists
9973 : see if mbstowcs exists
9974 set mbstowcs d_mbstowcs
9977 : see if mbtowc exists
9981 : see if memchr exists
9985 : see if memcmp exists
9989 : see if memcpy exists
9993 : see if memmove exists
9994 set memmove d_memmove
9997 : see if memset exists
10001 : see if mkdir exists
10005 : see if mkdtemp exists
10006 set mkdtemp d_mkdtemp
10009 : see if mkfifo exists
10010 set mkfifo d_mkfifo
10013 : see if mkstemp exists
10014 set mkstemp d_mkstemp
10017 : see if mkstemps exists
10018 set mkstemps d_mkstemps
10021 : see if mktime exists
10022 set mktime d_mktime
10025 : see if this is a sys/mman.h system
10026 set sys/mman.h i_sysmman
10029 : see if mmap exists
10032 : see what shmat returns
10033 : default to something harmless
10035 case "$i_sysmman$d_mmap" in
10037 $cat >mmap.c <<'END'
10038 #include <sys/mman.h>
10041 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
10046 echo "and it returns ($mmaptype)." >&4
10052 : see if modfl exists
10056 : see if mprotect exists
10057 set mprotect d_mprotect
10060 : see if msgctl exists
10061 set msgctl d_msgctl
10064 : see if msgget exists
10065 set msgget d_msgget
10068 : see if msgsnd exists
10069 set msgsnd d_msgsnd
10072 : see if msgrcv exists
10073 set msgrcv d_msgrcv
10076 : see how much of the 'msg*(2)' library is present.
10079 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
10080 *"$undef"*) h_msg=false;;
10084 case "`ipcs 2>&1`" in
10085 "SVID messages"*"not configured"*)
10086 echo "Your $osname does not have the msg*(2) configured." >&4
10089 set msgctl d_msgctl
10091 set msgget d_msgget
10093 set msgsnd d_msgsnd
10095 set msgrcv d_msgrcv
10101 : we could also check for sys/ipc.h ...
10102 if $h_msg && $test `./findhdr sys/msg.h`; then
10103 echo "You have the full msg*(2) library." >&4
10106 echo "You don't have the full msg*(2) library." >&4
10112 : see if msync exists
10116 : see if munmap exists
10117 set munmap d_munmap
10120 : see if nice exists
10126 echo "Checking which 64-bit integer type we could use..." >&4
10132 val='"unsigned int"'
10137 *) case "$longsize" in
10141 val='"unsigned long"'
10146 *) case "$d_longlong:$longlongsize" in
10151 val='"unsigned long long"'
10156 *) case "$d_int64_t" in
10174 case "$quadtype" in
10175 '') echo "Alas, no 64-bit integer types in sight." >&4
10178 *) if test X"$use64bitint" = Xdefine -o X"$longsize" = X8; then
10183 echo "We $verb use '$quadtype' for 64-bit integers." >&4
10188 : check for length of character
10190 case "$charsize" in
10192 echo "Checking to see how big your characters are (hey, you never know)..." >&4
10193 $cat >try.c <<'EOCP'
10197 printf("%d\n", (int)sizeof(char));
10202 if eval $compile_ok; then
10206 echo "(I can't seem to compile the test program. Guessing...)"
10213 rp="What is the size of a character (in bytes)?"
10218 : check for volatile keyword
10220 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
10221 $cat >try.c <<'EOCP'
10224 typedef struct _goo_struct goo_struct;
10225 goo_struct * volatile goo = ((goo_struct *)0);
10226 struct _goo_struct {
10231 typedef unsigned short foo_t;
10232 char *volatile foo;
10234 volatile foo_t blech;
10238 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
10240 echo "Yup, it does."
10243 echo "Nope, it doesn't."
10251 $echo "Choosing the C types to be used for Perl's internal types..." >&4
10253 case "$use64bitint:$d_quad:$quadtype" in
10256 uvtype="$uquadtype"
10261 uvtype="unsigned long"
10267 case "$uselongdouble:$d_longdbl" in
10269 nvtype="long double"
10270 nvsize=$longdblsize
10277 $echo "(IV will be "$ivtype", $ivsize bytes)"
10278 $echo "(UV will be "$uvtype", $uvsize bytes)"
10279 $echo "(NV will be "$nvtype", $nvsize bytes)"
10282 #$i_inttypes I_INTTYPES
10284 #include <inttypes.h>
10289 int8_t i = INT8_MAX;
10290 uint8_t u = UINT8_MAX;
10291 printf("int8_t\n");
10294 int16_t i = INT16_MAX;
10295 uint16_t i = UINT16_MAX;
10296 printf("int16_t\n");
10299 int32_t i = INT32_MAX;
10300 uint32_t u = UINT32_MAX;
10301 printf("int32_t\n");
10307 '') case "$charsize" in
10309 u8type="unsigned char"
10318 if eval $compile; then
10319 case "`./try$exe_ext`" in
10320 int8_t) i8type=int8_t
10330 '') if $test $charsize -ge 1; then
10332 u8type="unsigned char"
10340 '') case "$shortsize" in
10342 u16type="unsigned short"
10350 '') set try -DINT16
10351 if eval $compile; then
10352 case "`./try$exe_ext`" in
10364 '') if $test $shortsize -ge 2; then
10366 u16type="unsigned short"
10374 '') case "$longsize" in
10376 u32type="unsigned long"
10380 *) case "$intsize" in
10382 u32type="unsigned int"
10392 '') set try -DINT32
10393 if eval $compile; then
10394 case "`./try$exe_ext`" in
10406 '') if $test $intsize -ge 4; then
10408 u32type="unsigned int"
10416 '') case "$d_quad:$quadtype" in
10418 i64type="$quadtype"
10419 u64type="$uquadtype"
10427 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
10428 : volatile so that the compiler has to store it out to memory.
10429 if test X"$d_volatile" = X"$define"; then
10434 #include <sys/types.h>
10435 #include <signal.h>
10437 $volatile int bletched = 0;
10438 $signal_t blech(s) int s; { bletched = 1; }
10443 int n = 8 * $uvsize;
10446 signal(SIGFPE, blech);
10449 for (i = 0; i < n; i++) {
10450 u = u << 1 | ($uvtype)1;
10452 if (($uvtype)d != u)
10456 d = ($nvtype)(u - 1);
10457 if (($uvtype)d != (u - 1))
10465 printf("%d\n", ((i == n) ? -n : i));
10471 d_nv_preserves_uv="$undef"
10472 if eval $compile; then
10473 d_nv_preserves_uv_bits="`./try$exe_ext`"
10475 case "$d_nv_preserves_uv_bits" in
10477 d_nv_preserves_uv_bits=`expr 0 - $d_nv_preserves_uv_bits`
10478 $echo "Your NVs can preserve all $d_nv_preserves_uv_bits bits of your UVs." 2>&1
10479 d_nv_preserves_uv="$define"
10481 [1-9]*) $echo "Your NVs can preserve only $d_nv_preserves_uv_bits bits of your UVs." 2>&1
10482 d_nv_preserves_uv="$undef" ;;
10483 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
10484 d_nv_preserves_uv_bits="$undef" ;;
10490 : check for off64_t
10492 echo "Checking to see if you have off64_t..." >&4
10494 #include <sys/types.h>
10495 #include <unistd.h>
10496 int main() { off64_t x = 7; }
10499 if eval $compile; then
10501 echo "You have off64_t."
10504 echo "You do not have off64_t."
10505 case "$lseeksize" in
10506 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
10513 : see if POSIX threads are available
10514 set pthread.h i_pthread
10520 : how to create joinable pthreads
10521 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
10523 echo "Checking what constant to use for creating joinable pthreads..." >&4
10524 $cat >try.c <<'EOCP'
10525 #include <pthread.h>
10527 int detachstate = JOINABLE;
10530 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
10531 if eval $compile; then
10532 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
10533 val="$undef" # Yes, undef.
10534 set d_old_pthread_create_joinable
10537 set old_pthread_create_joinable
10540 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
10541 if eval $compile; then
10542 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
10544 set d_old_pthread_create_joinable
10546 val=PTHREAD_CREATE_UNDETACHED
10547 set old_pthread_create_joinable
10550 set try -DJOINABLE=__UNDETACHED
10551 if eval $compile; then
10552 echo "You seem to use __UNDETACHED." >&4
10554 set d_old_pthread_create_joinable
10557 set old_pthread_create_joinable
10560 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
10562 set d_old_pthread_create_joinable
10565 set old_pthread_create_joinable
10572 d_old_pthread_create_joinable="$undef"
10573 old_pthread_create_joinable=""
10576 : see if pause exists
10580 : see if pipe exists
10584 : see if poll exists
10589 : see whether the various POSIXish _yields exist
10591 #include <pthread.h>
10597 #ifdef PTHREAD_YIELD
10600 #ifdef PTHREAD_YIELD_NULL
10601 pthread_yield(NULL);
10607 : see if sched_yield exists
10608 set try -DSCHED_YIELD
10609 if eval $compile; then
10611 sched_yield='sched_yield()'
10615 case "$usethreads" in
10618 $define) echo 'sched_yield() found.' >&4 ;;
10619 *) echo 'sched_yield() NOT found.' >&4 ;;
10625 : see if pthread_yield exists
10626 set try -DPTHREAD_YIELD
10627 if eval $compile; then
10629 case "$sched_yield" in
10630 '') sched_yield='pthread_yield()' ;;
10633 set try -DPTHREAD_YIELD_NULL
10634 if eval $compile; then
10636 case "$sched_yield" in
10637 '') sched_yield='pthread_yield(NULL)' ;;
10643 case "$usethreads" in
10646 $define) echo 'pthread_yield() found.' >&4 ;;
10647 *) echo 'pthread_yield() NOT found.' >&4 ;;
10651 set d_pthread_yield
10654 case "$sched_yield" in
10655 '') sched_yield=undef ;;
10660 : see if this is a pwd.h system
10666 xxx=`./findhdr pwd.h`
10667 $cppstdin $cppflags $cppminus < $xxx >$$.h
10669 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
10677 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
10685 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
10693 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
10701 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
10709 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
10717 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
10725 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
10737 set d_pwquota; eval $setvar
10738 set d_pwage; eval $setvar
10739 set d_pwchange; eval $setvar
10740 set d_pwclass; eval $setvar
10741 set d_pwexpire; eval $setvar
10742 set d_pwcomment; eval $setvar
10743 set d_pwgecos; eval $setvar
10744 set d_pwpasswd; eval $setvar
10748 : see if readdir and friends exist
10749 set readdir d_readdir
10751 set seekdir d_seekdir
10753 set telldir d_telldir
10755 set rewinddir d_rewinddir
10758 : see if readlink exists
10759 set readlink d_readlink
10762 : see if rename exists
10763 set rename d_rename
10766 : see if rmdir exists
10770 : see if memory.h is available.
10775 : See if it conflicts with string.h
10781 $cppstdin $cppflags $cppminus < $strings > mem.h
10782 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
10784 echo "We won't be including <memory.h>."
10794 : can bcopy handle overlapping blocks?
10799 echo "Checking to see if your bcopy() can do overlapping copies..." >&4
10801 #$i_memory I_MEMORY
10802 #$i_stdlib I_STDLIB
10803 #$i_string I_STRING
10804 #$i_unistd I_UNISTD
10806 $cat >>try.c <<'EOCP'
10809 # include <memory.h>
10812 # include <stdlib.h>
10815 # include <string.h>
10817 # include <strings.h>
10820 # include <unistd.h> /* Needed for NetBSD */
10824 char buf[128], abc[128];
10830 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
10832 for (align = 7; align >= 0; align--) {
10833 for (len = 36; len; len--) {
10835 bcopy(abc, b, len);
10836 for (off = 1; off <= len; off++) {
10837 bcopy(b, b+off, len);
10838 bcopy(b+off, b, len);
10839 if (bcmp(b, abc, len))
10848 if eval $compile_ok; then
10849 if ./try 2>/dev/null; then
10850 echo "Yes, it can."
10853 echo "It can't, sorry."
10854 case "$d_memmove" in
10855 "$define") echo "But that's Ok since you have memmove()." ;;
10859 echo "(I can't compile the test program, so we'll assume not...)"
10860 case "$d_memmove" in
10861 "$define") echo "But that's Ok since you have memmove()." ;;
10866 $rm -f try.* try core
10870 : can memcpy handle overlapping blocks?
10872 case "$d_memcpy" in
10875 echo "Checking to see if your memcpy() can do overlapping copies..." >&4
10877 #$i_memory I_MEMORY
10878 #$i_stdlib I_STDLIB
10879 #$i_string I_STRING
10880 #$i_unistd I_UNISTD
10882 $cat >>try.c <<'EOCP'
10885 # include <memory.h>
10888 # include <stdlib.h>
10891 # include <string.h>
10893 # include <strings.h>
10896 # include <unistd.h> /* Needed for NetBSD */
10900 char buf[128], abc[128];
10906 /* Copy "abcde..." string to char abc[] so that gcc doesn't
10907 try to store the string in read-only memory. */
10908 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
10910 for (align = 7; align >= 0; align--) {
10911 for (len = 36; len; len--) {
10913 memcpy(b, abc, len);
10914 for (off = 1; off <= len; off++) {
10915 memcpy(b+off, b, len);
10916 memcpy(b, b+off, len);
10917 if (memcmp(b, abc, len))
10926 if eval $compile_ok; then
10927 if ./try 2>/dev/null; then
10928 echo "Yes, it can."
10931 echo "It can't, sorry."
10932 case "$d_memmove" in
10933 "$define") echo "But that's Ok since you have memmove()." ;;
10937 echo "(I can't compile the test program, so we'll assume not...)"
10938 case "$d_memmove" in
10939 "$define") echo "But that's Ok since you have memmove()." ;;
10944 $rm -f try.* try core
10948 : can memcmp be trusted to compare relative magnitude?
10950 case "$d_memcmp" in
10953 echo "Checking if your memcmp() can compare relative magnitude..." >&4
10955 #$i_memory I_MEMORY
10956 #$i_stdlib I_STDLIB
10957 #$i_string I_STRING
10958 #$i_unistd I_UNISTD
10960 $cat >>try.c <<'EOCP'
10963 # include <memory.h>
10966 # include <stdlib.h>
10969 # include <string.h>
10971 # include <strings.h>
10974 # include <unistd.h> /* Needed for NetBSD */
10980 if ((a < b) && memcmp(&a, &b, 1) < 0)
10986 if eval $compile_ok; then
10987 if ./try 2>/dev/null; then
10988 echo "Yes, it can."
10991 echo "No, it can't (it uses signed chars)."
10994 echo "(I can't compile the test program, so we'll assume not...)"
10998 $rm -f try.* try core
11002 : see if prototype for sbrk is available
11004 set d_sbrkproto sbrk $i_unistd unistd.h
11007 : see if select exists
11008 set select d_select
11011 : see if semctl exists
11012 set semctl d_semctl
11015 : see if semget exists
11016 set semget d_semget
11019 : see if semop exists
11023 : see how much of the 'sem*(2)' library is present.
11026 case "$d_semctl$d_semget$d_semop" in
11027 *"$undef"*) h_sem=false;;
11031 case "`ipcs 2>&1`" in
11032 "SVID messages"*"not configured"*)
11033 echo "Your $osname does not have the sem*(2) configured." >&4
11036 set semctl d_semctl
11038 set semget d_semget
11046 : we could also check for sys/ipc.h ...
11047 if $h_sem && $test `./findhdr sys/sem.h`; then
11048 echo "You have the full sem*(2) library." >&4
11051 echo "You don't have the full sem*(2) library." >&4
11057 : see whether sys/sem.h defines union semun
11059 $cat > try.c <<'END'
11060 #include <sys/types.h>
11061 #include <sys/ipc.h>
11062 #include <sys/sem.h>
11063 int main () { union semun semun; semun.buf = 0; }
11066 if eval $compile; then
11067 echo "You have union semun in <sys/sem.h>." >&4
11070 echo "You do not have union semun in <sys/sem.h>." >&4
11073 $rm -f try try.c try.h
11077 : see how to do semctl IPC_STAT
11080 : see whether semctl IPC_STAT can use union semun
11085 # define S_IRUSR S_IREAD
11086 # define S_IWUSR S_IWRITE
11087 # define S_IXUSR S_IEXEC
11089 # define S_IRUSR 0400
11090 # define S_IWUSR 0200
11091 # define S_IXUSR 0100
11093 # define S_IRGRP (S_IRUSR>>3)
11094 # define S_IWGRP (S_IWUSR>>3)
11095 # define S_IXGRP (S_IXUSR>>3)
11096 # define S_IROTH (S_IRUSR>>6)
11097 # define S_IWOTH (S_IWUSR>>6)
11098 # define S_IXOTH (S_IXUSR>>6)
11101 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
11102 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
11103 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
11108 #include <sys/types.h>
11109 #include <sys/ipc.h>
11110 #include <sys/sem.h>
11111 #include <sys/stat.h>
11118 #$d_union_semun HAS_UNION_SEMUN
11121 #ifndef HAS_UNION_SEMUN
11124 struct semid_ds *buf;
11125 unsigned short *array;
11131 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
11132 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
11134 struct semid_ds argbuf;
11137 st = semctl(sem, 0, IPC_STAT, arg);
11141 # endif /* IPC_STAT */
11142 printf("semctl IPC_STAT failed: errno = %d\n", errno);
11144 if (semctl(sem, 0, IPC_RMID, arg) != 0)
11145 # endif /* IPC_RMID */
11146 printf("semctl IPC_RMID failed: errno = %d\n", errno);
11148 #endif /* IPC_PRIVATE && ... */
11149 printf("semget failed: errno = %d\n", errno);
11155 if eval $compile; then
11158 semun) val="$define" ;;
11164 case "$d_semctl_semun" in
11166 echo "You can use union semun for semctl IPC_STAT." >&4
11169 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
11174 : see whether semctl IPC_STAT can use struct semid_ds pointer
11175 $cat > try.c <<'END'
11176 #include <sys/types.h>
11177 #include <sys/ipc.h>
11178 #include <sys/sem.h>
11179 #include <sys/stat.h>
11187 struct semid_ds arg;
11190 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
11191 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
11194 st = semctl(sem, 0, IPC_STAT, &arg);
11196 printf("semid_ds\n");
11198 # endif /* IPC_STAT */
11199 printf("semctl IPC_STAT failed: errno = %d\n", errno);
11201 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
11202 # endif /* IPC_RMID */
11203 printf("semctl IPC_RMID failed: errno = %d\n", errno);
11205 #endif /* IPC_PRIVATE && ... */
11206 printf("semget failed: errno = %d\n", errno);
11213 if eval $compile; then
11216 semid_ds) val="$define" ;;
11220 set d_semctl_semid_ds
11222 case "$d_semctl_semid_ds" in
11224 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
11226 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
11233 # We do not have the full sem*(2) library, so assume we can not
11239 set d_semctl_semid_ds
11244 : see if setegid exists
11245 set setegid d_setegid
11248 : see if seteuid exists
11249 set seteuid d_seteuid
11252 : see if setgrent exists
11253 set setgrent d_setgrent
11256 : see if sethostent exists
11257 set sethostent d_sethent
11260 : see if setlinebuf exists
11261 set setlinebuf d_setlinebuf
11264 : see if setlocale exists
11265 set setlocale d_setlocale
11268 : see if setnetent exists
11269 set setnetent d_setnent
11272 : see if setprotoent exists
11273 set setprotoent d_setpent
11276 : see if setpgid exists
11277 set setpgid d_setpgid
11280 : see if setpgrp2 exists
11281 set setpgrp2 d_setpgrp2
11284 : see if setpriority exists
11285 set setpriority d_setprior
11288 : see if setproctitle exists
11289 set setproctitle d_setproctitle
11292 : see if setpwent exists
11293 set setpwent d_setpwent
11296 : see if setregid exists
11297 set setregid d_setregid
11299 set setresgid d_setresgid
11302 : see if setreuid exists
11303 set setreuid d_setreuid
11305 set setresuid d_setresuid
11308 : see if setrgid exists
11309 set setrgid d_setrgid
11312 : see if setruid exists
11313 set setruid d_setruid
11316 : see if setservent exists
11317 set setservent d_setsent
11320 : see if setsid exists
11321 set setsid d_setsid
11324 : see if setvbuf exists
11325 set setvbuf d_setvbuf
11328 : see if sfio.h is available
11333 : see if sfio library is available
11344 : Ok, but do we want to use it.
11348 true|$define|[yY]*) dflt='y';;
11351 echo "$package can use the sfio library, but it is experimental."
11352 case "$useperlio" in
11354 echo "For sfio also the PerlIO abstraction layer is needed."
11355 echo "Earlier you said you wouldn't want that."
11358 rp="You seem to have sfio available, do you want to try using it?"
11361 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
11362 useperlio="$define"
11365 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
11367 : Remove sfio from list of libraries to use
11368 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
11371 echo "libs = $libs" >&4
11375 *) case "$usesfio" in
11376 true|$define|[yY]*)
11377 echo "Sorry, cannot find sfio on this machine." >&4
11378 echo "Ignoring your setting of usesfio=$usesfio." >&4
11387 $define) usesfio='true';;
11388 *) usesfio='false';;
11391 : see if shmctl exists
11392 set shmctl d_shmctl
11395 : see if shmget exists
11396 set shmget d_shmget
11399 : see if shmat exists
11402 : see what shmat returns
11405 $cat >shmat.c <<'END'
11406 #include <sys/shm.h>
11409 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
11414 echo "and it returns ($shmattype)." >&4
11415 : see if a prototype for shmat is available
11416 xxx=`./findhdr sys/shm.h`
11417 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
11418 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
11429 set d_shmatprototype
11432 : see if shmdt exists
11436 : see how much of the 'shm*(2)' library is present.
11439 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
11440 *"$undef"*) h_shm=false;;
11444 case "`ipcs 2>&1`" in
11445 "SVID shared memory"*"not configured"*)
11446 echo "Your $osname does not have the shm*(2) configured." >&4
11449 set shmctl d_shmctl
11451 set shmget d_shmget
11461 : we could also check for sys/ipc.h ...
11462 if $h_shm && $test `./findhdr sys/shm.h`; then
11463 echo "You have the full shm*(2) library." >&4
11466 echo "You don't have the full shm*(2) library." >&4
11473 : see if we have sigaction
11474 if set sigaction val -f d_sigaction; eval $csym; $val; then
11475 echo 'sigaction() found.' >&4
11476 $cat > try.c <<'EOP'
11478 #include <sys/types.h>
11479 #include <signal.h>
11482 struct sigaction act, oact;
11484 oact.sa_handler = 0;
11485 /* so that act and oact are used */
11486 exit(act.sa_flags == 0 && oact.sa_handler == 0);
11490 if eval $compile_ok; then
11493 echo "But you don't seem to have a useable struct sigaction." >&4
11497 echo 'sigaction NOT found.' >&4
11500 set d_sigaction; eval $setvar
11501 $rm -f try try$_o try.c
11503 : see if sigsetjmp exists
11505 case "$d_sigsetjmp" in
11507 $cat >try.c <<'EOP'
11508 #include <setjmp.h>
11513 if (sigsetjmp(env,1))
11516 siglongjmp(env, 1);
11521 if eval $compile; then
11522 if ./try >/dev/null 2>&1; then
11523 echo "POSIX sigsetjmp found." >&4
11527 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
11533 echo "sigsetjmp not found." >&4
11537 *) val="$d_sigsetjmp"
11538 case "$d_sigsetjmp" in
11539 $define) echo "POSIX sigsetjmp found." >&4;;
11540 $undef) echo "sigsetjmp not found." >&4;;
11548 : see if socks5_init exists
11549 set socks5_init d_socks5_init
11552 : see if sys/stat.h is available
11553 set sys/stat.h i_sysstat
11557 : see if stat knows about block sizes
11559 echo "Checking to see if your struct stat has st_blocks field..." >&4
11560 set d_statblks stat st_blocks $i_sysstat sys/stat.h
11564 : see if this is a sys/vfs.h system
11565 set sys/vfs.h i_sysvfs
11569 : see if this is a sys/statfs.h system
11570 set sys/statfs.h i_sysstatfs
11575 echo "Checking to see if your system supports struct statfs..." >&4
11576 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
11578 case "$d_statfs_s" in
11579 "$define") echo "Yes, it does." ;;
11580 *) echo "No, it doesn't." ;;
11585 : see if struct statfs knows about f_flags
11586 case "$d_statfs_s" in
11589 echo "Checking to see if your struct statfs has f_flags field..." >&4
11590 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
11594 set d_statfs_f_flags
11598 case "$d_statfs_f_flags" in
11599 "$define") echo "Yes, it does." ;;
11600 *) echo "No, it doesn't." ;;
11603 : see if _ptr and _cnt from stdio act std
11606 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
11607 echo "(Looks like you have stdio.h from BSD.)"
11608 case "$stdio_ptr" in
11609 '') stdio_ptr='((fp)->_p)'
11612 *) ptr_lval=$d_stdio_ptr_lval;;
11614 case "$stdio_cnt" in
11615 '') stdio_cnt='((fp)->_r)'
11618 *) cnt_lval=$d_stdio_cnt_lval;;
11620 case "$stdio_base" in
11621 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
11623 case "$stdio_bufsiz" in
11624 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
11626 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
11627 echo "(Looks like you have stdio.h from Linux.)"
11628 case "$stdio_ptr" in
11629 '') stdio_ptr='((fp)->_IO_read_ptr)'
11632 *) ptr_lval=$d_stdio_ptr_lval;;
11634 case "$stdio_cnt" in
11635 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
11638 *) cnt_lval=$d_stdio_cnt_lval;;
11640 case "$stdio_base" in
11641 '') stdio_base='((fp)->_IO_read_base)';;
11643 case "$stdio_bufsiz" in
11644 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
11647 case "$stdio_ptr" in
11648 '') stdio_ptr='((fp)->_ptr)'
11651 *) ptr_lval=$d_stdio_ptr_lval;;
11653 case "$stdio_cnt" in
11654 '') stdio_cnt='((fp)->_cnt)'
11657 *) cnt_lval=$d_stdio_cnt_lval;;
11659 case "$stdio_base" in
11660 '') stdio_base='((fp)->_base)';;
11662 case "$stdio_bufsiz" in
11663 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
11667 : test whether _ptr and _cnt really work
11668 echo "Checking how std your stdio is..." >&4
11671 #define FILE_ptr(fp) $stdio_ptr
11672 #define FILE_cnt(fp) $stdio_cnt
11674 FILE *fp = fopen("try.c", "r");
11677 18 <= FILE_cnt(fp) &&
11678 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
11686 if eval $compile; then
11688 echo "Your stdio acts pretty std."
11691 echo "Your stdio isn't very std."
11694 echo "Your stdio doesn't appear very std."
11700 : Can _ptr be used as an lvalue?
11701 case "$d_stdstdio$ptr_lval" in
11702 $define$define) val=$define ;;
11705 set d_stdio_ptr_lval
11708 : Can _cnt be used as an lvalue?
11709 case "$d_stdstdio$cnt_lval" in
11710 $define$define) val=$define ;;
11713 set d_stdio_cnt_lval
11717 : test whether setting _ptr sets _cnt as a side effect
11718 d_stdio_ptr_lval_sets_cnt="$undef"
11719 d_stdio_ptr_lval_nochange_cnt="$undef"
11720 case "$d_stdio_ptr_lval$d_stdstdio" in
11722 echo "Checking to see what happens if we set the stdio ptr..." >&4
11725 /* Can we scream? */
11726 /* Eat dust sed :-) */
11727 /* In the buffer space, no one can hear you scream. */
11728 #define FILE_ptr(fp) $stdio_ptr
11729 #define FILE_cnt(fp) $stdio_cnt
11730 #include <sys/types.h>
11732 FILE *fp = fopen("try.c", "r");
11737 puts("Fail even to read");
11740 c = getc(fp); /* Read away the first # */
11742 puts("Fail even to read");
11746 18 <= FILE_cnt(fp) &&
11747 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
11749 puts("Fail even to read");
11752 ptr = (char*) FILE_ptr(fp);
11753 cnt = (size_t)FILE_cnt(fp);
11755 FILE_ptr(fp) += 42;
11757 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
11758 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
11761 if (FILE_cnt(fp) <= 20) {
11762 printf ("Fail (<20 chars to test)");
11765 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
11766 puts("Fail compare");
11769 if (cnt == FILE_cnt(fp)) {
11770 puts("Pass_unchanged");
11773 if (FILE_cnt(fp) == (cnt - 42)) {
11774 puts("Pass_changed");
11777 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
11783 if eval $compile; then
11784 case `./try$exe_ext` in
11786 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
11787 d_stdio_ptr_lval_sets_cnt="$define" ;;
11789 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
11790 d_stdio_ptr_lval_nochange_cnt="$define" ;;
11792 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
11794 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
11797 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
11803 : see if _base is also standard
11805 case "$d_stdstdio" in
11809 #define FILE_base(fp) $stdio_base
11810 #define FILE_bufsiz(fp) $stdio_bufsiz
11812 FILE *fp = fopen("try.c", "r");
11815 19 <= FILE_bufsiz(fp) &&
11816 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
11823 if eval $compile; then
11825 echo "And its _base field acts std."
11828 echo "But its _base field isn't std."
11831 echo "However, it seems to be lacking the _base field."
11840 Checking how to access stdio streams by file descriptor number...
11842 case "$stdio_stream_array" in
11843 '') $cat >try.c <<EOCP
11846 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
11850 for s in _iob __iob __sF
11852 set try -DSTDIO_STREAM_ARRAY=$s
11853 if eval $compile; then
11854 case "`./try$exe_ext`" in
11855 yes) stdio_stream_array=$s; break ;;
11859 $rm -f try.* try$exe_ext
11861 case "$stdio_stream_array" in
11863 I can't figure out how to access stdio streams by file descriptor number.
11865 d_stdio_stream_array="$undef"
11868 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
11870 d_stdio_stream_array="$define"
11874 : see if strcoll exists
11875 set strcoll d_strcoll
11878 : check for structure copying
11880 echo "Checking to see if your C compiler can copy structs..." >&4
11881 $cat >try.c <<'EOCP'
11891 if $cc -c try.c >/dev/null 2>&1 ; then
11893 echo "Yup, it can."
11896 echo "Nope, it can't."
11902 : see if strerror and/or sys_errlist[] exist
11904 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
11905 if set strerror val -f d_strerror; eval $csym; $val; then
11906 echo 'strerror() found.' >&4
11907 d_strerror="$define"
11908 d_strerrm='strerror(e)'
11909 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
11910 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
11911 d_syserrlst="$define"
11913 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
11914 d_syserrlst="$undef"
11916 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
11917 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
11918 echo 'strerror() found in string header.' >&4
11919 d_strerror="$define"
11920 d_strerrm='strerror(e)'
11921 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
11922 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
11923 d_syserrlst="$define"
11925 echo "(You don't appear to have any sys_errlist[], how can this be?)"
11926 d_syserrlst="$undef"
11928 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
11929 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
11930 d_strerror="$undef"
11931 d_syserrlst="$define"
11932 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
11934 echo 'strerror() and sys_errlist[] NOT found.' >&4
11935 d_strerror="$undef"
11936 d_syserrlst="$undef"
11937 d_strerrm='"unknown"'
11941 : see if strtod exists
11942 set strtod d_strtod
11945 : see if strtol exists
11946 set strtol d_strtol
11949 : see if strtold exists
11950 set strtold d_strtold
11953 : see if strtoll exists
11954 set strtoll d_strtoll
11957 case "$d_longlong-$d_strtoll" in
11960 Checking whether your strtoll() works okay...
11962 $cat >try.c <<'EOCP'
11965 #define strtoll __strtoll
11968 #define strtoll _strtoll
11971 extern long long int strtoll(char *s, char **, int);
11972 static int bad = 0;
11973 int check(char *s, long long ell, int een) {
11976 gll = strtoll(s, 0, 10);
11977 if (!((gll == ell) && (errno == een)))
11981 check(" 1", 1LL, 0);
11982 check(" 0", 0LL, 0);
11983 check("-1", -1LL, 0);
11984 check("-9223372036854775808", -9223372036854775808LL, 0);
11985 check("-9223372036854775808", -9223372036854775808LL, 0);
11986 check(" 9223372036854775807", 9223372036854775807LL, 0);
11987 check("-9223372036854775808", -9223372036854775808LL, 0);
11988 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
11989 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
11995 if eval $compile; then
11998 ok) echo "Your strtoll() seems to be working okay." ;;
12000 Your strtoll() doesn't seem to be working okay.
12006 echo "(I can't seem to compile the test program--assuming it doesn't)"
12012 : see if strtoq exists
12013 set strtoq d_strtoq
12016 : see if strtoul exists
12017 set strtoul d_strtoul
12020 case "$d_strtoul" in
12023 Checking whether your strtoul() works okay...
12025 $cat >try.c <<'EOCP'
12028 extern unsigned long int strtoul(char *s, char **, int);
12029 static int bad = 0;
12030 void check(char *s, unsigned long eul, int een) {
12033 gul = strtoul(s, 0, 10);
12034 if (!((gul == eul) && (errno == een)))
12038 check(" 1", 1L, 0);
12039 check(" 0", 0L, 0);
12041 case "$longsize" in
12043 $cat >>try.c <<'EOCP'
12044 check("18446744073709551615", 18446744073709551615UL, 0);
12045 check("18446744073709551616", 18446744073709551615UL, ERANGE);
12046 #if 0 /* strtoul() for /^-/ strings is undefined. */
12047 check("-1", 18446744073709551615UL, 0);
12048 check("-18446744073709551614", 2, 0);
12049 check("-18446744073709551615", 1, 0);
12050 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
12051 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
12056 $cat >>try.c <<'EOCP'
12057 check("4294967295", 4294967295UL, 0);
12058 check("4294967296", 4294967295UL, ERANGE);
12059 #if 0 /* strtoul() for /^-/ strings is undefined. */
12060 check("-1", 4294967295UL, 0);
12061 check("-4294967294", 2, 0);
12062 check("-4294967295", 1, 0);
12063 check("-4294967296", 4294967295UL, ERANGE);
12064 check("-4294967297", 4294967295UL, ERANGE);
12069 : Should we write these tests to be more portable by sprintf-ing
12070 : ~0 and then manipulating that char string as input for strtol?
12073 $cat >>try.c <<'EOCP'
12080 if eval $compile; then
12082 ok) echo "Your strtoul() seems to be working okay." ;;
12084 Your strtoul() doesn't seem to be working okay.
12093 : see if strtoull exists
12094 set strtoull d_strtoull
12097 case "$d_longlong-$d_strtoull" in
12100 Checking whether your strtoull() works okay...
12102 $cat >try.c <<'EOCP'
12105 #define strtoull __strtoull
12108 extern unsigned long long int strtoull(char *s, char **, int);
12109 static int bad = 0;
12110 int check(char *s, long long eull, int een) {
12113 gull = strtoull(s, 0, 10);
12114 if (!((gull == eull) && (errno == een)))
12118 check(" 1", 1LL, 0);
12119 check(" 0", 0LL, 0);
12120 check("18446744073709551615", 18446744073709551615ULL, 0);
12121 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
12122 #if 0 /* strtoull() for /^-/ strings is undefined. */
12123 check("-1", 18446744073709551615ULL, 0);
12124 check("-18446744073709551614", 2LL, 0);
12125 check("-18446744073709551615", 1LL, 0);
12126 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
12127 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
12134 if eval $compile; then
12136 ok) echo "Your strtoull() seems to be working okay." ;;
12138 Your strtoull() doesn't seem to be working okay.
12140 d_strtoull="$undef"
12147 : see if strtouq exists
12148 set strtouq d_strtouq
12151 case "$d_strtouq" in
12154 Checking whether your strtouq() works okay...
12156 $cat >try.c <<'EOCP'
12159 extern unsigned long long int strtouq(char *s, char **, int);
12160 static int bad = 0;
12161 void check(char *s, unsigned long long eull, int een) {
12162 unsigned long long gull;
12164 gull = strtouq(s, 0, 10);
12165 if (!((gull == eull) && (errno == een)))
12169 check(" 1", 1LL, 0);
12170 check(" 0", 0LL, 0);
12171 check("18446744073709551615", 18446744073709551615ULL, 0);
12172 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
12173 #if 0 /* strtouq() for /^-/ strings is undefined. */
12174 check("-1", 18446744073709551615ULL, 0);
12175 check("-18446744073709551614", 2LL, 0);
12176 check("-18446744073709551615", 1LL, 0);
12177 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
12178 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
12186 if eval $compile; then
12188 ok) echo "Your strtouq() seems to be working okay." ;;
12190 Your strtouq() doesn't seem to be working okay.
12199 : see if strxfrm exists
12200 set strxfrm d_strxfrm
12203 : see if symlink exists
12204 set symlink d_symlink
12207 : see if syscall exists
12208 set syscall d_syscall
12211 : see if sysconf exists
12212 set sysconf d_sysconf
12215 : see if system exists
12216 set system d_system
12219 : see if tcgetpgrp exists
12220 set tcgetpgrp d_tcgetpgrp
12223 : see if tcsetpgrp exists
12224 set tcsetpgrp d_tcsetpgrp
12227 : see if prototype for telldir is available
12229 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
12232 : see if this is a sys/times.h system
12233 set sys/times.h i_systimes
12236 : see if times exists
12238 if set times val -f d_times; eval $csym; $val; then
12239 echo 'times() found.' >&4
12242 case "$i_systimes" in
12243 "$define") inc='sys/times.h';;
12245 rp="What is the type returned by times() on this system?"
12246 set clock_t clocktype long stdio.h sys/types.h $inc
12249 echo 'times() NOT found, hope that will do.' >&4
12254 : see if truncate exists
12255 set truncate d_truncate
12258 : see if tzname[] exists
12260 if set tzname val -a d_tzname; eval $csym; $val; then
12262 echo 'tzname[] found.' >&4
12265 echo 'tzname[] NOT found.' >&4
12270 : see if umask exists
12274 : see if ustat exists
12278 : backward compatibility for d_hvfork
12279 if test X$d_hvfork != X; then
12280 d_vfork="$d_hvfork"
12283 : see if there is a vfork
12288 : Ok, but do we want to use it. vfork is reportedly unreliable in
12289 : perl on Solaris 2.x, and probably elsewhere.
12293 case "$usevfork" in
12299 Perl can only use a vfork() that doesn't suffer from strict
12300 restrictions on calling functions or modifying global data in
12301 the child. For example, glibc-2.1 contains such a vfork()
12302 that is unsuitable. If your system provides a proper fork()
12303 call, chances are that you do NOT want perl to use vfork().
12306 rp="Do you still want to use vfork()?"
12311 echo "Ok, we won't use vfork()."
12320 $define) usevfork='true';;
12321 *) usevfork='false';;
12324 : see if this is an sysdir system
12325 set sys/dir.h i_sysdir
12328 : see if this is an sysndir system
12329 set sys/ndir.h i_sysndir
12332 : see if closedir exists
12333 set closedir d_closedir
12336 case "$d_closedir" in
12339 echo "Checking whether closedir() returns a status..." >&4
12340 cat > closedir.c <<EOM
12341 #$i_dirent I_DIRENT /**/
12342 #$i_sysdir I_SYS_DIR /**/
12343 #$i_sysndir I_SYS_NDIR /**/
12344 #$i_systypes I_SYS_TYPES /**/
12346 #if defined(I_SYS_TYPES)
12347 #include <sys/types.h>
12349 #if defined(I_DIRENT)
12350 #include <dirent.h>
12351 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
12352 #include <sys/dir.h>
12356 #include <sys/ndir.h>
12360 #include <ndir.h> /* may be wrong in the future */
12362 #include <sys/dir.h>
12367 int main() { return closedir(opendir(".")); }
12370 if eval $compile_ok; then
12371 if ./closedir > /dev/null 2>&1 ; then
12372 echo "Yes, it does."
12375 echo "No, it doesn't."
12379 echo "(I can't seem to compile the test program--assuming it doesn't)"
12387 set d_void_closedir
12390 : see if there is a wait4
12394 : see if waitpid exists
12395 set waitpid d_waitpid
12398 : see if wcstombs exists
12399 set wcstombs d_wcstombs
12402 : see if wctomb exists
12403 set wctomb d_wctomb
12406 : preserve RCS keywords in files with variable substitution, grrr
12411 Revision='$Revision'
12413 case "$crosscompile" in
12414 ''|[nN]*) crosscompile="$undef" ;;
12418 next|rhapsody|darwin) multiarch="$define" ;;
12420 case "$multiarch" in
12421 ''|[nN]*) multiarch="$undef" ;;
12424 : check for alignment requirements
12426 case "$crosscompile$multiarch" in
12429 You seem to be either cross-compiling or doing a multiarchitecture build,
12430 skipping the memory alignment check.
12433 case "$alignbytes" in
12434 '') alignbytes=8 ;;
12438 case "$alignbytes" in
12439 '') echo "Checking alignment constraints..." >&4
12440 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
12441 $cat >try.c <<'EOCP'
12442 typedef long double NV;
12445 $cat >try.c <<'EOCP'
12449 $cat >>try.c <<'EOCP'
12457 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
12462 if eval $compile_ok; then
12466 echo "(I can't seem to compile the test program...)"
12469 *) dflt="$alignbytes"
12472 rp="Doubles must be aligned on a how-many-byte boundary?"
12480 : set the base revision
12483 : check for ordering of bytes in a long
12485 case "$crosscompile$multiarch" in
12488 You seem to be either cross-compiling or doing a multiarchitecture build,
12489 skipping the byteorder check.
12495 case "$byteorder" in
12498 In the following, larger digits indicate more significance. A big-endian
12499 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
12500 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
12501 machines may have weird orders like 3412. A Cray will report 87654321,
12502 an Alpha will report 12345678. If the test program works the default is
12504 I'm now running the test program...
12506 $cat >try.c <<'EOCP'
12513 char c[sizeof(long)];
12516 if (sizeof(long) > 4)
12517 u.l = (0x08070605L << 32) | 0x04030201L;
12520 for (i = 0; i < sizeof(long); i++)
12521 printf("%c", u.c[i]+'0');
12528 if eval $compile && ./try > /dev/null; then
12531 [1-4][1-4][1-4][1-4]|12345678|87654321)
12532 echo "(The test program ran ok.)"
12533 echo "byteorder=$dflt"
12536 ????|????????) echo "(The test program ran ok.)" ;;
12537 *) echo "(The test program didn't run right for some reason.)" ;;
12542 (I can't seem to compile the test program. Guessing big-endian...)
12545 case "$xxx_prompt" in
12547 rp="What is the order of bytes in a long?"
12561 : how do we catenate cpp tokens here?
12563 echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
12564 $cat >cpp_stuff.c <<'EOCP'
12565 #define RCAT(a,b)a/**/b
12566 #define ACAT(a,b)a ## b
12570 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
12571 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
12572 echo "Oh! Smells like ANSI's been here." >&4
12573 echo "We can catify or stringify, separately or together!"
12575 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
12576 echo "Ah, yes! The good old days!" >&4
12577 echo "However, in the good old days we don't know how to stringify and"
12578 echo "catify at the same time."
12582 Hmm, I don't seem to be able to catenate tokens with your cpp. You're going
12583 to have to edit the values of CAT[2-5] in config.h...
12585 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
12589 : see if this is a db.h system
12595 : Check db version.
12597 echo "Checking Berkeley DB version ..." >&4
12603 #include <sys/types.h>
12608 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
12609 int Major, Minor, Patch ;
12610 unsigned long Version ;
12611 (void)db_version(&Major, &Minor, &Patch) ;
12612 printf("You have Berkeley DB Version 2 or greater\n");
12614 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
12615 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
12616 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
12617 Major, Minor, Patch) ;
12619 /* check that db.h & libdb are compatible */
12620 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
12621 printf("db.h and libdb are incompatible\n") ;
12625 printf("db.h and libdb are compatible\n") ;
12627 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
12628 + DB_VERSION_PATCH ;
12630 /* needs to be >= 2.3.4 */
12631 if (Version < 2003004) {
12632 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
12633 printf("but Perl needs Berkeley DB 2.3.4 or greater\n") ;
12639 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
12640 printf("You have Berkeley DB Version 1\n");
12641 exit(0); /* DB version < 2: the coast is clear. */
12643 exit(1); /* <db.h> not Berkeley DB? */
12649 if eval $compile_ok && ./try; then
12650 echo 'Looks OK.' >&4
12652 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
12656 : Remove db from list of libraries to use
12657 echo "Removing unusable -ldb from library list" >&4
12658 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
12661 echo "libs = $libs" >&4
12671 : Check the return type needed for hash
12673 echo "Checking return type needed for hash for Berkeley DB ..." >&4
12679 #include <sys/types.h>
12682 #ifndef DB_VERSION_MAJOR
12683 u_int32_t hash_cb (ptr, size)
12691 info.hash = hash_cb;
12695 if $cc $ccflags -c try.c >try.out 2>&1 ; then
12696 if $contains warning try.out >>/dev/null 2>&1 ; then
12699 db_hashtype='u_int32_t'
12702 : XXX Maybe we should just give up here.
12703 db_hashtype=u_int32_t
12705 echo "Help: I can't seem to compile the db test program." >&4
12706 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
12709 echo "Your version of Berkeley DB uses $db_hashtype for hash."
12711 *) db_hashtype=u_int32_t
12716 : Check the return type needed for prefix
12718 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
12724 #include <sys/types.h>
12727 #ifndef DB_VERSION_MAJOR
12728 size_t prefix_cb (key1, key2)
12736 info.prefix = prefix_cb;
12740 if $cc $ccflags -c try.c >try.out 2>&1 ; then
12741 if $contains warning try.out >>/dev/null 2>&1 ; then
12742 db_prefixtype='int'
12744 db_prefixtype='size_t'
12747 db_prefixtype='size_t'
12748 : XXX Maybe we should just give up here.
12750 echo "Help: I can't seem to compile the db test program." >&4
12751 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
12754 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
12756 *) db_prefixtype='size_t'
12760 : check for void type
12762 echo "Checking to see how well your C compiler groks the void type..." >&4
12763 case "$voidflags" in
12765 $cat >try.c <<'EOCP'
12771 extern void moo(); /* function returning void */
12772 void (*goo)(); /* ptr to func returning void */
12774 void *hue; /* generic ptr */
12787 int main() { sub(); }
12789 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
12790 voidflags=$defvoidused
12791 echo "Good. It appears to support void to the level $package wants.">&4
12792 if $contains warning .out >/dev/null 2>&1; then
12793 echo "However, you might get some warnings that look like this:"
12797 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
12798 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
12799 echo "It supports 1..."
12800 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
12801 echo "It also supports 2..."
12802 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
12804 echo "And it supports 4 but not 8 definitely."
12806 echo "It doesn't support 4..."
12807 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
12809 echo "But it supports 8."
12812 echo "Neither does it support 8."
12816 echo "It does not support 2..."
12817 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
12819 echo "But it supports 4 and 8."
12821 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
12823 echo "And it supports 4 but has not heard about 8."
12825 echo "However it supports 8 but not 4."
12830 echo "There is no support at all for void."
12835 case "$voidflags" in
12837 *) $cat >&4 <<'EOM'
12838 Support flag bits are:
12839 1: basic void declarations.
12840 2: arrays of pointers to functions returning void.
12841 4: operations between pointers to and addresses of void functions.
12842 8: generic void pointers.
12845 rp="Your void support flags add up to what?"
12853 : How can we generate normalized random numbers ?
12855 echo "Looking for a random number function..." >&4
12856 case "$randfunc" in
12858 if set drand48 val -f; eval $csym; $val; then
12860 echo "Good, found drand48()." >&4
12861 elif set random val -f; eval $csym; $val; then
12863 echo "OK, found random()." >&4
12866 echo "Yick, looks like I have to use rand()." >&4
12877 *-Dmy_rand=*|*-Dmy_srand=*)
12878 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
12879 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
12880 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
12881 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
12885 while $test "$cont"; do
12886 rp="Use which function to generate random numbers?"
12888 if $test "$ans" = "$dflt"; then
12894 if set $ans val -f; eval $csym; $val; then
12898 rp="I cannot find function $ans. Use that name anyway?"
12907 case "$randfunc" in
12909 drand01="drand48()"
12915 case "$randbits" in
12917 echo "Checking to see how many bits your $randfunc() function produces..." >&4
12919 #$i_unistd I_UNISTD
12920 #$i_stdlib I_STDLIB
12923 # include <unistd.h>
12926 # include <stdlib.h>
12931 register unsigned long tmp;
12932 register unsigned long max = 0L;
12934 for (i = 1000; i; i--) {
12935 tmp = (unsigned long) $randfunc();
12936 if (tmp > max) max = tmp;
12938 for (i = 0; max; i++)
12944 if eval $compile_ok; then
12948 echo "(I can't seem to compile the test program...)"
12955 rp="How many bits does your $randfunc() function produce?"
12959 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
12960 seedfunc="s$randfunc"
12961 randseedtype=unsigned
12965 rp="How many bits does your $randfunc() function produce?"
12968 seedfunc="s$randfunc"
12969 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
12970 if set $seedfunc val -f; eval $csym; $val; then
12971 echo "(Using $seedfunc() to seed random generator)"
12973 echo "(Warning: no $seedfunc() to seed random generator)"
12976 randseedtype=unsigned
12984 echo "Determining whether or not we are on an EBCDIC system..." >&4
12985 $cat >tebcdic.c <<'EOM'
12988 if ('M'==0xd4) return 0;
12995 if eval $compile_ok; then
12997 echo "You seem to speak EBCDIC." >&4
13000 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF8." >&4
13003 echo "I'm unable to compile the test program." >&4
13004 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
13006 $rm -f tebcdic.c tebcdic
13012 Checking how to flush all pending stdio output...
13014 # I only know how to find the first 32 possibly open files on SunOS.
13015 # See also hints/sunos_4_1.sh and util.c --AD
13017 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
13019 $cat >>try.c <<EOCP
13021 #$i_unistd I_UNISTD
13023 # include <unistd.h>
13025 #$d_sysconf HAS_SYSCONF
13026 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
13027 #ifdef HAS_STDIO_STREAM_ARRAY
13028 # define STDIO_STREAM_ARRAY $stdio_stream_array
13031 FILE* p = fopen("try.out", "w");
13035 # ifdef TRY_FPRINTF
13039 #ifdef TRY_FFLUSH_NULL
13042 #ifdef TRY_FFLUSH_ALL
13044 long open_max = -1;
13045 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
13046 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
13048 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
13049 open_max = sysconf(_SC_OPEN_MAX);
13052 open_max = FOPEN_MAX;
13055 open_max = OPEN_MAX;
13064 # ifdef HAS_STDIO_STREAM_ARRAY
13065 if (open_max > 0) {
13067 for (i = 0; i < open_max; i++)
13068 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
13069 STDIO_STREAM_ARRAY[i]._file < open_max &&
13070 STDIO_STREAM_ARRAY[i]._flag)
13071 fflush(&STDIO_STREAM_ARRAY[i]);
13079 : first we have to find out how _not_ to flush
13080 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
13082 set try -DTRY_FPUTC
13083 if eval $compile; then
13085 ./try$exe_ext 2>/dev/null
13086 if $test ! -s try.out -a "X$?" = X42; then
13092 set try -DTRY_FPRINTF
13094 if eval $compile; then
13096 ./try$exe_ext 2>/dev/null
13097 if $test ! -s try.out -a "X$?" = X42; then
13098 output=-DTRY_FPRINTF
13104 : check for fflush NULL behaviour
13105 case "$fflushNULL" in
13106 '') set try -DTRY_FFLUSH_NULL $output
13107 if eval $compile; then
13109 ./try$exe_ext 2>/dev/null
13111 if $test -s try.out -a "X$code" = X42; then
13112 fflushNULL="`$cat try.out`"
13114 if $test "X$code" != X42; then
13116 (If this test failed, don't worry, we'll try another method shortly.)
13121 $rm -f core try.core core.try.*
13122 case "$fflushNULL" in
13124 Your fflush(NULL) works okay for output streams.
13125 Let's see if it clobbers input pipes...
13127 # As of mid-March 2000 all versions of Solaris appear to have a stdio
13128 # bug that improperly flushes the input end of pipes. So we avoid the
13129 # autoflush on fork/system/exec support for now. :-(
13130 $cat >tryp.c <<EOCP
13133 main(int argc, char **argv)
13139 while ((i = getc(stdin)) != -1
13140 && (*bp++ = i) != '\n'
13141 && bp < &buf[1024])
13144 fprintf(stdout, "%s", buf);
13152 fflushNULL="$define"
13154 if eval $compile; then
13156 $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out
13157 if cmp tryp.c tryp.out >/dev/null 2>&1; then
13159 fflush(NULL) seems to behave okay with input streams.
13161 fflushNULL="$define"
13164 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
13166 fflushNULL="$undef"
13169 $rm -f core tryp.c tryp.core core.tryp.*
13172 Your fflush(NULL) isn't working (contrary to ANSI C).
13174 fflushNULL="$undef"
13177 Cannot figure out whether your fflush(NULL) works or not.
13178 I'm assuming it doesn't (contrary to ANSI C).
13180 fflushNULL="$undef"
13184 $define|true|[yY]*)
13185 fflushNULL="$define"
13188 fflushNULL="$undef"
13191 : check explicit looping only if NULL did not work, and if the pipe
13192 : bug does not show up on an explicit flush too
13193 case "$fflushNULL" in
13195 $cat >tryp.c <<EOCP
13198 main(int argc, char **argv)
13204 while ((i = getc(stdin)) != -1
13205 && (*bp++ = i) != '\n'
13206 && bp < &buf[1024])
13209 fprintf(stdout, "%s", buf);
13218 if eval $compile; then
13220 $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out
13221 if cmp tryp.c tryp.out >/dev/null 2>&1; then
13223 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
13225 : now check for fflushall behaviour
13226 case "$fflushall" in
13227 '') set try -DTRY_FFLUSH_ALL $output
13228 if eval $compile; then
13230 (Now testing the other method--but note that this also may fail.)
13233 ./try$exe_ext 2>/dev/null
13234 if $test -s try.out -a "X$?" = X42; then
13235 fflushall="`$cat try.out`"
13238 $rm -f core try.core core.try.*
13239 case "$fflushall" in
13241 Whew. Flushing explicitly all the stdio streams works.
13243 fflushall="$define"
13246 Sigh. Flushing explicitly all the stdio streams doesn't work.
13251 Cannot figure out whether flushing stdio streams explicitly works or not.
13252 I'm assuming it doesn't.
13258 "$define"|true|[yY]*)
13259 fflushall="$define"
13267 All is futile. Even fflush(stdin) clobbers input pipes!
13274 $rm -f core tryp.c tryp.core core.tryp.*
13276 *) fflushall="$undef"
13280 case "$fflushNULL$fflushall" in
13283 OK, I give up. I cannot figure out how to flush pending stdio output.
13284 We won't be flushing handles at all before fork/exec/popen.
13288 $rm -f try.* try$exe_ext
13290 : Store the full pathname to the ar program for use in the C program
13291 : Respect a hint or command line value for full_ar.
13296 : Store the full pathname to the sed program for use in the C program
13299 : see what type gids are declared as in the kernel
13301 echo "Looking for the type for group ids returned by getgid()."
13302 set gid_t gidtype xxx stdio.h sys/types.h
13306 xxx=`./findhdr sys/user.h`
13307 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
13309 unsigned) dflt="$1 $2" ;;
13313 *) dflt="$gidtype";;
13316 gid_t) echo "gid_t found." ;;
13317 *) rp="What is the type for group ids returned by getgid()?"
13325 *_t) zzz="$gidtype" ;;
13328 echo "Checking the size of $zzz..." >&4
13330 #include <sys/types.h>
13333 printf("%d\n", (int)sizeof($gidtype));
13338 if eval $compile_ok; then
13342 echo "(I can't execute the test program--guessing $gidsize.)" >&4
13345 echo "Your $zzz is $gidsize bytes long."
13350 echo "(I can't compile the test program--guessing $gidsize.)" >&4
13356 *_t) zzz="$gidtype" ;;
13359 echo "Checking the sign of $zzz..." >&4
13361 #include <sys/types.h>
13372 if eval $compile; then
13376 echo "(I can't execute the test program--guessing unsigned.)" >&4
13380 1) echo "Your $zzz is unsigned." ;;
13381 -1) echo "Your $zzz is signed." ;;
13387 echo "(I can't compile the test program--guessing unsigned.)" >&4
13393 if $test X"$quadtype" != X; then
13395 echo "Checking how to print 64-bit integers..." >&4
13397 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
13398 $cat >try.c <<'EOCP'
13399 #include <sys/types.h>
13402 int q = 12345678901;
13403 printf("%ld\n", q);
13407 if eval $compile; then
13408 yyy=`./try$exe_ext`
13411 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
13412 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
13413 echo "We will use %d."
13419 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
13420 $cat >try.c <<'EOCP'
13421 #include <sys/types.h>
13424 long q = 12345678901;
13425 printf("%ld\n", q);
13429 if eval $compile; then
13430 yyy=`./try$exe_ext`
13433 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
13434 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
13435 echo "We will use %ld."
13441 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
13442 $cat >try.c <<'EOCP'
13443 #include <sys/types.h>
13444 #include <inttypes.h>
13447 int64_t q = 12345678901;
13448 printf("%" PRId64 "\n", q);
13452 if eval $compile; then
13453 yyy=`./try$exe_ext`
13456 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
13457 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
13458 echo "We will use the C9X style."
13464 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
13465 $cat >try.c <<'EOCP'
13466 #include <sys/types.h>
13469 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
13470 printf("%lld\n", q);
13474 if eval $compile; then
13475 yyy=`./try$exe_ext`
13478 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
13479 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
13480 echo "We will use the %lld style."
13486 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
13488 #include <sys/types.h>
13491 $quadtype q = 12345678901;
13492 printf("%Ld\n", q);
13496 if eval $compile; then
13497 yyy=`./try$exe_ext`
13500 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
13501 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
13502 echo "We will use %Ld."
13508 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
13510 #include <sys/types.h>
13513 $quadtype q = 12345678901;
13514 printf("%qd\n", q);
13518 if eval $compile; then
13519 yyy=`./try$exe_ext`
13522 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
13523 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
13524 echo "We will use %qd."
13530 if $test X"$sPRId64" = X; then
13531 echo "Cannot figure out how to print 64-bit integers." >&4
13539 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
13540 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
13542 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
13543 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
13549 $echo "Checking the format strings to be used for Perl's internal types..." >&4
13551 if $test X"$ivsize" = X8; then
13552 ivdformat="$sPRId64"
13553 uvuformat="$sPRIu64"
13554 uvoformat="$sPRIo64"
13555 uvxformat="$sPRIx64"
13556 uvXUformat="$sPRIXU64"
13558 if $test X"$ivsize" = X"$longsize"; then
13565 if $test X"$ivsize" = X"$intsize"; then
13573 if $test X"$ivsize" = X"$shortsize"; then
13584 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
13585 nveformat="$sPRIeldbl"
13586 nvfformat="$sPRIfldbl"
13587 nvgformat="$sPRIgldbl"
13588 nvEUformat="$sPRIEUldbl"
13589 nvFUformat="$sPRIFUldbl"
13590 nvGUformat="$sPRIGUldbl"
13600 case "$ivdformat" in
13601 '') echo "$0: Fatal: failed to find format strings, cannot continue." >& 4
13608 $echo "Checking the format string to be used for gids..." >&4
13611 -1) if $test X"$gidsize" = X"$ivsize"; then
13612 gidformat="$ivdformat"
13614 if $test X"$gidsize" = X"$longsize"; then
13617 if $test X"$gidsize" = X"$intsize"; then
13620 if $test X"$gidsize" = X"$shortsize"; then
13627 *) if $test X"$gidsize" = X"$uvsize"; then
13628 gidformat="$uvuformat"
13630 if $test X"$gidsize" = X"$longsize"; then
13633 if $test X"$gidsize" = X"$intsize"; then
13636 if $test X"$gidsize" = X"$shortsize"; then
13645 : see if getgroups exists
13646 set getgroups d_getgrps
13649 : see if setgroups exists
13650 set setgroups d_setgrps
13654 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
13656 case "$d_getgrps$d_setgrps" in
13658 case "$groupstype" in
13659 '') dflt="$gidtype" ;;
13660 *) dflt="$groupstype" ;;
13663 What type of pointer is the second argument to getgroups() and setgroups()?
13664 Usually this is the same as group ids, $gidtype, but not always.
13667 rp='What type pointer is the second argument to getgroups() and setgroups()?'
13671 *) groupstype="$gidtype";;
13675 echo "Checking if your $make program sets \$(MAKE)..." >&4
13676 case "$make_set_make" in
13678 $sed 's/^X //' > testmake.mak << 'EOF'
13680 X @echo 'maketemp="$(MAKE)"'
13682 case "`$make -f testmake.mak 2>/dev/null`" in
13683 *maketemp=*) make_set_make='#' ;;
13684 *) make_set_make="MAKE=$make" ;;
13686 $rm -f testmake.mak
13689 case "$make_set_make" in
13690 '#') echo "Yup, it does.";;
13691 *) echo "Nope, it doesn't.";;
13694 : see what type is used for mode_t
13695 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
13696 set mode_t modetype int stdio.h sys/types.h
13699 : see if stdarg is available
13701 if $test `./findhdr stdarg.h`; then
13702 echo "<stdarg.h> found." >&4
13705 echo "<stdarg.h> NOT found." >&4
13709 : see if varags is available
13711 if $test `./findhdr varargs.h`; then
13712 echo "<varargs.h> found." >&4
13714 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
13717 : set up the varargs testing programs
13718 $cat > varargs.c <<EOP
13720 #include <stdarg.h>
13723 #include <varargs.h>
13727 int f(char *p, ...)
13741 p = va_arg(ap, char *);
13746 $cat > varargs <<EOP
13748 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
13757 : now check which varargs header should be included
13762 if `./varargs I_STDARG`; then
13764 elif `./varargs I_VARARGS`; then
13769 if `./varargs I_VARARGS`; then
13776 echo "I could not find the definition for va_dcl... You have problems..." >&4
13777 val="$undef"; set i_stdarg; eval $setvar
13778 val="$undef"; set i_varargs; eval $setvar
13783 case "$i_varhdr" in
13785 val="$define"; set i_stdarg; eval $setvar
13786 val="$undef"; set i_varargs; eval $setvar
13789 val="$undef"; set i_stdarg; eval $setvar
13790 val="$define"; set i_varargs; eval $setvar
13793 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
13797 : see if we need va_copy
13799 case "$i_stdarg" in
13802 #include <stdarg.h>
13804 #$i_stdlib I_STDLIB
13806 #include <stdlib.h>
13808 #include <signal.h>
13811 ivfprintf(FILE *f, const char *fmt, va_list *valp)
13813 return vfprintf(f, fmt, *valp);
13817 myvfprintf(FILE *f, const char *fmt, va_list val)
13819 return ivfprintf(f, fmt, &val);
13823 myprintf(char *fmt, ...)
13826 va_start(val, fmt);
13827 return myvfprintf(stdout, fmt, val);
13831 main(int ac, char **av)
13833 signal(SIGSEGV, exit);
13835 myprintf("%s%cs all right, then\n", "that", '\'');
13840 if eval $compile && ./try 2>&1 >/dev/null; then
13842 "that's all right, then")
13848 yes) echo "It seems that you don't need va_copy()." >&4
13849 need_va_copy="$undef"
13851 *) echo "It seems that va_copy() or similar will be needed." >&4
13852 need_va_copy="$define"
13855 $rm -f try.* core core.* *.core *.core.*
13857 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
13861 : define a fucntion to check prototypes
13862 $cat > protochk <<EOSH
13865 optimize="$optimize"
13867 prototype="$prototype"
13872 $cat >> protochk <<'EOSH'
13877 while test $# -ge 2; do
13879 $define) echo "#include <$2>" >> try.c ;;
13880 literal) echo "$2" >> try.c ;;
13884 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
13885 cat >> try.c <<'EOCP'
13886 #ifdef CAN_PROTOTYPE
13887 #define _(args) args
13892 echo "$foo" >> try.c
13893 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
13894 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
13900 $eunicefix protochk
13902 : see what type is used for size_t
13903 rp="What is the type used for the length parameter for string functions?"
13904 set size_t sizetype 'unsigned int' stdio.h sys/types.h
13907 : check for type of arguments to gethostbyaddr.
13908 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
13909 case "$d_gethbyaddr" in
13913 Checking to see what type of arguments are accepted by gethostbyaddr().
13915 hdrs="$define sys/types.h
13916 $d_socket sys/socket.h
13917 $i_niin netinet/in.h
13919 $i_unistd unistd.h"
13920 : The first arg can 'char *' or 'void *'
13921 : The second arg is some of integral type
13922 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
13923 for yyy in size_t long int; do
13924 case "$netdb_host_type" in
13925 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
13926 if ./protochk "$try" $hdrs; then
13927 echo "Your system accepts $xxx for the first arg."
13928 echo "...and $yyy for the second arg."
13929 netdb_host_type="$xxx"
13930 netdb_hlen_type="$yyy"
13936 : In case none of those worked, prompt the user.
13937 case "$netdb_host_type" in
13938 '') rp='What is the type for the 1st argument to gethostbyaddr?'
13941 netdb_host_type=$ans
13942 rp='What is the type for the 2nd argument to gethostbyaddr?'
13945 netdb_hlen_type=$ans
13949 *) : no gethostbyaddr, so pick harmless defaults
13950 netdb_host_type='char *'
13951 netdb_hlen_type="$sizetype"
13954 # Remove the "const" if needed. -- but then we'll have a
13956 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
13959 : check for type of argument to gethostbyname.
13960 if test "X$netdb_name_type" = X ; then
13961 case "$d_gethbyname" in
13965 Checking to see what type of argument is accepted by gethostbyname().
13967 hdrs="$define sys/types.h
13968 $d_socket sys/socket.h
13969 $i_niin netinet/in.h
13971 $i_unistd unistd.h"
13972 for xxx in "const char *" "char *"; do
13973 case "$netdb_name_type" in
13974 '') try="extern struct hostent *gethostbyname($xxx);"
13975 if ./protochk "$try" $hdrs; then
13976 echo "Your system accepts $xxx."
13977 netdb_name_type="$xxx"
13982 : In case none of those worked, prompt the user.
13983 case "$netdb_name_type" in
13984 '') rp='What is the type for the 1st argument to gethostbyname?'
13987 netdb_name_type=$ans
13991 *) : no gethostbyname, so pick harmless default
13992 netdb_name_type='char *'
13997 : check for type of 1st argument to getnetbyaddr.
13998 if test "X$netdb_net_type" = X ; then
13999 case "$d_getnbyaddr" in
14003 Checking to see what type of 1st argument is accepted by getnetbyaddr().
14005 hdrs="$define sys/types.h
14006 $d_socket sys/socket.h
14007 $i_niin netinet/in.h
14009 $i_unistd unistd.h"
14010 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
14011 case "$netdb_net_type" in
14012 '') try="extern struct netent *getnetbyaddr($xxx, int);"
14013 if ./protochk "$try" $hdrs; then
14014 echo "Your system accepts $xxx."
14015 netdb_net_type="$xxx"
14020 : In case none of those worked, prompt the user.
14021 case "$netdb_net_type" in
14022 '') rp='What is the type for the 1st argument to getnetbyaddr?'
14025 netdb_net_type=$ans
14029 *) : no getnetbyaddr, so pick harmless default
14030 netdb_net_type='long'
14034 : locate the preferred pager for this system
14040 [a-zA-Z]:/*) dflt=$pg;;
14044 [a-zA-Z]:/*) dflt=$more;;
14048 [a-zA-Z]:/*) dflt=$less;;
14051 '') dflt=/usr/ucb/more;;
14058 rp='What pager is used on your system?'
14062 : see what type pids are declared as in the kernel
14063 rp="What is the type of process ids on this system?"
14064 set pid_t pidtype int stdio.h sys/types.h
14067 : Find earliest binary compatible site_perl subdirectory perl can use.
14068 case "$bincompat5005" in
14069 "$define") xs_apiversion='5.005' ;;
14070 *) xs_apiversion=$version ;; # The current site_perl version.
14072 : Find earliest pure perl site_perl subdirectory perl can use.
14073 : The versioned directories started at 5.005.
14074 pm_apiversion='5.005'
14076 : check for length of pointer
14080 echo "Checking to see how big your pointers are..." >&4
14081 if test "$voidflags" -gt 7; then
14082 echo '#define VOID_PTR char *' > try.c
14084 echo '#define VOID_PTR void *' > try.c
14086 $cat >>try.c <<'EOCP'
14090 printf("%d\n", (int)sizeof(VOID_PTR));
14095 if eval $compile_ok; then
14097 echo "Your pointers are $ptrsize bytes long."
14100 echo "(I can't seem to compile the test program. Guessing...)" >&4
14101 rp="What is the size of a pointer (in bytes)?"
14109 : see if ar generates random libraries by itself
14111 echo "Checking how to generate random libraries on your machine..." >&4
14112 echo 'int bar1() { return bar2(); }' > bar1.c
14113 echo 'int bar2() { return 2; }' > bar2.c
14114 $cat > foo.c <<'EOP'
14115 int main() { printf("%d\n", bar1()); exit(0); }
14117 $cc $ccflags -c bar1.c >/dev/null 2>&1
14118 $cc $ccflags -c bar2.c >/dev/null 2>&1
14119 $cc $ccflags -c foo.c >/dev/null 2>&1
14120 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
14121 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
14122 ./foobar >/dev/null 2>&1; then
14123 echo "$ar appears to generate random libraries itself."
14126 elif $ar ts bar$_a >/dev/null 2>&1 &&
14127 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
14128 ./foobar >/dev/null 2>&1; then
14129 echo "a table of contents needs to be added with '$ar ts'."
14136 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
14137 $test -f $ranlib || ranlib=''
14140 if $test -n "$ranlib"; then
14141 echo "your system has '$ranlib'; we'll use that."
14144 echo "your system doesn't seem to support random libraries"
14145 echo "so we'll use lorder and tsort to order the libraries."
14152 : check for type of arguments to select.
14153 case "$selecttype" in
14154 '') case "$d_select" in
14158 Checking to see what type of arguments are accepted by select().
14160 hdrs="$define sys/types.h
14161 $i_systime sys/time.h
14162 $i_sysselct sys/select.h
14163 $d_socket sys/socket.h"
14164 : The first arg can be int, unsigned, or size_t
14165 : The last arg may or may not be 'const'
14167 : void pointer has been seen but using that
14168 : breaks the selectminbits test
14169 for xxx in 'fd_set *' 'int *'; do
14170 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
14171 for tmo in 'struct timeval *' 'const struct timeval *'; do
14173 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
14174 if ./protochk "$try" $hdrs; then
14175 echo "Your system accepts $xxx."
14184 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
14185 case "$d_fd_set" in
14186 $define) dflt="fd_set *" ;;
14195 *) : no select, so pick a harmless default
14202 : check for the select 'width'
14203 case "$selectminbits" in
14204 '') case "$d_select" in
14208 Checking to see on how many bits at a time your select() operates...
14211 #include <sys/types.h>
14213 #$i_systime I_SYS_TIME
14214 #$i_systimek I_SYS_TIME_KERNEL
14219 # ifdef I_SYS_TIME_KERNEL
14222 # include <sys/time.h>
14223 # ifdef I_SYS_TIME_KERNEL
14227 #$i_sysselct I_SYS_SELECT
14228 #ifdef I_SYS_SELECT
14229 #include <sys/select.h>
14231 #$d_socket HAS_SOCKET
14233 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
14237 #define S sizeof(*(b))
14239 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
14240 #define NBITS (NBYTES * 8)
14249 fp = fopen("try.c", "r");
14255 b = ($selecttype)s;
14256 for (i = 0; i < NBITS; i++)
14260 select(fd + 1, b, 0, 0, &t);
14261 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
14262 printf("%d\n", i + 1);
14267 if eval $compile_ok; then
14268 selectminbits=`./try`
14269 case "$selectminbits" in
14271 Cannot figure out on how many bits at a time your select() operates.
14272 I'll play safe and guess it is 32 bits.
14278 *) bits="$selectminbits bits" ;;
14280 echo "Your select() operates on $bits at a time." >&4
14282 rp='What is the minimum number of bits your select() operates on?'
14283 case "$byteorder" in
14284 1234|12345678) dflt=32 ;;
14289 selectminbits="$val"
14293 *) : no select, so pick a harmless default
14300 : Trace out the files included by signal.h, then look for SIGxxx names.
14301 : Remove SIGARRAYSIZE used by HPUX.
14302 : Remove SIGSTKSIZE used by Linux.
14303 : Remove SIGSTKSZ used by Posix.
14304 : Remove SIGTYP void lines used by OS2.
14305 : Some cpps, like os390, dont give the file name anywhere
14306 if [ "X$fieldn" = X ]; then
14307 : Just make some guesses. We check them later.
14308 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
14310 xxx=`echo '#include <signal.h>' |
14311 $cppstdin $cppminus $cppflags 2>/dev/null |
14312 $grep '^[ ]*#.*include' |
14313 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sort | $uniq`
14315 : Check this list of files to be sure we have parsed the cpp output ok.
14316 : This will also avoid potentially non-existent files, such
14319 for xx in $xxx /dev/null ; do
14320 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
14322 : If we have found no files, at least try signal.h
14323 case "$xxxfiles" in
14324 '') xxxfiles=`./findhdr signal.h` ;;
14327 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
14328 print substr($2, 4, 20)
14330 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
14331 print substr($3, 4, 20)
14333 : Append some common names just in case the awk scan failed.
14334 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
14335 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
14336 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
14337 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
14338 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
14340 : generate a few handy files for later
14341 $cat > signal.c <<'EOCP'
14342 #include <sys/types.h>
14343 #include <signal.h>
14347 /* Strange style to avoid deeply-nested #if/#else/#endif */
14350 # define NSIG (_NSIG)
14356 # define NSIG (SIGMAX+1)
14362 # define NSIG (SIG_MAX+1)
14368 # define NSIG (MAXSIG+1)
14374 # define NSIG (MAX_SIG+1)
14379 # ifdef SIGARRAYSIZE
14380 # define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
14386 # define NSIG (_sys_nsig) /* Solaris 2.5 */
14390 /* Default to some arbitrary number that's big enough to get most
14391 of the common signals.
14397 printf("NSIG %d\n", NSIG);
14403 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
14405 printf "#ifdef SIG"; printf $1; printf "\n"
14406 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
14407 printf $1; printf ");\n"
14411 printf "#endif /* JUST_NSIG */\n";
14412 printf "exit(0);\n}\n";
14415 $cat >signal.awk <<'EOP'
14416 BEGIN { ndups = 0 }
14417 $1 ~ /^NSIG$/ { nsig = $2 }
14418 ($1 !~ /^NSIG$/) && (NF == 2) {
14419 if ($2 > maxsig) { maxsig = $2 }
14420 if (sig_name[$2]) {
14421 dup_name[ndups] = $1
14422 dup_num[ndups] = $2
14434 printf("NSIG %d\n", nsig);
14435 for (n = 1; n < nsig; n++) {
14437 printf("%s %d\n", sig_name[n], sig_num[n])
14440 printf("NUM%d %d\n", n, n)
14443 for (n = 0; n < ndups; n++) {
14444 printf("%s %d\n", dup_name[n], dup_num[n])
14448 $cat >signal_cmd <<EOS
14450 if $test -s signal.lst; then
14451 echo "Using your existing signal.lst file"
14456 $cat >>signal_cmd <<'EOS'
14459 if eval $compile_ok; then
14460 ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
14462 echo "(I can't seem be able to compile the whole test program)" >&4
14463 echo "(I'll try it in little pieces.)" >&4
14464 set signal -DJUST_NSIG
14465 if eval $compile_ok; then
14466 ./signal$_exe > signal.nsg
14469 echo "I can't seem to figure out how many signals you have." >&4
14470 echo "Guessing 50." >&4
14471 echo 'NSIG 50' > signal.nsg
14473 : Now look at all the signal names, one at a time.
14474 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
14475 $cat > signal.c <<EOCP
14476 #include <sys/types.h>
14477 #include <signal.h>
14480 printf("$xx %d\n", SIG${xx});
14485 if eval $compile; then
14486 echo "SIG${xx} found."
14487 ./signal$_exe >> signal.ls1
14489 echo "SIG${xx} NOT found."
14492 if $test -s signal.ls1; then
14493 $cat signal.nsg signal.ls1 |
14494 $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
14498 if $test -s signal.lst; then
14501 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
14502 echo 'kill -l' >signal
14503 set X `csh -f <signal`
14507 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
14509 echo $@ | $tr ' ' $trnl | \
14510 $awk '{ printf "%s %d\n", $1, ++s; }
14511 END { printf "NSIG %d\n", ++s }' >signal.lst
14513 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
14515 chmod a+x signal_cmd
14516 $eunicefix signal_cmd
14518 : generate list of signal names
14520 case "$sig_name_init" in
14522 *) case "$sig_num_init" in
14523 ''|*,*) doinit=yes ;;
14528 echo "Generating a list of signal names and numbers..." >&4
14530 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
14531 sig_name=`$awk 'BEGIN { printf "ZERO " }
14532 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
14533 sig_num=`$awk 'BEGIN { printf "0 " }
14534 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
14535 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
14536 !/^NSIG/ { printf "\"%s\", ", $1 }
14537 END { printf "0\n" }' signal.lst`
14538 sig_num_init=`$awk 'BEGIN { printf "0, " }
14539 !/^NSIG/ { printf "%d, ", $2}
14540 END { printf "0\n"}' signal.lst`
14543 echo "The following $sig_count signals are available:"
14545 echo $sig_name | $awk \
14546 'BEGIN { linelen = 0 }
14548 for (i = 1; i <= NF; i++) {
14549 name = "SIG" $i " "
14550 linelen = linelen + length(name)
14551 if (linelen > 70) {
14553 linelen = length(name)
14559 $rm -f signal signal.c signal.awk signal.lst signal_cmd
14562 case "$sizetype" in
14563 *_t) zzz="$sizetype" ;;
14564 *) zzz="filesize" ;;
14566 echo "Checking the size of $zzz..." >&4
14568 #include <sys/types.h>
14571 printf("%d\n", (int)sizeof($sizetype));
14576 if eval $compile_ok; then
14580 echo "(I can't execute the test program--guessing $sizesize.)" >&4
14583 echo "Your $zzz size is $sizesize bytes."
14588 echo "(I can't compile the test program--guessing $sizesize.)" >&4
14592 : check for socklen_t
14594 echo "Checking to see if you have socklen_t..." >&4
14596 #include <sys/types.h>
14597 #$d_socket HAS_SOCKET
14599 #include <sys/socket.h>
14601 int main() { socklen_t x = 16; }
14604 if eval $compile; then
14606 echo "You have socklen_t."
14609 echo "You do not have socklen_t."
14610 case "$sizetype" in
14611 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
14618 : see if this is a socks.h system
14619 set socks.h i_socks
14622 : check for type of the size argument to socket calls
14623 case "$d_socket" in
14627 Checking to see what type is the last argument of accept().
14630 case "$d_socklen_t" in
14631 "$define") yyy="$yyy socklen_t"
14633 yyy="$yyy $sizetype int long unsigned"
14634 for xxx in $yyy; do
14635 case "$socksizetype" in
14636 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
14637 case "$usesocks" in
14639 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
14640 echo "Your system accepts '$xxx *' for the last argument of accept()."
14641 socksizetype="$xxx"
14644 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
14645 echo "Your system accepts '$xxx *' for the last argument of accept()."
14646 socksizetype="$xxx"
14653 : In case none of those worked, prompt the user.
14654 case "$socksizetype" in
14655 '') rp='What is the type for socket address structure sizes?'
14662 *) : no sockets, so pick relatively harmless default
14667 : see what type is used for signed size_t
14668 set ssize_t ssizetype int stdio.h sys/types.h
14671 $cat > ssize.c <<EOM
14673 #include <sys/types.h>
14674 #define Size_t $sizetype
14675 #define SSize_t $dflt
14678 if (sizeof(Size_t) == sizeof(SSize_t))
14680 else if (sizeof(Size_t) == sizeof(int))
14689 if eval $compile_ok && ./ssize > /dev/null; then
14690 ssizetype=`./ssize`
14691 echo "I'll be using $ssizetype for functions returning a byte count." >&4
14694 Help! I can't compile and run the ssize_t test program: please enlighten me!
14695 (This is probably a misconfiguration in your system or libraries, and
14696 you really ought to fix it. Still, I'll try anyway.)
14698 I need a type that is the same size as $sizetype, but is guaranteed to
14699 be signed. Common values are ssize_t, int and long.
14702 rp="What signed type is the same size as $sizetype?"
14706 $rm -f ssize ssize.*
14708 : see what type of char stdio uses.
14710 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
14711 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
14712 echo "Your stdio uses unsigned chars." >&4
14713 stdchar="unsigned char"
14715 echo "Your stdio uses signed chars." >&4
14722 : see if time exists
14724 if test "X$d_time" = X -o X"$timetype" = X; then
14725 if set time val -f d_time; eval $csym; $val; then
14726 echo 'time() found.' >&4
14728 rp="What is the type returned by time() on this system?"
14729 set time_t timetype long stdio.h sys/types.h
14732 echo 'time() not found, hope that will do.' >&4
14740 : see what type uids are declared as in the kernel
14742 echo "Looking for the type for user ids returned by getuid()."
14743 set uid_t uidtype xxx stdio.h sys/types.h
14747 xxx=`./findhdr sys/user.h`
14748 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
14750 unsigned) dflt="$1 $2" ;;
14754 *) dflt="$uidtype";;
14757 uid_t) echo "uid_t found." ;;
14758 *) rp="What is the type for user ids returned by getuid()?"
14766 *_t) zzz="$uidtype" ;;
14769 echo "Checking the size of $zzz..." >&4
14771 #include <sys/types.h>
14774 printf("%d\n", (int)sizeof($uidtype));
14779 if eval $compile_ok; then
14783 echo "(I can't execute the test program--guessing $uidsize.)" >&4
14786 echo "Your $zzz is $uidsize bytes long."
14791 echo "(I can't compile the test program--guessing $uidsize.)" >&4
14796 *_t) zzz="$uidtype" ;;
14799 echo "Checking the sign of $zzz..." >&4
14801 #include <sys/types.h>
14812 if eval $compile; then
14816 echo "(I can't execute the test program--guessing unsigned.)" >&4
14820 1) echo "Your $zzz is unsigned." ;;
14821 -1) echo "Your $zzz is signed." ;;
14827 echo "(I can't compile the test program--guessing unsigned.)" >&4
14833 $echo "Checking the format string to be used for uids..." >&4
14836 -1) if $test X"$uidsize" = X"$ivsize"; then
14837 uidformat="$ivdformat"
14839 if $test X"$uidsize" = X"$longsize"; then
14842 if $test X"$uidsize" = X"$intsize"; then
14845 if $test X"$uidsize" = X"$shortsize"; then
14852 *) if $test X"$uidsize" = X"$uvsize"; then
14853 uidformat="$uvuformat"
14855 if $test X"$uidsize" = X"$longsize"; then
14858 if $test X"$uidsize" = X"$intsize"; then
14861 if $test X"$uidsize" = X"$shortsize"; then
14870 : see if dbm.h is available
14871 : see if dbmclose exists
14872 set dbmclose d_dbmclose
14875 case "$d_dbmclose" in
14885 *) set rpcsvc/dbm.h i_rpcsvcdbm
14890 *) echo "We won't be including <dbm.h>"
14900 : see if this is a sys/file.h system
14905 : do we need to include sys/file.h ?
14909 if $h_sysfile; then
14911 echo "We'll be including <sys/file.h>." >&4
14914 echo "We won't be including <sys/file.h>." >&4
14924 : see if fcntl.h is there
14929 : see if we can include fcntl.h
14935 echo "We'll be including <fcntl.h>." >&4
14938 if $h_sysfile; then
14939 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
14941 echo "We won't be including <fcntl.h>." >&4
14953 : see if this is a iconv.h system
14954 set iconv.h i_iconv
14957 : see if this is a ieeefp.h system
14958 set ieeefp.h i_ieeefp
14961 : see if this is a libutil.h system
14962 set libutil.h i_libutil
14965 : see if locale.h is available
14966 set locale.h i_locale
14969 : see if mach cthreads are available
14970 if test "X$usethreads" = "X$define"; then
14971 set mach/cthreads.h i_machcthr
14974 i_machcthr="$undef"
14979 : see if this is a math.h system
14983 : see if this is a mntent.h system
14984 set mntent.h i_mntent
14987 : see if ndbm.h is available
14992 : see if dbm_open exists
14993 set dbm_open d_dbm_open
14995 case "$d_dbm_open" in
14998 echo "We won't be including <ndbm.h>"
15007 : see if net/errno.h is available
15009 set net/errno.h val
15012 : Unfortunately, it causes problems on some systems. Arrgh.
15015 cat > try.c <<'EOM'
15018 #include <net/errno.h>
15024 if $cc $ccflags -c try.c >/dev/null 2>&1; then
15025 echo "We'll be including <net/errno.h>." >&4
15027 echo "We won't be including <net/errno.h>." >&4
15036 : see if netinet/tcp.h is available
15037 set netinet/tcp.h i_netinettcp
15040 : see if this is a poll.h system
15044 : see if this is a prot.h system
15049 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
15050 $cat <<'EOSH' > Cppsym.know
15051 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
15052 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
15053 alliant alpha am29000 AM29000 amiga AMIGAOS AMIX
15054 ansi ANSI_C_SOURCE apollo ardent atarist att386 att3b BeOS
15055 BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
15056 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
15057 bull c cadmus clipper CMU COFF COMPILER_VERSION
15058 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
15059 CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
15060 Dynix DynixPTX ELF encore EPI EXTENSIONS FILE_OFFSET_BITS
15061 FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
15062 GNU_SOURCE GNUC GNUC_MINOR GO32 gould GOULD_PN
15063 H3050R H3050RX hbullx20 hcx host_mips
15064 hp200 hp300 hp700 HP700 hp800 hp9000
15065 hp9000s200 hp9000s300 hp9000s400 hp9000s500
15066 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
15067 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
15068 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
15069 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
15070 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
15071 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
15072 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
15073 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
15074 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
15075 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
15076 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
15077 MATH_HAS_NO_SIDE_EFFECTS
15078 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
15079 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
15080 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
15081 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
15082 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
15083 NetBSD news1500 news1700 news1800 news1900 news3700
15084 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
15085 ns32016 ns32332 ns32k nsc32000
15086 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
15087 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
15088 pc532 pdp11 PGC PIC plexus PORTAR posix
15089 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
15090 POSIX_C_SOURCE POSIX_SOURCE POWER
15091 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
15092 riscix riscos RT scs SCO sequent sgi SGI_SOURCE sinix
15093 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
15094 sony sony_news sonyrisc sparc sparclite spectrum
15095 stardent stdc STDC_EXT stratos sun sun3 sun386
15096 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
15097 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
15098 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
15099 sysV68 sysV88 Tek4132 Tek4300 titan
15100 tower tower32 tower32_200 tower32_600 tower32_700
15101 tower32_800 tower32_850 tss
15102 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
15103 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
15104 unix UNIX95 UNIX99 unixpc unos USGr4 USGr4_2
15105 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
15106 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
15107 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
15110 # Maybe put other stuff here too.
15111 cat <<EOSH >>Cppsym.know
15114 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
15115 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
15116 $cat Cppsym.know > Cppsym.c
15117 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
15118 $rm -f Cppsym.a Cppsym.b Cppsym.c
15119 cat <<EOSH > Cppsym
15121 if $test \$# -gt 0; then
15122 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
15123 if $test -s Cppsym.got; then
15130 $tr " " "$trnl" | ./Cppsym.try
15136 cat <<EOSH > Cppsym.try
15138 cat <<'EOCP' > try.c
15144 cat <<'EOSH' >> Cppsym.try
15146 printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", %s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
15147 printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", _%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
15148 printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", __%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
15149 printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", __%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
15153 cat <<EOSH >> Cppsym.try
15155 case "$osname-$gccversion" in
15156 irix-) ccflags="\$ccflags -woff 1178" ;;
15157 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
15159 $cc -o try $optimize \$ccflags $ldflags try.c $libs && ./try$exe_ext
15161 chmod +x Cppsym.try
15162 $eunicefix Cppsym.try
15163 ./Cppsym < Cppsym.know > Cppsym.true
15164 : now check the C compiler for additional symbols
15165 postprocess_cc_v=''
15167 aix) postprocess_cc_v="|$tr , ' '" ;;
15174 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
15177 -D*) echo "\$i" | $sed 's/^-D//';;
15178 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
15183 postprocess_cc_v=''
15186 ./ccsym > ccsym1.raw
15187 if $test -s ccsym1.raw; then
15188 $sort ccsym1.raw | $uniq >ccsym.raw
15190 mv ccsym1.raw ccsym.raw
15193 $awk '/\=/ { print $0; next }
15194 { print $0"=1" }' ccsym.raw >ccsym.list
15195 $awk '/\=/ { print $0; next }
15196 { print $0"=1" }' Cppsym.true >ccsym.true
15197 $comm -13 ccsym.true ccsym.list >ccsym.own
15198 $comm -12 ccsym.true ccsym.list >ccsym.com
15199 $comm -23 ccsym.true ccsym.list >ccsym.cpp
15201 if $test -z ccsym.raw; then
15202 echo "Your C compiler doesn't seem to define any symbols!" >&4
15204 echo "However, your C preprocessor defines the following symbols:"
15207 cppsymbols=`$cat Cppsym.true`
15208 cppsymbols=`echo $cppsymbols`
15209 cppccsymbols="$cppsymbols"
15211 if $test -s ccsym.com; then
15212 echo "Your C compiler and pre-processor define these symbols:"
15213 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
15216 cppccsymbols=`$cat ccsym.com`
15217 cppccsymbols=`echo $cppccsymbols`
15218 $test "$silent" || sleep 1
15220 if $test -s ccsym.cpp; then
15221 $test "$also" && echo " "
15222 echo "Your C pre-processor ${also}defines the following symbols:"
15223 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
15225 cppsymbols=`$cat ccsym.cpp`
15226 cppsymbols=`echo $cppsymbols`
15227 $test "$silent" || sleep 1
15229 if $test -s ccsym.own; then
15230 $test "$also" && echo " "
15231 echo "Your C compiler ${also}defines the following cpp symbols:"
15232 $sed -e 's/\(..*\)=1/\1/' ccsym.own
15233 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
15234 ccsymbols=`$cat ccsym.own`
15235 ccsymbols=`echo $ccsymbols`
15236 $test "$silent" || sleep 1
15239 $rm -f ccsym* Cppsym.*
15241 : see if this is a termio system
15245 if $test `./findhdr termios.h`; then
15246 set tcsetattr i_termios
15252 "$define") echo "You have POSIX termios.h... good!" >&4;;
15253 *) if ./Cppsym pyr; then
15254 case "`/bin/universe`" in
15255 ucb) if $test `./findhdr sgtty.h`; then
15257 echo "<sgtty.h> found." >&4
15259 echo "System is pyramid with BSD universe."
15260 echo "<sgtty.h> not found--you could have problems." >&4
15262 *) if $test `./findhdr termio.h`; then
15264 echo "<termio.h> found." >&4
15266 echo "System is pyramid with USG universe."
15267 echo "<termio.h> not found--you could have problems." >&4
15271 if $test `./findhdr termio.h`; then
15272 echo "<termio.h> found." >&4
15274 elif $test `./findhdr sgtty.h`; then
15275 echo "<sgtty.h> found." >&4
15278 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
15281 if $test `./findhdr sgtty.h`; then
15282 echo "<sgtty.h> found." >&4
15284 elif $test `./findhdr termio.h`; then
15285 echo "<termio.h> found." >&4
15288 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
15292 set i_termio; eval $setvar
15293 val=$val2; set i_sgtty; eval $setvar
15294 val=$val3; set i_termios; eval $setvar
15296 : see if this is a shadow.h system
15297 set shadow.h i_shadow
15300 : see if stddef is available
15301 set stddef.h i_stddef
15304 : see if this is a sunmath.h system
15305 set sunmath.h i_sunmath
15308 : see if sys/access.h is available
15309 set sys/access.h i_sysaccess
15312 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
15313 set sys/filio.h i_sysfilio
15316 if $test `./findhdr sys/ioctl.h`; then
15318 echo '<sys/ioctl.h> found.' >&4
15321 if $test $i_sysfilio = "$define"; then
15322 echo '<sys/ioctl.h> NOT found.' >&4
15324 $test $i_sgtty = "$define" && xxx="sgtty.h"
15325 $test $i_termio = "$define" && xxx="termio.h"
15326 $test $i_termios = "$define" && xxx="termios.h"
15327 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
15334 : see if this is a syslog.h system
15335 set syslog.h i_syslog
15339 : see if this is a sys/mode.h system
15340 set sys/mode.h i_sysmode
15343 : see if sys/resource.h has to be included
15344 set sys/resource.h i_sysresrc
15347 : see if sys/security.h is available
15348 set sys/security.h i_syssecrt
15351 : see if this is a sys/statvfs.h system
15352 set sys/statvfs.h i_sysstatvfs
15355 : see if this is a sys/uio.h system
15356 set sys/uio.h i_sysuio
15359 : see if this is a sys/un.h system
15360 set sys/un.h i_sysun
15364 : see if this is a sys/utsname.h system
15365 set sys/utsname.h i_sysutsname
15368 : see if this is a syswait system
15369 set sys/wait.h i_syswait
15372 : see if this is a ustat.h system
15373 set ustat.h i_ustat
15376 : see if this is an utime system
15377 set utime.h i_utime
15380 : see if this is a values.h system
15381 set values.h i_values
15384 : see if this is a vfork system
15387 set vfork.h i_vfork
15395 : see if gdbm.h is available
15400 : see if gdbm_open exists
15401 set gdbm_open d_gdbm_open
15403 case "$d_gdbm_open" in
15406 echo "We won't be including <gdbm.h>"
15416 echo "Looking for extensions..." >&4
15417 : If we are using the old config.sh, known_extensions may contain
15418 : old or inaccurate or duplicate values.
15419 known_extensions=''
15420 nonxs_extensions=''
15421 : We do not use find because it might not be available.
15422 : We do not just use MANIFEST because the user may have dropped
15423 : some additional extensions into the source tree and expect them
15426 : Function to recursively find available extensions, ignoring DynaLoader
15427 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
15431 DynaLoader|dynaload) ;;
15433 if $test -f $xxx/$xxx.xs; then
15434 known_extensions="$known_extensions $1$xxx";
15435 elif $test -f $xxx/Makefile.PL; then
15436 nonxs_extensions="$nonxs_extensions $1$xxx";
15438 if $test -d $xxx -a $# -lt 10; then
15441 eval $find_extensions;
15453 eval $find_extensions
15454 set X $nonxs_extensions
15456 nonxs_extensions="$*"
15457 set X $known_extensions
15459 known_extensions="$*"
15462 : Now see which are supported on this system.
15464 for xxx in $known_extensions ; do
15468 $define) avail_ext="$avail_ext $xxx" ;;
15471 GDBM_File|gdbm_fil)
15473 $define) avail_ext="$avail_ext $xxx" ;;
15476 NDBM_File|ndbm_fil)
15479 case "$osname-$use64bitint" in
15482 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
15485 *) avail_ext="$avail_ext $xxx" ;;
15490 ODBM_File|odbm_fil)
15491 case "${i_dbm}${i_rpcsvcdbm}" in
15493 case "$osname-$use64bitint" in
15496 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
15499 *) avail_ext="$avail_ext $xxx" ;;
15505 case "$useposix" in
15506 true|define|y) avail_ext="$avail_ext $xxx" ;;
15510 case "$useopcode" in
15511 true|define|y) avail_ext="$avail_ext $xxx" ;;
15515 case "$d_socket" in
15516 true|$define|y) avail_ext="$avail_ext $xxx" ;;
15519 Sys/Syslog|sys/syslog)
15520 : XXX syslog requires socket
15521 case "$d_socket" in
15522 true|$define|y) avail_ext="$avail_ext $xxx" ;;
15526 case "$usethreads" in
15527 true|$define|y) avail_ext="$avail_ext $xxx" ;;
15531 : XXX Do we need a useipcsysv variable here
15532 case "${d_msg}${d_sem}${d_shm}" in
15533 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
15536 *) avail_ext="$avail_ext $xxx"
15545 : Now see which nonxs extensions are supported on this system.
15546 : For now assume all are.
15548 for xxx in $nonxs_extensions ; do
15550 *) nonxs_ext="$nonxs_ext $xxx"
15562 A number of extensions are supplied with $package. You may choose to
15563 compile these extensions for dynamic loading (the default), compile
15564 them into the $package executable (static loading), or not include
15565 them at all. Answer "none" to include no extensions.
15566 Note that DynaLoader is always built and need not be mentioned here.
15569 case "$dynamic_ext" in
15570 '') dflt="$avail_ext" ;;
15571 *) dflt="$dynamic_ext"
15572 # Perhaps we are reusing an old out-of-date config.sh.
15575 if test X"$dynamic_ext" != X"$avail_ext"; then
15577 NOTICE: Your previous config.sh list may be incorrect.
15578 The extensions now available to you are
15580 but the default list from your previous config.sh is
15592 rp="What extensions do you wish to load dynamically?"
15595 none) dynamic_ext=' ' ;;
15596 *) dynamic_ext="$ans" ;;
15599 case "$static_ext" in
15601 : Exclude those already listed in dynamic linking
15603 for xxx in $avail_ext; do
15604 case " $dynamic_ext " in
15606 *) dflt="$dflt $xxx" ;;
15613 *) dflt="$static_ext"
15620 rp="What extensions do you wish to load statically?"
15623 none) static_ext=' ' ;;
15624 *) static_ext="$ans" ;;
15629 A number of extensions are supplied with $package. Answer "none"
15630 to include no extensions.
15631 Note that DynaLoader is always built and need not be mentioned here.
15634 case "$static_ext" in
15635 '') dflt="$avail_ext" ;;
15636 *) dflt="$static_ext"
15637 # Perhaps we are reusing an old out-of-date config.sh.
15640 if test X"$static_ext" != X"$avail_ext"; then
15642 NOTICE: Your previous config.sh list may be incorrect.
15643 The extensions now available to you are
15645 but the default list from your previous config.sh is
15654 : Exclude those that are not xs extensions
15658 rp="What extensions do you wish to include?"
15661 none) static_ext=' ' ;;
15662 *) static_ext="$ans" ;;
15667 set X $dynamic_ext $static_ext $nonxs_ext
15671 : Remove libraries needed only for extensions
15672 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
15673 : The exception is SunOS 4.x, which needs them.
15674 case "${osname}X${osvers}" in
15678 *) case "$usedl" in
15679 $define|true|[yY]*)
15680 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
15684 *) perllibs="$libs"
15690 : Remove build directory name from cppstdin so it can be used from
15691 : either the present location or the final installed location.
15693 : Get out of the UU directory to get correct path name.
15695 case "$cppstdin" in
15697 echo "Stripping down cppstdin path name"
15703 : end of configuration questions
15705 echo "End of configuration questions."
15708 : back to where it started
15709 if test -d ../UU; then
15713 : configuration may be patched via a 'config.over' file
15714 if $test -f config.over; then
15717 rp='I see a config.over file. Do you wish to load it?'
15720 n*) echo "OK, I'll ignore it.";;
15722 echo "Configuration override changes have been loaded."
15727 : in case they want portability, strip down executable paths
15728 case "$d_portable" in
15731 echo "Stripping down executable paths..." >&4
15732 for file in $loclist $trylist; do
15734 eval $file=`basename $temp`
15739 : create config.sh file
15741 echo "Creating config.sh..." >&4
15742 $spitshell <<EOT >config.sh
15745 # This file was produced by running the Configure script. It holds all the
15746 # definitions figured out by Configure. Should you modify one of these values,
15747 # do not forget to propagate your changes by running "Configure -der". You may
15748 # instead choose to run each of the .SH files by yourself, or "Configure -S".
15751 # Package name : $package
15752 # Source directory : $src
15753 # Configuration time: $cf_time
15754 # Configured by : $cf_by
15755 # Target system : $myuname
15765 Revision='$Revision'
15772 alignbytes='$alignbytes'
15773 ansi2knr='$ansi2knr'
15774 aphostname='$aphostname'
15775 api_revision='$api_revision'
15776 api_subversion='$api_subversion'
15777 api_version='$api_version'
15778 api_versionstring='$api_versionstring'
15781 archlibexp='$archlibexp'
15782 archname64='$archname64'
15783 archname='$archname'
15784 archobjs='$archobjs'
15789 bincompat5005='$bincompat5005'
15793 byteorder='$byteorder'
15795 castflags='$castflags'
15798 cccdlflags='$cccdlflags'
15799 ccdlflags='$ccdlflags'
15801 ccflags_uselargefiles='$ccflags_uselargefiles'
15803 ccsymbols='$ccsymbols'
15804 ccversion='$ccversion'
15806 cf_email='$cf_email'
15808 charsize='$charsize'
15812 clocktype='$clocktype'
15814 compress='$compress'
15815 contains='$contains'
15819 cpp_stuff='$cpp_stuff'
15820 cppccsymbols='$cppccsymbols'
15821 cppflags='$cppflags'
15823 cppminus='$cppminus'
15825 cppstdin='$cppstdin'
15826 cppsymbols='$cppsymbols'
15827 crosscompile='$crosscompile'
15828 cryptlib='$cryptlib'
15830 d_Gconvert='$d_Gconvert'
15831 d_PRIEUldbl='$d_PRIEUldbl'
15832 d_PRIFUldbl='$d_PRIFUldbl'
15833 d_PRIGUldbl='$d_PRIGUldbl'
15834 d_PRIXU64='$d_PRIXU64'
15835 d_PRId64='$d_PRId64'
15836 d_PRIeldbl='$d_PRIeldbl'
15837 d_PRIfldbl='$d_PRIfldbl'
15838 d_PRIgldbl='$d_PRIgldbl'
15839 d_PRIi64='$d_PRIi64'
15840 d_PRIo64='$d_PRIo64'
15841 d_PRIu64='$d_PRIu64'
15842 d_PRIx64='$d_PRIx64'
15843 d_SCNfldbl='$d_SCNfldbl'
15844 d__fwalk='$d__fwalk'
15845 d_access='$d_access'
15846 d_accessx='$d_accessx'
15848 d_archlib='$d_archlib'
15851 d_attribut='$d_attribut'
15854 d_bincompat5005='$d_bincompat5005'
15856 d_bsdgetpgrp='$d_bsdgetpgrp'
15857 d_bsdsetpgrp='$d_bsdsetpgrp'
15859 d_casti32='$d_casti32'
15860 d_castneg='$d_castneg'
15861 d_charvspr='$d_charvspr'
15863 d_chroot='$d_chroot'
15864 d_chsize='$d_chsize'
15865 d_closedir='$d_closedir'
15869 d_cuserid='$d_cuserid'
15870 d_dbl_dig='$d_dbl_dig'
15871 d_difftime='$d_difftime'
15872 d_dirnamlen='$d_dirnamlen'
15873 d_dlerror='$d_dlerror'
15874 d_dlopen='$d_dlopen'
15875 d_dlsymun='$d_dlsymun'
15876 d_dosuid='$d_dosuid'
15877 d_drand48proto='$d_drand48proto'
15879 d_eaccess='$d_eaccess'
15880 d_endgrent='$d_endgrent'
15881 d_endhent='$d_endhent'
15882 d_endnent='$d_endnent'
15883 d_endpent='$d_endpent'
15884 d_endpwent='$d_endpwent'
15885 d_endsent='$d_endsent'
15886 d_eofnblk='$d_eofnblk'
15887 d_eunice='$d_eunice'
15888 d_fchmod='$d_fchmod'
15889 d_fchown='$d_fchown'
15891 d_fcntl_can_lock='$d_fcntl_can_lock'
15892 d_fd_macros='$d_fd_macros'
15893 d_fd_set='$d_fd_set'
15894 d_fds_bits='$d_fds_bits'
15895 d_fgetpos='$d_fgetpos'
15896 d_flexfnam='$d_flexfnam'
15899 d_fpathconf='$d_fpathconf'
15900 d_fpos64_t='$d_fpos64_t'
15901 d_frexpl='$d_frexpl'
15902 d_fs_data_s='$d_fs_data_s'
15903 d_fseeko='$d_fseeko'
15904 d_fsetpos='$d_fsetpos'
15905 d_fstatfs='$d_fstatfs'
15906 d_fstatvfs='$d_fstatvfs'
15908 d_ftello='$d_ftello'
15910 d_getcwd='$d_getcwd'
15911 d_getespwnam='$d_getespwnam'
15912 d_getfsstat='$d_getfsstat'
15913 d_getgrent='$d_getgrent'
15914 d_getgrps='$d_getgrps'
15915 d_gethbyaddr='$d_gethbyaddr'
15916 d_gethbyname='$d_gethbyname'
15917 d_gethent='$d_gethent'
15918 d_gethname='$d_gethname'
15919 d_gethostprotos='$d_gethostprotos'
15920 d_getlogin='$d_getlogin'
15921 d_getmnt='$d_getmnt'
15922 d_getmntent='$d_getmntent'
15923 d_getnbyaddr='$d_getnbyaddr'
15924 d_getnbyname='$d_getnbyname'
15925 d_getnent='$d_getnent'
15926 d_getnetprotos='$d_getnetprotos'
15927 d_getpagsz='$d_getpagsz'
15928 d_getpbyname='$d_getpbyname'
15929 d_getpbynumber='$d_getpbynumber'
15930 d_getpent='$d_getpent'
15931 d_getpgid='$d_getpgid'
15932 d_getpgrp2='$d_getpgrp2'
15933 d_getpgrp='$d_getpgrp'
15934 d_getppid='$d_getppid'
15935 d_getprior='$d_getprior'
15936 d_getprotoprotos='$d_getprotoprotos'
15937 d_getprpwnam='$d_getprpwnam'
15938 d_getpwent='$d_getpwent'
15939 d_getsbyname='$d_getsbyname'
15940 d_getsbyport='$d_getsbyport'
15941 d_getsent='$d_getsent'
15942 d_getservprotos='$d_getservprotos'
15943 d_getspnam='$d_getspnam'
15944 d_gettimeod='$d_gettimeod'
15945 d_gnulibc='$d_gnulibc'
15946 d_grpasswd='$d_grpasswd'
15947 d_hasmntopt='$d_hasmntopt'
15951 d_inetaton='$d_inetaton'
15952 d_int64_t='$d_int64_t'
15953 d_isascii='$d_isascii'
15955 d_isnanl='$d_isnanl'
15956 d_killpg='$d_killpg'
15957 d_lchown='$d_lchown'
15958 d_ldbl_dig='$d_ldbl_dig'
15960 d_locconv='$d_locconv'
15962 d_longdbl='$d_longdbl'
15963 d_longlong='$d_longlong'
15964 d_lseekproto='$d_lseekproto'
15966 d_madvise='$d_madvise'
15968 d_mbstowcs='$d_mbstowcs'
15969 d_mbtowc='$d_mbtowc'
15970 d_memchr='$d_memchr'
15971 d_memcmp='$d_memcmp'
15972 d_memcpy='$d_memcpy'
15973 d_memmove='$d_memmove'
15974 d_memset='$d_memset'
15976 d_mkdtemp='$d_mkdtemp'
15977 d_mkfifo='$d_mkfifo'
15978 d_mkstemp='$d_mkstemp'
15979 d_mkstemps='$d_mkstemps'
15980 d_mktime='$d_mktime'
15983 d_mprotect='$d_mprotect'
15985 d_msg_ctrunc='$d_msg_ctrunc'
15986 d_msg_dontroute='$d_msg_dontroute'
15987 d_msg_oob='$d_msg_oob'
15988 d_msg_peek='$d_msg_peek'
15989 d_msg_proxy='$d_msg_proxy'
15990 d_msgctl='$d_msgctl'
15991 d_msgget='$d_msgget'
15992 d_msgrcv='$d_msgrcv'
15993 d_msgsnd='$d_msgsnd'
15995 d_munmap='$d_munmap'
15996 d_mymalloc='$d_mymalloc'
15998 d_nv_preserves_uv='$d_nv_preserves_uv'
15999 d_nv_preserves_uv_bits='$d_nv_preserves_uv_bits'
16000 d_off64_t='$d_off64_t'
16001 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
16002 d_oldpthreads='$d_oldpthreads'
16003 d_oldsock='$d_oldsock'
16005 d_pathconf='$d_pathconf'
16007 d_perl_otherlibdirs='$d_perl_otherlibdirs'
16008 d_phostname='$d_phostname'
16011 d_portable='$d_portable'
16012 d_pthread_yield='$d_pthread_yield'
16014 d_pwchange='$d_pwchange'
16015 d_pwclass='$d_pwclass'
16016 d_pwcomment='$d_pwcomment'
16017 d_pwexpire='$d_pwexpire'
16018 d_pwgecos='$d_pwgecos'
16019 d_pwpasswd='$d_pwpasswd'
16020 d_pwquota='$d_pwquota'
16023 d_readdir='$d_readdir'
16024 d_readlink='$d_readlink'
16025 d_rename='$d_rename'
16026 d_rewinddir='$d_rewinddir'
16028 d_safebcpy='$d_safebcpy'
16029 d_safemcpy='$d_safemcpy'
16030 d_sanemcmp='$d_sanemcmp'
16031 d_sbrkproto='$d_sbrkproto'
16032 d_sched_yield='$d_sched_yield'
16033 d_scm_rights='$d_scm_rights'
16034 d_seekdir='$d_seekdir'
16035 d_select='$d_select'
16037 d_semctl='$d_semctl'
16038 d_semctl_semid_ds='$d_semctl_semid_ds'
16039 d_semctl_semun='$d_semctl_semun'
16040 d_semget='$d_semget'
16042 d_setegid='$d_setegid'
16043 d_seteuid='$d_seteuid'
16044 d_setgrent='$d_setgrent'
16045 d_setgrps='$d_setgrps'
16046 d_sethent='$d_sethent'
16047 d_setlinebuf='$d_setlinebuf'
16048 d_setlocale='$d_setlocale'
16049 d_setnent='$d_setnent'
16050 d_setpent='$d_setpent'
16051 d_setpgid='$d_setpgid'
16052 d_setpgrp2='$d_setpgrp2'
16053 d_setpgrp='$d_setpgrp'
16054 d_setprior='$d_setprior'
16055 d_setproctitle='$d_setproctitle'
16056 d_setpwent='$d_setpwent'
16057 d_setregid='$d_setregid'
16058 d_setresgid='$d_setresgid'
16059 d_setresuid='$d_setresuid'
16060 d_setreuid='$d_setreuid'
16061 d_setrgid='$d_setrgid'
16062 d_setruid='$d_setruid'
16063 d_setsent='$d_setsent'
16064 d_setsid='$d_setsid'
16065 d_setvbuf='$d_setvbuf'
16069 d_shmatprototype='$d_shmatprototype'
16070 d_shmctl='$d_shmctl'
16072 d_shmget='$d_shmget'
16073 d_sigaction='$d_sigaction'
16074 d_sigsetjmp='$d_sigsetjmp'
16075 d_socket='$d_socket'
16076 d_socklen_t='$d_socklen_t'
16077 d_sockpair='$d_sockpair'
16078 d_socks5_init='$d_socks5_init'
16080 d_statblks='$d_statblks'
16081 d_statfs_f_flags='$d_statfs_f_flags'
16082 d_statfs_s='$d_statfs_s'
16083 d_statvfs='$d_statvfs'
16084 d_stdio_cnt_lval='$d_stdio_cnt_lval'
16085 d_stdio_ptr_lval='$d_stdio_ptr_lval'
16086 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
16087 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
16088 d_stdio_stream_array='$d_stdio_stream_array'
16089 d_stdiobase='$d_stdiobase'
16090 d_stdstdio='$d_stdstdio'
16091 d_strchr='$d_strchr'
16092 d_strcoll='$d_strcoll'
16093 d_strctcpy='$d_strctcpy'
16094 d_strerrm='$d_strerrm'
16095 d_strerror='$d_strerror'
16096 d_strtod='$d_strtod'
16097 d_strtol='$d_strtol'
16098 d_strtold='$d_strtold'
16099 d_strtoll='$d_strtoll'
16100 d_strtoq='$d_strtoq'
16101 d_strtoul='$d_strtoul'
16102 d_strtoull='$d_strtoull'
16103 d_strtouq='$d_strtouq'
16104 d_strxfrm='$d_strxfrm'
16105 d_suidsafe='$d_suidsafe'
16106 d_symlink='$d_symlink'
16107 d_syscall='$d_syscall'
16108 d_sysconf='$d_sysconf'
16109 d_sysernlst='$d_sysernlst'
16110 d_syserrlst='$d_syserrlst'
16111 d_system='$d_system'
16112 d_tcgetpgrp='$d_tcgetpgrp'
16113 d_tcsetpgrp='$d_tcsetpgrp'
16114 d_telldir='$d_telldir'
16115 d_telldirproto='$d_telldirproto'
16118 d_truncate='$d_truncate'
16119 d_tzname='$d_tzname'
16122 d_union_semun='$d_union_semun'
16124 d_vendorarch='$d_vendorarch'
16125 d_vendorbin='$d_vendorbin'
16126 d_vendorlib='$d_vendorlib'
16128 d_void_closedir='$d_void_closedir'
16129 d_voidsig='$d_voidsig'
16130 d_voidtty='$d_voidtty'
16131 d_volatile='$d_volatile'
16132 d_vprintf='$d_vprintf'
16134 d_waitpid='$d_waitpid'
16135 d_wcstombs='$d_wcstombs'
16136 d_wctomb='$d_wctomb'
16139 db_hashtype='$db_hashtype'
16140 db_prefixtype='$db_prefixtype'
16141 defvoidused='$defvoidused'
16142 direntrytype='$direntrytype'
16145 doublesize='$doublesize'
16147 dynamic_ext='$dynamic_ext'
16153 eunicefix='$eunicefix'
16156 extensions='$extensions'
16157 fflushNULL='$fflushNULL'
16158 fflushall='$fflushall'
16160 firstmakefile='$firstmakefile'
16162 fpossize='$fpossize'
16163 fpostype='$fpostype'
16164 freetype='$freetype'
16166 full_csh='$full_csh'
16167 full_sed='$full_sed'
16168 gccosandvers='$gccosandvers'
16169 gccversion='$gccversion'
16170 gidformat='$gidformat'
16176 groupcat='$groupcat'
16177 groupstype='$groupstype'
16180 h_sysfile='$h_sysfile'
16191 i_arpainet='$i_arpainet'
16192 i_bsdioctl='$i_bsdioctl'
16195 i_dirent='$i_dirent'
16203 i_ieeefp='$i_ieeefp'
16204 i_inttypes='$i_inttypes'
16205 i_libutil='$i_libutil'
16206 i_limits='$i_limits'
16207 i_locale='$i_locale'
16208 i_machcthr='$i_machcthr'
16209 i_malloc='$i_malloc'
16211 i_memory='$i_memory'
16212 i_mntent='$i_mntent'
16215 i_neterrno='$i_neterrno'
16216 i_netinettcp='$i_netinettcp'
16220 i_pthread='$i_pthread'
16222 i_rpcsvcdbm='$i_rpcsvcdbm'
16225 i_shadow='$i_shadow'
16227 i_stdarg='$i_stdarg'
16228 i_stddef='$i_stddef'
16229 i_stdlib='$i_stdlib'
16230 i_string='$i_string'
16231 i_sunmath='$i_sunmath'
16232 i_sysaccess='$i_sysaccess'
16233 i_sysdir='$i_sysdir'
16234 i_sysfile='$i_sysfile'
16235 i_sysfilio='$i_sysfilio'
16237 i_sysioctl='$i_sysioctl'
16238 i_syslog='$i_syslog'
16239 i_sysmman='$i_sysmman'
16240 i_sysmode='$i_sysmode'
16241 i_sysmount='$i_sysmount'
16242 i_sysndir='$i_sysndir'
16243 i_sysparam='$i_sysparam'
16244 i_sysresrc='$i_sysresrc'
16245 i_syssecrt='$i_syssecrt'
16246 i_sysselct='$i_sysselct'
16247 i_syssockio='$i_syssockio'
16248 i_sysstat='$i_sysstat'
16249 i_sysstatfs='$i_sysstatfs'
16250 i_sysstatvfs='$i_sysstatvfs'
16251 i_systime='$i_systime'
16252 i_systimek='$i_systimek'
16253 i_systimes='$i_systimes'
16254 i_systypes='$i_systypes'
16255 i_sysuio='$i_sysuio'
16257 i_sysutsname='$i_sysutsname'
16258 i_sysvfs='$i_sysvfs'
16259 i_syswait='$i_syswait'
16260 i_termio='$i_termio'
16261 i_termios='$i_termios'
16263 i_unistd='$i_unistd'
16266 i_values='$i_values'
16267 i_varargs='$i_varargs'
16268 i_varhdr='$i_varhdr'
16270 ignore_versioned_solibs='$ignore_versioned_solibs'
16271 inc_version_list='$inc_version_list'
16272 inc_version_list_init='$inc_version_list_init'
16275 installarchlib='$installarchlib'
16276 installbin='$installbin'
16277 installman1dir='$installman1dir'
16278 installman3dir='$installman3dir'
16279 installprefix='$installprefix'
16280 installprefixexp='$installprefixexp'
16281 installprivlib='$installprivlib'
16282 installscript='$installscript'
16283 installsitearch='$installsitearch'
16284 installsitebin='$installsitebin'
16285 installsitelib='$installsitelib'
16286 installstyle='$installstyle'
16287 installusrbinperl='$installusrbinperl'
16288 installvendorarch='$installvendorarch'
16289 installvendorbin='$installvendorbin'
16290 installvendorlib='$installvendorlib'
16292 issymlink='$issymlink'
16293 ivdformat='$ivdformat'
16296 known_extensions='$known_extensions'
16299 lddlflags='$lddlflags'
16301 ldflags_uselargefiles='$ldflags_uselargefiles'
16302 ldlibpthname='$ldlibpthname'
16309 libsdirs='$libsdirs'
16310 libsfiles='$libsfiles'
16311 libsfound='$libsfound'
16312 libspath='$libspath'
16313 libswanted='$libswanted'
16314 libswanted_uselargefiles='$libswanted_uselargefiles'
16320 locincpth='$locincpth'
16321 loclibpth='$loclibpth'
16322 longdblsize='$longdblsize'
16323 longlongsize='$longlongsize'
16324 longsize='$longsize'
16328 lseeksize='$lseeksize'
16329 lseektype='$lseektype'
16333 make_set_make='$make_set_make'
16334 mallocobj='$mallocobj'
16335 mallocsrc='$mallocsrc'
16336 malloctype='$malloctype'
16338 man1direxp='$man1direxp'
16341 man3direxp='$man3direxp'
16343 mips_type='$mips_type'
16345 mmaptype='$mmaptype'
16346 modetype='$modetype'
16348 multiarch='$multiarch'
16350 myarchname='$myarchname'
16351 mydomain='$mydomain'
16352 myhostname='$myhostname'
16355 need_va_copy='$need_va_copy'
16356 netdb_hlen_type='$netdb_hlen_type'
16357 netdb_host_type='$netdb_host_type'
16358 netdb_name_type='$netdb_name_type'
16359 netdb_net_type='$netdb_net_type'
16362 nm_so_opt='$nm_so_opt'
16363 nonxs_ext='$nonxs_ext'
16365 nvEUformat='$nvEUformat'
16366 nvFUformat='$nvFUformat'
16367 nvGUformat='$nvGUformat'
16368 nveformat='$nveformat'
16369 nvfformat='$nvfformat'
16370 nvgformat='$nvgformat'
16373 o_nonblock='$o_nonblock'
16375 old_pthread_create_joinable='$old_pthread_create_joinable'
16376 optimize='$optimize'
16377 orderlib='$orderlib'
16380 otherlibdirs='$otherlibdirs'
16384 patchlevel='$patchlevel'
16385 path_sep='$path_sep'
16388 perladmin='$perladmin'
16389 perllibs='$perllibs'
16390 perlpath='$perlpath'
16392 phostname='$phostname'
16395 pm_apiversion='$pm_apiversion'
16399 prefixexp='$prefixexp'
16401 privlibexp='$privlibexp'
16402 prototype='$prototype'
16404 quadkind='$quadkind'
16405 quadtype='$quadtype'
16406 randbits='$randbits'
16407 randfunc='$randfunc'
16408 randseedtype='$randseedtype'
16410 rd_nodata='$rd_nodata'
16411 revision='$revision'
16415 sPRIEUldbl='$sPRIEUldbl'
16416 sPRIFUldbl='$sPRIFUldbl'
16417 sPRIGUldbl='$sPRIGUldbl'
16418 sPRIXU64='$sPRIXU64'
16420 sPRIeldbl='$sPRIeldbl'
16421 sPRIfldbl='$sPRIfldbl'
16422 sPRIgldbl='$sPRIgldbl'
16427 sSCNfldbl='$sSCNfldbl'
16428 sched_yield='$sched_yield'
16429 scriptdir='$scriptdir'
16430 scriptdirexp='$scriptdirexp'
16432 seedfunc='$seedfunc'
16433 selectminbits='$selectminbits'
16434 selecttype='$selecttype'
16435 sendmail='$sendmail'
16438 sharpbang='$sharpbang'
16439 shmattype='$shmattype'
16440 shortsize='$shortsize'
16443 sig_count='$sig_count'
16444 sig_name='$sig_name'
16445 sig_name_init='$sig_name_init'
16447 sig_num_init='$sig_num_init'
16448 signal_t='$signal_t'
16449 sitearch='$sitearch'
16450 sitearchexp='$sitearchexp'
16452 sitebinexp='$sitebinexp'
16454 sitelib_stem='$sitelib_stem'
16455 sitelibexp='$sitelibexp'
16456 siteprefix='$siteprefix'
16457 siteprefixexp='$siteprefixexp'
16458 sizesize='$sizesize'
16459 sizetype='$sizetype'
16463 sockethdr='$sockethdr'
16464 socketlib='$socketlib'
16465 socksizetype='$socksizetype'
16467 spackage='$spackage'
16468 spitshell='$spitshell'
16470 ssizetype='$ssizetype'
16471 startperl='$startperl'
16473 static_ext='$static_ext'
16475 stdio_base='$stdio_base'
16476 stdio_bufsiz='$stdio_bufsiz'
16477 stdio_cnt='$stdio_cnt'
16478 stdio_filbuf='$stdio_filbuf'
16479 stdio_ptr='$stdio_ptr'
16480 stdio_stream_array='$stdio_stream_array'
16483 subversion='$subversion'
16490 timeincl='$timeincl'
16491 timetype='$timetype'
16504 uidformat='$uidformat'
16510 uquadtype='$uquadtype'
16511 use5005threads='$use5005threads'
16512 use64bitall='$use64bitall'
16513 use64bitint='$use64bitint'
16515 useithreads='$useithreads'
16516 uselargefiles='$uselargefiles'
16517 uselongdouble='$uselongdouble'
16518 usemorebits='$usemorebits'
16519 usemultiplicity='$usemultiplicity'
16520 usemymalloc='$usemymalloc'
16522 useopcode='$useopcode'
16523 useperlio='$useperlio'
16524 useposix='$useposix'
16526 useshrplib='$useshrplib'
16527 usesocks='$usesocks'
16528 usethreads='$usethreads'
16529 usevendorprefix='$usevendorprefix'
16530 usevfork='$usevfork'
16533 uvXUformat='$uvXUformat'
16534 uvoformat='$uvoformat'
16537 uvuformat='$uvuformat'
16538 uvxformat='$uvxformat'
16539 vendorarch='$vendorarch'
16540 vendorarchexp='$vendorarchexp'
16541 vendorbin='$vendorbin'
16542 vendorbinexp='$vendorbinexp'
16543 vendorlib='$vendorlib'
16544 vendorlib_stem='$vendorlib_stem'
16545 vendorlibexp='$vendorlibexp'
16546 vendorprefix='$vendorprefix'
16547 vendorprefixexp='$vendorprefixexp'
16549 versiononly='$versiononly'
16551 voidflags='$voidflags'
16553 xs_apiversion='$xs_apiversion'
16558 : Add in command line options if available
16559 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
16561 : add special variables
16562 $test -f $src/patchlevel.h && \
16563 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
16564 echo "CONFIGDOTSH=true" >>config.sh
16566 : propagate old symbols
16567 if $test -f UU/config.sh; then
16568 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
16569 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
16570 $sort | $uniq -u >UU/oldsyms
16571 set X `cat UU/oldsyms`
16577 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
16579 echo "# Variables propagated from previous config.sh file." >>config.sh
16580 for sym in `cat UU/oldsyms`; do
16581 echo " Propagating $hint variable "'$'"$sym..."
16582 eval 'tmp="$'"${sym}"'"'
16584 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
16590 : Finish up by extracting the .SH files
16604 If you'd like to make any changes to the config.sh file before I begin
16605 to configure things, do it as a shell escape now (e.g. !vi config.sh).
16608 rp="Press return or use a shell escape to edit config.sh:"
16613 *) : in case they cannot read
16614 sh 1>&4 -c "$ans";;
16619 : if this fails, just run all the .SH files by hand
16626 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
16633 Now you need to generate make dependencies by running "$make depend".
16634 You might prefer to run it in background: "$make depend > makedepend.out &"
16635 It can take a while, so you might not want to run it right now.
16640 rp="Run $make depend now?"
16644 $make depend && echo "Now you must run '$make'."
16647 echo "You must run '$make depend' then '$make'."
16650 elif test -f [Mm]akefile; then
16652 echo "Now you must run a $make."
16657 if $test -f Policy.sh; then
16660 If you compile $package on a different machine or from a different object
16661 directory, copy the Policy.sh file from this object directory to the
16662 new one before you run Configure -- this will help you with most of
16663 the policy defaults.
16667 if $test -f config.msg; then
16668 echo "Hmm. I also noted the following information while running:"
16670 $cat config.msg >&4
16673 $rm -f kit*isdone ark*isdone