Commit c2c14d94 authored by Daniel Elstner's avatar Daniel Elstner
Browse files

Avoid using postfix operators on subexpressions in the regex used to

* autogen.sh: Avoid using postfix operators on subexpressions
in the regex used to extract version numbers.  This makes the
expression both simpler and more portable.
* macros/pcre.m4 (PCRE_CHECK_VERSION): ditto.
parent 1ff3ea79
2004-05-25 Daniel Elstner <daniel.elstner@gmx.net>
* autogen.sh: Avoid using postfix operators on subexpressions
in the regex used to extract version numbers. This makes the
expression both simpler and more portable.
* macros/pcre.m4 (PCRE_CHECK_VERSION): ditto.
2004-05-25 Daniel Elstner <daniel.elstner@gmx.net>
* macros/pcre.m4 (PCRE_CHECK_VERSION): Strip "-L/usr/lib" from
......
......@@ -60,8 +60,8 @@ auto_version=0
# For instance, "1.7.2" becomes "1 \* 1000000 + 7 \* 1000 + 02". This string
# can be fed to 'eval expr' in order to compare version numbers.
#
num='\([0123456789]\{1,\}\)'
get_version='s/^.*(GNU automake) '$num'\.'$num'\.\{0,1\}'$num'\{0,1\}.*$'
d='[0123456789]'
get_version='s/^.*(GNU automake) \('$d'\{1,\}\)\.\('$d'\{1,\}\)\.\{0,1\}\('$d'*\).*$'
get_version=$get_version'/\1 \\* 1000000 + \2 \\* 1000 + 0\3/p'
for suffix in -1.6 -1.7 -1.8 -1.9 ""
......
......@@ -43,8 +43,8 @@ AC_MSG_CHECKING([[for libpcre >= ]$1])
pcre_version_string=`$PCRE_CONFIG --version`
pcre_num='\(@<:@0123456789@:>@\{1,\}\)'
pcre_transform='s/^'$pcre_num'\.'$pcre_num'\.\{0,1\}'$pcre_num'\{0,1\}$/\1 \\* 1000000 + \2 \\* 1000 + 0\3/p'
d='@<:@0123456789@:>@'
pcre_transform='s/^\('$d'\{1,\}\)\.\('$d'\{1,\}\)\.\{0,1\}\('$d'*\)$/\1 \\* 1000000 + \2 \\* 1000 + 0\3/p'
pcre_required=`echo "$1" | sed -n "$pcre_transform"`
pcre_version=`echo "$pcre_version_string" | sed -n "$pcre_transform"`
......
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