aboutsummaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/configure.in b/src/configure.in
index 7ef0c62..433e9d1 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -399,6 +399,27 @@ if test "$enableval" = no ; then
fi
KRB5_RUN_FLAGS
+# asan is a gcc and clang facility to instrument the code with memory
+# error checking. To use it, we compile C and C++ source files with
+# -fsanitize=address, and set ASAN=yes to suppress the undefined
+# symbols check when building shared libraries.
+AC_ARG_ENABLE([asan],
+AC_HELP_STRING([--enable-asan],[Build with asan memory checking]),[],
+ [enable_asan=no])
+if test "$enable_asan" != no; then
+ if test "$enable_asan" = yes; then
+ enable_asan=address
+ fi
+ ASAN_FLAGS="$DEFS -fsanitize=$enable_asan"
+ ASAN=yes
+ UNDEF_CHECK=
+else
+ ASAN_FLAGS=
+ ASAN=no
+fi
+AC_SUBST(ASAN_FLAGS)
+AC_SUBST(ASAN)
+
AC_TYPE_SIGNAL
# from old include/configure.in