aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-02-20 18:24:03 +0100
committerMax <msuraev@sysmocom.de>2017-02-20 18:24:03 +0100
commit8a3be282ab265a2587608e471b274dda200eae84 (patch)
treef6d495353f903be477d05a42a50fa358d013a881 /configure.ac
parent254745880bb2ff7f17fe158fb7bfb5e1dc530906 (diff)
Enable sanitize
Add ./configure option to enable ASAN checks and use it for jenkins tests. While at it - also move to /bin/sh shebang as we don't use bashisms anyway. Change-Id: Ie26e54ab6b850c9adf124a6bc613ec9bc9e8a6e2
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f463c2e..99d83f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,18 @@ PKG_CHECK_MODULES(ORTP, ortp >= 0.22.0)
AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be built))
+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+=" -fsanitize=address -fsanitize=undefined"
+ CPPFLAGS+=" -fsanitize=address -fsanitize=undefined"
+fi
+
AC_OUTPUT(
libosmoabis.pc
libosmotrau.pc