Skip to content

Commit 80e0c0a

Browse files
authored
Autotools: Refactor dmalloc check (#14726)
- AS_VAR_APPEND used for enabling Dmalloc check-funcs token - CS synced
1 parent e925449 commit 80e0c0a

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
@@ -989,15 +989,12 @@ PHP_ARG_ENABLE([dmalloc],
989989
[no],
990990
[no])
991991

992-
if test "$PHP_DMALLOC" = "yes"; then
993-
AC_CHECK_LIB(dmalloc, dmalloc_error, [
994-
PHP_ADD_LIBRARY(dmalloc)
995-
AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
996-
CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
997-
], [
998-
AC_MSG_ERROR([Problem with enabling dmalloc. Please check config.log for details.])
999-
])
1000-
fi
992+
AS_VAR_IF([PHP_DMALLOC], [yes],
993+
[AC_CHECK_LIB([dmalloc], [dmalloc_error],
994+
[PHP_ADD_LIBRARY([dmalloc])
995+
AC_DEFINE([HAVE_DMALLOC], [1], [Define to 1 if you have dmalloc.])
996+
AS_VAR_APPEND([CPPFLAGS], [" -DDMALLOC_FUNC_CHECK"])],
997+
[AC_MSG_ERROR([Problem with enabling dmalloc. Please, check config.log for details.])])])
1001998

1002999
PHP_ARG_ENABLE([ipv6],
10031000
[whether to enable IPv6 support],

0 commit comments

Comments
 (0)