@@ -1688,6 +1688,31 @@ export php_cv_func_shm_open_ok=yes
1688
1688
export php_cv_shm_ipc=yes
1689
1689
export php_cv_shm_mmap_anon=yes
1690
1690
export php_cv_shm_mmap_posix=yes
1691
+ # Additional library-specific cache variables for older PHP versions (8.2.x, 8.3.x)
1692
+ # On macOS, shm_open is in the system C library, not in separate -lrt or -lroot libraries
1693
+ # Skip the problematic library tests entirely by setting function tests to yes
1694
+ export ac_cv_lib_rt_shm_open=no
1695
+ export ac_cv_lib_rt___shm_open=no
1696
+ export ac_cv_lib_rt_shm_unlink=no
1697
+ export ac_cv_lib_root_shm_open=no
1698
+ export ac_cv_lib_root___shm_open=no
1699
+ # For PHP 8.2.x, patch the configure script to fix shared memory detection
1700
+ # Since environment variables are overridden, we need to patch the actual checks
1701
+ if [ ! -f configure.patched ]; then
1702
+ # Backup original configure script
1703
+ cp configure configure.original
1704
+
1705
+ # Patch the configure script to override shared memory detection results
1706
+ # Replace the cross-compilation fallbacks with forced "yes" values
1707
+ sed -i.bak \\
1708
+ -e 's/have_shm_ipc=no/have_shm_ipc=yes/g' \\
1709
+ -e 's/have_shm_mmap_anon=no/have_shm_mmap_anon=yes/g' \\
1710
+ -e 's/have_shm_mmap_posix=no/have_shm_mmap_posix=yes/g' \\
1711
+ configure
1712
+
1713
+ # Mark as patched
1714
+ touch configure.patched
1715
+ fi
1691
1716
1692
1717
exec ./configure "$@"
1693
1718
`
@@ -1820,6 +1845,31 @@ export php_cv_func_shm_open_ok=yes
1820
1845
export php_cv_shm_ipc=yes
1821
1846
export php_cv_shm_mmap_anon=yes
1822
1847
export php_cv_shm_mmap_posix=yes
1848
+ # Additional library-specific cache variables for older PHP versions (8.2.x, 8.3.x)
1849
+ # On macOS, shm_open is in the system C library, not in separate -lrt or -lroot libraries
1850
+ # Skip the problematic library tests entirely by setting function tests to yes
1851
+ export ac_cv_lib_rt_shm_open=no
1852
+ export ac_cv_lib_rt___shm_open=no
1853
+ export ac_cv_lib_rt_shm_unlink=no
1854
+ export ac_cv_lib_root_shm_open=no
1855
+ export ac_cv_lib_root___shm_open=no
1856
+ # For PHP 8.2.x, patch the configure script to fix shared memory detection
1857
+ # Since environment variables are overridden, we need to patch the actual checks
1858
+ if [ ! -f configure.patched ]; then
1859
+ # Backup original configure script
1860
+ cp configure configure.original
1861
+
1862
+ # Patch the configure script to override shared memory detection results
1863
+ # Replace the cross-compilation fallbacks with forced "yes" values
1864
+ sed -i.bak \\
1865
+ -e 's/have_shm_ipc=no/have_shm_ipc=yes/g' \\
1866
+ -e 's/have_shm_mmap_anon=no/have_shm_mmap_anon=yes/g' \\
1867
+ -e 's/have_shm_mmap_posix=no/have_shm_mmap_posix=yes/g' \\
1868
+ configure
1869
+
1870
+ # Mark as patched
1871
+ touch configure.patched
1872
+ fi
1823
1873
1824
1874
exec ./configure "$@"
1825
1875
`
0 commit comments