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 a1df4f02fd062cc2ed8e5cbfad7bba1bbbc75279..1763d5d8d36f738eed00a9de5598e1631f9a8707 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