diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-11-16 11:02:48 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-11-17 03:38:07 +0100 |
commit | 4325a2ac4bb723ad71f3e22dcb7acee5a23b408b (patch) | |
tree | 3ac774f9bcdf91e68e39e214fb0d7ee7b6b77d54 /configure.ac | |
parent | dfc75df19991954273c8b5e2eebe38f3d2503f00 (diff) |
add --enable-sanitize config option
Change-Id: Id9bb6cc982cd30b86f772207184398af6b899f66
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ff0501a..4c5f47f 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,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_OUTPUT( libosmo-ranap.pc src/Makefile |