summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-22 09:42:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-22 11:59:14 +0200
commite751e24250fda31dde52b3c65ca79f86142dc789 (patch)
tree243df56115fe55419a1a4919c2b94890620eda3b /configure.ac
parenta56ca5cfed0303157d1c4c28c00545204b7b03b5 (diff)
--enable-optimized should be orthogonal to --enable-debug/--enable-dbgutil
Change-Id: I277f30129560ea9fa76d6439a60bb191358df99d Reviewed-on: https://gerrit.libreoffice.org/39088 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
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.