This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add -A option to Configure to diddle with variables
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 13 Sep 1999 15:35:18 +0000 (15:35 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 13 Sep 1999 15:35:18 +0000 (15:35 +0000)
after the hints file has been applied.

p4raw-id: //depot/cfgperl@4139

Configure

index 4b55fa6..c80612b 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Mon Aug 30 22:33:03 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Mon Sep 13 18:34:32 EET DST 1999 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -1101,7 +1101,7 @@ done
 : produce awk script to parse command line options
 cat >options.awk <<'EOF'
 BEGIN {
 : produce awk script to parse command line options
 cat >options.awk <<'EOF'
 BEGIN {
-       optstr = "dD:eEf:hKOrsSU:V";    # getopt-style specification
+       optstr = "A:dD:eEf:hKOrsSU:V";  # getopt-style specification
 
        len = length(optstr);
        for (i = 1; i <= len; i++) {
 
        len = length(optstr);
        for (i = 1; i <= len; i++) {
@@ -1161,7 +1161,7 @@ silent=''
 extractsh=''
 override=''
 knowitall=''
 extractsh=''
 override=''
 knowitall=''
-rm -f optdef.sh
+rm -f optdef.sh posthint.sh
 cat >optdef.sh <<EOS
 $startsh
 EOS
 cat >optdef.sh <<EOS
 $startsh
 EOS
@@ -1215,6 +1215,57 @@ while test $# -gt 0; do
                esac
                shift
                ;;
                esac
                shift
                ;;
+       -A)
+           shift
+           xxx=''
+           yyy="$1"
+           case "$yyy" in
+           *:*) xxx=`echo $yyy|sed 's!:.*!!'`
+                yyy=`echo $yyy|sed 's!^[^:]*:!!'`
+                ;;
+           esac
+           case "$xxx" in
+           '') xxx=define ;;
+           esac
+           zzz=''
+           uuu='undef'
+           case "$yyy" in
+           *=*) zzz=`echo $yyy|sed 's!^[^=]*=!!'`
+                yyy=`echo $yyy|sed 's!=.*!!'`
+                case "$yyy:$zzz" in
+                undef:) uuu='' ;;
+                esac
+                ;;
+           esac
+           case "$xxx" in
+           append)
+               echo "$yyy=\"\${$yyy}$zzz\""    >> posthint.sh
+               ;;
+           clear)
+               echo "$yyy=''"                  >> posthint.sh
+               ;;
+           define)
+               case "$zzz" in
+               '') zzz=define ;;
+               esac
+               echo "$yyy='$zzz'"              >> posthint.sh
+               ;; 
+           eval)
+               echo "eval \"$yyy=$zzz\""       >> posthint.sh
+               ;; 
+           prepend)
+               echo "$yyy=\"$zzz\${$yyy}\""    >> posthint.sh
+               ;; 
+           undef)
+               case "$zzz" in
+               '') zzz="$uuu" ;;
+               esac
+               echo "$yyy=$zzz"                >> posthint.sh
+               ;; 
+            *)  echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2
+               ;;
+           esac
+           ;;
        -V) echo "$me generated by metaconfig 3.0 PL70." >&2
                exit 0;;
        --) break;;
        -V) echo "$me generated by metaconfig 3.0 PL70." >&2
                exit 0;;
        --) break;;
@@ -1227,7 +1278,7 @@ case "$error" in
 true)
        cat >&2 <<EOM
 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
 true)
        cat >&2 <<EOM
 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
-                 [-U symbol] [-U symbol=]
+                 [-U symbol] [-U symbol=] [-A command:symbol...]
   -d : use defaults for all answers.
   -e : go on without questioning past the production of config.sh.
   -f : specify an alternate default configuration file.
   -d : use defaults for all answers.
   -e : go on without questioning past the production of config.sh.
   -f : specify an alternate default configuration file.
@@ -1244,6 +1295,16 @@ Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
   -U : undefine symbol:
          -U symbol    symbol gets the value 'undef'
          -U symbol=   symbol gets completely empty
   -U : undefine symbol:
          -U symbol    symbol gets the value 'undef'
          -U symbol=   symbol gets completely empty
+  -A : manipulate symbol after the platform specific hints have been applied:
+        -A append:symbol=value         append value to symbol
+        -A define:symbol=value         define symbol to have value
+        -A symbol=value                define symbol to have value
+         -A clear:symbol               define symbol to be ''
+        -A define:symbol               define symbol to be 'define'
+        -A eval:symbol=value           define symbol to be eval of value
+        -A prepend:symbol=value        prepend value to symbol
+        -A undef:symbol                define symbol to be 'undef'
+        -A undef:symbol=               define symbol to be ''
   -V : print version number and exit (with a zero status).
 EOM
        exit 1
   -V : print version number and exit (with a zero status).
 EOM
        exit 1
@@ -1269,6 +1330,9 @@ esac
 : run the defines and the undefines, if any, but leave the file out there...
 touch optdef.sh
 . ./optdef.sh
 : run the defines and the undefines, if any, but leave the file out there...
 touch optdef.sh
 . ./optdef.sh
+: create the posthint manipulation script and leave the file out there...
+touch posthint.sh
+. ./posthint.sh
 
 : set package name
 package=perl5
 
 : set package name
 package=perl5
@@ -2496,6 +2560,9 @@ none)  osvers='' ;;
 *) osvers="$ans" ;;
 esac
 
 *) osvers="$ans" ;;
 esac
 
+
+. ./posthint.sh
+
 : who configured the system
 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
 cf_by=`(logname) 2>/dev/null`
 : who configured the system
 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
 cf_by=`(logname) 2>/dev/null`