From: Boian Bonev Date: Wed, 20 Mar 2002 19:22:54 +0000 (+0000) Subject: fix version checking - now handle 1.2.3 and 1.2 as well X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~1177 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e94ffe37e7d3a7dbccc0e785725f26334a31e171;p=php fix version checking - now handle 1.2.3 and 1.2 as well --- diff --git a/ext/vpopmail/config.m4 b/ext/vpopmail/config.m4 index 9c8a94f970..65ff8a85d2 100644 --- a/ext/vpopmail/config.m4 +++ b/ext/vpopmail/config.m4 @@ -75,8 +75,8 @@ Use ./configure --with-vpopmail= if necessary) vpopmail_internal_api=1 version=`grep VERSION $VPOPMAIL_INC_DIR/vpopmail_config.h` if test -n "$version"; then - version_major=`echo "$version" | sed 's/^[[^"]]\+"\([[0-9]]\+\)\.[[0-9]]\+"/\1/'`; - version_minor=`echo "$version" | sed 's/^[[^"]]\+"[[0-9]]\+\.\([[0-9]]\+\)"/\1/'` + version_major=`echo "$version" | tr "\"#." " " | awk '{print $3}'` + version_minor=`echo "$version" | tr "\"#." " " | awk '{print $4}'` if test $version_major -ge 5; then if test $version_major -eq 5; then if test $version_minor -ge 2; then