File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ AX_VALGRIND_CHECK
4747AX_CODE_COVERAGE
4848
4949# Additional enable flags
50+ # --enable-debug
5051AC_ARG_ENABLE ( [ debug] ,
5152 [ AS_HELP_STRING ( [ --enable-debug] , [ Enable debug build (-g -O0)] ) ] ,
5253 [ enable_debug=yes] ,
@@ -58,13 +59,26 @@ if test "x$enable_debug" = "xyes"; then
5859 AC_DEFINE ( [ DEBUG] , [ 1] , [ Define if debugging is enabled] )
5960fi
6061
62+ # --disable-tool
6163AC_ARG_ENABLE ( [ tool] ,
6264 [ AS_HELP_STRING ( [ --disable-tool] , [ Do not build the asdf command-line tool] ) ] ,
6365 [ asdf_build_tool=$enableval] ,
6466 [ asdf_build_tool=yes] )
6567
6668AM_CONDITIONAL([ ASDF_BUILD_TOOL] , [ test "x$asdf_build_tool" = xyes] )
6769
70+ # --with-asan
71+ AC_ARG_WITH ( [ asan] ,
72+ [ AS_HELP_STRING ( [ --with-asan] , [ Build with AddressSanitizer support] ) ] ,
73+ [ with_asan=yes] ,
74+ [ with_asan=no] )
75+
76+ if test "x$with_asan" = "xyes"; then
77+ CFLAGS="$CFLAGS -O1 -g -fsanitize=address -fno-omit-frame-pointer"
78+ LDFLAGS="$LDFLAGS -fsanitize=address"
79+ AC_DEFINE ( [ WITH_ASAN] , [ 1] , [ Defined if building with AddressSanitizer] )
80+ fi
81+
6882# Checks for libraries.
6983# Preferably using pkg-config, could fall back on AC_SEARCH_LIBS if not
7084AC_PATH_PROG ( [ PKG_CONFIG] , [ pkg-config] , [ no] )
You can’t perform that action at this time.
0 commit comments