configure: fix version check with empty version
authorMichael Wallner <mike@php.net>
Tue, 27 Feb 2018 10:03:59 +0000 (11:03 +0100)
committerMichael Wallner <mike@php.net>
Tue, 27 Feb 2018 10:03:59 +0000 (11:03 +0100)
autoconf/pecl/pecl.m4

index a1df4f0..1763d5d 100644 (file)
@@ -221,7 +221,7 @@ AC_DEFUN([PECL_HAVE_VERSION], [
        aversion=_PECL_TR_VERSION([$PECL_CHECKED_VERSION([$1])])
        mversion=_PECL_TR_VERSION([$2])
        AC_MSG_CHECKING([whether $1 version $PECL_CHECKED_VERSION([$1]) >= $2])
-       if test "$aversion" -lt "$mversion"; then
+       if test -z "$aversion" || test "$aversion" -lt "$mversion"; then
                ifelse($4,,AC_MSG_ERROR([no]), [
                        AC_MSG_RESULT([no])
                        $4