This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Backport #28188: Only ask about MAD for 5.9.0 and greater.
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Mon, 22 May 2006 15:54:16 +0000 (15:54 +0000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Mon, 22 May 2006 15:54:16 +0000 (15:54 +0000)
Otherwise silently select 'n'

p4raw-id: //depot/metaconfig@28278

U/perl/mad.U

index 3a5b55e..d95db0b 100644 (file)
@@ -7,7 +7,7 @@
 ?RCS:
 ?RCS: $Log: mad.U,v $
 ?RCS:
-?MAKE:mad madlyh madlyobj madlysrc: Myread Setvar _o
+?MAKE:mad madlyh madlyobj madlysrc: Myread Setvar _o test patchlevel
 ?MAKE: -pick add $@ %<
 ?S:mad:
 ?S:    This variable indicates that the Misc Attribute Definition code is to
 ?C:.
 ?H:#$mad       PERL_MAD                /**/
 ?H:.
+?T:ans
 ?LINT:set mad madlyh madlyobj madlysrc
 
-case "$mad" in
-$define|true|[yY]*)    dflt='y' ;;
-*)                     dflt='n' ;;
-esac
-cat <<EOM
+if $test $patchlevel -lt 9; then
+: MAD is not available in 5.8.x or earlier.
+    ans=n;
+else
+    case "$mad" in
+    $define|true|[yY]*)        dflt='y' ;;
+    *)                 dflt='n' ;;
+    esac
+    cat <<EOM
 
 Would you like to build with Misc Attribute Decoration? This is development
 work leading to a Perl 5 to Perl 6 convertor, which imposes a space and speed
@@ -45,8 +50,9 @@ overhead on the interpreter.
 
 If this doesn't make any sense to you, just accept the default '$dflt'.
 EOM
-rp='Build Perl with MAD?'
-. ./myread
+    rp='Build Perl with MAD?'
+    . ./myread
+fi
 case "$ans" in
 y|Y)   val="$define"
        madlyh='madly.h madly.act madly.tab'