aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-24 01:15:59 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-24 01:35:11 +0300
commitaa00bf10d986bf3a022c33be1cb79fdd4dadf438 (patch)
tree50ba7105aba8c31bd65fa30718391696b5cf5f6a /configure.ac
parent017200d18f798071d455b6f82ba77189b58c5791 (diff)
downloadsciteco-aa00bf10d986bf3a022c33be1cb79fdd4dadf438.tar.gz
added ./configure --enable-debug and make sure that NDEBUG is defined properly
* This simplifies writing CFLAGS="-g -O0" CXXFLAGS="-g -O0". * We build "release" binaries by default. NDEBUG will now be defined unless you specify --enable-debug. This enables some optimizations that have long been implemented but were never actually active: * SciTECO shuts down faster since it will not explicitly free memory. On the downside, this would complicate memory debugging with Valgrind/memcheck. * dlmalloc is built with -DINSECURE=1 which is supposedly a bit faster. Some compilers also complained about an unportable preprocessor usage which should now be gone. * All CI builds are now with --enable-debug. This will slow them down but ensure that more code is executed and thus tested.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f1fbd45..a1dab35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,9 @@ AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
+AX_CHECK_ENABLE_DEBUG
+AM_CONDITIONAL(DEBUG, [test x$ax_enable_debug != xno])
+
# Use the user provided CXXFLAGS for Scintilla as well.
# This makes sure that the same optimizations are applied
# to SciTECO and Scintilla.