@@ -519,19 +519,17 @@ dnl Check AVX512 VBMI
519519PHP_CHECK_AVX512_VBMI_SUPPORTS
520520
521521dnl Check for __alignof__ support in the compiler
522- AC_CACHE_CHECK ( whether the compiler supports __alignof__ , ac_cv_alignof_exists , [
523- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
524- ] ] , [ [
522+ AC_CACHE_CHECK ( [ whether the compiler supports __alignof__] ,
523+ [ php_cv_have_alignof ] ,
524+ [ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ ] , [
525525 int align = __alignof__(int);
526526 (void)align;
527- ] ] ) ] ,[
528- ac_cv_alignof_exists=yes
529- ] ,[
530- ac_cv_alignof_exists=no
531- ] ) ] )
532- if test "$ac_cv_alignof_exists" = "yes"; then
533- AC_DEFINE ( [ HAVE_ALIGNOF] , 1 , [ whether the compiler supports __alignof__] )
534- fi
527+ ] ) ] ,
528+ [ php_cv_have_alignof=yes] ,
529+ [ php_cv_have_alignof=no] ) ] )
530+ AS_VAR_IF ( [ php_cv_have_alignof] , [ yes] ,
531+ [ AC_DEFINE ( [ HAVE_ALIGNOF] , [ 1] ,
532+ [ Define to 1 if the compiler supports '__alignof__'.] ) ] )
535533
536534dnl Check for structure members.
537535AC_CHECK_MEMBERS ( [ struct tm.tm_gmtoff] ,,,[ #include <time.h>] )
@@ -700,8 +698,8 @@ AS_VAR_IF([php_cv_func_getaddrinfo], [yes],
700698
701699dnl on FreeBSD, copy_file_range() works only with the undocumented flag 0x01000000;
702700dnl until the problem is fixed properly, copy_file_range() is used only on Linux
703- AC_CACHE_CHECK ( [ for copy_file_range] , ac_cv_copy_file_range ,
704- [ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [
701+ AC_CACHE_CHECK ( [ for copy_file_range] , [ php_cv_func_copy_file_range ] ,
702+ [ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [
705703#ifdef __linux__
706704#ifndef _GNU_SOURCE
707705#define _GNU_SOURCE
@@ -720,37 +718,43 @@ return 0;
720718#else
721719#error "unsupported platform"
722720#endif
723- ] ] ) ] , [ ac_cv_copy_file_range=yes] , [ ac_cv_copy_file_range=no] , [ ac_cv_copy_file_range=no] )
721+ ] ) ] ,
722+ [ php_cv_func_copy_file_range=yes] ,
723+ [ php_cv_func_copy_file_range=no] ,
724+ [ php_cv_func_copy_file_range=no] )
724725] )
725-
726- if test "$ac_cv_copy_file_range" = yes; then
727- AC_DEFINE ( HAVE_COPY_FILE_RANGE ,1 ,[ Define if copy_file_range support] )
728- fi
726+ AS_VAR_IF ( [ php_cv_func_copy_file_range] , [ yes] ,
727+ [ AC_DEFINE ( [ HAVE_COPY_FILE_RANGE] , [ 1] ,
728+ [ Define to 1 if you have the 'copy_file_range' function.] ) ] )
729729
730730AC_REPLACE_FUNCS ( strlcat strlcpy explicit_bzero getopt )
731731AC_FUNC_ALLOCA
732732PHP_TIME_R_TYPE
733733
734- AC_CACHE_CHECK ( [ for aarch64 CRC32 API] , ac_cv_func___crc32d ,
735- [ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <arm_acle.h>] ] ,[ [ __crc32d(0, 0);] ] ) ] ,[ ac_cv_func___crc32d=yes] ,[ ac_cv_func___crc32d="no"] ) ] )
736- if test "$ac_cv_func___crc32d" = "yes"; then
737- AC_DEFINE ( [ HAVE_AARCH64_CRC32] , [ 1] , [ Define when aarch64 CRC32 API is available.] )
738- fi
734+ AC_CACHE_CHECK ( [ for aarch64 CRC32 API] , [ php_cv_func___crc32d] ,
735+ [ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ #include <arm_acle.h>] , [ __crc32d(0, 0);] ) ] ,
736+ [ php_cv_func___crc32d=yes] ,
737+ [ php_cv_func___crc32d=no] ) ] )
738+ AS_VAR_IF ( [ php_cv_func___crc32d] , [ yes] ,
739+ [ AC_DEFINE ( [ HAVE_AARCH64_CRC32] , [ 1] ,
740+ [ Define to 1 when aarch64 CRC32 API is available.] ) ] )
739741
740742dnl Check for asm goto support.
741- AC_CACHE_CHECK ( [ for asm goto] , [ ac_cv__asm_goto ] ,
742- [ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ ] , [ [
743+ AC_CACHE_CHECK ( [ for asm goto] , [ php_cv_have__asm_goto ] ,
744+ [ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ ] , [
743745#if defined(__x86_64__) || defined(__i386__)
744- __asm__ goto("jmp %l0\n" :::: end);
746+ __asm__ goto("jmp %l0\n" :::: end);
745747#elif defined(__aarch64__)
746- __asm__ goto("b %l0\n" :::: end);
748+ __asm__ goto("b %l0\n" :::: end);
747749#endif
748750end:
749- return 0;
750- ] ] ) ] , [ ac_cv__asm_goto=yes] , [ ac_cv__asm_goto=no] ) ] )
751- if test "$ac_cv__asm_goto" = yes; then
752- AC_DEFINE ( [ HAVE_ASM_GOTO] , [ 1] , [ Define if asm goto support is available.] )
753- fi
751+ return 0;
752+ ] ) ] ,
753+ [ php_cv_have__asm_goto=yes] ,
754+ [ php_cv_have__asm_goto=no] ) ] )
755+ AS_VAR_IF ( [ php_cv_have__asm_goto] , [ yes] ,
756+ [ AC_DEFINE ( [ HAVE_ASM_GOTO] , [ 1] ,
757+ [ Define to 1 if asm goto support is available.] ) ] )
754758
755759dnl Check Valgrind support.
756760PHP_ARG_WITH([ valgrind] ,
0 commit comments