diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-11-17 01:43:36 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-11-18 10:19:13 +0000 |
commit | 6f3e8d6297c3904dd72168d0846bdad49fa6a8b5 (patch) | |
tree | 8556814cd2d07ecf9fd90b089d6437ba775d398a | |
parent | db5dae6c991f9dc69203ca96e1a21715c95eb3cc (diff) |
add --enable-sanitize config option
Change-Id: I12b7b0e751f274a05e88c79299fd8388667cc542
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index d72a026..ef234c5 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,18 @@ AC_CONFIG_MACRO_DIR([m4]) dnl checks for header files AC_HEADER_STDC +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_ARG_ENABLE([external_tests], AC_HELP_STRING([--enable-external-tests], [Include the VTY/CTRL tests in make check [default=no]]), |