Skip to content

Update ext/tidy preprocessor macros help texts #15269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions ext/tidy/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,28 @@ if test "$PHP_TIDY" != "no"; then
dnl that we are building against tidy-html5 and not the legacy htmltidy. The
dnl two are compatible, except for with regard to this header file.
if test -f "$TIDY_INCDIR/tidybuffio.h"; then
AC_DEFINE(HAVE_TIDYBUFFIO_H,1,[defined if tidybuffio.h exists])
AC_DEFINE([HAVE_TIDYBUFFIO_H], [1],
[Define to 1 if you have the <tidybuffio.h> header file.])
fi
fi

TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR
if test "$TIDY_LIB_NAME" == 'tidyp'; then
AC_DEFINE(HAVE_TIDYP_H,1,[defined if tidyp.h exists])
else
AC_DEFINE(HAVE_TIDY_H,1,[defined if tidy.h exists])
fi

AS_VAR_IF([TIDY_LIB_NAME], [tidyp],
[AC_DEFINE([HAVE_TIDYP_H], [1],
[Define to 1 if you have the <tidyp.h> header file.])],
[AC_DEFINE([HAVE_TIDY_H], [1],
[Define to 1 if you have the <tidy.h> header file.])])

PHP_CHECK_LIBRARY([$TIDY_LIB_NAME], [tidyOptGetDoc],
[AC_DEFINE([HAVE_TIDYOPTGETDOC], [1], [ ])],
[AC_DEFINE([HAVE_TIDYOPTGETDOC], [1],
[Define to 1 if Tidy library has the 'tidyOptGetDoc' function.])],
[PHP_CHECK_LIBRARY([tidy5], [tidyOptGetDoc],
[TIDY_LIB_NAME=tidy5
AC_DEFINE([HAVE_TIDYOPTGETDOC], [1], [ ])])])
AC_DEFINE([HAVE_TIDYOPTGETDOC], [1])])])

PHP_CHECK_LIBRARY([$TIDY_LIB_NAME], [tidyReleaseDate],
[AC_DEFINE([HAVE_TIDYRELEASEDATE], [1], [ ])])
[AC_DEFINE([HAVE_TIDYRELEASEDATE], [1],
[Define to 1 if Tidy library has the 'tidyReleaseDate' function.])])

PHP_ADD_LIBRARY_WITH_PATH([$TIDY_LIB_NAME],
[$TIDY_LIBDIR],
Expand Down
8 changes: 4 additions & 4 deletions ext/tidy/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ if (PHP_TIDY != "no") {
)) {

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

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