summaryrefslogtreecommitdiff
path: root/src/config.m4
diff options
context:
space:
mode:
authorjvoisin2022-03-20 18:20:45 +0100
committerjvoisin2022-03-20 18:20:45 +0100
commit81dd7f2ef07af306fe83d7755cbac4529aa9fc8d (patch)
tree32cc44c6231b30db5ac7b15699297863460784aa /src/config.m4
parent83b01942dfc80474cc05e09aeef4b44307a7120b (diff)
parentc38df1077a6c1dfbca1baca049214d053e2e7684 (diff)
Merge remote-tracking branch 'sektioneins/master'
Diffstat (limited to 'src/config.m4')
-rw-r--r--src/config.m416
1 files changed, 13 insertions, 3 deletions
diff --git a/src/config.m4 b/src/config.m4
index e4cc1f5..a421c0c 100644
--- a/src/config.m4
+++ b/src/config.m4
@@ -7,6 +7,7 @@ sources="$sources sp_disabled_functions.c sp_execute.c sp_upload_validation.c"
7sources="$sources sp_cookie_encryption.c sp_network_utils.c tweetnacl.c" 7sources="$sources sp_cookie_encryption.c sp_network_utils.c tweetnacl.c"
8sources="$sources sp_config_keywords.c sp_var_parser.c sp_var_value.c sp_tree.c" 8sources="$sources sp_config_keywords.c sp_var_parser.c sp_var_value.c sp_tree.c"
9sources="$sources sp_pcre_compat.c sp_crypt.c sp_session.c sp_sloppy.c sp_wrapper.c" 9sources="$sources sp_pcre_compat.c sp_crypt.c sp_session.c sp_sloppy.c sp_wrapper.c"
10sources="$sources sp_ini.c sp_php_compat.c sp_config_scanner.c sp_ifilter.c"
10 11
11PHP_ARG_ENABLE(snuffleupagus, whether to enable snuffleupagus support, 12PHP_ARG_ENABLE(snuffleupagus, whether to enable snuffleupagus support,
12[ --enable-snuffleupagus Enable snuffleupagus support]) 13[ --enable-snuffleupagus Enable snuffleupagus support])
@@ -17,18 +18,24 @@ PHP_ARG_ENABLE(coverage, whether to enable coverage support,
17PHP_ARG_ENABLE(debug, whether to enable debug messages, 18PHP_ARG_ENABLE(debug, whether to enable debug messages,
18[ --enable-debug Enable debug messages], no, no) 19[ --enable-debug Enable debug messages], no, no)
19 20
21PHP_ARG_ENABLE(debug-stderr, whether to enable debug messages,
22[ --enable-debug-stderr Enable debug messages], no, no)
23
20AC_PROG_CC_STDC() 24AC_PROG_CC_STDC()
21 25
22CFLAGS="$CFLAGS" 26CFLAGS="$CFLAGS"
23CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter" 27CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter"
24CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2" 28CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2"
25CFLAGS="$CFLAGS -fstack-protector" 29CFLAGS="$CFLAGS -fstack-protector-strong"
26 30
27LDFLAGS="$LDFLAGS `pcre2-config --libs8`" 31LDFLAGS="$LDFLAGS `pcre2-config --libs8`"
28 32
29if test "$PHP_DEBUG" = "yes"; then 33if test "$PHP_DEBUG" = "yes"; then
30 AC_DEFINE(SP_DEBUG, 1, [Wether you want to enable debug messages]) 34 AC_DEFINE(SP_DEBUG, 1, [Enable SP debug messages])
31 CFLAGS="$CFLAGS -g -ggdb -O0" 35 CFLAGS="$CFLAGS -g -ggdb -O0"
36 if test "$PHP_DEBUG_STDERR" = "yes"; then
37 AC_DEFINE(SP_DEBUG_STDERR, 1, [Print SP debug messages to stderr])
38 fi
32fi 39fi
33 40
34AC_CHECK_LIB(pcre, pcre_compile, AC_DEFINE(HAVE_PCRE, 1, [have pcre])) 41AC_CHECK_LIB(pcre, pcre_compile, AC_DEFINE(HAVE_PCRE, 1, [have pcre]))
@@ -39,3 +46,6 @@ if test "$PHP_SNUFFLEUPAGUS" = "yes"; then
39 fi 46 fi
40 PHP_NEW_EXTENSION(snuffleupagus, $sources, $ext_shared,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) 47 PHP_NEW_EXTENSION(snuffleupagus, $sources, $ext_shared,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
41fi 48fi
49
50# PHP_PROG_RE2C([2.0])
51PHP_ADD_MAKEFILE_FRAGMENT()