diff options
Diffstat (limited to 'openbsc/configure.ac')
-rw-r--r-- | openbsc/configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 2c3045ae9..f1f60383b 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -124,6 +124,18 @@ AC_SUBST(found_sqlite3) 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 + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " @@ -201,6 +213,9 @@ AC_MSG_CHECKING([whether to enable VTY/CTRL tests]) AC_MSG_RESULT([$enable_ext_tests]) AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes") +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + dnl Generate the output AM_CONFIG_HEADER(bscconfig.h) |