bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU Autoconf 2.59c] testsuite: 57 80 ... 225 failed


From: Ralf Menzel
Subject: Re: [GNU Autoconf 2.59c] testsuite: 57 80 ... 225 failed
Date: Wed, 08 Jun 2005 16:16:38 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Reasonable Discussion, usg-unix-v)

Hello,

> Stepan Kasal wrote:
> On Tue, Jun 07, 2005 at 07:28:11PM +0200, Ralf Menzel wrote:
>> -    { $GREP -v \
>> +    { $EGREP -v \
>>  '^\(ac\|as\)_
>>  ^\(PPID\|RANDOM\|SECONDS\|'\'\\\$\''\)=
>>  ^[[^=]]*=$'        $act_file
>> --- snip ---
> 
> no, this means you are cheating: in egrep, regexp  \(ac\|as\)_
> would match string  (ac|as)_    -- but that's not what we want to check.
> You have to adapt the regular expressions for egrep.
> 
> See macro AT_CHECK_ENV for an interesting example related to this.

OK, let me have another try:
--- snip ---
RCS file: /cvsroot/autoconf/autoconf/tests/local.at,v
retrieving revision 1.16
diff -u -p -r1.16 local.at
--- tests/local.at      25 May 2005 18:35:05 -0000      1.16
+++ tests/local.at      8 Jun 2005 13:20:41 -0000
@@ -323,9 +323,9 @@ fi
 m4_define([AT_CONFIG_CMP],
 [for act_file in $1 $2
 do
-    { $GREP -v \
-'^\(ac\|as\)_
-^\(PPID\|RANDOM\|SECONDS\|'\'\\\$\''\)=
+    { $GREP -E -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
--- snip ---

> BTW: AT_CHECK_ENV uses $GREP -E, not $EGREP.  Do you know why?
> Shouldn't $EGREP be more portable?

Ah, I see. $EGREP isn't know in the given context. Instead of the
patch above we could add `AC_PROG_EGREP' to configure.ac, modify
atlocal.in and arrive at the following patch:

Attachment: DIFF5
Description: Patch to use egrep where appropriate

Last time I didn't give an example for the behaviour of the Solaris
grep. Here is one:

--- snip ---
bash> cat greptest
#!/bin/sh
for GREP in /usr/bin/grep /usr/xpg4/bin/grep /home/menzel/sw/bin/grep ; do
  echo $GREP:
  echo 'aa
a|ba|b' | $GREP '\(a\|b\)\1'
done
bash> ./greptest
/usr/bin/grep:
a|ba|b
/usr/xpg4/bin/grep:
a|ba|b
/home/menzel/sw/bin/grep:
aa
bash> /home/menzel/sw/bin/grep --version | sed 1q
grep (GNU grep) 2.5.1
--- snip ---

Bye,
Ralf Menzel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]