summaryrefslogtreecommitdiff
path: root/src/config.m4
diff options
context:
space:
mode:
authorSebastien Blot2017-09-20 10:11:01 +0200
committerSebastien Blot2017-09-20 10:11:01 +0200
commit868f96c759b6650d88ff9f4fbc5c048302134248 (patch)
treec0de0af318bf77a8959164ef11aeeeb2b7bab294 /src/config.m4
Initial import
Diffstat (limited to 'src/config.m4')
-rw-r--r--src/config.m435
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 @@
1dnl $Id$
2dnl config.m4 for extension snuffleupagus
3
4sources="snuffleupagus.c sp_config.c sp_config_utils.c sp_harden_rand.c"
5sources="$sources sp_unserialize.c sp_utils.c sp_disable_xxe.c sp_list.c"
6sources="$sources sp_disabled_functions.c sp_execute.c sp_upload_validation.c"
7sources="$sources sp_cookie_encryption.c sp_network_utils.c tweetnacl.c"
8sources="$sources sp_config_keywords.c sp_compile.c"
9
10PHP_ARG_ENABLE(snuffleupagus, whether to enable snuffleupagus support,
11[ --enable-snuffleupagus Enable snuffleupagus support])
12
13PHP_ARG_ENABLE(coverage, whether to enable coverage support,
14[ --enable-coverage Enable coverage support])
15
16PHP_ARG_ENABLE(debug, whether to enable debug messages,
17[ --enable-debug Enable debug messages])
18
19CFLAGS="$CFLAGS -lpcre"
20CFLAGS="$CFLAGS -D_DEFAULT_SOURCE=1 -std=c99"
21CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter"
22
23if test "$PHP_DEBUG" = "yes"; then
24 AC_DEFINE(SP_DEBUG, 1, [Wether you want to enable debug messages])
25fi
26
27if 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
35fi