From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-bk0-f53.google.com ([209.85.214.53]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1TsLIh-0004TS-4m for ptxdist@pengutronix.de; Mon, 07 Jan 2013 23:36:31 +0100 Received: by mail-bk0-f53.google.com with SMTP id j5so8725376bkw.26 for ; Mon, 07 Jan 2013 14:36:05 -0800 (PST) From: Alexander Aring Date: Mon, 7 Jan 2013 23:36:05 +0100 Message-Id: <1357598165-27065-1-git-send-email-alex.aring@gmail.com> Subject: [ptxdist] [PATCH] configure.ac: change regex for sed version Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Alexander Aring Change regex for sed version in configure.ac. This regex will match only on the first line and doesn't look for a 'version' pattern which is not available in sed version 4.2.2. The new regex will match in the first line of 'sed --version' in a pattern which starts with random character sequence(or zero) followed by whitespace character and several digits of pattern x.x....x which x is a number. This pattern will be save in the SED_VERSION variable. Signed-off-by: Alexander Aring --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d4c83b8..4d27a60 100644 --- a/configure.ac +++ b/configure.ac @@ -116,7 +116,7 @@ if test -z "$SED"; then fi AC_MSG_CHECKING([sed version]) -SED_VERSION=`$SED --version 2>/dev/null | $SED -ne "s/.*version \([[0-9\.]]*\)/\1/p"` +SED_VERSION=`$SED --version 2>/dev/null | $SED -ne "1 s/.*\s\([[0-9\+\.]]\+\).*/\1/p"` case "$SED_VERSION" in 3.*) AC_MSG_ERROR([we need at least GNU sed 4.x but found $SED_VERSION]) ;; 4.*) ;; -- 1.8.1 -- ptxdist mailing list ptxdist@pengutronix.de