This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document BEGIN, END, etc. in perlsyn
[perl5.git] / x2p / cflags.SH
index dcd97a1..255f586 100755 (executable)
@@ -1,4 +1,4 @@
-case $CONFIGDOTSH in
+case $PERL_CONFIG_SH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
@@ -34,7 +34,7 @@ $spitshell >cflags <<!GROK!THIS!
 
 : In the following dollars and backticks do not need the extra backslash.
 $spitshell >>cflags <<'!NO!SUBS!'
-case $CONFIG in
+case $PERL_CONFIG_SH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
@@ -48,6 +48,13 @@ case $CONFIG in
        ;;
 esac
 
+case "X$1" in
+Xoptimize=*|X"optimize=*")
+        eval "$1"
+        shift
+        ;;
+esac
+
 also=': '
 case $# in
 1) also='echo 1>&2 "     CCCMD = "'