aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-08 21:31:04 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-09 19:24:18 +0200
commite5d49ebf13899a09db031403df6bdce2d845853c (patch)
tree55abf142a1436b7b7ff55482225e9f1cb64d5ea1 /configure.ac
parentdd36439cc88315c53ba8beeca751ac4e7cd40e11 (diff)
downloadsciteco-e5d49ebf13899a09db031403df6bdce2d845853c.tar.gz
define G_DISABLE_ASSERT unless --enable-debug is specified
* turns out that glib's g_assert() does not depend on NDEBUG like Standard C's assert() * this disables assertions in release builds and should speed up things slightly
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3606803..8ad8288 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,6 +23,10 @@ AC_CANONICAL_HOST
AX_CHECK_ENABLE_DEBUG
AM_CONDITIONAL(DEBUG, [test x$ax_enable_debug != xno])
+if [[ x$ax_enable_debug = xno ]]; then
+ # glib does not look at NDEBUG
+ AC_DEFINE(G_DISABLE_ASSERT, 1, [Disable g_assert()])
+fi
# Use the user provided CXXFLAGS for Scintilla as well.
# This makes sure that the same optimizations are applied