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 Sun Jan 21 21:08:33 EET 2001 [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=''
545 d_stdio_ptr_lval_nochange_cnt=''
546 d_stdio_ptr_lval_sets_cnt=''
718 inc_version_list_init=''
737 ignore_versioned_solibs=''
796 d_perl_otherlibdirs=''
813 d_nv_preserves_uv_bits=''
912 d_stdio_stream_array=''
913 stdio_stream_array=''
923 ccflags_uselargefiles=''
924 ldflags_uselargefiles=''
925 libswanted_uselargefiles=''
968 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
971 : We must find out about Eunice early
973 if test -f /etc/unixtovms; then
974 eunicefix=/etc/unixtovms
976 if test -f /etc/unixtovms.exe; then
977 eunicefix=/etc/unixtovms.exe
984 : set useposix=false in your hint file to disable the POSIX extension.
986 : set useopcode=false in your hint file to disable the Opcode extension.
988 : Trailing extension. Override this in a hint file, if needed.
990 : Extra object files, if any, needed on this platform.
993 : Possible local include directories to search.
994 : Set locincpth to "" in a hint file to defeat local include searches.
995 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
996 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
998 : no include file wanted by default
1002 : change the next line if compiling for Xenix/286 on Xenix/386
1003 xlibpth='/usr/lib/386 /lib/386'
1004 : Possible local library directories to search.
1005 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1006 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1008 : general looking path for locating libraries
1009 glibpth="/lib /usr/lib $xlibpth"
1010 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
1011 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1012 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
1014 : Private path used by Configure to find libraries. Its value
1015 : is prepended to libpth. This variable takes care of special
1016 : machines, like the mips. Usually, it should be empty.
1019 : default library list
1021 : some systems want to use only the non-versioned libso:s
1022 ignore_versioned_solibs=''
1024 ccflags_uselargefiles=''
1025 ldflags_uselargefiles=''
1026 libswanted_uselargefiles=''
1027 : set usemultiplicity on the Configure command line to enable multiplicity.
1028 : set usesocks on the Configure command line to enable socks.
1029 : set usethreads on the Configure command line to enable threads.
1030 : full support for void wanted by default
1033 : List of libraries we want.
1034 : If anyone needs -lnet, put it in a hint file.
1035 libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
1036 libswanted="$libswanted dld ld sun m c cposix posix"
1037 libswanted="$libswanted ndir dir crypt sec"
1038 libswanted="$libswanted ucb bsd BSD PW x iconv util"
1039 : We probably want to search /usr/shlib before most other libraries.
1040 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1041 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1042 glibpth="/usr/shlib $glibpth"
1043 : Do not use vfork unless overridden by a hint file.
1046 : Find the basic shell for Bourne shell scripts
1050 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1053 if test -f "$xxx"; then
1056 : Build up a list and do a single loop so we can 'break' out.
1057 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1058 for xxx in sh bash ksh pdksh ash; do
1060 try="$try ${p}/${xxx}"
1064 if test -f "$xxx"; then
1067 elif test -f "$xxx.exe"; then
1078 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1080 Usually it's in /bin/sh. How did you even get this far?
1081 Please contact me (Perl Maintainers) at perlbug@perl.org and
1082 we'll try to straighten this all out.
1088 : see if sh knows # comments
1089 if `$sh -c '#' >/dev/null 2>&1`; then
1093 test -f $xcat || xcat=/usr/bin/cat
1098 if test -s today; then
1101 echo "#! $xcat" > try
1105 if test -s today; then
1113 echo "Your $sh doesn't grok # comments--I will strip them later on."
1116 echo "exec grep -v '^[ ]*#'" >spitshell
1118 $eunicefix spitshell
1119 spitshell=`pwd`/spitshell
1121 echo "I presume that if # doesn't work, #! won't work either!"
1126 : figure out how to guarantee sh startup
1128 '') startsh=${sharpbang}${sh} ;;
1140 : echo "Yup, it does."
1142 echo "Hmm... '$startsh' does not guarantee sh startup..."
1143 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1148 : Save command line options in file UU/cmdline.opt for later use in
1149 : generating config.sh.
1150 cat > cmdline.opt <<EOSH
1151 # Configure command line arguments.
1158 cat >>cmdline.opt <<EOSH
1159 config_arg$argn='$arg'
1161 argn=`expr $argn + 1`
1164 : produce awk script to parse command line options
1165 cat >options.awk <<'EOF'
1167 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1169 len = length(optstr);
1170 for (i = 1; i <= len; i++) {
1171 c = substr(optstr, i, 1);
1172 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1183 if (substr(str, 1, 1) != "-") {
1184 printf("'%s'\n", str);
1188 for (i = 2; i <= len; i++) {
1189 c = substr(str, i, 1);
1191 printf("-%s\n", substr(str, i));
1197 printf("'%s'\n", substr(str, i + 1));
1210 : process the command line options
1211 set X `for arg in "$@"; do echo "X$arg"; done |
1212 sed -e s/X// | awk -f options.awk`
1217 : set up default values
1227 rm -f optdef.sh posthint.sh
1228 cat >optdef.sh <<EOS
1234 while test $# -gt 0; do
1236 -d) shift; fastread=yes;;
1237 -e) shift; alldone=cont;;
1241 if test -r "$1"; then
1244 echo "$me: cannot read config file $1." >&2
1249 -h) shift; error=true;;
1250 -r) shift; reuseval=true;;
1251 -s) shift; silent=true; realsilent=true;;
1252 -E) shift; alldone=exit;;
1253 -K) shift; knowitall=true;;
1254 -O) shift; override=true;;
1255 -S) shift; silent=true; extractsh=true;;
1260 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1261 echo "$me: ignoring -D $1" >&2
1264 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1265 *) echo "$1='define'" >> optdef.sh;;
1272 *=) echo "$1" >> optdef.sh;;
1274 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1275 echo "$me: ignoring -U $1" >&2
1277 *) echo "$1='undef'" >> optdef.sh;;
1288 *=*) zzz=`echo $yyy|sed 's!=.*!!'`
1292 zzz=" "`echo $yyy|sed 's!^[^=]*=!!'`
1293 yyy=`echo $yyy|sed 's!=.*!!'` ;;
1299 *:*) xxx=`echo $yyy|sed 's!:.*!!'`
1300 yyy=`echo $yyy|sed 's!^[^:]*:!!'`
1301 zzz=`echo $yyy|sed 's!^[^=]*=!!'`
1302 yyy=`echo $yyy|sed 's!=.*!!'` ;;
1303 *) xxx=`echo $yyy|sed 's!:.*!!'`
1304 yyy=`echo $yyy|sed 's!^[^:]*:!!'` ;;
1310 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1312 echo "$yyy=''" >> posthint.sh ;;
1317 echo "$yyy='$zzz'" >> posthint.sh ;;
1319 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1321 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1326 echo "$yyy=$zzz" >> posthint.sh ;;
1327 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1331 -V) echo "$me generated by metaconfig 3.0 PL70." >&2
1334 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1342 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1343 [-U symbol] [-U symbol=] [-A command:symbol...]
1344 -d : use defaults for all answers.
1345 -e : go on without questioning past the production of config.sh.
1346 -f : specify an alternate default configuration file.
1347 -h : print this help message and exit (with an error status).
1348 -r : reuse C symbols value if possible (skips costly nm extraction).
1349 -s : silent mode, only echoes questions and essential information.
1350 -D : define symbol to have some value:
1351 -D symbol symbol gets the value 'define'
1352 -D symbol=value symbol gets the value 'value'
1353 -E : stop at the end of questions, after having produced config.sh.
1354 -K : do not use unless you know what you are doing.
1355 -O : let -D and -U override definitions from loaded configuration file.
1356 -S : perform variable substitutions on all .SH files (can mix with -f)
1357 -U : undefine symbol:
1358 -U symbol symbol gets the value 'undef'
1359 -U symbol= symbol gets completely empty
1360 -A : manipulate symbol after the platform specific hints have been applied:
1361 -A symbol=value append " "value to symbol
1362 -A append:symbol=value append value to symbol
1363 -A define:symbol=value define symbol to have value
1364 -A clear:symbol define symbol to be ''
1365 -A define:symbol define symbol to be 'define'
1366 -A eval:symbol=value define symbol to be eval of value
1367 -A prepend:symbol=value prepend value to symbol
1368 -A undef:symbol define symbol to be 'undef'
1369 -A undef:symbol= define symbol to be ''
1370 -V : print version number and exit (with a zero status).
1377 case "$fastread$alldone" in
1380 case "$extractsh" in
1383 if test ! -t 0; then
1384 echo "Say 'sh Configure', not 'sh <Configure'"
1394 true) exec 1>/dev/null;;
1397 : run the defines and the undefines, if any, but leave the file out there...
1400 : create the posthint manipulation script and leave the file out there...
1405 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1406 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1407 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1408 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1409 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1412 : Some greps do not return status, grrr.
1413 echo "grimblepritz" >grimble
1414 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1416 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1422 : the following should work in any shell
1426 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1427 cat >contains <<'EOSS'
1428 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1433 : Find the path to the source tree
1436 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1440 *) src=`cd ../$src && pwd` ;;
1453 if test -f $rsrc/Configure && \
1454 $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
1456 : found it, so we are ok.
1459 for src in . .. ../.. ../../.. ../../../..; do
1460 if test -f ../$src/Configure && \
1461 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1472 Sorry, I can't seem to locate the source dir for $package. Please start
1473 Configure with an explicit path -- i.e. /some/path/Configure.
1481 echo "Sources for $package found in \"$src\"." >&4
1485 : script used to extract .SH files with variable substitutions
1486 cat >extract <<'EOS'
1488 echo "Doing variable substitutions on .SH files..."
1489 if test -f $src/MANIFEST; then
1490 set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH$'`
1492 echo "(Looking for .SH files under the source directory.)"
1493 set x `(cd $src; find . -name "*.SH" -print)`
1497 0) set x `(cd $src; echo *.SH)`; shift;;
1499 if test ! -f $src/$1; then
1505 while test $name; do
1506 if test ! -d "$name"; then
1507 create="$name $create";
1508 name=`echo $name | sed -e "s|^[^/]*$||"`;
1509 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1514 for file in $create; do
1523 dir=`expr X$file : 'X\(.*\)/'`
1524 file=`expr X$file : 'X.*/\(.*\)'`
1525 (cd $dir && . ./$file)
1535 dir=`expr X$file : 'X\(.*\)/'`
1536 file=`expr X$file : 'X.*/\(.*\)'`
1537 (set x $dir; shift; eval $mkdir_p)
1547 if test -f $src/config_h.SH; then
1548 if test ! -f config.h; then
1549 : oops, they left it out of MANIFEST, probably, so do it anyway.
1555 : extract files and exit if asked to do so
1556 case "$extractsh" in
1558 case "$realsilent" in
1562 case "$config_sh" in
1563 '') config_sh='config.sh';;
1566 echo "Fetching answers from $config_sh..."
1569 test "$override" && . ./optdef.sh
1578 : Eunice requires " " instead of "", can you believe it
1581 echo "Beginning of configuration questions for $package."
1583 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1585 : first determine how to suppress newline on echo command
1587 echo "Checking echo to see how to suppress newlines..."
1588 (echo "hi there\c" ; echo " ") >.echotmp
1589 if $contains c .echotmp >/dev/null 2>&1 ; then
1600 echo $n "The star should be here-->$c"
1604 : Now test for existence of everything in MANIFEST
1606 if test -f $rsrc/MANIFEST; then
1607 echo "First let's make sure your kit is complete. Checking..." >&4
1608 awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50
1611 for filelist in x??; do
1612 (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
1614 if test -s missing; then
1618 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1620 You have the option of continuing the configuration process, despite the
1621 distinct possibility that your kit is damaged, by typing 'y'es. If you
1622 do, don't blame me if something goes wrong. I advise you to type 'n'o
1623 and contact the author (perlbug@perl.org).
1626 echo $n "Continue? [n] $c" >&4
1630 echo "Continuing..." >&4
1634 echo "ABORTING..." >&4
1639 echo "Looks good..."
1642 echo "There is no MANIFEST file. I hope your kit is complete !"
1647 : Find the appropriate value for a newline for tr
1648 if test -n "$DJGPP"; then
1651 if test X"$trnl" = X; then
1652 case "`echo foo|tr '\n' x 2>/dev/null`" in
1656 if test X"$trnl" = X; then
1657 case "`echo foo|tr '\012' x 2>/dev/null`" in
1658 foox) trnl='\012' ;;
1661 if test X"$trnl" = X; then
1664 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1670 : compute the number of columns on the terminal for proper question formatting
1675 : set up the echo used in my read
1676 myecho="case \"\$xxxm\" in
1677 '') echo $n \"\$rp $c\" >&4;;
1679 '') echo $n \"[\$xxxm] $c\";;
1681 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
1683 echo $n \"[\$xxxm] $c\" >&4
1685 echo $n \"\$rp [\$xxxm] $c\" >&4
1691 : now set up to do reads with possible shell escape and default assignment
1697 case "\$fastread" in
1698 yes) case "\$dflt" in
1701 case "\$silent-\$rp" in
1706 *) case "\$silent" in
1707 true) case "\$rp" in
1712 while expr "X\$ans" : "X!" >/dev/null; do
1716 aok=''; eval "ans=\\"\$answ\\"" && aok=y
1724 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
1733 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
1738 echo "(OK, I'll run with -d after this question.)" >&4
1741 echo "*** Sorry, \$1 not supported yet." >&4
1751 echo "*** Substitution done -- please confirm."
1753 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
1758 echo "*** Error -- try again."
1765 case "\$ans\$xxxm\$nostick" in
1777 : create .config dir to save info across Configure sessions
1778 test -d ../.config || mkdir ../.config
1779 cat >../.config/README <<EOF
1780 This directory created by Configure to save information that should
1781 persist across sessions for $package.
1783 You may safely delete it if you wish.
1786 xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
1788 $define|true|[yY]*) ;;
1789 *) case "$xversion" in
1792 *** WHOA THERE!!! ***
1794 This is an UNSTABLE DEVELOPMENT release.
1795 The version of this $package distribution is $xversion, that is, odd,
1796 (as opposed to even) and that signifies a development release.
1797 If you want a maintenance release, you want an even-numbered version.
1799 Do ***NOT*** install this into production use.
1800 Data corruption and crashes are possible.
1802 It is most seriously suggested that you do not continue any further
1803 unless you want to help in developing and debugging Perl.
1806 rp='Do you really want to continue?'
1810 [yY]) echo >&4 "Okay, continuing." ;;
1811 *) echo >&4 "Okay, bye."
1820 : general instructions
1823 user=`(logname) 2>/dev/null`
1825 '') user=`whoami 2>&1`;;
1827 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
1830 rp='Would you like to see the instructions?'
1841 This installation shell script will examine your system and ask you questions
1842 to determine how the perl5 package should be installed. If you get
1843 stuck on a question, you may use a ! shell escape to start a subshell or
1844 execute a command. Many of the questions will have default answers in square
1845 brackets; typing carriage return will give you the default.
1847 On some of the questions which ask for file or directory names you are allowed
1848 to use the ~name construct to specify the login directory belonging to "name",
1849 even if you don't have a shell which knows about that. Questions where this is
1850 allowed will be marked "(~name ok)".
1854 dflt='Type carriage return to continue'
1858 The prompter used in this script allows you to use shell variables and
1859 backticks in your answers. You may use $1, $2, etc... to refer to the words
1860 in the default answer, as if the default line was a set of arguments given to a
1861 script shell. This means you may also use $* to repeat the whole default line,
1862 so you do not have to re-type everything to add something to the default.
1864 Everytime there is a substitution, you will have to confirm. If there is an
1865 error (e.g. an unmatched backtick), the default answer will remain unchanged
1866 and you will be prompted again.
1868 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
1869 the questions and use the computed defaults (or the previous answers if there
1870 was already a config.sh file). Type 'Configure -h' for a list of options.
1871 You may also start interactively and then answer '& -d' at any prompt to turn
1872 on the non-interactive behaviour for the remainder of the execution.
1878 Much effort has been expended to ensure that this shell script will run on any
1879 Unix system. If despite that it blows up on yours, your best bet is to edit
1880 Configure and run it again. If you can't run Configure for some reason,
1881 you'll have to generate a config.sh file by hand. Whatever problems you
1882 have, let me (perlbug@perl.org) know how I blew it.
1884 This installation script affects things in two ways:
1886 1) it may do direct variable substitutions on some of the files included
1888 2) it builds a config.h file for inclusion in C programs. You may edit
1889 any of these files as the need arises after running this script.
1891 If you make a mistake on a question, there is no easy way to back up to it
1892 currently. The easiest thing to do is to edit config.sh and rerun all the SH
1893 files. Configure will offer to let you do this before it runs the SH files.
1896 dflt='Type carriage return to continue'
1898 case "$firsttime" in
1899 true) echo $user >>../.config/instruct;;
1903 : find out where common programs are
1905 echo "Locating common programs..." >&4
1918 if test -d \$dir/\$thing; then
1924 for thisthing in \$dir/\$thing; do
1925 : just loop through to pick last item
1927 if test -f \$thisthing; then
1930 elif test -f \$dir/\$thing.exe; then
1931 if test -n "$DJGPP"; then
1932 echo \$dir/\$thing.exe
1934 : on Eunice apparently
1984 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1985 pth="$pth /lib /usr/lib"
1986 for file in $loclist; do
1990 if test -f "$xxx"; then
1993 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
1994 xxx=`./loc $file $file $pth`
1997 '') xxx=`./loc $file $file $pth`;;
1998 *) xxx=`./loc $xxx $xxx $pth`;;
2004 echo $file is in $xxx.
2007 echo $file is in $xxx.
2010 echo "I don't know where '$file' is, and my life depends on it." >&4
2011 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2017 echo "Don't worry if any of the following aren't found..."
2019 for file in $trylist; do
2023 if test -f "$xxx"; then
2026 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2027 xxx=`./loc $file $file $pth`
2030 '') xxx=`./loc $file $file $pth`;;
2031 *) xxx=`./loc $xxx $xxx $pth`;;
2037 echo $file is in $xxx.
2040 echo $file is in $xxx.
2043 echo "I don't see $file out there, $say."
2050 echo "Substituting grep for egrep."
2056 echo "Substituting cp for ln."
2062 echo "Hopefully test is built into your sh."
2065 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2066 echo "Using the test built into your sh."
2074 echo "Hopefully echo is built into your sh."
2079 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2080 $echo $n "hi there$c" >foo1
2081 echo $n "hi there$c" >foo2
2082 if cmp foo1 foo2 >/dev/null 2>&1; then
2083 echo "They are compatible. In fact, they may be identical."
2090 They are not compatible! You are probably running ksh on a non-USG system.
2091 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2092 have echo built in and we may have to run some Bourne shell scripts. That
2093 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2096 $echo $n "The star should be here-->$c"
2106 cat <<'EOSC' >>checkcc
2111 int main(int argc, char *argv[]) {
2115 if $cc -o try $ccflags try.c; then
2118 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2124 case "`$cc -v -c try.c 2>&1`" in
2127 if $test X"$trygcc" = Xyes; then
2128 if gcc -o try -c try.c; then
2130 echo "You seem to have a working gcc, though." >&4
2131 rp="Would you like to use it?"
2133 if $test -f myread; then
2136 if $test -f UU/myread; then
2139 echo "Cannot find myread, sorry. Aborting." >&2
2144 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no ;;
2148 if $test X"$despair" = Xyes; then
2150 You need to find a working C compiler.
2151 Either (purchase and) install the C compiler supplied by your OS vendor,
2152 or for a free C compiler try http://gcc.gnu.org/
2153 I cannot continue any further, aborting.
2163 : determine whether symbolic links are supported
2166 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2167 echo "Symbolic links are supported." >&4
2170 echo "Symbolic links are NOT supported." >&4
2175 : determine whether symbolic links are supported
2179 echo "Checking how to test for symbolic links..." >&4
2181 if $test "X$issymlink" = X; then
2182 sh -c "PATH= test -h sym" >/dev/null 2>&1
2183 if test $? = 0; then
2187 if $test "X$issymlink" = X; then
2188 if $test -h >/dev/null 2>&1; then
2189 issymlink="$test -h"
2190 echo "Your builtin 'test -h' may be broken, I'm using external '$test -h'." >&4
2193 if $test "X$issymlink" = X; then
2194 if $test -L sym 2>/dev/null; then
2195 issymlink="$test -L"
2198 if $test "X$issymlink" != X; then
2199 echo "You can test for symbolic links with '$issymlink'." >&4
2201 echo "I do not know how you can test for symbolic links." >&4
2205 *) echo "No symbolic links, so not testing for their testing..." >&4
2211 case "$mksymlinks" in
2214 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2217 *) case "$lns:$issymlink" in
2218 *"ln -s:"*"test -"?)
2219 echo "Creating the symbolic links..." >&4
2220 echo "(First creating the subdirectories...)" >&4
2222 awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
2224 test -z "$directory" && break
2228 if test ! -d t/base; then
2229 echo "Failed to create the subdirectories. Aborting." >&4
2232 echo "(Then creating the symlinks...)" >&4
2233 awk '{print $1}' $src/MANIFEST | while true; do
2235 test -z "$filename" && break
2236 if test -f $filename; then
2237 if $issymlink $filename; then
2241 if test -f $filename; then
2242 echo "$filename already exists, not symlinking."
2244 ln -s $src/$filename $filename
2248 if test ! -f t/base/commonsense.t; then
2249 echo "Failed to create the symlinks. Aborting." >&4
2254 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2262 : see whether [:lower:] and [:upper:] are supported character classes
2264 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2266 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2270 *) # There is a discontinuity in EBCDIC between 'I' and 'J'
2271 # (0xc9 and 0xd1), therefore that is a nice testing point.
2272 if test "X$up" = X -o "X$low" = X; then
2273 case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
2279 if test "X$up" = X -o "X$low" = X; then
2280 case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
2286 if test "X$up" = X -o "X$low" = X; then
2287 case "`echo IJ | od -x 2>/dev/null`" in
2289 echo "Hey, this might be EBCDIC." >&4
2290 if test "X$up" = X -o "X$low" = X; then
2291 case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2292 ij) up='[A-IJ-RS-Z]'
2297 if test "X$up" = X -o "X$low" = X; then
2298 case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2308 case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
2310 echo "Using $up and $low to convert case." >&4
2313 echo "I don't know how to translate letters from upper to lower case." >&4
2314 echo "Your tr is not acting any way I know of." >&4
2318 : set up the translation script tr, must be called with ./tr of course
2322 '[A-Z][a-z]') exec $tr '$up' '$low';;
2323 '[a-z][A-Z]') exec $tr '$low' '$up';;
2330 : Try to determine whether config.sh was made on this system
2331 case "$config_sh" in
2333 myuname=`$uname -a 2>/dev/null`
2334 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2335 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2336 # because the A-Z/a-z are not consecutive.
2337 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2338 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2339 newmyuname="$myuname"
2341 case "$knowitall" in
2343 if test -f ../config.sh; then
2344 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2345 eval "`grep myuname= ../config.sh`"
2347 if test "X$myuname" = "X$newmyuname"; then
2355 : Get old answers from old config file if Configure was run on the
2356 : same system, otherwise use the hints.
2359 if test -f config.sh; then
2361 rp="I see a config.sh file. Shall I use it to set the defaults?"
2364 n*|N*) echo "OK, I'll ignore it."
2365 mv config.sh config.sh.old
2366 myuname="$newmyuname"
2368 *) echo "Fetching default answers from your old config.sh file..." >&4
2376 : Older versions did not always set $sh. Catch re-use of such
2386 if test ! -f config.sh; then
2389 First time through, eh? I have some defaults handy for some systems
2390 that need some extra help getting the Configure answers right:
2393 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2395 : Half the following guesses are probably wrong... If you have better
2396 : tests or hints, please send them to perlbug@perl.org
2397 : The metaconfig authors would also appreciate a copy...
2398 $test -f /irix && osname=irix
2399 $test -f /xenix && osname=sco_xenix
2400 $test -f /dynix && osname=dynix
2401 $test -f /dnix && osname=dnix
2402 $test -f /lynx.os && osname=lynxos
2403 $test -f /unicos && osname=unicos && osvers=`$uname -r`
2404 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
2405 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
2406 $test -f /bin/mips && /bin/mips && osname=mips
2407 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
2408 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
2409 $test -d /usr/apollo/bin && osname=apollo
2410 $test -f /etc/saf/_sactab && osname=svr4
2411 $test -d /usr/include/minix && osname=minix
2412 if $test -d /MachTen -o -d /MachTen_Folder; then
2414 if $test -x /sbin/version; then
2415 osvers=`/sbin/version | $awk '{print $2}' |
2416 $sed -e 's/[A-Za-z]$//'`
2417 elif $test -x /usr/etc/version; then
2418 osvers=`/usr/etc/version | $awk '{print $2}' |
2419 $sed -e 's/[A-Za-z]$//'`
2425 $test -f /sys/posix.dll &&
2426 $test -f /usr/bin/what &&
2427 set X `/usr/bin/what /sys/posix.dll` &&
2428 $test "$3" = UWIN &&
2432 if $test -f $uname; then
2440 umips) osname=umips ;;
2443 [23]100) osname=mips ;;
2444 next*) osname=next ;;
2446 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
2447 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
2450 elif $test -f /etc/kconfig; then
2452 if test "$lns" = "$ln -s"; then
2454 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
2456 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
2463 if test -n "$DJGPP"; then
2472 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
2474 'not found') osvers="$4"."$3" ;;
2475 '<3240'|'<>3240') osvers=3.2.0 ;;
2476 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
2477 '=3250'|'>3250') osvers=3.2.5 ;;
2481 bsd386) osname=bsd386
2484 cygwin*) osname=cygwin
2487 *dc.osx) osname=dcosx
2493 domainos) osname=apollo
2499 dynixptx*) osname=dynixptx
2500 osvers=`echo "$4"|sed 's/^v//'`
2502 freebsd) osname=freebsd
2504 genix) osname=genix ;;
2506 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
2522 netbsd*) osname=netbsd
2525 news-os) osvers="$3"
2527 4*) osname=newsos4 ;;
2531 next*) osname=next ;;
2532 nonstop-ux) osname=nonstopux ;;
2533 POSIX-BC | posix-bc ) osname=posix-bc
2536 powerux | power_ux | powermax_os | powermaxos | \
2537 powerunix | power_unix) osname=powerux
2543 solaris) osname=solaris
2545 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
2552 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
2556 titanos) osname=titanos
2565 ultrix) osname=ultrix
2568 osf1|mls+) case "$5" in
2571 osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
2574 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
2577 hp*) osname=hp_osf1 ;;
2578 mips) osname=mips_osf1 ;;
2581 unixware) osname=svr5
2587 $2) case "$osname" in
2591 : svr4.x or possibly later
2601 if test -f /stand/boot ; then
2602 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
2603 if test -n "$INITPROG" -a -f "$INITPROG"; then
2604 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
2605 if test -n "$isesix"; then
2613 *) if test -f /etc/systemid; then
2615 set `echo $3 | $sed 's/\./ /g'` $4
2616 if $test -f $src/hints/sco_$1_$2_$3.sh; then
2618 elif $test -f $src/hints/sco_$1_$2.sh; then
2620 elif $test -f $src/hints/sco_$1.sh; then
2625 '') : Still unknown. Probably a generic Sys V.
2634 *) case "$osname" in
2635 '') : Still unknown. Probably a generic BSD.
2643 if test -f /vmunix -a -f $src/hints/news_os.sh; then
2644 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
2645 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
2648 $rm -f UU/kernel.what
2649 elif test -d c:/.; then
2656 : Now look for a hint file osname_osvers, unless one has been
2657 : specified already.
2660 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
2661 : Also try without trailing minor version numbers.
2662 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
2663 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
2664 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
2665 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
2668 *) case "$osvers" in
2671 *) if $test -f $src/hints/$file.sh ; then
2673 elif $test -f $src/hints/$xfile.sh ; then
2675 elif $test -f $src/hints/$xxfile.sh ; then
2677 elif $test -f $src/hints/$xxxfile.sh ; then
2679 elif $test -f $src/hints/$xxxxfile.sh ; then
2681 elif $test -f "$src/hints/${osname}.sh" ; then
2690 if $test -f Policy.sh ; then
2693 none) dflt="Policy" ;;
2694 *) dflt="Policy $dflt" ;;
2699 dflt=`echo $hintfile | $sed 's/\.sh$//'`
2703 if $test -f Policy.sh ; then
2706 There's also a Policy hint file available, which should make the
2707 site-specific (policy) questions easier to answer.
2714 You may give one or more space-separated answers, or "none" if appropriate.
2715 A well-behaved OS will have no hints, so answering "none" or just "Policy"
2716 is a good thing. DO NOT give a wrong version or a wrong OS.
2720 rp="Which of these apply, if any?"
2723 for file in $tans; do
2724 if $test X$file = XPolicy -a -f Policy.sh; then
2726 $cat Policy.sh >> UU/config.sh
2727 elif $test -f $src/hints/$file.sh; then
2728 . $src/hints/$file.sh
2729 $cat $src/hints/$file.sh >> UU/config.sh
2730 elif $test X$tans = X -o X$tans = Xnone ; then
2733 : Give one chance to correct a possible typo.
2734 echo "$file.sh does not exist"
2736 rp="hint to use instead?"
2738 for file in $ans; do
2739 if $test -f "$src/hints/$file.sh"; then
2740 . $src/hints/$file.sh
2741 $cat $src/hints/$file.sh >> UU/config.sh
2742 elif $test X$ans = X -o X$ans = Xnone ; then
2745 echo "$file.sh does not exist -- ignored."
2752 : Remember our hint file for later.
2753 if $test -f "$src/hints/$file.sh" ; then
2763 echo "Fetching default answers from $config_sh..." >&4
2767 cp $config_sh config.sh 2>/dev/null
2777 test "$override" && . ./optdef.sh
2779 : Restore computed paths
2780 for file in $loclist $trylist; do
2781 eval $file="\$_$file"
2786 Configure uses the operating system name and version to set some defaults.
2787 The default value is probably right if the name rings a bell. Otherwise,
2788 since spelling matters for me, either accept the default or answer "none"
2795 ''|' '|none) dflt=none ;;
2796 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
2799 *) dflt="$osname" ;;
2801 rp="Operating system name?"
2805 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
2811 ''|' '|none) dflt=none ;;
2812 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
2813 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
2815 ''|' ') dflt=none ;;
2820 *) dflt="$osvers" ;;
2822 rp="Operating system version?"
2832 : who configured the system
2833 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
2834 cf_by=`(logname) 2>/dev/null`
2837 cf_by=`(whoami) 2>/dev/null`
2839 "") cf_by=unknown ;;
2843 : set up the script used to warn in case of inconsistency
2850 echo "*** WHOA THERE!!! ***" >&4
2851 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
2852 rp=" Keep the $hint value?"
2855 y) td=$was; tu=$was;;
2859 : function used to set $1 to $val
2860 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
2862 $define$undef) . ./whoa; eval "$var=\$td";;
2863 $undef$define) . ./whoa; eval "$var=\$tu";;
2864 *) eval "$var=$val";;
2867 case "$usethreads" in
2868 $define|true|[yY]*) dflt='y';;
2873 Perl can be built to take advantage of threads on some systems.
2874 To do so, Configure can be run with -Dusethreads.
2876 Note that threading is a highly experimental feature, and
2877 some known race conditions still remain. If you choose to try
2878 it, be very sure to not actually deploy it for production
2879 purposes. README.threads has more details, and is required
2880 reading if you enable threads.
2882 If this doesn't make any sense to you, just accept the default '$dflt'.
2884 rp='Build a threading Perl?'
2887 y|Y) val="$define" ;;
2893 case "$usethreads" in
2897 As of 5.5.640, Perl has two different internal threading implementations,
2898 the 5.005 version (5005threads) and an interpreter-based version
2899 (ithreads) that has one interpreter per thread. Both are very
2900 experimental. This arrangement exists to help developers work out
2901 which one is better.
2903 If you're a casual user, you probably don't want interpreter-threads
2904 at this time. There doesn't yet exist a way to create threads from
2905 within Perl in this model, i.e., "use Thread;" will NOT work.
2907 : Default to ithreads unless overridden on command line or with
2910 case "$use5005threads" in
2911 $define|true|[yY]*) dflt='n';;
2913 case "$useithreads" in
2914 $undef|false|[nN]*) dflt='n';;
2916 rp='Use interpreter-based ithreads?'
2919 y|Y) val="$define" ;;
2924 : Now set use5005threads to the opposite value.
2925 case "$useithreads" in
2926 $define) val="$undef" ;;
2933 useithreads="$undef"
2934 use5005threads="$undef"
2938 case "$d_oldpthreads" in
2939 '') : Configure tests would be welcome here. For now, assume undef.
2941 *) val="$d_oldpthreads" ;;
2947 case "$usethreads" in
2948 "$define"|true|[yY]*)
2949 : Look for a hint-file generated 'call-back-unit'. If the
2950 : user has specified that a threading perl is to be built,
2951 : we may need to set or change some other defaults.
2952 if $test -f usethreads.cbu; then
2953 echo "Your platform has some specific hints for threaded builds, using them..."
2957 (Your platform doesn't have any specific hints for threaded builds.
2958 Assuming POSIX threads, then.)
2966 Perl can be built so that multiple Perl interpreters can coexist
2967 within the same Perl executable.
2970 case "$useithreads" in
2973 This multiple interpreter support is required for interpreter-based threads.
2977 *) case "$usemultiplicity" in
2978 $define|true|[yY]*) dflt='y';;
2982 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
2983 rp='Build Perl for multiplicity?'
2986 y|Y) val="$define" ;;
2994 : make some quick guesses about what we are up against
2996 $echo $n "Hmm... $c"
3006 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
3007 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
3009 echo "Looks kind of like an OSF/1 system, but we'll see..."
3011 elif test `echo abc | $tr a-z A-Z` = Abc ; then
3012 xxx=`./loc addbib blurfl $pth`
3013 if $test -f $xxx; then
3014 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3018 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3019 echo "Looks kind of like an extended USG system, but we'll see..."
3021 echo "Looks kind of like a USG system, but we'll see..."
3025 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3026 echo "Looks kind of like a BSD system, but we'll see..."
3030 echo "Looks kind of like a Version 7 system, but we'll see..."
3033 case "$eunicefix" in
3036 There is, however, a strange, musty smell in the air that reminds me of
3037 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3041 : it so happens the Eunice I know will not run shell scripts in Unix format
3045 echo "Congratulations. You aren't running Eunice."
3049 : Detect OS2. The p_ variable is set above in the Head.U unit.
3050 : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses
3051 : semicolon as a patch separator
3056 I have the feeling something is not exactly right, however...don't tell me...
3057 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3058 (Or you may be running DOS with DJGPP.)
3063 if test -f /xenix; then
3064 echo "Actually, this looks more like a XENIX system..."
3069 echo "It's not Xenix..."
3074 if test -f /venix; then
3075 echo "Actually, this looks more like a VENIX system..."
3082 echo "Nor is it Venix..."
3085 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3086 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3093 rp="Use which C compiler?"
3096 : Look for a hint-file generated 'call-back-unit'. Now that the
3097 : user has specified the compiler, we may need to set or change some
3099 if $test -f cc.cbu; then
3105 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3106 $cat >gccvers.c <<EOM
3111 printf("%s\n", __VERSION__);
3113 printf("%s\n", "1");
3119 if $cc -o gccvers $ldflags gccvers.c; then
3120 gccversion=`./gccvers`
3121 case "$gccversion" in
3122 '') echo "You are not using GNU cc." ;;
3123 *) echo "You are using GNU cc $gccversion."
3129 echo "*** WHOA THERE!!! ***" >&4
3130 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3131 case "$knowitall" in
3133 echo " You'd better start hunting for one and let me know about it." >&4
3139 case "$gccversion" in
3140 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3142 case "$gccversion" in
3143 '') gccosandvers='' ;;
3144 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3145 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3147 case "$gccosandvers" in
3148 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3149 $osname$osvers) ;; # looking good
3150 $osname*) cat <<EOM >&4
3152 *** WHOA THERE!!! ***
3154 Your gcc has not been compiled for the exact release of
3155 your operating system ($gccosandvers versus $osname$osvers).
3157 In general it is a good idea to keep gcc synchronized with
3158 the operating system because otherwise serious problems
3159 may ensue when trying to compile software, like Perl.
3161 I'm trying to be optimistic here, though, and will continue.
3162 If later during the configuration and build icky compilation
3163 problems appear (headerfile conflicts being the most common
3164 manifestation), I suggest reinstalling the gcc to match
3165 your operating system release.
3169 *) gccosandvers='' ;; # failed to parse, better be silent
3177 : see how we invoke the C preprocessor
3179 echo "Now, how can we feed standard input to your C preprocessor..." >&4
3180 cat <<'EOT' >testcpp.c
3186 if test ! -f cppstdin; then
3187 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
3188 # AIX cc -E doesn't show the absolute headerfile
3189 # locations but we'll cheat by using the -M flag.
3190 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
3192 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
3195 echo "Keeping your $hint cppstdin wrapper."
3198 wrapper=`pwd`/cppstdin
3202 if $test "X$cppstdin" != "X" && \
3203 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
3204 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
3206 echo "You used to use $cppstdin $cppminus so we'll use that again."
3208 '') echo "But let's see if we can live without a wrapper..." ;;
3210 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
3211 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
3213 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
3216 echo "(However, $cpprun $cpplast does not work, let's see...)"
3224 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
3231 elif echo 'Maybe "'"$cc"' -E" will work...'; \
3232 $cc -E <testcpp.c >testcpp.out 2>&1; \
3233 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3234 echo "Yup, it does."
3237 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
3238 $cc -E - <testcpp.c >testcpp.out 2>&1; \
3239 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3240 echo "Yup, it does."
3243 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
3244 $cc -P <testcpp.c >testcpp.out 2>&1; \
3245 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3246 echo "Yipee, that works!"
3249 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
3250 $cc -P - <testcpp.c >testcpp.out 2>&1; \
3251 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3252 echo "At long last!"
3255 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
3256 $cpp <testcpp.c >testcpp.out 2>&1; \
3257 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3261 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
3262 $cpp - <testcpp.c >testcpp.out 2>&1; \
3263 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3264 echo "Hooray, it works! I was beginning to wonder."
3267 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
3268 $wrapper <testcpp.c >testcpp.out 2>&1; \
3269 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3275 rp="No dice. I can't find a C preprocessor. Name one:"
3279 $x_cpp <testcpp.c >testcpp.out 2>&1
3280 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3281 echo "OK, that will do." >&4
3283 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
3298 echo "Perhaps can we force $cc -E using a wrapper..."
3299 if $wrapper <testcpp.c >testcpp.out 2>&1; \
3300 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
3306 echo "Nope, we'll have to live without it..."
3320 "$wrapper"|'cppstdin') ;;
3321 *) $rm -f $wrapper;;
3323 $rm -f testcpp.c testcpp.out
3325 : decide how portable to be. Allow command line overrides.
3326 case "$d_portable" in
3328 *) d_portable="$define" ;;
3331 : set up shell script to do ~ expansion
3337 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3340 if $test -f /bin/csh; then
3341 /bin/csh -f -c "glob \$1"
3346 name=\`$expr x\$1 : '..\([^/]*\)'\`
3347 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3348 if $test ! -d "\$dir"; then
3350 echo "\$me: can't locate home directory for: \$name" >&2
3355 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3371 : now set up to get a file name
3375 cat <<'EOSC' >>getfile
3391 expr $fn : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
3392 fn=`echo $fn | sed 's/(.*)//'`
3398 loc_file=`expr $fn : '.*:\(.*\)'`
3399 fn=`expr $fn : '\(.*\):.*'`
3407 */*) fullpath=true;;
3416 *e*) exp_file=true;;
3419 *p*) nopath_ok=true;;
3424 *d*) type='Directory';;
3425 *l*) type='Locate';;
3430 Locate) what='File';;
3435 case "$d_portable" in
3443 while test "$type"; do
3448 true) rp="$rp (~name ok)";;
3451 if test -f UU/getfile.ok && \
3452 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3471 value=`UU/filexp $ans`
3474 if test "$ans" != "$value"; then
3475 echo "(That expands to $value on this system.)"
3489 /*) value="$ansexp" ;;
3490 [a-zA-Z]:/*) value="$ansexp" ;;
3495 echo "I shall only accept a full path name, as in /bin/ls." >&4
3496 echo "Use a ! shell escape if you wish to check pathnames." >&4
3499 echo "Please give a full path name, starting with slash." >&4
3502 echo "Note that using ~name is ok provided it expands well." >&4
3515 for fp in $gfpth; do
3516 if test "X$fp" = X.; then
3521 if test -f "$pf"; then
3523 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
3525 echo "($value is not a plain file, but that's ok.)"
3528 if test X"$type" = X; then
3535 for fp in $gfpth; do
3536 if test "X$fp" = X.; then
3541 direxp="$fp/$ansexp"
3543 if test -d "$direxp"; then
3551 if test -d "$ansexp"; then
3552 echo "(Looking for $loc_file in directory $value.)"
3553 value="$value/$loc_file"
3554 ansexp="$ansexp/$loc_file"
3556 if test -f "$ansexp"; then
3559 case "$nopath_ok" in
3560 true) case "$value" in
3562 *) echo "Assuming $value will be in people's path."
3578 if test "$fastread" = yes; then
3583 rp="$what $value doesn't exist. Use that name anyway?"
3602 test "X$gfpthkeep" != Xy && gfpth=""
3605 : What should the include directory be ?
3607 $echo $n "Hmm... $c"
3611 if $test -f /bin/mips && /bin/mips; then
3612 echo "Looks like a MIPS system..."
3613 $cat >usr.c <<'EOCP'
3614 #ifdef SYSTYPE_BSD43
3618 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
3619 dflt='/bsd43/usr/include'
3623 mips_type='System V'
3625 $rm -f usr.c usr.out
3626 echo "and you're compiling with the $mips_type compiler and libraries."
3630 echo "Doesn't look like a MIPS system."
3640 case "$xxx_prompt" in
3643 rp='Where are the include files you want to use?'
3651 : Set private lib path
3654 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
3659 '') dlist="$loclibpth $plibpth $glibpth";;
3660 *) dlist="$libpth";;
3663 : Now check and see which directories actually exist, avoiding duplicates
3667 if $test -d $xxx; then
3670 *) libpth="$libpth $xxx";;
3676 Some systems have incompatible or broken versions of libraries. Among
3677 the directories listed in the question below, please remove any you
3678 know not to be holding relevant libraries, and add any that are needed.
3679 Say "none" for none.
3690 rp="Directories to use for library searches?"
3697 : compute shared library extension
3700 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
3710 On some systems, shared libraries may be available. Answer 'none' if
3711 you want to suppress searching of shared libraries for the remainder
3712 of this configuration.
3715 rp='What is the file extension used for shared libraries?'
3719 : Define several unixisms.
3720 : Hints files or command line option can be used to override them.
3721 : The convoluted testing is in case hints files set either the old
3724 '') case "$exe_ext" in
3726 *) _exe="$exe_ext" ;;
3731 '') case "$lib_ext" in
3738 '') case "$obj_ext" in
3745 '') case "$path_sep" in
3756 : Which makefile gets called first. This is used by make depend.
3757 case "$firstmakefile" in
3758 '') firstmakefile='makefile';;
3762 $define|true|[yY]*) dflt='y';;
3767 Perl can be built to use the SOCKS proxy protocol library. To do so,
3768 Configure must be run with -Dusesocks. If you use SOCKS you also need
3769 to use the PerlIO abstraction layer, this will be implicitly selected.
3771 If this doesn't make any sense to you, just accept the default '$dflt'.
3773 rp='Build Perl for SOCKS?'
3776 y|Y) val="$define" ;;
3783 $define|true|[yY]*) useperlio="$define";;
3786 : Looking for optional libraries
3788 echo "Checking for optional libraries..." >&4
3793 case "$libswanted" in
3794 '') libswanted='c_s';;
3797 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
3803 for thisdir in $libpth $xlibpth; do
3804 test -d $thisdir && libspath="$libspath $thisdir"
3806 for thislib in $libswanted; do
3807 for thisdir in $libspath; do
3809 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
3810 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|tail -1`
3811 $test -f "$xxx" && eval $libscheck
3812 $test -f "$xxx" && libstyle=shared
3814 if test ! -f "$xxx"; then
3815 xxx=$thisdir/lib$thislib.$so
3816 $test -f "$xxx" && eval $libscheck
3817 $test -f "$xxx" && libstyle=shared
3819 if test ! -f "$xxx"; then
3820 xxx=$thisdir/lib$thislib$_a
3821 $test -f "$xxx" && eval $libscheck
3822 $test -f "$xxx" && libstyle=static
3824 if test ! -f "$xxx"; then
3825 xxx=$thisdir/$thislib$_a
3826 $test -f "$xxx" && eval $libscheck
3827 $test -f "$xxx" && libstyle=static
3829 if test ! -f "$xxx"; then
3830 xxx=$thisdir/lib${thislib}_s$_a
3831 $test -f "$xxx" && eval $libscheck
3832 $test -f "$xxx" && libstyle=static
3833 $test -f "$xxx" && thislib=${thislib}_s
3835 if test ! -f "$xxx"; then
3836 xxx=$thisdir/Slib$thislib$_a
3837 $test -f "$xxx" && eval $libscheck
3838 $test -f "$xxx" && libstyle=static
3840 if $test -f "$xxx"; then
3842 shared) echo "Found -l$thislib (shared)." ;;
3843 static) echo "Found -l$thislib." ;;
3844 *) echo "Found -l$thislib ($libstyle)." ;;
3848 *) dflt="$dflt -l$thislib"
3849 libsfound="$libsfound $xxx"
3851 libsfiles="$libsfiles $yyy"
3852 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
3853 case " $libsdirs " in
3855 *) libsdirs="$libsdirs $yyy" ;;
3862 if $test ! -f "$xxx"; then
3863 echo "No -l$thislib."
3874 ' '|'') dflt='none';;
3879 In order to compile $package on your machine, a number of libraries
3880 are usually needed. Include any other special libraries here as well.
3881 Say "none" for none. The default list is almost always right.
3885 rp="What libraries to use?"
3892 : determine optimization, if desired, or use for debug flag also
3894 ' '|$undef) dflt='none';;
3896 *) dflt="$optimize";;
3900 By default, $package compiles with the -O flag to use the optimizer.
3901 Alternately, you might want to use the symbolic debugger, which uses
3902 the -g flag (on traditional Unix systems). Either flag can be
3903 specified here. To use neither flag, specify the word "none".
3906 rp="What optimizer/debugger flag should be used?"
3910 'none') optimize=" ";;
3914 : We will not override a previous value, but we might want to
3915 : augment a hint file
3917 default|recommended)
3918 case "$gccversion" in
3919 1*) dflt='-fpcc-struct-return' ;;
3922 *-g*) dflt="$dflt -DDEBUGGING";;
3924 case "$gccversion" in
3925 2*) if test -d /etc/conf/kconfig.d &&
3926 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
3932 case "$gccversion" in
3936 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
3937 echo 'int main(void) { return 0; }' > gcctest.c
3938 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
3939 echo "Yes, it does." 2>&1
3942 echo "Leaving current flags $ccflags alone." 2>&1
3944 *) dflt="$dflt -fno-strict-aliasing" ;;
3947 echo "Nope, it doesn't, but that's ok." 2>&1
3954 case "$mips_type" in
3955 *BSD*|'') inclwanted="$locincpth $usrinc";;
3956 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
3958 for thisincl in $inclwanted; do
3959 if $test -d $thisincl; then
3960 if $test x$thisincl != x$usrinc; then
3962 *" -I$thisincl "*);;
3963 *) dflt="$dflt -I$thisincl ";;
3969 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
3971 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
3979 *) dflt="$dflt -D$2";;
3983 set signal.h LANGUAGE_C; eval $inctest
3987 ccflags="$ccflags -DSOCKS"
3992 default|recommended) dflt="$ccflags $dflt" ;;
3993 *) dflt="$ccflags";;
4002 Your C compiler may want other flags. For this question you should include
4003 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
4004 but you should NOT include libraries or ld flags like -lwhatever. If you
4005 want $package to honor its debug switch, you should include -DDEBUGGING here.
4006 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
4008 To use no flags, specify the word "none".
4014 rp="Any additional cc flags?"
4021 : the following weeds options from ccflags that are of no interest to cpp
4023 case "$gccversion" in
4024 1*) cppflags="$cppflags -D__GNUC__"
4026 case "$mips_type" in
4028 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4034 echo "Let me guess what the preprocessor flags are..." >&4
4048 *) ftry="$previous $flag";;
4050 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4051 >cpp1.out 2>/dev/null && \
4052 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4053 >cpp2.out 2>/dev/null && \
4054 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4055 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4057 cppflags="$cppflags $ftry"
4067 *-*) echo "They appear to be: $cppflags";;
4069 $rm -f cpp.c cpp?.out
4073 : flags used in final linking phase
4075 '') if ./venix; then
4081 *-posix*) dflt="$dflt -posix" ;;
4084 *) dflt="$ldflags";;
4087 : Try to guess additional flags to pick up local libraries.
4088 for thislibdir in $libpth; do
4089 case " $loclibpth " in
4092 *"-L$thislibdir "*) ;;
4093 *) dflt="$dflt -L$thislibdir" ;;
4105 Your C linker may need flags. For this question you should
4106 include -L/whatever and any other flags used by the C linker, but you
4107 should NOT include libraries like -lwhatever.
4109 Make sure you include the appropriate -L/path flags if your C linker
4110 does not normally search all of the directories you specified above,
4113 To use no flags, specify the word "none".
4117 rp="Any additional ld flags (NOT including libraries)?"
4123 rmlist="$rmlist pdp11"
4127 echo "Checking your choice of C compiler and flags for coherency..." >&4
4128 $cat > try.c <<'EOF'
4130 int main() { printf("Ok\n"); exit(0); }
4132 set X $cc -o try $optimize $ccflags $ldflags try.c $libs
4134 $cat >try.msg <<'EOM'
4135 I've tried to compile and run the following simple program:
4138 $cat try.c >> try.msg
4140 $cat >> try.msg <<EOM
4147 and I got the following output:
4151 if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
4152 if $sh -c './try' >>try.msg 2>&1; then
4156 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4159 cat >> try.msg <<'EOQS'
4160 If $libs contains -lsfio, and sfio is mis-configured, then it
4161 sometimes (apparently) runs and exits with a 0 status, but with no
4162 output! It may have to do with sfio's use of _exit vs. exit.
4165 rp="You have a big problem. Shall I abort Configure"
4172 echo "The program compiled OK, but exited with status $?." >>try.msg
4173 rp="You have a problem. Shall I abort Configure"
4177 echo "I can't compile the test program." >>try.msg
4178 rp="You have a BIG problem. Shall I abort Configure"
4184 case "$knowitall" in
4186 echo "(The supplied flags or libraries might be incorrect.)"
4194 *) echo "Ok. Stopping Configure." >&4
4199 n) echo "OK, that should do.";;
4201 $rm -f try try.* core
4203 : define an is-a-typedef? function
4204 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
4206 "") inclist="sys/types.h";;
4208 eval "varval=\$$var";
4212 for inc in $inclist; do
4213 echo "#include <$inc>" >>temp.c;
4215 echo "#ifdef $type" >> temp.c;
4216 echo "printf(\"We have $type\");" >> temp.c;
4217 echo "#endif" >> temp.c;
4218 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
4219 if $contains $type temp.E >/dev/null 2>&1; then
4225 *) eval "$var=\$varval";;
4228 : define an is-a-typedef? function that prompts if the type is not available.
4229 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
4231 "") inclist="sys/types.h";;
4233 eval "varval=\$$var";
4237 for inc in $inclist; do
4238 echo "#include <$inc>" >>temp.c;
4240 echo "#ifdef $type" >> temp.c;
4241 echo "printf(\"We have $type\");" >> temp.c;
4242 echo "#endif" >> temp.c;
4243 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
4245 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
4246 if $contains $type temp.E >/dev/null 2>&1; then
4247 echo "$type found." >&4;
4250 echo "$type NOT found." >&4;
4256 *) eval "$var=\$varval";;
4259 : define a shorthand compile call
4263 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
4264 : define a shorthand compile call for compilations that should be ok.
4268 $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
4270 : check for lengths of integral types
4274 echo "Checking to see how big your integers are..." >&4
4275 $cat >intsize.c <<'EOCP'
4279 printf("intsize=%d;\n", (int)sizeof(int));
4280 printf("longsize=%d;\n", (int)sizeof(long));
4281 printf("shortsize=%d;\n", (int)sizeof(short));
4286 if eval $compile_ok && ./intsize > /dev/null; then
4288 echo "Your integers are $intsize bytes long."
4289 echo "Your long integers are $longsize bytes long."
4290 echo "Your short integers are $shortsize bytes long."
4294 Help! I can't compile and run the intsize test program: please enlighten me!
4295 (This is probably a misconfiguration in your system or libraries, and
4296 you really ought to fix it. Still, I'll try anyway.)
4300 rp="What is the size of an integer (in bytes)?"
4304 rp="What is the size of a long integer (in bytes)?"
4308 rp="What is the size of a short integer (in bytes)?"
4314 $rm -f intsize intsize.*
4316 : see what type lseek is declared as in the kernel
4317 rp="What is the type used for lseek's offset on this system?"
4318 set off_t lseektype long stdio.h sys/types.h
4322 echo "Checking to see how big your file offsets are..." >&4
4324 #include <sys/types.h>
4328 printf("%d\n", (int)sizeof($lseektype));
4333 if eval $compile_ok; then
4335 echo "Your file offsets are $lseeksize bytes long."
4339 echo "(I can't seem to compile the test program. Guessing...)"
4340 rp="What is the size of your file offsets (in bytes)?"
4346 : see what type file positions are declared as in the library
4347 rp="What is the type for file position used by fsetpos()?"
4348 set fpos_t fpostype long stdio.h sys/types.h
4353 *_t) zzz="$fpostype" ;;
4356 echo "Checking the size of $zzz..." >&4
4358 #include <sys/types.h>
4361 printf("%d\n", (int)sizeof($fpostype));
4366 if eval $compile_ok; then
4370 echo "(I can't execute the test program--guessing $fpossize.)" >&4
4373 echo "Your $zzz is $fpossize bytes long."
4379 echo "(I can't compile the test program. Guessing...)" >&4
4380 rp="What is the size of your file positions (in bytes)?"
4387 # Backward compatibility (uselfs is deprecated).
4389 "$define"|true|[yY]*)
4392 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
4394 uselargefiles="$define"
4398 case "$lseeksize:$fpossize" in
4401 You can have files larger than 2 gigabytes.
4404 *) case "$uselargefiles" in
4405 "$undef"|false|[nN]*) dflt='n' ;;
4410 Perl can be built to understand large files (files larger than 2 gigabytes)
4411 on some systems. To do so, Configure can be run with -Duselargefiles.
4413 If this doesn't make any sense to you, just accept the default '$dflt'.
4415 rp='Try to understand large files, if available?'
4418 y|Y) val="$define" ;;
4425 case "$uselargefiles" in
4427 : Look for a hint-file generated 'call-back-unit'. If the
4428 : user has specified that a large files perl is to be built,
4429 : we may need to set or change some other defaults.
4430 if $test -f uselargefiles.cbu; then
4431 echo "Your platform has some specific hints for large file builds, using them..."
4432 . ./uselargefiles.cbu
4434 echo "Rechecking to see how big your file offsets are..." >&4
4436 #include <sys/types.h>
4440 printf("%d\n", (int)sizeof($lseektype));
4445 if eval $compile_ok; then
4447 $echo "Your file offsets are now $lseeksize bytes long."
4451 echo "(I can't seem to compile the test program. Guessing...)"
4452 rp="What is the size of your file offsets (in bytes)?"
4457 *_t) zzz="$fpostype" ;;
4460 $echo $n "Rechecking the size of $zzz...$c" >&4
4462 #include <sys/types.h>
4465 printf("%d\n", (int)sizeof($fpostype));
4470 if eval $compile_ok; then
4475 echo "(I can't execute the test program--guessing $fpossize.)" >&4
4478 echo " $fpossize bytes." >&4
4484 echo "(I can't compile the test program. Guessing...)" >&4
4485 rp="What is the size of your file positions (in bytes)?"
4495 case "$usemorebits" in
4496 "$define"|true|[yY]*)
4497 use64bitint="$define"
4498 uselongdouble="$define"
4499 usemorebits="$define"
4501 *) usemorebits="$undef"
4506 case "$uselonglong" in
4507 "$define"|true|[yY]*)
4510 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
4512 use64bitint="$define"
4515 case "$use64bits" in
4516 "$define"|true|[yY]*)
4519 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
4521 use64bitint="$define"
4524 case "$use64bitints" in
4525 "$define"|true|[yY]*)
4528 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
4530 use64bitint="$define"
4533 case "$use64bitsint" in
4534 "$define"|true|[yY]*)
4537 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
4539 use64bitint="$define"
4542 case "$uselonglongs" in
4543 "$define"|true|[yY]*)
4546 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
4548 use64bitint="$define"
4551 case "$use64bitsall" in
4552 "$define"|true|[yY]*)
4555 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
4557 use64bitall="$define"
4562 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
4564 case "$use64bitall" in
4565 "$define"|true|[yY]*) use64bitint="$define" ;;
4571 You have natively 64-bit long integers.
4575 *) case "$use64bitint" in
4576 "$define"|true|[yY]*) dflt='y';;
4581 Perl can be built to take advantage of 64-bit integer types
4582 on some systems. To do so, Configure can be run with -Duse64bitint.
4583 Choosing this option will most probably introduce binary incompatibilities.
4585 If this doesn't make any sense to you, just accept the default '$dflt'.
4587 rp='Try to use 64-bit integers, if available?'
4590 [yY]*) val="$define" ;;
4598 case "$use64bitall" in
4599 "$define"|true|[yY]*) dflt='y' ;;
4600 *) case "$longsize" in
4608 You may also choose to try maximal 64-bitness. It means using as much
4609 64-bitness as possible on the platform. This in turn means even more
4610 binary incompatibilities. On the other hand, your platform may not
4611 have any more 64-bitness available than what you already have chosen.
4613 If this doesn't make any sense to you, just accept the default '$dflt'.
4615 rp='Try to use maximal 64-bit support, if available?'
4618 [yY]*) val="$define" ;;
4623 case "$use64bitall" in
4625 case "$use64bitint" in
4629 Since you have chosen a maximally 64-bit build, I'm also turning on
4630 the use of 64-bit integers.
4632 use64bitint="$define" ;;
4637 case "$use64bitint" in
4638 "$define"|true|[yY]*)
4639 : Look for a hint-file generated 'call-back-unit'. If the
4640 : user has specified that a 64-bit perl is to be built,
4641 : we may need to set or change some other defaults.
4642 if $test -f use64bitint.cbu; then
4643 echo "Your platform has some specific hints for 64-bit integers, using them..."
4647 4) case "$archname64" in
4648 '') archname64=64int ;;
4655 case "$use64bitall" in
4656 "$define"|true|[yY]*)
4657 : Look for a hint-file generated 'call-back-unit'. If the
4658 : user has specified that a maximally 64-bit perl is to be built,
4659 : we may need to set or change some other defaults.
4660 if $test -f use64bitall.cbu; then
4661 echo "Your platform has some specific hints for 64-bit builds, using them..."
4665 4) case "$archname64" in
4666 ''|64int) archname64=64all ;;
4674 echo "Checking for GNU C Library..." >&4
4675 cat >gnulibc.c <<EOM
4687 if eval $compile_ok && ./gnulibc; then
4689 echo "You are using the GNU C Library"
4692 echo "You are not using the GNU C Library"
4698 : see if nm is to be used to determine whether a symbol is defined or not
4702 case "$d_gnulibc" in
4705 echo "nm probably won't work on the GNU C Library." >&4
4711 if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
4713 echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
4714 echo "'nm' won't be sufficient on this sytem." >&4
4720 '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
4721 if $test $dflt -gt 20; then
4731 true|$define) dflt=y;;
4738 I can use $nm to extract the symbols from your C libraries. This
4739 is a time consuming task which may generate huge output on the disk (up
4740 to 3 megabytes) but that should make the symbols extraction faster. The
4741 alternative is to skip the 'nm' extraction part and to compile a small
4742 test program instead to determine whether each symbol is present. If
4743 you have a fast C compiler and/or if your 'nm' output cannot be parsed,
4744 this may be the best solution.
4746 You probably shouldn't let me use 'nm' if you are using the GNU C Library.
4749 rp="Shall I use $nm to extract C symbols from the libraries?"
4752 [Nn]*) usenm=false;;
4761 : nm options which may be necessary
4763 '') if $test -f /mach_boot; then
4765 elif $test -d /usr/ccs/lib; then
4766 nm_opt='-p' # Solaris (and SunOS?)
4767 elif $test -f /dgux; then
4769 elif $test -f /lib64/rld; then
4770 nm_opt='-p' # 64-bit Irix
4776 : nm options which may be necessary for shared libraries but illegal
4777 : for archive libraries. Thank you, Linux.
4778 case "$nm_so_opt" in
4779 '') case "$myuname" in
4781 if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
4782 nm_so_opt='--dynamic'
4791 : get list of predefined functions in a handy place
4796 *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
4803 *) for thislib in $libs; do
4806 : Handle C library specially below.
4809 thislib=`echo $thislib | $sed -e 's/^-l//'`
4810 if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
4812 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
4814 elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
4816 elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
4818 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
4820 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
4822 elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
4827 libnames="$libnames $try"
4829 *) libnames="$libnames $thislib" ;;
4838 for xxx in $libpth; do
4839 $test -r $1 || set $xxx/libc.$so
4840 : The messy sed command sorts on library version numbers.
4842 set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
4843 tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
4845 s/[0-9][0-9]*/0000&/g
4846 s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
4849 $sort | $sed -e 's/^.* //'`
4852 $test -r $1 || set /usr/ccs/lib/libc.$so
4853 $test -r $1 || set /lib/libsys_s$_a
4859 if $test -r "$1"; then
4860 echo "Your (shared) C library seems to be in $1."
4862 elif $test -r /lib/libc && $test -r /lib/clib; then
4863 echo "Your C library seems to be in both /lib/clib and /lib/libc."
4865 libc='/lib/clib /lib/libc'
4866 if $test -r /lib/syslib; then
4867 echo "(Your math library is in /lib/syslib.)"
4868 libc="$libc /lib/syslib"
4870 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
4871 echo "Your C library seems to be in $libc, as you said before."
4872 elif $test -r $incpath/usr/lib/libc$_a; then
4873 libc=$incpath/usr/lib/libc$_a;
4874 echo "Your C library seems to be in $libc. That's fine."
4875 elif $test -r /lib/libc$_a; then
4877 echo "Your C library seems to be in $libc. You're normal."
4879 if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
4881 elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
4882 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
4883 elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
4885 elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
4887 elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
4890 tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
4892 if $test -r "$tans"; then
4893 echo "Your C library seems to be in $tans, of all places."
4899 if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
4903 If the guess above is wrong (which it might be if you're using a strange
4904 compiler, or your machine supports multiple models), you can override it here.
4909 echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
4911 I can't seem to find your C library. I've looked in the following places:
4914 $sed 's/^/ /' libpath
4917 None of these seems to contain your C library. I need to get its name...
4922 rp='Where is your C library?'
4927 echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
4928 set X `cat libnames`
4931 case $# in 1) xxx=file; esac
4932 echo "Extracting names from the following $xxx for later perusal:" >&4
4934 $sed 's/^/ /' libnames >&4
4936 $echo $n "This may take a while...$c" >&4
4940 *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
4941 *) $nm $nm_opt $file 2>/dev/null;;
4946 $grep fprintf libc.tmp > libc.ptf
4947 xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
4948 xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
4950 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
4952 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4954 elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
4956 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4958 elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
4960 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4962 elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
4964 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4966 elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
4968 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4970 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
4972 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4974 elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
4975 -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
4977 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4979 elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
4981 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4983 elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
4985 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4987 elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
4989 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4991 elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
4993 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4995 elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
4997 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
4999 elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
5001 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5003 elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
5005 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
5008 $nm -p $* 2>/dev/null >libc.tmp
5009 $grep fprintf libc.tmp > libc.ptf
5010 if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
5011 eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
5017 echo "$nm didn't seem to work right. Trying $ar instead..." >&4
5019 if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
5020 for thisname in $libnames $libc; do
5021 $ar t $thisname >>libc.tmp
5023 $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
5025 elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
5026 # Repeat libc to extract forwarders to DLL entries too
5027 for thisname in $libnames $libc; do
5028 $ar tv $thisname >>libc.tmp
5029 # Revision 50 of EMX has bug in $ar.
5030 # it will not extract forwarders to DLL entries
5031 # Use emximp which will extract exactly them.
5032 emximp -o tmp.imp $thisname \
5034 $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
5035 < tmp.imp >>libc.tmp
5038 $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
5041 echo "$ar didn't seem to work right." >&4
5042 echo "Maybe this is a Cray...trying bld instead..." >&4
5043 if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
5045 for thisname in $libnames; do
5047 $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
5048 $ar t $thisname >>libc.tmp
5052 echo "That didn't work either. Giving up." >&4
5059 if $test -f /lib/syscalls.exp; then
5061 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
5062 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*$/\1/p' /lib/syscalls.exp >>libc.list
5066 $rm -f libnames libpath
5068 : is a C symbol defined?
5071 -v) tf=libc.tmp; tc=""; tdc="";;
5072 -a) tf=libc.tmp; tc="[0]"; tdc="[]";;
5073 *) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
5076 case "$reuseval-$4" in
5078 true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
5084 if $contains $tlook $tf >/dev/null 2>&1;
5089 echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
5090 if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1;
5098 $define) tval=true;;
5104 : define an is-in-libc? function
5105 inlibc='echo " "; td=$define; tu=$undef;
5106 sym=$1; var=$2; eval "was=\$$2";
5108 case "$reuseval$was" in
5118 echo "$sym() found." >&4;
5119 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
5121 echo "$sym() NOT found." >&4;
5122 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
5126 $define) echo "$sym() found." >&4;;
5127 *) echo "$sym() NOT found." >&4;;
5131 : see if sqrtl exists
5136 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
5139 case "$uselongdouble" in
5140 $define|true|[yY]*) dflt='y';;
5145 Perl can be built to take advantage of long doubles which
5146 (if available) may give more accuracy and range for floating point numbers.
5148 If this doesn't make any sense to you, just accept the default '$dflt'.
5150 rp='Try to use long doubles if available?'
5153 y|Y) val="$define" ;;
5159 case "$uselongdouble" in
5160 true|[yY]*) uselongdouble="$define" ;;
5163 case "$uselongdouble" in
5165 : Look for a hint-file generated 'call-back-unit'. If the
5166 : user has specified that long doubles should be used,
5167 : we may need to set or change some other defaults.
5168 if $test -f uselongdouble.cbu; then
5169 echo "Your platform has some specific hints for long doubles, using them..."
5170 . ./uselongdouble.cbu
5173 (Your platform doesn't have any specific hints for long doubles.)
5179 case "$uselongdouble:$d_sqrtl" in
5183 *** You requested the use of long doubles but you do not seem to have
5184 *** the mathematic functions for long doubles. I'm disabling the use
5185 *** of long doubles.
5188 uselongdouble=$undef
5192 : check for length of double
5194 case "$doublesize" in
5196 echo "Checking to see how big your double precision numbers are..." >&4
5197 $cat >try.c <<'EOCP'
5201 printf("%d\n", (int)sizeof(double));
5206 if eval $compile_ok; then
5208 echo "Your double is $doublesize bytes long."
5211 echo "(I can't seem to compile the test program. Guessing...)"
5212 rp="What is the size of a double precision number (in bytes)?"
5220 : check for long doubles
5222 echo "Checking to see if you have long double..." >&4
5223 echo 'int main() { long double x = 7.0; }' > try.c
5225 if eval $compile; then
5227 echo "You have long double."
5230 echo "You do not have long double."
5236 : check for length of long double
5237 case "${d_longdbl}${longdblsize}" in
5240 echo "Checking to see how big your long doubles are..." >&4
5241 $cat >try.c <<'EOCP'
5245 printf("%d\n", sizeof(long double));
5250 if eval $compile; then
5251 longdblsize=`./try$exe_ext`
5252 echo "Your long doubles are $longdblsize bytes long."
5256 echo "(I can't seem to compile the test program. Guessing...)" >&4
5257 rp="What is the size of a long double (in bytes)?"
5261 if $test "X$doublesize" = "X$longdblsize"; then
5262 echo "(That isn't any different from an ordinary double.)"
5268 : determine the architecture name
5270 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
5271 tarch=`arch`"-$osname"
5272 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
5273 if uname -m > tmparch 2>&1 ; then
5274 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
5275 -e 's/$/'"-$osname/" tmparch`
5283 case "$myarchname" in
5286 echo "(Your architecture name used to be $myarchname.)"
5293 *) dflt="$archname";;
5295 rp='What is your architecture name'
5298 case "$usethreads" in
5300 echo "Threads selected." >&4
5302 *-thread*) echo "...and architecture name already has -thread." >&4
5304 *) archname="$archname-thread"
5305 echo "...setting architecture name to $archname." >&4
5310 case "$usemultiplicity" in
5312 echo "Multiplicity selected." >&4
5314 *-multi*) echo "...and architecture name already has -multi." >&4
5316 *) archname="$archname-multi"
5317 echo "...setting architecture name to $archname." >&4
5322 case "$use64bitint$use64bitall" in
5324 case "$archname64" in
5326 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
5329 case "$use64bitint" in
5330 "$define") echo "64 bit integers selected." >&4 ;;
5332 case "$use64bitall" in
5333 "$define") echo "Maximal 64 bitness selected." >&4 ;;
5336 *-$archname64*) echo "...and architecture name already has $archname64." >&4
5338 *) archname="$archname-$archname64"
5339 echo "...setting architecture name to $archname." >&4
5345 case "$uselongdouble" in
5347 echo "Long doubles selected." >&4
5348 case "$longdblsize" in
5350 "...but long doubles are equal to doubles, not changing architecture name." >&4
5354 *-ld*) echo "...and architecture name already has -ld." >&4
5356 *) archname="$archname-ld"
5357 echo "...setting architecture name to $archname." >&4
5365 : determine root of directory hierarchy where package will be installed.
5368 dflt=`./loc . /usr/local /usr/local /local /opt /usr`
5376 By default, $package will be installed in $dflt/bin, manual pages
5377 under $dflt/man, etc..., i.e. with $dflt as prefix for all
5378 installation directories. Typically this is something like /usr/local.
5379 If you wish to have binaries under /usr/bin but other parts of the
5380 installation under /usr/local, that's ok: you will be prompted
5381 separately for each of the installation directories, the prefix being
5382 only used to set the defaults.
5386 rp='Installation prefix to use?'
5394 *) oldprefix="$prefix";;
5404 $define|true) afs=true ;;
5405 $undef|false) afs=false ;;
5406 *) if test -d /afs; then
5414 echo "AFS may be running... I'll be extra cautious then..." >&4
5416 echo "AFS does not seem to be running..." >&4
5419 : determine installation prefix for where package is to be installed.
5423 Since you are running AFS, I need to distinguish the directory in which
5424 files will reside from the directory in which they are installed (and from
5425 which they are presumably copied to the former directory by occult means).
5428 case "$installprefix" in
5429 '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;;
5430 *) dflt="$installprefix";;
5435 In some special cases, particularly when building $package for distribution,
5436 it is convenient to distinguish between the directory in which files should
5437 be installed from the directory ($prefix) in which they
5438 will eventually reside. For most users, these two directories are the same.
5441 case "$installprefix" in
5443 *) dflt=$installprefix;;
5447 rp='What installation prefix should I use for installing files?'
5449 installprefix="$ans"
5450 installprefixexp="$ansexp"
5452 : set the prefixit variable, to compute a suitable default value
5453 prefixit='case "$3" in
5455 case "$oldprefix" in
5456 "") eval "$1=\"\$$2\"";;
5463 ""|" ") eval "$1=\"\$$2\"";;
5469 eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
5471 --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
5472 /*-$oldprefix/*|\~*-$oldprefix/*)
5473 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
5474 *) eval "$1=\"\$$2\"";;
5479 : get the patchlevel
5481 echo "Getting the current patchlevel..." >&4
5482 if $test -r $rsrc/patchlevel.h;then
5483 revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
5484 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
5485 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
5486 api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
5487 api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
5488 api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
5497 $echo "(You have $package version $patchlevel subversion $subversion.)"
5500 : XXX Should be a Configure test for double-dots in filenames.
5501 version=`echo $revision $patchlevel $subversion | \
5502 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
5503 api_versionstring=`echo $api_revision $api_version $api_subversion | \
5504 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
5507 version=`echo $revision $patchlevel $subversion | \
5508 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
5509 api_versionstring=`echo $api_revision $api_version $api_subversion | \
5510 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
5513 : Special case the 5.005_xx maintenance series, which used 5.005
5514 : without any subversion label as a subdirectory in $sitelib
5515 if test "${api_revision}${api_version}${api_subversion}" = "550"; then
5516 api_versionstring='5.005'
5519 : determine installation style
5520 : For now, try to deduce it from prefix unless it is already set.
5521 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
5522 case "$installstyle" in
5523 '') case "$prefix" in
5524 *perl*) dflt='lib';;
5525 *) dflt='lib/perl5' ;;
5528 *) dflt="$installstyle" ;;
5530 : Probably not worth prompting for this since we prompt for all
5531 : the directories individually, and the prompt would be too long and
5535 : determine where private library files go
5536 : Usual default is /usr/local/lib/perl5/$version.
5537 : Also allow things like /opt/perl/lib/$version, since
5538 : /opt/perl/lib/perl5... would be redundant.
5539 : The default "style" setting is made in installstyle.U
5540 case "$installstyle" in
5541 *lib/perl5*) set dflt privlib lib/$package/$version ;;
5542 *) set dflt privlib lib/$version ;;
5547 There are some auxiliary files for $package that need to be put into a
5548 private library directory that is accessible by everyone.
5552 rp='Pathname where the private library files will reside?'
5555 privlibexp="$ansexp"
5556 : Change installation prefix, if necessary.
5557 if $test X"$prefix" != X"$installprefix"; then
5558 installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
5560 installprivlib="$privlibexp"
5563 : set the prefixup variable, to restore leading tilda escape
5564 prefixup='case "$prefixexp" in
5566 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
5569 : determine where public architecture dependent libraries go
5572 : privlib default is /usr/local/lib/$package/$version
5573 : archlib default is /usr/local/lib/$package/$version/$archname
5574 : privlib may have an optional trailing /share.
5575 tdflt=`echo $privlib | $sed 's,/share$,,'`
5576 tdflt=$tdflt/$archname
5585 $spackage contains architecture-dependent library files. If you are
5586 sharing libraries in a heterogeneous environment, you might store
5587 these files in a separate location. Otherwise, you can just include
5588 them with the rest of the public library files.
5592 rp='Where do you want to put the public architecture-dependent libraries?'
5595 archlibexp="$ansexp"
5596 if $test X"$archlib" = X"$privlib"; then
5601 : Change installation prefix, if necessary.
5602 if $test X"$prefix" != X"$installprefix"; then
5603 installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
5605 installarchlib="$archlibexp"
5609 : Binary compatibility with 5.005 is not possible for builds
5610 : with advanced features
5611 case "$usethreads$usemultiplicity" in
5613 bincompat5005="$undef"
5614 d_bincompat5005="$undef"
5618 This version of Perl can be compiled for binary compatibility with 5.005.
5619 If you decide to do so, you will be able to continue using most of the
5620 extensions that were compiled for Perl 5.005.
5623 case "$bincompat5005$d_bincompat5005" in
5624 *"$undef"*) dflt=n ;;
5627 rp='Binary compatibility with Perl 5.005?'
5630 y*) val="$define" ;;
5635 case "$d_bincompat5005" in
5637 bincompat5005="$define"
5639 *) bincompat5005="$undef"
5640 d_bincompat5005="$undef"
5647 : see if setuid scripts can be secure
5650 Some kernels have a bug that prevents setuid #! scripts from being
5651 secure. Some sites have disabled setuid #! scripts because of this.
5653 First let's decide if your kernel supports secure setuid #! scripts.
5654 (If setuid #! scripts would be secure but have been disabled anyway,
5655 don't say that they are secure if asked.)
5660 if $test -d /dev/fd; then
5661 echo "#!$ls" >reflect
5662 chmod +x,u+s reflect
5663 ./reflect >flect 2>&1
5664 if $contains "/dev/fd" flect >/dev/null; then
5665 echo "Congratulations, your kernel has secure setuid scripts!" >&4
5669 If you are not sure if they are secure, I can check but I'll need a
5670 username and password different from the one you are using right now.
5671 If you don't have such a username or don't want me to test, simply
5675 rp='Other username to test security of setuid scripts with?'
5680 case "$d_suidsafe" in
5681 '') echo "I'll assume setuid scripts are *not* secure." >&4
5684 echo "Well, the $hint value is *not* secure." >&4
5686 *) echo "Well, the $hint value *is* secure." >&4
5691 $rm -f reflect flect
5692 echo "#!$ls" >reflect
5693 chmod +x,u+s reflect
5696 echo '"su" will (probably) prompt you for '"$ans's password."
5697 su $ans -c './reflect >flect'
5698 if $contains "/dev/fd" flect >/dev/null; then
5699 echo "Okay, it looks like setuid scripts are secure." >&4
5702 echo "I don't think setuid scripts are secure." >&4
5707 rp='Does your kernel have *secure* setuid scripts?'
5710 [yY]*) val="$define";;
5715 echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
5716 echo "(That's for file descriptors, not floppy disks.)"
5722 $rm -f reflect flect
5724 : now see if they want to do setuid emulation
5727 case "$d_suidsafe" in
5730 echo "No need to emulate SUID scripts since they are secure here." >& 4
5734 Some systems have disabled setuid scripts, especially systems where
5735 setuid scripts cannot be secure. On systems where setuid scripts have
5736 been disabled, the setuid/setgid bits on scripts are currently
5737 useless. It is possible for $package to detect those bits and emulate
5738 setuid/setgid in a secure fashion. This emulation will only work if
5739 setuid scripts have been disabled in your kernel.
5743 "$define") dflt=y ;;
5746 rp="Do you want to do setuid/setgid emulation?"
5749 [yY]*) val="$define";;
5757 : determine filename position in cpp output
5759 echo "Computing filename position in cpp output for #include directives..." >&4
5760 echo '#include <stdio.h>' > foo.c
5763 $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
5764 $grep '^[ ]*#.*stdio\.h' | \
5765 while read cline; do
5768 while $test \$# -gt 0; do
5769 if $test -r \`echo \$1 | $tr -d '"'\`; then
5774 pos=\`expr \$pos + 1\`
5786 *) pos="${fieldn}th";;
5788 echo "Your cpp writes the filename in the $pos field of the line."
5790 : locate header file
5795 for usrincdir in $usrinc
5797 if test -f \$usrincdir/\$wanted; then
5798 echo "\$usrincdir/\$wanted"
5802 awkprg='{ print \$$fieldn }'
5803 echo "#include <\$wanted>" > foo\$\$.c
5804 $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
5805 $grep "^[ ]*#.*\$wanted" | \
5806 while read cline; do
5807 name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
5809 *[/\\\\]\$wanted) echo "\$name"; exit 1;;
5810 *[\\\\/]\$wanted) echo "\$name"; exit 1;;
5815 # status = 0: grep returned 0 lines, case statement not executed
5816 # status = 1: headerfile found
5817 # status = 2: while loop executed, no headerfile found
5821 if test \$status -eq 1; then
5828 : define an alternate in-header-list? function
5829 inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
5830 cont=true; xxf="echo \"<\$1> found.\" >&4";
5831 case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
5832 *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
5834 case $# in 4) instead=instead;; *) instead="at last";; esac;
5835 while $test "$cont"; do
5837 var=$2; eval "was=\$$2";
5838 if $test "$xxx" && $test -r "$xxx";
5840 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
5843 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
5844 set $yyy; shift; shift; yyy=$@;
5845 case $# in 0) cont="";;
5846 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
5847 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
5848 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
5849 xxnf="echo \"there is no <\$1>, ...\" >&4";;
5853 do set $yyy; var=$2; eval "was=\$$2";
5854 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
5855 set $yyy; shift; shift; yyy=$@;
5858 : see if this is a malloc.h system
5859 set malloc.h i_malloc
5862 : see if stdlib is available
5863 set stdlib.h i_stdlib
5866 : determine which malloc to compile in
5868 case "$usemymalloc" in
5869 ''|[yY]*|true|$define) dflt='y' ;;
5872 rp="Do you wish to attempt to use the malloc that comes with $package?"
5878 mallocsrc='malloc.c'
5879 mallocobj="malloc$_o"
5880 d_mymalloc="$define"
5883 : Remove malloc from list of libraries to use
5884 echo "Removing unneeded -lmalloc from library list" >&4
5885 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
5888 echo "libs = $libs" >&4
5900 : compute the return types of malloc and free
5902 $cat >malloc.c <<END
5906 #include <sys/types.h>
5920 case "$malloctype" in
5922 if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
5929 echo "Your system wants malloc to return '$malloctype', it would seem." >&4
5933 if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
5940 echo "Your system uses $freetype free(), it would seem." >&4
5944 After $package is installed, you may wish to install various
5945 add-on modules and utilities. Typically, these add-ons will
5946 be installed under $prefix with the rest
5947 of this package. However, you may wish to install such add-ons
5948 elsewhere under a different prefix.
5950 If you do not wish to put everything under a single prefix, that's
5951 ok. You will be prompted for the individual locations; this siteprefix
5952 is only used to suggest the defaults.
5954 The default should be fine for most people.
5958 rp='Installation prefix to use for add-on modules and utilities?'
5959 : XXX Here might be another good place for an installstyle setting.
5960 case "$siteprefix" in
5962 *) dflt=$siteprefix ;;
5965 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
5967 case "$siteprefix" in
5971 *) oldsiteprefix="$prefix";;
5976 siteprefixexp="$ansexp"
5978 : determine where site specific libraries go.
5979 : Usual default is /usr/local/lib/perl5/site_perl/$version
5980 : The default "style" setting is made in installstyle.U
5981 : XXX No longer works with Prefixit stuff.
5982 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
5984 '') case "$installstyle" in
5985 *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
5986 *) dflt=$siteprefix/lib/site_$prog/$version ;;
5994 The installation process will create a directory for
5995 site-specific extensions and modules. Most users find it convenient
5996 to place all site-specific files in this directory rather than in the
5997 main distribution directory.
6001 rp='Pathname for the site-specific library files?'
6004 sitelibexp="$ansexp"
6005 sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
6006 : Change installation prefix, if necessary.
6007 if $test X"$prefix" != X"$installprefix"; then
6008 installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
6010 installsitelib="$sitelibexp"
6013 : determine where site specific architecture-dependent libraries go.
6014 : sitelib default is /usr/local/lib/perl5/site_perl/$version
6015 : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
6016 : sitelib may have an optional trailing /share.
6018 '') dflt=`echo $sitelib | $sed 's,/share$,,'`
6019 dflt="$dflt/$archname"
6024 set sitearch sitearch none
6028 The installation process will also create a directory for
6029 architecture-dependent site-specific extensions and modules.
6033 rp='Pathname for the site-specific architecture-dependent library files?'
6036 sitearchexp="$ansexp"
6037 : Change installation prefix, if necessary.
6038 if $test X"$prefix" != X"$installprefix"; then
6039 installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
6041 installsitearch="$sitearchexp"
6046 The installation process will also create a directory for
6047 vendor-supplied add-ons. Vendors who supply perl with their system
6048 may find it convenient to place all vendor-supplied files in this
6049 directory rather than in the main distribution directory. This will
6050 ease upgrades between binary-compatible maintenance versions of perl.
6052 Of course you may also use these directories in whatever way you see
6053 fit. For example, you might use them to access modules shared over a
6054 company-wide network.
6056 The default answer should be fine for most people.
6057 This causes further questions about vendor add-ons to be skipped
6058 and no vendor-specific directories will be configured for perl.
6061 rp='Do you want to configure vendor-specific add-on directories?'
6062 case "$usevendorprefix" in
6063 define|true|[yY]*) dflt=y ;;
6064 *) : User may have set vendorprefix directly on Configure command line.
6065 case "$vendorprefix" in
6074 rp='Installation prefix to use for vendor-supplied add-ons?'
6075 case "$vendorprefix" in
6077 *) dflt=$vendorprefix ;;
6080 : XXX Prefixit unit does not yet support siteprefix and vendorprefix
6082 case "$vendorprefix" in
6086 *) oldvendorprefix="$prefix";;
6090 usevendorprefix="$define"
6092 vendorprefixexp="$ansexp"
6094 *) usevendorprefix="$undef"
6100 case "$vendorprefix" in
6101 '') d_vendorlib="$undef"
6105 *) d_vendorlib="$define"
6106 : determine where vendor-supplied modules go.
6107 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
6108 case "$vendorlib" in
6110 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
6111 case "$installstyle" in
6112 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
6113 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
6116 *) dflt="$vendorlib"
6120 rp='Pathname for the vendor-supplied library files?'
6123 vendorlibexp="$ansexp"
6126 vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
6127 : Change installation prefix, if necessary.
6128 if $test X"$prefix" != X"$installprefix"; then
6129 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
6131 installvendorlib="$vendorlibexp"
6134 case "$vendorprefix" in
6135 '') d_vendorarch="$undef"
6139 *) d_vendorarch="$define"
6140 : determine where vendor-supplied architecture-dependent libraries go.
6141 : vendorlib default is /usr/local/lib/perl5/vendor_perl/$version
6142 : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
6143 : vendorlib may have an optional trailing /share.
6144 case "$vendorarch" in
6145 '') dflt=`echo $vendorlib | $sed 's,/share$,,'`
6146 dflt="$dflt/$archname"
6148 *) dflt="$vendorarch" ;;
6151 rp='Pathname for vendor-supplied architecture-dependent files?'
6154 vendorarchexp="$ansexp"
6157 : Change installation prefix, if necessary.
6158 if $test X"$prefix" != X"$installprefix"; then
6159 installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
6161 installvendorarch="$vendorarchexp"
6164 : Final catch-all directories to search
6167 Lastly, you can have perl look in other directories for extensions and
6168 modules in addition to those already specified.
6169 These directories will be searched after
6173 test X"$vendorlib" != "X" && echo ' ' $vendorlib
6174 test X"$vendorarch" != "X" && echo ' ' $vendorarch
6176 case "$otherlibdirs" in
6177 ''|' ') dflt='none' ;;
6178 *) dflt="$otherlibdirs" ;;
6181 Enter a colon-separated set of extra paths to include in perl's @INC
6182 search path, or enter 'none' for no extra paths.
6186 rp='Colon-separated list of additional directories for perl to search?'
6189 ' '|''|none) otherlibdirs=' ' ;;
6190 *) otherlibdirs="$ans" ;;
6192 case "$otherlibdirs" in
6196 set d_perl_otherlibdirs
6199 : Cruising for prototypes
6201 echo "Checking out function prototypes..." >&4
6202 $cat >prototype.c <<'EOCP'
6203 int main(int argc, char *argv[]) {
6206 if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
6207 echo "Your C compiler appears to support function prototypes."
6210 echo "Your C compiler doesn't seem to understand function prototypes."
6217 case "$prototype" in
6219 *) ansi2knr='ansi2knr'
6224 This version of $package can only be compiled by a compiler that
6225 understands function prototypes. Unfortunately, your C compiler
6227 doesn't seem to understand them. Sorry about that.
6229 If GNU cc is available for your system, perhaps you could try that instead.
6231 Eventually, we hope to support building Perl with pre-ANSI compilers.
6232 If you would like to help in that effort, please contact <perlbug@perl.org>.
6234 Aborting Configure now.
6240 : determine where public executables go
6245 rp='Pathname where the public executables will reside?'
6247 if $test "X$ansexp" != "X$binexp"; then
6252 : Change installation prefix, if necessary.
6253 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
6254 if $test X"$prefix" != X"$installprefix"; then
6255 installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
6257 installbin="$binexp"
6260 : Find perl5.005 or later.
6261 echo "Looking for a previously installed perl5.005 or later... "
6263 '') for tdir in `echo "$binexp:$PATH" | $sed "s/$path_sep/ /g"`; do
6264 : Check if this perl is recent and can load a simple module
6265 if $test -x $tdir/perl && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6268 elif $test -x $tdir/perl5 && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
6278 '') echo "None found. That's ok.";;
6279 *) echo "Using $perl5." ;;
6282 : Determine list of previous versions to include in @INC
6283 $cat > getverlist <<EOPL
6286 \$api_versionstring = "$api_versionstring";
6287 \$version = "$version";
6288 \$stem = "$sitelib_stem";
6289 \$archname = "$archname";
6291 $cat >> getverlist <<'EOPL'
6292 # Can't have leading @ because metaconfig interprets it as a command!
6293 ;@inc_version_list=();
6294 # XXX Redo to do opendir/readdir?
6297 ;@candidates = glob("5.*");
6303 # XXX ToDo: These comparisons must be reworked when two-digit
6304 # subversions come along, so that 5.7.10 compares as greater than
6305 # 5.7.3! By that time, hope that 5.6.x is sufficiently
6306 # widespread that we can use the built-in version vectors rather
6307 # than reinventing them here. For 5.6.0, however, we must
6308 # assume this script will likely be run by 5.005_0x. --AD 1/2000.
6309 foreach $d (@candidates) {
6310 if ($d lt $version) {
6311 if ($d ge $api_versionstring) {
6312 unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
6314 elsif ($d ge "5.005") {
6315 unshift(@inc_version_list, grep { -d } $d);
6319 # Skip newer version. I.e. don't look in
6320 # 5.7.0 if we're installing 5.6.1.
6324 if (@inc_version_list) {
6325 print join(' ', @inc_version_list);
6328 # Blank space to preserve value for next Configure run.
6333 case "$inc_version_list" in
6334 '') if test -x "$perl5"; then
6335 dflt=`$perl5 getverlist`
6340 $undef) dflt='none' ;;
6341 *) dflt="$inc_version_list" ;;
6344 ''|' ') dflt=none ;;
6347 5.005) case "$bincompat5005" in
6348 $define|true|[yY]*) ;;
6355 In order to ease the process of upgrading, this version of perl
6356 can be configured to use modules built and installed with earlier
6357 versions of perl that were installed under $prefix. Specify here
6358 the list of earlier versions that this version of perl should check.
6359 If Configure detected no earlier versions of perl installed under
6360 $prefix, then the list will be empty. Answer 'none' to tell perl
6361 to not search earlier versions.
6363 The default should almost always be sensible, so if you're not sure,
6364 just accept the default.
6367 rp='List of earlier versions to include in @INC?'
6370 [Nn]one|''|' ') inc_version_list=' ' ;;
6371 *) inc_version_list="$ans" ;;
6373 case "$inc_version_list" in
6375 inc_version_list_init='0';;
6376 *) inc_version_list_init=`echo $inc_version_list |
6377 $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
6382 : determine whether to install perl also as /usr/bin/perl
6385 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
6387 Many scripts expect perl to be installed as /usr/bin/perl.
6388 I can install the perl you are about to compile also as /usr/bin/perl
6389 (in addition to $installbin/perl).
6391 case "$installusrbinperl" in
6392 "$undef"|[nN]*) dflt='n';;
6395 rp="Do you want to install perl as /usr/bin/perl?"
6398 [yY]*) val="$define";;
6404 set installusrbinperl
6407 : see if dld is available
6411 : see if dlopen exists
6418 : determine which dynamic loading, if any, to compile in
6420 dldir="ext/DynaLoader"
6433 $define) dflt='y' ;;
6436 $define) dflt='y' ;;
6438 : Does a dl_xxx.xs file exist for this operating system
6439 $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
6442 rp="Do you wish to use dynamic loading?"
6449 if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
6450 dflt="$dldir/dl_${osname}.xs"
6451 elif $test "$d_dlopen" = "$define" ; then
6452 dflt="$dldir/dl_dlopen.xs"
6453 elif $test "$i_dld" = "$define" ; then
6454 dflt="$dldir/dl_dld.xs"
6459 *) dflt="$dldir/$dlsrc"
6462 echo "The following dynamic loading files are available:"
6463 : Can not go over to $dldir because getfile has path hard-coded in.
6464 tdir=`pwd`; cd $rsrc; $ls -C $dldir/dl*.xs; cd $tdir
6465 rp="Source file to use for dynamic loading"
6471 dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
6475 Some systems may require passing special flags to $cc -c to
6476 compile modules that will be used to create a shared library.
6477 To use no flags, say "none".
6480 case "$cccdlflags" in
6481 '') case "$gccversion" in
6482 '') case "$osname" in
6484 next) dflt='none' ;;
6485 irix*) dflt='-KPIC' ;;
6486 svr4*|esix*|solaris|nonstopux) dflt='-KPIC' ;;
6487 sunos) dflt='-pic' ;;
6491 *) case "$osname" in
6492 svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
6497 *) dflt="$cccdlflags" ;;
6499 rp="Any special flags to pass to $cc -c to compile shared library modules?"
6502 none) cccdlflags=' ' ;;
6503 *) cccdlflags="$ans" ;;
6508 Some systems use ld to create libraries that can be dynamically loaded,
6509 while other systems (such as those using ELF) use $cc.
6513 '') $cat >try.c <<'EOM'
6514 /* Test for whether ELF binaries are produced */
6519 int i = open("a.out",O_RDONLY);
6522 if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
6523 exit(0); /* succeed (yes, it's ELF) */
6528 if $cc $ccflags try.c >/dev/null 2>&1 && ./a.out; then
6530 You appear to have ELF support. I'll use $cc to build dynamic libraries.
6534 echo "I'll use ld to build dynamic libraries."
6543 rp="What command should be used to create dynamic libraries?"
6549 Some systems may require passing special flags to $ld to create a
6550 library that can be dynamically loaded. If your ld flags include
6551 -L/other/path options to locate libraries outside your loader's normal
6552 search path, you may need to specify those -L options here as well. To
6553 use no flags, say "none".
6556 case "$lddlflags" in
6557 '') case "$osname" in
6558 beos) dflt='-nostart' ;;
6560 case "$gccversion" in
6561 '') dflt="$dflt +vnocompatwarnings" ;;
6564 linux|irix*) dflt='-shared' ;;
6565 next) dflt='none' ;;
6566 solaris) dflt='-G' ;;
6567 sunos) dflt='-assert nodefinitions' ;;
6568 svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
6572 *) dflt="$lddlflags" ;;
6575 : Try to guess additional flags to pick up local libraries.
6576 : Be careful not to append to a plain 'none'
6580 for thisflag in $ldflags; do
6585 *) dflt="$dflt $thisflag" ;;
6592 ''|' ') dflt='none' ;;
6595 rp="Any special flags to pass to $ld to create a dynamically loaded library?"
6598 none) lddlflags=' ' ;;
6599 *) lddlflags="$ans" ;;
6604 Some systems may require passing special flags to $cc to indicate that
6605 the resulting executable will use dynamic linking. To use no flags,
6609 case "$ccdlflags" in
6610 '') case "$osname" in
6611 hpux) dflt='-Wl,-E' ;;
6612 linux) dflt='-rdynamic' ;;
6613 next) dflt='none' ;;
6614 sunos) dflt='none' ;;
6618 *) dflt="$ccdlflags" ;;
6620 rp="Any special flags to pass to $cc to use dynamic linking?"
6623 none) ccdlflags=' ' ;;
6624 *) ccdlflags="$ans" ;;
6638 # No dynamic loading being used, so don't bother even to prompt.
6641 *) case "$useshrplib" in
6642 '') case "$osname" in
6643 svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
6645 also='Building a shared libperl is required for dynamic loading to work on your system.'
6650 also='Building a shared libperl is needed for MAB support.'
6668 The perl executable is normally obtained by linking perlmain.c with
6669 libperl${_a}, any static extensions (usually just DynaLoader), and
6670 any other libraries needed on this system (such as -lm, etc.). Since
6671 your system supports dynamic loading, it is probably possible to build
6672 a shared libperl.$so. If you will have more than one executable linked
6673 to libperl.$so, this will significantly reduce the size of each
6674 executable, but it may have a noticeable affect on performance. The
6675 default is probably sensible for your system.
6679 rp="Build a shared libperl.$so (y/n)"
6683 useshrplib='true' ;;
6684 *) useshrplib='false' ;;
6689 case "$useshrplib" in
6693 # Figure out a good name for libperl.so. Since it gets stored in
6694 # a version-specific architecture-dependent library, the version
6695 # number isn't really that important, except for making cc/ld happy.
6697 # A name such as libperl.so.3.1
6698 majmin="libperl.$so.$patchlevel.$subversion"
6699 # A name such as libperl.so.301
6700 majonly=`echo $patchlevel $subversion |
6701 $awk '{printf "%d%02d", $1, $2}'`
6702 majonly=libperl.$so.$majonly
6703 # I'd prefer to keep the os-specific stuff here to a minimum, and
6704 # rely on figuring it out from the naming of libc.
6705 case "${osname}${osvers}" in
6708 # XXX How handle the --version stuff for MAB?
6710 linux*) # ld won't link with a bare -lperl otherwise.
6713 cygwin*) # include version
6714 dflt=`echo libperl$version | sed -e 's/\./_/g'`$lib_ext
6716 *) # Try to guess based on whether libc has major.minor.
6718 *libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
6719 *libc.$so.[0-9]*) dflt=$majonly ;;
6720 *) dflt=libperl.$so ;;
6730 I need to select a good name for the shared libperl. If your system uses
6731 library names with major and minor numbers, then you might want something
6732 like $majmin. Alternatively, if your system uses a single version
6733 number for shared libraries, then you might want to use $majonly.
6734 Or, your system might be quite happy with a simple libperl.$so.
6736 Since the shared libperl will get installed into a version-specific
6737 architecture-dependent directory, the version number of the shared perl
6738 library probably isn't important, so the default should be o.k.
6741 rp='What name do you want to give to the shared libperl?'
6744 echo "Ok, I'll use $libperl"
6747 libperl="libperl${_a}"
6751 # Detect old use of shrpdir via undocumented Configure -Dshrpdir
6755 WARNING: Use of the shrpdir variable for the installation location of
6756 the shared $libperl is not supported. It was never documented and
6757 will not work in this version. Let me (perlbug@perl.org)
6758 know of any problems this may cause.
6764 But your current setting of $shrpdir is
6765 the default anyway, so it's harmless.
6770 Further, your current attempted setting of $shrpdir
6771 conflicts with the value of $archlibexp/CORE
6772 that installperl will use.
6779 # How will the perl executable find the installed shared $libperl?
6780 # Add $xxx to ccdlflags.
6781 # If we can't figure out a command-line option, use $shrpenv to
6782 # set env LD_RUN_PATH. The main perl makefile uses this.
6783 shrpdir=$archlibexp/CORE
6786 if "$useshrplib"; then
6789 # We'll set it in Makefile.SH...
6795 xxx="-Wl,-R$shrpdir"
6797 linux|irix*|dec_osf)
6798 xxx="-Wl,-rpath,$shrpdir"
6801 # next doesn't like the default...
6804 # beos doesn't like the default, either.
6807 # hpux doesn't like the default, either.
6808 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
6811 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
6817 # Only add $xxx if it isn't already in ccdlflags.
6818 case " $ccdlflags " in
6820 *) ccdlflags="$ccdlflags $xxx"
6823 Adding $xxx to the flags
6824 passed to $ld so that the perl executable will find the
6825 installed shared $libperl.
6833 # Fix ccdlflags in AIX for building external extensions.
6834 # (For building Perl itself bare -bE:perl.exp is needed,
6835 # Makefile.SH takes care of this.)
6837 aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
6839 # Respect a hint or command-line value.
6841 '') shrpenv="$tmp_shrpenv" ;;
6843 case "$ldlibpthname" in
6844 '') ldlibpthname=LD_LIBRARY_PATH ;;
6845 none) ldlibpthname='' ;;
6848 : determine where manual pages are on this system
6852 syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
6853 syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
6854 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
6855 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
6856 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
6857 sysman=`./loc . /usr/man/man1 $syspath`
6860 if $test -d "$sysman"; then
6861 echo "System manual is in $sysman." >&4
6863 echo "Could not find manual pages in source form." >&4
6866 : determine where manual pages go
6867 set man1dir man1dir none
6871 $spackage has manual pages available in source form.
6875 echo "However, you don't have nroff, so they're probably useless to you."
6877 '') man1dir="none";;
6880 echo "If you don't want the manual sources installed, answer 'none'."
6885 lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
6886 lookpath="$lookpath $prefixexp/man/p_man/man1"
6887 lookpath="$lookpath $prefixexp/man/u_man/man1"
6888 lookpath="$lookpath $prefixexp/man/man.1"
6890 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
6891 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
6901 rp="Where do the main $spackage manual pages (source) go?"
6903 if $test "X$man1direxp" != "X$ansexp"; then
6907 man1direxp="$ansexp"
6913 : Change installation prefix, if necessary.
6914 if $test X"$prefix" != X"$installprefix"; then
6915 installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
6917 installman1dir="$man1direxp"
6920 : What suffix to use on installed man pages
6927 rp="What suffix should be used for the main $spackage man pages?"
6929 '') case "$man1dir" in
6943 *) dflt="$man1ext";;
6950 : see if we can have long filenames
6952 first=123456789abcdef
6954 if (echo hi >$first) 2>/dev/null; then
6955 if $test -f 123456789abcde; then
6956 echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
6959 echo 'You can have filenames longer than 14 characters.'>&4
6964 You can't have filenames longer than 14 chars.
6965 You can't even think about them!
6971 $rm -rf 123456789abcde*
6973 : determine where library module manual pages go
6974 set man3dir man3dir none
6978 $spackage has manual pages for many of the library modules.
6984 However, you don't have nroff, so they're probably useless to you.
6987 '') man3dir="none";;
6991 case "$d_flexfnam" in
6994 However, your system can't handle the long file names like File::Basename.3.
6997 '') man3dir="none";;
7001 echo "If you don't want the manual sources installed, answer 'none'."
7002 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
7004 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
7005 if $test -d "$privlib/man/man3"; then
7008 WARNING: Previous versions of perl installed man3 pages into
7009 $privlib/man/man3. This version will suggest a
7010 new default of $dflt.
7014 rp='Do you wish to preserve the old behavior?(y/n)'
7017 y*) dflt="$privlib/man/man3" ;;
7022 *) dflt="$man3dir" ;;
7029 rp="Where do the $package library man pages (source) go?"
7032 man3direxp="$ansexp"
7038 : Change installation prefix, if necessary.
7039 if $test X"$prefix" != X"$installprefix"; then
7040 installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
7042 installman3dir="$man3direxp"
7045 : What suffix to use on installed man pages
7051 rp="What suffix should be used for the $package library man pages?"
7053 '') case "$man3dir" in
7067 *) dflt="$man3ext";;
7074 : see if we have to deal with yellow pages, now NIS.
7075 if $test -d /usr/etc/yp || $test -d /etc/yp; then
7076 if $test -f /usr/etc/nibindd; then
7078 echo "I'm fairly confident you're on a NeXT."
7080 rp='Do you get the hosts file via NetInfo?'
7089 y*) hostcat='nidump hosts .';;
7090 *) case "$hostcat" in
7091 nidump*) hostcat='';;
7101 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
7109 rp='Are you getting the hosts file via yellow pages?'
7112 y*) hostcat='ypcat hosts';;
7113 *) hostcat='cat /etc/hosts';;
7119 '') test -f /etc/hosts && hostcat='cat /etc/hosts';;
7122 '') test -f /etc/group && groupcat='cat /etc/group';;
7125 '') test -f /etc/passwd && passcat='cat /etc/passwd';;
7128 : now get the host name
7130 echo "Figuring out host name..." >&4
7131 case "$myhostname" in
7133 echo 'Maybe "hostname" will work...'
7134 if tans=`sh -c hostname 2>&1` ; then
7142 if $test "$cont"; then
7144 echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
7145 if tans=`cat /etc/systemid 2>&1` ; then
7147 phostname='cat /etc/systemid'
7148 echo "Whadyaknow. Xenix always was a bit strange..."
7151 elif $test -r /etc/systemid; then
7152 echo "(What is a non-Xenix system doing with /etc/systemid?)"
7155 if $test "$cont"; then
7156 echo 'No, maybe "uuname -l" will work...'
7157 if tans=`sh -c 'uuname -l' 2>&1` ; then
7159 phostname='uuname -l'
7161 echo 'Strange. Maybe "uname -n" will work...'
7162 if tans=`sh -c 'uname -n' 2>&1` ; then
7164 phostname='uname -n'
7166 echo 'Oh well, maybe I can mine it out of whoami.h...'
7167 if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
7168 myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
7169 phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
7171 case "$myhostname" in
7172 '') echo "Does this machine have an identity crisis or something?"
7175 echo "Well, you said $myhostname before..."
7176 phostname='echo $myhostname';;
7182 : you do not want to know about this
7187 if $test "$myhostname" ; then
7189 rp='Your host name appears to be "'$myhostname'".'" Right?"
7197 : bad guess or no guess
7198 while $test "X$myhostname" = X ; do
7200 rp="Please type the (one word) name of your host:"
7205 : translate upper to lower if necessary
7206 case "$myhostname" in
7208 echo "(Normalizing case in your host name)"
7209 myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
7213 case "$myhostname" in
7215 dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
7216 myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
7217 echo "(Trimming domain name from host name--host name is now $myhostname)"
7219 *) case "$mydomain" in
7222 test "X$hostcat" = "Xypcat hosts" &&
7223 ypmatch "$myhostname" hosts 2>/dev/null |\
7224 $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
7227 test "X$hostcat" != "X" &&
7228 $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
7229 /[ ]$myhostname[ . ]/p" > hosts
7232 if $test -f hosts; then
7233 $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
7234 END { print sum }" hosts` = x1 || tmp_re="[ ]"
7235 dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
7236 hosts | $sort | $uniq | \
7237 $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
7238 case `$echo X$dflt` in
7239 X*\ *) echo "(Several hosts in the database matched hostname)"
7242 X.) echo "(You do not have fully-qualified names in the hosts database)"
7246 echo "(I cannot locate a hosts database anywhere)"
7251 tans=`./loc resolv.conf X /etc /usr/etc`
7252 if $test -f "$tans"; then
7253 echo "(Attempting domain name extraction from $tans)"
7254 dflt=.`$sed -n -e 's/ / /g' \
7255 -e 's/^search *\([^ ]*\).*/\1/p' $tans \
7256 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
7258 .) dflt=.`$sed -n -e 's/ / /g' \
7259 -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
7260 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
7267 .) echo "(No help from resolv.conf either -- attempting clever guess)"
7268 dflt=.`sh -c domainname 2>/dev/null`
7271 .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
7276 .) echo "(Lost all hope -- silly guess then)"
7282 *) dflt="$mydomain";;
7286 rp="What is your domain name?"
7296 : translate upper to lower if necessary
7299 echo "(Normalizing case in your domain name)"
7300 mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
7304 : a little sanity check here
7305 case "$phostname" in
7308 case `$phostname | ./tr '[A-Z]' '[a-z]'` in
7309 $myhostname$mydomain|$myhostname) ;;
7311 case "$phostname" in
7313 echo "(That doesn't agree with your whoami.h file, by the way.)"
7316 echo "(That doesn't agree with your $phostname command, by the way.)"
7326 I need to get your e-mail address in Internet format if possible, i.e.
7327 something like user@host.domain. Please answer accurately since I have
7328 no easy means to double check it. The default value provided below
7329 is most probably close to reality but may not be valid from outside
7330 your organization...
7334 while test "$cont"; do
7336 '') dflt="$cf_by@$myhostname$mydomain";;
7337 *) dflt="$cf_email";;
7339 rp='What is your e-mail address?'
7345 rp='Address does not look like an Internet one. Use it anyway?'
7361 If you or somebody else will be maintaining perl at your site, please
7362 fill in the correct e-mail address here so that they may be contacted
7363 if necessary. Currently, the "perlbug" program included with perl
7364 will send mail to this address in addition to perlbug@perl.org. You may
7365 enter "none" for no administrator.
7368 case "$perladmin" in
7369 '') dflt="$cf_email";;
7370 *) dflt="$perladmin";;
7372 rp='Perl administrator e-mail address'
7376 : determine whether to only install version-specific parts.
7379 Do you want to install only the version-specific parts of the perl
7380 distribution? Usually you do *not* want to do this.
7382 case "$versiononly" in
7383 "$define"|[Yy]*|true) dflt='y' ;;
7386 rp="Do you want to install only the version-specific parts of perl?"
7389 [yY]*) val="$define";;
7395 : figure out how to guarantee perl startup
7396 case "$startperl" in
7398 case "$sharpbang" in
7402 I can use the #! construct to start perl on your system. This will
7403 make startup of perl scripts faster, but may cause problems if you
7404 want to share those scripts and perl is not in a standard place
7405 ($binexp/perl) on all your platforms. The alternative is to force
7406 a shell by starting the script with a single ':' character.
7409 case "$versiononly" in
7410 "$define") dflt="$binexp/perl$version";;
7411 *) dflt="$binexp/perl";;
7413 rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
7416 none) startperl=": # use perl";;
7417 *) startperl="#!$ans"
7418 if $test 30 -lt `echo "$ans" | wc -c`; then
7421 WARNING: Some systems limit the #! command to 32 characters.
7422 If you experience difficulty running Perl scripts with #!, try
7423 installing Perl in a directory with a shorter pathname.
7429 *) startperl=": # use perl"
7434 echo "I'll use $startperl to start perl scripts."
7436 : figure best path for perl in scripts
7439 perlpath="$binexp/perl"
7440 case "$startperl" in
7445 I will use the "eval 'exec'" idiom to start Perl on your system.
7446 I can use the full path of your Perl binary for this purpose, but
7447 doing so may cause problems if you want to share those scripts and
7448 Perl is not always in a standard place ($binexp/perl).
7452 rp="What path shall I use in \"eval 'exec'\"?"
7459 case "$startperl" in
7461 *) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
7464 : determine where public executable scripts go
7465 set scriptdir scriptdir
7467 case "$scriptdir" in
7470 : guess some guesses
7471 $test -d /usr/share/scripts && dflt=/usr/share/scripts
7472 $test -d /usr/share/bin && dflt=/usr/share/bin
7473 $test -d /usr/local/script && dflt=/usr/local/script
7474 $test -d /usr/local/scripts && dflt=/usr/local/scripts
7475 $test -d $prefixexp/script && dflt=$prefixexp/script
7479 *) dflt="$scriptdir"
7484 Some installations have a separate directory just for executable scripts so
7485 that they can mount it across multiple architectures but keep the scripts in
7486 one spot. You might, for example, have a subdirectory of /usr/share for this.
7487 Or you might just lump your scripts in with all your other executables.
7491 rp='Where do you keep publicly executable scripts?'
7493 if $test "X$ansexp" != "X$scriptdirexp"; then
7497 scriptdirexp="$ansexp"
7498 : Change installation prefix, if necessary.
7499 if $test X"$prefix" != X"$installprefix"; then
7500 installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
7502 installscript="$scriptdirexp"
7505 : determine where add-on public executables go
7507 '') dflt=$siteprefix/bin ;;
7511 rp='Pathname where the add-on public executables should be installed?'
7514 sitebinexp="$ansexp"
7515 : Change installation prefix, if necessary.
7516 if $test X"$prefix" != X"$installprefix"; then
7517 installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
7519 installsitebin="$sitebinexp"
7522 case "$useperlio" in
7523 $define|true|[yY]*) dflt='y';;
7528 Previous version of $package used the standard IO mechanisms as
7529 defined in <stdio.h>. Versions 5.003_02 and later of perl allow
7530 alternate IO mechanisms via the PerlIO abstraction layer, but the
7531 stdio mechanism is still the default. This abstraction layer can
7532 use AT&T's sfio (if you already have sfio installed) or regular stdio.
7533 Using PerlIO with sfio may cause problems with some extension modules.
7535 If this doesn't make any sense to you, just accept the default '$dflt'.
7537 rp='Use the experimental PerlIO abstraction layer?'
7544 echo "Ok, doing things the stdio way."
7553 case "$useperlio" in
7554 $define|true|[yY]*) ;;
7557 You are using the SOCKS proxy protocol library which means that you
7558 should also use the PerlIO layer. You may be headed for trouble.
7567 case "$vendorprefix" in
7568 '') d_vendorbin="$undef"
7572 *) d_vendorbin="$define"
7573 : determine where vendor-supplied executables go.
7574 case "$vendorbin" in
7575 '') dflt=$vendorprefix/bin ;;
7576 *) dflt="$vendorbin" ;;
7579 rp='Pathname for the vendor-supplied executables directory?'
7582 vendorbinexp="$ansexp"
7585 : Change installation prefix, if necessary.
7586 if $test X"$prefix" != X"$installprefix"; then
7587 installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
7589 installvendorbin="$vendorbinexp"
7592 : see if qgcvt exists
7598 if $test X"$d_longdbl" = X"$define"; then
7600 echo "Checking how to print long doubles..." >&4
7602 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
7603 $cat >try.c <<'EOCP'
7604 #include <sys/types.h>
7608 printf("%.3f\n", d);
7612 if eval $compile; then
7616 sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
7617 sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
7618 echo "We will use %f."
7624 if $test X"$sPRIfldbl" = X; then
7625 $cat >try.c <<'EOCP'
7626 #include <sys/types.h>
7629 long double d = 123.456;
7630 printf("%.3llf\n", d);
7634 if eval $compile; then
7638 sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
7639 sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
7640 echo "We will use %llf."
7646 if $test X"$sPRIfldbl" = X; then
7647 $cat >try.c <<'EOCP'
7648 #include <sys/types.h>
7651 long double d = 123.456;
7652 printf("%.3Lf\n", d);
7656 if eval $compile; then
7660 sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
7661 sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
7662 echo "We will use %Lf."
7668 if $test X"$sPRIfldbl" = X; then
7669 $cat >try.c <<'EOCP'
7670 #include <sys/types.h>
7673 long double d = 123.456;
7674 printf("%.3lf\n", d);
7678 if eval $compile; then
7682 sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
7683 sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
7684 echo "We will use %lf."
7690 if $test X"$sPRIfldbl" = X; then
7691 echo "Cannot figure out how to print long doubles." >&4
7693 sSCNfldbl=$sPRIfldbl # expect consistency
7700 case "$sPRIfldbl" in
7701 '') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
7702 d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
7703 d_SCNfldbl="$undef";
7705 *) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
7706 d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
7707 d_SCNfldbl="$define";
7711 : Check how to convert floats to strings.
7713 echo "Checking for an efficient way to convert floats to strings."
7715 case "$uselongdouble" in
7716 "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
7718 case "$d_longdbl" in
7719 "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
7721 case "$d_PRIgldbl" in
7722 "$define") echo "#define HAS_PRIgldbl" >>try.c ;;
7726 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
7727 char *myname = "gconvert";
7730 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
7731 char *myname = "gcvt";
7734 #define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
7735 char *myname = "qgcvt";
7736 #define DOUBLETYPE long double
7739 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && defined(HAS_PRIgldbl)
7740 #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
7742 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
7744 char *myname = "sprintf";
7748 #if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
7749 #define DOUBLETYPE long double
7751 #define DOUBLETYPE double
7757 #define I_STDLIB $i_stdlib
7763 checkit(expect, got)
7767 if (strcmp(expect, got)) {
7768 printf("%s oddity: Expected %s, got %s\n",
7769 myname, expect, got);
7779 /* This must be 1st test on (which?) platform */
7780 /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
7781 Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
7782 checkit("0.1", buf);
7784 Gconvert((DOUBLETYPE)1.0, 8, 0, buf);
7787 Gconvert((DOUBLETYPE)1.1, 8, 0, buf);
7788 checkit("1.1", buf);
7790 Gconvert((DOUBLETYPE)1.01, 8, 0, buf);
7791 checkit("1.01", buf);
7793 Gconvert((DOUBLETYPE)1.001, 8, 0, buf);
7794 checkit("1.001", buf);
7796 Gconvert((DOUBLETYPE)1.0001, 8, 0, buf);
7797 checkit("1.0001", buf);
7799 Gconvert((DOUBLETYPE)1.00001, 8, 0, buf);
7800 checkit("1.00001", buf);
7802 Gconvert((DOUBLETYPE)1.000001, 8, 0, buf);
7803 checkit("1.000001", buf);
7805 Gconvert((DOUBLETYPE)0.0, 8, 0, buf);
7808 Gconvert((DOUBLETYPE)-1.0, 8, 0, buf);
7811 /* Some Linux gcvt's give 1.e+5 here. */
7812 Gconvert((DOUBLETYPE)100000.0, 8, 0, buf);
7813 checkit("100000", buf);
7815 /* Some Linux gcvt's give -1.e+5 here. */
7816 Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf);
7817 checkit("-100000", buf);
7819 Gconvert((DOUBLETYPE)123.456, 8, 0, buf);
7820 checkit("123.456", buf);
7825 case "$d_Gconvert" in
7826 gconvert*) xxx_list='gconvert gcvt sprintf' ;;
7827 gcvt*) xxx_list='gcvt gconvert sprintf' ;;
7828 sprintf*) xxx_list='sprintf gconvert gcvt' ;;
7829 *) xxx_list='gconvert gcvt sprintf' ;;
7832 case "$d_longdbl$uselongdouble$d_PRIgldbl" in
7833 "$define$define$define")
7834 # for long doubles prefer first qgcvt, then sprintf
7835 xxx_list="`echo $xxx_list|sed s/sprintf//`"
7836 xxx_list="sprintf $xxx_list"
7838 "$define") xxx_list="qgcvt $xxx_list" ;;
7843 for xxx_convert in $xxx_list; do
7844 echo "Trying $xxx_convert..."
7846 set try -DTRY_$xxx_convert
7847 if eval $compile; then
7848 echo "$xxx_convert() found." >&4
7850 echo "I'll use $xxx_convert to convert floats into a string." >&4
7853 echo "...But $xxx_convert didn't work as I expected."
7856 echo "$xxx_convert NOT found." >&4
7860 case "$xxx_convert" in
7861 gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
7862 gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
7863 qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
7864 *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
7865 "$define$define$define")
7866 d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;;
7867 *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
7872 : see if _fwalk exists
7876 : Initialize h_fcntl
7879 : Initialize h_sysfile
7882 : access call always available on UNIX
7886 : locate the flags for 'access()'
7890 $cat >access.c <<'EOCP'
7891 #include <sys/types.h>
7896 #include <sys/file.h>
7905 : check sys/file.h first, no particular reason here
7906 if $test `./findhdr sys/file.h` && \
7907 $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
7909 echo "<sys/file.h> defines the *_OK access constants." >&4
7910 elif $test `./findhdr fcntl.h` && \
7911 $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
7913 echo "<fcntl.h> defines the *_OK access constants." >&4
7914 elif $test `./findhdr unistd.h` && \
7915 $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
7916 echo "<unistd.h> defines the *_OK access constants." >&4
7918 echo "I can't find the four *_OK access constants--I'll use mine." >&4
7924 : see if accessx exists
7925 set accessx d_accessx
7928 : see if alarm exists
7932 : see if atolf exists
7936 : see if atoll exists
7940 : Look for GNU-cc style attribute checking
7942 echo "Checking whether your compiler can handle __attribute__ ..." >&4
7943 $cat >attrib.c <<'EOCP'
7945 void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
7947 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
7948 if $contains 'warning' attrib.out >/dev/null 2>&1; then
7949 echo "Your C compiler doesn't fully support __attribute__."
7952 echo "Your C compiler supports __attribute__."
7956 echo "Your C compiler doesn't seem to understand __attribute__ at all."
7963 : see if bcmp exists
7967 : see if bcopy exists
7971 : see if this is a unistd.h system
7972 set unistd.h i_unistd
7975 : see if getpgrp exists
7976 set getpgrp d_getpgrp
7979 case "$d_getpgrp" in
7982 echo "Checking to see which flavor of getpgrp is in use..."
7985 #include <sys/types.h>
7987 # include <unistd.h>
7991 if (getuid() == 0) {
7992 printf("(I see you are running Configure as super-user...)\n");
7996 if (getpgrp(1) == 0)
8005 if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
8006 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
8008 elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
8009 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
8012 echo "I can't seem to compile and run the test program."
8014 xxx="a USG one, i.e. you use getpgrp()."
8016 # SVR4 systems can appear rather BSD-ish.
8019 xxx="a BSD one, i.e. you use getpgrp(pid)."
8023 xxx="probably a USG one, i.e. you use getpgrp()."
8028 echo "Assuming your getpgrp is $xxx" >&4
8037 : see if setpgrp exists
8038 set setpgrp d_setpgrp
8041 case "$d_setpgrp" in
8044 echo "Checking to see which flavor of setpgrp is in use..."
8047 #include <sys/types.h>
8049 # include <unistd.h>
8053 if (getuid() == 0) {
8054 printf("(I see you are running Configure as super-user...)\n");
8058 if (-1 == setpgrp(1, 1))
8061 if (setpgrp() != -1)
8067 if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
8068 echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
8070 elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
8071 echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
8074 echo "(I can't seem to compile and run the test program.)"
8076 xxx="a USG one, i.e. you use setpgrp()."
8078 # SVR4 systems can appear rather BSD-ish.
8081 xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
8085 xxx="probably a USG one, i.e. you use setpgrp()."
8090 echo "Assuming your setpgrp is $xxx" >&4
8098 : see if bzero exists
8102 : see if signal is declared as pointer to function returning int or void
8104 xxx=`./findhdr signal.h`
8105 $test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
8106 if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
8107 echo "You have int (*signal())() instead of void." >&4
8109 elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
8110 echo "You have void (*signal())()." >&4
8112 elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
8113 echo "You have int (*signal())() instead of void." >&4
8115 elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
8116 echo "You have void (*signal())()." >&4
8119 case "$d_voidsig" in
8121 echo "I can't determine whether signal handler returns void or int..." >&4
8123 rp="What type does your signal handler return?"
8130 echo "As you already told me, signal handler returns void." >&4
8133 *) echo "As you already told me, signal handler returns int." >&4
8140 case "$d_voidsig" in
8141 "$define") signal_t="void";;
8146 : check for ability to cast large floats to 32-bit ints.
8148 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
8149 if $test "$intsize" -ge 4; then
8156 #include <sys/types.h>
8158 $signal_t blech(s) int s; { exit(3); }
8165 signal(SIGFPE, blech);
8167 /* Don't let compiler optimize the test away. Store the number
8168 in a writable string for gcc to pass to sscanf under HP/UX.
8170 sprintf(str, "2147483647");
8171 sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
8175 /* x86 processors will probably give 0x8000 0000, which is a
8176 sign change. We don't want that. We want to mimic SPARC
8177 behavior here, which is to preserve the sign and give
8180 if (i32 != ($xxx) f)
8186 if eval $compile_ok; then
8190 echo "(I can't seem to compile the test program--assuming it can't)"
8198 echo "Nope, it can't."
8205 : check for ability to cast negative floats to unsigned
8207 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
8210 #include <sys/types.h>
8212 $signal_t blech(s) int s; { exit(7); }
8213 $signal_t blech_in_list(s) int s; { exit(4); }
8214 unsigned long dummy_long(p) unsigned long p; { return p; }
8215 unsigned int dummy_int(p) unsigned int p; { return p; }
8216 unsigned short dummy_short(p) unsigned short p; { return p; }
8220 unsigned long along;
8222 unsigned short ashort;
8226 /* Frustrate gcc-2.7.2's optimizer which failed this test with
8227 a direct f = -123. assignment. gcc-2.8.0 reportedly
8228 optimized the whole file away
8230 /* Store the number in a writable string for gcc to pass to
8233 sprintf(str, "-123");
8234 sscanf(str, "%lf", &f); /* f = -123.; */
8236 signal(SIGFPE, blech);
8237 along = (unsigned long)f;
8238 aint = (unsigned int)f;
8239 ashort = (unsigned short)f;
8240 if (along != (unsigned long)-123)
8242 if (aint != (unsigned int)-123)
8244 if (ashort != (unsigned short)-123)
8246 sprintf(str, "1073741824.");
8247 sscanf(str, "%lf", &f); /* f = (double)0x40000000; */
8250 along = (unsigned long)f;
8251 if (along != 0x80000000)
8255 along = (unsigned long)f;
8256 if (along != 0x7fffffff)
8260 along = (unsigned long)f;
8261 if (along != 0x80000001)
8265 signal(SIGFPE, blech_in_list);
8266 sprintf(str, "123.");
8267 sscanf(str, "%lf", &f); /* f = 123.; */
8268 along = dummy_long((unsigned long)f);
8269 aint = dummy_int((unsigned int)f);
8270 ashort = dummy_short((unsigned short)f);
8271 if (along != (unsigned long)123)
8273 if (aint != (unsigned int)123)
8275 if (ashort != (unsigned short)123)
8282 if eval $compile_ok; then
8286 echo "(I can't seem to compile the test program--assuming it can't)"
8289 case "$castflags" in
8294 echo "Nope, it can't."
8301 : see if vprintf exists
8303 if set vprintf val -f d_vprintf; eval $csym; $val; then
8304 echo 'vprintf() found.' >&4
8306 $cat >vprintf.c <<'EOF'
8307 #include <varargs.h>
8309 int main() { xxx("foo"); }
8318 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
8322 if eval $compile && ./vprintf; then
8323 echo "Your vsprintf() returns (int)." >&4
8326 echo "Your vsprintf() returns (char*)." >&4
8330 echo 'vprintf() NOT found.' >&4
8340 : see if chown exists
8344 : see if chroot exists
8348 : see if chsize exists
8352 : check for const keyword
8354 echo 'Checking to see if your C compiler knows about "const"...' >&4
8355 $cat >const.c <<'EOCP'
8356 typedef struct spug { int drokk; } spug;
8363 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
8365 echo "Yup, it does."
8368 echo "Nope, it doesn't."
8373 : see if crypt exists
8375 if set crypt val -f d_crypt; eval $csym; $val; then
8376 echo 'crypt() found.' >&4
8380 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
8381 if $test -z "$cryptlib"; then
8382 cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
8386 if $test -z "$cryptlib"; then
8387 cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
8391 if $test -z "$cryptlib"; then
8392 cryptlib=`./loc libcrypt$_a "" $libpth`
8396 if $test -z "$cryptlib"; then
8397 echo 'crypt() NOT found.' >&4
8406 : get csh whereabouts
8408 'csh') val="$undef" ;;
8413 : Respect a hint or command line value for full_csh.
8415 '') full_csh=$csh ;;
8418 : see if cuserid exists
8419 set cuserid d_cuserid
8422 : see if this is a limits.h system
8423 set limits.h i_limits
8426 : see if this is a float.h system
8430 : See if number of significant digits in a double precision number is known
8432 $cat >dbl_dig.c <<EOM
8442 printf("Contains DBL_DIG");
8445 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
8446 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
8447 echo "DBL_DIG found." >&4
8450 echo "DBL_DIG NOT found." >&4
8457 : see if difftime exists
8458 set difftime d_difftime
8461 : see if this is a dirent system
8463 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
8465 echo "<dirent.h> found." >&4
8468 if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
8469 echo "<sys/dir.h> found." >&4
8472 xinc=`./findhdr sys/ndir.h`
8474 echo "<dirent.h> NOT found." >&4
8479 : Look for type of directory structure.
8481 $cppstdin $cppflags $cppminus < "$xinc" > try.c
8483 case "$direntrytype" in
8486 $define) guess1='struct dirent' ;;
8487 *) guess1='struct direct' ;;
8490 *) guess1="$direntrytype"
8495 'struct dirent') guess2='struct direct' ;;
8496 *) guess2='struct dirent' ;;
8499 if $contains "$guess1" try.c >/dev/null 2>&1; then
8500 direntrytype="$guess1"
8501 echo "Your directory entries are $direntrytype." >&4
8502 elif $contains "$guess2" try.c >/dev/null 2>&1; then
8503 direntrytype="$guess2"
8504 echo "Your directory entries seem to be $direntrytype." >&4
8506 echo "I don't recognize your system's directory entries." >&4
8507 rp="What type is used for directory entries on this system?"
8515 : see if the directory entry stores field length
8517 $cppstdin $cppflags $cppminus < "$xinc" > try.c
8518 if $contains 'd_namlen' try.c >/dev/null 2>&1; then
8519 echo "Good, your directory entry keeps length information in d_namlen." >&4
8522 echo "Your directory entry does not know about the d_namlen field." >&4
8529 : see if dlerror exists
8532 set dlerror d_dlerror
8536 : see if dlfcn is available
8544 On a few systems, the dynamically loaded modules that perl generates and uses
8545 will need a different extension than shared libs. The default will probably
8553 rp='What is the extension of dynamically loaded modules'
8562 : Check if dlsym need a leading underscore
8568 echo "Checking whether your dlsym() needs a leading underscore ..." >&4
8569 $cat >dyna.c <<'EOM'
8578 #include <dlfcn.h> /* the dynamic linker include file for Sunos/Solaris */
8580 #include <sys/types.h>
8594 int mode = RTLD_LAZY ;
8596 handle = dlopen("./dyna.$dlext", mode) ;
8597 if (handle == NULL) {
8602 symbol = dlsym(handle, "fred") ;
8603 if (symbol == NULL) {
8604 /* try putting a leading underscore */
8605 symbol = dlsym(handle, "_fred") ;
8606 if (symbol == NULL) {
8619 : Call the object file tmp-dyna.o in case dlext=o.
8620 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
8621 mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
8622 $ld -o dyna.$dlext $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
8623 $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1; then
8626 1) echo "Test program failed using dlopen." >&4
8627 echo "Perhaps you should not use dynamic loading." >&4;;
8628 2) echo "Test program failed using dlsym." >&4
8629 echo "Perhaps you should not use dynamic loading." >&4;;
8630 3) echo "dlsym needs a leading underscore" >&4
8632 4) echo "dlsym doesn't need a leading underscore." >&4;;
8635 echo "I can't compile and run the test program." >&4
8636 echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
8641 $rm -f fred fred.? dyna.$dlext dyna.? tmp-dyna.?
8646 hasproto='varname=$1; func=$2; shift; shift;
8647 while $test $# -ge 2; do
8649 $define) echo "#include <$2>";;
8653 $cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
8654 if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
8655 echo "$func() prototype found.";
8658 echo "$func() prototype NOT found.";
8663 $rm -f try.c tryout.c'
8665 : see if prototype for drand48 is available
8667 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
8670 : see if dup2 exists
8674 : see if eaccess exists
8675 set eaccess d_eaccess
8678 : see if endgrent exists
8679 set endgrent d_endgrent
8682 : see if endhostent exists
8683 set endhostent d_endhent
8686 : see if endnetent exists
8687 set endnetent d_endnent
8690 : see if endprotoent exists
8691 set endprotoent d_endpent
8694 : see if endpwent exists
8695 set endpwent d_endpwent
8698 : see if endservent exists
8699 set endservent d_endsent
8702 : Locate the flags for 'open()'
8704 $cat >open3.c <<'EOCP'
8705 #include <sys/types.h>
8710 #include <sys/file.h>
8721 : check sys/file.h first to get FREAD on Sun
8722 if $test `./findhdr sys/file.h` && \
8723 set open3 -DI_SYS_FILE && eval $compile; then
8725 echo "<sys/file.h> defines the O_* constants..." >&4
8727 echo "and you have the 3 argument form of open()." >&4
8730 echo "but not the 3 argument form of open(). Oh, well." >&4
8733 elif $test `./findhdr fcntl.h` && \
8734 set open3 -DI_FCNTL && eval $compile; then
8736 echo "<fcntl.h> defines the O_* constants..." >&4
8738 echo "and you have the 3 argument form of open()." >&4
8741 echo "but not the 3 argument form of open(). Oh, well." >&4
8746 echo "I can't find the O_* constant definitions! You got problems." >&4
8752 : see which of string.h or strings.h is needed
8754 strings=`./findhdr string.h`
8755 if $test "$strings" && $test -r "$strings"; then
8756 echo "Using <string.h> instead of <strings.h>." >&4
8760 strings=`./findhdr strings.h`
8761 if $test "$strings" && $test -r "$strings"; then
8762 echo "Using <strings.h> instead of <string.h>." >&4
8764 echo "No string header found -- You'll surely have problems." >&4
8770 "$undef") strings=`./findhdr strings.h`;;
8771 *) strings=`./findhdr string.h`;;
8774 : check for non-blocking I/O stuff
8775 case "$h_sysfile" in
8776 true) echo "#include <sys/file.h>" > head.c;;
8779 true) echo "#include <fcntl.h>" > head.c;;
8780 *) echo "#include <sys/fcntl.h>" > head.c;;
8785 echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
8786 case "$o_nonblock" in
8789 $cat >>try.c <<'EOCP'
8793 printf("O_NONBLOCK\n");
8797 printf("O_NDELAY\n");
8801 printf("FNDELAY\n");
8808 if eval $compile_ok; then
8810 case "$o_nonblock" in
8811 '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
8812 *) echo "Seems like we can use $o_nonblock.";;
8815 echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
8818 *) echo "Using $hint value $o_nonblock.";;
8820 $rm -f try try.* .out core
8823 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
8829 #include <sys/types.h>
8832 #define MY_O_NONBLOCK $o_nonblock
8833 #ifndef errno /* XXX need better Configure test */
8844 #include <strings.h>
8846 $signal_t blech(x) int x; { exit(3); }
8848 $cat >> try.c <<'EOCP'
8856 pipe(pd); /* Down: child -> parent */
8857 pipe(pu); /* Up: parent -> child */
8860 close(pd[1]); /* Parent reads from pd[0] */
8861 close(pu[0]); /* Parent writes (blocking) to pu[1] */
8862 if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
8864 signal(SIGALRM, blech);
8866 if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
8868 sprintf(string, "%d\n", ret);
8869 write(2, string, strlen(string));
8872 if (errno == EAGAIN) {
8878 if (errno == EWOULDBLOCK)
8879 printf("EWOULDBLOCK\n");
8882 write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
8883 sleep(2); /* Give it time to close our pipe */
8885 ret = read(pd[0], buf, 1); /* Should read EOF */
8887 sprintf(string, "%d\n", ret);
8888 write(3, string, strlen(string));
8892 close(pd[0]); /* We write to pd[1] */
8893 close(pu[1]); /* We read from pu[0] */
8894 read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
8895 close(pd[1]); /* Pipe pd is now fully closed! */
8896 exit(0); /* Bye bye, thank you for playing! */
8900 if eval $compile_ok; then
8901 echo "$startsh" >mtry
8902 echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
8904 ./mtry >/dev/null 2>&1
8906 0) eagain=`$cat try.out`;;
8907 1) echo "Could not perform non-blocking setting!";;
8908 2) echo "I did a successful read() for something that was not there!";;
8909 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
8910 *) echo "Something terribly wrong happened during testing.";;
8912 rd_nodata=`$cat try.ret`
8913 echo "A read() system call with no data present returns $rd_nodata."
8914 case "$rd_nodata" in
8917 echo "(That's peculiar, fixing that to be -1.)"
8923 echo "Forcing errno EAGAIN on read() with no data available."
8927 echo "Your read() sets errno to $eagain when no data is available."
8930 status=`$cat try.err`
8932 0) echo "And it correctly returns 0 to signal EOF.";;
8933 -1) echo "But it also returns -1 to signal EOF, so be careful!";;
8934 *) echo "However, your read() returns '$status' on EOF??";;
8937 if test "$status" = "$rd_nodata"; then
8938 echo "WARNING: you can't distinguish between EOF and no data!"
8942 echo "I can't compile the test program--assuming errno EAGAIN will do."
8949 echo "Using $hint value $eagain."
8950 echo "Your read() returns $rd_nodata when no data is present."
8951 case "$d_eofnblk" in
8952 "$define") echo "And you can see EOF because read() returns 0.";;
8953 "$undef") echo "But you can't see EOF status from read() returned value.";;
8955 echo "(Assuming you can't see EOF status from read anyway.)"
8961 $rm -f try try.* .out core head.c mtry
8963 : see if fchmod exists
8967 : see if fchown exists
8971 : see if this is an fcntl system
8976 : See if fcntl-based locking works.
8977 $cat >try.c <<'EOCP'
8982 #if defined(F_SETLK) && defined(F_SETLKW)
8985 fd = open("try.c", O_RDONLY);
8986 flock.l_type = F_RDLCK;
8987 flock.l_whence = SEEK_SET;
8988 flock.l_start = flock.l_len = 0;
8989 retval = fcntl(fd, F_SETLK, &flock);
8991 (retval < 0 ? exit(2) : exit(0));
8997 echo "Checking if fcntl-based file locking works... "
9001 if eval $compile_ok; then
9003 echo "Yes, it seems to work."
9006 echo "Nope, it didn't work."
9010 echo "I'm unable to compile the test program, so I'll assume not."
9015 echo "Nope, since you don't even have fcntl()."
9018 set d_fcntl_can_lock
9023 hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
9024 while $test $# -ge 2; do
9026 $define) echo "#include <$2>";;
9030 echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c;
9032 if eval $compile; then
9043 : see whether socket exists
9045 $echo $n "Hmm... $c" >&4
9046 if set socket val -f d_socket; eval $csym; $val; then
9047 echo "Looks like you have Berkeley networking support." >&4
9049 if set setsockopt val -f; eval $csym; $val; then
9052 echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4
9056 if $contains socklib libc.list >/dev/null 2>&1; then
9057 echo "Looks like you have Berkeley networking support." >&4
9059 : we will have to assume that it supports the 4.2 BSD interface
9062 echo "You don't have Berkeley networking in libc$_a..." >&4
9063 if test "X$d_socket" = "X$define"; then
9064 echo "...but you seem to believe that you have sockets." >&4
9066 for net in net socket
9068 if test -f /usr/lib/lib$net$_a; then
9069 ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \
9070 $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list
9071 if $contains socket libc.list >/dev/null 2>&1; then
9076 echo "...but the Wollongong group seems to have hacked it in." >&4
9077 sockethdr="-I/usr/netinclude"
9080 echo "Found Berkeley sockets interface in lib$net." >& 4
9081 if $contains setsockopt libc.list >/dev/null 2>&1; then
9084 echo "...using the old BSD 4.1c interface, rather than 4.2." >&4
9091 if test "X$d_socket" != "X$define"; then
9092 echo "or anywhere else I see." >&4
9100 : see if socketpair exists
9101 set socketpair d_sockpair
9106 echo "Checking the availability of certain socket constants..." >& 4
9107 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
9108 enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
9110 #include <sys/types.h>
9111 #include <sys/socket.h>
9117 set try; if eval $compile; then
9120 set d_${enum}; eval $setvar
9124 : see if sys/select.h has to be included
9125 set sys/select.h i_sysselct
9128 : see if we should include time.h, sys/time.h, or both
9130 if test "X$timeincl" = X; then
9131 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
9132 $echo $n "I'm now running the test program...$c"
9133 $cat >try.c <<'EOCP'
9134 #include <sys/types.h>
9139 #ifdef SYSTIMEKERNEL
9142 #include <sys/time.h>
9145 #include <sys/select.h>
9154 struct timezone tzp;
9156 if (foo.tm_sec == foo.tm_sec)
9159 if (bar.tv_sec == bar.tv_sec)
9166 for s_timezone in '-DS_TIMEZONE' ''; do
9168 for s_timeval in '-DS_TIMEVAL' ''; do
9169 for i_systimek in '' '-DSYSTIMEKERNEL'; do
9170 for i_time in '' '-DI_TIME'; do
9171 for i_systime in '-DI_SYSTIME' ''; do
9174 set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
9175 if eval $compile; then
9176 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
9180 $echo $n "Succeeded with $flags$c"
9192 *SYSTIMEKERNEL*) i_systimek="$define"
9193 timeincl=`./findhdr sys/time.h`
9194 echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
9195 *) i_systimek="$undef";;
9198 *I_TIME*) i_time="$define"
9199 timeincl=`./findhdr time.h`" $timeincl"
9200 echo "We'll include <time.h>." >&4;;
9201 *) i_time="$undef";;
9204 *I_SYSTIME*) i_systime="$define"
9205 timeincl=`./findhdr sys/time.h`" $timeincl"
9206 echo "We'll include <sys/time.h>." >&4;;
9207 *) i_systime="$undef";;
9212 : check for fd_set items
9215 Checking to see how well your C compiler handles fd_set and friends ...
9217 $cat >fd_set.c <<EOCP
9218 #$i_systime I_SYS_TIME
9219 #$i_sysselct I_SYS_SELECT
9220 #$d_socket HAS_SOCKET
9221 #include <sys/types.h>
9223 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
9226 #include <sys/time.h>
9229 #include <sys/select.h>
9238 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
9245 set fd_set -DTRYBITS
9246 if eval $compile; then
9247 d_fds_bits="$define"
9249 echo "Well, your system knows about the normal fd_set typedef..." >&4
9251 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
9252 d_fd_macros="$define"
9255 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
9257 d_fd_macros="$undef"
9261 Hmm, your compiler has some difficulty with fd_set. Checking further...
9264 if eval $compile; then
9267 echo "Well, your system has some sort of fd_set available..." >&4
9269 echo "and you have the normal fd_set macros." >&4
9270 d_fd_macros="$define"
9273 but not the normal fd_set macros! Gross! More work for me...
9275 d_fd_macros="$undef"
9278 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
9281 d_fd_macros="$undef"
9286 : see if fgetpos exists
9287 set fgetpos d_fgetpos
9290 : see if flock exists
9294 : see if fork exists
9298 : see if pathconf exists
9299 set pathconf d_pathconf
9302 : see if fpathconf exists
9303 set fpathconf d_fpathconf
9307 : check for fpos64_t
9309 echo "Checking to see if you have fpos64_t..." >&4
9312 int main() { fpos64_t x = 7; }
9315 if eval $compile; then
9317 echo "You have fpos64_t."
9320 echo "You do not have fpos64_t."
9322 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
9329 : see if frexpl exists
9333 hasstruct='varname=$1; struct=$2; shift; shift;
9334 while $test $# -ge 2; do
9336 $define) echo "#include <$2>";;
9340 echo "int main () { struct $struct foo; }" >> try.c;
9342 if eval $compile; then
9351 : see if this is a sys/param system
9352 set sys/param.h i_sysparam
9355 : see if this is a sys/mount.h system
9356 set sys/mount.h i_sysmount
9359 : see if sys/types.h has to be included
9360 set sys/types.h i_systypes
9365 echo "Checking to see if your system supports struct fs_data..." >&4
9366 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
9368 case "$d_fs_data_s" in
9369 "$define") echo "Yes, it does." ;;
9370 *) echo "No, it doesn't." ;;
9373 : see if fseeko exists
9377 8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
9380 : see if fsetpos exists
9381 set fsetpos d_fsetpos
9385 : see if fstatfs exists
9386 set fstatfs d_fstatfs
9390 : see if statvfs exists
9391 set statvfs d_statvfs
9394 : see if fstatvfs exists
9395 set fstatvfs d_fstatvfs
9399 : see if fsync exists
9403 : see if ftello exists
9407 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
9410 : see if getcwd exists
9414 : see if getespwnam exists
9415 set getespwnam d_getespwnam
9419 : see if getfsstat exists
9420 set getfsstat d_getfsstat
9423 : see if getgrent exists
9424 set getgrent d_getgrent
9427 : see if gethostbyaddr exists
9428 set gethostbyaddr d_gethbyaddr
9431 : see if gethostbyname exists
9432 set gethostbyname d_gethbyname
9435 : see if gethostent exists
9436 set gethostent d_gethent
9439 : see how we will look up host name
9442 if set gethostname val -f d_gethname; eval $csym; $val; then
9443 echo 'gethostname() found.' >&4
9444 d_gethname="$define"
9447 if set uname val -f d_uname; eval $csym; $val; then
9450 uname() was found, but you're running xenix, and older versions of xenix
9451 have a broken uname(). If you don't really know whether your xenix is old
9452 enough to have a broken system call, use the default answer.
9459 rp='Is your uname() broken?'
9462 n*) d_uname="$define"; call=uname;;
9465 echo 'uname() found.' >&4
9472 case "$d_gethname" in
9473 '') d_gethname="$undef";;
9476 '') d_uname="$undef";;
9478 case "$d_uname$d_gethname" in
9483 Every now and then someone has a $call() that lies about the hostname
9484 but can't be fixed for political or economic reasons. If you wish, I can
9485 pretend $call() isn't there and maybe compute hostname at run-time
9486 thanks to the '$phostname' command.
9489 rp="Shall I ignore $call() from now on?"
9492 y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
9495 case "$phostname" in
9497 *) case "$aphostname" in
9503 file=`./loc $file $file $pth`
9504 aphostname=`echo $file $*`
9509 case "$d_uname$d_gethname" in
9512 case "$phostname" in
9514 echo "There will be no way for $package to get your hostname." >&4;;
9516 echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
9520 case "$d_phostname" in
9521 '') d_phostname="$undef";;
9524 : see if this is a netdb.h system
9528 : see if prototypes for various gethostxxx netdb.h functions are available
9530 set d_gethostprotos gethostent $i_netdb netdb.h
9533 : see if getlogin exists
9534 set getlogin d_getlogin
9537 : see if getmnt exists
9541 : see if getmntent exists
9542 set getmntent d_getmntent
9545 : see if getnetbyaddr exists
9546 set getnetbyaddr d_getnbyaddr
9549 : see if getnetbyname exists
9550 set getnetbyname d_getnbyname
9553 : see if getnetent exists
9554 set getnetent d_getnent
9557 : see if prototypes for various getnetxxx netdb.h functions are available
9559 set d_getnetprotos getnetent $i_netdb netdb.h
9562 : see if getpagesize exists
9563 set getpagesize d_getpagsz
9567 : see if getprotobyname exists
9568 set getprotobyname d_getpbyname
9571 : see if getprotobynumber exists
9572 set getprotobynumber d_getpbynumber
9575 : see if getprotoent exists
9576 set getprotoent d_getpent
9579 : see if getpgid exists
9580 set getpgid d_getpgid
9583 : see if getpgrp2 exists
9584 set getpgrp2 d_getpgrp2
9587 : see if getppid exists
9588 set getppid d_getppid
9591 : see if getpriority exists
9592 set getpriority d_getprior
9595 : see if prototypes for various getprotoxxx netdb.h functions are available
9597 set d_getprotoprotos getprotoent $i_netdb netdb.h
9600 : see if getprpwnam exists
9601 set getprpwnam d_getprpwnam
9604 : see if getpwent exists
9605 set getpwent d_getpwent
9609 : see if getservbyname exists
9610 set getservbyname d_getsbyname
9613 : see if getservbyport exists
9614 set getservbyport d_getsbyport
9617 : see if getservent exists
9618 set getservent d_getsent
9621 : see if prototypes for various getservxxx netdb.h functions are available
9623 set d_getservprotos getservent $i_netdb netdb.h
9626 : see if getspnam exists
9627 set getspnam d_getspnam
9630 : see if gettimeofday or ftime exists
9631 set gettimeofday d_gettimeod
9633 case "$d_gettimeod" in
9639 val="$undef"; set d_ftime; eval $setvar
9642 case "$d_gettimeod$d_ftime" in
9645 echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
9649 : see if this is an grp system
9655 xxx=`./findhdr grp.h`
9656 $cppstdin $cppflags $cppminus < $xxx >$$.h
9658 if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
9670 set d_grpasswd; eval $setvar
9674 : see if hasmntopt exists
9675 set hasmntopt d_hasmntopt
9678 : see if this is a netinet/in.h or sys/in.h system
9679 set netinet/in.h i_niin sys/in.h i_sysin
9682 : see if arpa/inet.h has to be included
9683 set arpa/inet.h i_arpainet
9686 : see if htonl --and friends-- exists
9691 : Maybe they are macros.
9696 #include <sys/types.h>
9697 #$i_niin I_NETINET_IN
9699 #$i_arpainet I_ARPA_INET
9701 #include <netinet/in.h>
9707 #include <arpa/inet.h>
9710 printf("Defined as a macro.");
9713 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
9714 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
9716 echo "But it seems to be defined as a macro." >&4
9724 : see if iconv exists
9730 if set index val -f; eval $csym; $val; then
9731 if set strchr val -f d_strchr; eval $csym; $val; then
9732 if $contains strchr "$strings" >/dev/null 2>&1 ; then
9735 echo "strchr() found." >&4
9739 echo "index() found." >&4
9744 echo "index() found." >&4
9747 if set strchr val -f d_strchr; eval $csym; $val; then
9750 echo "strchr() found." >&4
9752 echo "No index() or strchr() found!" >&4
9757 set d_strchr; eval $setvar
9759 set d_index; eval $setvar
9761 : check whether inet_aton exists
9762 set inet_aton d_inetaton
9765 : see if inttypes.h is available
9766 : we want a real compile instead of Inhdr because some systems
9767 : have an inttypes.h which includes non-existent headers
9770 #include <inttypes.h>
9772 static int32_t foo32 = 0x12345678;
9776 if eval $compile; then
9777 echo "<inttypes.h> found." >&4
9780 echo "<inttypes.h> NOT found." >&4
9789 echo "Checking to see if you have int64_t..." >&4
9791 #include <sys/types.h>
9792 #$i_inttypes I_INTTYPES
9794 #include <inttypes.h>
9796 int main() { int64_t x = 7; }
9799 if eval $compile; then
9801 echo "You have int64_t."
9804 echo "You do not have int64_t."
9812 $cat >isascii.c <<'EOCP'
9824 if eval $compile; then
9825 echo "isascii() found." >&4
9828 echo "isascii() NOT found." >&4
9835 : see if isnan exists
9839 : see if isnanl exists
9843 : see if killpg exists
9847 : see if lchown exists
9849 $cat > try.c <<'EOCP'
9850 /* System header to define __stub macros and hopefully few prototypes,
9851 which can conflict with char lchown(); below. */
9853 /* Override any gcc2 internal prototype to avoid an error. */
9854 /* We use char because int might match the return type of a gcc2
9855 builtin and then its argument prototype would still apply. */
9858 /* The GNU C library defines this for functions which it implements
9859 to always fail with ENOSYS. Some functions are actually named
9860 something starting with __ and the normal name is an alias. */
9861 #if defined (__stub_lchown) || defined (__stub___lchown)
9869 if eval $compile; then
9870 $echo "lchown() found." >&4
9873 $echo "lchown() NOT found." >&4
9879 : See if number of significant digits in a double precision number is known
9881 $cat >ldbl_dig.c <<EOM
9891 printf("Contains LDBL_DIG");
9894 $cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
9895 if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
9896 echo "LDBL_DIG found." >&4
9899 echo "LDBL_DIG NOT found." >&4
9906 : see if link exists
9910 : see if localeconv exists
9911 set localeconv d_locconv
9914 : see if lockf exists
9918 : check for long long
9920 echo "Checking to see if you have long long..." >&4
9921 echo 'int main() { long long x = 7; return 0; }' > try.c
9923 if eval $compile; then
9925 echo "You have long long."
9928 echo "You do not have long long."
9934 : check for length of long long
9935 case "${d_longlong}${longlongsize}" in
9938 echo "Checking to see how big your long longs are..." >&4
9939 $cat >try.c <<'EOCP'
9943 printf("%d\n", (int)sizeof(long long));
9948 if eval $compile_ok; then
9949 longlongsize=`./try$exe_ext`
9950 echo "Your long longs are $longlongsize bytes long."
9954 echo "(I can't seem to compile the test program. Guessing...)"
9955 rp="What is the size of a long long (in bytes)?"
9959 if $test "X$longsize" = "X$longlongsize"; then
9960 echo "(That isn't any different from an ordinary long.)"
9966 : see if prototype for lseek is available
9968 set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
9971 : see if lstat exists
9975 : see if madvise exists
9976 set madvise d_madvise
9979 : see if mblen exists
9983 : see if mbstowcs exists
9984 set mbstowcs d_mbstowcs
9987 : see if mbtowc exists
9991 : see if memchr exists
9995 : see if memcmp exists
9999 : see if memcpy exists
10000 set memcpy d_memcpy
10003 : see if memmove exists
10004 set memmove d_memmove
10007 : see if memset exists
10008 set memset d_memset
10011 : see if mkdir exists
10015 : see if mkdtemp exists
10016 set mkdtemp d_mkdtemp
10019 : see if mkfifo exists
10020 set mkfifo d_mkfifo
10023 : see if mkstemp exists
10024 set mkstemp d_mkstemp
10027 : see if mkstemps exists
10028 set mkstemps d_mkstemps
10031 : see if mktime exists
10032 set mktime d_mktime
10035 : see if this is a sys/mman.h system
10036 set sys/mman.h i_sysmman
10039 : see if mmap exists
10042 : see what shmat returns
10043 : default to something harmless
10045 case "$i_sysmman$d_mmap" in
10047 $cat >mmap.c <<'END'
10048 #include <sys/mman.h>
10051 if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
10056 echo "and it returns ($mmaptype)." >&4
10062 : see if modfl exists
10066 : see if mprotect exists
10067 set mprotect d_mprotect
10070 : see if msgctl exists
10071 set msgctl d_msgctl
10074 : see if msgget exists
10075 set msgget d_msgget
10078 : see if msgsnd exists
10079 set msgsnd d_msgsnd
10082 : see if msgrcv exists
10083 set msgrcv d_msgrcv
10086 : see how much of the 'msg*(2)' library is present.
10089 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
10090 *"$undef"*) h_msg=false;;
10094 case "`ipcs 2>&1`" in
10095 "SVID messages"*"not configured"*)
10096 echo "Your $osname does not have the msg*(2) configured." >&4
10099 set msgctl d_msgctl
10101 set msgget d_msgget
10103 set msgsnd d_msgsnd
10105 set msgrcv d_msgrcv
10111 : we could also check for sys/ipc.h ...
10112 if $h_msg && $test `./findhdr sys/msg.h`; then
10113 echo "You have the full msg*(2) library." >&4
10116 echo "You don't have the full msg*(2) library." >&4
10122 : see if msync exists
10126 : see if munmap exists
10127 set munmap d_munmap
10130 : see if nice exists
10136 echo "Checking which 64-bit integer type we could use..." >&4
10142 val='"unsigned int"'
10147 *) case "$longsize" in
10151 val='"unsigned long"'
10156 *) case "$d_longlong:$longlongsize" in
10161 val='"unsigned long long"'
10166 *) case "$d_int64_t" in
10184 case "$quadtype" in
10185 '') echo "Alas, no 64-bit integer types in sight." >&4
10188 *) if test X"$use64bitint" = Xdefine -o X"$longsize" = X8; then
10193 echo "We $verb use '$quadtype' for 64-bit integers." >&4
10198 : check for length of character
10200 case "$charsize" in
10202 echo "Checking to see how big your characters are (hey, you never know)..." >&4
10203 $cat >try.c <<'EOCP'
10207 printf("%d\n", (int)sizeof(char));
10212 if eval $compile_ok; then
10216 echo "(I can't seem to compile the test program. Guessing...)"
10223 rp="What is the size of a character (in bytes)?"
10228 : check for volatile keyword
10230 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
10231 $cat >try.c <<'EOCP'
10234 typedef struct _goo_struct goo_struct;
10235 goo_struct * volatile goo = ((goo_struct *)0);
10236 struct _goo_struct {
10241 typedef unsigned short foo_t;
10242 char *volatile foo;
10244 volatile foo_t blech;
10248 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
10250 echo "Yup, it does."
10253 echo "Nope, it doesn't."
10261 $echo "Choosing the C types to be used for Perl's internal types..." >&4
10263 case "$use64bitint:$d_quad:$quadtype" in
10266 uvtype="$uquadtype"
10271 uvtype="unsigned long"
10277 case "$uselongdouble:$d_longdbl" in
10279 nvtype="long double"
10280 nvsize=$longdblsize
10287 $echo "(IV will be "$ivtype", $ivsize bytes)"
10288 $echo "(UV will be "$uvtype", $uvsize bytes)"
10289 $echo "(NV will be "$nvtype", $nvsize bytes)"
10292 #$i_inttypes I_INTTYPES
10294 #include <inttypes.h>
10299 int8_t i = INT8_MAX;
10300 uint8_t u = UINT8_MAX;
10301 printf("int8_t\n");
10304 int16_t i = INT16_MAX;
10305 uint16_t i = UINT16_MAX;
10306 printf("int16_t\n");
10309 int32_t i = INT32_MAX;
10310 uint32_t u = UINT32_MAX;
10311 printf("int32_t\n");
10317 '') case "$charsize" in
10319 u8type="unsigned char"
10328 if eval $compile; then
10329 case "`./try$exe_ext`" in
10330 int8_t) i8type=int8_t
10340 '') if $test $charsize -ge 1; then
10342 u8type="unsigned char"
10350 '') case "$shortsize" in
10352 u16type="unsigned short"
10360 '') set try -DINT16
10361 if eval $compile; then
10362 case "`./try$exe_ext`" in
10374 '') if $test $shortsize -ge 2; then
10376 u16type="unsigned short"
10384 '') case "$longsize" in
10386 u32type="unsigned long"
10390 *) case "$intsize" in
10392 u32type="unsigned int"
10402 '') set try -DINT32
10403 if eval $compile; then
10404 case "`./try$exe_ext`" in
10416 '') if $test $intsize -ge 4; then
10418 u32type="unsigned int"
10426 '') case "$d_quad:$quadtype" in
10428 i64type="$quadtype"
10429 u64type="$uquadtype"
10437 $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
10438 : volatile so that the compiler has to store it out to memory.
10439 if test X"$d_volatile" = X"$define"; then
10444 #include <sys/types.h>
10445 #include <signal.h>
10447 $volatile int bletched = 0;
10448 $signal_t blech(s) int s; { bletched = 1; }
10453 int n = 8 * $uvsize;
10456 signal(SIGFPE, blech);
10459 for (i = 0; i < n; i++) {
10460 u = u << 1 | ($uvtype)1;
10462 if (($uvtype)d != u)
10466 d = ($nvtype)(u - 1);
10467 if (($uvtype)d != (u - 1))
10475 printf("%d\n", ((i == n) ? -n : i));
10481 d_nv_preserves_uv="$undef"
10482 if eval $compile; then
10483 d_nv_preserves_uv_bits="`./try$exe_ext`"
10485 case "$d_nv_preserves_uv_bits" in
10487 d_nv_preserves_uv_bits=`expr 0 - $d_nv_preserves_uv_bits`
10488 $echo "Your NVs can preserve all $d_nv_preserves_uv_bits bits of your UVs." 2>&1
10489 d_nv_preserves_uv="$define"
10491 [1-9]*) $echo "Your NVs can preserve only $d_nv_preserves_uv_bits bits of your UVs." 2>&1
10492 d_nv_preserves_uv="$undef" ;;
10493 *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
10494 d_nv_preserves_uv_bits="$undef" ;;
10500 : check for off64_t
10502 echo "Checking to see if you have off64_t..." >&4
10504 #include <sys/types.h>
10505 #include <unistd.h>
10506 int main() { off64_t x = 7; }
10509 if eval $compile; then
10511 echo "You have off64_t."
10514 echo "You do not have off64_t."
10515 case "$lseeksize" in
10516 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
10523 : see if POSIX threads are available
10524 set pthread.h i_pthread
10530 : how to create joinable pthreads
10531 if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
10533 echo "Checking what constant to use for creating joinable pthreads..." >&4
10534 $cat >try.c <<'EOCP'
10535 #include <pthread.h>
10537 int detachstate = JOINABLE;
10540 set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
10541 if eval $compile; then
10542 echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
10543 val="$undef" # Yes, undef.
10544 set d_old_pthread_create_joinable
10547 set old_pthread_create_joinable
10550 set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
10551 if eval $compile; then
10552 echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
10554 set d_old_pthread_create_joinable
10556 val=PTHREAD_CREATE_UNDETACHED
10557 set old_pthread_create_joinable
10560 set try -DJOINABLE=__UNDETACHED
10561 if eval $compile; then
10562 echo "You seem to use __UNDETACHED." >&4
10564 set d_old_pthread_create_joinable
10567 set old_pthread_create_joinable
10570 echo "Egads, nothing obvious found. Guessing that you use 0." >&4
10572 set d_old_pthread_create_joinable
10575 set old_pthread_create_joinable
10582 d_old_pthread_create_joinable="$undef"
10583 old_pthread_create_joinable=""
10586 : see if pause exists
10590 : see if pipe exists
10594 : see if poll exists
10599 : see whether the various POSIXish _yields exist
10601 #include <pthread.h>
10607 #ifdef PTHREAD_YIELD
10610 #ifdef PTHREAD_YIELD_NULL
10611 pthread_yield(NULL);
10617 : see if sched_yield exists
10618 set try -DSCHED_YIELD
10619 if eval $compile; then
10621 sched_yield='sched_yield()'
10625 case "$usethreads" in
10628 $define) echo 'sched_yield() found.' >&4 ;;
10629 *) echo 'sched_yield() NOT found.' >&4 ;;
10635 : see if pthread_yield exists
10636 set try -DPTHREAD_YIELD
10637 if eval $compile; then
10639 case "$sched_yield" in
10640 '') sched_yield='pthread_yield()' ;;
10643 set try -DPTHREAD_YIELD_NULL
10644 if eval $compile; then
10646 case "$sched_yield" in
10647 '') sched_yield='pthread_yield(NULL)' ;;
10653 case "$usethreads" in
10656 $define) echo 'pthread_yield() found.' >&4 ;;
10657 *) echo 'pthread_yield() NOT found.' >&4 ;;
10661 set d_pthread_yield
10664 case "$sched_yield" in
10665 '') sched_yield=undef ;;
10670 : see if this is a pwd.h system
10676 xxx=`./findhdr pwd.h`
10677 $cppstdin $cppflags $cppminus < $xxx >$$.h
10679 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
10687 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
10695 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
10703 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
10711 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
10719 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
10727 if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
10735 if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
10747 set d_pwquota; eval $setvar
10748 set d_pwage; eval $setvar
10749 set d_pwchange; eval $setvar
10750 set d_pwclass; eval $setvar
10751 set d_pwexpire; eval $setvar
10752 set d_pwcomment; eval $setvar
10753 set d_pwgecos; eval $setvar
10754 set d_pwpasswd; eval $setvar
10758 : see if readdir and friends exist
10759 set readdir d_readdir
10761 set seekdir d_seekdir
10763 set telldir d_telldir
10765 set rewinddir d_rewinddir
10768 : see if readlink exists
10769 set readlink d_readlink
10772 : see if rename exists
10773 set rename d_rename
10776 : see if rmdir exists
10780 : see if memory.h is available.
10785 : See if it conflicts with string.h
10791 $cppstdin $cppflags $cppminus < $strings > mem.h
10792 if $contains 'memcpy' mem.h >/dev/null 2>&1; then
10794 echo "We won't be including <memory.h>."
10804 : can bcopy handle overlapping blocks?
10809 echo "Checking to see if your bcopy() can do overlapping copies..." >&4
10811 #$i_memory I_MEMORY
10812 #$i_stdlib I_STDLIB
10813 #$i_string I_STRING
10814 #$i_unistd I_UNISTD
10816 $cat >>try.c <<'EOCP'
10819 # include <memory.h>
10822 # include <stdlib.h>
10825 # include <string.h>
10827 # include <strings.h>
10830 # include <unistd.h> /* Needed for NetBSD */
10834 char buf[128], abc[128];
10840 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
10842 for (align = 7; align >= 0; align--) {
10843 for (len = 36; len; len--) {
10845 bcopy(abc, b, len);
10846 for (off = 1; off <= len; off++) {
10847 bcopy(b, b+off, len);
10848 bcopy(b+off, b, len);
10849 if (bcmp(b, abc, len))
10858 if eval $compile_ok; then
10859 if ./try 2>/dev/null; then
10860 echo "Yes, it can."
10863 echo "It can't, sorry."
10864 case "$d_memmove" in
10865 "$define") echo "But that's Ok since you have memmove()." ;;
10869 echo "(I can't compile the test program, so we'll assume not...)"
10870 case "$d_memmove" in
10871 "$define") echo "But that's Ok since you have memmove()." ;;
10876 $rm -f try.* try core
10880 : can memcpy handle overlapping blocks?
10882 case "$d_memcpy" in
10885 echo "Checking to see if your memcpy() can do overlapping copies..." >&4
10887 #$i_memory I_MEMORY
10888 #$i_stdlib I_STDLIB
10889 #$i_string I_STRING
10890 #$i_unistd I_UNISTD
10892 $cat >>try.c <<'EOCP'
10895 # include <memory.h>
10898 # include <stdlib.h>
10901 # include <string.h>
10903 # include <strings.h>
10906 # include <unistd.h> /* Needed for NetBSD */
10910 char buf[128], abc[128];
10916 /* Copy "abcde..." string to char abc[] so that gcc doesn't
10917 try to store the string in read-only memory. */
10918 memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
10920 for (align = 7; align >= 0; align--) {
10921 for (len = 36; len; len--) {
10923 memcpy(b, abc, len);
10924 for (off = 1; off <= len; off++) {
10925 memcpy(b+off, b, len);
10926 memcpy(b, b+off, len);
10927 if (memcmp(b, abc, len))
10936 if eval $compile_ok; then
10937 if ./try 2>/dev/null; then
10938 echo "Yes, it can."
10941 echo "It can't, sorry."
10942 case "$d_memmove" in
10943 "$define") echo "But that's Ok since you have memmove()." ;;
10947 echo "(I can't compile the test program, so we'll assume not...)"
10948 case "$d_memmove" in
10949 "$define") echo "But that's Ok since you have memmove()." ;;
10954 $rm -f try.* try core
10958 : can memcmp be trusted to compare relative magnitude?
10960 case "$d_memcmp" in
10963 echo "Checking if your memcmp() can compare relative magnitude..." >&4
10965 #$i_memory I_MEMORY
10966 #$i_stdlib I_STDLIB
10967 #$i_string I_STRING
10968 #$i_unistd I_UNISTD
10970 $cat >>try.c <<'EOCP'
10973 # include <memory.h>
10976 # include <stdlib.h>
10979 # include <string.h>
10981 # include <strings.h>
10984 # include <unistd.h> /* Needed for NetBSD */
10990 if ((a < b) && memcmp(&a, &b, 1) < 0)
10996 if eval $compile_ok; then
10997 if ./try 2>/dev/null; then
10998 echo "Yes, it can."
11001 echo "No, it can't (it uses signed chars)."
11004 echo "(I can't compile the test program, so we'll assume not...)"
11008 $rm -f try.* try core
11012 : see if prototype for sbrk is available
11014 set d_sbrkproto sbrk $i_unistd unistd.h
11017 : see if select exists
11018 set select d_select
11021 : see if semctl exists
11022 set semctl d_semctl
11025 : see if semget exists
11026 set semget d_semget
11029 : see if semop exists
11033 : see how much of the 'sem*(2)' library is present.
11036 case "$d_semctl$d_semget$d_semop" in
11037 *"$undef"*) h_sem=false;;
11041 case "`ipcs 2>&1`" in
11042 "SVID messages"*"not configured"*)
11043 echo "Your $osname does not have the sem*(2) configured." >&4
11046 set semctl d_semctl
11048 set semget d_semget
11056 : we could also check for sys/ipc.h ...
11057 if $h_sem && $test `./findhdr sys/sem.h`; then
11058 echo "You have the full sem*(2) library." >&4
11061 echo "You don't have the full sem*(2) library." >&4
11067 : see whether sys/sem.h defines union semun
11069 $cat > try.c <<'END'
11070 #include <sys/types.h>
11071 #include <sys/ipc.h>
11072 #include <sys/sem.h>
11073 int main () { union semun semun; semun.buf = 0; }
11076 if eval $compile; then
11077 echo "You have union semun in <sys/sem.h>." >&4
11080 echo "You do not have union semun in <sys/sem.h>." >&4
11083 $rm -f try try.c try.h
11087 : see how to do semctl IPC_STAT
11090 : see whether semctl IPC_STAT can use union semun
11095 # define S_IRUSR S_IREAD
11096 # define S_IWUSR S_IWRITE
11097 # define S_IXUSR S_IEXEC
11099 # define S_IRUSR 0400
11100 # define S_IWUSR 0200
11101 # define S_IXUSR 0100
11103 # define S_IRGRP (S_IRUSR>>3)
11104 # define S_IWGRP (S_IWUSR>>3)
11105 # define S_IXGRP (S_IXUSR>>3)
11106 # define S_IROTH (S_IRUSR>>6)
11107 # define S_IWOTH (S_IWUSR>>6)
11108 # define S_IXOTH (S_IXUSR>>6)
11111 # define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
11112 # define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
11113 # define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
11118 #include <sys/types.h>
11119 #include <sys/ipc.h>
11120 #include <sys/sem.h>
11121 #include <sys/stat.h>
11128 #$d_union_semun HAS_UNION_SEMUN
11131 #ifndef HAS_UNION_SEMUN
11134 struct semid_ds *buf;
11135 unsigned short *array;
11141 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
11142 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
11144 struct semid_ds argbuf;
11147 st = semctl(sem, 0, IPC_STAT, arg);
11151 # endif /* IPC_STAT */
11152 printf("semctl IPC_STAT failed: errno = %d\n", errno);
11154 if (semctl(sem, 0, IPC_RMID, arg) != 0)
11155 # endif /* IPC_RMID */
11156 printf("semctl IPC_RMID failed: errno = %d\n", errno);
11158 #endif /* IPC_PRIVATE && ... */
11159 printf("semget failed: errno = %d\n", errno);
11165 if eval $compile; then
11168 semun) val="$define" ;;
11174 case "$d_semctl_semun" in
11176 echo "You can use union semun for semctl IPC_STAT." >&4
11179 *) echo "You cannot use union semun for semctl IPC_STAT." >&4
11184 : see whether semctl IPC_STAT can use struct semid_ds pointer
11185 $cat > try.c <<'END'
11186 #include <sys/types.h>
11187 #include <sys/ipc.h>
11188 #include <sys/sem.h>
11189 #include <sys/stat.h>
11197 struct semid_ds arg;
11200 #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
11201 sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
11204 st = semctl(sem, 0, IPC_STAT, &arg);
11206 printf("semid_ds\n");
11208 # endif /* IPC_STAT */
11209 printf("semctl IPC_STAT failed: errno = %d\n", errno);
11211 if (semctl(sem, 0, IPC_RMID, &arg) != 0)
11212 # endif /* IPC_RMID */
11213 printf("semctl IPC_RMID failed: errno = %d\n", errno);
11215 #endif /* IPC_PRIVATE && ... */
11216 printf("semget failed: errno = %d\n", errno);
11223 if eval $compile; then
11226 semid_ds) val="$define" ;;
11230 set d_semctl_semid_ds
11232 case "$d_semctl_semid_ds" in
11234 echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4
11236 *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4
11243 # We do not have the full sem*(2) library, so assume we can not
11249 set d_semctl_semid_ds
11254 : see if setegid exists
11255 set setegid d_setegid
11258 : see if seteuid exists
11259 set seteuid d_seteuid
11262 : see if setgrent exists
11263 set setgrent d_setgrent
11266 : see if sethostent exists
11267 set sethostent d_sethent
11270 : see if setlinebuf exists
11271 set setlinebuf d_setlinebuf
11274 : see if setlocale exists
11275 set setlocale d_setlocale
11278 : see if setnetent exists
11279 set setnetent d_setnent
11282 : see if setprotoent exists
11283 set setprotoent d_setpent
11286 : see if setpgid exists
11287 set setpgid d_setpgid
11290 : see if setpgrp2 exists
11291 set setpgrp2 d_setpgrp2
11294 : see if setpriority exists
11295 set setpriority d_setprior
11298 : see if setproctitle exists
11299 set setproctitle d_setproctitle
11302 : see if setpwent exists
11303 set setpwent d_setpwent
11306 : see if setregid exists
11307 set setregid d_setregid
11309 set setresgid d_setresgid
11312 : see if setreuid exists
11313 set setreuid d_setreuid
11315 set setresuid d_setresuid
11318 : see if setrgid exists
11319 set setrgid d_setrgid
11322 : see if setruid exists
11323 set setruid d_setruid
11326 : see if setservent exists
11327 set setservent d_setsent
11330 : see if setsid exists
11331 set setsid d_setsid
11334 : see if setvbuf exists
11335 set setvbuf d_setvbuf
11338 : see if sfio.h is available
11343 : see if sfio library is available
11354 : Ok, but do we want to use it.
11358 true|$define|[yY]*) dflt='y';;
11361 echo "$package can use the sfio library, but it is experimental."
11362 case "$useperlio" in
11364 echo "For sfio also the PerlIO abstraction layer is needed."
11365 echo "Earlier you said you wouldn't want that."
11368 rp="You seem to have sfio available, do you want to try using it?"
11371 y|Y) echo "Ok, turning on both sfio and PerlIO, then."
11372 useperlio="$define"
11375 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
11377 : Remove sfio from list of libraries to use
11378 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
11381 echo "libs = $libs" >&4
11385 *) case "$usesfio" in
11386 true|$define|[yY]*)
11387 echo "Sorry, cannot find sfio on this machine." >&4
11388 echo "Ignoring your setting of usesfio=$usesfio." >&4
11397 $define) usesfio='true';;
11398 *) usesfio='false';;
11401 : see if shmctl exists
11402 set shmctl d_shmctl
11405 : see if shmget exists
11406 set shmget d_shmget
11409 : see if shmat exists
11412 : see what shmat returns
11415 $cat >shmat.c <<'END'
11416 #include <sys/shm.h>
11419 if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
11424 echo "and it returns ($shmattype)." >&4
11425 : see if a prototype for shmat is available
11426 xxx=`./findhdr sys/shm.h`
11427 $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
11428 if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
11439 set d_shmatprototype
11442 : see if shmdt exists
11446 : see how much of the 'shm*(2)' library is present.
11449 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
11450 *"$undef"*) h_shm=false;;
11454 case "`ipcs 2>&1`" in
11455 "SVID shared memory"*"not configured"*)
11456 echo "Your $osname does not have the shm*(2) configured." >&4
11459 set shmctl d_shmctl
11461 set shmget d_shmget
11471 : we could also check for sys/ipc.h ...
11472 if $h_shm && $test `./findhdr sys/shm.h`; then
11473 echo "You have the full shm*(2) library." >&4
11476 echo "You don't have the full shm*(2) library." >&4
11483 : see if we have sigaction
11484 if set sigaction val -f d_sigaction; eval $csym; $val; then
11485 echo 'sigaction() found.' >&4
11486 $cat > try.c <<'EOP'
11488 #include <sys/types.h>
11489 #include <signal.h>
11492 struct sigaction act, oact;
11494 oact.sa_handler = 0;
11495 /* so that act and oact are used */
11496 exit(act.sa_flags == 0 && oact.sa_handler == 0);
11500 if eval $compile_ok; then
11503 echo "But you don't seem to have a useable struct sigaction." >&4
11507 echo 'sigaction NOT found.' >&4
11510 set d_sigaction; eval $setvar
11511 $rm -f try try$_o try.c
11513 : see if sigprocmask exists
11514 set sigprocmask d_sigprocmask
11517 : see if sigsetjmp exists
11519 case "$d_sigsetjmp" in
11521 $cat >try.c <<'EOP'
11522 #include <setjmp.h>
11527 if (sigsetjmp(env,1))
11530 siglongjmp(env, 1);
11535 if eval $compile; then
11536 if ./try >/dev/null 2>&1; then
11537 echo "POSIX sigsetjmp found." >&4
11541 Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
11547 echo "sigsetjmp not found." >&4
11551 *) val="$d_sigsetjmp"
11552 case "$d_sigsetjmp" in
11553 $define) echo "POSIX sigsetjmp found." >&4;;
11554 $undef) echo "sigsetjmp not found." >&4;;
11562 : see if socks5_init exists
11563 set socks5_init d_socks5_init
11566 : see if sys/stat.h is available
11567 set sys/stat.h i_sysstat
11571 : see if stat knows about block sizes
11573 echo "Checking to see if your struct stat has st_blocks field..." >&4
11574 set d_statblks stat st_blocks $i_sysstat sys/stat.h
11578 : see if this is a sys/vfs.h system
11579 set sys/vfs.h i_sysvfs
11583 : see if this is a sys/statfs.h system
11584 set sys/statfs.h i_sysstatfs
11589 echo "Checking to see if your system supports struct statfs..." >&4
11590 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
11592 case "$d_statfs_s" in
11593 "$define") echo "Yes, it does." ;;
11594 *) echo "No, it doesn't." ;;
11599 : see if struct statfs knows about f_flags
11600 case "$d_statfs_s" in
11603 echo "Checking to see if your struct statfs has f_flags field..." >&4
11604 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
11608 set d_statfs_f_flags
11612 case "$d_statfs_f_flags" in
11613 "$define") echo "Yes, it does." ;;
11614 *) echo "No, it doesn't." ;;
11617 : see if _ptr and _cnt from stdio act std
11620 if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
11621 echo "(Looks like you have stdio.h from BSD.)"
11622 case "$stdio_ptr" in
11623 '') stdio_ptr='((fp)->_p)'
11626 *) ptr_lval=$d_stdio_ptr_lval;;
11628 case "$stdio_cnt" in
11629 '') stdio_cnt='((fp)->_r)'
11632 *) cnt_lval=$d_stdio_cnt_lval;;
11634 case "$stdio_base" in
11635 '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
11637 case "$stdio_bufsiz" in
11638 '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
11640 elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
11641 echo "(Looks like you have stdio.h from Linux.)"
11642 case "$stdio_ptr" in
11643 '') stdio_ptr='((fp)->_IO_read_ptr)'
11646 *) ptr_lval=$d_stdio_ptr_lval;;
11648 case "$stdio_cnt" in
11649 '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
11652 *) cnt_lval=$d_stdio_cnt_lval;;
11654 case "$stdio_base" in
11655 '') stdio_base='((fp)->_IO_read_base)';;
11657 case "$stdio_bufsiz" in
11658 '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
11661 case "$stdio_ptr" in
11662 '') stdio_ptr='((fp)->_ptr)'
11665 *) ptr_lval=$d_stdio_ptr_lval;;
11667 case "$stdio_cnt" in
11668 '') stdio_cnt='((fp)->_cnt)'
11671 *) cnt_lval=$d_stdio_cnt_lval;;
11673 case "$stdio_base" in
11674 '') stdio_base='((fp)->_base)';;
11676 case "$stdio_bufsiz" in
11677 '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
11681 : test whether _ptr and _cnt really work
11682 echo "Checking how std your stdio is..." >&4
11685 #define FILE_ptr(fp) $stdio_ptr
11686 #define FILE_cnt(fp) $stdio_cnt
11688 FILE *fp = fopen("try.c", "r");
11691 18 <= FILE_cnt(fp) &&
11692 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
11700 if eval $compile; then
11702 echo "Your stdio acts pretty std."
11705 echo "Your stdio isn't very std."
11708 echo "Your stdio doesn't appear very std."
11714 : Can _ptr be used as an lvalue?
11715 case "$d_stdstdio$ptr_lval" in
11716 $define$define) val=$define ;;
11719 set d_stdio_ptr_lval
11722 : Can _cnt be used as an lvalue?
11723 case "$d_stdstdio$cnt_lval" in
11724 $define$define) val=$define ;;
11727 set d_stdio_cnt_lval
11731 : test whether setting _ptr sets _cnt as a side effect
11732 d_stdio_ptr_lval_sets_cnt="$undef"
11733 d_stdio_ptr_lval_nochange_cnt="$undef"
11734 case "$d_stdio_ptr_lval$d_stdstdio" in
11736 echo "Checking to see what happens if we set the stdio ptr..." >&4
11739 /* Can we scream? */
11740 /* Eat dust sed :-) */
11741 /* In the buffer space, no one can hear you scream. */
11742 #define FILE_ptr(fp) $stdio_ptr
11743 #define FILE_cnt(fp) $stdio_cnt
11744 #include <sys/types.h>
11746 FILE *fp = fopen("try.c", "r");
11751 puts("Fail even to read");
11754 c = getc(fp); /* Read away the first # */
11756 puts("Fail even to read");
11760 18 <= FILE_cnt(fp) &&
11761 strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
11763 puts("Fail even to read");
11766 ptr = (char*) FILE_ptr(fp);
11767 cnt = (size_t)FILE_cnt(fp);
11769 FILE_ptr(fp) += 42;
11771 if ((char*)FILE_ptr(fp) != (ptr + 42)) {
11772 printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
11775 if (FILE_cnt(fp) <= 20) {
11776 printf ("Fail (<20 chars to test)");
11779 if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) {
11780 puts("Fail compare");
11783 if (cnt == FILE_cnt(fp)) {
11784 puts("Pass_unchanged");
11787 if (FILE_cnt(fp) == (cnt - 42)) {
11788 puts("Pass_changed");
11791 printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp));
11797 if eval $compile; then
11798 case `./try$exe_ext` in
11800 echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
11801 d_stdio_ptr_lval_sets_cnt="$define" ;;
11803 echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4
11804 d_stdio_ptr_lval_nochange_cnt="$define" ;;
11806 echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;;
11808 echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;;
11811 echo "It seems we can't set ptr in your stdio. Nevermind." >&4
11817 : see if _base is also standard
11819 case "$d_stdstdio" in
11823 #define FILE_base(fp) $stdio_base
11824 #define FILE_bufsiz(fp) $stdio_bufsiz
11826 FILE *fp = fopen("try.c", "r");
11829 19 <= FILE_bufsiz(fp) &&
11830 strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
11837 if eval $compile; then
11839 echo "And its _base field acts std."
11842 echo "But its _base field isn't std."
11845 echo "However, it seems to be lacking the _base field."
11854 Checking how to access stdio streams by file descriptor number...
11856 case "$stdio_stream_array" in
11857 '') $cat >try.c <<EOCP
11860 if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
11864 for s in _iob __iob __sF
11866 set try -DSTDIO_STREAM_ARRAY=$s
11867 if eval $compile; then
11868 case "`./try$exe_ext`" in
11869 yes) stdio_stream_array=$s; break ;;
11873 $rm -f try.* try$exe_ext
11875 case "$stdio_stream_array" in
11877 I can't figure out how to access stdio streams by file descriptor number.
11879 d_stdio_stream_array="$undef"
11882 You can access stdio streams by file descriptor number by the $stdio_stream_array array.
11884 d_stdio_stream_array="$define"
11888 : see if strcoll exists
11889 set strcoll d_strcoll
11892 : check for structure copying
11894 echo "Checking to see if your C compiler can copy structs..." >&4
11895 $cat >try.c <<'EOCP'
11905 if $cc -c try.c >/dev/null 2>&1 ; then
11907 echo "Yup, it can."
11910 echo "Nope, it can't."
11916 : see if strerror and/or sys_errlist[] exist
11918 if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
11919 if set strerror val -f d_strerror; eval $csym; $val; then
11920 echo 'strerror() found.' >&4
11921 d_strerror="$define"
11922 d_strerrm='strerror(e)'
11923 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
11924 echo "(You also have sys_errlist[], so we could roll our own strerror.)"
11925 d_syserrlst="$define"
11927 echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
11928 d_syserrlst="$undef"
11930 elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
11931 $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
11932 echo 'strerror() found in string header.' >&4
11933 d_strerror="$define"
11934 d_strerrm='strerror(e)'
11935 if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
11936 echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
11937 d_syserrlst="$define"
11939 echo "(You don't appear to have any sys_errlist[], how can this be?)"
11940 d_syserrlst="$undef"
11942 elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
11943 echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
11944 d_strerror="$undef"
11945 d_syserrlst="$define"
11946 d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
11948 echo 'strerror() and sys_errlist[] NOT found.' >&4
11949 d_strerror="$undef"
11950 d_syserrlst="$undef"
11951 d_strerrm='"unknown"'
11955 : see if strtod exists
11956 set strtod d_strtod
11959 : see if strtol exists
11960 set strtol d_strtol
11963 : see if strtold exists
11964 set strtold d_strtold
11967 : see if strtoll exists
11968 set strtoll d_strtoll
11971 case "$d_longlong-$d_strtoll" in
11974 Checking whether your strtoll() works okay...
11976 $cat >try.c <<'EOCP'
11979 #define strtoll __strtoll
11982 #define strtoll _strtoll
11985 extern long long int strtoll(char *s, char **, int);
11986 static int bad = 0;
11987 int check(char *s, long long ell, int een) {
11990 gll = strtoll(s, 0, 10);
11991 if (!((gll == ell) && (errno == een)))
11995 check(" 1", 1LL, 0);
11996 check(" 0", 0LL, 0);
11997 check("-1", -1LL, 0);
11998 check("-9223372036854775808", -9223372036854775808LL, 0);
11999 check("-9223372036854775808", -9223372036854775808LL, 0);
12000 check(" 9223372036854775807", 9223372036854775807LL, 0);
12001 check("-9223372036854775808", -9223372036854775808LL, 0);
12002 check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
12003 check("-9223372036854775809", -9223372036854775808LL, ERANGE);
12009 if eval $compile; then
12012 ok) echo "Your strtoll() seems to be working okay." ;;
12014 Your strtoll() doesn't seem to be working okay.
12020 echo "(I can't seem to compile the test program--assuming it doesn't)"
12026 : see if strtoq exists
12027 set strtoq d_strtoq
12030 : see if strtoul exists
12031 set strtoul d_strtoul
12034 case "$d_strtoul" in
12037 Checking whether your strtoul() works okay...
12039 $cat >try.c <<'EOCP'
12042 extern unsigned long int strtoul(char *s, char **, int);
12043 static int bad = 0;
12044 void check(char *s, unsigned long eul, int een) {
12047 gul = strtoul(s, 0, 10);
12048 if (!((gul == eul) && (errno == een)))
12052 check(" 1", 1L, 0);
12053 check(" 0", 0L, 0);
12055 case "$longsize" in
12057 $cat >>try.c <<'EOCP'
12058 check("18446744073709551615", 18446744073709551615UL, 0);
12059 check("18446744073709551616", 18446744073709551615UL, ERANGE);
12060 #if 0 /* strtoul() for /^-/ strings is undefined. */
12061 check("-1", 18446744073709551615UL, 0);
12062 check("-18446744073709551614", 2, 0);
12063 check("-18446744073709551615", 1, 0);
12064 check("-18446744073709551616", 18446744073709551615UL, ERANGE);
12065 check("-18446744073709551617", 18446744073709551615UL, ERANGE);
12070 $cat >>try.c <<'EOCP'
12071 check("4294967295", 4294967295UL, 0);
12072 check("4294967296", 4294967295UL, ERANGE);
12073 #if 0 /* strtoul() for /^-/ strings is undefined. */
12074 check("-1", 4294967295UL, 0);
12075 check("-4294967294", 2, 0);
12076 check("-4294967295", 1, 0);
12077 check("-4294967296", 4294967295UL, ERANGE);
12078 check("-4294967297", 4294967295UL, ERANGE);
12083 : Should we write these tests to be more portable by sprintf-ing
12084 : ~0 and then manipulating that char string as input for strtol?
12087 $cat >>try.c <<'EOCP'
12094 if eval $compile; then
12096 ok) echo "Your strtoul() seems to be working okay." ;;
12098 Your strtoul() doesn't seem to be working okay.
12107 : see if strtoull exists
12108 set strtoull d_strtoull
12111 case "$d_longlong-$d_strtoull" in
12114 Checking whether your strtoull() works okay...
12116 $cat >try.c <<'EOCP'
12119 #define strtoull __strtoull
12122 extern unsigned long long int strtoull(char *s, char **, int);
12123 static int bad = 0;
12124 int check(char *s, long long eull, int een) {
12127 gull = strtoull(s, 0, 10);
12128 if (!((gull == eull) && (errno == een)))
12132 check(" 1", 1LL, 0);
12133 check(" 0", 0LL, 0);
12134 check("18446744073709551615", 18446744073709551615ULL, 0);
12135 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
12136 #if 0 /* strtoull() for /^-/ strings is undefined. */
12137 check("-1", 18446744073709551615ULL, 0);
12138 check("-18446744073709551614", 2LL, 0);
12139 check("-18446744073709551615", 1LL, 0);
12140 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
12141 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
12148 if eval $compile; then
12150 ok) echo "Your strtoull() seems to be working okay." ;;
12152 Your strtoull() doesn't seem to be working okay.
12154 d_strtoull="$undef"
12161 : see if strtouq exists
12162 set strtouq d_strtouq
12165 case "$d_strtouq" in
12168 Checking whether your strtouq() works okay...
12170 $cat >try.c <<'EOCP'
12173 extern unsigned long long int strtouq(char *s, char **, int);
12174 static int bad = 0;
12175 void check(char *s, unsigned long long eull, int een) {
12176 unsigned long long gull;
12178 gull = strtouq(s, 0, 10);
12179 if (!((gull == eull) && (errno == een)))
12183 check(" 1", 1LL, 0);
12184 check(" 0", 0LL, 0);
12185 check("18446744073709551615", 18446744073709551615ULL, 0);
12186 check("18446744073709551616", 18446744073709551615ULL, ERANGE);
12187 #if 0 /* strtouq() for /^-/ strings is undefined. */
12188 check("-1", 18446744073709551615ULL, 0);
12189 check("-18446744073709551614", 2LL, 0);
12190 check("-18446744073709551615", 1LL, 0);
12191 check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
12192 check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
12200 if eval $compile; then
12202 ok) echo "Your strtouq() seems to be working okay." ;;
12204 Your strtouq() doesn't seem to be working okay.
12213 : see if strxfrm exists
12214 set strxfrm d_strxfrm
12217 : see if symlink exists
12218 set symlink d_symlink
12221 : see if syscall exists
12222 set syscall d_syscall
12225 : see if sysconf exists
12226 set sysconf d_sysconf
12229 : see if system exists
12230 set system d_system
12233 : see if tcgetpgrp exists
12234 set tcgetpgrp d_tcgetpgrp
12237 : see if tcsetpgrp exists
12238 set tcsetpgrp d_tcsetpgrp
12241 : see if prototype for telldir is available
12243 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
12246 : see if this is a sys/times.h system
12247 set sys/times.h i_systimes
12250 : see if times exists
12252 if set times val -f d_times; eval $csym; $val; then
12253 echo 'times() found.' >&4
12256 case "$i_systimes" in
12257 "$define") inc='sys/times.h';;
12259 rp="What is the type returned by times() on this system?"
12260 set clock_t clocktype long stdio.h sys/types.h $inc
12263 echo 'times() NOT found, hope that will do.' >&4
12268 : see if truncate exists
12269 set truncate d_truncate
12272 : see if tzname[] exists
12274 if set tzname val -a d_tzname; eval $csym; $val; then
12276 echo 'tzname[] found.' >&4
12279 echo 'tzname[] NOT found.' >&4
12284 : see if umask exists
12288 : see if ustat exists
12292 : backward compatibility for d_hvfork
12293 if test X$d_hvfork != X; then
12294 d_vfork="$d_hvfork"
12297 : see if there is a vfork
12302 : Ok, but do we want to use it. vfork is reportedly unreliable in
12303 : perl on Solaris 2.x, and probably elsewhere.
12307 case "$usevfork" in
12313 Perl can only use a vfork() that doesn't suffer from strict
12314 restrictions on calling functions or modifying global data in
12315 the child. For example, glibc-2.1 contains such a vfork()
12316 that is unsuitable. If your system provides a proper fork()
12317 call, chances are that you do NOT want perl to use vfork().
12320 rp="Do you still want to use vfork()?"
12325 echo "Ok, we won't use vfork()."
12334 $define) usevfork='true';;
12335 *) usevfork='false';;
12338 : see if this is an sysdir system
12339 set sys/dir.h i_sysdir
12342 : see if this is an sysndir system
12343 set sys/ndir.h i_sysndir
12346 : see if closedir exists
12347 set closedir d_closedir
12350 case "$d_closedir" in
12353 echo "Checking whether closedir() returns a status..." >&4
12354 cat > closedir.c <<EOM
12355 #$i_dirent I_DIRENT /**/
12356 #$i_sysdir I_SYS_DIR /**/
12357 #$i_sysndir I_SYS_NDIR /**/
12358 #$i_systypes I_SYS_TYPES /**/
12360 #if defined(I_SYS_TYPES)
12361 #include <sys/types.h>
12363 #if defined(I_DIRENT)
12364 #include <dirent.h>
12365 #if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
12366 #include <sys/dir.h>
12370 #include <sys/ndir.h>
12374 #include <ndir.h> /* may be wrong in the future */
12376 #include <sys/dir.h>
12381 int main() { return closedir(opendir(".")); }
12384 if eval $compile_ok; then
12385 if ./closedir > /dev/null 2>&1 ; then
12386 echo "Yes, it does."
12389 echo "No, it doesn't."
12393 echo "(I can't seem to compile the test program--assuming it doesn't)"
12401 set d_void_closedir
12404 : see if there is a wait4
12408 : see if waitpid exists
12409 set waitpid d_waitpid
12412 : see if wcstombs exists
12413 set wcstombs d_wcstombs
12416 : see if wctomb exists
12417 set wctomb d_wctomb
12420 : preserve RCS keywords in files with variable substitution, grrr
12425 Revision='$Revision'
12427 case "$crosscompile" in
12428 ''|[nN]*) crosscompile="$undef" ;;
12432 next|rhapsody|darwin) multiarch="$define" ;;
12434 case "$multiarch" in
12435 ''|[nN]*) multiarch="$undef" ;;
12438 : check for alignment requirements
12440 case "$crosscompile$multiarch" in
12443 You seem to be either cross-compiling or doing a multiarchitecture build,
12444 skipping the memory alignment check.
12447 case "$alignbytes" in
12448 '') alignbytes=8 ;;
12452 case "$alignbytes" in
12453 '') echo "Checking alignment constraints..." >&4
12454 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
12455 $cat >try.c <<'EOCP'
12456 typedef long double NV;
12459 $cat >try.c <<'EOCP'
12463 $cat >>try.c <<'EOCP'
12471 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
12476 if eval $compile_ok; then
12480 echo "(I can't seem to compile the test program...)"
12483 *) dflt="$alignbytes"
12486 rp="Doubles must be aligned on a how-many-byte boundary?"
12494 : set the base revision
12497 : check for ordering of bytes in a long
12499 case "$crosscompile$multiarch" in
12502 You seem to be either cross-compiling or doing a multiarchitecture build,
12503 skipping the byteorder check.
12509 case "$byteorder" in
12512 In the following, larger digits indicate more significance. A big-endian
12513 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
12514 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
12515 machines may have weird orders like 3412. A Cray will report 87654321,
12516 an Alpha will report 12345678. If the test program works the default is
12518 I'm now running the test program...
12520 $cat >try.c <<'EOCP'
12527 char c[sizeof(long)];
12530 if (sizeof(long) > 4)
12531 u.l = (0x08070605L << 32) | 0x04030201L;
12534 for (i = 0; i < sizeof(long); i++)
12535 printf("%c", u.c[i]+'0');
12542 if eval $compile && ./try > /dev/null; then
12545 [1-4][1-4][1-4][1-4]|12345678|87654321)
12546 echo "(The test program ran ok.)"
12547 echo "byteorder=$dflt"
12550 ????|????????) echo "(The test program ran ok.)" ;;
12551 *) echo "(The test program didn't run right for some reason.)" ;;
12556 (I can't seem to compile the test program. Guessing big-endian...)
12559 case "$xxx_prompt" in
12561 rp="What is the order of bytes in a long?"
12575 : how do we catenate cpp tokens here?
12577 echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
12578 $cat >cpp_stuff.c <<'EOCP'
12579 #define RCAT(a,b)a/**/b
12580 #define ACAT(a,b)a ## b
12584 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
12585 if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
12586 echo "Oh! Smells like ANSI's been here." >&4
12587 echo "We can catify or stringify, separately or together!"
12589 elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
12590 echo "Ah, yes! The good old days!" >&4
12591 echo "However, in the good old days we don't know how to stringify and"
12592 echo "catify at the same time."
12596 Hmm, I don't seem to be able to catenate tokens with your cpp. You're going
12597 to have to edit the values of CAT[2-5] in config.h...
12599 cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
12603 : see if this is a db.h system
12609 : Check db version.
12611 echo "Checking Berkeley DB version ..." >&4
12617 #include <sys/types.h>
12622 #ifdef DB_VERSION_MAJOR /* DB version >= 2 */
12623 int Major, Minor, Patch ;
12624 unsigned long Version ;
12625 (void)db_version(&Major, &Minor, &Patch) ;
12626 printf("You have Berkeley DB Version 2 or greater\n");
12628 printf("db.h is from Berkeley DB Version %d.%d.%d\n",
12629 DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
12630 printf("libdb is from Berkeley DB Version %d.%d.%d\n",
12631 Major, Minor, Patch) ;
12633 /* check that db.h & libdb are compatible */
12634 if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
12635 printf("db.h and libdb are incompatible\n") ;
12639 printf("db.h and libdb are compatible\n") ;
12641 Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
12642 + DB_VERSION_PATCH ;
12644 /* needs to be >= 2.3.4 */
12645 if (Version < 2003004) {
12646 /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
12647 printf("but Perl needs Berkeley DB 2.3.4 or greater\n") ;
12653 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
12654 printf("You have Berkeley DB Version 1\n");
12655 exit(0); /* DB version < 2: the coast is clear. */
12657 exit(1); /* <db.h> not Berkeley DB? */
12663 if eval $compile_ok && ./try; then
12664 echo 'Looks OK.' >&4
12666 echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
12670 : Remove db from list of libraries to use
12671 echo "Removing unusable -ldb from library list" >&4
12672 set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
12675 echo "libs = $libs" >&4
12685 : Check the return type needed for hash
12687 echo "Checking return type needed for hash for Berkeley DB ..." >&4
12693 #include <sys/types.h>
12696 #ifndef DB_VERSION_MAJOR
12697 u_int32_t hash_cb (ptr, size)
12705 info.hash = hash_cb;
12709 if $cc $ccflags -c try.c >try.out 2>&1 ; then
12710 if $contains warning try.out >>/dev/null 2>&1 ; then
12713 db_hashtype='u_int32_t'
12716 : XXX Maybe we should just give up here.
12717 db_hashtype=u_int32_t
12719 echo "Help: I can't seem to compile the db test program." >&4
12720 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
12723 echo "Your version of Berkeley DB uses $db_hashtype for hash."
12725 *) db_hashtype=u_int32_t
12730 : Check the return type needed for prefix
12732 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
12738 #include <sys/types.h>
12741 #ifndef DB_VERSION_MAJOR
12742 size_t prefix_cb (key1, key2)
12750 info.prefix = prefix_cb;
12754 if $cc $ccflags -c try.c >try.out 2>&1 ; then
12755 if $contains warning try.out >>/dev/null 2>&1 ; then
12756 db_prefixtype='int'
12758 db_prefixtype='size_t'
12761 db_prefixtype='size_t'
12762 : XXX Maybe we should just give up here.
12764 echo "Help: I can't seem to compile the db test program." >&4
12765 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
12768 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
12770 *) db_prefixtype='size_t'
12774 : check for void type
12776 echo "Checking to see how well your C compiler groks the void type..." >&4
12777 case "$voidflags" in
12779 $cat >try.c <<'EOCP'
12785 extern void moo(); /* function returning void */
12786 void (*goo)(); /* ptr to func returning void */
12788 void *hue; /* generic ptr */
12801 int main() { sub(); }
12803 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
12804 voidflags=$defvoidused
12805 echo "Good. It appears to support void to the level $package wants.">&4
12806 if $contains warning .out >/dev/null 2>&1; then
12807 echo "However, you might get some warnings that look like this:"
12811 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
12812 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
12813 echo "It supports 1..."
12814 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
12815 echo "It also supports 2..."
12816 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
12818 echo "And it supports 4 but not 8 definitely."
12820 echo "It doesn't support 4..."
12821 if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
12823 echo "But it supports 8."
12826 echo "Neither does it support 8."
12830 echo "It does not support 2..."
12831 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
12833 echo "But it supports 4 and 8."
12835 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
12837 echo "And it supports 4 but has not heard about 8."
12839 echo "However it supports 8 but not 4."
12844 echo "There is no support at all for void."
12849 case "$voidflags" in
12851 *) $cat >&4 <<'EOM'
12852 Support flag bits are:
12853 1: basic void declarations.
12854 2: arrays of pointers to functions returning void.
12855 4: operations between pointers to and addresses of void functions.
12856 8: generic void pointers.
12859 rp="Your void support flags add up to what?"
12867 : How can we generate normalized random numbers ?
12869 echo "Looking for a random number function..." >&4
12870 case "$randfunc" in
12872 if set drand48 val -f; eval $csym; $val; then
12874 echo "Good, found drand48()." >&4
12875 elif set random val -f; eval $csym; $val; then
12877 echo "OK, found random()." >&4
12880 echo "Yick, looks like I have to use rand()." >&4
12891 *-Dmy_rand=*|*-Dmy_srand=*)
12892 echo "Removing obsolete -Dmy_rand, -Dmy_srand, and -Drandbits from ccflags." >&4
12893 ccflags="`echo $ccflags | sed -e 's/-Dmy_rand=random/ /'`"
12894 ccflags="`echo $ccflags | sed -e 's/-Dmy_srand=srandom/ /'`"
12895 ccflags="`echo $ccflags | sed -e 's/-Drandbits=[0-9][0-9]*/ /'`"
12899 while $test "$cont"; do
12900 rp="Use which function to generate random numbers?"
12902 if $test "$ans" = "$dflt"; then
12908 if set $ans val -f; eval $csym; $val; then
12912 rp="I cannot find function $ans. Use that name anyway?"
12921 case "$randfunc" in
12923 drand01="drand48()"
12929 case "$randbits" in
12931 echo "Checking to see how many bits your $randfunc() function produces..." >&4
12933 #$i_unistd I_UNISTD
12934 #$i_stdlib I_STDLIB
12937 # include <unistd.h>
12940 # include <stdlib.h>
12945 register unsigned long tmp;
12946 register unsigned long max = 0L;
12948 for (i = 1000; i; i--) {
12949 tmp = (unsigned long) $randfunc();
12950 if (tmp > max) max = tmp;
12952 for (i = 0; max; i++)
12958 if eval $compile_ok; then
12962 echo "(I can't seem to compile the test program...)"
12969 rp="How many bits does your $randfunc() function produce?"
12973 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
12974 seedfunc="s$randfunc"
12975 randseedtype=unsigned
12979 rp="How many bits does your $randfunc() function produce?"
12982 seedfunc="s$randfunc"
12983 drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))"
12984 if set $seedfunc val -f; eval $csym; $val; then
12985 echo "(Using $seedfunc() to seed random generator)"
12987 echo "(Warning: no $seedfunc() to seed random generator)"
12990 randseedtype=unsigned
12998 echo "Determining whether or not we are on an EBCDIC system..." >&4
12999 $cat >tebcdic.c <<'EOM'
13002 if ('M'==0xd4) return 0;
13009 if eval $compile_ok; then
13011 echo "You seem to speak EBCDIC." >&4
13014 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF8." >&4
13017 echo "I'm unable to compile the test program." >&4
13018 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
13020 $rm -f tebcdic.c tebcdic
13026 Checking how to flush all pending stdio output...
13028 # I only know how to find the first 32 possibly open files on SunOS.
13029 # See also hints/sunos_4_1.sh and util.c --AD
13031 sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
13033 $cat >>try.c <<EOCP
13035 #$i_unistd I_UNISTD
13037 # include <unistd.h>
13039 #$d_sysconf HAS_SYSCONF
13040 #$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY
13041 #ifdef HAS_STDIO_STREAM_ARRAY
13042 # define STDIO_STREAM_ARRAY $stdio_stream_array
13045 FILE* p = fopen("try.out", "w");
13049 # ifdef TRY_FPRINTF
13053 #ifdef TRY_FFLUSH_NULL
13056 #ifdef TRY_FFLUSH_ALL
13058 long open_max = -1;
13059 # ifdef PERL_FFLUSH_ALL_FOPEN_MAX
13060 open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
13062 # if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
13063 open_max = sysconf(_SC_OPEN_MAX);
13066 open_max = FOPEN_MAX;
13069 open_max = OPEN_MAX;
13078 # ifdef HAS_STDIO_STREAM_ARRAY
13079 if (open_max > 0) {
13081 for (i = 0; i < open_max; i++)
13082 if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
13083 STDIO_STREAM_ARRAY[i]._file < open_max &&
13084 STDIO_STREAM_ARRAY[i]._flag)
13085 fflush(&STDIO_STREAM_ARRAY[i]);
13093 : first we have to find out how _not_ to flush
13094 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
13096 set try -DTRY_FPUTC
13097 if eval $compile; then
13099 ./try$exe_ext 2>/dev/null
13100 if $test ! -s try.out -a "X$?" = X42; then
13106 set try -DTRY_FPRINTF
13108 if eval $compile; then
13110 ./try$exe_ext 2>/dev/null
13111 if $test ! -s try.out -a "X$?" = X42; then
13112 output=-DTRY_FPRINTF
13118 : check for fflush NULL behaviour
13119 case "$fflushNULL" in
13120 '') set try -DTRY_FFLUSH_NULL $output
13121 if eval $compile; then
13123 ./try$exe_ext 2>/dev/null
13125 if $test -s try.out -a "X$code" = X42; then
13126 fflushNULL="`$cat try.out`"
13128 if $test "X$code" != X42; then
13130 (If this test failed, don't worry, we'll try another method shortly.)
13135 $rm -f core try.core core.try.*
13136 case "$fflushNULL" in
13138 Your fflush(NULL) works okay for output streams.
13139 Let's see if it clobbers input pipes...
13141 # As of mid-March 2000 all versions of Solaris appear to have a stdio
13142 # bug that improperly flushes the input end of pipes. So we avoid the
13143 # autoflush on fork/system/exec support for now. :-(
13144 $cat >tryp.c <<EOCP
13147 main(int argc, char **argv)
13153 while ((i = getc(stdin)) != -1
13154 && (*bp++ = i) != '\n'
13155 && bp < &buf[1024])
13158 fprintf(stdout, "%s", buf);
13166 fflushNULL="$define"
13168 if eval $compile; then
13170 $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out
13171 if cmp tryp.c tryp.out >/dev/null 2>&1; then
13173 fflush(NULL) seems to behave okay with input streams.
13175 fflushNULL="$define"
13178 Ouch, fflush(NULL) clobbers input pipes! We will not use it.
13180 fflushNULL="$undef"
13183 $rm -f core tryp.c tryp.core core.tryp.*
13186 Your fflush(NULL) isn't working (contrary to ANSI C).
13188 fflushNULL="$undef"
13191 Cannot figure out whether your fflush(NULL) works or not.
13192 I'm assuming it doesn't (contrary to ANSI C).
13194 fflushNULL="$undef"
13198 $define|true|[yY]*)
13199 fflushNULL="$define"
13202 fflushNULL="$undef"
13205 : check explicit looping only if NULL did not work, and if the pipe
13206 : bug does not show up on an explicit flush too
13207 case "$fflushNULL" in
13209 $cat >tryp.c <<EOCP
13212 main(int argc, char **argv)
13218 while ((i = getc(stdin)) != -1
13219 && (*bp++ = i) != '\n'
13220 && bp < &buf[1024])
13223 fprintf(stdout, "%s", buf);
13232 if eval $compile; then
13234 $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out
13235 if cmp tryp.c tryp.out >/dev/null 2>&1; then
13237 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
13239 : now check for fflushall behaviour
13240 case "$fflushall" in
13241 '') set try -DTRY_FFLUSH_ALL $output
13242 if eval $compile; then
13244 (Now testing the other method--but note that this also may fail.)
13247 ./try$exe_ext 2>/dev/null
13248 if $test -s try.out -a "X$?" = X42; then
13249 fflushall="`$cat try.out`"
13252 $rm -f core try.core core.try.*
13253 case "$fflushall" in
13255 Whew. Flushing explicitly all the stdio streams works.
13257 fflushall="$define"
13260 Sigh. Flushing explicitly all the stdio streams doesn't work.
13265 Cannot figure out whether flushing stdio streams explicitly works or not.
13266 I'm assuming it doesn't.
13272 "$define"|true|[yY]*)
13273 fflushall="$define"
13281 All is futile. Even fflush(stdin) clobbers input pipes!
13288 $rm -f core tryp.c tryp.core core.tryp.*
13290 *) fflushall="$undef"
13294 case "$fflushNULL$fflushall" in
13297 OK, I give up. I cannot figure out how to flush pending stdio output.
13298 We won't be flushing handles at all before fork/exec/popen.
13302 $rm -f try.* try$exe_ext
13304 : Store the full pathname to the ar program for use in the C program
13305 : Respect a hint or command line value for full_ar.
13310 : Store the full pathname to the sed program for use in the C program
13313 : see what type gids are declared as in the kernel
13315 echo "Looking for the type for group ids returned by getgid()."
13316 set gid_t gidtype xxx stdio.h sys/types.h
13320 xxx=`./findhdr sys/user.h`
13321 set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
13323 unsigned) dflt="$1 $2" ;;
13327 *) dflt="$gidtype";;
13330 gid_t) echo "gid_t found." ;;
13331 *) rp="What is the type for group ids returned by getgid()?"
13339 *_t) zzz="$gidtype" ;;
13342 echo "Checking the size of $zzz..." >&4
13344 #include <sys/types.h>
13347 printf("%d\n", (int)sizeof($gidtype));
13352 if eval $compile_ok; then
13356 echo "(I can't execute the test program--guessing $gidsize.)" >&4
13359 echo "Your $zzz is $gidsize bytes long."
13364 echo "(I can't compile the test program--guessing $gidsize.)" >&4
13370 *_t) zzz="$gidtype" ;;
13373 echo "Checking the sign of $zzz..." >&4
13375 #include <sys/types.h>
13386 if eval $compile; then
13390 echo "(I can't execute the test program--guessing unsigned.)" >&4
13394 1) echo "Your $zzz is unsigned." ;;
13395 -1) echo "Your $zzz is signed." ;;
13401 echo "(I can't compile the test program--guessing unsigned.)" >&4
13407 if $test X"$quadtype" != X; then
13409 echo "Checking how to print 64-bit integers..." >&4
13411 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
13412 $cat >try.c <<'EOCP'
13413 #include <sys/types.h>
13416 int q = 12345678901;
13417 printf("%ld\n", q);
13421 if eval $compile; then
13422 yyy=`./try$exe_ext`
13425 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
13426 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
13427 echo "We will use %d."
13433 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
13434 $cat >try.c <<'EOCP'
13435 #include <sys/types.h>
13438 long q = 12345678901;
13439 printf("%ld\n", q);
13443 if eval $compile; then
13444 yyy=`./try$exe_ext`
13447 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
13448 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
13449 echo "We will use %ld."
13455 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
13456 $cat >try.c <<'EOCP'
13457 #include <sys/types.h>
13458 #include <inttypes.h>
13461 int64_t q = 12345678901;
13462 printf("%" PRId64 "\n", q);
13466 if eval $compile; then
13467 yyy=`./try$exe_ext`
13470 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
13471 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
13472 echo "We will use the C9X style."
13478 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
13479 $cat >try.c <<'EOCP'
13480 #include <sys/types.h>
13483 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
13484 printf("%lld\n", q);
13488 if eval $compile; then
13489 yyy=`./try$exe_ext`
13492 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
13493 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
13494 echo "We will use the %lld style."
13500 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
13502 #include <sys/types.h>
13505 $quadtype q = 12345678901;
13506 printf("%Ld\n", q);
13510 if eval $compile; then
13511 yyy=`./try$exe_ext`
13514 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
13515 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
13516 echo "We will use %Ld."
13522 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
13524 #include <sys/types.h>
13527 $quadtype q = 12345678901;
13528 printf("%qd\n", q);
13532 if eval $compile; then
13533 yyy=`./try$exe_ext`
13536 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
13537 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
13538 echo "We will use %qd."
13544 if $test X"$sPRId64" = X; then
13545 echo "Cannot figure out how to print 64-bit integers." >&4
13553 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
13554 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
13556 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
13557 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";
13563 $echo "Checking the format strings to be used for Perl's internal types..." >&4
13565 if $test X"$ivsize" = X8; then
13566 ivdformat="$sPRId64"
13567 uvuformat="$sPRIu64"
13568 uvoformat="$sPRIo64"
13569 uvxformat="$sPRIx64"
13570 uvXUformat="$sPRIXU64"
13572 if $test X"$ivsize" = X"$longsize"; then
13579 if $test X"$ivsize" = X"$intsize"; then
13587 if $test X"$ivsize" = X"$shortsize"; then
13598 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
13599 nveformat="$sPRIeldbl"
13600 nvfformat="$sPRIfldbl"
13601 nvgformat="$sPRIgldbl"
13602 nvEUformat="$sPRIEUldbl"
13603 nvFUformat="$sPRIFUldbl"
13604 nvGUformat="$sPRIGUldbl"
13614 case "$ivdformat" in
13615 '') echo "$0: Fatal: failed to find format strings, cannot continue." >& 4
13622 $echo "Checking the format string to be used for gids..." >&4
13625 -1) if $test X"$gidsize" = X"$ivsize"; then
13626 gidformat="$ivdformat"
13628 if $test X"$gidsize" = X"$longsize"; then
13631 if $test X"$gidsize" = X"$intsize"; then
13634 if $test X"$gidsize" = X"$shortsize"; then
13641 *) if $test X"$gidsize" = X"$uvsize"; then
13642 gidformat="$uvuformat"
13644 if $test X"$gidsize" = X"$longsize"; then
13647 if $test X"$gidsize" = X"$intsize"; then
13650 if $test X"$gidsize" = X"$shortsize"; then
13659 : see if getgroups exists
13660 set getgroups d_getgrps
13663 : see if setgroups exists
13664 set setgroups d_setgrps
13668 : Find type of 2nd arg to 'getgroups()' and 'setgroups()'
13670 case "$d_getgrps$d_setgrps" in
13672 case "$groupstype" in
13673 '') dflt="$gidtype" ;;
13674 *) dflt="$groupstype" ;;
13677 What type of pointer is the second argument to getgroups() and setgroups()?
13678 Usually this is the same as group ids, $gidtype, but not always.
13681 rp='What type pointer is the second argument to getgroups() and setgroups()?'
13685 *) groupstype="$gidtype";;
13689 echo "Checking if your $make program sets \$(MAKE)..." >&4
13690 case "$make_set_make" in
13692 $sed 's/^X //' > testmake.mak << 'EOF'
13694 X @echo 'maketemp="$(MAKE)"'
13696 case "`$make -f testmake.mak 2>/dev/null`" in
13697 *maketemp=*) make_set_make='#' ;;
13698 *) make_set_make="MAKE=$make" ;;
13700 $rm -f testmake.mak
13703 case "$make_set_make" in
13704 '#') echo "Yup, it does.";;
13705 *) echo "Nope, it doesn't.";;
13708 : see what type is used for mode_t
13709 rp="What is the type used for file modes for system calls (e.g. fchmod())?"
13710 set mode_t modetype int stdio.h sys/types.h
13713 : see if stdarg is available
13715 if $test `./findhdr stdarg.h`; then
13716 echo "<stdarg.h> found." >&4
13719 echo "<stdarg.h> NOT found." >&4
13723 : see if varags is available
13725 if $test `./findhdr varargs.h`; then
13726 echo "<varargs.h> found." >&4
13728 echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
13731 : set up the varargs testing programs
13732 $cat > varargs.c <<EOP
13734 #include <stdarg.h>
13737 #include <varargs.h>
13741 int f(char *p, ...)
13755 p = va_arg(ap, char *);
13760 $cat > varargs <<EOP
13762 if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
13771 : now check which varargs header should be included
13776 if `./varargs I_STDARG`; then
13778 elif `./varargs I_VARARGS`; then
13783 if `./varargs I_VARARGS`; then
13790 echo "I could not find the definition for va_dcl... You have problems..." >&4
13791 val="$undef"; set i_stdarg; eval $setvar
13792 val="$undef"; set i_varargs; eval $setvar
13797 case "$i_varhdr" in
13799 val="$define"; set i_stdarg; eval $setvar
13800 val="$undef"; set i_varargs; eval $setvar
13803 val="$undef"; set i_stdarg; eval $setvar
13804 val="$define"; set i_varargs; eval $setvar
13807 echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
13811 : see if we need va_copy
13813 case "$i_stdarg" in
13816 #include <stdarg.h>
13818 #$i_stdlib I_STDLIB
13820 #include <stdlib.h>
13822 #include <signal.h>
13825 ivfprintf(FILE *f, const char *fmt, va_list *valp)
13827 return vfprintf(f, fmt, *valp);
13831 myvfprintf(FILE *f, const char *fmt, va_list val)
13833 return ivfprintf(f, fmt, &val);
13837 myprintf(char *fmt, ...)
13840 va_start(val, fmt);
13841 return myvfprintf(stdout, fmt, val);
13845 main(int ac, char **av)
13847 signal(SIGSEGV, exit);
13849 myprintf("%s%cs all right, then\n", "that", '\'');
13854 if eval $compile && ./try 2>&1 >/dev/null; then
13856 "that's all right, then")
13862 yes) echo "It seems that you don't need va_copy()." >&4
13863 need_va_copy="$undef"
13865 *) echo "It seems that va_copy() or similar will be needed." >&4
13866 need_va_copy="$define"
13869 $rm -f try.* core core.* *.core *.core.*
13871 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
13875 : define a fucntion to check prototypes
13876 $cat > protochk <<EOSH
13879 optimize="$optimize"
13881 prototype="$prototype"
13886 $cat >> protochk <<'EOSH'
13891 while test $# -ge 2; do
13893 $define) echo "#include <$2>" >> try.c ;;
13894 literal) echo "$2" >> try.c ;;
13898 test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
13899 cat >> try.c <<'EOCP'
13900 #ifdef CAN_PROTOTYPE
13901 #define _(args) args
13906 echo "$foo" >> try.c
13907 echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
13908 $cc $optimize $ccflags -c try.c > /dev/null 2>&1
13914 $eunicefix protochk
13916 : see what type is used for size_t
13917 rp="What is the type used for the length parameter for string functions?"
13918 set size_t sizetype 'unsigned int' stdio.h sys/types.h
13921 : check for type of arguments to gethostbyaddr.
13922 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
13923 case "$d_gethbyaddr" in
13927 Checking to see what type of arguments are accepted by gethostbyaddr().
13929 hdrs="$define sys/types.h
13930 $d_socket sys/socket.h
13931 $i_niin netinet/in.h
13933 $i_unistd unistd.h"
13934 : The first arg can 'char *' or 'void *'
13935 : The second arg is some of integral type
13936 for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
13937 for yyy in size_t long int; do
13938 case "$netdb_host_type" in
13939 '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
13940 if ./protochk "$try" $hdrs; then
13941 echo "Your system accepts $xxx for the first arg."
13942 echo "...and $yyy for the second arg."
13943 netdb_host_type="$xxx"
13944 netdb_hlen_type="$yyy"
13950 : In case none of those worked, prompt the user.
13951 case "$netdb_host_type" in
13952 '') rp='What is the type for the 1st argument to gethostbyaddr?'
13955 netdb_host_type=$ans
13956 rp='What is the type for the 2nd argument to gethostbyaddr?'
13959 netdb_hlen_type=$ans
13963 *) : no gethostbyaddr, so pick harmless defaults
13964 netdb_host_type='char *'
13965 netdb_hlen_type="$sizetype"
13968 # Remove the "const" if needed. -- but then we'll have a
13970 # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
13973 : check for type of argument to gethostbyname.
13974 if test "X$netdb_name_type" = X ; then
13975 case "$d_gethbyname" in
13979 Checking to see what type of argument is accepted by gethostbyname().
13981 hdrs="$define sys/types.h
13982 $d_socket sys/socket.h
13983 $i_niin netinet/in.h
13985 $i_unistd unistd.h"
13986 for xxx in "const char *" "char *"; do
13987 case "$netdb_name_type" in
13988 '') try="extern struct hostent *gethostbyname($xxx);"
13989 if ./protochk "$try" $hdrs; then
13990 echo "Your system accepts $xxx."
13991 netdb_name_type="$xxx"
13996 : In case none of those worked, prompt the user.
13997 case "$netdb_name_type" in
13998 '') rp='What is the type for the 1st argument to gethostbyname?'
14001 netdb_name_type=$ans
14005 *) : no gethostbyname, so pick harmless default
14006 netdb_name_type='char *'
14011 : check for type of 1st argument to getnetbyaddr.
14012 if test "X$netdb_net_type" = X ; then
14013 case "$d_getnbyaddr" in
14017 Checking to see what type of 1st argument is accepted by getnetbyaddr().
14019 hdrs="$define sys/types.h
14020 $d_socket sys/socket.h
14021 $i_niin netinet/in.h
14023 $i_unistd unistd.h"
14024 for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
14025 case "$netdb_net_type" in
14026 '') try="extern struct netent *getnetbyaddr($xxx, int);"
14027 if ./protochk "$try" $hdrs; then
14028 echo "Your system accepts $xxx."
14029 netdb_net_type="$xxx"
14034 : In case none of those worked, prompt the user.
14035 case "$netdb_net_type" in
14036 '') rp='What is the type for the 1st argument to getnetbyaddr?'
14039 netdb_net_type=$ans
14043 *) : no getnetbyaddr, so pick harmless default
14044 netdb_net_type='long'
14048 : locate the preferred pager for this system
14054 [a-zA-Z]:/*) dflt=$pg;;
14058 [a-zA-Z]:/*) dflt=$more;;
14062 [a-zA-Z]:/*) dflt=$less;;
14065 '') dflt=/usr/ucb/more;;
14072 rp='What pager is used on your system?'
14076 : see what type pids are declared as in the kernel
14077 rp="What is the type of process ids on this system?"
14078 set pid_t pidtype int stdio.h sys/types.h
14081 : Find earliest binary compatible site_perl subdirectory perl can use.
14082 case "$bincompat5005" in
14083 "$define") xs_apiversion='5.005' ;;
14084 *) xs_apiversion=$version ;; # The current site_perl version.
14086 : Find earliest pure perl site_perl subdirectory perl can use.
14087 : The versioned directories started at 5.005.
14088 pm_apiversion='5.005'
14090 : check for length of pointer
14094 echo "Checking to see how big your pointers are..." >&4
14095 if test "$voidflags" -gt 7; then
14096 echo '#define VOID_PTR char *' > try.c
14098 echo '#define VOID_PTR void *' > try.c
14100 $cat >>try.c <<'EOCP'
14104 printf("%d\n", (int)sizeof(VOID_PTR));
14109 if eval $compile_ok; then
14111 echo "Your pointers are $ptrsize bytes long."
14114 echo "(I can't seem to compile the test program. Guessing...)" >&4
14115 rp="What is the size of a pointer (in bytes)?"
14123 : see if ar generates random libraries by itself
14125 echo "Checking how to generate random libraries on your machine..." >&4
14126 echo 'int bar1() { return bar2(); }' > bar1.c
14127 echo 'int bar2() { return 2; }' > bar2.c
14128 $cat > foo.c <<'EOP'
14129 int main() { printf("%d\n", bar1()); exit(0); }
14131 $cc $ccflags -c bar1.c >/dev/null 2>&1
14132 $cc $ccflags -c bar2.c >/dev/null 2>&1
14133 $cc $ccflags -c foo.c >/dev/null 2>&1
14134 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
14135 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
14136 ./foobar >/dev/null 2>&1; then
14137 echo "$ar appears to generate random libraries itself."
14140 elif $ar ts bar$_a >/dev/null 2>&1 &&
14141 $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
14142 ./foobar >/dev/null 2>&1; then
14143 echo "a table of contents needs to be added with '$ar ts'."
14150 ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
14151 $test -f $ranlib || ranlib=''
14154 if $test -n "$ranlib"; then
14155 echo "your system has '$ranlib'; we'll use that."
14158 echo "your system doesn't seem to support random libraries"
14159 echo "so we'll use lorder and tsort to order the libraries."
14166 : check for type of arguments to select.
14167 case "$selecttype" in
14168 '') case "$d_select" in
14172 Checking to see what type of arguments are accepted by select().
14174 hdrs="$define sys/types.h
14175 $i_systime sys/time.h
14176 $i_sysselct sys/select.h
14177 $d_socket sys/socket.h"
14178 : The first arg can be int, unsigned, or size_t
14179 : The last arg may or may not be 'const'
14181 : void pointer has been seen but using that
14182 : breaks the selectminbits test
14183 for xxx in 'fd_set *' 'int *'; do
14184 for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
14185 for tmo in 'struct timeval *' 'const struct timeval *'; do
14187 '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
14188 if ./protochk "$try" $hdrs; then
14189 echo "Your system accepts $xxx."
14198 '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
14199 case "$d_fd_set" in
14200 $define) dflt="fd_set *" ;;
14209 *) : no select, so pick a harmless default
14216 : check for the select 'width'
14217 case "$selectminbits" in
14218 '') case "$d_select" in
14222 Checking to see on how many bits at a time your select() operates...
14225 #include <sys/types.h>
14227 #$i_systime I_SYS_TIME
14228 #$i_systimek I_SYS_TIME_KERNEL
14233 # ifdef I_SYS_TIME_KERNEL
14236 # include <sys/time.h>
14237 # ifdef I_SYS_TIME_KERNEL
14241 #$i_sysselct I_SYS_SELECT
14242 #ifdef I_SYS_SELECT
14243 #include <sys/select.h>
14245 #$d_socket HAS_SOCKET
14247 # include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
14251 #define S sizeof(*(b))
14253 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
14254 #define NBITS (NBYTES * 8)
14263 fp = fopen("try.c", "r");
14269 b = ($selecttype)s;
14270 for (i = 0; i < NBITS; i++)
14274 select(fd + 1, b, 0, 0, &t);
14275 for (i = NBITS - 1; i > fd && FD_ISSET(i, b); i--);
14276 printf("%d\n", i + 1);
14281 if eval $compile_ok; then
14282 selectminbits=`./try`
14283 case "$selectminbits" in
14285 Cannot figure out on how many bits at a time your select() operates.
14286 I'll play safe and guess it is 32 bits.
14292 *) bits="$selectminbits bits" ;;
14294 echo "Your select() operates on $bits at a time." >&4
14296 rp='What is the minimum number of bits your select() operates on?'
14297 case "$byteorder" in
14298 1234|12345678) dflt=32 ;;
14303 selectminbits="$val"
14307 *) : no select, so pick a harmless default
14314 : Trace out the files included by signal.h, then look for SIGxxx names.
14315 : Remove SIGARRAYSIZE used by HPUX.
14316 : Remove SIGSTKSIZE used by Linux.
14317 : Remove SIGSTKSZ used by Posix.
14318 : Remove SIGTYP void lines used by OS2.
14319 : Some cpps, like os390, dont give the file name anywhere
14320 if [ "X$fieldn" = X ]; then
14321 : Just make some guesses. We check them later.
14322 xxx='/usr/include/signal.h /usr/include/sys/signal.h'
14324 xxx=`echo '#include <signal.h>' |
14325 $cppstdin $cppminus $cppflags 2>/dev/null |
14326 $grep '^[ ]*#.*include' |
14327 $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sort | $uniq`
14329 : Check this list of files to be sure we have parsed the cpp output ok.
14330 : This will also avoid potentially non-existent files, such
14333 for xx in $xxx /dev/null ; do
14334 $test -f "$xx" && xxxfiles="$xxxfiles $xx"
14336 : If we have found no files, at least try signal.h
14337 case "$xxxfiles" in
14338 '') xxxfiles=`./findhdr signal.h` ;;
14341 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
14342 print substr($2, 4, 20)
14344 $1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
14345 print substr($3, 4, 20)
14347 : Append some common names just in case the awk scan failed.
14348 xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
14349 xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
14350 xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
14351 xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
14352 xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
14354 : generate a few handy files for later
14355 $cat > signal.c <<'EOCP'
14356 #include <sys/types.h>
14357 #include <signal.h>
14361 /* Strange style to avoid deeply-nested #if/#else/#endif */
14364 # define NSIG (_NSIG)
14370 # define NSIG (SIGMAX+1)
14376 # define NSIG (SIG_MAX+1)
14382 # define NSIG (MAXSIG+1)
14388 # define NSIG (MAX_SIG+1)
14393 # ifdef SIGARRAYSIZE
14394 # define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
14400 # define NSIG (_sys_nsig) /* Solaris 2.5 */
14404 /* Default to some arbitrary number that's big enough to get most
14405 of the common signals.
14411 printf("NSIG %d\n", NSIG);
14417 echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
14419 printf "#ifdef SIG"; printf $1; printf "\n"
14420 printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
14421 printf $1; printf ");\n"
14425 printf "#endif /* JUST_NSIG */\n";
14426 printf "exit(0);\n}\n";
14429 $cat >signal.awk <<'EOP'
14430 BEGIN { ndups = 0 }
14431 $1 ~ /^NSIG$/ { nsig = $2 }
14432 ($1 !~ /^NSIG$/) && (NF == 2) {
14433 if ($2 > maxsig) { maxsig = $2 }
14434 if (sig_name[$2]) {
14435 dup_name[ndups] = $1
14436 dup_num[ndups] = $2
14448 printf("NSIG %d\n", nsig);
14449 for (n = 1; n < nsig; n++) {
14451 printf("%s %d\n", sig_name[n], sig_num[n])
14454 printf("NUM%d %d\n", n, n)
14457 for (n = 0; n < ndups; n++) {
14458 printf("%s %d\n", dup_name[n], dup_num[n])
14462 $cat >signal_cmd <<EOS
14464 if $test -s signal.lst; then
14465 echo "Using your existing signal.lst file"
14470 $cat >>signal_cmd <<'EOS'
14473 if eval $compile_ok; then
14474 ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
14476 echo "(I can't seem be able to compile the whole test program)" >&4
14477 echo "(I'll try it in little pieces.)" >&4
14478 set signal -DJUST_NSIG
14479 if eval $compile_ok; then
14480 ./signal$_exe > signal.nsg
14483 echo "I can't seem to figure out how many signals you have." >&4
14484 echo "Guessing 50." >&4
14485 echo 'NSIG 50' > signal.nsg
14487 : Now look at all the signal names, one at a time.
14488 for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
14489 $cat > signal.c <<EOCP
14490 #include <sys/types.h>
14491 #include <signal.h>
14494 printf("$xx %d\n", SIG${xx});
14499 if eval $compile; then
14500 echo "SIG${xx} found."
14501 ./signal$_exe >> signal.ls1
14503 echo "SIG${xx} NOT found."
14506 if $test -s signal.ls1; then
14507 $cat signal.nsg signal.ls1 |
14508 $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
14512 if $test -s signal.lst; then
14515 echo "(AAK! I can't compile the test programs -- Guessing)" >&4
14516 echo 'kill -l' >signal
14517 set X `csh -f <signal`
14521 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
14523 echo $@ | $tr ' ' $trnl | \
14524 $awk '{ printf "%s %d\n", $1, ++s; }
14525 END { printf "NSIG %d\n", ++s }' >signal.lst
14527 $rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
14529 chmod a+x signal_cmd
14530 $eunicefix signal_cmd
14532 : generate list of signal names
14534 case "$sig_name_init" in
14536 *) case "$sig_num_init" in
14537 ''|*,*) doinit=yes ;;
14542 echo "Generating a list of signal names and numbers..." >&4
14544 sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
14545 sig_name=`$awk 'BEGIN { printf "ZERO " }
14546 !/^NSIG/ { printf "%s ", $1 }' signal.lst`
14547 sig_num=`$awk 'BEGIN { printf "0 " }
14548 !/^NSIG/ { printf "%d ", $2 }' signal.lst`
14549 sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
14550 !/^NSIG/ { printf "\"%s\", ", $1 }
14551 END { printf "0\n" }' signal.lst`
14552 sig_num_init=`$awk 'BEGIN { printf "0, " }
14553 !/^NSIG/ { printf "%d, ", $2}
14554 END { printf "0\n"}' signal.lst`
14557 echo "The following $sig_count signals are available:"
14559 echo $sig_name | $awk \
14560 'BEGIN { linelen = 0 }
14562 for (i = 1; i <= NF; i++) {
14563 name = "SIG" $i " "
14564 linelen = linelen + length(name)
14565 if (linelen > 70) {
14567 linelen = length(name)
14573 sig_size=`echo $sig_name | awk '{print NF}'`
14574 $rm -f signal signal.c signal.awk signal.lst signal_cmd
14577 case "$sizetype" in
14578 *_t) zzz="$sizetype" ;;
14579 *) zzz="filesize" ;;
14581 echo "Checking the size of $zzz..." >&4
14583 #include <sys/types.h>
14586 printf("%d\n", (int)sizeof($sizetype));
14591 if eval $compile_ok; then
14595 echo "(I can't execute the test program--guessing $sizesize.)" >&4
14598 echo "Your $zzz size is $sizesize bytes."
14603 echo "(I can't compile the test program--guessing $sizesize.)" >&4
14607 : check for socklen_t
14609 echo "Checking to see if you have socklen_t..." >&4
14611 #include <sys/types.h>
14612 #$d_socket HAS_SOCKET
14614 #include <sys/socket.h>
14616 int main() { socklen_t x = 16; }
14619 if eval $compile; then
14621 echo "You have socklen_t."
14624 echo "You do not have socklen_t."
14625 case "$sizetype" in
14626 size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
14633 : see if this is a socks.h system
14634 set socks.h i_socks
14637 : check for type of the size argument to socket calls
14638 case "$d_socket" in
14642 Checking to see what type is the last argument of accept().
14645 case "$d_socklen_t" in
14646 "$define") yyy="$yyy socklen_t"
14648 yyy="$yyy $sizetype int long unsigned"
14649 for xxx in $yyy; do
14650 case "$socksizetype" in
14651 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
14652 case "$usesocks" in
14654 if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h literal '#define INCLUDE_PROTOTYPES' $i_socks socks.h.; then
14655 echo "Your system accepts '$xxx *' for the last argument of accept()."
14656 socksizetype="$xxx"
14659 *) if ./protochk "$try" $i_systypes sys/types.h $d_socket sys/socket.h; then
14660 echo "Your system accepts '$xxx *' for the last argument of accept()."
14661 socksizetype="$xxx"
14668 : In case none of those worked, prompt the user.
14669 case "$socksizetype" in
14670 '') rp='What is the type for socket address structure sizes?'
14677 *) : no sockets, so pick relatively harmless default
14682 : see what type is used for signed size_t
14683 set ssize_t ssizetype int stdio.h sys/types.h
14686 $cat > ssize.c <<EOM
14688 #include <sys/types.h>
14689 #define Size_t $sizetype
14690 #define SSize_t $dflt
14693 if (sizeof(Size_t) == sizeof(SSize_t))
14695 else if (sizeof(Size_t) == sizeof(int))
14704 if eval $compile_ok && ./ssize > /dev/null; then
14705 ssizetype=`./ssize`
14706 echo "I'll be using $ssizetype for functions returning a byte count." >&4
14709 Help! I can't compile and run the ssize_t test program: please enlighten me!
14710 (This is probably a misconfiguration in your system or libraries, and
14711 you really ought to fix it. Still, I'll try anyway.)
14713 I need a type that is the same size as $sizetype, but is guaranteed to
14714 be signed. Common values are ssize_t, int and long.
14717 rp="What signed type is the same size as $sizetype?"
14721 $rm -f ssize ssize.*
14723 : see what type of char stdio uses.
14725 echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
14726 if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
14727 echo "Your stdio uses unsigned chars." >&4
14728 stdchar="unsigned char"
14730 echo "Your stdio uses signed chars." >&4
14737 : see if time exists
14739 if test "X$d_time" = X -o X"$timetype" = X; then
14740 if set time val -f d_time; eval $csym; $val; then
14741 echo 'time() found.' >&4
14743 rp="What is the type returned by time() on this system?"
14744 set time_t timetype long stdio.h sys/types.h
14747 echo 'time() not found, hope that will do.' >&4
14755 : see what type uids are declared as in the kernel
14757 echo "Looking for the type for user ids returned by getuid()."
14758 set uid_t uidtype xxx stdio.h sys/types.h
14762 xxx=`./findhdr sys/user.h`
14763 set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
14765 unsigned) dflt="$1 $2" ;;
14769 *) dflt="$uidtype";;
14772 uid_t) echo "uid_t found." ;;
14773 *) rp="What is the type for user ids returned by getuid()?"
14781 *_t) zzz="$uidtype" ;;
14784 echo "Checking the size of $zzz..." >&4
14786 #include <sys/types.h>
14789 printf("%d\n", (int)sizeof($uidtype));
14794 if eval $compile_ok; then
14798 echo "(I can't execute the test program--guessing $uidsize.)" >&4
14801 echo "Your $zzz is $uidsize bytes long."
14806 echo "(I can't compile the test program--guessing $uidsize.)" >&4
14811 *_t) zzz="$uidtype" ;;
14814 echo "Checking the sign of $zzz..." >&4
14816 #include <sys/types.h>
14827 if eval $compile; then
14831 echo "(I can't execute the test program--guessing unsigned.)" >&4
14835 1) echo "Your $zzz is unsigned." ;;
14836 -1) echo "Your $zzz is signed." ;;
14842 echo "(I can't compile the test program--guessing unsigned.)" >&4
14848 $echo "Checking the format string to be used for uids..." >&4
14851 -1) if $test X"$uidsize" = X"$ivsize"; then
14852 uidformat="$ivdformat"
14854 if $test X"$uidsize" = X"$longsize"; then
14857 if $test X"$uidsize" = X"$intsize"; then
14860 if $test X"$uidsize" = X"$shortsize"; then
14867 *) if $test X"$uidsize" = X"$uvsize"; then
14868 uidformat="$uvuformat"
14870 if $test X"$uidsize" = X"$longsize"; then
14873 if $test X"$uidsize" = X"$intsize"; then
14876 if $test X"$uidsize" = X"$shortsize"; then
14885 : see if dbm.h is available
14886 : see if dbmclose exists
14887 set dbmclose d_dbmclose
14890 case "$d_dbmclose" in
14900 *) set rpcsvc/dbm.h i_rpcsvcdbm
14905 *) echo "We won't be including <dbm.h>"
14915 : see if this is a sys/file.h system
14920 : do we need to include sys/file.h ?
14924 if $h_sysfile; then
14926 echo "We'll be including <sys/file.h>." >&4
14929 echo "We won't be including <sys/file.h>." >&4
14939 : see if fcntl.h is there
14944 : see if we can include fcntl.h
14950 echo "We'll be including <fcntl.h>." >&4
14953 if $h_sysfile; then
14954 echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
14956 echo "We won't be including <fcntl.h>." >&4
14968 : see if this is a iconv.h system
14969 set iconv.h i_iconv
14972 : see if this is a ieeefp.h system
14973 set ieeefp.h i_ieeefp
14976 : see if this is a libutil.h system
14977 set libutil.h i_libutil
14980 : see if locale.h is available
14981 set locale.h i_locale
14984 : see if mach cthreads are available
14985 if test "X$usethreads" = "X$define"; then
14986 set mach/cthreads.h i_machcthr
14989 i_machcthr="$undef"
14994 : see if this is a math.h system
14998 : see if this is a mntent.h system
14999 set mntent.h i_mntent
15002 : see if ndbm.h is available
15007 : see if dbm_open exists
15008 set dbm_open d_dbm_open
15010 case "$d_dbm_open" in
15013 echo "We won't be including <ndbm.h>"
15022 : see if net/errno.h is available
15024 set net/errno.h val
15027 : Unfortunately, it causes problems on some systems. Arrgh.
15030 cat > try.c <<'EOM'
15033 #include <net/errno.h>
15039 if $cc $ccflags -c try.c >/dev/null 2>&1; then
15040 echo "We'll be including <net/errno.h>." >&4
15042 echo "We won't be including <net/errno.h>." >&4
15051 : see if netinet/tcp.h is available
15052 set netinet/tcp.h i_netinettcp
15055 : see if this is a poll.h system
15059 : see if this is a prot.h system
15064 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4
15065 $cat <<'EOSH' > Cppsym.know
15066 a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
15067 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
15068 alliant alpha am29000 AM29000 amiga AMIGAOS AMIX
15069 ansi ANSI_C_SOURCE apollo ardent atarist att386 att3b BeOS
15070 BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
15071 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
15072 bull c cadmus clipper CMU COFF COMPILER_VERSION
15073 concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
15074 CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
15075 Dynix DynixPTX ELF encore EPI EXTENSIONS FILE_OFFSET_BITS
15076 FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
15077 GNU_SOURCE GNUC GNUC_MINOR GO32 gould GOULD_PN
15078 H3050R H3050RX hbullx20 hcx host_mips
15079 hp200 hp300 hp700 HP700 hp800 hp9000
15080 hp9000s200 hp9000s300 hp9000s400 hp9000s500
15081 hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
15082 i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
15083 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
15084 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
15085 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
15086 LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
15087 Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
15088 LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
15089 M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
15090 M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
15091 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
15092 MATH_HAS_NO_SIDE_EFFECTS
15093 mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
15094 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
15095 mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
15096 MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
15097 mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
15098 NetBSD news1500 news1700 news1800 news1900 news3700
15099 news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
15100 ns32016 ns32332 ns32k nsc32000
15101 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
15102 pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
15103 pc532 pdp11 PGC PIC plexus PORTAR posix
15104 POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
15105 POSIX_C_SOURCE POSIX_SOURCE POWER
15106 PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
15107 riscix riscos RT scs SCO sequent sgi SGI_SOURCE sinix
15108 SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
15109 sony sony_news sonyrisc sparc sparclite spectrum
15110 stardent stdc STDC_EXT stratos sun sun3 sun386
15111 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
15112 SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
15113 SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
15114 sysV68 sysV88 Tek4132 Tek4300 titan
15115 tower tower32 tower32_200 tower32_600 tower32_700
15116 tower32_800 tower32_850 tss
15117 u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
15118 ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
15119 unix UNIX95 UNIX99 unixpc unos USGr4 USGr4_2
15120 Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
15121 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
15122 XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
15125 # Maybe put other stuff here too.
15126 cat <<EOSH >>Cppsym.know
15129 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
15130 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
15131 $cat Cppsym.know > Cppsym.c
15132 $cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
15133 $rm -f Cppsym.a Cppsym.b Cppsym.c
15134 cat <<EOSH > Cppsym
15136 if $test \$# -gt 0; then
15137 echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
15138 if $test -s Cppsym.got; then
15145 $tr " " "$trnl" | ./Cppsym.try
15151 cat <<EOSH > Cppsym.try
15153 cat <<'EOCP' > try.c
15159 cat <<'EOSH' >> Cppsym.try
15161 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
15162 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
15163 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
15164 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
15168 cat <<EOSH >> Cppsym.try
15170 case "$osname-$gccversion" in
15171 irix-) ccflags="\$ccflags -woff 1178" ;;
15172 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
15174 $cc -o try $optimize \$ccflags $ldflags try.c $libs && ./try$exe_ext
15176 chmod +x Cppsym.try
15177 $eunicefix Cppsym.try
15178 ./Cppsym < Cppsym.know > Cppsym.true
15179 : now check the C compiler for additional symbols
15180 postprocess_cc_v=''
15182 aix) postprocess_cc_v="|$tr , ' '" ;;
15189 for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
15192 -D*) echo "\$i" | $sed 's/^-D//';;
15193 -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
15198 postprocess_cc_v=''
15201 ./ccsym > ccsym1.raw
15202 if $test -s ccsym1.raw; then
15203 $sort ccsym1.raw | $uniq >ccsym.raw
15205 mv ccsym1.raw ccsym.raw
15208 $awk '/\=/ { print $0; next }
15209 { print $0"=1" }' ccsym.raw >ccsym.list
15210 $awk '/\=/ { print $0; next }
15211 { print $0"=1" }' Cppsym.true >ccsym.true
15212 $comm -13 ccsym.true ccsym.list >ccsym.own
15213 $comm -12 ccsym.true ccsym.list >ccsym.com
15214 $comm -23 ccsym.true ccsym.list >ccsym.cpp
15216 if $test -z ccsym.raw; then
15217 echo "Your C compiler doesn't seem to define any symbols!" >&4
15219 echo "However, your C preprocessor defines the following symbols:"
15222 cppsymbols=`$cat Cppsym.true`
15223 cppsymbols=`echo $cppsymbols`
15224 cppccsymbols="$cppsymbols"
15226 if $test -s ccsym.com; then
15227 echo "Your C compiler and pre-processor define these symbols:"
15228 $sed -e 's/\(..*\)=.*/\1/' ccsym.com
15231 cppccsymbols=`$cat ccsym.com`
15232 cppccsymbols=`echo $cppccsymbols`
15233 $test "$silent" || sleep 1
15235 if $test -s ccsym.cpp; then
15236 $test "$also" && echo " "
15237 echo "Your C pre-processor ${also}defines the following symbols:"
15238 $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
15240 cppsymbols=`$cat ccsym.cpp`
15241 cppsymbols=`echo $cppsymbols`
15242 $test "$silent" || sleep 1
15244 if $test -s ccsym.own; then
15245 $test "$also" && echo " "
15246 echo "Your C compiler ${also}defines the following cpp symbols:"
15247 $sed -e 's/\(..*\)=1/\1/' ccsym.own
15248 $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
15249 ccsymbols=`$cat ccsym.own`
15250 ccsymbols=`echo $ccsymbols`
15251 $test "$silent" || sleep 1
15254 $rm -f ccsym* Cppsym.*
15256 : see if this is a termio system
15260 if $test `./findhdr termios.h`; then
15261 set tcsetattr i_termios
15267 "$define") echo "You have POSIX termios.h... good!" >&4;;
15268 *) if ./Cppsym pyr; then
15269 case "`/bin/universe`" in
15270 ucb) if $test `./findhdr sgtty.h`; then
15272 echo "<sgtty.h> found." >&4
15274 echo "System is pyramid with BSD universe."
15275 echo "<sgtty.h> not found--you could have problems." >&4
15277 *) if $test `./findhdr termio.h`; then
15279 echo "<termio.h> found." >&4
15281 echo "System is pyramid with USG universe."
15282 echo "<termio.h> not found--you could have problems." >&4
15286 if $test `./findhdr termio.h`; then
15287 echo "<termio.h> found." >&4
15289 elif $test `./findhdr sgtty.h`; then
15290 echo "<sgtty.h> found." >&4
15293 echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
15296 if $test `./findhdr sgtty.h`; then
15297 echo "<sgtty.h> found." >&4
15299 elif $test `./findhdr termio.h`; then
15300 echo "<termio.h> found." >&4
15303 echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
15307 set i_termio; eval $setvar
15308 val=$val2; set i_sgtty; eval $setvar
15309 val=$val3; set i_termios; eval $setvar
15311 : see if this is a shadow.h system
15312 set shadow.h i_shadow
15315 : see if stddef is available
15316 set stddef.h i_stddef
15319 : see if this is a sunmath.h system
15320 set sunmath.h i_sunmath
15323 : see if sys/access.h is available
15324 set sys/access.h i_sysaccess
15327 : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
15328 set sys/filio.h i_sysfilio
15331 if $test `./findhdr sys/ioctl.h`; then
15333 echo '<sys/ioctl.h> found.' >&4
15336 if $test $i_sysfilio = "$define"; then
15337 echo '<sys/ioctl.h> NOT found.' >&4
15339 $test $i_sgtty = "$define" && xxx="sgtty.h"
15340 $test $i_termio = "$define" && xxx="termio.h"
15341 $test $i_termios = "$define" && xxx="termios.h"
15342 echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
15349 : see if this is a syslog.h system
15350 set syslog.h i_syslog
15354 : see if this is a sys/mode.h system
15355 set sys/mode.h i_sysmode
15358 : see if sys/resource.h has to be included
15359 set sys/resource.h i_sysresrc
15362 : see if sys/security.h is available
15363 set sys/security.h i_syssecrt
15366 : see if this is a sys/statvfs.h system
15367 set sys/statvfs.h i_sysstatvfs
15370 : see if this is a sys/uio.h system
15371 set sys/uio.h i_sysuio
15374 : see if this is a sys/un.h system
15375 set sys/un.h i_sysun
15379 : see if this is a sys/utsname.h system
15380 set sys/utsname.h i_sysutsname
15383 : see if this is a syswait system
15384 set sys/wait.h i_syswait
15387 : see if this is a ustat.h system
15388 set ustat.h i_ustat
15391 : see if this is an utime system
15392 set utime.h i_utime
15395 : see if this is a values.h system
15396 set values.h i_values
15399 : see if this is a vfork system
15402 set vfork.h i_vfork
15410 : see if gdbm.h is available
15415 : see if gdbm_open exists
15416 set gdbm_open d_gdbm_open
15418 case "$d_gdbm_open" in
15421 echo "We won't be including <gdbm.h>"
15431 echo "Looking for extensions..." >&4
15432 : If we are using the old config.sh, known_extensions may contain
15433 : old or inaccurate or duplicate values.
15434 known_extensions=''
15435 nonxs_extensions=''
15436 : We do not use find because it might not be available.
15437 : We do not just use MANIFEST because the user may have dropped
15438 : some additional extensions into the source tree and expect them
15441 : Function to recursively find available extensions, ignoring DynaLoader
15442 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
15446 DynaLoader|dynaload) ;;
15448 if $test -f $xxx/$xxx.xs; then
15449 known_extensions="$known_extensions $1$xxx";
15450 elif $test -f $xxx/Makefile.PL; then
15451 nonxs_extensions="$nonxs_extensions $1$xxx";
15453 if $test -d $xxx -a $# -lt 10; then
15456 eval $find_extensions;
15468 eval $find_extensions
15469 set X $nonxs_extensions
15471 nonxs_extensions="$*"
15472 set X $known_extensions
15474 known_extensions="$*"
15477 : Now see which are supported on this system.
15479 for xxx in $known_extensions ; do
15483 $define) avail_ext="$avail_ext $xxx" ;;
15486 GDBM_File|gdbm_fil)
15488 $define) avail_ext="$avail_ext $xxx" ;;
15491 NDBM_File|ndbm_fil)
15494 case "$osname-$use64bitint" in
15497 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
15500 *) avail_ext="$avail_ext $xxx" ;;
15505 ODBM_File|odbm_fil)
15506 case "${i_dbm}${i_rpcsvcdbm}" in
15508 case "$osname-$use64bitint" in
15511 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
15514 *) avail_ext="$avail_ext $xxx" ;;
15520 case "$useposix" in
15521 true|define|y) avail_ext="$avail_ext $xxx" ;;
15525 case "$useopcode" in
15526 true|define|y) avail_ext="$avail_ext $xxx" ;;
15530 case "$d_socket" in
15531 true|$define|y) avail_ext="$avail_ext $xxx" ;;
15534 Sys/Syslog|sys/syslog)
15535 : XXX syslog requires socket
15536 case "$d_socket" in
15537 true|$define|y) avail_ext="$avail_ext $xxx" ;;
15541 case "$usethreads" in
15542 true|$define|y) avail_ext="$avail_ext $xxx" ;;
15546 : XXX Do we need a useipcsysv variable here
15547 case "${d_msg}${d_sem}${d_shm}" in
15548 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
15551 *) avail_ext="$avail_ext $xxx"
15560 : Now see which nonxs extensions are supported on this system.
15561 : For now assume all are.
15563 for xxx in $nonxs_extensions ; do
15565 *) nonxs_ext="$nonxs_ext $xxx"
15577 A number of extensions are supplied with $package. You may choose to
15578 compile these extensions for dynamic loading (the default), compile
15579 them into the $package executable (static loading), or not include
15580 them at all. Answer "none" to include no extensions.
15581 Note that DynaLoader is always built and need not be mentioned here.
15584 case "$dynamic_ext" in
15585 '') dflt="$avail_ext" ;;
15586 *) dflt="$dynamic_ext"
15587 # Perhaps we are reusing an old out-of-date config.sh.
15590 if test X"$dynamic_ext" != X"$avail_ext"; then
15592 NOTICE: Your previous config.sh list may be incorrect.
15593 The extensions now available to you are
15595 but the default list from your previous config.sh is
15607 rp="What extensions do you wish to load dynamically?"
15610 none) dynamic_ext=' ' ;;
15611 *) dynamic_ext="$ans" ;;
15614 case "$static_ext" in
15616 : Exclude those already listed in dynamic linking
15618 for xxx in $avail_ext; do
15619 case " $dynamic_ext " in
15621 *) dflt="$dflt $xxx" ;;
15628 *) dflt="$static_ext"
15635 rp="What extensions do you wish to load statically?"
15638 none) static_ext=' ' ;;
15639 *) static_ext="$ans" ;;
15644 A number of extensions are supplied with $package. Answer "none"
15645 to include no extensions.
15646 Note that DynaLoader is always built and need not be mentioned here.
15649 case "$static_ext" in
15650 '') dflt="$avail_ext" ;;
15651 *) dflt="$static_ext"
15652 # Perhaps we are reusing an old out-of-date config.sh.
15655 if test X"$static_ext" != X"$avail_ext"; then
15657 NOTICE: Your previous config.sh list may be incorrect.
15658 The extensions now available to you are
15660 but the default list from your previous config.sh is
15669 : Exclude those that are not xs extensions
15673 rp="What extensions do you wish to include?"
15676 none) static_ext=' ' ;;
15677 *) static_ext="$ans" ;;
15682 set X $dynamic_ext $static_ext $nonxs_ext
15686 : Remove libraries needed only for extensions
15687 : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
15688 : The exception is SunOS 4.x, which needs them.
15689 case "${osname}X${osvers}" in
15693 *) case "$usedl" in
15694 $define|true|[yY]*)
15695 set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
15699 *) perllibs="$libs"
15705 : Remove build directory name from cppstdin so it can be used from
15706 : either the present location or the final installed location.
15708 : Get out of the UU directory to get correct path name.
15710 case "$cppstdin" in
15712 echo "Stripping down cppstdin path name"
15718 : end of configuration questions
15720 echo "End of configuration questions."
15723 : back to where it started
15724 if test -d ../UU; then
15728 : configuration may be patched via a 'config.over' file
15729 if $test -f config.over; then
15732 rp='I see a config.over file. Do you wish to load it?'
15735 n*) echo "OK, I'll ignore it.";;
15737 echo "Configuration override changes have been loaded."
15742 : in case they want portability, strip down executable paths
15743 case "$d_portable" in
15746 echo "Stripping down executable paths..." >&4
15747 for file in $loclist $trylist; do
15749 eval $file=`basename $temp`
15754 : create config.sh file
15756 echo "Creating config.sh..." >&4
15757 $spitshell <<EOT >config.sh
15760 # This file was produced by running the Configure script. It holds all the
15761 # definitions figured out by Configure. Should you modify one of these values,
15762 # do not forget to propagate your changes by running "Configure -der". You may
15763 # instead choose to run each of the .SH files by yourself, or "Configure -S".
15766 # Package name : $package
15767 # Source directory : $src
15768 # Configuration time: $cf_time
15769 # Configured by : $cf_by
15770 # Target system : $myuname
15780 Revision='$Revision'
15787 alignbytes='$alignbytes'
15788 ansi2knr='$ansi2knr'
15789 aphostname='$aphostname'
15790 api_revision='$api_revision'
15791 api_subversion='$api_subversion'
15792 api_version='$api_version'
15793 api_versionstring='$api_versionstring'
15796 archlibexp='$archlibexp'
15797 archname64='$archname64'
15798 archname='$archname'
15799 archobjs='$archobjs'
15804 bincompat5005='$bincompat5005'
15808 byteorder='$byteorder'
15810 castflags='$castflags'
15813 cccdlflags='$cccdlflags'
15814 ccdlflags='$ccdlflags'
15816 ccflags_uselargefiles='$ccflags_uselargefiles'
15818 ccsymbols='$ccsymbols'
15819 ccversion='$ccversion'
15821 cf_email='$cf_email'
15823 charsize='$charsize'
15827 clocktype='$clocktype'
15829 compress='$compress'
15830 contains='$contains'
15834 cpp_stuff='$cpp_stuff'
15835 cppccsymbols='$cppccsymbols'
15836 cppflags='$cppflags'
15838 cppminus='$cppminus'
15840 cppstdin='$cppstdin'
15841 cppsymbols='$cppsymbols'
15842 crosscompile='$crosscompile'
15843 cryptlib='$cryptlib'
15845 d_Gconvert='$d_Gconvert'
15846 d_PRIEUldbl='$d_PRIEUldbl'
15847 d_PRIFUldbl='$d_PRIFUldbl'
15848 d_PRIGUldbl='$d_PRIGUldbl'
15849 d_PRIXU64='$d_PRIXU64'
15850 d_PRId64='$d_PRId64'
15851 d_PRIeldbl='$d_PRIeldbl'
15852 d_PRIfldbl='$d_PRIfldbl'
15853 d_PRIgldbl='$d_PRIgldbl'
15854 d_PRIi64='$d_PRIi64'
15855 d_PRIo64='$d_PRIo64'
15856 d_PRIu64='$d_PRIu64'
15857 d_PRIx64='$d_PRIx64'
15858 d_SCNfldbl='$d_SCNfldbl'
15859 d__fwalk='$d__fwalk'
15860 d_access='$d_access'
15861 d_accessx='$d_accessx'
15863 d_archlib='$d_archlib'
15866 d_attribut='$d_attribut'
15869 d_bincompat5005='$d_bincompat5005'
15871 d_bsdgetpgrp='$d_bsdgetpgrp'
15872 d_bsdsetpgrp='$d_bsdsetpgrp'
15874 d_casti32='$d_casti32'
15875 d_castneg='$d_castneg'
15876 d_charvspr='$d_charvspr'
15878 d_chroot='$d_chroot'
15879 d_chsize='$d_chsize'
15880 d_closedir='$d_closedir'
15884 d_cuserid='$d_cuserid'
15885 d_dbl_dig='$d_dbl_dig'
15886 d_difftime='$d_difftime'
15887 d_dirnamlen='$d_dirnamlen'
15888 d_dlerror='$d_dlerror'
15889 d_dlopen='$d_dlopen'
15890 d_dlsymun='$d_dlsymun'
15891 d_dosuid='$d_dosuid'
15892 d_drand48proto='$d_drand48proto'
15894 d_eaccess='$d_eaccess'
15895 d_endgrent='$d_endgrent'
15896 d_endhent='$d_endhent'
15897 d_endnent='$d_endnent'
15898 d_endpent='$d_endpent'
15899 d_endpwent='$d_endpwent'
15900 d_endsent='$d_endsent'
15901 d_eofnblk='$d_eofnblk'
15902 d_eunice='$d_eunice'
15903 d_fchmod='$d_fchmod'
15904 d_fchown='$d_fchown'
15906 d_fcntl_can_lock='$d_fcntl_can_lock'
15907 d_fd_macros='$d_fd_macros'
15908 d_fd_set='$d_fd_set'
15909 d_fds_bits='$d_fds_bits'
15910 d_fgetpos='$d_fgetpos'
15911 d_flexfnam='$d_flexfnam'
15914 d_fpathconf='$d_fpathconf'
15915 d_fpos64_t='$d_fpos64_t'
15916 d_frexpl='$d_frexpl'
15917 d_fs_data_s='$d_fs_data_s'
15918 d_fseeko='$d_fseeko'
15919 d_fsetpos='$d_fsetpos'
15920 d_fstatfs='$d_fstatfs'
15921 d_fstatvfs='$d_fstatvfs'
15923 d_ftello='$d_ftello'
15925 d_getcwd='$d_getcwd'
15926 d_getespwnam='$d_getespwnam'
15927 d_getfsstat='$d_getfsstat'
15928 d_getgrent='$d_getgrent'
15929 d_getgrps='$d_getgrps'
15930 d_gethbyaddr='$d_gethbyaddr'
15931 d_gethbyname='$d_gethbyname'
15932 d_gethent='$d_gethent'
15933 d_gethname='$d_gethname'
15934 d_gethostprotos='$d_gethostprotos'
15935 d_getlogin='$d_getlogin'
15936 d_getmnt='$d_getmnt'
15937 d_getmntent='$d_getmntent'
15938 d_getnbyaddr='$d_getnbyaddr'
15939 d_getnbyname='$d_getnbyname'
15940 d_getnent='$d_getnent'
15941 d_getnetprotos='$d_getnetprotos'
15942 d_getpagsz='$d_getpagsz'
15943 d_getpbyname='$d_getpbyname'
15944 d_getpbynumber='$d_getpbynumber'
15945 d_getpent='$d_getpent'
15946 d_getpgid='$d_getpgid'
15947 d_getpgrp2='$d_getpgrp2'
15948 d_getpgrp='$d_getpgrp'
15949 d_getppid='$d_getppid'
15950 d_getprior='$d_getprior'
15951 d_getprotoprotos='$d_getprotoprotos'
15952 d_getprpwnam='$d_getprpwnam'
15953 d_getpwent='$d_getpwent'
15954 d_getsbyname='$d_getsbyname'
15955 d_getsbyport='$d_getsbyport'
15956 d_getsent='$d_getsent'
15957 d_getservprotos='$d_getservprotos'
15958 d_getspnam='$d_getspnam'
15959 d_gettimeod='$d_gettimeod'
15960 d_gnulibc='$d_gnulibc'
15961 d_grpasswd='$d_grpasswd'
15962 d_hasmntopt='$d_hasmntopt'
15966 d_inetaton='$d_inetaton'
15967 d_int64_t='$d_int64_t'
15968 d_isascii='$d_isascii'
15970 d_isnanl='$d_isnanl'
15971 d_killpg='$d_killpg'
15972 d_lchown='$d_lchown'
15973 d_ldbl_dig='$d_ldbl_dig'
15975 d_locconv='$d_locconv'
15977 d_longdbl='$d_longdbl'
15978 d_longlong='$d_longlong'
15979 d_lseekproto='$d_lseekproto'
15981 d_madvise='$d_madvise'
15983 d_mbstowcs='$d_mbstowcs'
15984 d_mbtowc='$d_mbtowc'
15985 d_memchr='$d_memchr'
15986 d_memcmp='$d_memcmp'
15987 d_memcpy='$d_memcpy'
15988 d_memmove='$d_memmove'
15989 d_memset='$d_memset'
15991 d_mkdtemp='$d_mkdtemp'
15992 d_mkfifo='$d_mkfifo'
15993 d_mkstemp='$d_mkstemp'
15994 d_mkstemps='$d_mkstemps'
15995 d_mktime='$d_mktime'
15998 d_mprotect='$d_mprotect'
16000 d_msg_ctrunc='$d_msg_ctrunc'
16001 d_msg_dontroute='$d_msg_dontroute'
16002 d_msg_oob='$d_msg_oob'
16003 d_msg_peek='$d_msg_peek'
16004 d_msg_proxy='$d_msg_proxy'
16005 d_msgctl='$d_msgctl'
16006 d_msgget='$d_msgget'
16007 d_msgrcv='$d_msgrcv'
16008 d_msgsnd='$d_msgsnd'
16010 d_munmap='$d_munmap'
16011 d_mymalloc='$d_mymalloc'
16013 d_nv_preserves_uv='$d_nv_preserves_uv'
16014 d_nv_preserves_uv_bits='$d_nv_preserves_uv_bits'
16015 d_off64_t='$d_off64_t'
16016 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
16017 d_oldpthreads='$d_oldpthreads'
16018 d_oldsock='$d_oldsock'
16020 d_pathconf='$d_pathconf'
16022 d_perl_otherlibdirs='$d_perl_otherlibdirs'
16023 d_phostname='$d_phostname'
16026 d_portable='$d_portable'
16027 d_pthread_yield='$d_pthread_yield'
16029 d_pwchange='$d_pwchange'
16030 d_pwclass='$d_pwclass'
16031 d_pwcomment='$d_pwcomment'
16032 d_pwexpire='$d_pwexpire'
16033 d_pwgecos='$d_pwgecos'
16034 d_pwpasswd='$d_pwpasswd'
16035 d_pwquota='$d_pwquota'
16038 d_readdir='$d_readdir'
16039 d_readlink='$d_readlink'
16040 d_rename='$d_rename'
16041 d_rewinddir='$d_rewinddir'
16043 d_safebcpy='$d_safebcpy'
16044 d_safemcpy='$d_safemcpy'
16045 d_sanemcmp='$d_sanemcmp'
16046 d_sbrkproto='$d_sbrkproto'
16047 d_sched_yield='$d_sched_yield'
16048 d_scm_rights='$d_scm_rights'
16049 d_seekdir='$d_seekdir'
16050 d_select='$d_select'
16052 d_semctl='$d_semctl'
16053 d_semctl_semid_ds='$d_semctl_semid_ds'
16054 d_semctl_semun='$d_semctl_semun'
16055 d_semget='$d_semget'
16057 d_setegid='$d_setegid'
16058 d_seteuid='$d_seteuid'
16059 d_setgrent='$d_setgrent'
16060 d_setgrps='$d_setgrps'
16061 d_sethent='$d_sethent'
16062 d_setlinebuf='$d_setlinebuf'
16063 d_setlocale='$d_setlocale'
16064 d_setnent='$d_setnent'
16065 d_setpent='$d_setpent'
16066 d_setpgid='$d_setpgid'
16067 d_setpgrp2='$d_setpgrp2'
16068 d_setpgrp='$d_setpgrp'
16069 d_setprior='$d_setprior'
16070 d_setproctitle='$d_setproctitle'
16071 d_setpwent='$d_setpwent'
16072 d_setregid='$d_setregid'
16073 d_setresgid='$d_setresgid'
16074 d_setresuid='$d_setresuid'
16075 d_setreuid='$d_setreuid'
16076 d_setrgid='$d_setrgid'
16077 d_setruid='$d_setruid'
16078 d_setsent='$d_setsent'
16079 d_setsid='$d_setsid'
16080 d_setvbuf='$d_setvbuf'
16084 d_shmatprototype='$d_shmatprototype'
16085 d_shmctl='$d_shmctl'
16087 d_shmget='$d_shmget'
16088 d_sigaction='$d_sigaction'
16089 d_sigprocmask='$d_sigprocmask'
16090 d_sigsetjmp='$d_sigsetjmp'
16091 d_socket='$d_socket'
16092 d_socklen_t='$d_socklen_t'
16093 d_sockpair='$d_sockpair'
16094 d_socks5_init='$d_socks5_init'
16096 d_statblks='$d_statblks'
16097 d_statfs_f_flags='$d_statfs_f_flags'
16098 d_statfs_s='$d_statfs_s'
16099 d_statvfs='$d_statvfs'
16100 d_stdio_cnt_lval='$d_stdio_cnt_lval'
16101 d_stdio_ptr_lval='$d_stdio_ptr_lval'
16102 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
16103 d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt'
16104 d_stdio_stream_array='$d_stdio_stream_array'
16105 d_stdiobase='$d_stdiobase'
16106 d_stdstdio='$d_stdstdio'
16107 d_strchr='$d_strchr'
16108 d_strcoll='$d_strcoll'
16109 d_strctcpy='$d_strctcpy'
16110 d_strerrm='$d_strerrm'
16111 d_strerror='$d_strerror'
16112 d_strtod='$d_strtod'
16113 d_strtol='$d_strtol'
16114 d_strtold='$d_strtold'
16115 d_strtoll='$d_strtoll'
16116 d_strtoq='$d_strtoq'
16117 d_strtoul='$d_strtoul'
16118 d_strtoull='$d_strtoull'
16119 d_strtouq='$d_strtouq'
16120 d_strxfrm='$d_strxfrm'
16121 d_suidsafe='$d_suidsafe'
16122 d_symlink='$d_symlink'
16123 d_syscall='$d_syscall'
16124 d_sysconf='$d_sysconf'
16125 d_sysernlst='$d_sysernlst'
16126 d_syserrlst='$d_syserrlst'
16127 d_system='$d_system'
16128 d_tcgetpgrp='$d_tcgetpgrp'
16129 d_tcsetpgrp='$d_tcsetpgrp'
16130 d_telldir='$d_telldir'
16131 d_telldirproto='$d_telldirproto'
16134 d_truncate='$d_truncate'
16135 d_tzname='$d_tzname'
16138 d_union_semun='$d_union_semun'
16140 d_vendorarch='$d_vendorarch'
16141 d_vendorbin='$d_vendorbin'
16142 d_vendorlib='$d_vendorlib'
16144 d_void_closedir='$d_void_closedir'
16145 d_voidsig='$d_voidsig'
16146 d_voidtty='$d_voidtty'
16147 d_volatile='$d_volatile'
16148 d_vprintf='$d_vprintf'
16150 d_waitpid='$d_waitpid'
16151 d_wcstombs='$d_wcstombs'
16152 d_wctomb='$d_wctomb'
16155 db_hashtype='$db_hashtype'
16156 db_prefixtype='$db_prefixtype'
16157 defvoidused='$defvoidused'
16158 direntrytype='$direntrytype'
16161 doublesize='$doublesize'
16163 dynamic_ext='$dynamic_ext'
16169 eunicefix='$eunicefix'
16172 extensions='$extensions'
16173 fflushNULL='$fflushNULL'
16174 fflushall='$fflushall'
16176 firstmakefile='$firstmakefile'
16178 fpossize='$fpossize'
16179 fpostype='$fpostype'
16180 freetype='$freetype'
16182 full_csh='$full_csh'
16183 full_sed='$full_sed'
16184 gccosandvers='$gccosandvers'
16185 gccversion='$gccversion'
16186 gidformat='$gidformat'
16192 groupcat='$groupcat'
16193 groupstype='$groupstype'
16196 h_sysfile='$h_sysfile'
16207 i_arpainet='$i_arpainet'
16208 i_bsdioctl='$i_bsdioctl'
16211 i_dirent='$i_dirent'
16219 i_ieeefp='$i_ieeefp'
16220 i_inttypes='$i_inttypes'
16221 i_libutil='$i_libutil'
16222 i_limits='$i_limits'
16223 i_locale='$i_locale'
16224 i_machcthr='$i_machcthr'
16225 i_malloc='$i_malloc'
16227 i_memory='$i_memory'
16228 i_mntent='$i_mntent'
16231 i_neterrno='$i_neterrno'
16232 i_netinettcp='$i_netinettcp'
16236 i_pthread='$i_pthread'
16238 i_rpcsvcdbm='$i_rpcsvcdbm'
16241 i_shadow='$i_shadow'
16243 i_stdarg='$i_stdarg'
16244 i_stddef='$i_stddef'
16245 i_stdlib='$i_stdlib'
16246 i_string='$i_string'
16247 i_sunmath='$i_sunmath'
16248 i_sysaccess='$i_sysaccess'
16249 i_sysdir='$i_sysdir'
16250 i_sysfile='$i_sysfile'
16251 i_sysfilio='$i_sysfilio'
16253 i_sysioctl='$i_sysioctl'
16254 i_syslog='$i_syslog'
16255 i_sysmman='$i_sysmman'
16256 i_sysmode='$i_sysmode'
16257 i_sysmount='$i_sysmount'
16258 i_sysndir='$i_sysndir'
16259 i_sysparam='$i_sysparam'
16260 i_sysresrc='$i_sysresrc'
16261 i_syssecrt='$i_syssecrt'
16262 i_sysselct='$i_sysselct'
16263 i_syssockio='$i_syssockio'
16264 i_sysstat='$i_sysstat'
16265 i_sysstatfs='$i_sysstatfs'
16266 i_sysstatvfs='$i_sysstatvfs'
16267 i_systime='$i_systime'
16268 i_systimek='$i_systimek'
16269 i_systimes='$i_systimes'
16270 i_systypes='$i_systypes'
16271 i_sysuio='$i_sysuio'
16273 i_sysutsname='$i_sysutsname'
16274 i_sysvfs='$i_sysvfs'
16275 i_syswait='$i_syswait'
16276 i_termio='$i_termio'
16277 i_termios='$i_termios'
16279 i_unistd='$i_unistd'
16282 i_values='$i_values'
16283 i_varargs='$i_varargs'
16284 i_varhdr='$i_varhdr'
16286 ignore_versioned_solibs='$ignore_versioned_solibs'
16287 inc_version_list='$inc_version_list'
16288 inc_version_list_init='$inc_version_list_init'
16291 installarchlib='$installarchlib'
16292 installbin='$installbin'
16293 installman1dir='$installman1dir'
16294 installman3dir='$installman3dir'
16295 installprefix='$installprefix'
16296 installprefixexp='$installprefixexp'
16297 installprivlib='$installprivlib'
16298 installscript='$installscript'
16299 installsitearch='$installsitearch'
16300 installsitebin='$installsitebin'
16301 installsitelib='$installsitelib'
16302 installstyle='$installstyle'
16303 installusrbinperl='$installusrbinperl'
16304 installvendorarch='$installvendorarch'
16305 installvendorbin='$installvendorbin'
16306 installvendorlib='$installvendorlib'
16308 issymlink='$issymlink'
16309 ivdformat='$ivdformat'
16312 known_extensions='$known_extensions'
16315 lddlflags='$lddlflags'
16317 ldflags_uselargefiles='$ldflags_uselargefiles'
16318 ldlibpthname='$ldlibpthname'
16325 libsdirs='$libsdirs'
16326 libsfiles='$libsfiles'
16327 libsfound='$libsfound'
16328 libspath='$libspath'
16329 libswanted='$libswanted'
16330 libswanted_uselargefiles='$libswanted_uselargefiles'
16336 locincpth='$locincpth'
16337 loclibpth='$loclibpth'
16338 longdblsize='$longdblsize'
16339 longlongsize='$longlongsize'
16340 longsize='$longsize'
16344 lseeksize='$lseeksize'
16345 lseektype='$lseektype'
16349 make_set_make='$make_set_make'
16350 mallocobj='$mallocobj'
16351 mallocsrc='$mallocsrc'
16352 malloctype='$malloctype'
16354 man1direxp='$man1direxp'
16357 man3direxp='$man3direxp'
16359 mips_type='$mips_type'
16361 mmaptype='$mmaptype'
16362 modetype='$modetype'
16364 multiarch='$multiarch'
16366 myarchname='$myarchname'
16367 mydomain='$mydomain'
16368 myhostname='$myhostname'
16371 need_va_copy='$need_va_copy'
16372 netdb_hlen_type='$netdb_hlen_type'
16373 netdb_host_type='$netdb_host_type'
16374 netdb_name_type='$netdb_name_type'
16375 netdb_net_type='$netdb_net_type'
16378 nm_so_opt='$nm_so_opt'
16379 nonxs_ext='$nonxs_ext'
16381 nvEUformat='$nvEUformat'
16382 nvFUformat='$nvFUformat'
16383 nvGUformat='$nvGUformat'
16384 nveformat='$nveformat'
16385 nvfformat='$nvfformat'
16386 nvgformat='$nvgformat'
16389 o_nonblock='$o_nonblock'
16391 old_pthread_create_joinable='$old_pthread_create_joinable'
16392 optimize='$optimize'
16393 orderlib='$orderlib'
16396 otherlibdirs='$otherlibdirs'
16400 patchlevel='$patchlevel'
16401 path_sep='$path_sep'
16404 perladmin='$perladmin'
16405 perllibs='$perllibs'
16406 perlpath='$perlpath'
16408 phostname='$phostname'
16411 pm_apiversion='$pm_apiversion'
16415 prefixexp='$prefixexp'
16417 privlibexp='$privlibexp'
16418 prototype='$prototype'
16420 quadkind='$quadkind'
16421 quadtype='$quadtype'
16422 randbits='$randbits'
16423 randfunc='$randfunc'
16424 randseedtype='$randseedtype'
16426 rd_nodata='$rd_nodata'
16427 revision='$revision'
16431 sPRIEUldbl='$sPRIEUldbl'
16432 sPRIFUldbl='$sPRIFUldbl'
16433 sPRIGUldbl='$sPRIGUldbl'
16434 sPRIXU64='$sPRIXU64'
16436 sPRIeldbl='$sPRIeldbl'
16437 sPRIfldbl='$sPRIfldbl'
16438 sPRIgldbl='$sPRIgldbl'
16443 sSCNfldbl='$sSCNfldbl'
16444 sched_yield='$sched_yield'
16445 scriptdir='$scriptdir'
16446 scriptdirexp='$scriptdirexp'
16448 seedfunc='$seedfunc'
16449 selectminbits='$selectminbits'
16450 selecttype='$selecttype'
16451 sendmail='$sendmail'
16454 sharpbang='$sharpbang'
16455 shmattype='$shmattype'
16456 shortsize='$shortsize'
16459 sig_count='$sig_count'
16460 sig_name='$sig_name'
16461 sig_name_init='$sig_name_init'
16463 sig_num_init='$sig_num_init'
16464 sig_size='$sig_size'
16465 signal_t='$signal_t'
16466 sitearch='$sitearch'
16467 sitearchexp='$sitearchexp'
16469 sitebinexp='$sitebinexp'
16471 sitelib_stem='$sitelib_stem'
16472 sitelibexp='$sitelibexp'
16473 siteprefix='$siteprefix'
16474 siteprefixexp='$siteprefixexp'
16475 sizesize='$sizesize'
16476 sizetype='$sizetype'
16480 sockethdr='$sockethdr'
16481 socketlib='$socketlib'
16482 socksizetype='$socksizetype'
16484 spackage='$spackage'
16485 spitshell='$spitshell'
16487 ssizetype='$ssizetype'
16488 startperl='$startperl'
16490 static_ext='$static_ext'
16492 stdio_base='$stdio_base'
16493 stdio_bufsiz='$stdio_bufsiz'
16494 stdio_cnt='$stdio_cnt'
16495 stdio_filbuf='$stdio_filbuf'
16496 stdio_ptr='$stdio_ptr'
16497 stdio_stream_array='$stdio_stream_array'
16500 subversion='$subversion'
16507 timeincl='$timeincl'
16508 timetype='$timetype'
16521 uidformat='$uidformat'
16527 uquadtype='$uquadtype'
16528 use5005threads='$use5005threads'
16529 use64bitall='$use64bitall'
16530 use64bitint='$use64bitint'
16532 useithreads='$useithreads'
16533 uselargefiles='$uselargefiles'
16534 uselongdouble='$uselongdouble'
16535 usemorebits='$usemorebits'
16536 usemultiplicity='$usemultiplicity'
16537 usemymalloc='$usemymalloc'
16539 useopcode='$useopcode'
16540 useperlio='$useperlio'
16541 useposix='$useposix'
16543 useshrplib='$useshrplib'
16544 usesocks='$usesocks'
16545 usethreads='$usethreads'
16546 usevendorprefix='$usevendorprefix'
16547 usevfork='$usevfork'
16550 uvXUformat='$uvXUformat'
16551 uvoformat='$uvoformat'
16554 uvuformat='$uvuformat'
16555 uvxformat='$uvxformat'
16556 vendorarch='$vendorarch'
16557 vendorarchexp='$vendorarchexp'
16558 vendorbin='$vendorbin'
16559 vendorbinexp='$vendorbinexp'
16560 vendorlib='$vendorlib'
16561 vendorlib_stem='$vendorlib_stem'
16562 vendorlibexp='$vendorlibexp'
16563 vendorprefix='$vendorprefix'
16564 vendorprefixexp='$vendorprefixexp'
16566 versiononly='$versiononly'
16568 voidflags='$voidflags'
16570 xs_apiversion='$xs_apiversion'
16575 : Add in command line options if available
16576 $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
16578 : add special variables
16579 $test -f $src/patchlevel.h && \
16580 awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
16581 echo "CONFIGDOTSH=true" >>config.sh
16583 : propagate old symbols
16584 if $test -f UU/config.sh; then
16585 <UU/config.sh $sort | $uniq >UU/oldconfig.sh
16586 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
16587 $sort | $uniq -u >UU/oldsyms
16588 set X `cat UU/oldsyms`
16594 Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
16596 echo "# Variables propagated from previous config.sh file." >>config.sh
16597 for sym in `cat UU/oldsyms`; do
16598 echo " Propagating $hint variable "'$'"$sym..."
16599 eval 'tmp="$'"${sym}"'"'
16601 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
16607 : Finish up by extracting the .SH files
16621 If you'd like to make any changes to the config.sh file before I begin
16622 to configure things, do it as a shell escape now (e.g. !vi config.sh).
16625 rp="Press return or use a shell escape to edit config.sh:"
16630 *) : in case they cannot read
16631 sh 1>&4 -c "$ans";;
16636 : if this fails, just run all the .SH files by hand
16643 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
16650 Now you need to generate make dependencies by running "$make depend".
16651 You might prefer to run it in background: "$make depend > makedepend.out &"
16652 It can take a while, so you might not want to run it right now.
16657 rp="Run $make depend now?"
16661 $make depend && echo "Now you must run '$make'."
16664 echo "You must run '$make depend' then '$make'."
16667 elif test -f [Mm]akefile; then
16669 echo "Now you must run a $make."
16674 if $test -f Policy.sh; then
16677 If you compile $package on a different machine or from a different object
16678 directory, copy the Policy.sh file from this object directory to the
16679 new one before you run Configure -- this will help you with most of
16680 the policy defaults.
16684 if $test -f config.msg; then
16685 echo "Hmm. I also noted the following information while running:"
16687 $cat config.msg >&4
16690 $rm -f kit*isdone ark*isdone