add --enable-sanitize config option
Change-Id: I83c7b16baeffd3b7ae86edf87a9bb4cbb7346609
This commit is contained in:
parent
0f760a6476
commit
7c2232e0ff
13
configure.ac
13
configure.ac
|
@ -40,6 +40,19 @@ AM_CONDITIONAL(HAVE_LIBXML2, test "$found_libxml2" = yes)
|
|||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_CHECK_FUNCS([memset])
|
||||
|
||||
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([Makefile
|
||||
def_frame/Makefile
|
||||
def_list/Makefile
|
||||
|
|
Loading…
Reference in New Issue