X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=5b2a376a2557ca555d0cc723e7fee83f290157c9;hb=3c321fdc92fa7fcff30f2f06cb61271e1d020eaa;hp=dc24cf7d034876dbecd03e35e2a9406cfc22c509;hpb=41992daf2b83ea67bb21b44d2a01c4ec8bb550ce;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index dc24cf7..5b2a376 100755 --- a/Configure +++ b/Configure @@ -85,6 +85,9 @@ done PATH=.$p_$PATH export PATH +: This should not matter in a script, but apparently it does sometimes +unset CDPATH + : Sanity checks if test ! -t 0; then echo "Say 'sh $me', not 'sh <$me'" @@ -304,6 +307,7 @@ d_ftime='' d_gettimeod='' d_Gconvert='' d_getgrps='' +d_setgrps='' d_gethent='' aphostname='' d_gethname='' @@ -793,7 +797,7 @@ case "$sh" in '') cat <&2 $me: Fatal Error: I can't find a Bourne Shell anywhere. Usually it's in /bin/sh. How did you even get this far? -Please contact me (Chip Salzenberg) at chip@atlantic.net and +Please contact me (Chip Salzenberg) at chip@perl.com and we'll try to straigten this all out. EOM exit 1 @@ -1165,7 +1169,7 @@ THIS PACKAGE SEEMS TO BE INCOMPLETE. You have the option of continuing the configuration process, despite the distinct possibility that your kit is damaged, by typing 'y'es. If you do, don't blame me if something goes wrong. I advise you to type 'n'o -and contact the author (chip@atlantic.net). +and contact the author (chip@perl.com). EOM echo $n "Continue? [n] $c" >&4 @@ -1366,7 +1370,7 @@ Much effort has been expended to ensure that this shell script will run on any Unix system. If despite that it blows up on yours, your best bet is to edit Configure and run it again. If you can't run Configure for some reason, you'll have to generate a config.sh file by hand. Whatever problems you -have, let me (chip@atlantic.net) know how I blew it. +have, let me (chip@perl.com) know how I blew it. This installation script affects things in two ways: @@ -1656,7 +1660,7 @@ EOM cd hints; ls -C *.sh | $sed 's/\.sh/ /g' >&4 dflt='' : Half the following guesses are probably wrong... If you have better - : tests or hints, please send them to chip@atlantic.net + : tests or hints, please send them to chip@perl.com : The metaconfig authors would also appreciate a copy... $test -f /irix && osname=irix $test -f /xenix && osname=sco_xenix @@ -3557,7 +3561,7 @@ $rm -f testcpp.c testcpp.out : determine optimize, if desired, or use for debug flag also case "$optimize" in -' ') dflt='none';; +' '|$undef) dflt='none';; '') dflt='-O';; *) dflt="$optimize";; esac @@ -3899,7 +3903,7 @@ case "$nm_opt" in nm_opt='-p' # Solaris (and SunOS?) elif $test -f /dgux; then nm_opt='-p' # DG-UX - elif $test -x /lib64/rld; then + elif $test -f /lib64/rld; then nm_opt='-p' # 64-bit Irix else nm_opt='' @@ -4412,12 +4416,19 @@ EOM '') case "$osname" in hpux) dflt='+z' ;; next) dflt='none' ;; - solaris|svr4*|esix*) dflt='-Kpic' ;; - irix*) dflt='-KPIC' ;; + svr4*|esix*) dflt='-Kpic' ;; + irix*) dflt='-KPIC' ;; + solaris) case "$ccflags" in + *-DDEBUGGING*) dflt='-KPIC' ;; + *) dflt='-Kpic' ;; + esac ;; sunos) dflt='-pic' ;; *) dflt='none' ;; esac ;; - *) dflt='-fpic' ;; + *) case "$osname/$ccflags" in + solaris/*-DDEBUGGING*) dflt='-fPIC' ;; + *) dflt='-fpic' ;; + esac ;; esac ;; *) dflt="$cccdlflags" ;; esac @@ -4555,7 +4566,7 @@ $undef) ;; *) case "$useshrplib" in '') case "$osname" in - svr4|dgux|dynixptx|esix|powerux) + svr4*|dgux|dynixptx|esix|powerux) dflt='yes' also='Building a shared libperl is required for dynamic loading to work on your system.' ;; @@ -4687,8 +4698,8 @@ case "$shrpdir" in *) $cat >&4 <&4 <&4 + $cat >try.c < +#include +#include +main() +{ +#ifdef DB_VERSION_MAJOR /* DB version >= 2: not yet. */ + printf("You have Berkeley DB Version %d.%d\n", + DB_VERSION_MAJOR, DB_VERSION_MINOR); + printf("Perl currently only supports up to version 1.86.\n"); + exit(2); +#else +#if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC) + exit(0); /* DB version < 2: the coast is clear. */ +#else + exit(1); /* not Berkeley DB? */ +#endif +#endif +} +EOCP + if $cc $optimize $ccflags $ldflags -o try try.c $libs && ./try; then + echo 'Looks OK. (Perl supports up to version 1.86).' >&4 + else + echo "I can't use your Berkeley DB. I'll disable it." >&4 + i_db=$undef + case " $libs " in + *"-ldb "*) + : Remove db from list of libraries to use + echo "Removing unusable -ldb from library list" >&4 + set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'` + shift + libs="$*" + echo "libs = $libs" >&4 + ;; + esac + fi + $rm -f try.* + ;; +esac + +case "$i_db" in define) : Check the return type needed for hash echo " " @@ -8251,13 +8326,15 @@ EOCP db_hashtype='u_int32_t' fi else - echo "I can't seem to compile the test program." >&4 - db_hashtype=int + : XXX Maybe we should just give up here. + db_hashtype=u_int32_t + echo "Help: I can't seem to compile the db test program." >&4 + echo "Something's wrong, but I'll assume you use $db_hashtype." >&4 fi $rm -f try.* echo "Your version of Berkeley DB uses $db_hashtype for hash." ;; -*) db_hashtype=int +*) db_hashtype=u_int32_t ;; esac @@ -8291,13 +8368,15 @@ EOCP db_prefixtype='size_t' fi else - echo "I can't seem to compile the test program." >&4 - db_prefixtype='int' + db_prefixtype='size_t' + : XXX Maybe we should just give up here. + echo "Help: I can't seem to compile the db test program." >&4 + echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4 fi $rm -f try.* echo "Your version of Berkeley DB uses $db_prefixtype for prefix." ;; -*) db_prefixtype='int' +*) db_prefixtype='size_t' ;; esac @@ -8432,20 +8511,24 @@ gidtype="$ans" set getgroups d_getgrps eval $inlibc -: Find type of 2nd arg to getgroups +: see if setgroups exists +set setgroups d_setgrps +eval $inlibc + +: Find type of 2nd arg to 'getgroups()' and 'setgroups()' echo " " -case "$d_getgrps" in -'define') +case "$d_getgrps$d_setgrps" in +*define*) case "$groupstype" in '') dflt="$gidtype" ;; *) dflt="$groupstype" ;; esac $cat <&4 $spitshell <config.sh $startsh # -# This file was produced by running the Configure script. It holds all the -# definitions figured out by Configure. Should you modify one of these values, -# do not forget to propagate your changes by running "Configure -der". You may -# instead choose to run each of the .SH files by yourself, or "Configure -S". +# This file was produced by running the Configure script. It holds all +# the definitions figured out by Configure. Should you modify any of +# these values, do not forget to propagate your changes by running +# "Configure -S"; or, equivalently, you may run each .SH file yourself. # # Configuration time: $cf_time @@ -9977,6 +10060,7 @@ d_fpathconf='$d_fpathconf' d_fsetpos='$d_fsetpos' d_ftime='$d_ftime' d_getgrps='$d_getgrps' +d_setgrps='$d_setgrps' d_gethent='$d_gethent' d_gethname='$d_gethname' d_getlogin='$d_getlogin'