This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove Configure code that supported the old-style nested layout for ext/
[perl5.git] / Configure
index 6823cb7..dbccc28 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -14,7 +14,7 @@
 # Note: this Configure script was generated automatically. Rather than
 # working with this copy of Configure, you may wish to get metaconfig.
 # The dist package (which contains metaconfig) is available via SVN:
-#     svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
+#     svn co https://svn.code.sf.net/p/dist/code/trunk/dist
 #
 # Though this script was generated by metaconfig from metaunits, it is
 # OK to send patches against Configure itself. It's up to the Configure
@@ -28,7 +28,7 @@
 # See Porting/pumpkin.pod for more information on metaconfig.
 #
 
-# Generated on Fri Feb 15 14:51:06 CET 2013 [metaconfig 3.5 PL0]
+# Generated on Mon May 27 09:27:16 CEST 2013 [metaconfig 3.5 PL0]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -99,7 +99,7 @@ if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then
                is_os2=yes
        elif test -n "$DJGPP"; then
                case "X${MACHTYPE:-nonesuchmach}" in
-               *cygwin) ;;
+               *cygwin|*msys) ;;
                *) p_=\; ;;
                esac
        fi
@@ -851,6 +851,7 @@ ld_can_script=''
 lddlflags=''
 usedl=''
 doublesize=''
+bootstrap_charset=''
 ebcdic=''
 fflushNULL=''
 fflushall=''
@@ -1424,10 +1425,10 @@ esac
 
 case "$sh" in
 '')    cat >&2 <<EOM
-$me:  Fatal Error:  I can't find a Bourne Shell anywhere.  
+$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 (Perl Maintainers) at perlbug@perl.org and 
+Please contact me (Perl Maintainers) at perlbug@perl.org and
 we'll try to straighten this all out.
 EOM
        exit 1
@@ -2712,7 +2713,7 @@ case "$lns" in
                                ;;
                        *)      issymlink='' ;;
                        esac
-               fi              
+               fi
        fi
        if $test "X$issymlink" = X; then
                if $test -L sym 2>/dev/null; then
@@ -3102,7 +3103,7 @@ case "$config_sh" in
 myuname=`$uname -a 2>/dev/null`
 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
 # Downcase everything to avoid ambiguity.
-# Remove slashes and single quotes so we can use parts of this in 
+# Remove slashes and single quotes so we can use parts of this in
 # directory and file names.
 # Remove newlines so myuname is sane to use elsewhere.
 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
@@ -3992,7 +3993,7 @@ else
 fi
 
 : determine installation prefix for where package is to be installed.
-if $afs; then 
+if $afs; then
 $cat <<EOM
 
 Since you are running AFS, I need to distinguish the directory in which
@@ -5262,10 +5263,10 @@ case "$ldflags" in
 esac
 # See note above about -fstack-protector
 case "$ccflags" in
-*-fstack-protector*) 
+*-fstack-protector*)
        case "$dflt" in
        *-fstack-protector*) ;; # Don't add it again
-       *) dflt="$dflt -fstack-protector" ;; 
+       *) dflt="$dflt -fstack-protector" ;;
        esac
        ;;
 esac
@@ -6023,7 +6024,7 @@ rp='What is your architecture name'
 . ./myread
 archname="$ans"
 
-: optionally add api version to the architecture for versioned archlibs
+: optionally add API version to the architecture for versioned archlibs
 case "$useversionedarchname" in
 $define|true|[yY]*) dflt='y';;
 *)                  dflt='n';;
@@ -6947,7 +6948,7 @@ case "$ans" in
 [yY]*) fn=d~+
        rp='Installation prefix to use for vendor-supplied add-ons?'
        case "$vendorprefix" in
-       '') dflt='' ;;
+       '') dflt="$prefix" ;;
        *)  dflt=$vendorprefix ;;
        esac
        . ./getfile
@@ -7039,9 +7040,9 @@ $cat <<EOM
 
 Lastly, you can have perl look in other directories for extensions and
 modules in addition to those already specified.
-These directories will be searched after 
-       $sitearch 
-       $sitelib 
+These directories will be searched after
+       $sitearch
+       $sitelib
 EOM
 test X"$vendorlib" != "X" && echo '    ' $vendorlib
 test X"$vendorarch" != "X" && echo '   ' $vendorarch
@@ -7059,7 +7060,7 @@ EOM
 rp='Colon-separated list of additional directories for perl to search?'
 . ./myread
 case "$ans" in
