diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2022-04-14 16:43:43 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2022-04-14 16:43:43 +0000 |
commit | bddcaddd71aa306d9c5a606bc7ece6e2812925c5 (patch) | |
tree | cacfd28f1b6b5861bfa32dfeb9551fabcb76bf3c /configure | |
parent | 525559c24a4e02693f443d611b8920564a497f85 (diff) | |
download | mandoc-bddcaddd71aa306d9c5a606bc7ece6e2812925c5.tar.gz |
support for hunting memory leaks;
designed and written last autumn, polished today
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -37,6 +37,7 @@ SOURCEDIR=`dirname "${0}"` MANPATH_BASE="/usr/share/man:/usr/X11R6/man" MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" +DEBUG_MEMORY=0 OSENUM= OSNAME= UTF8_LOCALE= @@ -99,6 +100,7 @@ NEED_GNU_SOURCE=0 NEED_OPENBSD_SOURCE=0 NEED_XPG4_2=0 +DEBUG_OBJS= MANDOC_COBJS= SOELIM_COBJS= @@ -334,6 +336,7 @@ runtest vasprintf VASPRINTF "" -D_GNU_SOURCE || true # --- fts --- if [ "${1}" = "-depend" ]; then + DEBUG_MEMORY=1 HAVE_FTS=0 HAVE_FTS_COMPARE_CONST=0 echo "tested fts: HAVE_FTS=0 (for make depend)" 1>&2 @@ -461,6 +464,10 @@ echo echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\"" echo "#define MANPATH_BASE \"${MANPATH_BASE}\"" echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\"" +if [ ${DEBUG_MEMORY} -ne 0 ]; then + echo "#define DEBUG_MEMORY ${DEBUG_MEMORY}" + DEBUG_OBJS=mandoc_dbg.o +fi echo "#define OSENUM ${OSENUM}" [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\"" [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\"" @@ -640,6 +647,7 @@ CC = ${CC} CFLAGS = ${CFLAGS} LDADD = ${LDADD} LDFLAGS = ${LDFLAGS} +DEBUG_OBJS = ${DEBUG_OBJS} MANDOC_COBJS = ${MANDOC_COBJS} SOELIM_COBJS = ${SOELIM_COBJS} STATIC = ${STATIC} |