1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Autotools: Fix tidy library checks (#15576)

When configuring with tidy library installed in non-standard paths, the
library adding macro must be done before the PHP_CHECK_LIBRARY to be
able to detect it. This fixes these edge cases. For example:

    ./configure --with-tidy=/path/to/custom-tidy-installation
This commit is contained in:
Peter Kokot
2024-08-27 00:00:20 +02:00
committed by GitHub
parent baac01f594
commit fef55bc8e4

View File

@@ -46,11 +46,16 @@ if test "$PHP_TIDY" != "no"; then
[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])],
[],
[-L$TIDY_LIBDIR])],
[-L$TIDY_LIBDIR])
PHP_CHECK_LIBRARY([$TIDY_LIB_NAME], [tidyReleaseDate],
[AC_DEFINE([HAVE_TIDYRELEASEDATE], [1],
[Define to 1 if Tidy library has the 'tidyReleaseDate' function.])])
[Define to 1 if Tidy library has the 'tidyReleaseDate' function.])],
[],
[-L$TIDY_LIBDIR])
PHP_ADD_LIBRARY_WITH_PATH([$TIDY_LIB_NAME],
[$TIDY_LIBDIR],