diff options
Diffstat (limited to 'src/config.m4')
| -rw-r--r-- | src/config.m4 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/config.m4 b/src/config.m4 new file mode 100644 index 0000000..aba355c --- /dev/null +++ b/src/config.m4 | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | dnl $Id$ | ||
| 2 | dnl config.m4 for extension snuffleupagus | ||
| 3 | |||
| 4 | sources="snuffleupagus.c sp_config.c sp_config_utils.c sp_harden_rand.c" | ||
| 5 | sources="$sources sp_unserialize.c sp_utils.c sp_disable_xxe.c sp_list.c" | ||
| 6 | 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" | ||
| 8 | sources="$sources sp_config_keywords.c sp_compile.c" | ||
| 9 | |||
| 10 | PHP_ARG_ENABLE(snuffleupagus, whether to enable snuffleupagus support, | ||
| 11 | [ --enable-snuffleupagus Enable snuffleupagus support]) | ||
| 12 | |||
| 13 | PHP_ARG_ENABLE(coverage, whether to enable coverage support, | ||
| 14 | [ --enable-coverage Enable coverage support]) | ||
| 15 | |||
| 16 | PHP_ARG_ENABLE(debug, whether to enable debug messages, | ||
| 17 | [ --enable-debug Enable debug messages]) | ||
| 18 | |||
| 19 | CFLAGS="$CFLAGS -lpcre" | ||
| 20 | CFLAGS="$CFLAGS -D_DEFAULT_SOURCE=1 -std=c99" | ||
| 21 | CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter" | ||
| 22 | |||
| 23 | if test "$PHP_DEBUG" = "yes"; then | ||
| 24 | AC_DEFINE(SP_DEBUG, 1, [Wether you want to enable debug messages]) | ||
| 25 | fi | ||
| 26 | |||
| 27 | if test "$PHP_SNUFFLEUPAGUS" != "no"; then | ||
| 28 | if test "$PHP_COVERAGE" != "no"; then | ||
| 29 | CFLAGS="$CFLAGS --coverage -fprofile-arcs -ftest-coverage" | ||
| 30 | LDFLAGS="$LDFLAGS --coverage" | ||
| 31 | PHP_NEW_EXTENSION(snuffleupagus, $sources, $ext_shared,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -g -fprofile-arcs -ftest-coverage -lgcov) | ||
| 32 | else | ||
| 33 | PHP_NEW_EXTENSION(snuffleupagus, $sources, $ext_shared,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) | ||
| 34 | fi | ||
| 35 | fi | ||
