Hello,
what would you say about this simplification of _AC_CACHE_DUMP?
Stepan
2006-03-20 Stepan Kasal <[EMAIL PROTECTED]>
* lib/autoconf/general.m4 (_AC_CACHE_DUMP): Grep for `^ac_space'
so that the test is not fooled by variables containing string
`ac_space= '. If there is no substitution needed, do not call sed.
Index: ./lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.891
diff -u -r1.891 general.m4
--- ./lib/autoconf/general.m4 16 Mar 2006 13:33:18 -0000 1.891
+++ ./lib/autoconf/general.m4 20 Mar 2006 22:04:28 -0000
@@ -1812,21 +1812,19 @@
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
+ case `(ac_space=' '; set | grep ^ac_space) 2>&1` in
+ ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ (set) 2>&1 | sed -n \
["s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- ["s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
- ;;
- esac;
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ (set) 2>&1
+ ;;
+ esac;
}dnl
])# _AC_CACHE_DUMP