Skip to content

Commit bf5de04

Browse files
authored
Update ext/tidy preprocessor macros help texts (#15269)
[skip ci]
1 parent f661223 commit bf5de04

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

ext/tidy/config.m4

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,28 @@ if test "$PHP_TIDY" != "no"; then
3434
dnl that we are building against tidy-html5 and not the legacy htmltidy. The
3535
dnl two are compatible, except for with regard to this header file.
3636
if test -f "$TIDY_INCDIR/tidybuffio.h"; then
37-
AC_DEFINE(HAVE_TIDYBUFFIO_H,1,[defined if tidybuffio.h exists])
37+
AC_DEFINE([HAVE_TIDYBUFFIO_H], [1],
38+
[Define to 1 if you have the <tidybuffio.h> header file.])
3839
fi
3940
fi
4041

4142
TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR
42-
if test "$TIDY_LIB_NAME" == 'tidyp'; then
43-
AC_DEFINE(HAVE_TIDYP_H,1,[defined if tidyp.h exists])
44-
else
45-
AC_DEFINE(HAVE_TIDY_H,1,[defined if tidy.h exists])
46-
fi
47-
43+
AS_VAR_IF([TIDY_LIB_NAME], [tidyp],
44+
[AC_DEFINE([HAVE_TIDYP_H], [1],
45+
[Define to 1 if you have the <tidyp.h> header file.])],
46+
[AC_DEFINE([HAVE_TIDY_H], [1],
47+
[Define to 1 if you have the <tidy.h> header file.])])
4848

4949
PHP_CHECK_LIBRARY([$TIDY_LIB_NAME], [tidyOptGetDoc],
50-
[AC_DEFINE([HAVE_TIDYOPTGETDOC], [1], [ ])],
50+
[AC_DEFINE([HAVE_TIDYOPTGETDOC], [1],
51+
[Define to 1 if Tidy library has the 'tidyOptGetDoc' function.])],
5152
[PHP_CHECK_LIBRARY([tidy5], [tidyOptGetDoc],
5253
[TIDY_LIB_NAME=tidy5
53-
AC_DEFINE([HAVE_TIDYOPTGETDOC], [1], [ ])])])
54+
AC_DEFINE([HAVE_TIDYOPTGETDOC], [1])])])
5455

5556
PHP_CHECK_LIBRARY([$TIDY_LIB_NAME], [tidyReleaseDate],
56-
[AC_DEFINE([HAVE_TIDYRELEASEDATE], [1], [ ])])
57+
[AC_DEFINE([HAVE_TIDYRELEASEDATE], [1],
58+
[Define to 1 if Tidy library has the 'tidyReleaseDate' function.])])
5759

5860
PHP_ADD_LIBRARY_WITH_PATH([$TIDY_LIB_NAME],
5961
[$TIDY_LIBDIR],

ext/tidy/config.w32

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ if (PHP_TIDY != "no") {
1313
)) {
1414

1515
if (CHECK_HEADER_ADD_INCLUDE("tidybuffio.h", "CFLAGS_TIDY")) {
16-
AC_DEFINE('HAVE_TIDYBUFFIO_H', 1, 'Have tidybuffio.h header file');
16+
AC_DEFINE('HAVE_TIDYBUFFIO_H', 1, 'Define to 1 if you have the <tidybuffio.h> header file.');
1717
}
1818

1919
EXTENSION("tidy", "tidy.c");
2020
AC_DEFINE('HAVE_TIDY', 1, "Define to 1 if the PHP extension 'tidy' is available.");
21-
AC_DEFINE('HAVE_TIDY_H', 1, "tidy include header")
22-
AC_DEFINE('HAVE_TIDYOPTGETDOC', 1, "tidy_get_opt_doc function")
23-
AC_DEFINE('HAVE_TIDYRELEASEDATE', 1, "tidy release date function")
21+
AC_DEFINE('HAVE_TIDY_H', 1, "Define to 1 if you have the <tidy.h> header file.")
22+
AC_DEFINE('HAVE_TIDYOPTGETDOC', 1, "Define to 1 if Tidy library has the 'tidyOptGetDoc' function.")
23+
AC_DEFINE('HAVE_TIDYRELEASEDATE', 1, "Define to 1 if Tidy library has the 'tidyReleaseDate' function.")
2424
ADD_FLAG('CFLAGS_TIDY', '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
2525
if (!PHP_TIDY_SHARED) {
2626
ADD_DEF_FILE("ext\\tidy\\php_tidy.def");

0 commit comments

Comments
 (0)