On 01/07/2013 03:19 PM, Alexander Aring wrote: > Hello, > > i am using archlinux with GNU sed version 4.2.2 which generate with 'sed > --version': > > sed (GNU sed) 4.2.2 > Copyright (C) 2012 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > . > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > Written by Jay Fenlason, Tom Lord, Ken Pizzini, > and Paolo Bonzini. > GNU sed home page: . > General help using GNU software: . > E-mail bug reports to: . > Be sure to include the word ``sed'' somewhere in the ``Subject:'' field. > > > This will fail on sed version check in configure.ac: > SED_VERSION=`$SED --version 2>/dev/null | $SED -ne "s/.*version > \([[0-9\.]]*\)/\1/p"` > > > With command 'sed --version 2>/dev/null | sed -ne "s/.*version > \([[0-9\.]]*\)/\1/p"' I got following output: > "3 or later ." > > and configure failed with: > checking sed version... configure: error: we need at least GNU sed 4.x > > > GNU sed gets version string from gnulib see > http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/version-etc.c;hb=dbed1625626c6d6f271b715f87fd0930d8e68c2f > beginning at line 43. > > I don't see a "version" substring there, maybe it isn't the best way to > match the sed version. Since 4.2.1 the output of sed --version changed: > $ sed --version > GNU sed version 4.2.1 > Copyright (C) 2009 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, > to the extent permitted by law. > > GNU sed home page: . > General help using GNU software: . > E-mail bug reports to: . > Be sure to include the word ``sed'' somewhere in the ``Subject:'' field. Can you please improve the regex to parse both version of sed? regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |