mirror of
git://git.sv.gnu.org/autoconf
synced 2025-02-17 14:01:27 +08:00
fix AT_CONFIG_CMP
This commit is contained in:
parent
134ab734ea
commit
91ac8c668f
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2005-06-22 Stepan Kasal <kasal@ucw.cz>
|
||||
|
||||
Fix AT_CONFIG_CMP for Solaris hosts; idea from Ralf Menzel.
|
||||
* configure.ac: Call AC_PROG_EGREP and AC_PROG_SED.
|
||||
* tests/atlocal.in: Propagate $EGREP and $SED.
|
||||
* tests/local.at (AT_CHECK_ENV): Use $EGREP, not $GREP -E.
|
||||
(AT_CONFIG_CMP): Use sed instead of grep plumbing.
|
||||
|
||||
* doc/autoconf.texi (Limitations of Usual Tools) <grep>: Mention
|
||||
that '\|' is not allowed in BREs; recommend using newline separated
|
||||
list of patterns instead of multiple -e options.
|
||||
|
||||
* lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Remove an old comment.
|
||||
|
||||
2005-06-22 Stepan Kasal <kasal@ucw.cz>
|
||||
|
||||
* lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Use AC_SUBST/2.
|
||||
|
@ -149,10 +149,12 @@ AC_SUBST([EMACS], [$TEST_EMACS])
|
||||
AM_PATH_LISPDIR
|
||||
|
||||
|
||||
## ------ ##
|
||||
## Grep. ##
|
||||
## ------ ##
|
||||
## ------------ ##
|
||||
## Grep & sed. ##
|
||||
## ------------ ##
|
||||
AC_PROG_GREP
|
||||
AC_PROG_EGREP
|
||||
AC_PROG_SED
|
||||
|
||||
|
||||
## ------------ ##
|
||||
|
@ -11955,6 +11955,18 @@ or honor only the last pattern (e.g., @acronym{IRIX} 6.5). To
|
||||
work around these problems, invoke @code{AC_PROG_GREP} and then use
|
||||
@code{$GREP}.
|
||||
|
||||
Another possible workaround for the multiple @samp{-e} problem is to
|
||||
separate the patterns by newlines, for example:
|
||||
|
||||
@example
|
||||
grep 'foo
|
||||
bar' in.txt
|
||||
@end example
|
||||
|
||||
Alternation, @samp{\|}, is common but Posix does not require its
|
||||
support in basic regular expressions, so it should be avoided in
|
||||
portable scripts. Solaris @command{grep} does not support it.
|
||||
|
||||
Don't rely on @option{-w}, as Irix 6.5.16m's @command{grep} does not
|
||||
support it.
|
||||
|
||||
|
@ -559,7 +559,6 @@ case $ac_[]_AC_LANG_ABBREV[]_v_output in
|
||||
ac_[]_AC_LANG_ABBREV[]_v_output=`echo $ac_[]_AC_LANG_ABBREV[]_v_output | sed 's/-cmdline *"[[^"]]*"/ /g'` ;;
|
||||
|
||||
# If we are using Cray Fortran then delete quotes.
|
||||
# Use "\"" instead of '"' for font-lock-mode.
|
||||
*cft90*)
|
||||
ac_[]_AC_LANG_ABBREV[]_v_output=`echo $ac_[]_AC_LANG_ABBREV[]_v_output | sed 's/"//g'` ;;
|
||||
esac
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
PERL='@PERL@'
|
||||
GREP='@GREP@'
|
||||
EGREP='@EGREP@'
|
||||
SED='@SED@'
|
||||
|
||||
# We need to know if sh -n is ok.
|
||||
ac_cv_sh_n_works='@ac_cv_sh_n_works@'
|
||||
|
@ -274,7 +274,7 @@ test -f state-ls.after && { AT_CMP([state-ls.before], [state-ls.after]) }
|
||||
if test -f state-env.before && test -f state-env.after; then
|
||||
for act_file in state-env.before state-env.after
|
||||
do
|
||||
$GREP -E -v -e 'm4_join([|],
|
||||
$EGREP -v -e 'm4_join([|],
|
||||
[^a[cs]_],
|
||||
[^((exec_)?prefix|DEFS|CONFIG_STATUS)=],
|
||||
[^(CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77)=],
|
||||
@ -316,21 +316,27 @@ fi
|
||||
# - SECONDS [zsh]
|
||||
# - '$' [zsh]
|
||||
#
|
||||
# Furthermore, it is okay for a variable initialized to empty in one run to be
|
||||
# unset in another run. This happens when, for example, cache update code tries
|
||||
# a number of values in LIBS and eventually restores LIBS to its original value.
|
||||
# If LIBS was previously unset, it will have become set and empty.
|
||||
# Furthermore, it is okay for a non-cache variable initialized to empty in one
|
||||
# run to be unset in another run. This happens when, for example, cache update
|
||||
# code tries a number of values in LIBS and eventually restores LIBS to its
|
||||
# original value. If LIBS was previously unset, it will have become set and
|
||||
# empty. (OTOH, cache variables indicate the result of the test even if they
|
||||
# are empty, so we have to be strict about them.)
|
||||
#
|
||||
# Lines that do not look like `foo=bar' are probably latter lines of
|
||||
# multiline values; trim them.
|
||||
#
|
||||
m4_define([AT_CONFIG_CMP],
|
||||
[for act_file in $1 $2
|
||||
do
|
||||
{ $GREP -v \
|
||||
'^\(ac\|as\)_
|
||||
^\(PPID\|RANDOM\|SECONDS\|'\'\\\$\''\)=
|
||||
^[[^=]]*=$' $act_file
|
||||
$GREP ^ac_cv $act_file ; } |
|
||||
# Lines that do not look like `foo=bar' are probably latter lines of
|
||||
# multiline values; trim them.
|
||||
$GREP '^m4_defn([m4_re_word])=' >at_config_vars-$act_file
|
||||
$SED '/^ac_cv_/ b
|
||||
/^m4_defn([m4_re_word])=./ !d
|
||||
/^a[[cs]]_/ d
|
||||
/^PPID=/ d
|
||||
/^RANDOM=/ d
|
||||
/^SECONDS=/ d
|
||||
/'\'\\\$\''=/ d
|
||||
' $act_file >at_config_vars-$act_file
|
||||
done
|
||||
AT_CMP([at_config_vars-$1], [at_config_vars-$2])[]dnl
|
||||
])# AT_CONFIG_CMP
|
||||
|
Loading…
Reference in New Issue
Block a user