@@ -29,7 +29,7 @@ if test "$PHP_OPCACHE" != "no"; then
2929
3030 if test "$PHP_OPCACHE_JIT" = "yes"; then
3131 case $host_cpu in
32- x86*)
32+ i [ 34567 ] 86*| x86*)
3333 ;;
3434 *)
3535 AC_MSG_WARN ( [ JIT not supported by host architecture] )
@@ -43,28 +43,26 @@ if test "$PHP_OPCACHE" != "no"; then
4343 ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
4444
4545 dnl Find out which ABI we are using.
46- AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [
47- int main(void) {
48- return sizeof(void*) == 4;
49- }
50- ] ] ) ] ,[
51- ac_cv_32bit_build=no
52- ] ,[
53- ac_cv_32bit_build=yes
54- ] ,[
55- ac_cv_32bit_build=no
56- ] )
57-
58- if test "$ac_cv_32bit_build" = "no"; then
59- case $host_alias in
60- *x86_64-*-darwin*)
61- DASM_FLAGS="-D X64APPLE=1 -D X64=1"
46+ case $host_alias in
47+ x86_64-*-darwin*)
48+ DASM_FLAGS="-D X64APPLE=1 -D X64=1"
49+ DASM_ARCH="x86"
6250 ;;
63- *x86_64*)
64- DASM_FLAGS="-D X64=1"
51+ x86_64*)
52+ DASM_FLAGS="-D X64=1"
53+ DASM_ARCH="x86"
6554 ;;
66- esac
67- fi
55+ i[ 34567] 86*)
56+ DASM_ARCH="x86"
57+ ;;
58+ x86*)
59+ DASM_ARCH="x86"
60+ ;;
61+ aarch64*)
62+ DASM_FLAGS="-D ARM64=1"
63+ DASM_ARCH="arm64"
64+ ;;
65+ esac
6866
6967 if test "$PHP_THREAD_SAFETY" = "yes"; then
7068 DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
@@ -173,9 +171,10 @@ int main() {
173171 }
174172 return 0;
175173}
176- ] ] ) ] ,[ dnl
174+ ] ] ) ] ,[ have_shm_ipc=yes] ,[ have_shm_ipc=no] ,[ have_shm_ipc=no] )
175+ if test "$have_shm_ipc" = "yes"; then
177176 AC_DEFINE ( HAVE_SHM_IPC , 1 , [ Define if you have SysV IPC SHM support] )
178- have_shm_ipc=yes ] , [ have_shm_ipc=no ] , [ have_shm_ipc=no ] )
177+ fi
179178 AC_MSG_RESULT ( [ $have_shm_ipc] )
180179
181180 AC_MSG_CHECKING ( for mmap ( ) using MAP_ANON shared memory support )
@@ -225,9 +224,19 @@ int main() {
225224 }
226225 return 0;
227226}
228- ] ] ) ] ,[ dnl
227+ ] ] ) ] ,[ have_shm_mmap_anon=yes] ,[ have_shm_mmap_anon=no] ,[
228+ case $host_alias in
229+ *linux*)
230+ have_shm_mmap_anon=yes
231+ ;;
232+ *)
233+ have_shm_mmap_anon=no
234+ ;;
235+ esac
236+ ] )
237+ if test "$have_shm_mmap_anon" = "yes"; then
229238 AC_DEFINE ( HAVE_SHM_MMAP_ANON , 1 , [ Define if you have mmap(MAP_ANON) SHM support] )
230- have_shm_mmap_anon=yes ] , [ have_shm_mmap_anon=no ] , [ have_shm_mmap_anon=no ] )
239+ fi
231240 AC_MSG_RESULT ( [ $have_shm_mmap_anon] )
232241
233242 PHP_CHECK_FUNC_LIB(shm_open, rt, root)
@@ -295,16 +304,12 @@ int main() {
295304 }
296305 return 0;
297306}
298- ] ] ) ] ,[ dnl
307+ ] ] ) ] ,[ have_shm_mmap_posix=yes] ,[ have_shm_mmap_posix=no] ,[ have_shm_mmap_posix=no] )
308+ if test "$have_shm_mmap_posix" = "yes"; then
299309 AC_DEFINE ( HAVE_SHM_MMAP_POSIX , 1 , [ Define if you have POSIX mmap() SHM support] )
300- AC_MSG_RESULT ( [ yes] )
301- have_shm_mmap_posix=yes
302310 PHP_CHECK_LIBRARY(rt, shm_unlink, [ PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)] )
303- ] ,[
304- AC_MSG_RESULT ( [ no] )
305- ] ,[
306- AC_MSG_RESULT ( [ no] )
307- ] )
311+ fi
312+ AC_MSG_RESULT ( [ $have_shm_mmap_posix] )
308313
309314 PHP_NEW_EXTENSION(opcache,
310315 ZendAccelerator.c \
0 commit comments