[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new macros AC_FUNC_EGREP, AC_FUNC_FGREP for POSIX 1003.1-2001 suppor
From: |
Paul Eggert |
Subject: |
Re: new macros AC_FUNC_EGREP, AC_FUNC_FGREP for POSIX 1003.1-2001 support |
Date: |
Wed, 5 Jun 2002 03:52:54 -0700 (PDT) |
> From: Akim Demaille <address@hidden>
> Date: 05 Jun 2002 09:55:06 +0200
>
> | @@ -148,7 +148,7 @@ m4_defun([AC_STATE_SAVE],
> | grep '^m4_defn([m4_re_word])=' >address@hidden&address@hidden
> | test $? = 0 || rm -f address@hidden&address@hidden
> |
> | -ls -1 | egrep -v '^(at-|state-|config\.)' | sort
> >address@hidden&address@hidden
> | +ls -1 | sed '/^at-/d;/^state-/d;/^config\./d' | sort
> >address@hidden&address@hidden
>
> Why did you prefer sed?
Because I couldn't use egrep (it's going away), or grep -E (it doesn't
work on many hosts), and I didn't want to require AC_FUNC_EGREP.
> | m4_define([AT_CHECK_DEFINES],
> | -[AT_CHECK([[fgrep '#' config.h |
> | - egrep -v
> 'STDC_HEADERS|STD(INT|LIB)|INTTYPES|MEMORY|PACKAGE_|STRING|SYS_(TYPES|STAT)|UNISTD']],,
> | +[AT_CHECK([[sed '/#/!d
> | +/INTTYPES/d
> | +/MEMORY/d
> | +/PACKAGE_/d
> | +/STDC_HEADERS/d
> | +/STDINT/d
> | +/STDLIB/d
> | +/STRING/d
> | +/SYS_STAT/d
> | +/SYS_TYPES/d
> | +/UNISTD/d' config.h]],,
> | [$1])])
>
> Likewise.
The same reason applies here, doubly so in this case because the old
code used both egrep and fgrep.