com php-src: improve lib name guessing for newer libtidy: ext/tidy/config.m4
| From: | Anatol Belski | Date: | Wed, 09 Nov 2016 10:28:50 +0000 |
| Subject: | com php-src: improve lib name guessing for newer libtidy: ext/tidy/config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95477@lists.php.net to get a copy of this message | ||
Commit: ddbac6d70d46f4824b4b6711417b4fae368ceccc
Author: Anatol Belski <ab@php.net> Wed, 9 Nov 2016 11:28:50 +0100
Parents: 5445685591319184604129e670d0f13d96767b6e
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ddbac6d70d46f4824b4b6711417b4fae368ceccc
Log:
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.
Changed paths:
M ext/tidy/config.m4
Diff:
diff --git a/ext/tidy/config.m4 b/ext/tidy/config.m4
index da9351e..88463fa 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)