mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Makes DebugLogs optional by compilation flag
This commit is contained in:
parent
fbf8ea74f3
commit
a69e49a1b0
@ -1,16 +1,13 @@
|
|||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I build
|
if TEST_UTILITIES
|
||||||
|
export MAYBE_TEST = test
|
||||||
|
|
||||||
if WITH_YAJL
|
|
||||||
WITH_TESTS = tests
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
src \
|
src \
|
||||||
doc \
|
doc \
|
||||||
examples \
|
examples \
|
||||||
$(WITH_TESTS)
|
$(MAYBE_TEST)
|
||||||
|
|
||||||
|
|
||||||
# make clean
|
# make clean
|
||||||
|
48
configure.ac
48
configure.ac
@ -185,12 +185,37 @@ MSC_GIT_VERSION=msc_version_git
|
|||||||
AC_SUBST([MSC_GIT_VERSION])
|
AC_SUBST([MSC_GIT_VERSION])
|
||||||
|
|
||||||
|
|
||||||
# MODSEC_NO_LOGS="-DNO_LOGS=1"
|
AC_ARG_ENABLE(debug-logs,
|
||||||
# AC_SUBST(MODSEC_NO_LOGS)
|
[AC_HELP_STRING([--disable-debug-logs],[Turn off the SecDebugLog feature])],
|
||||||
|
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) debugLogs=true ;;
|
||||||
|
no) debugLogs=false ;;
|
||||||
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-logs) ;;
|
||||||
|
esac],
|
||||||
|
|
||||||
|
[debugLogs=true]
|
||||||
|
)
|
||||||
|
if test "$debugLogs" != "true"; then
|
||||||
|
MODSEC_NO_LOGS="-DNO_LOGS=1"
|
||||||
|
AC_SUBST(MODSEC_NO_LOGS)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Decide if we want to build the tests or not.
|
||||||
|
buildTestUtilities=false
|
||||||
|
if test "x$YAJL_FOUND" = "x1"; then
|
||||||
|
# Regression tests will not be able to run without the logging support.
|
||||||
|
# But we still have the unit tests.
|
||||||
|
# if test "$debugLogs" = "true"; then
|
||||||
|
buildTestUtilities=true
|
||||||
|
# fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
AM_CONDITIONAL([TEST_UTILITIES], [test $buildTestUtilities = true])
|
||||||
|
|
||||||
# Files to be generated via autotools.
|
# Files to be generated via autotools.
|
||||||
AM_CONDITIONAL([WITH_YAJL], [test "$want_test" = yes])
|
|
||||||
AC_CONFIG_FILES([\
|
AC_CONFIG_FILES([\
|
||||||
Makefile \
|
Makefile \
|
||||||
doc/Makefile \
|
doc/Makefile \
|
||||||
@ -288,3 +313,20 @@ if test "x$YAJL_FOUND" = "x2"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
|
echo " Other Options"
|
||||||
|
if test $buildTestUtilities = true; then
|
||||||
|
if test $debugLogs = true; then
|
||||||
|
echo " + Test Utilities ....enabled"
|
||||||
|
else
|
||||||
|
echo " + Test Utilities ....partially"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo " + Test Utilities ....disabled"
|
||||||
|
fi
|
||||||
|
if test $debugLogs = true; then
|
||||||
|
echo " + SecDebugLog ....enabled"
|
||||||
|
else
|
||||||
|
echo " + SecDebugLog ....disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I build
|
|
||||||
|
|
||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
benchmark
|
benchmark
|
||||||
|
Loading…
x
Reference in New Issue
Block a user