Show
Ignore:
Timestamp:
02/09/04 14:10:55 (6 years ago)
Author:
zacheiss
Message:

Import perl 5.8.3.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/vendor/third/perl/Configure

    r18449 r20074  
    1919# 
    2020 
    21 # $Id: Configure,v 1.1.1.5 2003-01-10 13:46:08 zacheiss Exp $ 
     21# $Id: Configure,v 1.1.1.6 2004-02-09 19:08:10 zacheiss Exp $ 
    2222# 
    23 # Generated on Fri Jul 19 01:54:37 EET DST 2002 [metaconfig 3.0 PL70] 
     23# Generated on Fri Dec  5 12:57:38 MET 2003 [metaconfig 3.0 PL70] 
    2424# (with additional metaconfig patches by perlbug@perl.org) 
    2525 
     
    4747(exit $?0) || exec sh $0 $argv:q 
    4848rm -f c1$$ c2$$ 
     49 
     50if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then 
     51        cat >&4 <<EOF 
     52*** 
     53*** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do 
     54*** Configure that well.  (Plan 9 is close to UNIX but not close enough.) 
     55*** Please read the README.plan9 for further instructions. 
     56*** Cannot continue, aborting. 
     57*** 
     58EOF 
     59        exit 1 
     60fi 
    4961 
    5062: compute my invocation name 
     
    6072p_=: 
    6173: On OS/2 this directory should exist if this is not floppy only system :-] 
    62 if test -d c:/. ; then 
     74if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then 
    6375    if test -n "$OS2_SHELL"; then 
    6476                p_=\; 
    6577                PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` 
    6678                OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` 
     79                is_os2=yes 
    6780        elif test -n "$DJGPP"; then 
    6881                case "X${MACHTYPE:-nonesuchmach}" in 
     
    166179cd UU && rm -f ./* 
    167180 
    168  
    169181ccname='' 
    170182ccversion='' 
     
    177189to='' 
    178190usecrosscompile='' 
     191mistrustnm='' 
    179192perllibs='' 
    180193dynamic_ext='' 
     
    323336d_access='' 
    324337d_accessx='' 
     338d_aintl='' 
    325339d_alarm='' 
    326340asctime_r_proto='' 
     
    341355d_cmsghdr_s='' 
    342356d_const='' 
     357d_copysignl='' 
    343358cryptlib='' 
    344359d_crypt='' 
     
    384399d_endservent_r='' 
    385400endservent_r_proto='' 
     401d_faststdio='' 
    386402d_fchdir='' 
    387403d_fchmod='' 
     
    499515d_hasmntopt='' 
    500516d_htonl='' 
     517d_ilogbl='' 
    501518d_inetaton='' 
    502519d_int64_t='' 
     
    539556d_modfl='' 
    540557d_modfl_pow32_bug='' 
     558d_modflproto='' 
    541559d_mprotect='' 
    542560d_msg='' 
     
    563581old_pthread_create_joinable='' 
    564582d_pthread_atfork='' 
     583d_pthread_attr_setscope='' 
    565584d_pthread_yield='' 
    566585d_sched_yield='' 
     
    586605d_sanemcmp='' 
    587606d_sbrkproto='' 
     607d_scalbnl='' 
    588608d_select='' 
    589609d_sem='' 
     
    755775fpossize='' 
    756776fpostype='' 
     777gccansipedantic='' 
    757778gccosandvers='' 
    758779gccversion='' 
     
    764785h_fcntl='' 
    765786h_sysfile='' 
     787html1dir='' 
     788html1direxp='' 
     789installhtml1dir='' 
     790html3dir='' 
     791html3direxp='' 
     792installhtml3dir='' 
    766793i_arpainet='' 
    767794i_crypt='' 
     
    10461073sitebin='' 
    10471074sitebinexp='' 
     1075installsitehtml1dir='' 
     1076sitehtml1dir='' 
     1077sitehtml1direxp='' 
     1078installsitehtml3dir='' 
     1079sitehtml3dir='' 
     1080sitehtml3direxp='' 
    10481081installsitelib='' 
    10491082sitelib='' 
    10501083sitelib_stem='' 
    10511084sitelibexp='' 
     1085installsiteman1dir='' 
     1086siteman1dir='' 
     1087siteman1direxp='' 
     1088installsiteman3dir='' 
     1089siteman3dir='' 
     1090siteman3direxp='' 
    10521091siteprefix='' 
    10531092siteprefixexp='' 
     1093installsitescript='' 
     1094sitescript='' 
     1095sitescriptexp='' 
    10541096sizesize='' 
    10551097sizetype='' 
     
    10751117use64bitall='' 
    10761118use64bitint='' 
     1119usefaststdio='' 
    10771120ccflags_uselargefiles='' 
    10781121ldflags_uselargefiles='' 
     
    11041147vendorbin='' 
    11051148vendorbinexp='' 
     1149installvendorhtml1dir='' 
     1150vendorhtml1dir='' 
     1151vendorhtml1direxp='' 
     1152installvendorhtml3dir='' 
     1153vendorhtml3dir='' 
     1154vendorhtml3direxp='' 
    11061155d_vendorlib='' 
    11071156installvendorlib='' 
     
    11091158vendorlib_stem='' 
    11101159vendorlibexp='' 
     1160installvendorman1dir='' 
     1161vendorman1dir='' 
     1162vendorman1direxp='' 
     1163installvendorman3dir='' 
     1164vendorman3dir='' 
     1165vendorman3direxp='' 
    11111166usevendorprefix='' 
    11121167vendorprefix='' 
    11131168vendorprefixexp='' 
     1169d_vendorscript='' 
     1170installvendorscript='' 
     1171vendorscript='' 
     1172vendorscriptexp='' 
    11141173versiononly='' 
    11151174defvoidused='' 
     
    11451204: DOS DJGPP 
    11461205    _exe=".exe" 
    1147 elif test -d c:/. ; then 
     1206elif test -d c:/. -o -n "$is_os2" ; then 
    11481207: OS/2 or cygwin 
    11491208    _exe=".exe" 
     
    11931252: some systems want to use only the non-versioned libso:s 
    11941253ignore_versioned_solibs='' 
     1254siteman1dir='' 
     1255siteman3dir='' 
     1256sitescript='' 
    11951257archname64='' 
    11961258ccflags_uselargefiles='' 
     
    12051267 
    12061268: List of libraries we want. 
    1207 : If anyone needs -lnet, put it in a hint file. 
    1208 libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl' 
    1209 libswanted="$libswanted dld ld sun m c cposix posix" 
    1210 libswanted="$libswanted ndir dir crypt sec" 
    1211 libswanted="$libswanted ucb bsd BSD PW x util" 
     1269: If anyone needs extra -lxxx, put those in a hint file. 
     1270libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun" 
     1271libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" 
    12121272: We probably want to search /usr/shlib before most other libraries. 
    12131273: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. 
     
    21532213                if test -n "$DJGPP"; then 
    21542214                        echo \$dir/\$thing.exe 
    2155                 else 
     2215                elif test "$eunicefix" != ":"; then 
    21562216                        : on Eunice apparently 
    21572217                        echo \$dir/\$thing 
     2218                        exit 0 
    21582219                fi 
    21592220                exit 0 
     
    30833144                        osvers="$3" 
    30843145                        ;; 
     3146                os2)    osname=os2 
     3147                        osvers="$4" 
     3148                        ;; 
    30853149                POSIX-BC | posix-bc ) osname=posix-bc 
    30863150                        osvers="$3" 
     
    31213185                                alpha) 
    31223186                                        osname=dec_osf 
    3123                                         osvers=`sizer -v | awk '{print $3}' |  tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'` 
     3187                                        osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' |  tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'` 
    31243188                                        case "$osvers" in 
    31253189                                        [1-9].[0-9]*) ;; 
     
    31313195                        esac 
    31323196                        ;; 
    3133                 unixware) osname=svr5 
     3197                # UnixWare 7.1.2 is known as Open UNIX 8 
     3198                openunix|unixware) osname=svr5 
    31343199                        osvers="$4" 
    31353200                        ;; 
     
    32013266                        fi 
    32023267                        $rm -f UU/kernel.what 
    3203                 elif test -d c:/.; then 
     3268                elif test -d c:/. -o -n "$is_os2" ; then 
    32043269                        set X $myuname 
    32053270                        osname=os2 
     
    36093674 
    36103675 
    3611 case "$usethreads" in 
    3612 "$define"|true|[yY]*) 
    36133676: Look for a hint-file generated 'call-back-unit'.  If the 
    36143677: user has specified that a threading perl is to be built, 
    36153678: we may need to set or change some other defaults. 
    3616         if $test -f usethreads.cbu; then 
    3617                 echo "Your platform has some specific hints for threaded builds, using them..." 
    3618                 . ./usethreads.cbu 
    3619         else 
     3679if $test -f usethreads.cbu; then 
     3680    echo "Your platform has some specific hints regarding threaded builds, using them..." 
     3681    . ./usethreads.cbu 
     3682else 
     3683    case "$usethreads" in 
     3684        "$define"|true|[yY]*) 
    36203685                $cat <<EOM 
    3621 (Your platform doesn't have any specific hints for threaded builds. 
     3686(Your platform does not have any specific hints for threaded builds. 
    36223687 Assuming POSIX threads, then.) 
    36233688EOM 
    3624         fi 
    3625         ;; 
    3626 esac 
     3689        ;; 
     3690    esac 
     3691fi 
    36273692 
    36283693cat <<EOM 
     
    37923857#endif 
    37933858#endif 
    3794         exit(0); 
     3859        return(0); 
    37953860} 
    37963861EOM 
     
    38003865        '') echo "You are not using GNU cc." ;; 
    38013866        *)  echo "You are using GNU cc $gccversion." 
    3802             ccname=gcc   
     3867            ccname=gcc 
    38033868            ;; 
    38043869        esac 
     
    38533918esac 
    38543919 
    3855 # gcc 3.1 complains about adding -Idirectories that it already knows about, 
     3920# gcc 3.* complain about adding -Idirectories that they already know about, 
    38563921# so we will take those off from locincpth. 
    38573922case "$gccversion" in 
    385839233*) 
    38593924    echo "main(){}">try.c 
    3860     for incdir in `$cc -v -c try.c 2>&1 | \ 
    3861        sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do 
    3862        locincpth=`echo $locincpth | sed s!$incdir!!` 
     3925    for incdir in $locincpth; do 
     3926       warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \ 
     3927             grep '^c[cp]p*[01]: warning: changing search order '` 
     3928       if test "X$warn" != X; then 
     3929           locincpth=`echo " $locincpth " | sed "s! $incdir ! !"` 
     3930       fi 
    38633931    done 
    38643932    $rm -f try try.* 
     
    44514519esac 
    44524520 
     4521case "$ccflags" in 
     4522*-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;; 
     4523esac 
     4524 
     4525case "$uselongdouble" in 
     4526$define|true|[yY]*)     dflt='y';; 
     4527*) dflt='n';; 
     4528esac 
     4529cat <<EOM 
     4530 
     4531Perl can be built to take advantage of long doubles which 
     4532(if available) may give more accuracy and range for floating point numbers. 
     4533 
     4534If this doesn't make any sense to you, just accept the default '$dflt'. 
     4535EOM 
     4536rp='Try to use long doubles if available?' 
     4537. ./myread 
     4538case "$ans" in 
     4539y|Y)    val="$define"   ;; 
     4540*)      val="$undef"    ;; 
     4541esac 
     4542set uselongdouble 
     4543eval $setvar 
     4544 
     4545case "$uselongdouble" in 
     4546true|[yY]*) uselongdouble="$define" ;; 
     4547esac 
     4548 
     4549: Look for a hint-file generated 'call-back-unit'.  If the 
     4550: user has specified that long doubles should be used, 
     4551: we may need to set or change some other defaults. 
     4552if $test -f uselongdouble.cbu; then 
     4553    echo "Your platform has some specific hints regarding long doubles, using them..." 
     4554    . ./uselongdouble.cbu 
     4555else 
     4556    case "$uselongdouble" in 
     4557        $define) 
     4558                $cat <<EOM 
     4559(Your platform does not have any specific hints for long doubles.) 
     4560EOM 
     4561        ;; 
     4562    esac 
     4563fi 
     4564 
    44534565: Looking for optional libraries 
    44544566echo " " 
     
    47984910$cat > try.c <<'EOF' 
    47994911#include <stdio.h> 
    4800 int main() { printf("Ok\n"); exit(0); } 
     4912int main() { printf("Ok\n"); return(0); } 
    48014913EOF 
    48024914set X $cc -o try $optimize $ccflags $ldflags try.c $libs 
     
    48814993shift; 
    48824994$cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;' 
    4883  
    4884 : check for lengths of integral types 
    4885 echo " " 
    4886 case "$intsize" in 
    4887 '') 
    4888         echo "Checking to see how big your integers are..." >&4 
    4889         $cat >try.c <<'EOCP' 
    4890 #include <stdio.h> 
    4891 int main() 
    4892 { 
    4893         printf("intsize=%d;\n", (int)sizeof(int)); 
    4894         printf("longsize=%d;\n", (int)sizeof(long)); 
    4895         printf("shortsize=%d;\n", (int)sizeof(short)); 
    4896         exit(0); 
    4897 } 
    4898 EOCP 
    4899         set try 
    4900         if eval $compile_ok && $run ./try > /dev/null; then 
    4901                 eval `$run ./try` 
    4902                 echo "Your integers are $intsize bytes long." 
    4903                 echo "Your long integers are $longsize bytes long." 
    4904                 echo "Your short integers are $shortsize bytes long." 
    4905         else 
    4906                 $cat >&4 <<EOM 
    4907 ! 
    4908 Help! I can't compile and run the intsize test program: please enlighten me! 
    4909 (This is probably a misconfiguration in your system or libraries, and 
    4910 you really ought to fix it.  Still, I'll try anyway.) 
    4911 ! 
    4912 EOM 
    4913                 dflt=4 
    4914                 rp="What is the size of an integer (in bytes)?" 
    4915                 . ./myread 
    4916                 intsize="$ans" 
    4917                 dflt=$intsize 
    4918                 rp="What is the size of a long integer (in bytes)?" 
    4919                 . ./myread 
    4920                 longsize="$ans" 
    4921                 dflt=2 
    4922                 rp="What is the size of a short integer (in bytes)?" 
    4923                 . ./myread 
    4924                 shortsize="$ans" 
    4925         fi 
    4926         ;; 
    4927 esac 
    4928 $rm -f try try.* 
    4929  
    4930 : check for long long 
    4931 echo " " 
    4932 echo "Checking to see if you have long long..." >&4 
    4933 echo 'int main() { long long x = 7; return 0; }' > try.c 
    4934 set try 
    4935 if eval $compile; then 
    4936         val="$define" 
    4937         echo "You have long long." 
    4938 else 
    4939         val="$undef" 
    4940         echo "You do not have long long." 
    4941 fi 
    4942 $rm try.* 
    4943 set d_longlong 
    4944 eval $setvar 
    4945  
    4946 : check for length of long long 
    4947 case "${d_longlong}${longlongsize}" in 
    4948 $define) 
    4949         echo " " 
    4950         echo "Checking to see how big your long longs are..." >&4 
    4951         $cat >try.c <<'EOCP' 
    4952 #include <stdio.h> 
    4953 int main() 
    4954 { 
    4955     printf("%d\n", (int)sizeof(long long)); 
    4956     return(0); 
    4957 } 
    4958 EOCP 
    4959         set try 
    4960         if eval $compile_ok; then 
    4961                 longlongsize=`$run ./try` 
    4962                 echo "Your long longs are $longlongsize bytes long." 
    4963         else 
    4964                 dflt='8' 
    4965                 echo " " 
    4966                 echo "(I can't seem to compile the test program.  Guessing...)" 
    4967                 rp="What is the size of a long long (in bytes)?" 
    4968                 . ./myread 
    4969                 longlongsize="$ans" 
    4970         fi 
    4971         if $test "X$longsize" = "X$longlongsize"; then 
    4972                 echo "(That isn't any different from an ordinary long.)" 
    4973         fi       
    4974         ;; 
    4975 esac 
    4976 $rm -f try.* try 
    49774995 
    49784996: determine filename position in cpp output 
     
    50155033case "$osname" in 
    50165034vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is > 
     5035os2) cppfilter="sed -e 's|\\\\\\\\|/|g' |" ;; # path component separator is \ 
    50175036*)   cppfilter='' ;; 
    50185037esac 
     
    50845103        set $yyy; shift; shift; yyy=$@; 
    50855104done' 
     5105 
     5106: see if stdlib is available 
     5107set stdlib.h i_stdlib 
     5108eval $inhdr 
     5109 
     5110: check for lengths of integral types 
     5111echo " " 
     5112case "$intsize" in 
     5113'') 
     5114        echo "Checking to see how big your integers are..." >&4 
     5115        $cat >try.c <<EOCP 
     5116#include <stdio.h> 
     5117#$i_stdlib I_STDLIB 
     5118#ifdef I_STDLIB 
     5119#include <stdlib.h> 
     5120#endif 
     5121int main() 
     5122{ 
     5123        printf("intsize=%d;\n", (int)sizeof(int)); 
     5124        printf("longsize=%d;\n", (int)sizeof(long)); 
     5125        printf("shortsize=%d;\n", (int)sizeof(short)); 
     5126        exit(0); 
     5127} 
     5128EOCP 
     5129        set try 
     5130        if eval $compile_ok && $run ./try > /dev/null; then 
     5131                eval `$run ./try` 
     5132                echo "Your integers are $intsize bytes long." 
     5133                echo "Your long integers are $longsize bytes long." 
     5134                echo "Your short integers are $shortsize bytes long." 
     5135        else 
     5136                $cat >&4 <<EOM 
     5137! 
     5138Help! I can't compile and run the intsize test program: please enlighten me! 
     5139(This is probably a misconfiguration in your system or libraries, and 
     5140you really ought to fix it.  Still, I'll try anyway.) 
     5141! 
     5142EOM 
     5143                dflt=4 
     5144                rp="What is the size of an integer (in bytes)?" 
     5145                . ./myread 
     5146                intsize="$ans" 
     5147                dflt=$intsize 
     5148                rp="What is the size of a long integer (in bytes)?" 
     5149                . ./myread 
     5150                longsize="$ans" 
     5151                dflt=2 
     5152                rp="What is the size of a short integer (in bytes)?" 
     5153                . ./myread 
     5154                shortsize="$ans" 
     5155        fi 
     5156        ;; 
     5157esac 
     5158$rm -f try try.* 
     5159 
     5160: check for long long 
     5161echo " " 
     5162echo "Checking to see if you have long long..." >&4 
     5163echo 'int main() { long long x = 7; return 0; }' > try.c 
     5164set try 
     5165if eval $compile; then 
     5166        val="$define" 
     5167        echo "You have long long." 
     5168else 
     5169        val="$undef" 
     5170        echo "You do not have long long." 
     5171fi 
     5172$rm try.* 
     5173set d_longlong 
     5174eval $setvar 
     5175 
     5176: check for length of long long 
     5177case "${d_longlong}${longlongsize}" in 
     5178$define) 
     5179        echo " " 
     5180        echo "Checking to see how big your long longs are..." >&4 
     5181        $cat >try.c <<'EOCP' 
     5182#include <stdio.h> 
     5183int main() 
     5184{ 
     5185    printf("%d\n", (int)sizeof(long long)); 
     5186    return(0); 
     5187} 
     5188EOCP 
     5189        set try 
     5190        if eval $compile_ok; then 
     5191                longlongsize=`$run ./try` 
     5192                echo "Your long longs are $longlongsize bytes long." 
     5193        else 
     5194                dflt='8' 
     5195                echo " " 
     5196                echo "(I can't seem to compile the test program.  Guessing...)" 
     5197                rp="What is the size of a long long (in bytes)?" 
     5198                . ./myread 
     5199                longlongsize="$ans" 
     5200        fi 
     5201        if $test "X$longsize" = "X$longlongsize"; then 
     5202                echo "(That isn't any different from an ordinary long.)" 
     5203        fi       
     5204        ;; 
     5205esac 
     5206$rm -f try.* try 
    50865207 
    50875208: see if inttypes.h is available 
     
    53275448esac 
    53285449 
    5329 case "$use64bitint" in 
    5330 "$define"|true|[yY]*) 
    53315450: Look for a hint-file generated 'call-back-unit'.  If the 
    53325451: user has specified that a 64-bit perl is to be built, 
    53335452: we may need to set or change some other defaults. 
    53345453        if $test -f use64bitint.cbu; then 
    5335                 echo "Your platform has some specific hints for 64-bit integers, using them..." 
     5454        echo "Your platform has some specific hints regarding 64-bit integers, using them..." 
    53365455                . ./use64bitint.cbu 
    53375456        fi 
     5457case "$use64bitint" in 
     5458"$define"|true|[yY]*) 
    53385459        case "$longsize" in 
    53395460        4) case "$archname64" in 
     
    53455466esac 
    53465467 
    5347 case "$use64bitall" in 
    5348 "$define"|true|[yY]*) 
    53495468: Look for a hint-file generated 'call-back-unit'.  If the 
    53505469: user has specified that a maximally 64-bit perl is to be built, 
    53515470: we may need to set or change some other defaults. 
    53525471        if $test -f use64bitall.cbu; then 
    5353                 echo "Your platform has some specific hints for 64-bit builds, using them..." 
     5472        echo "Your platform has some specific hints regarding 64-bit builds, using them..." 
    53545473                . ./use64bitall.cbu 
    53555474        fi 
     5475case "$use64bitall" in 
     5476"$define"|true|[yY]*) 
    53565477        case "$longsize" in 
    53575478        4) case "$archname64" in 
     
    53625483        ;; 
    53635484esac 
     5485 
     5486case "$d_quad:$use64bitint" in 
     5487$undef:$define) 
     5488        cat >&4 <<EOF 
     5489 
     5490*** You have chosen to use 64-bit integers, 
     5491*** but none cannot be found. 
     5492*** Please rerun Configure without -Duse64bitint and/or -Dusemorebits. 
     5493*** Cannot continue, aborting. 
     5494 
     5495EOF 
     5496        exit 1 
     5497        ;; 
     5498esac 
     5499 
     5500: check for length of double 
     5501echo " " 
     5502case "$doublesize" in 
     5503'') 
     5504        echo "Checking to see how big your double precision numbers are..." >&4 
     5505        $cat >try.c <<EOCP 
     5506#include <stdio.h> 
     5507#$i_stdlib I_STDLIB 
     5508#ifdef I_STDLIB 
     5509#include <stdlib.h> 
     5510#endif 
     5511int main() 
     5512{ 
     5513    printf("%d\n", (int)sizeof(double)); 
     5514    exit(0); 
     5515} 
     5516EOCP 
     5517        set try 
     5518        if eval $compile_ok; then 
     5519                doublesize=`$run ./try` 
     5520                echo "Your double is $doublesize bytes long." 
     5521        else 
     5522                dflt='8' 
     5523                echo "(I can't seem to compile the test program.  Guessing...)" 
     5524                rp="What is the size of a double precision number (in bytes)?" 
     5525                . ./myread 
     5526                doublesize="$ans" 
     5527        fi 
     5528        ;; 
     5529esac 
     5530$rm -f try.c try 
     5531 
     5532: check for long doubles 
     5533echo " " 
     5534echo "Checking to see if you have long double..." >&4 
     5535echo 'int main() { long double x = 7.0; }' > try.c 
     5536set try 
     5537if eval $compile; then 
     5538        val="$define" 
     5539        echo "You have long double." 
     5540else 
     5541        val="$undef" 
     5542        echo "You do not have long double." 
     5543fi 
     5544$rm try.* 
     5545set d_longdbl 
     5546eval $setvar 
     5547 
     5548: check for length of long double 
     5549case "${d_longdbl}${longdblsize}" in 
     5550$define) 
     5551        echo " " 
     5552        echo "Checking to see how big your long doubles are..." >&4 
     5553        $cat >try.c <<'EOCP' 
     5554#include <stdio.h> 
     5555int main() 
     5556{ 
     5557        printf("%d\n", sizeof(long double)); 
     5558} 
     5559EOCP 
     5560        set try 
     5561        set try 
     5562        if eval $compile; then 
     5563                longdblsize=`$run ./try` 
     5564                echo "Your long doubles are $longdblsize bytes long." 
     5565        else 
     5566                dflt='8' 
     5567                echo " " 
     5568                echo "(I can't seem to compile the test program.  Guessing...)" >&4 
     5569                rp="What is the size of a long double (in bytes)?" 
     5570                . ./myread 
     5571                longdblsize="$ans" 
     5572        fi 
     5573        if $test "X$doublesize" = "X$longdblsize"; then 
     5574                echo "That isn't any different from an ordinary double." 
     5575                echo "I'll keep your setting anyway, but you may see some" 
     5576                echo "harmless compilation warnings." 
     5577        fi       
     5578        ;; 
     5579esac 
     5580$rm -f try.* try 
     5581 
     5582: determine the architecture name 
     5583echo " " 
     5584if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then 
     5585        tarch=`arch`"-$osname" 
     5586elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then 
     5587        if uname -m > tmparch 2>&1 ; then 
     5588                tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \ 
     5589                        -e 's/$/'"-$osname/" tmparch` 
     5590        else 
     5591                tarch="$osname" 
     5592        fi 
     5593        $rm -f tmparch 
     5594else 
     5595        tarch="$osname" 
     5596fi 
     5597case "$myarchname" in 
     5598''|"$tarch") ;; 
     5599*) 
     5600        echo "(Your architecture name used to be $myarchname.)" 
     5601        archname='' 
     5602        ;; 
     5603esac 
     5604case "$targetarch" in 
     5605'') ;; 
     5606*)  archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;; 
     5607esac 
     5608myarchname="$tarch" 
     5609case "$archname" in 
     5610'') dflt="$tarch";; 
     5611*) dflt="$archname";; 
     5612esac 
     5613rp='What is your architecture name' 
     5614. ./myread 
     5615archname="$ans" 
     5616case "$usethreads" in 
     5617$define) 
     5618        echo "Threads selected." >&4 
     5619        case "$archname" in 
     5620        *-thread*) echo "...and architecture name already has -thread." >&4 
     5621                ;; 
     5622        *)      archname="$archname-thread" 
     5623                echo "...setting architecture name to $archname." >&4 
     5624                ;; 
     5625        esac 
     5626        ;; 
     5627esac 
     5628case "$usemultiplicity" in 
     5629$define) 
     5630        echo "Multiplicity selected." >&4 
     5631        case "$archname" in 
     5632        *-multi*) echo "...and architecture name already has -multi." >&4 
     5633                ;; 
     5634        *)      archname="$archname-multi" 
     5635                echo "...setting architecture name to $archname." >&4 
     5636                ;; 
     5637        esac 
     5638        ;; 
     5639esac 
     5640case "$use64bitint$use64bitall" in 
     5641*"$define"*) 
     5642        case "$archname64" in 
     5643        '') 
     5644                echo "This architecture is naturally 64-bit, not changing architecture name." >&4 
     5645                ;; 
     5646        *) 
     5647                case "$use64bitint" in 
     5648                "$define") echo "64 bit integers selected." >&4 ;; 
     5649                esac 
     5650                case "$use64bitall" in 
     5651                "$define") echo "Maximal 64 bitness selected." >&4 ;; 
     5652                esac 
     5653                case "$archname" in 
     5654                *-$archname64*) echo "...and architecture name already has $archname64." >&4 
     5655                        ;; 
     5656                *)      archname="$archname-$archname64" 
     5657                        echo "...setting architecture name to $archname." >&4 
     5658                        ;; 
     5659                esac 
     5660                ;; 
     5661        esac 
     5662esac 
     5663case "$uselongdouble" in 
     5664$define) 
     5665        echo "Long doubles selected." >&4 
     5666        case "$longdblsize" in 
     5667        $doublesize) 
     5668                echo "...but long doubles are equal to doubles, not changing architecture name." >&4 
     5669                ;; 
     5670        *) 
     5671                case "$archname" in 
     5672                *-ld*) echo "...and architecture name already has -ld." >&4 
     5673                        ;; 
     5674                *)      archname="$archname-ld" 
     5675                        echo "...setting architecture name to $archname." >&4 
     5676                        ;; 
     5677                esac 
     5678                ;; 
     5679        esac 
     5680        ;; 
     5681esac 
     5682case "$useperlio" in 
     5683$define) 
     5684        echo "Perlio selected." >&4 
     5685        ;; 
     5686*) 
     5687        echo "Perlio not selected, using stdio." >&4 
     5688        case "$archname" in 
     5689        *-stdio*) echo "...and architecture name already has -stdio." >&4 
     5690                ;; 
     5691        *)      archname="$archname-stdio" 
     5692                echo "...setting architecture name to $archname." >&4 
     5693                ;; 
     5694        esac 
     5695        ;; 
     5696esac 
     5697if $test -f archname.cbu; then 
     5698        echo "Your platform has some specific hints for architecture name, using them..." 
     5699        . ./archname.cbu 
     5700fi 
     5701 
     5702: determine root of directory hierarchy where package will be installed. 
     5703case "$prefix" in 
     5704'') 
     5705        dflt=`./loc . /usr/local /usr/local /local /opt /usr` 
     5706        ;; 
     5707*?/) 
     5708        dflt=`echo "$prefix" | sed 's/.$//'` 
     5709        ;; 
     5710*) 
     5711        dflt="$prefix" 
     5712        ;; 
     5713esac 
     5714$cat <<EOM 
     5715 
     5716By default, $package will be installed in $dflt/bin, manual pages 
     5717under $dflt/man, etc..., i.e. with $dflt as prefix for all 
     5718installation directories. Typically this is something like /usr/local. 
     5719If you wish to have binaries under /usr/bin but other parts of the 
     5720installation under /usr/local, that's ok: you will be prompted 
     5721separately for each of the installation directories, the prefix being 
     5722only used to set the defaults. 
     5723 
     5724EOM 
     5725fn=d~ 
     5726rp='Installation prefix to use?' 
     5727. ./getfile 
     5728oldprefix='' 
     5729case "$prefix" in 
     5730'') ;; 
     5731*) 
     5732        case "$ans" in 
     5733        "$prefix") ;; 
     5734        *) oldprefix="$prefix";; 
     5735        esac 
     5736        ;; 
     5737esac 
     5738prefix="$ans" 
     5739prefixexp="$ansexp" 
     5740 
     5741case "$afsroot" in 
     5742'')     afsroot=/afs ;; 
     5743*)      afsroot=$afsroot ;; 
     5744esac 
     5745 
     5746: is AFS running? 
     5747echo " " 
     5748case "$afs" in 
     5749$define|true)   afs=true ;; 
     5750$undef|false)   afs=false ;; 
     5751*)      if test -d $afsroot; then 
     5752                afs=true 
     5753        else 
     5754                afs=false 
     5755        fi 
     5756        ;; 
     5757esac 
     5758if $afs; then 
     5759        echo "AFS may be running... I'll be extra cautious then..." >&4 
     5760else 
     5761        echo "AFS does not seem to be running..." >&4 
     5762fi 
     5763 
     5764: determine installation prefix for where package is to be installed. 
     5765if $afs; then  
     5766$cat <<EOM 
     5767 
     5768Since you are running AFS, I need to distinguish the directory in which 
     5769files will reside from the directory in which they are installed (and from 
     5770which they are presumably copied to the former directory by occult means). 
     5771 
     5772EOM 
     5773        case "$installprefix" in 
     5774        '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;; 
     5775        *) dflt="$installprefix";; 
     5776        esac 
     5777else 
     5778$cat <<EOM 
     5779 
     5780In some special cases, particularly when building $package for distribution, 
     5781it is convenient to distinguish the directory in which files should be 
     5782installed from the directory ($prefix) in which they will 
     5783eventually reside.  For most users, these two directories are the same. 
     5784 
     5785EOM 
     5786        case "$installprefix" in 
     5787        '') dflt=$prefix ;; 
     5788        *) dflt=$installprefix;; 
     5789        esac 
     5790fi 
     5791fn=d~ 
     5792rp='What installation prefix should I use for installing files?' 
     5793. ./getfile 
     5794installprefix="$ans" 
     5795installprefixexp="$ansexp" 
     5796 
     5797: set the prefixit variable, to compute a suitable default value 
     5798prefixit='case "$3" in 
     5799""|none) 
     5800        case "$oldprefix" in 
     5801        "") eval "$1=\"\$$2\"";; 
     5802        *) 
     5803                case "$3" in 
     5804                "") eval "$1=";; 
     5805                none) 
     5806                        eval "tp=\"\$$2\""; 
     5807                        case "$tp" in 
     5808                        ""|" ") eval "$1=\"\$$2\"";; 
     5809                        *) eval "$1=";; 
     5810                        esac;; 
     5811                esac;; 
     5812        esac;; 
     5813*) 
     5814        eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\""; 
     5815        case "$tp" in 
     5816        --|/*--|\~*--) eval "$1=\"$prefix/$3\"";; 
     5817        /*-$oldprefix/*|\~*-$oldprefix/*) 
     5818                eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";; 
     5819        *) eval "$1=\"\$$2\"";; 
     5820        esac;; 
     5821esac' 
     5822 
     5823: get the patchlevel 
     5824echo " " 
     5825echo "Getting the current patchlevel..." >&4 
     5826if $test -r $rsrc/patchlevel.h;then 
     5827        revision=`awk '/define[         ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h` 
     5828        patchlevel=`awk '/define[       ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` 
     5829        subversion=`awk '/define[       ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` 
     5830        api_revision=`awk '/define[     ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h` 
     5831        api_version=`awk '/define[      ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h` 
     5832        api_subversion=`awk '/define[   ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` 
     5833       perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'` 
     5834else 
     5835        revision=0 
     5836        patchlevel=0 
     5837        subversion=0 
     5838        api_revision=0 
     5839        api_version=0 
     5840        api_subversion=0 
     5841        perl_patchlevel=0 
     5842        $echo "(You do not have patchlevel.h.  Eek.)" 
     5843fi 
     5844if $test -r $rsrc/.patch ; then   
     5845        if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then 
     5846                perl_patchlevel=`cat $rsrc/.patch` 
     5847        fi 
     5848fi 
     5849: Define a handy string here to avoid duplication in myconfig.SH and configpm. 
     5850version_patchlevel_string="version $patchlevel subversion $subversion" 
     5851case "$perl_patchlevel" in 
     58520|'') ;; 
     5853*) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;; 
     5854esac 
     5855 
     5856$echo "(You have $package $version_patchlevel_string.)" 
     5857 
     5858case "$osname" in 
     5859dos|vms) 
     5860        : XXX Should be a Configure test for double-dots in filenames. 
     5861        version=`echo $revision $patchlevel $subversion | \ 
     5862                 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` 
     5863        api_versionstring=`echo $api_revision $api_version $api_subversion | \ 
     5864                 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` 
     5865        ;; 
     5866*) 
     5867        version=`echo $revision $patchlevel $subversion | \ 
     5868                 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` 
     5869        api_versionstring=`echo $api_revision $api_version $api_subversion | \ 
     5870                 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` 
     5871        ;; 
     5872esac 
     5873: Special case the 5.005_xx maintenance series, which used 5.005 
     5874: without any subversion label as a subdirectory in $sitelib 
     5875if test "${api_revision}${api_version}${api_subversion}" = "550"; then 
     5876        api_versionstring='5.005' 
     5877fi 
     5878 
     5879: determine installation style 
     5880: For now, try to deduce it from prefix unless it is already set. 
     5881: Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7. 
     5882case "$installstyle" in 
     5883'')     case "$prefix" in 
     5884                *perl*) dflt='lib';; 
     5885                *) dflt='lib/perl5' ;; 
     5886        esac 
     5887        ;; 
     5888*)      dflt="$installstyle" ;; 
     5889esac 
     5890: Probably not worth prompting for this since we prompt for all 
     5891: the directories individually, and the prompt would be too long and 
     5892: confusing anyway. 
     5893installstyle=$dflt 
     5894 
     5895: determine where private library files go 
     5896: Usual default is /usr/local/lib/perl5/$version. 
     5897: Also allow things like /opt/perl/lib/$version, since  
     5898: /opt/perl/lib/perl5... would be redundant. 
     5899: The default "style" setting is made in installstyle.U 
     5900case "$installstyle" in 
     5901*lib/perl5*) set dflt privlib lib/$package/$version ;; 
     5902*)       set dflt privlib lib/$version ;; 
     5903esac 
     5904eval $prefixit 
     5905$cat <<EOM 
     5906 
     5907There are some auxiliary files for $package that need to be put into a 
     5908private library directory that is accessible by everyone. 
     5909 
     5910EOM 
     5911fn=d~+ 
     5912rp='Pathname where the private library files will reside?' 
     5913. ./getfile 
     5914privlib="$ans" 
     5915privlibexp="$ansexp" 
     5916: Change installation prefix, if necessary. 
     5917if $test X"$prefix" != X"$installprefix"; then 
     5918        installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"` 
     5919else 
     5920        installprivlib="$privlibexp" 
     5921fi 
     5922 
     5923: set the prefixup variable, to restore leading tilda escape 
     5924prefixup='case "$prefixexp" in 
     5925"$prefix") ;; 
     5926*) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";; 
     5927esac' 
     5928 
     5929: determine where public architecture dependent libraries go 
     5930set archlib archlib 
     5931eval $prefixit 
     5932: privlib default is /usr/local/lib/$package/$version 
     5933: archlib default is /usr/local/lib/$package/$version/$archname 
     5934: privlib may have an optional trailing /share. 
     5935tdflt=`echo $privlib | $sed 's,/share$,,'` 
     5936tdflt=$tdflt/$archname 
     5937case "$archlib" in 
     5938'')     dflt=$tdflt 
     5939        ;; 
     5940*)      dflt="$archlib" 
     5941    ;; 
     5942esac 
     5943$cat <<EOM 
     5944 
     5945$spackage contains architecture-dependent library files.  If you are 
     5946sharing libraries in a heterogeneous environment, you might store 
     5947these files in a separate location.  Otherwise, you can just include 
     5948them with the rest of the public library files. 
     5949 
     5950EOM 
     5951fn=d+~ 
     5952rp='Where do you want to put the public architecture-dependent libraries?' 
     5953. ./getfile 
     5954archlib="$ans" 
     5955archlibexp="$ansexp" 
     5956if $test X"$archlib" = X"$privlib"; then 
     5957        d_archlib="$undef" 
     5958else 
     5959        d_archlib="$define" 
     5960fi 
     5961: Change installation prefix, if necessary. 
     5962if $test X"$prefix" != X"$installprefix"; then 
     5963        installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"` 
     5964else 
     5965        installarchlib="$archlibexp" 
     5966fi 
     5967 
     5968: see if setuid scripts can be secure 
     5969$cat <<EOM 
     5970 
     5971Some kernels have a bug that prevents setuid #! scripts from being 
     5972secure.  Some sites have disabled setuid #! scripts because of this. 
     5973 
     5974First let's decide if your kernel supports secure setuid #! scripts. 
     5975(If setuid #! scripts would be secure but have been disabled anyway, 
     5976don't say that they are secure if asked.) 
     5977 
     5978EOM 
     5979 
     5980val="$undef" 
     5981if $test -d /dev/fd; then 
     5982        echo "#!$ls" >reflect 
     5983        chmod +x,u+s reflect 
     5984        ./reflect >flect 2>&1 
     5985        if $contains "/dev/fd" flect >/dev/null; then 
     5986                echo "Congratulations, your kernel has secure setuid scripts!" >&4 
     5987                val="$define" 
     5988        else 
     5989                $cat <<EOM 
     5990If you are not sure if they are secure, I can check but I'll need a 
     5991username and password different from the one you are using right now. 
     5992If you don't have such a username or don't want me to test, simply 
     5993enter 'none'. 
     5994 
     5995EOM 
     5996                rp='Other username to test security of setuid scripts with?' 
     5997                dflt='none' 
     5998                . ./myread 
     5999                case "$ans" in 
     6000                n|none) 
     6001                        case "$d_suidsafe" in 
     6002                        '')     echo "I'll assume setuid scripts are *not* secure." >&4 
     6003                                dflt=n;; 
     6004                        "$undef") 
     6005                                echo "Well, the $hint value is *not* secure." >&4 
     6006                                dflt=n;; 
     6007                        *)      echo "Well, the $hint value *is* secure." >&4 
     6008                                dflt=y;; 
     6009                        esac 
     6010                        ;; 
     6011                *) 
     6012                        $rm -f reflect flect 
     6013                        echo "#!$ls" >reflect 
     6014                        chmod +x,u+s reflect 
     6015                        echo >flect 
     6016                        chmod a+w flect 
     6017                        echo '"su" will (probably) prompt you for '"$ans's password." 
     6018                        su $ans -c './reflect >flect' 
     6019                        if $contains "/dev/fd" flect >/dev/null; then 
     6020                                echo "Okay, it looks like setuid scripts are secure." >&4 
     6021                                dflt=y 
     6022                        else 
     6023                                echo "I don't think setuid scripts are secure." >&4 
     6024                                dflt=n 
     6025                        fi 
     6026                        ;; 
     6027                esac 
     6028                rp='Does your kernel have *secure* setuid scripts?' 
     6029                . ./myread 
     6030                case "$ans" in 
     6031                [yY]*)  val="$define";; 
     6032                *)      val="$undef";; 
     6033                esac 
     6034        fi 
     6035else 
     6036        echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4 
     6037        echo "(That's for file descriptors, not floppy disks.)" 
     6038        val="$undef" 
     6039fi 
     6040set d_suidsafe 
     6041eval $setvar 
     6042 
     6043$rm -f reflect flect 
     6044 
     6045: now see if they want to do setuid emulation 
     6046echo " " 
     6047val="$undef" 
     6048case "$d_suidsafe" in 
     6049"$define") 
     6050        val="$undef" 
     6051        echo "No need to emulate SUID scripts since they are secure here." >&4 
     6052        ;; 
     6053*) 
     6054        $cat <<EOM 
     6055Some systems have disabled setuid scripts, especially systems where 
     6056setuid scripts cannot be secure.  On systems where setuid scripts have 
     6057been disabled, the setuid/setgid bits on scripts are currently 
     6058useless.  It is possible for $package to detect those bits and emulate 
     6059setuid/setgid in a secure fashion.  This emulation will only work if 
     6060setuid scripts have been disabled in your kernel. 
     6061 
     6062EOM 
     6063        case "$d_dosuid" in 
     6064        "$define") dflt=y ;; 
     6065        *) dflt=n ;; 
     6066        esac 
     6067        rp="Do you want to do setuid/setgid emulation?" 
     6068        . ./myread 
     6069        case "$ans" in 
     6070        [yY]*)  val="$define";; 
     6071        *)      val="$undef";; 
     6072        esac 
     6073        ;; 
     6074esac 
     6075set d_dosuid 
     6076eval $setvar 
     6077 
     6078: see if this is a malloc.h system 
     6079: we want a real compile instead of Inhdr because some systems have a 
     6080: malloc.h that just gives a compile error saying to use stdlib.h instead 
     6081echo " " 
     6082$cat >try.c <<EOCP 
     6083#include <stdlib.h> 
     6084#include <malloc.h> 
     6085int main () { return 0; } 
     6086EOCP 
     6087set try 
     6088if eval $compile; then 
     6089    echo "<malloc.h> found." >&4 
     6090    val="$define" 
     6091else 
     6092    echo "<malloc.h> NOT found." >&4 
     6093    val="$undef" 
     6094fi 
     6095$rm -f try.c try 
     6096set i_malloc 
     6097eval $setvar 
     6098 
     6099: check for void type 
     6100echo " " 
     6101echo "Checking to see how well your C compiler groks the void type..." >&4 
     6102case "$voidflags" in 
     6103'') 
     6104        $cat >try.c <<EOCP 
     6105#$i_stdlib I_STDLIB 
     6106#ifdef I_STDLIB 
     6107#include <stdlib.h> 
     6108#endif 
     6109#if TRY & 1 
     6110void sub() { 
     6111#else 
     6112sub() { 
     6113#endif 
     6114        extern void moo();      /* function returning void */ 
     6115        void (*goo)();          /* ptr to func returning void */ 
     6116#if TRY & 8 
     6117        void *hue;              /* generic ptr */ 
     6118#endif 
     6119#if TRY & 2 
     6120        void (*foo[10])(); 
     6121#endif 
     6122 
     6123#if TRY & 4 
     6124        if(goo == moo) { 
     6125                exit(0); 
     6126        } 
     6127#endif 
     6128        exit(0); 
     6129} 
     6130int main() { sub(); } 
     6131EOCP 
     6132        if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then 
     6133                voidflags=$defvoidused 
     6134        echo "Good.  It appears to support void to the level $package wants.">&4 
     6135                if $contains warning .out >/dev/null 2>&1; then 
     6136                        echo "However, you might get some warnings that look like this:" 
     6137                        $cat .out 
     6138                fi 
     6139        else 
     6140echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4 
     6141                if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then 
     6142                        echo "It supports 1..." 
     6143                        if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then 
     6144                                echo "It also supports 2..." 
     6145                                if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then 
     6146                                        voidflags=7 
     6147                                        echo "And it supports 4 but not 8 definitely." 
     6148                                else 
     6149                                        echo "It doesn't support 4..." 
     6150                                        if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then 
     6151                                                voidflags=11 
     6152                                                echo "But it supports 8." 
     6153                                        else 
     6154                                                voidflags=3 
     6155                                                echo "Neither does it support 8." 
     6156                                        fi 
     6157                                fi 
     6158                        else 
     6159                                echo "It does not support 2..." 
     6160                                if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then 
     6161                                        voidflags=13 
     6162                                        echo "But it supports 4 and 8." 
     6163                                else 
     6164                                        if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then 
     6165                                                voidflags=5 
     6166                                                echo "And it supports 4 but has not heard about 8." 
     6167                                        else 
     6168                                                echo "However it supports 8 but not 4." 
     6169                                        fi 
     6170                                fi 
     6171                        fi 
     6172                else 
     6173                        echo "There is no support at all for void." 
     6174                        voidflags=0 
     6175                fi 
     6176        fi 
     6177esac 
     6178case "$voidflags" in 
     6179"$defvoidused") ;; 
     6180*)      $cat >&4 <<'EOM' 
     6181  Support flag bits are: 
     6182    1: basic void declarations. 
     6183    2: arrays of pointers to functions returning void. 
     6184    4: operations between pointers to and addresses of void functions. 
     6185    8: generic void pointers. 
     6186EOM 
     6187        dflt="$voidflags"; 
     6188        rp="Your void support flags add up to what?" 
     6189        . ./myread 
     6190        voidflags="$ans" 
     6191        ;; 
     6192esac 
     6193$rm -f try.* .out 
     6194 
     6195: check for length of pointer 
     6196echo " " 
     6197case "$ptrsize" in 
     6198'') 
     6199        echo "Checking to see how big your pointers are..." >&4 
     6200        if test "$voidflags" -gt 7; then 
     6201                echo '#define VOID_PTR char *' > try.c 
     6202        else 
     6203                echo '#define VOID_PTR void *' > try.c 
     6204        fi 
     6205        $cat >>try.c <<EOCP 
     6206#include <stdio.h> 
     6207#$i_stdlib I_STDLIB 
     6208#ifdef I_STDLIB 
     6209#include <stdlib.h> 
     6210#endif 
     6211int main() 
     6212{ 
     6213    printf("%d\n", (int)sizeof(VOID_PTR)); 
     6214    exit(0); 
     6215} 
     6216EOCP 
     6217        set try 
     6218        if eval $compile_ok; then 
     6219                ptrsize=`$run ./try` 
     6220                echo "Your pointers are $ptrsize bytes long." 
     6221        else 
     6222                dflt='4' 
     6223                echo "(I can't seem to compile the test program.  Guessing...)" >&4 
     6224                rp="What is the size of a pointer (in bytes)?" 
     6225                . ./myread 
     6226                ptrsize="$ans" 
     6227        fi 
     6228        ;; 
     6229esac 
     6230$rm -f try.c try 
     6231case "$use64bitall" in 
     6232"$define"|true|[yY]*) 
     6233        case "$ptrsize" in 
     6234        4)      cat <<EOM >&4 
     6235 
     6236*** You have chosen a maximally 64-bit build, 
     6237*** but your pointers are only 4 bytes wide. 
     6238*** Please rerun Configure without -Duse64bitall. 
     6239EOM 
     6240                case "$d_quad" in 
     6241                define) 
     6242                        cat <<EOM >&4 
     6243*** Since you have quads, you could possibly try with -Duse64bitint. 
     6244EOM 
     6245                        ;; 
     6246                esac 
     6247                cat <<EOM >&4 
     6248*** Cannot continue, aborting. 
     6249 
     6250EOM 
     6251 
     6252                exit 1 
     6253                ;; 
     6254        esac 
     6255        ;; 
     6256esac 
     6257 
     6258 
     6259: determine which malloc to compile in 
     6260echo " " 
     6261case "$usemymalloc" in 
     6262[yY]*|true|$define)     dflt='y' ;; 
     6263[nN]*|false|$undef)     dflt='n' ;; 
     6264*)      case "$ptrsize" in 
     6265        4) dflt='y' ;; 
     6266        *) dflt='n' ;; 
     6267        esac 
     6268        ;; 
     6269esac 
     6270rp="Do you wish to attempt to use the malloc that comes with $package?" 
     6271. ./myread 
     6272usemymalloc="$ans" 
     6273case "$ans" in 
     6274y*|true) 
     6275        usemymalloc='y' 
     6276        mallocsrc='malloc.c' 
     6277        mallocobj="malloc$_o" 
     6278        d_mymalloc="$define" 
     6279        case "$libs" in 
     6280        *-lmalloc*) 
     6281                : Remove malloc from list of libraries to use 
     6282                echo "Removing unneeded -lmalloc from library list" >&4 
     6283                set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'` 
     6284                shift 
     6285                libs="$*" 
     6286                echo "libs = $libs" >&4 
     6287                ;; 
     6288        esac 
     6289        ;; 
     6290*) 
     6291        usemymalloc='n' 
     6292        mallocsrc='' 
     6293        mallocobj='' 
     6294        d_mymalloc="$undef" 
     6295        ;; 
     6296esac 
     6297 
     6298: compute the return types of malloc and free 
     6299echo " " 
     6300$cat >malloc.c <<END 
     6301#$i_malloc I_MALLOC 
     6302#$i_stdlib I_STDLIB 
     6303#include <stdio.h> 
     6304#include <sys/types.h> 
     6305#ifdef I_MALLOC 
     6306#include <malloc.h> 
     6307#endif 
     6308#ifdef I_STDLIB 
     6309#include <stdlib.h> 
     6310#endif 
     6311#ifdef TRY_MALLOC 
     6312void *malloc(); 
     6313#endif 
     6314#ifdef TRY_FREE 
     6315void free(); 
     6316#endif 
     6317END 
     6318case "$malloctype" in 
     6319'') 
     6320        if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then 
     6321                malloctype='void *' 
     6322        else 
     6323                malloctype='char *' 
     6324        fi 
     6325        ;; 
     6326esac 
     6327echo "Your system wants malloc to return '$malloctype', it would seem." >&4 
     6328 
     6329case "$freetype" in 
     6330'') 
     6331        if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then 
     6332                freetype='void' 
     6333        else 
     6334                freetype='int' 
     6335        fi 
     6336        ;; 
     6337esac 
     6338echo "Your system uses $freetype free(), it would seem." >&4 
     6339$rm -f malloc.[co] 
     6340$cat <<EOM 
     6341 
     6342After $package is installed, you may wish to install various 
     6343add-on modules and utilities.  Typically, these add-ons will 
     6344be installed under $prefix with the rest 
     6345of this package.  However, you may wish to install such add-ons 
     6346elsewhere under a different prefix. 
     6347 
     6348If you do not wish to put everything under a single prefix, that's 
     6349ok.  You will be prompted for the individual locations; this siteprefix 
     6350is only used to suggest the defaults. 
     6351 
     6352The default should be fine for most people. 
     6353 
     6354EOM 
     6355fn=d~+ 
     6356rp='Installation prefix to use for add-on modules and utilities?' 
     6357: XXX Here might be another good place for an installstyle setting. 
     6358case "$siteprefix" in 
     6359'') dflt=$prefix ;; 
     6360*)  dflt=$siteprefix ;; 
     6361esac 
     6362. ./getfile 
     6363: XXX Prefixit unit does not yet support siteprefix and vendorprefix 
     6364oldsiteprefix='' 
     6365case "$siteprefix" in 
     6366'') ;; 
     6367*)      case "$ans" in 
     6368        "$prefix") ;; 
     6369        *) oldsiteprefix="$prefix";; 
     6370        esac 
     6371        ;; 
     6372esac 
     6373siteprefix="$ans" 
     6374siteprefixexp="$ansexp" 
     6375 
     6376: determine where site specific libraries go. 
     6377: Usual default is /usr/local/lib/perl5/site_perl/$version 
     6378: The default "style" setting is made in installstyle.U 
     6379: XXX No longer works with Prefixit stuff. 
     6380prog=`echo $package | $sed 's/-*[0-9.]*$//'` 
     6381case "$sitelib" in 
     6382'') case "$installstyle" in 
     6383        *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;; 
     6384        *)       dflt=$siteprefix/lib/site_$prog/$version ;; 
     6385        esac 
     6386        ;; 
     6387*)      dflt="$sitelib" 
     6388        ;; 
     6389esac 
     6390$cat <<EOM 
     6391 
     6392The installation process will create a directory for 
     6393site-specific extensions and modules.  Most users find it convenient 
     6394to place all site-specific files in this directory rather than in the 
     6395main distribution directory. 
     6396 
     6397EOM 
     6398fn=d~+ 
     6399rp='Pathname for the site-specific library files?' 
     6400. ./getfile 
     6401sitelib="$ans" 
     6402sitelibexp="$ansexp" 
     6403sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"` 
     6404: Change installation prefix, if necessary. 
     6405if $test X"$prefix" != X"$installprefix"; then 
     6406        installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"` 
     6407else 
     6408        installsitelib="$sitelibexp" 
     6409fi 
     6410 
     6411: determine where site specific architecture-dependent libraries go. 
     6412: sitelib  default is /usr/local/lib/perl5/site_perl/$version 
     6413: sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname 
     6414: sitelib may have an optional trailing /share. 
     6415case "$sitearch" in 
     6416'')     dflt=`echo $sitelib | $sed 's,/share$,,'` 
     6417        dflt="$dflt/$archname" 
     6418        ;; 
     6419*)      dflt="$sitearch" 
     6420        ;; 
     6421esac 
     6422set sitearch sitearch none 
     6423eval $prefixit 
     6424$cat <<EOM 
     6425 
     6426The installation process will also create a directory for 
     6427architecture-dependent site-specific extensions and modules. 
     6428 
     6429EOM 
     6430fn=d~+ 
     6431rp='Pathname for the site-specific architecture-dependent library files?' 
     6432. ./getfile 
     6433sitearch="$ans" 
     6434sitearchexp="$ansexp" 
     6435: Change installation prefix, if necessary. 
     6436if $test X"$prefix" != X"$installprefix"; then 
     6437        installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"` 
     6438else 
     6439        installsitearch="$sitearchexp" 
     6440fi 
     6441 
     6442$cat <<EOM 
     6443 
     6444The installation process will also create a directory for 
     6445vendor-supplied add-ons.  Vendors who supply perl with their system 
     6446may find it convenient to place all vendor-supplied files in this 
     6447directory rather than in the main distribution directory.  This will 
     6448ease upgrades between binary-compatible maintenance versions of perl. 
     6449 
     6450Of course you may also use these directories in whatever way you see 
     6451fit.  For example, you might use them to access modules shared over a 
     6452company-wide network. 
     6453 
     6454The default answer should be fine for most people. 
     6455This causes further questions about vendor add-ons to be skipped 
     6456and no vendor-specific directories will be configured for perl. 
     6457 
     6458EOM 
     6459rp='Do you want to configure vendor-specific add-on directories?' 
     6460case "$usevendorprefix" in 
     6461define|true|[yY]*) dflt=y ;; 
     6462*)      : User may have set vendorprefix directly on Configure command line. 
     6463        case "$vendorprefix" in 
     6464        ''|' ') dflt=n ;; 
     6465        *)      dflt=y ;; 
     6466        esac 
     6467        ;; 
     6468esac 
     6469. ./myread 
     6470case "$ans" in 
     6471[yY]*)  fn=d~+ 
     6472        rp='Installation prefix to use for vendor-supplied add-ons?' 
     6473        case "$vendorprefix" in 
     6474        '') dflt='' ;; 
     6475        *)  dflt=$vendorprefix ;; 
     6476        esac 
     6477        . ./getfile 
     6478        : XXX Prefixit unit does not yet support siteprefix and vendorprefix 
     6479        oldvendorprefix='' 
     6480        case "$vendorprefix" in 
     6481        '') ;; 
     6482        *)      case "$ans" in 
     6483                "$prefix") ;; 
     6484                *) oldvendorprefix="$prefix";; 
     6485                esac 
     6486                ;; 
     6487        esac 
     6488        usevendorprefix="$define" 
     6489        vendorprefix="$ans" 
     6490        vendorprefixexp="$ansexp" 
     6491        ;; 
     6492*)      usevendorprefix="$undef" 
     6493        vendorprefix='' 
     6494        vendorprefixexp='' 
     6495        ;; 
     6496esac 
     6497 
     6498case "$vendorprefix" in 
     6499'')     d_vendorlib="$undef" 
     6500        vendorlib='' 
     6501        vendorlibexp='' 
     6502        ;; 
     6503*)      d_vendorlib="$define" 
     6504        : determine where vendor-supplied modules go. 
     6505        : Usual default is /usr/local/lib/perl5/vendor_perl/$version 
     6506        case "$vendorlib" in 
     6507        '') 
     6508                prog=`echo $package | $sed 's/-*[0-9.]*$//'` 
     6509                case "$installstyle" in 
     6510                *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;; 
     6511                *)           dflt=$vendorprefix/lib/vendor_$prog/$version ;; 
     6512                esac 
     6513                ;; 
     6514        *)      dflt="$vendorlib" 
     6515                ;; 
     6516        esac 
     6517        fn=d~+ 
     6518        rp='Pathname for the vendor-supplied library files?' 
     6519        . ./getfile 
     6520        vendorlib="$ans" 
     6521        vendorlibexp="$ansexp" 
     6522        ;; 
     6523esac 
     6524vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"` 
     6525: Change installation prefix, if necessary. 
     6526if $test X"$prefix" != X"$installprefix"; then 
     6527        installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"` 
     6528else 
     6529        installvendorlib="$vendorlibexp" 
     6530fi 
     6531 
     6532case "$vendorprefix" in 
     6533'')     d_vendorarch="$undef" 
     6534        vendorarch='' 
     6535        vendorarchexp='' 
     6536        ;; 
     6537*)      d_vendorarch="$define" 
     6538        : determine where vendor-supplied architecture-dependent libraries go. 
     6539        : vendorlib  default is /usr/local/lib/perl5/vendor_perl/$version 
     6540        : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname 
     6541        : vendorlib may have an optional trailing /share. 
     6542        case "$vendorarch" in 
     6543        '')     dflt=`echo $vendorlib | $sed 's,/share$,,'` 
     6544                dflt="$dflt/$archname" 
     6545                ;; 
     6546        *)      dflt="$vendorarch" ;; 
     6547        esac 
     6548        fn=d~+ 
     6549        rp='Pathname for vendor-supplied architecture-dependent files?' 
     6550        . ./getfile 
     6551        vendorarch="$ans" 
     6552        vendorarchexp="$ansexp" 
     6553        ;; 
     6554esac 
     6555: Change installation prefix, if necessary. 
     6556if $test X"$prefix" != X"$installprefix"; then 
     6557        installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"` 
     6558else 
     6559        installvendorarch="$vendorarchexp" 
     6560fi 
     6561 
     6562: Final catch-all directories to search 
     6563$cat <<EOM 
     6564 
     6565Lastly, you can have perl look in other directories for extensions and 
     6566modules in addition to those already specified. 
     6567These directories will be searched after  
     6568        $sitearch  
     6569        $sitelib  
     6570EOM 
     6571test X"$vendorlib" != "X" && echo '     ' $vendorlib 
     6572test X"$vendorarch" != "X" && echo '    ' $vendorarch 
     6573echo ' ' 
     6574case "$otherlibdirs" in 
     6575''|' ') dflt='none' ;; 
     6576*)      dflt="$otherlibdirs" ;; 
     6577esac 
     6578$cat <<EOM 
     6579Enter a colon-separated set of extra paths to include in perl's @INC 
     6580search path, or enter 'none' for no extra paths. 
     6581 
     6582EOM 
     6583 
     6584rp='Colon-separated list of additional directories for perl to search?' 
     6585. ./myread 
     6586case "$ans" in 
     6587' '|''|none)    otherlibdirs=' ' ;;      
     6588*)      otherlibdirs="$ans" ;; 
     6589esac 
     6590case "$otherlibdirs" in 
     6591' ') val=$undef ;; 
     6592*)      val=$define ;; 
     6593esac 
     6594set d_perl_otherlibdirs 
     6595eval $setvar 
     6596 
     6597: Cruising for prototypes 
     6598echo " " 
     6599echo "Checking out function prototypes..." >&4 
     6600$cat >prototype.c <<EOCP 
     6601#$i_stdlib I_STDLIB 
     6602#ifdef I_STDLIB 
     6603#include <stdlib.h> 
     6604#endif 
     6605int main(int argc, char *argv[]) { 
     6606        exit(0);} 
     6607EOCP 
     6608if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then 
     6609        echo "Your C compiler appears to support function prototypes." 
     6610        val="$define" 
     6611else 
     6612        echo "Your C compiler doesn't seem to understand function prototypes." 
     6613        val="$undef" 
     6614fi 
     6615set prototype 
     6616eval $setvar 
     6617$rm -f prototype* 
     6618 
     6619case "$prototype" in 
     6620"$define") ;; 
     6621*)      ansi2knr='ansi2knr' 
     6622        echo " " 
     6623        cat <<EOM >&4 
     6624 
     6625$me:  FATAL ERROR: 
     6626This version of $package can only be compiled by a compiler that  
     6627understands function prototypes.  Unfortunately, your C compiler  
     6628        $cc $ccflags 
     6629doesn't seem to understand them.  Sorry about that. 
     6630 
     6631If GNU cc is available for your system, perhaps you could try that instead.   
     6632 
     6633Eventually, we hope to support building Perl with pre-ANSI compilers. 
     6634If you would like to help in that effort, please contact <perlbug@perl.org>. 
     6635 
     6636Aborting Configure now. 
     6637EOM 
     6638        exit 2 
     6639        ;; 
     6640esac 
     6641 
     6642: determine where public executables go 
     6643echo " " 
     6644set dflt bin bin 
     6645eval $prefixit 
     6646fn=d~ 
     6647rp='Pathname where the public executables will reside?' 
     6648. ./getfile 
     6649if $test "X$ansexp" != "X$binexp"; then 
     6650        installbin='' 
     6651fi 
     6652bin="$ans" 
     6653binexp="$ansexp" 
     6654: Change installation prefix, if necessary. 
     6655: XXX Bug? -- ignores Configure -Dinstallprefix setting. 
     6656if $test X"$prefix" != X"$installprefix"; then 
     6657        installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"` 
     6658else 
     6659        installbin="$binexp" 
     6660fi 
     6661 
     6662echo " " 
     6663case "$extras" in 
     6664'') dflt='n';; 
     6665*) dflt='y';; 
     6666esac 
     6667cat <<EOM 
     6668Perl can be built with extra modules or bundles of modules which 
     6669will be fetched from the CPAN and installed alongside Perl. 
     6670 
     6671Notice that you will need access to the CPAN; either via the Internet, 
     6672or a local copy, for example a CD-ROM or a local CPAN mirror.  (You will 
     6673be asked later to configure the CPAN.pm module which will in turn do 
     6674the installation of the rest of the extra modules or bundles.) 
     6675 
     6676Notice also that if the modules require any external software such as 
     6677libraries and headers (the libz library and the zlib.h header for the 
     6678Compress::Zlib module, for example) you MUST have any such software 
     6679already installed, this configuration process will NOT install such 
     6680things for you. 
     6681 
     6682If this doesn't make any sense to you, just accept the default '$dflt'. 
     6683EOM 
     6684rp='Install any extra modules (y or n)?' 
     6685. ./myread 
     6686case "$ans" in 
     6687y|Y) 
     6688        cat <<EOM 
     6689 
     6690Please list any extra modules or bundles to be installed from CPAN, 
     6691with spaces between the names.  The names can be in any format the 
     6692'install' command of CPAN.pm will understand.  (Answer 'none', 
     6693without the quotes, to install no extra modules or bundles.) 
     6694EOM 
     6695        rp='Extras?' 
     6696        dflt="$extras" 
     6697        . ./myread 
     6698        extras="$ans" 
     6699esac 
     6700case "$extras" in 
     6701''|'none') 
     6702        val='' 
     6703        $rm -f ../extras.lst 
     6704        ;; 
     6705*)      echo "(Saving the list of extras for later...)" 
     6706        echo "$extras" > ../extras.lst 
     6707        val="'$extras'" 
     6708        ;; 
     6709esac 
     6710set extras 
     6711eval $setvar 
     6712echo " " 
     6713 
     6714: determine where html pages for programs go 
     6715set html1dir html1dir none 
     6716eval $prefixit 
     6717$cat <<EOM 
     6718 
     6719If you wish to install html files for programs in $spackage, indicate  
     6720the appropriate directory here.  To skip installing html files, 
     6721answer "none". 
     6722EOM 
     6723case "$html1dir" in 
     6724''|none|$undef|' ') dflt=none ;; 
     6725*) dflt=$html1dir ;; 
     6726esac 
     6727fn=dn+~ 
     6728rp="Directory for the main $spackage html pages?" 
     6729. ./getfile 
     6730html1dir="$ans" 
     6731html1direxp="$ansexp" 
     6732: Use ' ' for none so value is preserved next time through Configure 
     6733$test X"$html1dir" = "X" && html1dir=' ' 
     6734: Change installation prefix, if necessary. 
     6735if $test X"$prefix" != X"$installprefix"; then 
     6736        installhtml1dir=`echo $html1direxp | sed "s#^$prefix#$installprefix#"` 
     6737else 
     6738        installhtml1dir="$html1direxp" 
     6739fi 
     6740 
     6741: determine where html pages for libraries and modules go 
     6742set html3dir html3dir none 
     6743eval $prefixit 
     6744$cat <<EOM 
     6745 
     6746If you wish to install html files for modules associated with $spackage, 
     6747indicate the appropriate directory here.  To skip installing html files, 
     6748answer "none". 
     6749EOM 
     6750: There is no obvious default.  If they have specified html1dir, then 
     6751: try to key off that, possibly changing .../html1 into .../html3. 
     6752case "$html3dir" in 
     6753'') html3dir=`echo "$html1dir" | $sed 's/1$/3$/'` ;; 
     6754*) dflt=$html3dir ;; 
     6755esac 
     6756fn=dn+~ 
     6757rp="Directory for the $spackage module html pages?" 
     6758. ./getfile 
     6759html3dir="$ans" 
     6760html3direxp="$ansexp" 
     6761: Use ' ' for none so value is preserved next time through Configure 
     6762$test X"$html3dir" = "X" && html3dir=' ' 
     6763: Change installation prefix, if necessary. 
     6764if $test X"$prefix" != X"$installprefix"; then 
     6765        installhtml3dir=`echo $html3direxp | sed "s#^$prefix#$installprefix#"` 
     6766else 
     6767        installhtml3dir="$html3direxp" 
     6768fi 
     6769 
     6770: Find perl5.005 or later. 
     6771echo "Looking for a previously installed perl5.005 or later... " 
     6772case "$perl5" in 
     6773'')     for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do 
     6774                : Check if this perl is recent and can load a simple module 
     6775                if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then 
     6776                        perl5=$tdir/perl 
     6777                        break; 
     6778                elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then 
     6779                        perl5=$tdir/perl5 
     6780                        break; 
     6781                fi 
     6782        done 
     6783        ;; 
     6784*)      perl5="$perl5" 
     6785        ;; 
     6786esac 
     6787case "$perl5" in 
     6788'')     echo "None found.  That's ok.";; 
     6789*)      echo "Using $perl5." ;; 
     6790esac 
     6791 
     6792: Determine list of previous versions to include in @INC 
     6793$cat > getverlist <<EOPL 
     6794#!$perl5 -w 
     6795use File::Basename; 
     6796\$api_versionstring = "$api_versionstring"; 
     6797\$version = "$version"; 
     6798\$stem = "$sitelib_stem"; 
     6799\$archname = "$archname"; 
     6800EOPL 
     6801        $cat >> getverlist <<'EOPL' 
     6802# Can't have leading @ because metaconfig interprets it as a command! 
     6803;@inc_version_list=(); 
     6804# XXX Redo to do opendir/readdir?  
     6805if (-d $stem) { 
     6806    chdir($stem); 
     6807    ;@candidates = glob("5.*"); 
     6808} 
     6809else { 
     6810    ;@candidates = (); 
     6811} 
     6812 
     6813# XXX ToDo:  These comparisons must be reworked when two-digit 
     6814# subversions come along, so that 5.7.10 compares as greater than 
     6815# 5.7.3!  By that time, hope that 5.6.x is sufficiently 
     6816# widespread that we can use the built-in version vectors rather 
     6817# than reinventing them here.  For 5.6.0, however, we must 
     6818# assume this script will likely be run by 5.005_0x.  --AD 1/2000. 
     6819foreach $d (@candidates) { 
     6820    if ($d lt $version) { 
     6821        if ($d ge $api_versionstring) { 
     6822            unshift(@inc_version_list, grep { -d } "$d/$archname", $d); 
     6823        } 
     6824        elsif ($d ge "5.005") { 
     6825            unshift(@inc_version_list, grep { -d } $d); 
     6826        } 
     6827    } 
     6828    else { 
     6829        # Skip newer version.  I.e. don't look in 
     6830        # 5.7.0 if we're installing 5.6.1. 
     6831    } 
     6832} 
     6833 
     6834if (@inc_version_list) { 
     6835    print join(' ', @inc_version_list); 
     6836} 
     6837else { 
     6838    # Blank space to preserve value for next Configure run. 
     6839    print " "; 
     6840} 
     6841EOPL 
     6842chmod +x getverlist 
     6843case "$inc_version_list" in 
     6844'')     if test -x "$perl5$exe_ext"; then 
     6845                dflt=`$perl5 getverlist` 
     6846        else 
     6847                dflt='none' 
     6848        fi 
     6849        ;; 
     6850$undef) dflt='none' ;; 
     6851*)  eval dflt=\"$inc_version_list\" ;; 
     6852esac 
     6853case "$dflt" in 
     6854''|' ') dflt=none ;; 
     6855esac 
     6856case "$dflt" in 
     68575.005) dflt=none ;; 
     6858esac 
     6859$cat <<EOM 
     6860 
     6861In order to ease the process of upgrading, this version of perl  
     6862can be configured to use modules built and installed with earlier  
     6863versions of perl that were installed under $prefix.  Specify here 
     6864the list of earlier versions that this version of perl should check. 
     6865If Configure detected no earlier versions of perl installed under 
     6866$prefix, then the list will be empty.  Answer 'none' to tell perl 
     6867to not search earlier versions. 
     6868 
     6869The default should almost always be sensible, so if you're not sure, 
     6870just accept the default. 
     6871EOM 
     6872 
     6873rp='List of earlier versions to include in @INC?' 
     6874. ./myread 
     6875case "$ans" in 
     6876[Nn]one|''|' ') inc_version_list=' ' ;; 
     6877*) inc_version_list="$ans" ;; 
     6878esac 
     6879case "$inc_version_list" in 
     6880''|' ')  
     6881        inc_version_list_init='0';; 
     6882*)      inc_version_list_init=`echo $inc_version_list | 
     6883                $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'` 
     6884        ;; 
     6885esac 
     6886$rm -f getverlist 
     6887 
     6888: determine whether to install perl also as /usr/bin/perl 
     6889 
     6890echo " " 
     6891if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then 
     6892        $cat <<EOM 
     6893Many scripts expect perl to be installed as /usr/bin/perl. 
     6894 
     6895If you want to, I can install the perl you are about to compile 
     6896as /usr/bin/perl (in addition to $bin/perl). 
     6897EOM 
     6898        if test -f /usr/bin/perl; then 
     6899            $cat <<EOM 
     6900 
     6901However, please note that because you already have a /usr/bin/perl, 
     6902overwriting that with a new Perl would very probably cause problems. 
     6903Therefore I'm assuming you don't want to do that (unless you insist). 
     6904 
     6905EOM 
     6906            case "$installusrbinperl" in 
     6907            "$define"|[yY]*)    dflt='y';; 
     6908            *)                  dflt='n';; 
     6909            esac 
     6910        else 
     6911            $cat <<EOM 
     6912 
     6913Since you don't have a /usr/bin/perl I'm assuming creating one is okay. 
     6914 
     6915EOM 
     6916            case "$installusrbinperl" in 
     6917            "$undef"|[nN]*)     dflt='n';; 
     6918            *)                  dflt='y';; 
     6919            esac 
     6920        fi 
     6921        rp="Do you want to install perl as /usr/bin/perl?" 
     6922        . ./myread 
     6923        case "$ans" in 
     6924        [yY]*)  val="$define";; 
     6925        *)      val="$undef" ;; 
     6926        esac 
     6927else 
     6928        val="$undef" 
     6929fi 
     6930set installusrbinperl 
     6931eval $setvar 
    53646932 
    53656933echo " " 
     
    54186986        case "$dflt" in 
    54196987        '')  
    5420                 if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then 
     6988                if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then 
    54216989                        echo " " 
    54226990                        echo "Whoops!  This is an AIX system without /lib/syscalls.exp!" >&4 
     
    56567224xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4' 
    56577225xxx='[ADTSIW]' 
    5658 if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx  *_[_.]*//p' -e 's/^.* $xxx  *//p'";\ 
     7226if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx  *//p'";\ 
    56597227        eval $xscan;\ 
    56607228        $contains '^fprintf$' libc.list >/dev/null 2>&1; then 
     
    57657333fi 
    57667334nm_extract="$com" 
    5767 if $test -f /lib/syscalls.exp; then 
     7335case "$PASE" in 
     7336define) 
     7337    echo " " 
     7338    echo "Since you are compiling for PASE, extracting more symbols from libc.a ...">&4 
     7339    dump -Tv /lib/libc.a | awk '$7 == "/unix" {print $5 " " $8}' | grep "^SV" | awk '{print $2}' >> libc.list 
     7340    ;; 
     7341*)  if $test -f /lib/syscalls.exp; then 
    57687342        echo " " 
    57697343        echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4 
    57707344        $sed -n 's/^\([^        ]*\)[   ]*syscall[0-9]*[        ]*$/\1/p' /lib/syscalls.exp >>libc.list 
    5771 fi 
     7345    fi 
     7346    ;; 
     7347esac 
    57727348;; 
    57737349esac 
    57747350$rm -f libnames libpath 
     7351 
     7352: see if dld is available 
     7353set dld.h i_dld 
     7354eval $inhdr 
    57757355 
    57767356: is a C symbol defined? 
    57777357csym='tlook=$1; 
    57787358case "$3" in 
    5779 -v) tf=libc.tmp; tc=""; tdc="";; 
    5780 -a) tf=libc.tmp; tc="[0]"; tdc="[]";; 
    5781 *) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";; 
     7359-v) tf=libc.tmp; tdc="";; 
     7360-a) tf=libc.tmp; tdc="[]";; 
     7361*) tlook="^$1\$"; tf=libc.list; tdc="()";; 
    57827362esac; 
    57837363tx=yes; 
     
    57887368case "$tx" in 
    57897369yes) 
    5790         case "$runnm" in 
    5791         true) 
    5792                 if $contains $tlook $tf >/dev/null 2>&1; 
    5793                 then tval=true; 
    5794                 else tval=false; 
    5795                 fi;; 
    5796         *) 
    5797                 echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c; 
    5798                 if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1; 
    5799                 then tval=true; 
    5800                 else tval=false; 
     7370        tval=false; 
     7371        if $test "$runnm" = true; then 
     7372                if $contains $tlook $tf >/dev/null 2>&1; then 
     7373                        tval=true; 
     7374                elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then 
     7375                        echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; 
     7376                        $cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true; 
     7377                        $test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; }; 
     7378                        $rm -f try$_exe try.c core core.* try.core; 
    58017379                fi; 
    5802                 $rm -f t t.c;; 
    5803         esac;; 
     7380        else 
     7381                echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; 
     7382                $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true; 
     7383                $rm -f try$_exe try.c; 
     7384        fi; 
     7385        ;; 
    58047386*) 
    58057387        case "$tval" in 
    58067388        $define) tval=true;; 
    58077389        *) tval=false;; 
    5808         esac;; 
     7390        esac; 
     7391        ;; 
    58097392esac; 
    58107393eval "$2=$tval"' 
     
    58367419        esac;; 
    58377420esac' 
    5838  
    5839 : see if sqrtl exists 
    5840 set sqrtl d_sqrtl 
    5841 eval $inlibc 
    5842  
    5843 : check for length of double 
    5844 echo " " 
    5845 case "$doublesize" in 
    5846 '') 
    5847         echo "Checking to see how big your double precision numbers are..." >&4 
    5848         $cat >try.c <<'EOCP' 
    5849 #include <stdio.h> 
    5850 int main() 
    5851 { 
    5852     printf("%d\n", (int)sizeof(double)); 
    5853     exit(0); 
    5854 } 
    5855 EOCP 
    5856         set try 
    5857         if eval $compile_ok; then 
    5858                 doublesize=`$run ./try` 
    5859                 echo "Your double is $doublesize bytes long." 
    5860         else 
    5861                 dflt='8' 
    5862                 echo "(I can't seem to compile the test program.  Guessing...)" 
    5863                 rp="What is the size of a double precision number (in bytes)?" 
    5864                 . ./myread 
    5865                 doublesize="$ans" 
    5866         fi 
    5867         ;; 
    5868 esac 
    5869 $rm -f try.c try 
    5870  
    5871 : check for long doubles 
    5872 echo " " 
    5873 echo "Checking to see if you have long double..." >&4 
    5874 echo 'int main() { long double x = 7.0; }' > try.c 
    5875 set try 
    5876 if eval $compile; then 
    5877         val="$define" 
    5878         echo "You have long double." 
    5879 else 
    5880         val="$undef" 
    5881         echo "You do not have long double." 
    5882 fi 
    5883 $rm try.* 
    5884 set d_longdbl 
    5885 eval $setvar 
    5886  
    5887 : check for length of long double 
    5888 case "${d_longdbl}${longdblsize}" in 
    5889 $define) 
    5890         echo " " 
    5891         echo "Checking to see how big your long doubles are..." >&4 
    5892         $cat >try.c <<'EOCP' 
    5893 #include <stdio.h> 
    5894 int main() 
    5895 { 
    5896         printf("%d\n", sizeof(long double)); 
    5897 } 
    5898 EOCP 
    5899         set try 
    5900         set try 
    5901         if eval $compile; then 
    5902                 longdblsize=`$run ./try` 
    5903                 echo "Your long doubles are $longdblsize bytes long." 
    5904         else 
    5905                 dflt='8' 
    5906                 echo " " 
    5907                 echo "(I can't seem to compile the test program.  Guessing...)" >&4 
    5908                 rp="What is the size of a long double (in bytes)?" 
    5909                 . ./myread 
    5910                 longdblsize="$ans" 
    5911         fi 
    5912         if $test "X$doublesize" = "X$longdblsize"; then 
    5913                 echo "(That isn't any different from an ordinary double.)" 
    5914         fi       
    5915         ;; 
    5916 esac 
    5917 $rm -f try.* try 
    5918  
    5919 echo " " 
    5920  
    5921 if $test X"$d_longdbl" = X"$define"; then 
    5922  
    5923 echo "Checking how to print long doubles..." >&4 
    5924  
    5925 if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then 
    5926         $cat >try.c <<'EOCP' 
    5927 #include <sys/types.h> 
    5928 #include <stdio.h> 
    5929 int main() { 
    5930   double d = 123.456; 
    5931   printf("%.3f\n", d); 
    5932 } 
    5933 EOCP 
    5934         set try 
    5935         if eval $compile; then 
    5936                 yyy=`$run ./try` 
    5937                 case "$yyy" in 
    5938                 123.456) 
    5939                         sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"'; 
    5940                         sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"'; 
    5941                         echo "We will use %f." 
    5942                         ;; 
    5943                 esac 
    5944         fi 
    5945 fi 
    5946  
    5947 if $test X"$sPRIfldbl" = X; then 
    5948         $cat >try.c <<'EOCP' 
    5949 #include <sys/types.h> 
    5950 #include <stdio.h> 
    5951 int main() { 
    5952   long double d = 123.456; 
    5953   printf("%.3Lf\n", d); 
    5954 } 
    5955 EOCP 
    5956         set try 
    5957         if eval $compile; then 
    5958                 yyy=`$run ./try` 
    5959                 case "$yyy" in 
    5960                 123.456) 
    5961                         sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"'; 
    5962                         sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"'; 
    5963                         echo "We will use %Lf." 
    5964                         ;; 
    5965                 esac 
    5966         fi 
    5967 fi 
    5968  
    5969 if $test X"$sPRIfldbl" = X; then 
    5970         $cat >try.c <<'EOCP' 
    5971 #include <sys/types.h> 
    5972 #include <stdio.h> 
    5973 int main() { 
    5974   long double d = 123.456; 
    5975   printf("%.3llf\n", d); 
    5976 } 
    5977 EOCP 
    5978         set try 
    5979         if eval $compile; then 
    5980                 yyy=`$run ./try` 
    5981                 case "$yyy" in 
    5982                 123.456) 
    5983                         sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"'; 
    5984                         sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"'; 
    5985                         echo "We will use %llf." 
    5986                         ;; 
    5987                 esac 
    5988         fi 
    5989 fi 
    5990  
    5991 if $test X"$sPRIfldbl" = X; then 
    5992         $cat >try.c <<'EOCP' 
    5993 #include <sys/types.h> 
    5994 #include <stdio.h> 
    5995 int main() { 
    5996   long double d = 123.456; 
    5997   printf("%.3lf\n", d); 
    5998 } 
    5999 EOCP 
    6000         set try 
    6001         if eval $compile; then 
    6002                 yyy=`$run ./try` 
    6003                 case "$yyy" in 
    6004                 123.456) 
    6005                         sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"'; 
    6006                         sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"'; 
    6007                         echo "We will use %lf." 
    6008                         ;; 
    6009                 esac 
    6010         fi 
    6011 fi 
    6012  
    6013 if $test X"$sPRIfldbl" = X; then 
    6014         echo "Cannot figure out how to print long doubles." >&4 
    6015 else 
    6016         sSCNfldbl=$sPRIfldbl    # expect consistency 
    6017 fi 
    6018  
    6019 $rm -f try try.* 
    6020  
    6021 fi # d_longdbl 
    6022  
    6023 case "$sPRIfldbl" in 
    6024 '')     d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";  
    6025         d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";  
    6026         d_SCNfldbl="$undef"; 
    6027         ;; 
    6028 *)      d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";  
    6029         d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";  
    6030         d_SCNfldbl="$define"; 
    6031         ;; 
    6032 esac 
    6033  
    6034 : see if modfl exists 
    6035 set modfl d_modfl 
    6036 eval $inlibc 
    6037  
    6038 d_modfl_pow32_bug="$undef" 
    6039  
    6040 case "$d_longdbl$d_modfl" in 
    6041 $define$define) 
    6042         $cat <<EOM 
    6043 Checking to see whether your modfl() is okay for large values... 
    6044 EOM 
    6045 $cat >try.c <<EOCP 
    6046 #include <math.h>  
    6047 #include <stdio.h> 
    6048 int main() { 
    6049     long double nv = 4294967303.15; 
    6050     long double v, w; 
    6051     v = modfl(nv, &w);          
    6052 #ifdef __GLIBC__ 
    6053     printf("glibc"); 
    6054 #endif 
    6055     printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w); 
    6056     return 0; 
    6057 } 
    6058 EOCP 
    6059         case "$osname:$gccversion" in 
    6060         aix:)   saveccflags="$ccflags" 
    6061                 ccflags="$ccflags -qlongdouble" ;; # to avoid core dump 
    6062         esac 
    6063         set try 
    6064         if eval $compile; then 
    6065                 foo=`$run ./try` 
    6066                 case "$foo" in 
    6067                 *" 4294967303.150000 1.150000 4294967302.000000") 
    6068                         echo >&4 "Your modfl() is broken for large values." 
    6069                         d_modfl_pow32_bug="$define" 
    6070                         case "$foo" in 
    6071                         glibc)  echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()." 
    6072                         ;; 
    6073                         esac 
    6074                         ;; 
    6075                 *" 4294967303.150000 0.150000 4294967303.000000") 
    6076                         echo >&4 "Your modfl() seems okay for large values." 
    6077                         ;; 
    6078                 *)      echo >&4 "I don't understand your modfl() at all." 
    6079                         d_modfl="$undef" 
    6080                         ;; 
    6081                 esac 
    6082                 $rm -f try.* try core core.try.* 
    6083         else 
    6084                 echo "I cannot figure out whether your modfl() is okay, assuming it isn't." 
    6085                 d_modfl="$undef" 
    6086         fi 
    6087         case "$osname:$gccversion" in 
    6088         aix:)   ccflags="$saveccflags" ;; # restore 
    6089         esac 
    6090         ;; 
    6091 esac 
    6092  
    6093 case "$ccflags" in 
    6094 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;; 
    6095 esac 
    6096  
    6097 case "$uselongdouble" in 
    6098 $define|true|[yY]*)     dflt='y';; 
    6099 *) dflt='n';; 
    6100 esac 
    6101 cat <<EOM 
    6102  
    6103 Perl can be built to take advantage of long doubles which 
    6104 (if available) may give more accuracy and range for floating point numbers. 
    6105  
    6106 If this doesn't make any sense to you, just accept the default '$dflt'. 
    6107 EOM 
    6108 rp='Try to use long doubles if available?' 
    6109 . ./myread 
    6110 case "$ans" in 
    6111 y|Y)    val="$define"   ;; 
    6112 *)      val="$undef"    ;; 
    6113 esac 
    6114 set uselongdouble 
    6115 eval $setvar 
    6116  
    6117 case "$uselongdouble" in 
    6118 true|[yY]*) uselongdouble="$define" ;; 
    6119 esac 
    6120  
    6121 case "$uselongdouble" in 
    6122 $define) 
    6123 : Look for a hint-file generated 'call-back-unit'.  If the 
    6124 : user has specified that long doubles should be used, 
    6125 : we may need to set or change some other defaults. 
    6126         if $test -f uselongdouble.cbu; then 
    6127                 echo "Your platform has some specific hints for long doubles, using them..." 
    6128                 . ./uselongdouble.cbu 
    6129         else 
    6130                 $cat <<EOM 
    6131 (Your platform doesn't have any specific hints for long doubles.) 
    6132 EOM 
    6133         fi 
    6134         ;; 
    6135 esac 
    6136  
    6137 message=X 
    6138 case "$uselongdouble:$d_sqrtl:$d_modfl" in 
    6139 $define:$define:$define) 
    6140         : You have both 
    6141         ;; 
    6142 $define:$define:$undef) 
    6143         message="I could not find modfl" 
    6144         ;; 
    6145 $define:$undef:$define) 
    6146         message="I could not find sqrtl" 
    6147         ;; 
    6148 $define:$undef:$undef) 
    6149         message="I found neither sqrtl nor modfl" 
    6150         ;; 
    6151 esac 
    6152  
    6153 if $test "$message" != X; then 
    6154         $cat <<EOM >&4 
    6155  
    6156 *** You requested the use of long doubles but you do not seem to have 
    6157 *** the mathematic functions for long doubles. 
    6158 *** ($message) 
    6159 *** I'm disabling the use of long doubles. 
    6160  
    6161 EOM 
    6162  
    6163         uselongdouble=$undef 
    6164 fi 
    6165  
    6166 : determine the architecture name 
    6167 echo " " 
    6168 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then 
    6169         tarch=`arch`"-$osname" 
    6170 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then 
    6171         if uname -m > tmparch 2>&1 ; then 
    6172                 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \ 
    6173                         -e 's/$/'"-$osname/" tmparch` 
    6174         else 
    6175                 tarch="$osname" 
    6176         fi 
    6177         $rm -f tmparch 
    6178 else 
    6179         tarch="$osname" 
    6180 fi 
    6181 case "$myarchname" in 
    6182 ''|"$tarch") ;; 
    6183 *) 
    6184         echo "(Your architecture name used to be $myarchname.)" 
    6185         archname='' 
    6186         ;; 
    6187 esac 
    6188 case "$targetarch" in 
    6189 '') ;; 
    6190 *)  archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;; 
    6191 esac 
    6192 myarchname="$tarch" 
    6193 case "$archname" in 
    6194 '') dflt="$tarch";; 
    6195 *) dflt="$archname";; 
    6196 esac 
    6197 rp='What is your architecture name' 
    6198 . ./myread 
    6199 archname="$ans" 
    6200 case "$usethreads" in 
    6201 $define) 
    6202         echo "Threads selected." >&4 
    6203         case "$archname" in 
    6204         *-thread*) echo "...and architecture name already has -thread." >&4 
    6205                 ;; 
    6206         *)      archname="$archname-thread" 
    6207                 echo "...setting architecture name to $archname." >&4 
    6208                 ;; 
    6209         esac 
    6210         ;; 
    6211 esac 
    6212 case "$usemultiplicity" in 
    6213 $define) 
    6214         echo "Multiplicity selected." >&4 
    6215         case "$archname" in 
    6216         *-multi*) echo "...and architecture name already has -multi." >&4 
    6217                 ;; 
    6218         *)      archname="$archname-multi" 
    6219                 echo "...setting architecture name to $archname." >&4 
    6220                 ;; 
    6221         esac 
    6222         ;; 
    6223 esac 
    6224 case "$use64bitint$use64bitall" in 
    6225 *"$define"*) 
    6226         case "$archname64" in 
    6227         '') 
    6228                 echo "This architecture is naturally 64-bit, not changing architecture name." >&4 
    6229                 ;; 
    6230         *) 
    6231                 case "$use64bitint" in 
    6232                 "$define") echo "64 bit integers selected." >&4 ;; 
    6233                 esac 
    6234                 case "$use64bitall" in 
    6235                 "$define") echo "Maximal 64 bitness selected." >&4 ;; 
    6236                 esac 
    6237                 case "$archname" in 
    6238                 *-$archname64*) echo "...and architecture name already has $archname64." >&4 
    6239                         ;; 
    6240                 *)      archname="$archname-$archname64" 
    6241                         echo "...setting architecture name to $archname." >&4 
    6242                         ;; 
    6243                 esac 
    6244                 ;; 
    6245         esac 
    6246 esac 
    6247 case "$uselongdouble" in 
    6248 $define) 
    6249         echo "Long doubles selected." >&4 
    6250         case "$longdblsize" in 
    6251         $doublesize) 
    6252                 echo "...but long doubles are equal to doubles, not changing architecture name." >&4 
    6253                 ;; 
    6254         *) 
    6255                 case "$archname" in 
    6256                 *-ld*) echo "...and architecture name already has -ld." >&4 
    6257                         ;; 
    6258                 *)      archname="$archname-ld" 
    6259                         echo "...setting architecture name to $archname." >&4 
    6260                         ;; 
    6261                 esac 
    6262                 ;; 
    6263         esac 
    6264         ;; 
    6265 esac 
    6266 case "$useperlio" in 
    6267 $define) 
    6268         echo "Perlio selected." >&4 
    6269         ;; 
    6270 *) 
    6271         echo "Perlio not selected, using stdio." >&4 
    6272         case "$archname" in 
    6273         *-stdio*) echo "...and architecture name already has -stdio." >&4 
    6274                 ;; 
    6275         *)      archname="$archname-stdio" 
    6276                 echo "...setting architecture name to $archname." >&4 
    6277                 ;; 
    6278         esac 
    6279         ;; 
    6280 esac 
    6281  
    6282 : determine root of directory hierarchy where package will be installed. 
    6283 case "$prefix" in 
    6284 '') 
    6285         dflt=`./loc . /usr/local /usr/local /local /opt /usr` 
    6286         ;; 
    6287 *) 
    6288         dflt="$prefix" 
    6289         ;; 
    6290 esac 
    6291 $cat <<EOM 
    6292  
    6293 By default, $package will be installed in $dflt/bin, manual pages 
    6294 under $dflt/man, etc..., i.e. with $dflt as prefix for all 
    6295 installation directories. Typically this is something like /usr/local. 
    6296 If you wish to have binaries under /usr/bin but other parts of the 
    6297 installation under /usr/local, that's ok: you will be prompted 
    6298 separately for each of the installation directories, the prefix being 
    6299 only used to set the defaults. 
    6300  
    6301 EOM 
    6302 fn=d~ 
    6303 rp='Installation prefix to use?' 
    6304 . ./getfile 
    6305 oldprefix='' 
    6306 case "$prefix" in 
    6307 '') ;; 
    6308 *) 
    6309         case "$ans" in 
    6310         "$prefix") ;; 
    6311         *) oldprefix="$prefix";; 
    6312         esac 
    6313         ;; 
    6314 esac 
    6315 prefix="$ans" 
    6316 prefixexp="$ansexp" 
    6317  
    6318 case "$afsroot" in 
    6319 '')     afsroot=/afs ;; 
    6320 *)      afsroot=$afsroot ;; 
    6321 esac 
    6322  
    6323 : is AFS running? 
    6324 echo " " 
    6325 case "$afs" in 
    6326 $define|true)   afs=true ;; 
    6327 $undef|false)   afs=false ;; 
    6328 *)      if test -d $afsroot; then 
    6329                 afs=true 
    6330         else 
    6331                 afs=false 
    6332         fi 
    6333         ;; 
    6334 esac 
    6335 if $afs; then 
    6336         echo "AFS may be running... I'll be extra cautious then..." >&4 
    6337 else 
    6338         echo "AFS does not seem to be running..." >&4 
    6339 fi 
    6340  
    6341 : determine installation prefix for where package is to be installed. 
    6342 if $afs; then  
    6343 $cat <<EOM 
    6344  
    6345 Since you are running AFS, I need to distinguish the directory in which 
    6346 files will reside from the directory in which they are installed (and from 
    6347 which they are presumably copied to the former directory by occult means). 
    6348  
    6349 EOM 
    6350         case "$installprefix" in 
    6351         '') dflt=`echo $prefix | sed 's#^/afs/#/afs/.#'`;; 
    6352         *) dflt="$installprefix";; 
    6353         esac 
    6354 else 
    6355 $cat <<EOM 
    6356  
    6357 In some special cases, particularly when building $package for distribution, 
    6358 it is convenient to distinguish between the directory in which files should  
    6359 be installed from the directory ($prefix) in which they  
    6360 will eventually reside.  For most users, these two directories are the same. 
    6361  
    6362 EOM 
    6363         case "$installprefix" in 
    6364         '') dflt=$prefix ;; 
    6365         *) dflt=$installprefix;; 
    6366         esac 
    6367 fi 
    6368 fn=d~ 
    6369 rp='What installation prefix should I use for installing files?' 
    6370 . ./getfile 
    6371 installprefix="$ans" 
    6372 installprefixexp="$ansexp" 
    6373  
    6374 : set the prefixit variable, to compute a suitable default value 
    6375 prefixit='case "$3" in 
    6376 ""|none) 
    6377         case "$oldprefix" in 
    6378         "") eval "$1=\"\$$2\"";; 
    6379         *) 
    6380                 case "$3" in 
    6381                 "") eval "$1=";; 
    6382                 none) 
    6383                         eval "tp=\"\$$2\""; 
    6384                         case "$tp" in 
    6385                         ""|" ") eval "$1=\"\$$2\"";; 
    6386                         *) eval "$1=";; 
    6387                         esac;; 
    6388                 esac;; 
    6389         esac;; 
    6390 *) 
    6391         eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\""; 
    6392         case "$tp" in 
    6393         --|/*--|\~*--) eval "$1=\"$prefix/$3\"";; 
    6394         /*-$oldprefix/*|\~*-$oldprefix/*) 
    6395                 eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";; 
    6396         *) eval "$1=\"\$$2\"";; 
    6397         esac;; 
    6398 esac' 
    6399  
    6400 : get the patchlevel 
    6401 echo " " 
    6402 echo "Getting the current patchlevel..." >&4 
    6403 if $test -r $rsrc/patchlevel.h;then 
    6404         revision=`awk '/define[         ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h` 
    6405         patchlevel=`awk '/define[       ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` 
    6406         subversion=`awk '/define[       ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` 
    6407         api_revision=`awk '/define[     ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h` 
    6408         api_version=`awk '/define[      ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h` 
    6409         api_subversion=`awk '/define[   ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` 
    6410        perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'` 
    6411 else 
    6412         revision=0 
    6413         patchlevel=0 
    6414         subversion=0 
    6415         api_revision=0 
    6416         api_version=0 
    6417         api_subversion=0 
    6418         perl_patchlevel=0 
    6419         $echo "(You do not have patchlevel.h.  Eek.)" 
    6420 fi 
    6421 if $test -r $rsrc/.patch ; then   
    6422         if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then 
    6423                 perl_patchlevel=`cat $rsrc/.patch` 
    6424         fi 
    6425 fi 
    6426 : Define a handy string here to avoid duplication in myconfig.SH and configpm. 
    6427 version_patchlevel_string="version $patchlevel subversion $subversion" 
    6428 case "$perl_patchlevel" in 
    6429 0|'') ;; 
    6430 *) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;; 
    6431 esac 
    6432  
    6433 $echo "(You have $package $version_patchlevel_string.)" 
    6434  
    6435 case "$osname" in 
    6436 dos|vms) 
    6437         : XXX Should be a Configure test for double-dots in filenames. 
    6438         version=`echo $revision $patchlevel $subversion | \ 
    6439                  $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` 
    6440         api_versionstring=`echo $api_revision $api_version $api_subversion | \ 
    6441                  $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` 
    6442         ;; 
    6443 *) 
    6444         version=`echo $revision $patchlevel $subversion | \ 
    6445                  $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` 
    6446         api_versionstring=`echo $api_revision $api_version $api_subversion | \ 
    6447                  $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` 
    6448         ;; 
    6449 esac 
    6450 : Special case the 5.005_xx maintenance series, which used 5.005 
    6451 : without any subversion label as a subdirectory in $sitelib 
    6452 if test "${api_revision}${api_version}${api_subversion}" = "550"; then 
    6453         api_versionstring='5.005' 
    6454 fi 
    6455  
    6456 : determine installation style 
    6457 : For now, try to deduce it from prefix unless it is already set. 
    6458 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7. 
    6459 case "$installstyle" in 
    6460 '')     case "$prefix" in 
    6461                 *perl*) dflt='lib';; 
    6462                 *) dflt='lib/perl5' ;; 
    6463         esac 
    6464         ;; 
    6465 *)      dflt="$installstyle" ;; 
    6466 esac 
    6467 : Probably not worth prompting for this since we prompt for all 
    6468 : the directories individually, and the prompt would be too long and 
    6469 : confusing anyway. 
    6470 installstyle=$dflt 
    6471  
    6472 : determine where private library files go 
    6473 : Usual default is /usr/local/lib/perl5/$version. 
    6474 : Also allow things like /opt/perl/lib/$version, since  
    6475 : /opt/perl/lib/perl5... would be redundant. 
    6476 : The default "style" setting is made in installstyle.U 
    6477 case "$installstyle" in 
    6478 *lib/perl5*) set dflt privlib lib/$package/$version ;; 
    6479 *)       set dflt privlib lib/$version ;; 
    6480 esac 
    6481 eval $prefixit 
    6482 $cat <<EOM 
    6483  
    6484 There are some auxiliary files for $package that need to be put into a 
    6485 private library directory that is accessible by everyone. 
    6486  
    6487 EOM 
    6488 fn=d~+ 
    6489 rp='Pathname where the private library files will reside?' 
    6490 . ./getfile 
    6491 privlib="$ans" 
    6492 privlibexp="$ansexp" 
    6493 : Change installation prefix, if necessary. 
    6494 if $test X"$prefix" != X"$installprefix"; then 
    6495         installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"` 
    6496 else 
    6497         installprivlib="$privlibexp" 
    6498 fi 
    6499  
    6500 : set the prefixup variable, to restore leading tilda escape 
    6501 prefixup='case "$prefixexp" in 
    6502 "$prefix") ;; 
    6503 *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";; 
    6504 esac' 
    6505  
    6506 : determine where public architecture dependent libraries go 
    6507 set archlib archlib 
    6508 eval $prefixit 
    6509 : privlib default is /usr/local/lib/$package/$version 
    6510 : archlib default is /usr/local/lib/$package/$version/$archname 
    6511 : privlib may have an optional trailing /share. 
    6512 tdflt=`echo $privlib | $sed 's,/share$,,'` 
    6513 tdflt=$tdflt/$archname 
    6514 case "$archlib" in 
    6515 '')     dflt=$tdflt 
    6516         ;; 
    6517 *)      dflt="$archlib" 
    6518     ;; 
    6519 esac 
    6520 $cat <<EOM 
    6521  
    6522 $spackage contains architecture-dependent library files.  If you are 
    6523 sharing libraries in a heterogeneous environment, you might store 
    6524 these files in a separate location.  Otherwise, you can just include 
    6525 them with the rest of the public library files. 
    6526  
    6527 EOM 
    6528 fn=d+~ 
    6529 rp='Where do you want to put the public architecture-dependent libraries?' 
    6530 . ./getfile 
    6531 archlib="$ans" 
    6532 archlibexp="$ansexp" 
    6533 if $test X"$archlib" = X"$privlib"; then 
    6534         d_archlib="$undef" 
    6535 else 
    6536         d_archlib="$define" 
    6537 fi 
    6538 : Change installation prefix, if necessary. 
    6539 if $test X"$prefix" != X"$installprefix"; then 
    6540         installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"` 
    6541 else 
    6542         installarchlib="$archlibexp" 
    6543 fi 
    6544  
    6545 : see if setuid scripts can be secure 
    6546 $cat <<EOM 
    6547  
    6548 Some kernels have a bug that prevents setuid #! scripts from being 
    6549 secure.  Some sites have disabled setuid #! scripts because of this. 
    6550  
    6551 First let's decide if your kernel supports secure setuid #! scripts. 
    6552 (If setuid #! scripts would be secure but have been disabled anyway, 
    6553 don't say that they are secure if asked.) 
    6554  
    6555 EOM 
    6556  
    6557 val="$undef" 
    6558 if $test -d /dev/fd; then 
    6559         echo "#!$ls" >reflect 
    6560         chmod +x,u+s reflect 
    6561         ./reflect >flect 2>&1 
    6562         if $contains "/dev/fd" flect >/dev/null; then 
    6563                 echo "Congratulations, your kernel has secure setuid scripts!" >&4 
    6564                 val="$define" 
    6565         else 
    6566                 $cat <<EOM 
    6567 If you are not sure if they are secure, I can check but I'll need a 
    6568 username and password different from the one you are using right now. 
    6569 If you don't have such a username or don't want me to test, simply 
    6570 enter 'none'. 
    6571  
    6572 EOM 
    6573                 rp='Other username to test security of setuid scripts with?' 
    6574                 dflt='none' 
    6575                 . ./myread 
    6576                 case "$ans" in 
    6577                 n|none) 
    6578                         case "$d_suidsafe" in 
    6579                         '')     echo "I'll assume setuid scripts are *not* secure." >&4 
    6580                                 dflt=n;; 
    6581                         "$undef") 
    6582                                 echo "Well, the $hint value is *not* secure." >&4 
    6583                                 dflt=n;; 
    6584                         *)      echo "Well, the $hint value *is* secure." >&4 
    6585                                 dflt=y;; 
    6586                         esac 
    6587                         ;; 
    6588                 *) 
    6589                         $rm -f reflect flect 
    6590                         echo "#!$ls" >reflect 
    6591                         chmod +x,u+s reflect 
    6592                         echo >flect 
    6593                         chmod a+w flect 
    6594                         echo '"su" will (probably) prompt you for '"$ans's password." 
    6595                         su $ans -c './reflect >flect' 
    6596                         if $contains "/dev/fd" flect >/dev/null; then 
    6597                                 echo "Okay, it looks like setuid scripts are secure." >&4 
    6598                                 dflt=y 
    6599                         else 
    6600                                 echo "I don't think setuid scripts are secure." >&4 
    6601                                 dflt=n 
    6602                         fi 
    6603                         ;; 
    6604                 esac 
    6605                 rp='Does your kernel have *secure* setuid scripts?' 
    6606                 . ./myread 
    6607                 case "$ans" in 
    6608                 [yY]*)  val="$define";; 
    6609                 *)      val="$undef";; 
    6610                 esac 
    6611         fi 
    6612 else 
    6613         echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4 
    6614         echo "(That's for file descriptors, not floppy disks.)" 
    6615         val="$undef" 
    6616 fi 
    6617 set d_suidsafe 
    6618 eval $setvar 
    6619  
    6620 $rm -f reflect flect 
    6621  
    6622 : now see if they want to do setuid emulation 
    6623 echo " " 
    6624 val="$undef" 
    6625 case "$d_suidsafe" in 
    6626 "$define") 
    6627         val="$undef" 
    6628         echo "No need to emulate SUID scripts since they are secure here." >&4 
    6629         ;; 
    6630 *) 
    6631         $cat <<EOM 
    6632 Some systems have disabled setuid scripts, especially systems where 
    6633 setuid scripts cannot be secure.  On systems where setuid scripts have 
    6634 been disabled, the setuid/setgid bits on scripts are currently 
    6635 useless.  It is possible for $package to detect those bits and emulate 
    6636 setuid/setgid in a secure fashion.  This emulation will only work if 
    6637 setuid scripts have been disabled in your kernel. 
    6638  
    6639 EOM 
    6640         case "$d_dosuid" in 
    6641         "$define") dflt=y ;; 
    6642         *) dflt=n ;; 
    6643         esac 
    6644         rp="Do you want to do setuid/setgid emulation?" 
    6645         . ./myread 
    6646         case "$ans" in 
    6647         [yY]*)  val="$define";; 
    6648         *)      val="$undef";; 
    6649         esac 
    6650         ;; 
    6651 esac 
    6652 set d_dosuid 
    6653 eval $setvar 
    6654  
    6655 : see if this is a malloc.h system 
    6656 set malloc.h i_malloc 
    6657 eval $inhdr 
    6658  
    6659 : see if stdlib is available 
    6660 set stdlib.h i_stdlib 
    6661 eval $inhdr 
    6662  
    6663 : check for void type 
    6664 echo " " 
    6665 echo "Checking to see how well your C compiler groks the void type..." >&4 
    6666 case "$voidflags" in 
    6667 '') 
    6668         $cat >try.c <<'EOCP' 
    6669 #if TRY & 1 
    6670 void sub() { 
    6671 #else 
    6672 sub() { 
    6673 #endif 
    6674         extern void moo();      /* function returning void */ 
    6675         void (*goo)();          /* ptr to func returning void */ 
    6676 #if TRY & 8 
    6677         void *hue;              /* generic ptr */ 
    6678 #endif 
    6679 #if TRY & 2 
    6680         void (*foo[10])(); 
    6681 #endif 
    6682  
    6683 #if TRY & 4 
    6684         if(goo == moo) { 
    6685                 exit(0); 
    6686         } 
    6687 #endif 
    6688         exit(0); 
    6689 } 
    6690 int main() { sub(); } 
    6691 EOCP 
    6692         if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then 
    6693                 voidflags=$defvoidused 
    6694         echo "Good.  It appears to support void to the level $package wants.">&4 
    6695                 if $contains warning .out >/dev/null 2>&1; then 
    6696                         echo "However, you might get some warnings that look like this:" 
    6697                         $cat .out 
    6698                 fi 
    6699         else 
    6700 echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4 
    6701                 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then 
    6702                         echo "It supports 1..." 
    6703                         if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then 
    6704                                 echo "It also supports 2..." 
    6705                                 if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then 
    6706                                         voidflags=7 
    6707                                         echo "And it supports 4 but not 8 definitely." 
    6708                                 else 
    6709                                         echo "It doesn't support 4..." 
    6710                                         if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then 
    6711                                                 voidflags=11 
    6712                                                 echo "But it supports 8." 
    6713                                         else 
    6714                                                 voidflags=3 
    6715                                                 echo "Neither does it support 8." 
    6716                                         fi 
    6717                                 fi 
    6718                         else 
    6719                                 echo "It does not support 2..." 
    6720                                 if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then 
    6721                                         voidflags=13 
    6722                                         echo "But it supports 4 and 8." 
    6723                                 else 
    6724                                         if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then 
    6725                                                 voidflags=5 
    6726                                                 echo "And it supports 4 but has not heard about 8." 
    6727                                         else 
    6728                                                 echo "However it supports 8 but not 4." 
    6729                                         fi 
    6730                                 fi 
    6731                         fi 
    6732                 else 
    6733                         echo "There is no support at all for void." 
    6734                         voidflags=0 
    6735                 fi 
    6736         fi 
    6737 esac 
    6738 case "$voidflags" in 
    6739 "$defvoidused") ;; 
    6740 *)      $cat >&4 <<'EOM' 
    6741   Support flag bits are: 
    6742     1: basic void declarations. 
    6743     2: arrays of pointers to functions returning void. 
    6744     4: operations between pointers to and addresses of void functions. 
    6745     8: generic void pointers. 
    6746 EOM 
    6747         dflt="$voidflags"; 
    6748         rp="Your void support flags add up to what?" 
    6749         . ./myread 
    6750         voidflags="$ans" 
    6751         ;; 
    6752 esac 
    6753 $rm -f try.* .out 
    6754  
    6755 : check for length of pointer 
    6756 echo " " 
    6757 case "$ptrsize" in 
    6758 '') 
    6759         echo "Checking to see how big your pointers are..." >&4 
    6760         if test "$voidflags" -gt 7; then 
    6761                 echo '#define VOID_PTR char *' > try.c 
    6762         else 
    6763                 echo '#define VOID_PTR void *' > try.c 
    6764         fi 
    6765         $cat >>try.c <<'EOCP' 
    6766 #include <stdio.h> 
    6767 int main() 
    6768 { 
    6769     printf("%d\n", (int)sizeof(VOID_PTR)); 
    6770     exit(0); 
    6771 } 
    6772 EOCP 
    6773         set try 
    6774         if eval $compile_ok; then 
    6775                 ptrsize=`$run ./try` 
    6776                 echo "Your pointers are $ptrsize bytes long." 
    6777         else 
    6778                 dflt='4' 
    6779                 echo "(I can't seem to compile the test program.  Guessing...)" >&4 
    6780                 rp="What is the size of a pointer (in bytes)?" 
    6781                 . ./myread 
    6782                 ptrsize="$ans" 
    6783         fi 
    6784         ;; 
    6785 esac 
    6786 $rm -f try.c try 
    6787 case "$use64bitall" in 
    6788 "$define"|true|[yY]*) 
    6789         case "$ptrsize" in 
    6790         4)      cat <<EOM >&4 
    6791  
    6792 *** You have chosen a maximally 64-bit build, but your pointers 
    6793 *** are only 4 bytes wide, disabling maximal 64-bitness. 
    6794  
    6795 EOM 
    6796                 use64bitall="$undef" 
    6797                 case "$use64bitint" in 
    6798                 "$define"|true|[yY]*) ;; 
    6799                 *)      cat <<EOM >&4 
    6800  
    6801 *** Downgrading from maximal 64-bitness to using 64-bit integers. 
    6802  
    6803 EOM 
    6804                         use64bitint="$define" 
    6805                         ;; 
    6806                 esac 
    6807                 ;; 
    6808         esac 
    6809         ;; 
    6810 esac 
    6811  
    6812  
    6813 : determine which malloc to compile in 
    6814 echo " " 
    6815 case "$usemymalloc" in 
    6816 [yY]*|true|$define)     dflt='y' ;; 
    6817 [nN]*|false|$undef)     dflt='n' ;; 
    6818 *)      case "$ptrsize" in 
    6819         4) dflt='y' ;; 
    6820         *) dflt='n' ;; 
    6821         esac 
    6822         ;; 
    6823 esac 
    6824 rp="Do you wish to attempt to use the malloc that comes with $package?" 
    6825 . ./myread 
    6826 usemymalloc="$ans" 
    6827 case "$ans" in 
    6828 y*|true) 
    6829         usemymalloc='y' 
    6830         mallocsrc='malloc.c' 
    6831         mallocobj="malloc$_o" 
    6832         d_mymalloc="$define" 
    6833         case "$libs" in 
    6834         *-lmalloc*) 
    6835                 : Remove malloc from list of libraries to use 
    6836                 echo "Removing unneeded -lmalloc from library list" >&4 
    6837                 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'` 
    6838                 shift 
    6839                 libs="$*" 
    6840                 echo "libs = $libs" >&4 
    6841                 ;; 
    6842         esac 
    6843         ;; 
    6844 *) 
    6845         usemymalloc='n' 
    6846         mallocsrc='' 
    6847         mallocobj='' 
    6848         d_mymalloc="$undef" 
    6849         ;; 
    6850 esac 
    6851  
    6852 : compute the return types of malloc and free 
    6853 echo " " 
    6854 $cat >malloc.c <<END 
    6855 #$i_malloc I_MALLOC 
    6856 #$i_stdlib I_STDLIB