This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
document that it is the operator that determines the operation
[perl5.git] / Configure
index aad2a23..f8982cf 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 Sun Aug 26 14:33:39 CEST 2012 [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
@@ -332,6 +332,7 @@ d_archlib=''
 installarchlib=''
 archname=''
 myarchname=''
+useversionedarchname=''
 d_atolf=''
 d_atoll=''
 baserev=''
@@ -850,6 +851,7 @@ ld_can_script=''
 lddlflags=''
 usedl=''
 doublesize=''
+bootstrap_charset=''
 ebcdic=''
 fflushNULL=''
 fflushall=''
@@ -1423,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
@@ -2711,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
@@ -3100,9 +3102,13 @@ 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
+# directory and file names.
+# Remove newlines so myuname is sane to use elsewhere.
 # tr '[A-Z]' '[a-z]' would not work in EBCDIC
 # because the A-Z/a-z are not consecutive.
-myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \
+myuname=`echo $myuname | $sed -e "s,['/],,g" | \
        ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
 newmyuname="$myuname"
 dflt=n
@@ -3987,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
@@ -5257,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
@@ -6017,6 +6023,32 @@ esac
 rp='What is your architecture name'
 . ./myread
 archname="$ans"
+
+: optionally add API version to the architecture for versioned archlibs
+case "$useversionedarchname" in
+$define|true|[yY]*) dflt='y';;
+*)                  dflt='n';;
+esac
+rp='Add the Perl API version to your archname?'
+. ./myread
+case "$ans" in
+y|Y)   useversionedarchname="$define" ;;
+*)      useversionedarchname="$undef" ;;
+esac
+case "$useversionedarchname" in
+$define)
+        case "$archname" in
+        *-$api_versionstring)
+                echo "...and architecture name already has -$api_versionstring" >&4
+                ;;
+        *)
+                archname="$archname-$api_versionstring"
+                echo "...setting architecture name to $archname." >&4
+                ;;
+        esac
+        ;;
+esac
+
 case "$usethreads" in
 $define)
        echo "Threads selected." >&4
@@ -6916,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
@@ -7008,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
@@ -7028,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
@@ -7365,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
                ;;
@@ -8016,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' ;;
@@ -8352,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"
@@ -8835,9 +8881,19 @@ your organization...
 EOM
 cont=x
 while test "$cont"; do
+       case "$MAILDOMAIN" in
+       '')
+               if $test -s /etc/mailname; then
+                       maildomain=`$cat /etc/mailname`
+               else
+                       maildomain="$myhostname$mydomain"
+               fi
+               ;;
+       *)  maildomain="$MAILDOMAIN";;
+       esac
        case "$cf_email" in
-       '') dflt="$cf_by@$myhostname$mydomain";;
-       *) dflt="$cf_email";;
+       '') dflt="$cf_by@$maildomain";;
+       *)  dflt="$cf_email";;
        esac
        rp='What is your e-mail address?'
        . ./myread
@@ -10795,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
@@ -10847,6 +10903,7 @@ chmod +x varargs
 : now check which varargs header should be included
 echo " "
 i_varhdr=''
+val=''
 case "$valstd" in
 "$define")
        if `./varargs I_STDARG`; then
@@ -10863,6 +10920,15 @@ case "$valstd" in
 esac
 case "$val" in
 '')
+       echo " "
+       echo "*** WHOA THERE!!! ***" >&4
+       echo "    Your C compiler \"$cc\" doesn't seem to support stdarg or varargs!" >&4
+       case "$knowitall" in
+       '')
+       echo "    I'm giving up; maybe you can try again with a different compiler?" >&4
+               exit 1
+               ;;
+       esac
 echo "I could not find the definition for va_dcl... You have problems..." >&4
        val="$undef"; set i_stdarg; eval $setvar
        val="$undef"; set i_varargs; eval $setvar
@@ -11919,7 +11985,7 @@ $cat >dirfd.c <<EOM
 #endif
 #endif
 #endif
-#endif 
+#endif
 int main() {
        DIR *dirp = opendir(".");
        if (dirfd(dirp) >= 0)
@@ -12422,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
@@ -17593,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
@@ -18028,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";;
@@ -18158,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`; \
@@ -18170,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
@@ -18708,7 +18774,7 @@ eval $setvar
 
 : Check if is a multiplatform env
 case "$osname" in
-next|rhapsody|darwin) multiarch="$define" ;;
+next|darwin) multiarch="$define" ;;
 esac
 case "$multiarch" in
 ''|[nN]*) multiarch="$undef" ;;
@@ -19085,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
 
@@ -19365,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 " "
        ;;
@@ -19429,9 +19528,9 @@ echo "Checking to see how many bits your $randfunc() function produces..." >&4
 #endif
 int main()
 {
-       register int i;
-       register unsigned long tmp;
-       register unsigned long max = 0L;
+       int i;
+       unsigned long tmp;
+       unsigned long max = 0L;
 
        for (i = 1000; i; i--) {
                tmp = (unsigned long) $randfunc();
@@ -19482,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
@@ -19613,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
@@ -20311,6 +20382,7 @@ EOCP
        $rm_try
        ;;
 *)     echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
+       need_va_copy="$undef"
        ;;
 esac
 
@@ -21765,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
        ;;
@@ -22000,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
@@ -22330,7 +22402,7 @@ find_extensions='
                    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;
+                      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;
@@ -22719,7 +22791,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="$*"
            ;;
@@ -22844,6 +22916,7 @@ bin='$bin'
 bin_ELF='$bin_ELF'
 binexp='$binexp'
 bison='$bison'
+bootstrap_charset='$bootstrap_charset'
 byacc='$byacc'
 byteorder='$byteorder'
 c='$c'
@@ -23855,6 +23928,7 @@ usesitecustomize='$usesitecustomize'
 usesocks='$usesocks'
 usethreads='$usethreads'
 usevendorprefix='$usevendorprefix'
+useversionedarchname='$useversionedarchname'
 usevfork='$usevfork'
 usrinc='$usrinc'
 uuname='$uuname'