diff options
author | Max <msuraev@sysmocom.de> | 2017-12-21 17:27:34 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-12-21 17:27:34 +0100 |
commit | b2f0b62cd4603b8aa12172423e9c32408e048560 (patch) | |
tree | fcc9cdd7913e598eab78cb5d87f12b11c34efc0b /configure.ac | |
parent | 327e121a0f2b1e816cc59d1337e6f2034553f2b8 (diff) |
Add --enable-sanitize configure option
Change-Id: Idb2c1d6057012ed2f032e7504387a0767d02d75b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3533af9e..5867cbe5 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,15 @@ AC_HEADER_STDC dnl Checks for typedefs, structures and compiler characteristics +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 + dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.1) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) |