-' '|''|none)   otherlibdirs=' ' ;;     
+' '|''|none)   otherlibdirs=' ' ;;
 *)     otherlibdirs="$ans" ;;
 esac
 case "$otherlibdirs" in
@@ -7396,11 +7397,11 @@ case "$usenm" in
                ;;
        esac
        case "$dflt" in
-       '') 
+       '')
                if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
                        echo " "
                        echo "Whoops!  This is an AIX system without /lib/syscalls.exp!" >&4
-                       echo "'nm' won't be sufficient on this sytem." >&4
+                       echo "'nm' won't be sufficient on this system." >&4
                        dflt=n
                fi
                ;;
@@ -8047,7 +8048,21 @@ EOM
                              ;;
                        linux|irix*|gnu*)  dflt="-shared $optimize" ;;
                        next)  dflt='none' ;;
-                       solaris) dflt='-G' ;;
+                       solaris) # See [perl #66604].
+                               # On Solaris 11, gcc -m64 on amd64 
+                               # appears not to understand -G.  gcc versions at
+                               # least as old as 3.4.3 support -shared, so just
+                               # use that with Solaris 11 and later, but keep
+                               # the old behavior for older Solaris versions.
+                               case "$gccversion" in
+                                       '') dflt='-G' ;;
+                                       *)      case "$osvers" in
+                                                       2.?|2.10) dflt='-G' ;;
+                                                       *) dflt='-shared' ;;
+                                               esac
+                                               ;;
+                               esac
+                               ;;
                        sunos) dflt='-assert nodefinitions' ;;
                        svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
                *)     dflt='none' ;;
@@ -8383,7 +8398,7 @@ esac
 : determine where manual pages are on this system
 echo " "
 case "$sysman" in
-'') 
+'')
        syspath='/usr/share/man/man1 /usr/man/man1'
        syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
        syspath="$syspath /usr/man/u_man/man1"
@@ -8867,7 +8882,13 @@ EOM
 cont=x
 while test "$cont"; do
        case "$MAILDOMAIN" in
-       '') maildomain="$myhostname$mydomain";;
+       '')
+               if $test -s /etc/mailname; then
+                       maildomain=`$cat /etc/mailname`
+               else
+                       maildomain="$myhostname$mydomain"
+               fi
+               ;;
        *)  maildomain="$MAILDOMAIN";;
        esac
        case "$cf_email" in
@@ -10830,7 +10851,7 @@ else
        valstd="$undef"
 fi
 
-: see if varags is available
+: see if varargs is available
 echo " "
 if $test `./findhdr varargs.h`; then
        echo "<varargs.h> found." >&4
@@ -10882,7 +10903,7 @@ chmod +x varargs
 : now check which varargs header should be included
 echo " "
 i_varhdr=''
-val=""
+val=''
 case "$valstd" in
 "$define")
        if `./varargs I_STDARG`; then
@@ -11964,7 +11985,7 @@ $cat >dirfd.c <<EOM
 #endif
 #endif
 #endif
-#endif 
+#endif
 int main() {
        DIR *dirp = opendir(".");
        if (dirfd(dirp) >= 0)
@@ -12467,7 +12488,7 @@ $define)
        $rm -f $$.h
        ;;
 *)
-       val="$undef"; 
+       val="$undef";
        set d_pwquota; eval $setvar
        set d_pwage; eval $setvar
        set d_pwchange; eval $setvar
@@ -17638,7 +17659,7 @@ EOP
        if eval $compile_ok; then
                val="$define"
        else
-               echo "But you don't seem to have a useable struct sigaction." >&4
+               echo "But you don't seem to have a usable struct sigaction." >&4
                val="$undef"
        fi
 else
@@ -18073,7 +18094,7 @@ EOCP
 # Respect a hint (or previous) value for perl_static_inline, if there is one.
 case "$perl_static_inline" in
 '')    # Check the various possibilities, and break out on success.
-       # For gcc, prefer __inline__, which will still permit 
+       # For gcc, prefer __inline__, which will still permit
        # cflags.SH to add in -ansi.
        case "$gccversion" in
                '') xxx="inline __inline__ __inline _inline";;
@@ -18203,11 +18224,11 @@ if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
                echo 'strerror() found.' >&4
                d_strerror="$define"
                d_strerrm='strerror(e)'
