Skip to content

Commit e74c4e0

Browse files
author
foobar
committed
Added a check for libdmalloc whether it works (is found..) or not.
# We should always test every library (when possible) before # adding them..
1 parent d921a2a commit e74c4e0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

configure.in

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,14 @@ PHP_ARG_ENABLE(dmalloc,whether to enable dmalloc,
609609
[ --enable-dmalloc Enable dmalloc])
610610
611611
if test "$PHP_DMALLOC" = "yes"; then
612-
AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
613-
PHP_ADD_LIBRARY(dmalloc)
614-
CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
612+
613+
AC_CHECK_LIB(dmalloc, dmalloc_error, [
614+
PHP_ADD_LIBRARY(dmalloc)
615+
AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
616+
CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
617+
], [
618+
AC_MSG_ERROR(Problem with enabling dmalloc. Please check config.log for details.)
619+
])
615620
fi
616621
617622
# temporary until streams are better integrated

0 commit comments

Comments
 (0)