We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adff1f2 commit 2480586Copy full SHA for 2480586
1 file changed
config.m4
@@ -19,7 +19,15 @@ if test "$PHP_SPX" = "yes"; then
19
AC_DEFINE_UNQUOTED([SPX_HTTP_UI_ASSETS_DIR], [ "$PHP_SPX_ASSETS_DIR/web-ui" ], [path of web-ui assets directory])
20
PHP_SUBST([PHP_SPX_ASSETS_DIR])
21
22
- CFLAGS="$CFLAGS -Werror -Wall -Wno-attributes -O3 -pthread -std=c11"
+ CFLAGS="$CFLAGS -Werror -Wall -Wno-attributes -O3 -pthread"
23
+
24
+ php_ver_num=$(echo $PHP_VERSION | awk -F. '{printf("%d%02d%02d",$1,$2,$3)}')
25
+ if test "$php_ver_num" -ge 80200; then
26
+ CFLAGS="$CFLAGS -std=c11"
27
+ AC_MSG_NOTICE([Adding -std=c11 because PHP >= 8.2])
28
+ else
29
+ AC_MSG_NOTICE([Not adding -std=c11 because PHP < 8.2])
30
+ fi
31
32
# Disabling typedef-redefinition is required for:
33
# - macOS, see https://github.com/NoiseByNorthwest/php-spx/pull/270
0 commit comments