Commit 6ab68392 authored by Daniel Elstner's avatar Daniel Elstner
Browse files

In the regex used to extract version numbers, avoid any use of quantifiers

* autogen.sh: In the regex used to extract version numbers, avoid
any use of quantifiers other than * for maximum portability.

* macros/pcre.m4 (PCRE_CHECK_VERSION): Same here, and also be more
forgiving about extra characters possibly following the version
number.
parent d9f48142
2004-05-30 Daniel Elstner <daniel.elstner@gmx.net>
* autogen.sh: In the regex used to extract version numbers, avoid
any use of quantifiers other than * for maximum portability.
* macros/pcre.m4 (PCRE_CHECK_VERSION): Same here, and also be more
forgiving about extra characters possibly following the version
number.
2004-05-30 Daniel Elstner <daniel.elstner@gmx.net>
* macros/misc.m4 (REGEXXER_PKG_PATH_PROG): Replace AC_MSG_ERROR()
......
......@@ -61,7 +61,7 @@ auto_version=0
# can be fed to 'eval expr' in order to compare version numbers.
#
d='[0123456789]'
get_version='s/^.*(GNU automake) \('$d'\{1,\}\)\.\('$d'\{1,\}\)\.\{0,1\}\('$d'*\).*$'
get_version='s/^.*(GNU automake) \('$d$d'*\)\.\('$d$d'*\)\.*\('$d'*\).*$'
get_version=$get_version'/\1 \\* 1000000 + \2 \\* 1000 + 0\3/p'
for suffix in -1.6 -1.7 -1.8 -1.9 ""
......
......@@ -44,7 +44,7 @@ AC_MSG_CHECKING([[for libpcre >= ]$1])
pcre_version_string=`$PCRE_CONFIG --version 2>&5`
d='@<:@0123456789@:>@'
pcre_transform='s/^\('$d'\{1,\}\)\.\('$d'\{1,\}\)\.\{0,1\}\('$d'*\)$/\1 \\* 1000000 + \2 \\* 1000 + 0\3/p'
pcre_transform='s/^\('$d$d'*\)\.\('$d$d'*\)\.*\('$d'*\).*$/\1 \\* 1000000 + \2 \\* 1000 + 0\3/p'
pcre_required=`echo "$1" | sed -n "$pcre_transform" 2>&5`
pcre_version=`echo "$pcre_version_string" | sed -n "$pcre_transform" 2>&5`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment