Changeset View
Changeset View
Standalone View
Standalone View
configure.ac
Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | AC_ARG_ENABLE(man, | ||||
[AS_HELP_STRING([--disable-man], | [AS_HELP_STRING([--disable-man], | ||||
[do not install man pages (default is to install)])],, | [do not install man pages (default is to install)])],, | ||||
enable_man=yes) | enable_man=yes) | ||||
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no) | AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no) | ||||
# Enable debug | # Enable debug | ||||
AC_ARG_ENABLE([debug], | AC_ARG_ENABLE([debug], | ||||
[AS_HELP_STRING([--enable-debug], | [AS_HELP_STRING([--enable-debug], | ||||
[use debug compiler flags and macros (default is no)])], | [use compiler flags and macros suited for debugging (default is no)])], | ||||
[enable_debug=$enableval], | [enable_debug=$enableval], | ||||
[enable_debug=no]) | [enable_debug=no]) | ||||
# Enable different -fsanitize options | # Enable different -fsanitize options | ||||
AC_ARG_WITH([sanitizers], | AC_ARG_WITH([sanitizers], | ||||
[AS_HELP_STRING([--with-sanitizers], | [AS_HELP_STRING([--with-sanitizers], | ||||
[comma separated list of extra sanitizers to build with (default is none enabled)])], | [comma separated list of extra sanitizers to build with (default is none enabled)])], | ||||
[use_sanitizers=$withval]) | [use_sanitizers=$withval]) | ||||
Show All 9 Lines | |||||
AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""]) | AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""]) | ||||
if test "x$enable_debug" = xyes; then | if test "x$enable_debug" = xyes; then | ||||
# Clear default -g -O2 flags | # Clear default -g -O2 flags | ||||
if test "x$CXXFLAGS_overridden" = xno; then | if test "x$CXXFLAGS_overridden" = xno; then | ||||
CXXFLAGS="" | CXXFLAGS="" | ||||
fi | fi | ||||
# Prefer -Og, fall back to -O0 if that is unavailable. | # Disable all optimizations | ||||
AX_CHECK_COMPILE_FLAG( | AX_CHECK_COMPILE_FLAG([-O0], [[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"]],,[[$CXXFLAG_WERROR]]) | ||||
[-Og], | |||||
[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -Og"]], | |||||
[AX_CHECK_COMPILE_FLAG([-O0],[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"]],,[[$CXXFLAG_WERROR]])], | |||||
[[$CXXFLAG_WERROR]]) | |||||
# Prefer -g3, fall back to -g if that is unavailable. | # Prefer -g3, fall back to -g if that is unavailable. | ||||
AX_CHECK_COMPILE_FLAG( | AX_CHECK_COMPILE_FLAG( | ||||
[-g3], | [-g3], | ||||
[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g3"]], | [[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g3"]], | ||||
[AX_CHECK_COMPILE_FLAG([-g],[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"]],,[[$CXXFLAG_WERROR]])], | [AX_CHECK_COMPILE_FLAG([-g],[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"]],,[[$CXXFLAG_WERROR]])], | ||||
[[$CXXFLAG_WERROR]]) | [[$CXXFLAG_WERROR]]) | ||||
▲ Show 20 Lines • Show All 1,099 Lines • Show Last 20 Lines |