com php-src: Fix AC_RUN_IFELSE calls when cross-compi ling: acinclude.m4 build/build2.mk ext/fileinfo /config.m4 ext/iconv/config.m4
ext/opcache/config .m4 sapi/fpm/config.m4

From: Date: Mon, 30 Jul 2018 04:38:59 +0000
Subject: com php-src: Fix AC_RUN_IFELSE calls when cross-compi ling: acinclude.m4 build/build2.mk ext/fileinfo /config.m4 ext/iconv/config.m4
ext/opcache/config .m4 sapi/fpm/config.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102725@lists.php.net to get a copy of this message
Commit: f2e4de8b567a632f132fe0fdc34bbb75fcf01518 Author: Peter Kokot <peterkokot@gmail.com> Mon, 30 Jul 2018 06:38:59 +0200 Parents: 6399fa1eeafea21993dd42579a599e046fefc030 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f2e4de8b567a632f132fe0fdc34bbb75fcf01518 Log: Fix AC_RUN_IFELSE calls when cross-compiling AC_RUN_IFELSE program can't be run when cross-compiling. This fix removes warnings given by autotools scripts. Changed paths: M acinclude.m4 M build/build2.mk M ext/fileinfo/config.m4 M ext/iconv/config.m4 M ext/opcache/config.m4 M sapi/fpm/config.m4 Diff: diff --git a/acinclude.m4 b/acinclude.m4 index 6c99085...6ad8070 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3243,7 +3243,7 @@ int main() { AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) - ], []) + ], [AC_MSG_RESULT([no])]) fi AC_DEFINE_UNQUOTED(AS_TR_CPP([PHP_HAVE_$1_INSTRUCTIONS]), [$have_ext_instructions], [Whether the compiler supports $1 instructions]) diff --git a/build/build2.mk b/build/build2.mk index 5637535..a5e4d65 100644 --- a/build/build2.mk +++ b/build/build2.mk @@ -27,12 +27,12 @@ targets = $(TOUCH_FILES) configure $(config_h_in) PHP_AUTOCONF ?= 'autoconf' PHP_AUTOHEADER ?= 'autoheader' -SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_RUN_IFELSE called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used)'||true) +SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used)'||true) all: $(targets) $(config_h_in): configure -# explicitly remove target since autoheader does not seem to work +# explicitly remove target since autoheader does not seem to work # correctly otherwise (timestamps are not updated) @echo rebuilding $@ @rm -f $@ diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4 index 002066b..9a7b06a 100644 --- a/ext/fileinfo/config.m4 +++ b/ext/fileinfo/config.m4 @@ -46,7 +46,7 @@ int main(void) AC_MSG_RESULT(no) AC_MSG_NOTICE(using libmagic strcasestr implementation) libmagic_sources="$libmagic_sources libmagic/strcasestr.c" - ],[]) + ],[AC_MSG_RESULT([skipped, cross-compiling])]) PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic) PHP_ADD_BUILD_DIR($ext_builddir/libmagic) diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index bf6fdc2..72334f7 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -60,7 +60,7 @@ int main() { AC_MSG_RESULT(no) LDFLAGS="$php_iconv_old_ld" ],[ - AC_MSG_RESULT(no, cross-compiling) + AC_MSG_RESULT([no, cross-compiling]) LDFLAGS="$php_iconv_old_ld" ]) fi diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 57ea872..a267c63 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -356,7 +356,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ flock_type=linux AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) AC_MSG_RESULT("yes") -], [AC_MSG_RESULT("no")], []) +], [AC_MSG_RESULT("no")], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING("whether flock struct is BSD ordered") AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -372,7 +372,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ flock_type=bsd AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) AC_MSG_RESULT("yes") -], [AC_MSG_RESULT("no")], []) +], [AC_MSG_RESULT("no")], [AC_MSG_RESULT([no])]) if test "$flock_type" = "unknown"; then AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 index 3eb39c9..647b646 100644 --- a/sapi/fpm/config.m4 +++ b/sapi/fpm/config.m4 @@ -91,7 +91,7 @@ AC_DEFUN([AC_FPM_CLOCK], AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) - ], []) + ], [AC_MSG_RESULT([no (cross-compiling)])]) fi if test "$have_clock_get_time" = "yes"; then @@ -192,7 +192,7 @@ AC_DEFUN([AC_FPM_TRACE], have_broken_ptrace=yes AC_MSG_RESULT([no]) ], [ - AC_MSG_RESULT([skipped (cross compiling)]) + AC_MSG_RESULT([skipped (cross-compiling)]) ]) fi @@ -266,7 +266,7 @@ AC_DEFUN([AC_FPM_TRACE], proc_mem_file="" AC_MSG_RESULT([no]) ], [ - AC_MSG_RESULT([skipped (cross compiling)]) + AC_MSG_RESULT([skipped (cross-compiling)]) ]) fi

« previous php.cvs (#102725) next »