@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
119
119
120
120
PHP_MAJOR_VERSION=5
121
121
PHP_MINOR_VERSION=5
122
- PHP_RELEASE_VERSION=18
122
+ PHP_RELEASE_VERSION=19
123
123
PHP_EXTRA_VERSION="-dev"
124
124
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
125
125
PHP_VERSION_ID=`expr [ $] PHP_MAJOR_VERSION \* 10000 + [ $] PHP_MINOR_VERSION \* 100 + [ $] PHP_RELEASE_VERSION`
@@ -784,7 +784,12 @@ if test "$PHP_GCOV" = "yes"; then
784
784
AC_MSG_ERROR ( [ ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.] )
785
785
fi
786
786
787
- ltp_version_list="1.5 1.6 1.7 1.9 1.10"
787
+ dnl min: 1.5 (i.e. 105, major * 100 + minor for easier comparison)
788
+ ltp_version_min="105"
789
+ dnl non-working versions, e.g. "1.8 1.18";
790
+ dnl remove "none" when introducing the first incompatible LTP version an
791
+ dnl separate any following additions by spaces
792
+ ltp_version_exclude="1.8"
788
793
789
794
AC_CHECK_PROG ( LTP , lcov , lcov )
790
795
AC_CHECK_PROG ( LTP_GENHTML , genhtml , genhtml )
@@ -794,21 +799,30 @@ if test "$PHP_GCOV" = "yes"; then
794
799
if test "$LTP"; then
795
800
AC_CACHE_CHECK ( [ for ltp version] , php_cv_ltp_version , [
796
801
php_cv_ltp_version=invalid
797
- ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
798
- for ltp_check_version in $ltp_version_list; do
799
- if test "$ltp_version" = "$ltp_check_version"; then
800
- php_cv_ltp_version="$ltp_check_version (ok)"
802
+ ltp_version_vars=`$LTP -v 2>/dev/null | $SED -e 's/^.* //' -e 's/\./ /g' | tr -d a-z`
803
+ if test -n "$ltp_version_vars"; then
804
+ set $ltp_version_vars
805
+ ltp_version="${1}.${2}"
806
+ ltp_version_num="`expr ${1} \* 100 + ${2}`"
807
+ if test $ltp_version_num -ge $ltp_version_min; then
808
+ php_cv_ltp_version="$ltp_version (ok)"
809
+ for ltp_check_version in $ltp_version_exclude; do
810
+ if test "$ltp_version" = "$ltp_check_version"; then
811
+ php_cv_ltp_version=invalid
812
+ break
813
+ fi
814
+ done
801
815
fi
802
- done
816
+ fi
803
817
] )
804
818
else
805
- ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list "
819
+ ltp_msg="To enable code coverage reporting you must have LTP installed"
806
820
AC_MSG_ERROR ( [ $ltp_msg] )
807
821
fi
808
822
809
823
case $php_cv_ltp_version in
810
824
""|invalid[ )]
811
- ltp_msg="You must have one of the following versions of LTP : $ltp_version_list (found : $ltp_version )."
825
+ ltp_msg="This LTP version is not supported (found: $ltp_version, min : $ltp_version_min, excluded : $ltp_version_exclude )."
812
826
AC_MSG_ERROR ( [ $ltp_msg] )
813
827
LTP="exit 0;"
814
828
;;
0 commit comments