-               if set sys_errlist val -a d_syserrlst; eval $csym; $val; then   
-                       echo "(You also have sys_errlist[], so we could roll our own strerror.)" 
+               if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+                       echo "(You also have sys_errlist[], so we could roll our own strerror.)"
                        d_syserrlst="$define"
                else
-                       echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
+                       echo "(Since you don't have sys_errlist[], strerror() is welcome.)"
                        d_syserrlst="$undef"
                fi
     elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
@@ -18215,7 +18236,7 @@ if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
                echo 'strerror() found in string header.' >&4
                d_strerror="$define"
                d_strerrm='strerror(e)'
-               if set sys_errlist val -a d_syserrlst; eval $csym; $val; then   
+               if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
                        echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
                                d_syserrlst="$define"
                else
@@ -19130,7 +19151,40 @@ esac
 : set the base revision
 baserev=5.0
 
-: length of character in bytes. Is always 1, otherwise it isnt C
+: Determine if this is an EBCDIC system
+echo " "
+echo "Determining whether or not we are on an EBCDIC system..." >&4
+$cat >try.c <<'EOM'
+int main()
+{
+  if ('M'==0xd4) return 0;
+  return 1;
+}
+EOM
+
+case "$BOOTSTRAP_CHARSET" in
+    Y|y|define) bootstrap_charset=$define      ;;
+    *)         bootstrap_charset=$undef        ;;
+esac
+
+val=$undef
+set try
+if eval $compile_ok; then
+       if $run ./try; then
+               echo "You seem to speak EBCDIC." >&4
+               val="$define"
+       else
+               echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
+       fi
+else
+       echo "I'm unable to compile the test program." >&4
+       echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
+fi
+$rm_try
+set ebcdic
+eval $setvar
+
+: length of character in bytes. Is always 1, otherwise it is not C
 : This used to be a test using sizeof
 charsize=1
 
@@ -19410,7 +19464,7 @@ case "$randfunc" in
                echo "OK, found random()." >&4
        else
                dflt="rand"
-               echo "Yick, looks like I have to use rand()." >&4
+               echo "Yuck, looks like I have to use rand()." >&4
        fi
        echo " "
        ;;
@@ -19527,34 +19581,6 @@ EOCP
        esac
 done
 
-: Determine if this is an EBCDIC system
-echo " "
-echo "Determining whether or not we are on an EBCDIC system..." >&4
-$cat >try.c <<'EOM'
-int main()
-{
-  if ('M'==0xd4) return 0;
-  return 1;
-}
-EOM
-
-val=$undef
-set try
-if eval $compile_ok; then
-       if $run ./try; then
-               echo "You seem to speak EBCDIC." >&4
-               val="$define"
-       else
-               echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
-       fi
-else
-       echo "I'm unable to compile the test program." >&4
-       echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
-fi
-$rm_try
-set ebcdic
-eval $setvar
-
 : Check how to flush
 echo " "
 $cat >&4 <<EOM
@@ -19658,7 +19684,7 @@ if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
        ;;
     esac
 fi
-: check for fflush NULL behaviour
+: check for fflush NULL behavior
 case "$fflushNULL" in
 '')    set try -DTRY_FFLUSH_NULL $output
        if eval $compile; then
@@ -20356,6 +20382,7 @@ EOCP
        $rm_try
        ;;
 *)     echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
+       need_va_copy="$undef"
        ;;
 esac
 
@@ -21810,7 +21837,7 @@ case "$yacc" in
        *-y*) ;;
        *)
                yacc="$yacc -y"
-               echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
+               echo "(Adding -y option to bison to get yacc-compatible behavior.)"
                ;;
        esac
        ;;
@@ -22045,7 +22072,7 @@ EOSH
 chmod +x Cppsym.try
 $eunicefix Cppsym.try
 ./Cppsym < Cppsym.know | $sort | $uniq > Cppsym.true
-: Add in any linux cpp "predefined macros":
+: Add in any Linux cpp "predefined macros":
 case "$osname::$gccversion" in
   *linux*::*.*|*gnukfreebsd*::*.*|gnu::*.*)
     tHdrH=_tmpHdr
@@ -22345,51 +22372,34 @@ find_extensions='
            DynaLoader|dynaload) ;;
            *)
            this_ext=`echo $xxx | $sed -e s/-/\\\//g`;
