2008-08-27 20:38:55 +00:00
|
|
|
dnl
|
2019-10-07 22:44:08 +00:00
|
|
|
dnl Debugging
|
2008-08-27 20:38:55 +00:00
|
|
|
dnl
|
2010-08-10 20:27:12 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE([debug],
|
2010-04-06 12:46:19 +00:00
|
|
|
AC_HELP_STRING([--enable-debug],[compile with debug information (no)]),
|
2010-08-10 20:27:12 +00:00
|
|
|
[],
|
|
|
|
[enable_debug=no])
|
|
|
|
|
2019-10-07 22:44:08 +00:00
|
|
|
if test x"$enable_debug" = xyes ; then
|
|
|
|
opt_features_yes="$opt_features_yes\n * debugging information"
|
|
|
|
else
|
|
|
|
opt_features_no="$opt_features_no\n * debugging information"
|
|
|
|
fi
|
|
|
|
|
|
|
|
USE_DEBUG=$enable_debug
|
|
|
|
AC_SUBST(USE_DEBUG)
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Profiling
|
|
|
|
dnl
|
|
|
|
|
2010-08-10 20:27:12 +00:00
|
|
|
AC_ARG_ENABLE([profiling],
|
2010-04-06 12:46:19 +00:00
|
|
|
AC_HELP_STRING([--enable-profiling],[compile with profiling information (no)]),
|
2010-08-10 20:27:12 +00:00
|
|
|
[],
|
|
|
|
[enable_profiling=no])
|
|
|
|
|
2019-10-07 22:44:08 +00:00
|
|
|
if test x"$enable_profiling" = xyes ; then
|
|
|
|
opt_features_yes="$opt_features_yes\n * profiling support"
|
|
|
|
else
|
|
|
|
opt_features_no="$opt_features_no\n * profiling support"
|
|
|
|
fi
|
|
|
|
|
|
|
|
USE_PROFILING=$enable_profiling
|
|
|
|
AC_SUBST(USE_PROFILING)
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Optimization
|
|
|
|
dnl
|
|
|
|
|
2010-08-21 11:53:20 +00:00
|
|
|
AC_ARG_ENABLE([optimization],
|
|
|
|
AC_HELP_STRING([--enable-optimization],[compile with optimization: -O3 (yes)]),
|
|
|
|
[],
|
|
|
|
[if test x"$enable_debug" = xyes ; then
|
|
|
|
enable_optimization=no
|
|
|
|
else
|
|
|
|
enable_optimization=yes
|
|
|
|
fi])
|
|
|
|
|
|
|
|
if test x"$enable_optimization" = xyes; then
|
2017-11-18 09:24:16 +00:00
|
|
|
if test $COMPILER_TYPE = clang && ! check_version 3.8.0 $COMPILER_VERSION; then
|
2019-10-07 22:44:08 +00:00
|
|
|
opt_features_yes="$opt_features_yes\n * partial optimizations: due to bug 11962 in LLVM/clang only -O1 will be used for optimization"
|
2015-10-21 19:16:32 +00:00
|
|
|
|
2017-11-18 09:24:16 +00:00
|
|
|
elif test "x$ac_cv_mingw32" = "xyes" -a "x$MINGW_PROCESSOR_ARCH" = "xx86" && check_version 5.1.0 $COMPILER_VERSION && ! check_version 7.2.0 $COMPILER_VERSION; then
|
2019-10-07 22:44:08 +00:00
|
|
|
opt_features_yes="$opt_features_yes\n * partial optimizations: due to an issue in mingw g++ >= 5.1.0 and < 7.2.0 full optimization cannot be used"
|
2015-10-21 19:16:32 +00:00
|
|
|
|
2012-09-02 11:25:57 +00:00
|
|
|
else
|
2019-10-07 22:44:08 +00:00
|
|
|
opt_features_yes="$opt_features_yes\n * compiler optimizations"
|
2016-12-22 16:50:57 +00:00
|
|
|
|
2019-10-07 22:44:08 +00:00
|
|
|
fi
|
2013-01-15 19:47:09 +00:00
|
|
|
else
|
|
|
|
opt_features_no="$opt_features_no\n * compiler optimizations"
|
2010-08-10 20:27:12 +00:00
|
|
|
fi
|
|
|
|
|
2019-10-07 22:44:08 +00:00
|
|
|
USE_OPTIMIZATION=$enable_optimization
|
|
|
|
AC_SUBST(USE_OPTIMIZATION)
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Address sanitizer
|
|
|
|
dnl
|
2008-08-27 20:38:55 +00:00
|
|
|
|
2017-07-15 14:59:58 +00:00
|
|
|
AC_ARG_ENABLE([addrsan],
|
|
|
|
AC_HELP_STRING([--enable-addrsan],[compile with address sanitization turned on (no)]),
|
2019-10-07 22:44:08 +00:00
|
|
|
[],[enable_addrsan=no])
|
2017-07-15 14:59:58 +00:00
|
|
|
|
2019-10-07 22:44:08 +00:00
|
|
|
if test x"$enable_addrsan" = xyes ; then
|
2017-07-15 14:59:58 +00:00
|
|
|
opt_features_yes="$opt_features_yes\n * development technique 'address sanitizer'"
|
|
|
|
else
|
|
|
|
opt_features_no="$opt_features_no\n * development technique 'address sanitizer'"
|
|
|
|
fi
|
|
|
|
|
2019-10-07 22:44:08 +00:00
|
|
|
USE_ADDRSAN=$enable_addrsan
|
|
|
|
AC_SUBST(USE_ADDRSAN)
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Undefined behavior sanitizer
|
|
|
|
dnl
|
|
|
|
|
2017-07-15 14:59:58 +00:00
|
|
|
AC_ARG_ENABLE([ubsan],
|
|
|
|
AC_HELP_STRING([--enable-ubsan],[compile with sanitization for undefined behavior turned on (no)]),
|
2019-10-08 17:45:03 +00:00
|
|
|
[],[enable_ubsan=no])
|
2017-07-15 14:59:58 +00:00
|
|
|
|
2021-04-07 22:06:17 +00:00
|
|
|
if test x"$enable_ubsan" = xyes ; then
|
2017-07-15 14:59:58 +00:00
|
|
|
opt_features_yes="$opt_features_yes\n * development technique 'undefined behavior sanitizer'"
|
|
|
|
else
|
|
|
|
opt_features_no="$opt_features_no\n * development technique 'undefined behavior sanitizer'"
|
|
|
|
fi
|
|
|
|
|
2019-10-07 22:44:08 +00:00
|
|
|
USE_UBSAN=$enable_ubsan
|
|
|
|
AC_SUBST(USE_UBSAN)
|