[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: safe duplicate-suppression patch
From: |
Akim Demaille |
Subject: |
Re: safe duplicate-suppression patch |
Date: |
22 Oct 2002 14:18:18 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
Aaron> I have revised my duplicate-suppression patch to address the
Aaron> issues Ralf Corsepius spotted
Thanks, I'm installing the following. Please, send ChangeLogs.
Index: ChangeLog
from Aaron M. Ucko <address@hidden>
* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Avoid duplicates in
`$ac_configure_args'.
Index: NEWS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.268
diff -u -u -r1.268 NEWS
--- NEWS 22 Oct 2002 12:02:08 -0000 1.268
+++ NEWS 22 Oct 2002 12:17:05 -0000
@@ -34,6 +34,12 @@
- Parallel Builds
Simultaneous executions of config.status are possible again.
+- Precious variables accumulation
+
+ config.status could stack several copies of the precious variables
+ assignments.
+
+
* Major changes in Autoconf 2.54
Released September 13th, 2002.
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.805
diff -u -u -r1.805 general.m4
--- lib/autoconf/general.m4 17 Oct 2002 10:34:11 -0000 1.805
+++ lib/autoconf/general.m4 22 Oct 2002 12:17:06 -0000
@@ -1135,34 +1135,57 @@
# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
ac_sep=
-for ac_arg
+ac_must_keep_next=false
+for ac_pass in 1 2
do
- case $ac_arg in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n ) continue ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- continue ;;
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
dnl If you change this globbing pattern, test it on an old shell --
dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
-[ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
+ [ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
dnl If trying to remove duplicates, be sure to (i) keep the *last*
dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
dnl and (ii) not to strip long options (--prefix foo --prefix bar might
dnl give --prefix foo bar).
-dnl case " $ac_configure_args " in
-dnl *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
-dnl *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-dnl ac_sep=" " ;;
-dnl esac
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+dnl Use broad patterns, as arguments that would have already made configure
+dnl exit don't matter.
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
done
+AS_UNSET(ac_configure_args0)
+AS_UNSET(ac_configure_args1)
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
- Re: safe duplicate-suppression patch,
Akim Demaille <=