-           leaf=`echo $xxx | $sed -e s/.*-//`;
-           if $test -d File; then
-               if $test -f $xxx/$leaf.xs -o -f $xxx/$leaf.c; then
-                   known_extensions="$known_extensions $1$this_ext";
-               elif $test -f $xxx/Makefile.PL; then
-                   nonxs_extensions="$nonxs_extensions $1$this_ext";
-               else
-                   if $test -d $xxx -a $# -lt 10; then
-                       set $1$xxx/ $*;
-                       cd "$xxx";
-                       eval $find_extensions;
-                       cd ..;
-                       shift;
-                   fi;
-               fi;
-           else
-               echo " $known_extensions $nonxs_extensions" > $$.tmp;
-               if $contains " $this_ext " $$.tmp; then
-                   echo >&4;
-                   echo "Duplicate directories detected for extension $xxx" >&4;
-                   echo "Configure cannot correctly recover from this - shall I abort?" >&4;
-                   case "$knowitall" in
-                   "") dflt=y;;
-                   *) dflt=n;;
-                   esac;
-                   . ../UU/myread;
-                   case "$ans" in
-                   n*|N*) ;;
-                   *) echo >&4;
-                      echo "Ok.  Stopping Configure." >&4;
-                      echo "Please remove the duplicate directory (eg using git clean) and then re-run Configure" >&4;
-                       exit 1;;
-                   esac;
-                   echo "Ok.  You will need to correct config.sh before running make." >&4;
-               fi;
-               $ls -1 $xxx > $$.tmp;
-               if   $contains "\.xs$" $$.tmp > /dev/null 2>&1; then
-                   known_extensions="$known_extensions $this_ext";
-               elif $contains "\.c$"  $$.tmp > /dev/null 2>&1; then
-                   known_extensions="$known_extensions $this_ext";
-               elif $test -d $xxx; then
-                   nonxs_extensions="$nonxs_extensions $this_ext";
-               fi;
-               $rm -f $$.tmp;
-           fi
+           echo " $known_extensions $nonxs_extensions" > $$.tmp;
+           if $contains " $this_ext " $$.tmp; then
+               echo >&4;
+               echo "Duplicate directories detected for extension $xxx" >&4;
+               echo "Configure cannot correctly recover from this - shall I abort?" >&4;
+               case "$knowitall" in
+               "") dflt=y;;
+               *) dflt=n;;
+               esac;
+               . ../UU/myread;
+               case "$ans" in
+               n*|N*) ;;
+               *) echo >&4;
+                   echo "Ok.  Stopping Configure." >&4;
+                   echo "Please remove the duplicate directory (e.g. using git clean) and then re-run Configure" >&4;
+                   exit 1;;
+               esac;
+               echo "Ok.  You will need to correct config.sh before running make." >&4;
+           fi;
+           $ls -1 $xxx > $$.tmp;
+           if   $contains "\.xs$" $$.tmp > /dev/null 2>&1; then
+               known_extensions="$known_extensions $this_ext";
+           elif $contains "\.c$"  $$.tmp > /dev/null 2>&1; then
+               known_extensions="$known_extensions $this_ext";
+           elif $test -d $xxx; then
+               nonxs_extensions="$nonxs_extensions $this_ext";
+           fi;
+           $rm -f $$.tmp;
            ;;
        esac;
     done'
@@ -22406,16 +22416,6 @@ cd "$rsrc/ext"
 set X
 shift
 eval $find_extensions
-if $test -d File-Glob; then
-    : All ext/ flattened
-else
-    # Special case:  Add in modules that nest beyond the first level.
-    # Currently threads/shared and Hash/Util/FieldHash, since they are
-    # not picked up by the recursive find above (and adding in general
-    # recursive finding breaks SDBM_File/sdbm).
-    # A.D. 20011025 (SDBM), ajgough 20071008 (FieldHash)
-    known_extensions="$known_extensions threads/shared Hash/Util/FieldHash"
-fi
 set X $known_extensions
 shift
 known_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
@@ -22764,7 +22764,7 @@ sunos*X4*)
     ;;
 *) case "$usedl" in
     $define|true|[yY]*)
-           set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'` 
+           set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
            shift
            perllibs="$*"
            ;;
@@ -22889,6 +22889,7 @@ bin='$bin'
 bin_ELF='$bin_ELF'
 binexp='$binexp'
 bison='$bison'
+bootstrap_charset='$bootstrap_charset'
 byacc='$byacc'
 byteorder='$byteorder'
 c='$c'