Skip to content

Commit c2e78df

Browse files
committed
Autotools: Refactor dmalloc check
- AS_VAR_APPEND used for enabling Dmalloc check-funcs token - CS synced
1 parent 9caad37 commit c2e78df

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

configure.ac

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -995,15 +995,12 @@ PHP_ARG_ENABLE([dmalloc],
995995
[no],
996996
[no])
997997

998-
if test "$PHP_DMALLOC" = "yes"; then
999-
AC_CHECK_LIB(dmalloc, dmalloc_error, [
1000-
PHP_ADD_LIBRARY(dmalloc)
1001-
AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
1002-
CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
1003-
], [
1004-
AC_MSG_ERROR([Problem with enabling dmalloc. Please check config.log for details.])
1005-
])
1006-
fi
998+
AS_VAR_IF([PHP_DMALLOC], [yes],
999+
[AC_CHECK_LIB([dmalloc], [dmalloc_error],
1000+
[PHP_ADD_LIBRARY([dmalloc])
1001+
AC_DEFINE([HAVE_DMALLOC], [1], [Define to 1 if you have dmalloc.])
1002+
AS_VAR_APPEND([CPPFLAGS], [" -DDMALLOC_FUNC_CHECK"])],
1003+
[AC_MSG_ERROR([Problem with enabling dmalloc. Please, check config.log for details.])])])
10071004

10081005
PHP_ARG_ENABLE([ipv6],
10091006
[whether to enable IPv6 support],

0 commit comments

Comments
 (0)