From 72087c8921cc21d4debc5dcf8e4189007c51969e Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 1 Dec 2018 21:36:40 +0100 Subject: [PATCH] Replace AC_CHECK_FILE with test -f The AC_CHECK_FILE macro is designed to emit a warning about possible cross compiling issues if file is not present on the target system. Since the generated PHP lexer file is part of the build files and not target system this can be simplified by a usual shell check with `test -f` instead as in other usages. --- acinclude.m4 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 94805dea283..3c0f6a8eb5a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2097,10 +2097,11 @@ AC_DEFUN([PHP_PROG_RE2C],[ fi case $php_cv_re2c_version in ""|invalid[)] - 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.])] - ) + if test -f "$abs_srcdir/Zend/zend_language_scanner.c"; then + AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP lexers.]) + else + AC_MSG_ERROR([You will need re2c 0.13.4 or later to generate PHP lexers.]) + fi RE2C="exit 0;" ;;