diff options
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 4c47c39..a87e5d2 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -592,6 +592,42 @@ AC_DEFUN(SC_CONFIG_MANPAGES, [ AC_SUBST(MKLINKS_FLAGS) ]) +#------------------------------------------------------------------------ +# SC_ENABLE_MEMDEBUG -- +# +# Specify if the memory debugging code should be used +# +# Arguments: +# none +# +# Requires the following vars to be set in the Makefile: +# None. +# +# Results: +# +# Adds the following arguments to configure: +# --enable-memdebug +# +# Defines the following @vars@: +# MEM_DEBUG_FLAGS Sets to -DTCL_MEM_DEBUG if true +# Sets to "" if false +# +#------------------------------------------------------------------------ + +AC_DEFUN(SC_ENABLE_MEMDEBUG, [ + AC_MSG_CHECKING([for build with memory debugging]) + AC_ARG_ENABLE(memdebug, [ --enable-memdebug build with memory debugging [--disable-memdebug]], [tcl_ok=$enableval], [tcl_ok=no]) + if test "$tcl_ok" = "yes"; then + MEM_DEBUG_FLAGS=-DTCL_MEM_DEBUG + AC_MSG_RESULT([yes]) + else + MEM_DEBUG_FLAGS="" + AC_MSG_RESULT([no]) + fi + AC_SUBST(MEM_DEBUG_FLAGS) +]) + + #-------------------------------------------------------------------- # SC_CONFIG_CFLAGS # |