This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re-generation after backports of
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Mon, 22 May 2006 17:37:33 +0000 (17:37 +0000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Mon, 22 May 2006 17:37:33 +0000 (17:37 +0000)
#28188 Only ask about MAD for 5.9.0 and greater. Otherwise silently
#28189 A Configure probe for C99 variadic macros, based on code from
#28202 Take advantage of the bug that binexp ignores the Configure
#28263 Oops. Fix bad #! lines when not using userelocatableinc
One small cleanup fix added. Some small re-ordering. Some whitespace.

p4raw-id: //depot/perl@28283

Configure
Porting/Glossary
Porting/config.sh
config_h.SH

index 831ef12..8fee5eb 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -26,7 +26,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Mon Apr 17 14:14:39 CEST 2006 [metaconfig 3.0 PL70]
+# Generated on Mon May 22 19:21:39 CEST 2006 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -359,6 +359,7 @@ d_bcopy=''
 d_builtin_choose_expr=''
 d_builtin_expect=''
 d_bzero=''
+d_c99_variadic_macros=''
 d_casti32=''
 castflags=''
 d_castneg=''
@@ -383,7 +384,6 @@ d_ctermid_r=''
 ctime_r_proto=''
 d_ctime_r=''
 d_cuserid=''
-d_c99_variadic_macros=''
 d_dbl_dig=''
 d_dbminitproto=''
 d_difftime=''
@@ -3385,8 +3385,13 @@ EOM
        $cat <<EOM
 
 You may give one or more space-separated answers, or "none" if appropriate.
-A well-behaved OS will have no hints, so answering "none" or just "Policy"
-is a good thing.  DO NOT give a wrong version or a wrong OS.
+If you have a handcrafted Policy.sh file or a Policy.sh file generated by a
+previous run of Configure, you may specify it as well as or instead of
+OS-specific hints.  If hints are provided for your OS, you should use them:
+although Perl can probably be built without hints on many platforms, using
+hints often improve performance and may enable features that Configure can't
+set up on its own. If there are no hints that match your OS, specify "none";
+DO NOT give a wrong version or a wrong OS.
 
 EOM
 
@@ -6047,7 +6052,7 @@ fi
 prefixvar=bin
 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
 : XXX If this is fixed, also fix the "start perl" hunk below, which relies on
-: this via initialinstalllocation
+:     this via initialinstalllocation
 . ./setprefixvar
 
 case "$userelocatableinc" in
@@ -8570,8 +8575,8 @@ esac
 
 : figure out how to guarantee perl startup
 : XXX Note that this currently takes advantage of the bug that binexp ignores
-: the Configure -Dinstallprefix setting, which in turn means that under
-: relocatable @INC, initialinstalllocation is what binexp started as.
+:     the Configure -Dinstallprefix setting, which in turn means that under
+:     relocatable @INC, initialinstalllocation is what binexp started as.
 case "$startperl" in
 '')
        case "$sharpbang" in
@@ -8581,12 +8586,12 @@ case "$startperl" in
 I can use the #! construct to start perl on your system. This will
 make startup of perl scripts faster, but may cause problems if you
 want to share those scripts and perl is not in a standard place
-($initialinstalllocation/perl) on all your platforms. The alternative is to force
-a shell by starting the script with a single ':' character.
+($initialinstalllocation/perl) on all your platforms. The alternative
+is to force a shell by starting the script with a single ':' character.
 
 EOH
                case "$versiononly" in
-               "$define")      dflt="$initialinstalllocation/perl$version";;  
+               "$define")      dflt="$initialinstalllocation/perl$version";;
                *)              dflt="$initialinstalllocation/perl";;
                esac
                rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
@@ -10301,6 +10306,145 @@ $rm -f try.* try core core.try.*
 set bzero d_bzero
 eval $inlibc
 
