summaryrefslogtreecommitdiff
path: root/src/config.m4
diff options
context:
space:
mode:
authorBen Fuhrmannek2022-01-06 21:16:39 +0100
committerBen Fuhrmannek2022-01-06 21:16:39 +0100
commit1e8f148fe8f6c7934f1b84e41add465844c2dcdc (patch)
tree507b027606a478920728cc91e774d54a852ecbe2 /src/config.m4
parentbdefc4361017425d978ac3bfe536f11a0cc88d23 (diff)
added stderr debug output option to configure instead of CFLAGS
Diffstat (limited to 'src/config.m4')
-rw-r--r--src/config.m410
1 files changed, 8 insertions, 2 deletions
diff --git a/src/config.m4 b/src/config.m4
index e6eed84..a421c0c 100644
--- a/src/config.m4
+++ b/src/config.m4
@@ -18,6 +18,9 @@ PHP_ARG_ENABLE(coverage, whether to enable coverage support,
18PHP_ARG_ENABLE(debug, whether to enable debug messages, 18PHP_ARG_ENABLE(debug, whether to enable debug messages,
19[ --enable-debug Enable debug messages], no, no) 19[ --enable-debug Enable debug messages], no, no)
20 20
21PHP_ARG_ENABLE(debug-stderr, whether to enable debug messages,
22[ --enable-debug-stderr Enable debug messages], no, no)
23
21AC_PROG_CC_STDC() 24AC_PROG_CC_STDC()
22 25
23CFLAGS="$CFLAGS" 26CFLAGS="$CFLAGS"
@@ -28,8 +31,11 @@ CFLAGS="$CFLAGS -fstack-protector-strong"
28LDFLAGS="$LDFLAGS `pcre2-config --libs8`" 31LDFLAGS="$LDFLAGS `pcre2-config --libs8`"
29 32
30if test "$PHP_DEBUG" = "yes"; then 33if test "$PHP_DEBUG" = "yes"; then
31 AC_DEFINE(SP_DEBUG, 1, [Wether you want to enable debug messages]) 34 AC_DEFINE(SP_DEBUG, 1, [Enable SP debug messages])
32 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
33fi 39fi
34 40
35AC_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]))