]> granicus.if.org Git - php/commitdiff
add dmalloc
authorSascha Schumann <sas@php.net>
Sat, 26 Jun 1999 00:34:36 +0000 (00:34 +0000)
committerSascha Schumann <sas@php.net>
Sat, 26 Jun 1999 00:34:36 +0000 (00:34 +0000)
acconfig.h.in
configure.in.in
main/php.h

index 55c94a3790fc5971b99c1eca4021bf431692f245..b89717449d1ac1a572026f212123967bbf446226 100644 (file)
@@ -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
index 5e707495210906c281383a5b15642ea3d4f05547..1a8ef8a8e51fb95a44205df55a6199c346f5e426 100644 (file)
@@ -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)
 
index 8872f198a05f52960f8b1b3269bc3d0aefcdbb7b..75e392d567412bab12c0fdec379a3f3e94267fe8 100644 (file)
 #ifndef _PHP_H
 #define _PHP_H
 
+#ifdef HAVE_DMALLOC
+#include <dmalloc.h>
+#endif
+
 #define PHP_API_VERSION 19990421
 
 #define YYDEBUG 0