From: Anatol Belski Date: Wed, 9 Nov 2016 10:28:50 +0000 (+0100) Subject: improve lib name guessing for newer libtidy X-Git-Tag: php-7.2.0alpha1~961^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddbac6d70d46f4824b4b6711417b4fae368ceccc;p=php improve lib name guessing for newer libtidy FreeBSD calls it tidy5. Still, the check is not perfect, as both old and new lib can coexist. ATM, the preference is to pick up the old lib, still. In it's absense the new one will be looked up. --- diff --git a/ext/tidy/config.m4 b/ext/tidy/config.m4 index da9351e991..88463fa8d4 100644 --- a/ext/tidy/config.m4 +++ b/ext/tidy/config.m4 @@ -37,13 +37,20 @@ if test "$PHP_TIDY" != "no"; then TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR - PHP_ADD_LIBRARY_WITH_PATH(tidy, $TIDY_LIBDIR, TIDY_SHARED_LIBADD) - PHP_ADD_INCLUDE($TIDY_INCDIR) - + TIDY_LIB_NAME=tidy PHP_CHECK_LIBRARY(tidy,tidyOptGetDoc, [ - AC_DEFINE(HAVE_TIDYOPTGETDOC,1,[ ]) - ],[],[]) + AC_DEFINE(HAVE_TIDYOPTGETDOC,1,[ ]) + ],[ + PHP_CHECK_LIBRARY(tidy5,tidyOptGetDoc, + [ + TIDY_LIB_NAME=tidy5 + AC_DEFINE(HAVE_TIDYOPTGETDOC,1,[ ]) + ], [], []) + ],[]) + + PHP_ADD_LIBRARY_WITH_PATH($TIDY_LIB_NAME, $TIDY_LIBDIR, TIDY_SHARED_LIBADD) + PHP_ADD_INCLUDE($TIDY_INCDIR) PHP_NEW_EXTENSION(tidy, tidy.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)