diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-10-08 13:39:51 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-10-08 13:39:51 +0200 |
commit | e241eada5581a9914b31caca2d60fdfc9e9b1b6c (patch) | |
tree | 935d1ecf31839460c3d36835d9895d82203499ad /configure.ac | |
parent | f59fabf9dc51010899ebae705d149160be1483f8 (diff) |
configure.ac: Add --enable-sanitize flag
Change-Id: I6a3bc49142b93a35988c8763f3125d7b5ffddaef
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 5032255..b5468ee 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,18 @@ AC_PROG_RANLIB dnl checks for header files AC_HEADER_STDC +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_ARG_ENABLE(werror, [AS_HELP_STRING( [--enable-werror], |