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 Aug 27 18:14:56 EET DST 2000 [metaconfig 3.0 PL70]
24 # (with additional metaconfig patches by perlbug@perl.com)
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...
43 true || cat /tmp/c1$$ /tmp/c2$$
44 true || exec sh $0 $argv:q
46 (exit $?0) || cat /tmp/c2$$
47 (exit $?0) || exec sh $0 $argv:q
48 rm -f /tmp/c1$$ /tmp/c2$$
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
458 d_old_pthread_create_joinable=''
459 old_pthread_create_joinable=''
706 inc_version_list_init=''
724 ignore_versioned_solibs=''
786 d_perl_otherlibdirs=''
803 d_nv_preserves_uv_bits=''
901 d_stdio_stream_array=''
902 stdio_stream_array=''
912 ccflags_uselargefiles=''
913 ldflags_uselargefiles=''
914 libswanted_uselargefiles=''
956 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
959 : We must find out about Eunice early
961 if test -f /etc/unixtovms; then
962 eunicefix=/etc/unixtovms
964 if test -f /etc/unixtovms.exe; then
965 eunicefix=/etc/unixtovms.exe
969 : set useposix=false in your hint file to disable the POSIX extension.
971 : set useopcode=false in your hint file to disable the Opcode extension.
973 : Trailing extension. Override this in a hint file, if needed.
975 : Extra object files, if any, needed on this platform.
977 : Possible local include directories to search.
978 : Set locincpth to "" in a hint file to defeat local include searches.
979 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
980 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
982 : no include file wanted by default
986 : change the next line if compiling for Xenix/286 on Xenix/386
987 xlibpth='/usr/lib/386 /lib/386'
988 : Possible local library directories to search.
989 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
990 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
992 : general looking path for locating libraries
993 glibpth="/usr/lib/large /lib /usr/lib $xlibpth"
994 glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
995 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
996 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
997 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
999 : Private path used by Configure to find libraries. Its value
1000 : is prepended to libpth. This variable takes care of special
1001 : machines, like the mips. Usually, it should be empty.
1004 : default library list
1006 : some systems want to use only the non-versioned libso:s
1007 ignore_versioned_solibs=''
1008 ccflags_uselargefiles=''
1009 ldflags_uselargefiles=''
1010 libswanted_uselargefiles=''
1011 : set usemultiplicity on the Configure command line to enable multiplicity.
1012 : set usesocks on the Configure command line to enable socks.
1013 : set usethreads on the Configure command line to enable threads.
1014 : full support for void wanted by default
1017 : List of libraries we want.
1018 : If anyone needs -lnet, put it in a hint file.
1019 libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
1020 libswanted="$libswanted dld ld sun m c cposix posix"
1021 libswanted="$libswanted ndir dir crypt sec"
1022 libswanted="$libswanted ucb bsd BSD PW x iconv util"
1023 : We probably want to search /usr/shlib before most other libraries.
1024 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
1025 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1026 glibpth="/usr/shlib $glibpth"
1027 : Do not use vfork unless overridden by a hint file.
1030 : Find the basic shell for Bourne shell scripts
1034 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1037 if test -f "$xxx"; then
1040 : Build up a list and do a single loop so we can 'break' out.
1041 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1042 for xxx in sh bash ksh pdksh ash; do
1044 try="$try ${p}/${xxx}"
1048 if test -f "$xxx"; then
1051 elif test -f "$xxx.exe"; then
1062 $me: Fatal Error: I can't find a Bourne Shell anywhere.
1064 Usually it's in /bin/sh. How did you even get this far?
1065 Please contact me (Perl Maintainers) at perlbug@perl.com and
1066 we'll try to straighten this all out.
1072 : see if sh knows # comments
1073 if `$sh -c '#' >/dev/null 2>&1`; then
1077 test -f $xcat || xcat=/usr/bin/cat
1082 if test -s today; then
1085 echo "#! $xcat" > try
1089 if test -s today; then
1097 echo "Your $sh doesn't grok # comments--I will strip them later on."
1100 echo "exec grep -v '^[ ]*#'" >spitshell
1102 $eunicefix spitshell
1103 spitshell=`pwd`/spitshell
1105 echo "I presume that if # doesn't work, #! won't work either!"
1110 : figure out how to guarantee sh startup
1112 '') startsh=${sharpbang}${sh} ;;
1124 : echo "Yup, it does."
1126 echo "Hmm... '$startsh' does not guarantee sh startup..."
1127 echo "You may have to fix up the shell scripts to make sure $sh runs them."
1132 : Save command line options in file UU/cmdline.opt for later use in
1133 : generating config.sh.
1134 cat > cmdline.opt <<EOSH
1135 # Configure command line arguments.
1142 cat >>cmdline.opt <<EOSH
1143 config_arg$argn='$arg'
1145 argn=`expr $argn + 1`
1148 : produce awk script to parse command line options
1149 cat >options.awk <<'EOF'
1151 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
1153 len = length(optstr);
1154 for (i = 1; i <= len; i++) {
1155 c = substr(optstr, i, 1);
1156 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1167 if (substr(str, 1, 1) != "-") {
1168 printf("'%s'\n", str);
1172 for (i = 2; i <= len; i++) {
1173 c = substr(str, i, 1);
1175 printf("-%s\n", substr(str, i));
1181 printf("'%s'\n", substr(str, i + 1));
1194 : process the command line options
1195 set X `for arg in "$@"; do echo "X$arg"; done |
1196 sed -e s/X// | awk -f options.awk`
1201 : set up default values
1211 rm -f optdef.sh posthint.sh
1212 cat >optdef.sh <<EOS
1218 while test $# -gt 0; do
1220 -d) shift; fastread=yes;;
1221 -e) shift; alldone=cont;;
1225 if test -r "$1"; then
1228 echo "$me: cannot read config file $1." >&2
1233 -h) shift; error=true;;
1234 -r) shift; reuseval=true;;
1235 -s) shift; silent=true; realsilent=true;;
1236 -E) shift; alldone=exit;;
1237 -K) shift; knowitall=true;;
1238 -O) shift; override=true;;
1239 -S) shift; silent=true; extractsh=true;;
1244 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1245 echo "$me: ignoring -D $1" >&2
1248 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1249 *) echo "$1='define'" >> optdef.sh;;
1256 *=) echo "$1" >> optdef.sh;;
1258 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1259 echo "$me: ignoring -U $1" >&2
1261 *) echo "$1='undef'" >> optdef.sh;;
1272 *=*) zzz=`echo $yyy|sed 's!=.*!!'`
1276 zzz=" "`echo $yyy|sed 's!^[^=]*=!!'`
1277 yyy=`echo $yyy|sed 's!=.*!!'` ;;
1283 *:*) xxx=`echo $yyy|sed 's!:.*!!'`
1284 yyy=`echo $yyy|sed 's!^[^:]*:!!'`
1285 zzz=`echo $yyy|sed 's!^[^=]*=!!'`
1286 yyy=`echo $yyy|sed 's!=.*!!'` ;;
1287 *) xxx=`echo $yyy|sed 's!:.*!!'`
1288 yyy=`echo $yyy|sed 's!^[^:]*:!!'` ;;
1294 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
1296 echo "$yyy=''" >> posthint.sh ;;
1301 echo "$yyy='$zzz'" >> posthint.sh ;;
1303 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
1305 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
1310 echo "$yyy=$zzz" >> posthint.sh ;;
1311 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
1315 -V) echo "$me generated by metaconfig 3.0 PL70." >&2
1318 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
1326 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
1327 [-U symbol] [-U symbol=] [-A command:symbol...]
1328 -d : use defaults for all answers.
1329 -e : go on without questioning past the production of config.sh.
1330 -f : specify an alternate default configuration file.
1331 -h : print this help message and exit (with an error status).
1332 -r : reuse C symbols value if possible (skips costly nm extraction).
1333 -s : silent mode, only echoes questions and essential information.
1334 -D : define symbol to have some value:
1335 -D symbol symbol gets the value 'define'
1336 -D symbol=value symbol gets the value 'value'
1337 -E : stop at the end of questions, after having produced config.sh.
1338 -K : do not use unless you know what you are doing.
1339 -O : let -D and -U override definitions from loaded configuration file.
1340 -S : perform variable substitutions on all .SH files (can mix with -f)
1341 -U : undefine symbol:
1342 -U symbol symbol gets the value 'undef'
1343 -U symbol= symbol gets completely empty
1344 -A : manipulate symbol after the platform specific hints have been applied:
1345 -A symbol=value append " "value to symbol
1346 -A append:symbol=value append value to symbol
1347 -A define:symbol=value define symbol to have value
1348 -A clear:symbol define symbol to be ''
1349 -A define:symbol define symbol to be 'define'
1350 -A eval:symbol=value define symbol to be eval of value
1351 -A prepend:symbol=value prepend value to symbol
1352 -A undef:symbol define symbol to be 'undef'
1353 -A undef:symbol= define symbol to be ''
1354 -V : print version number and exit (with a zero status).
1361 case "$fastread$alldone" in
1364 case "$extractsh" in
1367 if test ! -t 0; then
1368 echo "Say 'sh Configure', not 'sh <Configure'"
1378 true) exec 1>/dev/null;;
1381 : run the defines and the undefines, if any, but leave the file out there...
1384 : create the posthint manipulation script and leave the file out there...
1389 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1390 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
1391 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
1392 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
1393 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1396 : Some greps do not return status, grrr.
1397 echo "grimblepritz" >grimble
1398 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1400 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1406 : the following should work in any shell
1410 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1411 cat >contains <<'EOSS'
1412 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1417 : Find the path to the source tree
1420 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1423 *) src=`cd ../$src && pwd` ;;
1436 if test -f $rsrc/Configure && \
1437 $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
1439 : found it, so we are ok.
1442 for src in . .. ../.. ../../.. ../../../..; do
1443 if test -f ../$src/Configure && \
1444 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1455 Sorry, I can't seem to locate the source dir for $package. Please start
1456 Configure with an explicit path -- i.e. /some/path/Configure.
1464 echo "Sources for $package found in \"$src\"." >&4
1468 : script used to extract .SH files with variable substitutions
1469 cat >extract <<'EOS'
1471 echo "Doing variable substitutions on .SH files..."
1472 if test -f $src/MANIFEST; then
1473 set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH$'`
1475 echo "(Looking for .SH files under the source directory.)"
1476 set x `(cd $src; find . -name "*.SH" -print)`
1480 0) set x `(cd $src; echo *.SH)`; shift;;
1482 if test ! -f $src/$1; then
1488 while test $name; do
1489 if test ! -d "$name"; then
1490 create="$name $create";
1491 name=`echo $name | sed -e "s|^[^/]*$||"`;
1492 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
1497 for file in $create; do
1506 dir=`expr X$file : 'X\(.*\)/'`
1507 file=`expr X$file : 'X.*/\(.*\)'`
1508 (cd $dir && . ./$file)
1518 dir=`expr X$file : 'X\(.*\)/'`
1519 file=`expr X$file : 'X.*/\(.*\)'`
1520 (set x $dir; shift; eval $mkdir_p)
1530 if test -f $src/config_h.SH; then
1531 if test ! -f config.h; then
1532 : oops, they left it out of MANIFEST, probably, so do it anyway.
1538 : extract files and exit if asked to do so
1539 case "$extractsh" in
1541 case "$realsilent" in
1545 case "$config_sh" in
1546 '') config_sh='config.sh';;
1549 echo "Fetching answers from $config_sh..."
1552 test "$override" && . ./optdef.sh
1561 : Eunice requires " " instead of "", can you believe it
1564 echo "Beginning of configuration questions for $package."
1566 trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
1568 : first determine how to suppress newline on echo command
1570 echo "Checking echo to see how to suppress newlines..."
1571 (echo "hi there\c" ; echo " ") >.echotmp
1572 if $contains c .echotmp >/dev/null 2>&1 ; then
1583 echo $n "The star should be here-->$c"
1587 : Now test for existence of everything in MANIFEST
1589 if test -f $rsrc/MANIFEST; then
1590 echo "First let's make sure your kit is complete. Checking..." >&4
1591 awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50
1594 for filelist in x??; do
1595 (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
1597 if test -s missing; then
1601 THIS PACKAGE SEEMS TO BE INCOMPLETE.
1603 You have the option of continuing the configuration process, despite the
1604 distinct possibility that your kit is damaged, by typing 'y'es. If you
1605 do, don't blame me if something goes wrong. I advise you to type 'n'o
1606 and contact the author (perlbug@perl.com).
1609 echo $n "Continue? [n] $c" >&4
1613 echo "Continuing..." >&4
1617 echo "ABORTING..." >&4
1622 echo "Looks good..."
1625 echo "There is no MANIFEST file. I hope your kit is complete !"
1630 : Find the appropriate value for a newline for tr
1631 if test -n "$DJGPP"; then
1634 if test X"$trnl" = X; then
1635 case "`echo foo|tr '\n' x 2>/dev/null`" in
1639 if test X"$trnl" = X; then
1640 case "`echo foo|tr '\012' x 2>/dev/null`" in
1641 foox) trnl='\012' ;;
1644 if test X"$trnl" = X; then
1647 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
1653 : compute the number of columns on the terminal for proper question formatting
1658 : set up the echo used in my read
1659 myecho="case \"\$xxxm\" in
1660 '') echo $n \"\$rp $c\" >&4;;
1662 '') echo $n \"[\$xxxm] $c\";;
1664 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
1666 echo $n \"[\$xxxm] $c\" >&4
1668 echo $n \"\$rp [\$xxxm] $c\" >&4
1674 : now set up to do reads with possible shell escape and default assignment
1680 case "\$fastread" in
1681 yes) case "\$dflt" in
1684 case "\$silent-\$rp" in
1689 *) case "\$silent" in
1690 true) case "\$rp" in
1695 while expr "X\$ans" : "X!" >/dev/null; do
1699 aok=''; eval "ans=\\"\$answ\\"" && aok=y
1707 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
1716 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
1721 echo "(OK, I'll run with -d after this question.)" >&4
1724 echo "*** Sorry, \$1 not supported yet." >&4
1734 echo "*** Substitution done -- please confirm."
1736 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
1741 echo "*** Error -- try again."
1748 case "\$ans\$xxxm\$nostick" in
1760 : create .config dir to save info across Configure sessions
1761 test -d ../.config || mkdir ../.config
1762 cat >../.config/README <<EOF
1763 This directory created by Configure to save information that should
1764 persist across sessions for $package.
1766 You may safely delete it if you wish.
1769 xpatchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
1771 $define|true|[yY]*) ;;
1772 *) case "$xpatchlevel" in
1775 *** WHOA THERE!!! ***
1777 This is an UNSTABLE DEVELOPMENT release.
1778 (The patchlevel, $xpatchlevel, is odd--as opposed to even,
1779 and that signifies a development release. If you want a
1780 maintenance release, you want an even-numbered release.)
1782 Do ***NOT*** install this into production use.
1783 Data corruption and crashes are possible.
1785 It is most seriously suggested that you do not continue any further
1786 unless you want to help in developing and debugging Perl.
1789 rp='Do you really want to continue?'
1793 [yY]) echo >&4 "Okay, continuing." ;;
1794 *) echo >&4 "Okay, bye."
1803 : general instructions
1806 user=`(logname) 2>/dev/null`
1808 '') user=`whoami 2>&1`;;
1810 if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
1813 rp='Would you like to see the instructions?'
1824 This installation shell script will examine your system and ask you questions
1825 to determine how the perl5 package should be installed. If you get
1826 stuck on a question, you may use a ! shell escape to start a subshell or
1827 execute a command. Many of the questions will have default answers in square
1828 brackets; typing carriage return will give you the default.
1830 On some of the questions which ask for file or directory names you are allowed
1831 to use the ~name construct to specify the login directory belonging to "name",
1832 even if you don't have a shell which knows about that. Questions where this is
1833 allowed will be marked "(~name ok)".
1837 dflt='Type carriage return to continue'
1841 The prompter used in this script allows you to use shell variables and
1842 backticks in your answers. You may use $1, $2, etc... to refer to the words
1843 in the default answer, as if the default line was a set of arguments given to a
1844 script shell. This means you may also use $* to repeat the whole default line,
1845 so you do not have to re-type everything to add something to the default.
1847 Everytime there is a substitution, you will have to confirm. If there is an
1848 error (e.g. an unmatched backtick), the default answer will remain unchanged
1849 and you will be prompted again.
1851 If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
1852 the questions and use the computed defaults (or the previous answers if there
1853 was already a config.sh file). Type 'Configure -h' for a list of options.
1854 You may also start interactively and then answer '& -d' at any prompt to turn
1855 on the non-interactive behaviour for the remainder of the execution.
1861 Much effort has been expended to ensure that this shell script will run on any
1862 Unix system. If despite that it blows up on yours, your best bet is to edit
1863 Configure and run it again. If you can't run Configure for some reason,
1864 you'll have to generate a config.sh file by hand. Whatever problems you
1865 have, let me (perlbug@perl.com) know how I blew it.
1867 This installation script affects things in two ways:
1869 1) it may do direct variable substitutions on some of the files included
1871 2) it builds a config.h file for inclusion in C programs. You may edit
1872 any of these files as the need arises after running this script.
1874 If you make a mistake on a question, there is no easy way to back up to it
1875 currently. The easiest thing to do is to edit config.sh and rerun all the SH
1876 files. Configure will offer to let you do this before it runs the SH files.
1879 dflt='Type carriage return to continue'
1881 case "$firsttime" in
1882 true) echo $user >>../.config/instruct;;
1886 : find out where common programs are
1888 echo "Locating common programs..." >&4
1901 if test -d \$dir/\$thing; then
1907 for thisthing in \$dir/\$thing; do
1908 : just loop through to pick last item
1910 if test -f \$thisthing; then
1913 elif test -f \$dir/\$thing.exe; then
1914 if test -n "$DJGPP"; then
1915 echo \$dir/\$thing.exe
1917 : on Eunice apparently
1967 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1968 pth="$pth /lib /usr/lib"
1969 for file in $loclist; do
1973 if test -f "$xxx"; then
1976 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
1977 xxx=`./loc $file $file $pth`
1980 '') xxx=`./loc $file $file $pth`;;
1981 *) xxx=`./loc $xxx $xxx $pth`;;
1987 echo $file is in $xxx.
1990 echo $file is in $xxx.
1993 echo "I don't know where '$file' is, and my life depends on it." >&4
1994 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2000 echo "Don't worry if any of the following aren't found..."
2002 for file in $trylist; do
2006 if test -f "$xxx"; then
2009 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2010 xxx=`./loc $file $file $pth`
2013 '') xxx=`./loc $file $file $pth`;;
2014 *) xxx=`./loc $xxx $xxx $pth`;;
2020 echo $file is in $xxx.
2023 echo $file is in $xxx.
2026 echo "I don't see $file out there, $say."
2033 echo "Substituting grep for egrep."
2039 echo "Substituting cp for ln."
2045 echo "Hopefully test is built into your sh."
2048 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
2049 echo "Using the test built into your sh."
2057 echo "Hopefully echo is built into your sh."
2062 echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2063 $echo $n "hi there$c" >foo1
2064 echo $n "hi there$c" >foo2
2065 if cmp foo1 foo2 >/dev/null 2>&1; then
2066 echo "They are compatible. In fact, they may be identical."
2073 They are not compatible! You are probably running ksh on a non-USG system.
2074 I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2075 have echo built in and we may have to run some Bourne shell scripts. That
2076 means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2079 $echo $n "The star should be here-->$c"
2089 cat <<'EOSC' >>checkcc
2094 int main(int argc, char *argv[]) {
2098 if $cc -o try try.c; then
2101 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2107 case "`$cc -v -c try.c 2>&1`" in
2110 if $test X"$trygcc" = Xyes; then
2111 if gcc -o try -c try.c; then
2113 echo "You seem to have a working gcc, though." >&4
2114 rp="Would you like to use it?"
2116 if $test -f myread; then
2119 if $test -f UU/myread; then
2122 echo "Cannot find myread, sorry. Aborting." >&2
2127 [yY]*) cc=gcc; ccflags=''; despair=no ;;
2131 if $test X"$despair" = Xyes; then
2132 echo "You need to find a working C compiler." >&4
2133 echo "I cannot continue any further, aborting." >&4
2142 : determine whether symbolic links are supported
2145 if $ln -s blurfl sym > /dev/null 2>&1 ; then
2146 echo "Symbolic links are supported." >&4
2149 echo "Symbolic links are NOT supported." >&4
2154 : see whether [:lower:] and [:upper:] are supported character classes
2156 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
2158 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
2162 *) # There is a discontinuity in EBCDIC between 'I' and 'J'
2163 # (0xc9 and 0xd1), therefore that is a nice testing point.
2164 if test "X$up" = X -o "X$low" = X; then
2165 case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in
2171 if test "X$up" = X -o "X$low" = X; then
2172 case "`echo IJ | $tr I-J i-j 2>/dev/null`" in
2178 if test "X$up" = X -o "X$low" = X; then
2179 case "`echo IJ | od -x 2>/dev/null`" in
2181 echo "Hey, this might be EBCDIC." >&4
2182 if test "X$up" = X -o "X$low" = X; then
2183 case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
2184 ij) up='[A-IJ-RS-Z]'
2189 if test "X$up" = X -o "X$low" = X; then
2190 case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
2200 case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in
2202 echo "Using $up and $low to convert case." >&4
2205 echo "I don't know how to translate letters from upper to lower case." >&4
2206 echo "Your tr is not acting any way I know of." >&4
2210 : set up the translation script tr, must be called with ./tr of course
2214 '[A-Z][a-z]') exec $tr '$up' '$low';;
2215 '[a-z][A-Z]') exec $tr '$low' '$up';;
2222 : Try to determine whether config.sh was made on this system
2223 case "$config_sh" in
2225 myuname=`$uname -a 2>/dev/null`
2226 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
2227 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
2228 # because the A-Z/a-z are not consecutive.
2229 myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
2230 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
2231 newmyuname="$myuname"
2233 case "$knowitall" in
2235 if test -f ../config.sh; then
2236 if $contains myuname= ../config.sh >/dev/null 2>&1; then
2237 eval "`grep myuname= ../config.sh`"
2239 if test "X$myuname" = "X$newmyuname"; then
2247 : Get old answers from old config file if Configure was run on the
2248 : same system, otherwise use the hints.
2251 if test -f config.sh; then
2253 rp="I see a config.sh file. Shall I use it to set the defaults?"
2256 n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
2257 *) echo "Fetching default answers from your old config.sh file..." >&4
2265 : Older versions did not always set $sh. Catch re-use of such
2275 if test ! -f config.sh; then
2278 First time through, eh? I have some defaults handy for some systems
2279 that need some extra help getting the Configure answers right:
2282 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2284 : Half the following guesses are probably wrong... If you have better
2285 : tests or hints, please send them to perlbug@perl.com
2286 : The metaconfig authors would also appreciate a copy...
2287 $test -f /irix && osname=irix
2288 $test -f /xenix && osname=sco_xenix
2289 $test -f /dynix && osname=dynix
2290 $test -f /dnix && osname=dnix
2291 $test -f /lynx.os && osname=lynxos
2292 $test -f /unicos && osname=unicos && osvers=`$uname -r`
2293 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
2294 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
2295 $test -f /bin/mips && /bin/mips && osname=mips
2296 $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
2297 $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
2298 $test -d /usr/apollo/bin && osname=apollo
2299 $test -f /etc/saf/_sactab && osname=svr4
2300 $test -d /usr/include/minix && osname=minix
2301 if $test -d /MachTen -o -d /MachTen_Folder; then
2303 if $test -x /sbin/version; then
2304 osvers=`/sbin/version | $awk '{print $2}' |
2305 $sed -e 's/[A-Za-z]$//'`
2306 elif $test -x /usr/etc/version; then
2307 osvers=`/usr/etc/version | $awk '{print $2}' |
2308 $sed -e 's/[A-Za-z]$//'`
2314 $test -f /sys/posix.dll &&
2315 $test -f /usr/bin/what &&
2316 set X `/usr/bin/what /sys/posix.dll` &&
2317 $test "$3" = UWIN &&
2321 if $test -f $uname; then
2329 umips) osname=umips ;;
2332 [23]100) osname=mips ;;
2333 next*) osname=next ;;
2335 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
2336 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
2339 elif $test -f /etc/kconfig; then
2341 if test "$lns" = "$ln -s"; then
2343 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
2345 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
2352 if test -n "$DJGPP"; then
2361 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
2363 'not found') osvers="$4"."$3" ;;
2364 '<3240'|'<>3240') osvers=3.2.0 ;;
2365 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
2366 '=3250'|'>3250') osvers=3.2.5 ;;
2370 bsd386) osname=bsd386
2373 cygwin*) osname=cygwin
2376 *dc.osx) osname=dcosx
2382 domainos) osname=apollo
2388 dynixptx*) osname=dynixptx
2389 osvers=`echo "$4"|sed 's/^v//'`
2391 freebsd) osname=freebsd
2393 genix) osname=genix ;;
2395 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
2411 netbsd*) osname=netbsd
2414 news-os) osvers="$3"
2416 4*) osname=newsos4 ;;
2420 next*) osname=next ;;
2421 POSIX-BC | posix-bc ) osname=posix-bc
2424 powerux | power_ux | powermax_os | powermaxos | \
2425 powerunix | power_unix) osname=powerux
2431 solaris) osname=solaris
2433 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
2440 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
2444 titanos) osname=titanos
2453 ultrix) osname=ultrix
2456 osf1|mls+) case "$5" in
2459 osvers=`sizer -v | awk '{print $3}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
2462 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
2465 hp*) osname=hp_osf1 ;;
2466 mips) osname=mips_osf1 ;;
2469 unixware) osname=svr5
2475 $2) case "$osname" in
2479 : svr4.x or possibly later
2489 if test -f /stand/boot ; then
2490 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
2491 if test -n "$INITPROG" -a -f "$INITPROG"; then
2492 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
2493 if test -n "$isesix"; then
2501 *) if test -f /etc/systemid; then
2503 set `echo $3 | $sed 's/\./ /g'` $4
2504 if $test -f $src/hints/sco_$1_$2_$3.sh; then
2506 elif $test -f $src/hints/sco_$1_$2.sh; then
2508 elif $test -f $src/hints/sco_$1.sh; then
2513 '') : Still unknown. Probably a generic Sys V.
2522 *) case "$osname" in
2523 '') : Still unknown. Probably a generic BSD.
2531 if test -f /vmunix -a -f $src/hints/news_os.sh; then
2532 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
2533 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
2536 $rm -f UU/kernel.what
2537 elif test -d c:/.; then
2544 : Now look for a hint file osname_osvers, unless one has been
2545 : specified already.
2548 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
2549 : Also try without trailing minor version numbers.
2550 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
2551 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
2552 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
2553 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
2556 *) case "$osvers" in
2559 *) if $test -f $src/hints/$file.sh ; then
2561 elif $test -f $src/hints/$xfile.sh ; then
2563 elif $test -f $src/hints/$xxfile.sh ; then
2565 elif $test -f $src/hints/$xxxfile.sh ; then
2567 elif $test -f $src/hints/$xxxxfile.sh ; then
2569 elif $test -f "$src/hints/${osname}.sh" ; then
2578 if $test -f Policy.sh ; then
2581 none) dflt="Policy" ;;
2582 *) dflt="Policy $dflt" ;;
2587 dflt=`echo $hintfile | $sed 's/\.sh$//'`
2591 if $test -f Policy.sh ; then
2594 There's also a Policy hint file available, which should make the
2595 site-specific (policy) questions easier to answer.
2602 You may give one or more space-separated answers, or "none" if appropriate.
2603 A well-behaved OS will have no hints, so answering "none" or just "Policy"
2604 is a good thing. DO NOT give a wrong version or a wrong OS.
2608 rp="Which of these apply, if any?"
2611 for file in $tans; do
2612 if $test X$file = XPolicy -a -f Policy.sh; then
2614 $cat Policy.sh >> UU/config.sh
2615 elif $test -f $src/hints/$file.sh; then
2616 . $src/hints/$file.sh
2617 $cat $src/hints/$file.sh >> UU/config.sh
2618 elif $test X$tans = X -o X$tans = Xnone ; then
2621 : Give one chance to correct a possible typo.
2622 echo "$file.sh does not exist"
2624 rp="hint to use instead?"
2626 for file in $ans; do
2627 if $test -f "$src/hints/$file.sh"; then
2628 . $src/hints/$file.sh
2629 $cat $src/hints/$file.sh >> UU/config.sh
2630 elif $test X$ans = X -o X$ans = Xnone ; then
2633 echo "$file.sh does not exist -- ignored."
2640 : Remember our hint file for later.
2641 if $test -f "$src/hints/$file.sh" ; then
2651 echo "Fetching default answers from $config_sh..." >&4
2655 cp $config_sh config.sh 2>/dev/null
2665 test "$override" && . ./optdef.sh
2666 myuname="$newmyuname"
2668 : Restore computed paths
2669 for file in $loclist $trylist; do
2670 eval $file="\$_$file"
2675 Configure uses the operating system name and version to set some defaults.
2676 The default value is probably right if the name rings a bell. Otherwise,
2677 since spelling matters for me, either accept the default or answer "none"
2684 ''|' '|none) dflt=none ;;
2685 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
2688 *) dflt="$osname" ;;
2690 rp="Operating system name?"
2694 *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
2700 ''|' '|none) dflt=none ;;
2701 *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
2702 dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
2704 ''|' ') dflt=none ;;
2709 *) dflt="$osvers" ;;
2711 rp="Operating system version?"
2721 : who configured the system
2722 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
2723 cf_by=`(logname) 2>/dev/null`
2726 cf_by=`(whoami) 2>/dev/null`
2728 "") cf_by=unknown ;;
2732 : set up the script used to warn in case of inconsistency
2739 echo "*** WHOA THERE!!! ***" >&4
2740 echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
2741 rp=" Keep the $hint value?"
2744 y) td=$was; tu=$was;;
2748 : function used to set $1 to $val
2749 setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
2751 $define$undef) . ./whoa; eval "$var=\$td";;
2752 $undef$define) . ./whoa; eval "$var=\$tu";;
2753 *) eval "$var=$val";;
2756 case "$usethreads" in
2757 $define|true|[yY]*) dflt='y';;
2762 Perl can be built to take advantage of threads on some systems.
2763 To do so, Configure can be run with -Dusethreads.
2765 Note that threading is a highly experimental feature, and
2766 some known race conditions still remain. If you choose to try
2767 it, be very sure to not actually deploy it for production
2768 purposes. README.threads has more details, and is required
2769 reading if you enable threads.
2771 If this doesn't make any sense to you, just accept the default '$dflt'.
2773 rp='Build a threading Perl?'
2776 y|Y) val="$define" ;;
2782 case "$usethreads" in
2786 As of 5.5.640, Perl has two different internal threading implementations,
2787 the 5.005 version (5005threads) and an interpreter-based version
2788 (ithreads) that has one interpreter per thread. Both are very
2789 experimental. This arrangement exists to help developers work out
2790 which one is better.
2792 If you're a casual user, you probably don't want interpreter-threads
2793 at this time. There doesn't yet exist a way to create threads from
2794 within Perl in this model, i.e., "use Thread;" will NOT work.
2796 : Default to ithreads unless overridden on command line or with
2799 case "$use5005threads" in
2800 $define|true|[yY]*) dflt='n';;
2802 case "$useithreads" in
2803 $undef|false|[nN]*) dflt='n';;
2805 rp='Use interpreter-based ithreads?'
2808 y|Y) val="$define" ;;
2813 : Now set use5005threads to the opposite value.
2814 case "$useithreads" in
2815 $define) val="$undef" ;;
2822 useithreads="$undef"
2823 use5005threads="$undef"
2827 case "$d_oldpthreads" in
2828 '') : Configure tests would be welcome here. For now, assume undef.
2830 *) val="$d_oldpthreads" ;;
2836 case "$usethreads" in
2837 "$define"|true|[yY]*)
2838 : Look for a hint-file generated 'call-back-unit'. If the
2839 : user has specified that a threading perl is to be built,
2840 : we may need to set or change some other defaults.
2841 if $test -f usethreads.cbu; then
2842 echo "Your platform has some specific hints for threaded builds, using them..."
2846 (Your platform doesn't have any specific hints for threaded builds.
2847 Assuming POSIX threads, then.)
2855 Perl can be built so that multiple Perl interpreters can coexist
2856 within the same Perl executable.
2859 case "$useithreads" in
2862 This multiple interpreter support is required for interpreter-based threads.
2866 *) case "$usemultiplicity" in
2867 $define|true|[yY]*) dflt='y';;
2871 echo "If this doesn't make any sense to you, just accept the default '$dflt'."
2872 rp='Build Perl for multiplicity?'
2875 y|Y) val="$define" ;;
2883 : determine where manual pages are on this system
2887 syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
2888 syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
2889 syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
2890 syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
2891 syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
2892 sysman=`./loc . /usr/man/man1 $syspath`
2895 if $test -d "$sysman"; then
2896 echo "System manual is in $sysman." >&4
2898 echo "Could not find manual pages in source form." >&4
2901 : see what memory models we can support
2904 $cat >pdp11.c <<'EOP'
2914 '') modelcc="$cc" ;;
2917 ( $modelcc -o pdp11 pdp11.c ) >/dev/null 2>&1
2918 if $test -f pdp11 && ./pdp11 2>/dev/null; then
2919 dflt='unsplit split'
2921 tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
2924 *) if $test -d /lib/small || $test -d /usr/lib/small; then
2929 if $test -d /lib/medium || $test -d /usr/lib/medium; then
2932 if $test -d /lib/large || $test -d /usr/lib/large; then
2935 if $test -d /lib/huge || $test -d /usr/lib/huge; then
2944 Some systems have different model sizes. On most systems they are called
2945 small, medium, large, and huge. On the PDP11 they are called unsplit and
2946 split. If your system doesn't support different memory models, say "none".
2947 If you wish to force everything to one memory model, say "none" here and
2948 put the appropriate flags later when it asks you for other cc and ld flags.
2949 Venix systems may wish to put "none" and let the compiler figure things out.
2950 (In the following question multiple model names should be space separated.)
2952 The default for most systems is "none".
2955 rp="Which memory models are supported?"
2970 '') if $contains '\-i' $sysman/ld.1 >/dev/null 2>&1 || \
2971 $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then
2978 rp="What flag indicates separate I and D space?"
2986 *large*|*small*|*medium*|*huge*)
2993 rp="What flag indicates large model?"
3003 *huge*) case "$huge" in
3007 rp="What flag indicates huge model?"
3017 *medium*) case "$medium" in
3021 rp="What flag indicates medium model?"
3028 *) medium="$large";;
3031 *small*) case "$small" in
3035 rp="What flag indicates small model?"
3046 echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4
3049 $rm -f pdp11.* pdp11
3051 : make some quick guesses about what we are up against
3053 $echo $n "Hmm... $c"
3063 $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
3064 if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
3066 echo "Looks kind of like an OSF/1 system, but we'll see..."
3068 elif test `echo abc | tr a-z A-Z` = Abc ; then
3069 xxx=`./loc addbib blurfl $pth`
3070 if $test -f $xxx; then
3071 echo "Looks kind of like a USG system with BSD features, but we'll see..."
3075 if $contains SIGTSTP foo >/dev/null 2>&1 ; then
3076 echo "Looks kind of like an extended USG system, but we'll see..."
3078 echo "Looks kind of like a USG system, but we'll see..."
3082 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
3083 echo "Looks kind of like a BSD system, but we'll see..."
3087 echo "Looks kind of like a Version 7 system, but we'll see..."
3090 case "$eunicefix" in
3093 There is, however, a strange, musty smell in the air that reminds me of
3094 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
3098 : it so happens the Eunice I know will not run shell scripts in Unix format
3102 echo "Congratulations. You aren't running Eunice."
3106 : Detect OS2. The p_ variable is set above in the Head.U unit.
3111 I have the feeling something is not exactly right, however...don't tell me...
3112 lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
3117 if test -f /xenix; then
3118 echo "Actually, this looks more like a XENIX system..."
3123 echo "It's not Xenix..."
3128 if test -f /venix; then
3129 echo "Actually, this looks more like a VENIX system..."
3136 echo "Nor is it Venix..."
3139 chmod +x bsd usg v7 osf1 eunice xenix venix os2
3140 $eunicefix bsd usg v7 osf1 eunice xenix venix os2
3143 : see if we need a special compiler
3151 *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
3152 if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
3166 On some older systems the default C compiler will not resolve multiple global
3167 references that happen to have the same name. On some such systems the "Mcc"
3168 command may be used to force these to be resolved. On other systems a "cc -M"
3169 command is required. (Note that the -M flag on other systems indicates a
3170 memory model to use!) If you have the Gnu C compiler, you might wish to use
3176 rp="Use which C compiler?"
3184 rp="Use which C compiler?"
3188 : Look for a hint-file generated 'call-back-unit'. Now that the
3189 : user has specified the compiler, we may need to set or change some
3191 if $test -f cc.cbu; then
3197 echo "Checking for GNU cc in disguise and/or its version number..." >&4
3198 $cat >gccvers.c <<EOM
3203 printf("%s\n", __VERSION__);
3205 printf("%s\n", "1");
3211 if $cc $ldflags -o gccvers gccvers.c; then
3212 gccversion=`./gccvers`
3213 case "$gccversion" in
3214 '') echo "You are not using GNU cc." ;;
3215 *) echo "You are using GNU cc $gccversion."
3220 echo "*** WHOA THERE!!! ***" >&4
3221 echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
3222 case "$knowitall" in
3224 echo " You'd better start hunting for one and let me know about it." >&4
3230 case "$gccversion" in
3231 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
3233 case "$gccversion" in
3234 '') gccosandvers='' ;;
3235 *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
3236 gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
3238 case "$gccosandvers" in
3239 $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
3240 $osname$osvers) ;; # looking good
3241 $osname*) cat <<EOM >&4
3243 *** WHOA THERE!!! ***
3245 Your gcc has not been compiled for the exact release of
3246 your operating system ($gccosandvers versus $osname$osvers).
3248 In general it is a good idea to keep gcc synchronized with
3249 the operating system because otherwise serious problems
3250 may ensue when trying to compile software, like Perl.
3252 I'm trying to be optimistic here, though, and will continue.
3253 If later during the configuration and build icky compilation
3254 problems appear (headerfile conflicts being the most common
3255 manifestation), I suggest reinstalling the gcc to match
3256 your operating system release.
3260 *) gccosandvers='' ;; # failed to parse, better be silent
3268 : see how we invoke the C preprocessor
3270 echo "Now, how can we feed standard input to your C preprocessor..." >&4
3271 cat <<'EOT' >testcpp.c
3277 if test ! -f cppstdin; then
3278 if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
3279 # AIX cc -E doesn't show the absolute headerfile
3280 # locations but we'll cheat by using the -M flag.
3281 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
3283 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
3286 echo "Keeping your $hint cppstdin wrapper."
3289 wrapper=`pwd`/cppstdin
3293 if $test "X$cppstdin" != "X" && \
3294 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
3295 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
3297 echo "You used to use $cppstdin $cppminus so we'll use that again."
3299 '') echo "But let's see if we can live without a wrapper..." ;;
3301 if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
3302 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
3304 echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
3307 echo "(However, $cpprun $cpplast does not work, let's see...)"
3315 echo "Good old $cppstdin $cppminus does not seem to be of any help..."
3322 elif echo 'Maybe "'"$cc"' -E" will work...'; \
3323 $cc -E <testcpp.c >testcpp.out 2>&1; \
3324 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3325 echo "Yup, it does."
3328 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
3329 $cc -E - <testcpp.c >testcpp.out 2>&1; \
3330 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3331 echo "Yup, it does."
3334 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
3335 $cc -P <testcpp.c >testcpp.out 2>&1; \
3336 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3337 echo "Yipee, that works!"
3340 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
3341 $cc -P - <testcpp.c >testcpp.out 2>&1; \
3342 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3343 echo "At long last!"
3346 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
3347 $cpp <testcpp.c >testcpp.out 2>&1; \
3348 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3352 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
3353 $cpp - <testcpp.c >testcpp.out 2>&1; \
3354 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3355 echo "Hooray, it works! I was beginning to wonder."
3358 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
3359 $wrapper <testcpp.c >testcpp.out 2>&1; \
3360 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3366 rp="No dice. I can't find a C preprocessor. Name one:"
3370 $x_cpp <testcpp.c >testcpp.out 2>&1
3371 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
3372 echo "OK, that will do." >&4
3374 echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
3389 echo "Perhaps can we force $cc -E using a wrapper..."
3390 if $wrapper <testcpp.c >testcpp.out 2>&1; \
3391 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
3397 echo "Nope, we'll have to live without it..."
3411 "$wrapper"|'cppstdin') ;;
3412 *) $rm -f $wrapper;;
3414 $rm -f testcpp.c testcpp.out
3416 : decide how portable to be. Allow command line overrides.
3417 case "$d_portable" in
3419 *) d_portable="$define" ;;
3422 : set up shell script to do ~ expansion
3428 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
3431 if $test -f /bin/csh; then
3432 /bin/csh -f -c "glob \$1"
3437 name=\`$expr x\$1 : '..\([^/]*\)'\`
3438 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
3439 if $test ! -d "\$dir"; then
3441 echo "\$me: can't locate home directory for: \$name" >&2
3446 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
3462 : now set up to get a file name
3466 cat <<'EOSC' >>getfile
3482 expr $fn : '.*(\(.*\)).*' | tr ',' $trnl >getfile.ok
3483 fn=`echo $fn | sed 's/(.*)//'`
3489 loc_file=`expr $fn : '.*:\(.*\)'`
3490 fn=`expr $fn : '\(.*\):.*'`
3498 */*) fullpath=true;;
3507 *e*) exp_file=true;;
3510 *p*) nopath_ok=true;;
3515 *d*) type='Directory';;
3516 *l*) type='Locate';;
3521 Locate) what='File';;
3526 case "$d_portable" in
3534 while test "$type"; do
3539 true) rp="$rp (~name ok)";;
3542 if test -f UU/getfile.ok && \
3543 $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
3562 value=`UU/filexp $ans`
3565 if test "$ans" != "$value"; then
3566 echo "(That expands to $value on this system.)"
3580 /*) value="$ansexp" ;;
3581 [a-zA-Z]:/*) value="$ansexp" ;;
3586 echo "I shall only accept a full path name, as in /bin/ls." >&4
3587 echo "Use a ! shell escape if you wish to check pathnames." >&4
3590 echo "Please give a full path name, starting with slash." >&4
3593 echo "Note that using ~name is ok provided it expands well." >&4
3606 for fp in $gfpth; do
3607 if test "X$fp" = X.; then
3612 if test -f "$pf"; then
3614 elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
3616 echo "($value is not a plain file, but that's ok.)"
3619 if test X"$type" = X; then
3626 for fp in $gfpth; do
3627 if test "X$fp" = X.; then
3632 direxp="$fp/$ansexp"
3634 if test -d "$direxp"; then
3642 if test -d "$ansexp"; then
3643 echo "(Looking for $loc_file in directory $value.)"
3644 value="$value/$loc_file"
3645 ansexp="$ansexp/$loc_file"
3647 if test -f "$ansexp"; then
3650 case "$nopath_ok" in
3651 true) case "$value" in
3653 *) echo "Assuming $value will be in people's path."
3669 if test "$fastread" = yes; then
3674 rp="$what $value doesn't exist. Use that name anyway?"
3693 test "X$gfpthkeep" != Xy && gfpth=""
3696 : What should the include directory be ?
3698 $echo $n "Hmm... $c"
3702 if $test -f /bin/mips && /bin/mips; then
3703 echo "Looks like a MIPS system..."
3704 $cat >usr.c <<'EOCP'
3705 #ifdef SYSTYPE_BSD43
3709 if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
3710 dflt='/bsd43/usr/include'
3714 mips_type='System V'
3716 $rm -f usr.c usr.out
3717 echo "and you're compiling with the $mips_type compiler and libraries."
3721 echo "Doesn't look like a MIPS system."
3731 case "$xxx_prompt" in
3734 rp='Where are the include files you want to use?'
3742 : Set private lib path
3745 plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
3750 '') dlist="$loclibpth $plibpth $glibpth";;
3751 *) dlist="$libpth";;
3754 : Now check and see which directories actually exist, avoiding duplicates
3758 if $test -d $xxx; then
3761 *) libpth="$libpth $xxx";;
3767 Some systems have incompatible or broken versions of libraries. Among
3768 the directories listed in the question below, please remove any you
3769 know not to be holding relevant libraries, and add any that are needed.
3770 Say "none" for none.
3781 rp="Directories to use for library searches?"
3788 : compute shared library extension
3791 if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
3801 On some systems, shared libraries may be available. Answer 'none' if
3802 you want to suppress searching of shared libraries for the remainder
3803 of this configuration.
3806 rp='What is the file extension used for shared libraries?'
3810 : Define several unixisms.
3811 : Hints files or command line option can be used to override them.
3812 : The convoluted testing is in case hints files set either the old
3815 '') case "$exe_ext" in
3817 *) _exe="$exe_ext" ;;
3822 '') case "$lib_ext" in
3829 '') case "$obj_ext" in
3836 '') case "$path_sep" in
3847 : Which makefile gets called first. This is used by make depend.
3848 case "$firstmakefile" in
3849 '') firstmakefile='makefile';;
3853 $define|true|[yY]*) dflt='y';;
3858 Perl can be built to use the SOCKS proxy protocol library. To do so,
3859 Configure must be run with -Dusesocks.
3861 If this doesn't make any sense to you, just accept the default '$dflt'.
3863 rp='Build Perl for SOCKS?'
3866 y|Y) val="$define" ;;
3872 : Looking for optional libraries
3874 echo "Checking for optional libraries..." >&4
3879 case "$libswanted" in
3880 '') libswanted='c_s';;
3883 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
3889 for thisdir in $libpth $xlibpth; do
3890 test -d $thisdir && libspath="$libspath $thisdir"
3892 for thislib in $libswanted; do
3893 for thisdir in $libspath; do
3895 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
3896 xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|tail -1`
3897 $test -f "$xxx" && eval $libscheck
3898 $test -f "$xxx" && libstyle=shared
3900 if test ! -f "$xxx"; then
3901 xxx=$thisdir/lib$thislib.$so
3902 $test -f "$xxx" && eval $libscheck
3903 $test -f "$xxx" && libstyle=shared
3905 if test ! -f "$xxx"; then
3906 xxx=$thisdir/lib$thislib$_a
3907 $test -f "$xxx" && eval $libscheck
3908 $test -f "$xxx" && libstyle=static
3910 if test ! -f "$xxx"; then
3911 xxx=$thisdir/$thislib$_a
3912 $test -f "$xxx" && eval $libscheck
3913 $test -f "$xxx" && libstyle=static
3915 if test ! -f "$xxx"; then
3916 xxx=$thisdir/lib${thislib}_s$_a
3917 $test -f "$xxx" && eval $libscheck
3918 $test -f "$xxx" && libstyle=static
3919 $test -f "$xxx" && thislib=${thislib}_s
3921 if test ! -f "$xxx"; then
3922 xxx=$thisdir/Slib$thislib$_a
3923 $test -f "$xxx" && eval $libscheck
3924 $test -f "$xxx" && libstyle=static
3926 if $test -f "$xxx"; then
3928 shared) echo "Found -l$thislib (shared)." ;;
3929 static) echo "Found -l$thislib." ;;
3930 *) echo "Found -l$thislib ($libstyle)." ;;
3934 *) dflt="$dflt -l$thislib"
3935 libsfound="$libsfound $xxx"
3937 libsfiles="$libsfiles $yyy"
3938 yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
3939 case " $libsdirs " in
3941 *) libsdirs="$libsdirs $yyy" ;;
3948 if $test ! -f "$xxx"; then
3949 echo "No -l$thislib."
3960 ' '|'') dflt='none';;
3965 In order to compile $package on your machine, a number of libraries
3966 are usually needed. Include any other special libraries here as well.
3967 Say "none" for none. The default list is almost always right.
3971 rp="What libraries to use?"
3978 : determine optimization, if desired, or use for debug flag also
3980 ' '|$undef) dflt='none';;
3982 *) dflt="$optimize";;
3986 By default, $package compiles with the -O flag to use the optimizer.
3987 Alternately, you might want to use the symbolic debugger, which uses
3988 the -g flag (on traditional Unix systems). Either flag can be
3989 specified here. To use neither flag, specify the word "none".
3992 rp="What optimizer/debugger flag should be used?"
3996 'none') optimize=" ";;
4000 : We will not override a previous value, but we might want to
4001 : augment a hint file
4003 default|recommended)
4004 case "$gccversion" in
4005 1*) dflt='-fpcc-struct-return' ;;
4008 *-g*) dflt="$dflt -DDEBUGGING";;
4010 case "$gccversion" in
4011 2*) if test -d /etc/conf/kconfig.d &&
4012 $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
4018 case "$gccversion" in
4022 echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
4023 echo 'int main(void) { return 0; }' > gcctest.c
4024 if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
4025 echo "Yes, it does." 2>&1
4028 echo "Leaving current flags $ccflags alone." 2>&1
4030 *) dflt="$dflt -fno-strict-aliasing" ;;
4033 echo "Nope, it doesn't, but that's ok." 2>&1
4040 case "$mips_type" in
4041 *BSD*|'') inclwanted="$locincpth $usrinc";;
4042 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
4044 for thisincl in $inclwanted; do
4045 if $test -d $thisincl; then
4046 if $test x$thisincl != x$usrinc; then
4049 *) dflt="$dflt -I$thisincl";;
4055 inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
4057 elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
4065 *) dflt="$dflt -D$2";;
4069 set signal.h LANGUAGE_C; eval $inctest
4073 ccflags="$ccflags -DSOCKS"
4078 default|recommended) dflt="$ccflags $dflt" ;;
4079 *) dflt="$ccflags";;
4087 Your C compiler may want other flags. For this question you should include
4088 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
4089 but you should NOT include libraries or ld flags like -lwhatever. If you
4090 want $package to honor its debug switch, you should include -DDEBUGGING here.
4091 Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
4093 To use no flags, specify the word "none".
4099 rp="Any additional cc flags?"
4106 : the following weeds options from ccflags that are of no interest to cpp
4108 case "$gccversion" in
4109 1*) cppflags="$cppflags -D__GNUC__"
4111 case "$mips_type" in
4113 *BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
4119 echo "Let me guess what the preprocessor flags are..." >&4
4133 *) ftry="$previous $flag";;
4135 if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
4136 >cpp1.out 2>/dev/null && \
4137 $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
4138 >cpp2.out 2>/dev/null && \
4139 $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
4140 $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
4142 cppflags="$cppflags $ftry"
4152 *-*) echo "They appear to be: $cppflags";;
4154 $rm -f cpp.c cpp?.out
4158 : flags used in final linking phase
4160 '') if ./venix; then
4166 *-posix*) dflt="$dflt -posix" ;;
4169 *) dflt="$ldflags";;
4172 : Try to guess additional flags to pick up local libraries.
4173 for thislibdir in $libpth; do
4174 case " $loclibpth " in
4177 *"-L$thislibdir "*) ;;
4178 *) dflt="$dflt -L$thislibdir" ;;
4190 Your C linker may need flags. For this question you should
4191 include -L/whatever and any other flags used by the C linker, but you
4192 should NOT include libraries like -lwhatever.
4194 Make sure you include the appropriate -L/path flags if your C linker
4195 does not normally search all of the directories you specified above,
4198 To use no flags, specify the word "none".
4202 rp="Any additional ld flags (NOT including libraries)?"
4208 rmlist="$rmlist pdp11"
4212 echo "Checking your choice of C compiler and flags for coherency..." >&4
4213 $cat > try.c <<'EOF'
4215 int main() { printf("Ok\n"); exit(0); }
4217 set X $cc $optimize $ccflags -o try $ldflags try.c $libs
4219 $cat >try.msg <<'EOM'
4220 I've tried to compile and run the following simple program:
4223 $cat try.c >> try.msg
4225 $cat >> try.msg <<EOM
4232 and I got the following output:
4236 if sh -c "$cc $optimize $ccflags -o try $ldflags try.c $libs" >>try.msg 2>&1; then
4237 if sh -c './try' >>try.msg 2>&1; then
4241 *) echo 'The program compiled OK, but produced no output.' >> try.msg
4244 cat >> try.msg <<'EOQS'
4245 If $libs contains -lsfio, and sfio is mis-configured, then it
4246 sometimes (apparently) runs and exits with a 0 status, but with no
4247 output! It may have to do with sfio's use of _exit vs. exit.
4250 rp="You have a big problem. Shall I abort Configure"
4257 echo "The program compiled OK, but exited with status $?." >>try.msg
4258 rp="You have a problem. Shall I abort Configure"
4262 echo "I can't compile the test program." >>try.msg
4263 rp="You have a BIG problem. Shall I abort Configure"
4269 case "$knowitall" in
4271 echo "(The supplied flags or libraries might be incorrect.)"
4279 *) echo "Ok. Stopping Configure." >&4
4284 n) echo "OK, that should do.";;
4286 $rm -f try try.* core
4288 : define an is-a-typedef? function
4289 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
4291 "") inclist="sys/types.h";;
4293 eval "varval=\$$var";
4297 for inc in $inclist; do
4298 echo "#include <$inc>" >>temp.c;
4300 echo "#ifdef $type" >> temp.c;
4301 echo "printf(\"We have $type\");" >> temp.c;
4302 echo "#endif" >> temp.c;
4303 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
4304 if $contains $type temp.E >/dev/null 2>&1; then
4310 *) eval "$var=\$varval";;
4313 : define an is-a-typedef? function that prompts if the type is not available.
4314 typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
4316 "") inclist="sys/types.h";;
4318 eval "varval=\$$var";
4322 for inc in $inclist; do
4323 echo "#include <$inc>" >>temp.c;
4325 echo "#ifdef $type" >> temp.c;
4326 echo "printf(\"We have $type\");" >> temp.c;
4327 echo "#endif" >> temp.c;
4328 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
4330 echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
4331 if $contains $type temp.E >/dev/null 2>&1; then
4332 echo "$type found." >&4;
4335 echo "$type NOT found." >&4;
4341 *) eval "$var=\$varval";;
4344 : define a shorthand compile call
4348 $cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs > /dev/null 2>&1;'
4349 : define a shorthand compile call for compilations that should be ok.
4353 $cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs;'
4355 : check for lengths of integral types
4359 echo "Checking to see how big your integers are..." >&4
4360 $cat >intsize.c <<'EOCP'
4364 printf("intsize=%d;\n", (int)sizeof(int));
4365 printf("longsize=%d;\n", (int)sizeof(long));
4366 printf("shortsize=%d;\n", (int)sizeof(short));
4371 if eval $compile_ok && ./intsize > /dev/null; then
4373 echo "Your integers are $intsize bytes long."
4374 echo "Your long integers are $longsize bytes long."
4375 echo "Your short integers are $shortsize bytes long."
4379 Help! I can't compile and run the intsize test program: please enlighten me!
4380 (This is probably a misconfiguration in your system or libraries, and
4381 you really ought to fix it. Still, I'll try anyway.)
4385 rp="What is the size of an integer (in bytes)?"
4389 rp="What is the size of a long integer (in bytes)?"
4393 rp="What is the size of a short integer (in bytes)?"
4399 $rm -f intsize intsize.*
4401 : see what type lseek is declared as in the kernel
4402 rp="What is the type used for lseek's offset on this system?"
4403 set off_t lseektype long stdio.h sys/types.h
4407 echo "Checking to see how big your file offsets are..." >&4
4409 #include <sys/types.h>
4413 printf("%d\n", (int)sizeof($lseektype));
4418 if eval $compile_ok; then
4420 echo "Your file offsets are $lseeksize bytes long."
4424 echo "(I can't seem to compile the test program. Guessing...)"
4425 rp="What is the size of your file offsets (in bytes)?"
4431 : see what type file positions are declared as in the library
4432 rp="What is the type for file position used by fsetpos()?"
4433 set fpos_t fpostype long stdio.h sys/types.h
4438 *_t) zzz="$fpostype" ;;
4441 echo "Checking the size of $zzz..." >&4
4443 #include <sys/types.h>
4446 printf("%d\n", (int)sizeof($fpostype));
4451 if eval $compile_ok; then
4455 echo "(I can't execute the test program--guessing $fpossize.)" >&4
4458 echo "Your $zzz is $fpossize bytes long."
4464 echo "(I can't compile the test program. Guessing...)" >&4
4465 rp="What is the size of your file positions (in bytes)?"
4472 # Backward compatibility (uselfs is deprecated).
4474 "$define"|true|[yY]*)
4477 *** Configure -Duselfs is deprecated, using -Duselargefiles instead.
4479 uselargefiles="$define"
4483 case "$lseeksize:$fpossize" in
4486 You can have files larger than 2 gigabytes.
4489 *) case "$uselargefiles" in
4490 "$undef"|false|[nN]*) dflt='n' ;;
4495 Perl can be built to understand large files (files larger than 2 gigabytes)
4496 on some systems. To do so, Configure can be run with -Duselargefiles.
4498 If this doesn't make any sense to you, just accept the default '$dflt'.
4500 rp='Try to understand large files, if available?'
4503 y|Y) val="$define" ;;
4510 case "$uselargefiles" in
4512 : Look for a hint-file generated 'call-back-unit'. If the
4513 : user has specified that a large files perl is to be built,
4514 : we may need to set or change some other defaults.
4515 if $test -f uselargefiles.cbu; then
4516 echo "Your platform has some specific hints for large file builds, using them..."
4517 . ./uselargefiles.cbu
4519 echo "Rechecking to see how big your file offsets are..." >&4
4521 #include <sys/types.h>
4525 printf("%d\n", (int)sizeof($lseektype));
4530 if eval $compile_ok; then
4532 $echo "Your file offsets are now $lseeksize bytes long."
4536 echo "(I can't seem to compile the test program. Guessing...)"
4537 rp="What is the size of your file offsets (in bytes)?"
4542 *_t) zzz="$fpostype" ;;
4545 $echo $n "Rechecking the size of $zzz...$c" >&4
4547 #include <sys/types.h>
4550 printf("%d\n", (int)sizeof($fpostype));
4555 if eval $compile_ok; then
4560 echo "(I can't execute the test program--guessing $fpossize.)" >&4
4563 echo " $fpossize bytes." >&4
4569 echo "(I can't compile the test program. Guessing...)" >&4
4570 rp="What is the size of your file positions (in bytes)?"
4580 case "$usemorebits" in
4581 "$define"|true|[yY]*)
4582 use64bitint="$define"
4583 uselongdouble="$define"
4584 usemorebits="$define"
4586 *) usemorebits="$undef"
4591 case "$uselonglong" in
4592 "$define"|true|[yY]*)
4595 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
4597 use64bitint="$define"
4600 case "$use64bits" in
4601 "$define"|true|[yY]*)
4604 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
4606 use64bitint="$define"
4609 case "$use64bitints" in
4610 "$define"|true|[yY]*)
4613 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
4615 use64bitint="$define"
4618 case "$use64bitsint" in
4619 "$define"|true|[yY]*)
4622 *** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
4624 use64bitint="$define"
4627 case "$uselonglongs" in
4628 "$define"|true|[yY]*)
4631 *** There is no Configure -Duselonglongs, using -Duse64bitint instead.
4633 use64bitint="$define"
4636 case "$use64bitsall" in
4637 "$define"|true|[yY]*)
4640 *** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
4642 use64bitall="$define"
4647 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
4649 case "$use64bitall" in
4650 "$define"|true|[yY]*) use64bitint="$define" ;;
4656 You have natively 64-bit long integers.
4660 *) case "$use64bitint" in
4661 "$define"|true|[yY]*) dflt='y';;
4666 Perl can be built to take advantage of 64-bit integer types
4667 on some systems. To do so, Configure can be run with -Duse64bitint.
4668 Choosing this option will most probably introduce binary incompatibilities.
4670 If this doesn't make any sense to you, just accept the default '$dflt'.
4672 rp='Try to use 64-bit integers, if available?'
4675 [yY]*) val="$define" ;;
4683 case "$use64bitall" in
4684 "$define"|true|[yY]*) dflt='y' ;;
4685 *) case "$longsize" in
4693 You may also choose to try maximal 64-bitness. It means using as much
4694 64-bitness as possible on the platform. This in turn means even more
4695 binary incompatibilities. On the other hand, your platform may not
4696 have any more 64-bitness available than what you already have chosen.
4698 If this doesn't make any sense to you, just accept the default '$dflt'.
4700 rp='Try to use maximal 64-bit support, if available?'
4703 [yY]*) val="$define" ;;
4708 case "$use64bitall" in
4710 case "$use64bitint" in
4714 Since you have chosen a maximally 64-bit build, I'm also turning on
4715 the use of 64-bit integers.
4717 use64bitint="$define" ;;
4722 case "$use64bitint" in
4723 "$define"|true|[yY]*)
4724 : Look for a hint-file generated 'call-back-unit'. If the
4725 : user has specified that a 64-bit perl is to be built,
4726 : we may need to set or change some other defaults.
4727 if $test -f use64bitint.cbu; then
4728 echo "Your platform has some specific hints for 64-bit integers, using them..."
4732 4) case "$archname64" in
4733 '') archname64=64int ;;
4740 case "$use64bitall" in
4741 "$define"|true|[yY]*)
4742 : Look for a hint-file generated 'call-back-unit'. If the
4743 : user has specified that a maximally 64-bit perl is to be built,
4744 : we may need to set or change some other defaults.
4745 if $test -f use64bitall.cbu; then
4746 echo "Your platform has some specific hints for 64-bit builds, using them..."
4750 4) case "$archname64" in
4751 ''|64int) archname64=64all ;;
4758 : determine the architecture name
4760 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
4761 tarch=`arch`"-$osname"
4762 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
4763 if uname -m > tmparch 2>&1 ; then
4764 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
4765 -e 's/$/'"-$osname/" tmparch`
4773 case "$myarchname" in
4776 echo "(Your architecture name used to be $myarchname.)"
4783 *) dflt="$archname";;
4785 rp='What is your architecture name'
4788 case "$usethreads" in
4790 echo "Threads selected." >&4