diff options
-rw-r--r-- | .github/workflows/ci.yml | 7 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | contrib/dlmalloc/Makefile.am | 6 | ||||
-rw-r--r-- | m4/ax_check_enable_debug.m4 (renamed from m4/m4_ax_check_enable_debug.m4) | 0 |
4 files changed, 11 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 336b15e..d0566cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,8 @@ jobs: - name: Configure Build run: | autoreconf -i - ./configure --with-interface=${{ matrix.interface }} --enable-html-manual ${{ matrix.compiler }} + ./configure --with-interface=${{ matrix.interface }} --enable-debug --enable-html-manual \ + ${{ matrix.compiler }} # NOTE: xvfb-run emulates an XServer and is required when building # Gtk versions (since SciTECO calls itself during the build). @@ -75,7 +76,7 @@ jobs: CXX: clang++ run: | autoreconf -i - ./configure --with-interface=ncurses --enable-html-manual + ./configure --with-interface=ncurses --enable-debug --enable-html-manual - run: make - run: make install @@ -124,7 +125,7 @@ jobs: PDCURSES_CFLAGS: -I/mingw32/include/pdcurses/ run: | autoreconf -i - ./configure --with-interface=pdcurses-gui --enable-html-manual + ./configure --with-interface=pdcurses-gui --enable-debug --enable-html-manual - run: make - run: make install 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. diff --git a/contrib/dlmalloc/Makefile.am b/contrib/dlmalloc/Makefile.am index f9e35dd..223ed13 100644 --- a/contrib/dlmalloc/Makefile.am +++ b/contrib/dlmalloc/Makefile.am @@ -8,8 +8,10 @@ # for increased portability. There is also AC_LIBOBJ, but it's usually for defining sources of # replacement libraries. -AM_CPPFLAGS = -DINSECURE='defined(NDEBUG)' -DNO_MALLINFO=1 -DNO_MALLOC_STATS=1 \ - -DUSE_LOCKS=1 -DUSE_DL_PREFIX +AM_CPPFLAGS = -DNO_MALLINFO=1 -DNO_MALLOC_STATS=1 -DUSE_LOCKS=1 -DUSE_DL_PREFIX +if !DEBUG +AM_CPPFLAGS += -DINSECURE=1 +endif # FIXME: This optimization is still broken as of GCC v9.3.0. # This is a known GCC bug, triggered by memset() in calloc(). diff --git a/m4/m4_ax_check_enable_debug.m4 b/m4/ax_check_enable_debug.m4 index 7bc7710..7bc7710 100644 --- a/m4/m4_ax_check_enable_debug.m4 +++ b/m4/ax_check_enable_debug.m4 |