diff --git a/configure.ac b/configure.ac index 98948498fd..1b94f7851a 100644 --- a/configure.ac +++ b/configure.ac @@ -2098,6 +2098,11 @@ ]) AC_SUBST(RUST_FEATURES) + AC_ARG_ENABLE(rust_debug, + AS_HELP_STRING([--enable-rust-debug], [Rust not in --release mode]),,[enable_rust_debug=no]) + AM_CONDITIONAL([RUST_DEBUG], [test "x$enable_rust_debug" = "xyes"]) + AC_SUBST(RUST_DEBUG) + # get revision if test -f ./revision; then REVISION=`cat ./revision` @@ -2212,6 +2217,7 @@ SURICATA_BUILD_CONF="Suricata Configuration: Rust support (experimental): ${enable_rust} Experimental Rust parsers: ${enable_rust_experimental} Rust strict mode: ${enable_rust_strict} + Rust debug mode: ${enable_rust_debug} Suricatasc install: ${enable_python} diff --git a/rust/Makefile.am b/rust/Makefile.am index 52ec5a2602..370924603b 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -15,9 +15,11 @@ if HAVE_RUST_VENDOR FROZEN = --frozen endif +if !RUST_DEBUG if !DEBUG RELEASE = --release endif +endif if HAVE_LUA RUST_FEATURES += lua