+: see if stdarg is available
+echo " "
+if $test `./findhdr stdarg.h`; then
+       echo "<stdarg.h> found." >&4
+       valstd="$define"
+else
+       echo "<stdarg.h> NOT found." >&4
+       valstd="$undef"
+fi
+
+: see if varags is available
+echo " "
+if $test `./findhdr varargs.h`; then
+       echo "<varargs.h> found." >&4
+else
+       echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
+fi
+
+: set up the varargs testing programs
+$cat > varargs.c <<EOP
+#ifdef I_STDARG
+#include <stdarg.h>
+#endif
+#ifdef I_VARARGS
+#include <varargs.h>
+#endif
+
+#ifdef I_STDARG
+int f(char *p, ...)
+#else
+int f(va_alist)
+va_dcl
+#endif
+{
+       va_list ap;
+#ifndef I_STDARG
+       char *p;
+#endif
+#ifdef I_STDARG
+       va_start(ap,p);
+#else
+       va_start(ap);
+       p = va_arg(ap, char *);
+#endif
+       va_end(ap);
+}
+EOP
+$cat > varargs <<EOP
+$startsh
+if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
+       echo "true"
+else
+       echo "false"
+fi
+$rm -f varargs$_o
+EOP
+chmod +x varargs
+
+: now check which varargs header should be included
+echo " "
+i_varhdr=''
+case "$valstd" in
+"$define")
+       if `./varargs I_STDARG`; then
+               val='stdarg.h'
+       elif `./varargs I_VARARGS`; then
+               val='varargs.h'
+       fi
+       ;;
+*)
+       if `./varargs I_VARARGS`; then
+               val='varargs.h'
+       fi
+       ;;
+esac
+case "$val" in
+'')
+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
+       ;;
+*) 
+       set i_varhdr
+       eval $setvar
+       case "$i_varhdr" in
+       stdarg.h)
+               val="$define"; set i_stdarg; eval $setvar
+               val="$undef"; set i_varargs; eval $setvar
+               ;;
+       varargs.h)
+               val="$undef"; set i_stdarg; eval $setvar
+               val="$define"; set i_varargs; eval $setvar
+               ;;
+       esac
+       echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
+esac
+$rm -f varargs*
+
+: see if the Compiler supports C99 variadic macros
+case "$i_stdarg$i_stdlib" in
+    "$define$define")
+    echo "You have <stdarg.h> and <stdlib.h>, so checking for C99 variadic macros." >&4
+    $cat >try.c <<EOCP
+#include <stdio.h>
+#include <stdarg.h>
+
+#define foo(buffer, format, ...) sprintf(buffer, format, __VA_ARGS__)
+
+int main() {
+  char buf[20];
+  foo(buf, "%d %g %.*s", 123, 456.0, (int)3, "789fail");
+  puts(buf);
+  return 0;
+}
+EOCP
+    set try
+    if eval $compile && $run ./try 2>&1 >/dev/null; then
+       case "`$run ./try`" in
+           "123 456 789")
+           echo "You have C99 variadic macros." >&4
+           d_c99_variadic_macros="$define"
+           ;;
+           *)
+           echo "You don't have functional C99 variadic macros." >&4
+           d_c99_variadic_macros="$undef"
+           ;;
+       esac
+    else
+       echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4
+       d_c99_variadic_macros="$undef"
+    fi
+    $rm -f try.* try core core.try.*
+    ;;
+    *)
+    echo "You don't have <stdarg.h> and <stdlib.h>, so not checking for C99 variadic macros." >&4
+    d_c99_variadic_macros="$undef"
+    ;;
+esac
+
 : see if signal is declared as pointer to function returning int or void
 echo " "
 xxx=`./findhdr signal.h`
@@ -19008,104 +19152,6 @@ rp="What is the type used for file modes for system calls (e.g. fchmod())?"
 set mode_t modetype int stdio.h sys/types.h
 eval $typedef_ask
 
-: see if stdarg is available
-echo " "
-if $test `./findhdr stdarg.h`; then
-       echo "<stdarg.h> found." >&4
-       valstd="$define"
-else
-       echo "<stdarg.h> NOT found." >&4
-       valstd="$undef"
-fi
-
-: see if varags is available
-echo " "
-if $test `./findhdr varargs.h`; then
-       echo "<varargs.h> found." >&4
-else
-       echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
-fi
-
-: set up the varargs testing programs
-$cat > varargs.c <<EOP
-#ifdef I_STDARG
-#include <stdarg.h>
-#endif
-#ifdef I_VARARGS
-#include <varargs.h>
-#endif
-
-#ifdef I_STDARG
-int f(char *p, ...)
-#else
-int f(va_alist)
-va_dcl
-#endif
-{
-       va_list ap;
-#ifndef I_STDARG
-       char *p;
-#endif
-#ifdef I_STDARG
-       va_start(ap,p);
-#else
-       va_start(ap);
-       p = va_arg(ap, char *);
-#endif
-       va_end(ap);
-}
-EOP
-$cat > varargs <<EOP
-$startsh
-if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
-       echo "true"
-else
-       echo "false"
-fi
-$rm -f varargs$_o
-EOP
-chmod +x varargs
-
-: now check which varargs header should be included
-echo " "
-i_varhdr=''
-case "$valstd" in
-"$define")
-       if `./varargs I_STDARG`; then
-               val='stdarg.h'
-       elif `./varargs I_VARARGS`; then
-               val='varargs.h'
-       fi
-       ;;
-*)
-       if `./varargs I_VARARGS`; then
-               val='varargs.h'
-       fi
-       ;;
-esac
-case "$val" in
-'')
-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
-       ;;
-*) 
-       set i_varhdr
-       eval $setvar
-       case "$i_varhdr" in
-       stdarg.h)
-               val="$define"; set i_stdarg; eval $setvar
-               val="$undef"; set i_varargs; eval $setvar
-               ;;
-       varargs.h)
-               val="$undef"; set i_stdarg; eval $setvar
-               val="$define"; set i_varargs; eval $setvar
-               ;;
-       esac
-       echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
-esac
-$rm -f varargs*
-
 : see if we need va_copy
 echo " "
 case "$i_stdarg" in
