Skip to content

Commit 0c0da80

Browse files
authored
Autotools: Replace PHP_DEF_HAVE with AC_DEFINE_UNQUTED (#15119)
The PHP_DEF_HAVE M4 macro is a simple wrapper around the recommended AC_DEFINE or AC_DEFINE_UNQUOTED (when shell variables are used in arguments). This also adds some basic help texts to macros.
1 parent ef8e792 commit 0c0da80

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

build/php.m4

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,8 +1453,10 @@ AC_DEFUN([PHP_CHECK_FUNC_LIB],[
14531453
14541454
if test "$found" = "yes"; then
14551455
PHP_ADD_LIBRARY($2)
1456-
PHP_DEF_HAVE($1)
1457-
PHP_DEF_HAVE(lib$2)
1456+
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1],
1457+
[Define to 1 if you have the '$1' function.])
1458+
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_LIB$2]), [1],
1459+
[Define to 1 if you have the '$2' library (-l$2).])
14581460
ac_cv_func_$1=yes
14591461
else
14601462
PHP_CHECK_FUNC_LIB($1,phpshift(phpshift($@)))
@@ -1478,7 +1480,8 @@ AC_DEFUN([PHP_CHECK_FUNC],[
14781480
14791481
case $found in
14801482
yes[)]
1481-
PHP_DEF_HAVE($1)
1483+
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1],
1484+
[Define to 1 if you have the '$1' function.])
14821485
ac_cv_func_$1=yes
14831486
;;
14841487
ifelse($#,1,,[

0 commit comments

Comments
 (0)