From: Sascha Schumann Date: Sat, 26 Jun 1999 00:34:36 +0000 (+0000) Subject: add dmalloc X-Git-Tag: BEFORE_REMOVING_GC_STEP1~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ec71637961fccd8bd2095b44481cf923b7fdddf;p=php add dmalloc --- diff --git a/acconfig.h.in b/acconfig.h.in index 55c94a3790..b89717449d 100644 --- a/acconfig.h.in +++ b/acconfig.h.in @@ -10,6 +10,8 @@ #define CONFIGURATION_FILE_PATH "php3.ini" #define USE_CONFIG_FILE 1 +#undef HAVE_DMALLOC + /* Some global constants defined by conigure */ #undef PHP_BUILD_DATE #undef PHP_OS diff --git a/configure.in.in b/configure.in.in index 5e70749521..1a8ef8a8e5 100644 --- a/configure.in.in +++ b/configure.in.in @@ -838,6 +838,19 @@ AC_ARG_ENABLE(url-fopen-wrapper, AC_MSG_RESULT(yes) ]) +DMALLOC_RESULT=no +AC_MSG_CHECKING(whether to enable dmalloc) +AC_ARG_ENABLE(dmalloc, +[ --enable-dmalloc Enable dmalloc], +[ + if test "$enableval" = "yes" ; then + AC_DEFINE(HAVE_DMALLOC, 1) + AC_ADD_LIBRARY(dmalloc) + CFLAGS="$CFLAGS -DDMALLOC_FUNC_CHECK" + DMALLOC_RESULT=yes + fi +]) +AC_MSG_RESULT($DMALLOC_RESULT) divert(3) diff --git a/main/php.h b/main/php.h index 8872f198a0..75e392d567 100644 --- a/main/php.h +++ b/main/php.h @@ -33,6 +33,10 @@ #ifndef _PHP_H #define _PHP_H +#ifdef HAVE_DMALLOC +#include +#endif + #define PHP_API_VERSION 19990421 #define YYDEBUG 0