Enable/disable dmalloc library support.
Peter Simons <email@example.com>
Copying and distribution of this file, with or
without modification, are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. Users of this software should generally follow the
principles of the
MIT License includings its disclaimer.
cryp.to ac-archive's Installed Packages (released)
Let the user enable/disable support for the dmalloc library
available from <http://www.dmalloc.org/>.
The macro adds the command-line flag "--with-dmalloc". Furthermore,
"-IPREFIX/include" will be added to "$CPPFLAGS", "-LPREFIX/lib" to
"$LDFLAGS", and "-DDEBUG_DMALLOC" and "-DDMALLOC_FUNC_CHECK" to
To enable dmalloc support in your code, add the following snippet
to your header files:
# include <dmalloc.h>
AC_MSG_CHECKING(whether to use the dmalloc library)
[ --with-dmalloc[=PREFIX] Compile with dmalloc library],
if test "$withval" = "" -o "$withval" = "yes"; then
CPPFLAGS="$CPPFLAGS -DDEBUG_DMALLOC -DDMALLOC_FUNC_CHECK -I$ac_cv_dmalloc/include"