Commit 394075b6 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Add build options for address sanitizer and C++ STL debug checks.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 1eabbe22
......@@ -90,6 +90,27 @@ AC_DEFINE_UNQUOTED(HAVE_FFMPEG, $HAVE_FFMPEG, [whether ffmpeg libs are available
AM_CONDITIONAL([COND_WITH_FFMPEG], [test "x$with_ffmpeg" != "xno"])
dnl -------------------------------------------------------------------------
dnl -------------------- address sanitizer ----------------------------------
AC_ARG_ENABLE([asan], [AS_HELP_STRING([--enable-asan], [build using address sanitizer])],
[
CXXFLAGS="$CXXFLAGS -fsanitize=address -fno-omit-frame-pointer -fstack-protector-all -fno-inline"
LDFLAGS="$LDFLAGS -lasan"
],
[
enable_asan=no
])
dnl -------------------------------------------------------------------------
dnl -------------------- glibcxx assertions ----------------------------------
AC_ARG_ENABLE(debug-cxx,AS_HELP_STRING([--enable-debug-cxx], [setup compiler flags to do C++ STL debug checks]),
[
CXXFLAGS="$CXXFLAGS -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC"
],
[
enable_debug_cxx=no
])
dnl -------------------------------------------------------------------------
# need c++14 mode
AX_CXX_COMPILE_STDCXX_14(ext)
......@@ -111,4 +132,6 @@ echo
echo "---------------------------------------------------------------------------"
echo "$PACKAGE_NAME $PACKAGE_VERSION"
echo "---------------------------------------------------------------------------"
echo " * use ffmpeg libs: $with_ffmpeg (required for HLS)"
echo " Use address sanitizer. .: $enable_asan (for debugging)"
echo " Use stdc++ debug mode .: $enable_debug_cxx (for debugging)"
echo " Use ffmpeg libs. . . . .: $with_ffmpeg (required for HLS)"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment