aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-11-17 01:43:36 +0100
committerHarald Welte <laforge@gnumonks.org>2017-11-18 10:16:46 +0000
commit7cec38852a8dbe3b2118c1d71d54fd3f9917d61a (patch)
treea41a12858e6ec6e912ff4b5952c8aec49a6640d9
parentf1521a14df442e247ab2a8d36316d44dfecc70db (diff)
add --enable-sanitize config option
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 601b438ea..f96524066 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,18 @@ PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp)
PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5)
PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0)
+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
+
# Enable/disable smpp support in the msc?
AC_ARG_ENABLE([smpp], [AS_HELP_STRING([--enable-smpp], [Build the SMPP interface])],
[osmo_ac_build_smpp="$enableval"],[osmo_ac_build_smpp="no"])