]> granicus.if.org Git - php/commitdiff
Added a check for libdmalloc whether it works (is found..) or not.
authorfoobar <sniper@php.net>
Sat, 18 Aug 2001 18:14:22 +0000 (18:14 +0000)
committerfoobar <sniper@php.net>
Sat, 18 Aug 2001 18:14:22 +0000 (18:14 +0000)
# We should always test every library (when possible) before
# adding them..

configure.in

index 2fb70db52ad64aceef18ba494548eba00ebcfd6b..323512af3cb60b0f4602bf94e222a8deb7d37a28 100644 (file)
@@ -609,9 +609,14 @@ PHP_ARG_ENABLE(dmalloc,whether to enable dmalloc,
 [  --enable-dmalloc        Enable dmalloc])
 
 if test "$PHP_DMALLOC" = "yes"; then
-  AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
-  PHP_ADD_LIBRARY(dmalloc)
-  CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
+  
+  AC_CHECK_LIB(dmalloc, dmalloc_error, [
+    PHP_ADD_LIBRARY(dmalloc)
+    AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
+    CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
+  ], [
+    AC_MSG_ERROR(Problem with enabling dmalloc. Please check config.log for details.)
+  ])
 fi
 
 # temporary until streams are better integrated