summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-06-26 00:34:36 +0000
committerSascha Schumann <sas@php.net>1999-06-26 00:34:36 +0000
commit6ec71637961fccd8bd2095b44481cf923b7fdddf (patch)
tree33ec1e64ee664c3894050d73c9178908cf3c1847
parentf3ef2ff1d087d0846af4f84ce44350f7f1770789 (diff)
downloadphp-git-6ec71637961fccd8bd2095b44481cf923b7fdddf.tar.gz
add dmalloc
-rw-r--r--acconfig.h.in2
-rw-r--r--configure.in.in13
-rw-r--r--main/php.h4
3 files changed, 19 insertions, 0 deletions
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 <dmalloc.h>
+#endif
+
#define PHP_API_VERSION 19990421
#define YYDEBUG 0