1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00

Add re2c checking with error exit code

To make installation experience better instead of only outputting
warning when re2c is not present this patch also exits if the PHP lexer
file(s) were not generated yet and re2c is not present on the system.
This commit is contained in:
Peter Kokot
2018-11-23 00:40:34 +01:00
parent 9a5669bc7b
commit 67b9108478
+5 -1
View File
@@ -2097,7 +2097,11 @@ AC_DEFUN([PHP_PROG_RE2C],[
fi
case $php_cv_re2c_version in
""|invalid[)]
AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.])
AC_CHECK_FILE([$abs_srcdir/Zend/zend_language_scanner.c],
[AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP lexers.])],
[AC_MSG_ERROR([You will need re2c 0.13.4 or later to generate PHP lexers.])]
)
RE2C="exit 0;"
;;
esac