From: Victor Julien Date: Mon, 6 Jan 2014 14:09:21 +0000 (+0100) Subject: Add --disable-detection configure option X-Git-Tag: suricata-2.0rc1~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f4872a2f08b64629287756b947a97c4f59aeac67;p=thirdparty%2Fsuricata.git Add --disable-detection configure option Add --disable-detection configure option to compile Suricata with detection disabled. --- diff --git a/configure.ac b/configure.ac index 436c5e3a52..7d28b6d446 100644 --- a/configure.ac +++ b/configure.ac @@ -392,6 +392,13 @@ ]) AM_CONDITIONAL([HAVE_COCCINELLE], [test "x$enable_coccinelle" != "xno"]) + # disable detection + AC_ARG_ENABLE(detection, + AS_HELP_STRING([--disable-detection], [Disable Detection Modules])], [enable_detection="$enableval"],[enable_detection=yes]) + AS_IF([test "x$enable_detection" = "xno"], [ + AC_DEFINE([HAVE_DETECT_DISABLED], [1], [Detection is disabled])] + ]) + # libraries AC_MSG_CHECKING([for Mpipe]) @@ -1631,6 +1638,7 @@ SURICATA_BUILD_CONF="Suricata Configuration: DAG enabled: ${enable_dag} Napatech enabled: ${enable_napatech} Unix socket enabled: ${enable_unixsocket} + Detection enabled: ${enable_detection} libnss support: ${enable_nss} libnspr support: ${enable_nspr} diff --git a/src/suricata.c b/src/suricata.c index f5ad18581b..fd529ece90 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -927,7 +927,11 @@ static void SCInstanceInit(SCInstance *suri) suri->verbose = 0; /* use -1 as unknown */ suri->checksum_validation = -1; - suri->disabled_detect = 0; +#if HAVE_DETECT_DISABLED==1 + g_detect_disabled = suri->disabled_detect = 1; +#else + g_detect_disabled = suri->disabled_detect = 0; +#endif } static TmEcode PrintVersion()