From: Nikita Popov Date: Fri, 23 Mar 2018 21:04:18 +0000 (+0100) Subject: Merge branch 'PHP-7.2' X-Git-Tag: php-7.3.0alpha1~139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c069adb4ba1438a7be3b8ecc91a0bf2bd7a4c2db;p=php Merge branch 'PHP-7.2' --- c069adb4ba1438a7be3b8ecc91a0bf2bd7a4c2db diff --cc acinclude.m4 index b8902f0947,eb06cb7e36..b8100afe96 --- a/acinclude.m4 +++ b/acinclude.m4 @@@ -3247,86 -3247,5 +3247,66 @@@ AC_DEFUN([PHP_CHECK_BUILTIN_SSUBLL_OVER ]) +dnl PHP_CHECK_BUILTIN_CPU_INIT +AC_DEFUN([PHP_CHECK_BUILTIN_CPU_INIT], [ + AC_MSG_CHECKING([for __builtin_cpu_init]) + + AC_TRY_LINK(, [ + return __builtin_cpu_init()? 1 : 0; + ], [ + have_builtin_cpu_init=1 + AC_MSG_RESULT([yes]) + ], [ + have_builtin_cpu_init=0 + AC_MSG_RESULT([no]) + ]) + + AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CPU_INIT], + [$have_builtin_cpu_init], [Whether the compiler supports __builtin_cpu_init]) + +]) + +dnl PHP_CHECK_BUILTIN_CPU_SUPPORTS +AC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [ + AC_MSG_CHECKING([for __builtin_cpu_supports]) + + AC_TRY_LINK(, [ + return __builtin_cpu_supports("sse")? 1 : 0; + ], [ + have_builtin_cpu_supports=1 + AC_MSG_RESULT([yes]) + ], [ + have_builtin_cpu_supports=0 + AC_MSG_RESULT([no]) + ]) + + AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CPU_SUPPORTS], + [$have_builtin_cpu_supports], [Whether the compiler supports __builtin_cpu_supports]) +]) + +dnl PHP_CHECK_CPU_SUPPORTS +AC_DEFUN([PHP_CHECK_CPU_SUPPORTS], [ + AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_INIT]) + AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_SUPPORTS]) + have_ext_instructions=0 + if test $have_builtin_cpu_supports = 1; then + AC_MSG_CHECKING([for $1 instructions supports]) + AC_TRY_RUN([ +int main() { + return __builtin_cpu_supports("$1")? 0 : 1; +} + ], [ + have_ext_instructions=1 + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + fi + AC_DEFINE_UNQUOTED(AS_TR_CPP([PHP_HAVE_$1_INSTRUCTIONS]), + [$have_ext_instructions], [Whether the compiler supports $1 instructions]) +]) + dnl Load the AX_CHECK_COMPILE_FLAG macro from the autoconf archive. m4_include([build/ax_check_compile_flag.m4]) + +m4_include([build/ax_gcc_func_attribute.m4]) - - dnl PHP_CHECK_VALGRIND - AC_DEFUN([PHP_CHECK_VALGRIND], [ - AC_MSG_CHECKING([for valgrind]) - - SEARCH_PATH="/usr/local /usr" - SEARCH_FOR="/include/valgrind/valgrind.h" - for i in $SEARCH_PATH ; do - if test -r $i/$SEARCH_FOR; then - VALGRIND_DIR=$i - fi - done - - if test -z "$VALGRIND_DIR"; then - AC_MSG_RESULT([not found]) - else - AC_MSG_RESULT(found in $VALGRIND_DIR) - AC_DEFINE(HAVE_VALGRIND, 1, [ ]) - fi - ]) diff --cc configure.ac index cf4f72b38a,c5d9be978b..e18e1de2ef --- a/configure.ac +++ b/configure.ac @@@ -770,21 -753,35 +770,49 @@@ if test "x$php_crypt_r" = "x1"; the PHP_CRYPT_R_STYLE fi +dnl Check for asm goto support +AC_CACHE_CHECK([for asm goto], ac_cv__asm_goto, +[AC_TRY_RUN([ +int main(void) { + __asm__ goto("jmp %l0\n" :::: end); +end: + return 0; +} + ],ac_cv__asm_goto=yes, ac_cv__asm_goto=no, ac_cv__asm_goto=no)]) + +if test "$ac_cv__asm_goto" = yes; then + AC_DEFINE(HAVE_ASM_GOTO,1,[Define if asm goto support]) +fi + - PHP_CHECK_VALGRIND + dnl Check valgrind support + PHP_ARG_WITH(valgrind, [whether to enable valgrind support], + [ --with-valgrind=DIR Enable valgrind support], yes, no) + + if test "$PHP_VALGRIND" != "no"; then + + AC_MSG_CHECKING([for valgrind header]) + + if test "$PHP_VALGRIND" = "yes"; then + SEARCH_PATH="/usr/local /usr" + else + SEARCH_PATH="$PHP_VALGRIND" + fi + + SEARCH_FOR="/include/valgrind/valgrind.h" + for i in $SEARCH_PATH ; do + if test -r $i/$SEARCH_FOR; then + VALGRIND_DIR=$i + fi + done + + if test -z "$VALGRIND_DIR"; then + AC_MSG_RESULT([not found]) + else + AC_MSG_RESULT(found in $VALGRIND_DIR) + AC_DEFINE(HAVE_VALGRIND, 1, [ ]) + fi + + fi dnl General settings. dnl ------------------------------------------------------------------------- diff --cc ext/xml/php_xml.h index e2174e5c87,498f471361..637932f5d9 --- a/ext/xml/php_xml.h +++ b/ext/xml/php_xml.h @@@ -34,9 -34,9 +34,9 @@@ extern zend_module_entry xml_module_ent #define xml_module_ptr NULL #endif -#ifdef HAVE_XML +#ifdef HAVE_XML - #include "ext/xml/expat_compat.h" + #include "expat_compat.h" #ifdef XML_UNICODE #error "UTF-16 Unicode support not implemented!"