]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
coccinelle: add --disable-coccinelle to configure 770/head
authorVictor Julien <victor@inliniac.net>
Tue, 14 Jan 2014 12:41:09 +0000 (13:41 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 14 Jan 2014 12:41:09 +0000 (13:41 +0100)
This allows disabling of the expensive cocci QA checks during
QA.

configure.ac

index 619b53c78df340c54895a800665263fd4f8ec135..ccef2dad81316e5204eedfaa4c56842fcacb820a 100644 (file)
         exit 1
     fi
 
-    AC_PATH_PROG(HAVE_COCCINELLE_CONFIG, spatch, "no")
-    if test "$HAVE_COCCINELLE_CONFIG" = "no"; then
-        echo
-        echo "   Warning! spatch not found, you will not be "
-        echo "   able to run code checking with coccinelle  "
-        echo "   get it from http://coccinelle.lip6.fr      "
-        echo "   or install from your distribution          "
-        echo
-    fi
-    AM_CONDITIONAL([HAVE_COCCINELLE], [test "$HAVE_COCCINELLE_CONFIG" != "no"])
-
     AC_PATH_PROG(HAVE_PYTHON_CONFIG, python, "no")
     if test "$HAVE_PYTHON_CONFIG" = "no"; then
         echo
         CFLAGS="$CFLAGS -DIPFW"
     ])
 
+    AC_ARG_ENABLE(coccinelle,
+           AS_HELP_STRING([--disable-coccinelle], [Disable coccinelle QA steps during make check])],,[enable_coccinelle=yes])
+    AS_IF([test "x$enable_coccinelle" = "xyes"], [
+        AC_PATH_PROG(HAVE_COCCINELLE_CONFIG, spatch, "no")
+        if test "$HAVE_COCCINELLE_CONFIG" = "no"; then
+            echo "   Warning! spatch not found, you will not be "
+            echo "   able to run code checking with coccinelle  "
+            echo "   get it from http://coccinelle.lip6.fr      "
+            echo "   or install from your distribution          "
+        fi
+    ])
+    AM_CONDITIONAL([HAVE_COCCINELLE], [test "x$enable_coccinelle" != "xno"])
+
 # libraries
 
     AC_MSG_CHECKING([for Mpipe])
@@ -1641,6 +1643,7 @@ SURICATA_BUILD_CONF="Suricata Configuration:
   Debug validation enabled:                ${enable_debug_validation}
   Profiling enabled:                       ${enable_profiling}
   Profiling locks enabled:                 ${enable_profiling_locks}
+  Coccinelle / spatch:                     ${enable_coccinelle}
 
 Generic build parameters:
   Installation prefix (--prefix):          ${prefix}