PHP: fixed version comparison in configure script.
Some PPAs for Ubuntu package PHP with versions like:
7.2.28-3+ubuntu18.04.1+deb.sury.org+1
But the script expected only "X.Y.Z".
The issue was introduced in:
@@ -77,8 +77,8 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
$echo " + PHP SAPI: [`${NXT_PHP_CONFIG} --php-sapis`]"
NXT_PHP_MAJOR_VERSION=${NXT_PHP_VERSION%%.*}
- NXT_PHP_MINOR_VERSION=${NXT_PHP_VERSION#??}
- NXT_PHP_MINOR_VERSION=${NXT_PHP_MINOR_VERSION%.*}
+ NXT_PHP_MINOR_VERSION=${NXT_PHP_VERSION#*.}
+ NXT_PHP_MINOR_VERSION=${NXT_PHP_MINOR_VERSION%%.*}
if [ $NXT_PHP_MAJOR_VERSION = 5 -a $NXT_PHP_MINOR_VERSION -lt 4 ]; then
NXT_PHP_ADDITIONAL_FLAGS=-Wno-write-strings
