From 99db9f2295eb9a8b3288df9798a292b8d6e1b854 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 8 Jul 2016 18:29:01 +0200 Subject: Make --enable-symbols orthogonal to --enable-debug/-dbgutil Change-Id: I523bc1d848e40489370eefe00046e0a257ed2505 Reviewed-on: https://gerrit.libreoffice.org/27058 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- configure.ac | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 11bb4680446c..a91de785034a 100644 --- a/configure.ac +++ b/configure.ac @@ -1150,9 +1150,9 @@ AC_ARG_ENABLE(selective-debuginfo, AC_ARG_ENABLE(symbols, AS_HELP_STRING([--enable-symbols], - [Include debugging symbols in output while preserve optimization. - This enables -g compiler flag for GCC or equivalent, - without changing anything else compared to productive code.])) + [Generate debug information. + By default, enabled for --enable-debug and --enable-dbgutil, disabled + otherwise.])) AC_ARG_ENABLE(runtime-optimizations, AS_HELP_STRING([--disable-runtime-optimizations], @@ -4034,14 +4034,16 @@ AC_SUBST(ENABLE_DEBUGINFO_FOR) dnl Check for enable symbols option dnl =================================================================== -AC_MSG_CHECKING([whether to include symbols while preserve optimization]) -if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then - ENABLE_SYMBOLS="TRUE" - if test -n "$ENABLE_DBGUTIL"; then - AC_MSG_ERROR([--enable-dbgutil cannot be used with --enable-symbols]) - elif test -n "$ENABLE_DEBUG"; then - AC_MSG_ERROR([--enable-debug cannot be used with --enable-symbols]) +AC_MSG_CHECKING([whether to generate debug information]) +if test -z "$enable_symbols"; then + if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then + enable_symbols=yes + else + enable_symbols=no fi +fi +if test "$enable_symbols" != no; then + ENABLE_SYMBOLS=TRUE AC_MSG_RESULT([yes]) else ENABLE_SYMBOLS= -- cgit