]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.2'
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 23 Mar 2018 21:04:18 +0000 (22:04 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 23 Mar 2018 21:04:18 +0000 (22:04 +0100)
1  2 
acinclude.m4
configure.ac
ext/xml/php_xml.h

diff --cc acinclude.m4
index b8902f094731eef89e871919e5071703ed9171f6,eb06cb7e363f070f8e795dc3e9ee7419a4943630..b8100afe964b3142dcd1ecc3785c9816a6403c8f
@@@ -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])
- 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
- ])
 +
 +m4_include([build/ax_gcc_func_attribute.m4])
diff --cc configure.ac
index cf4f72b38a096ca0bc1d254e56ba0fc340491848,c5d9be978bda4772952af3ccac9f29279d47f54a..e18e1de2efb4ec33139b8e8036aeb8f0b51b1f3e
@@@ -770,21 -753,35 +770,49 @@@ if test "x$php_crypt_r" = "x1"; the
    PHP_CRYPT_R_STYLE
  fi
  
- PHP_CHECK_VALGRIND
 +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
 +
+ 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 -------------------------------------------------------------------------
index e2174e5c87fd5105fa392daa69201a0640626dfc,498f471361297f91a8f0549be524021181224e7d..637932f5d9c36578e9f0ed0cca208a5741ac74c9
@@@ -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!"