@@ -19170,46 +19216,6 @@ EOCP
        ;;
 esac
 
-: see if the Compiler supports C99 variadic macros 
-case "$i_stdarg$i_stdlib" in
-    "$define$define")
-    echo "You have <stdarg.h> and <stdlib.h>, so checking for C99 variadic macros." >&4
-    $cat >try.c <<EOCP
-#include <stdio.h>
-#include <stdarg.h>
-
-#define foo(buffer, format, ...) sprintf(buffer, format, __VA_ARGS__)
-
-int main() {
-  char buf[20];
-  foo(buf, "%d %g %.*s", 123, 456.0, (int)3, "789fail");
-  puts(buf);
-  return 0;
-}
-EOCP
-    set try
-    if eval $compile && $run ./try 2>&1 >/dev/null; then
-       case "`$run ./try`" in
-           "123 456 789")
-           echo "You have C99 variadic macros." >&4
-           d_c99_variadic_macros="$define"
-           ;;
-           *)
-           echo "You don't have functional C99 variadic macros." >&4
-           d_c99_variadic_macros="$undef"
-           ;;
-       esac
-    else
-       echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4
-       d_c99_variadic_macros="$undef"
-    fi
-    ;;
-    *)
-    echo "You don't have <stdarg.h> and <stdlib.h>, so not checking for C99 variadic macros." >&4
-    d_c99_variadic_macros="$undef"
-    ;;
-esac
-
 : see what type is used for size_t
 rp="What is the type used for the length parameter for string functions?"
 set size_t sizetype 'unsigned int' stdio.h sys/types.h
@@ -21304,6 +21310,7 @@ d_bsdsetpgrp='$d_bsdsetpgrp'
 d_builtin_choose_expr='$d_builtin_choose_expr'
 d_builtin_expect='$d_builtin_expect'
 d_bzero='$d_bzero'
+d_c99_variadic_macros='$d_c99_variadic_macros'
 d_casti32='$d_casti32'
 d_castneg='$d_castneg'
 d_charvspr='$d_charvspr'
@@ -21322,7 +21329,6 @@ d_csh='$d_csh'
 d_ctermid_r='$d_ctermid_r'
 d_ctime_r='$d_ctime_r'
 d_cuserid='$d_cuserid'
-d_c99_variadic_macros='$d_c99_variadic_macros'
 d_dbl_dig='$d_dbl_dig'
 d_dbminitproto='$d_dbminitproto'
 d_difftime='$d_difftime'
index 767db1c..43723bb 100644 (file)
@@ -482,6 +482,11 @@ d_bzero (d_bzero.U):
        This variable conditionally defines the HAS_BZERO symbol if
        the bzero() routine is available to set memory to 0.
 
+d_c99_variadic_macros (d_c99_variadic.U):
+       This variable conditionally defines the HAS_C99_VARIADIC_MACROS
+       symbol, which indicates to the C program that C99 variadic macros
+       are available.
+
 d_casti32 (d_casti32.U):
        This variable conditionally defines CASTI32, which indicates
        whether the C compiler can cast large floats to 32-bit ints.
@@ -558,11 +563,6 @@ d_ctime_r (d_ctime_r.U):
        which indicates to the C program that the ctime_r()
        routine is available.
 
-d_c99_variadic_macros (d_c99_variadic_macros.U):
-       This variable conditionally defines the HAS_C99_VARIADIC_MACROS
-       symbol, which indicates to the C program that C99 variadic macros
-       are available.
-
 d_cuserid (d_cuserid.U):
        This variable conditionally defines the HAS_CUSERID symbol, which
        indicates to the C program that the cuserid() routine is available
index 2ff22ce..9cf8297 100644 (file)
@@ -126,6 +126,7 @@ d_bsdsetpgrp='undef'
 d_builtin_choose_expr='define'
 d_builtin_expect='undef'
 d_bzero='define'
+d_c99_variadic_macros='define'
 d_casti32='undef'
 d_castneg='define'
 d_charvspr='define'
index ee4c292..95b8230 100644 (file)
@@ -1198,6 +1198,11 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
 #$d_builtin_expect HAS_BUILTIN_EXPECT  /**/
 #$d_builtin_choose_expr HAS_BUILTIN_CHOOSE_EXPR        /**/
 
+/* HAS_C99_VARIADIC_MACROS:
+ *     If defined, the compiler supports C99 variadic macros.
+ */
+#$d_c99_variadic_macros        HAS_C99_VARIADIC_MACROS /**/
+
 /* CASTI32:
  *     This symbol is defined if the C compiler can cast negative
  *     or large floating point numbers to 32-bit ints.
@@ -4421,10 +4426,4 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
 #endif
 
 #endif
-
-/* HAS_C99_VARIADIC_MACROS:
- *     If defined, the compiler supports C99 variadic macros.
- */
-#$d_c99_variadic_macros        HAS_C99_VARIADIC_MACROS /**/
-
 !GROK!THIS!