[inseparable changes from match from perl-5.003_98 to perl-5.003_99]
[p5sagit/p5-mst-13.2.git] / Configure
index 88ba08d..5b2a376 100755 (executable)
--- 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'"
@@ -794,7 +797,7 @@ case "$sh" in
 '')    cat <<EOM >&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
@@ -1166,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
@@ -1367,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:
 
@@ -1657,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
@@ -4413,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
@@ -4688,8 +4698,8 @@ case "$shrpdir" in
 *)     $cat >&4 <<EOM
 WARNING:  Use of the shrpdir variable for the installation location of
 the shared $libperl is not supported.  It was never documented and
-will not work in this version.  Let me (chip@atlantic.net)
-know of any problems this may cause.
+will not work in this version.  Let me (chip@perl.com) know of any
+problems this may cause.
 
 EOM
        case "$shrpdir" in
@@ -4719,6 +4729,9 @@ xxx=''
 tmp_shrpenv=''
 if "$useshrplib"; then
     case "$osname" in 
+       aix)
+               # We'll set it in Makefile.SH...
+               ;;
        solaris|netbsd)
                xxx="-R $shrpdir"
                ;;
@@ -6087,12 +6100,15 @@ eval $setvar
 
 : get csh whereabouts
 case "$csh" in
-'csh') val="$undef" ;;
-*) val="$define" ;;
+'csh') val="$undef" ;;
+*)     val="$define" ;;
 esac
 set d_csh
 eval $setvar
-full_csh=$csh
+: Respect a hint or command line value for full_csh.
+case "$full_csh" in
+'') full_csh=$csh ;;
+esac
 
 : see if cuserid exists
 set cuserid d_cuserid
@@ -8246,13 +8262,17 @@ $define)
 #include <db.h>
 main()
 {
-#ifdef DB_VERSION_MAJOR
+#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(1);
+    exit(2);
 #else
-    exit(0);
+#if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
+    exit(0);   /* DB version < 2: the coast is clear. */
+#else
+    exit(1);   /* <db.h> not Berkeley DB? */
+#endif
 #endif
 }
 EOCP
@@ -8495,7 +8515,7 @@ eval $inlibc
 set setgroups d_setgrps
 eval $inlibc
 
-: Find type of 2nd arg to getgroups (and setgroups)
+: Find type of 2nd arg to 'getgroups()' and 'setgroups()'
 echo " "
 case "$d_getgrps$d_setgrps" in
 *define*)