From e751e24250fda31dde52b3c65ca79f86142dc789 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 22 Jun 2017 09:42:19 +0200 Subject: --enable-optimized should be orthogonal to --enable-debug/--enable-dbgutil Change-Id: I277f30129560ea9fa76d6439a60bb191358df99d Reviewed-on: https://gerrit.libreoffice.org/39088 Reviewed-by: Stephan Bergmann Tested-by: Stephan Bergmann --- configure.ac | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c68105505bfa..c71a9469d821 100644 --- a/configure.ac +++ b/configure.ac @@ -1164,6 +1164,12 @@ libo_FUZZ_ARG_ENABLE(symbols, By default, enabled for --enable-debug and --enable-dbgutil, disabled otherwise.])) +libo_FUZZ_ARG_ENABLE(optimized, + AS_HELP_STRING([--disable-optimized], + [Whether to compile with optimization flags. + By default, disabled for --enable-debug and --enable-dbgutil, enabled + otherwise.])) + libo_FUZZ_ARG_ENABLE(runtime-optimizations, AS_HELP_STRING([--disable-runtime-optimizations], [Statically disable certain runtime optimizations (like rtl/alloc.h or @@ -3924,6 +3930,23 @@ if test "$enable_release_build" != yes -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE fi AC_SUBST(XCODE_DEBUG_INFORMATION_FORMAT) +AC_MSG_CHECKING([whether to compile with optimization flags]) +if test -z "$enable_optimized"; then + if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then + enable_optimized=no + else + enable_optimized=yes + fi +fi +if test "$enable_optimized" != no; then + ENABLE_OPTIMIZED=TRUE + AC_MSG_RESULT([yes]) +else + ENABLE_OPTIMIZED= + AC_MSG_RESULT([no]) +fi +AC_SUBST(ENABLE_OPTIMIZED) + # # determine CPUNAME, OS, ... # The USING_X11 flag tells whether the host os uses X by default. Can be overridden with the --without-x option. -- cgit v1.2.3