diff options
Diffstat (limited to 'src/config.m4')
| -rw-r--r-- | src/config.m4 | 16 |
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" | |||
| 7 | sources="$sources sp_cookie_encryption.c sp_network_utils.c tweetnacl.c" | 7 | sources="$sources sp_cookie_encryption.c sp_network_utils.c tweetnacl.c" |
| 8 | sources="$sources sp_config_keywords.c sp_var_parser.c sp_var_value.c sp_tree.c" | 8 | sources="$sources sp_config_keywords.c sp_var_parser.c sp_var_value.c sp_tree.c" |
| 9 | sources="$sources sp_pcre_compat.c sp_crypt.c sp_session.c sp_sloppy.c sp_wrapper.c" | 9 | sources="$sources sp_pcre_compat.c sp_crypt.c sp_session.c sp_sloppy.c sp_wrapper.c" |
| 10 | sources="$sources sp_ini.c sp_php_compat.c sp_config_scanner.c sp_ifilter.c" | ||
| 10 | 11 | ||
| 11 | PHP_ARG_ENABLE(snuffleupagus, whether to enable snuffleupagus support, | 12 | PHP_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, | |||
| 17 | PHP_ARG_ENABLE(debug, whether to enable debug messages, | 18 | PHP_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 | ||
| 21 | PHP_ARG_ENABLE(debug-stderr, whether to enable debug messages, | ||
| 22 | [ --enable-debug-stderr Enable debug messages], no, no) | ||
| 23 | |||
| 20 | AC_PROG_CC_STDC() | 24 | AC_PROG_CC_STDC() |
| 21 | 25 | ||
| 22 | CFLAGS="$CFLAGS" | 26 | CFLAGS="$CFLAGS" |
| 23 | CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter" | 27 | CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter" |
| 24 | CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2" | 28 | CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2" |
| 25 | CFLAGS="$CFLAGS -fstack-protector" | 29 | CFLAGS="$CFLAGS -fstack-protector-strong" |
| 26 | 30 | ||
| 27 | LDFLAGS="$LDFLAGS `pcre2-config --libs8`" | 31 | LDFLAGS="$LDFLAGS `pcre2-config --libs8`" |
| 28 | 32 | ||
| 29 | if test "$PHP_DEBUG" = "yes"; then | 33 | if 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 | ||
| 32 | fi | 39 | fi |
| 33 | 40 | ||
| 34 | AC_CHECK_LIB(pcre, pcre_compile, AC_DEFINE(HAVE_PCRE, 1, [have pcre])) | 41 | AC_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) |
| 41 | fi | 48 | fi |
| 49 | |||
| 50 | # PHP_PROG_RE2C([2.0]) | ||
| 51 | PHP_ADD_MAKEFILE_FRAGMENT() | ||
