com php-src: ext/xsl: Use PKG_CHECK_MODULES to detect the XSLT library: UPGRADING ext/xsl/config.m4

From: Date: Fri, 07 Jun 2019 07:35:12 +0000
Subject: com php-src: ext/xsl: Use PKG_CHECK_MODULES to detect the XSLT library: UPGRADING ext/xsl/config.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106601@lists.php.net to get a copy of this message
Commit: ab66179227dfce5c916592f47a66cd5f09e86359 Author: Hugh McMaster <hugh.mcmaster@outlook.com> Thu, 6 Jun 2019 21:19:19 +1000 Committer: Nikita Popov <nikita.ppv@gmail.com> Fri, 7 Jun 2019 09:35:12 +0200 Parents: 30a34eab814490e4926056d314a55b95ea9febad Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ab66179227dfce5c916592f47a66cd5f09e86359 Log: ext/xsl: Use PKG_CHECK_MODULES to detect the XSLT library Changed paths: M UPGRADING M ext/xsl/config.m4 Diff: diff --git a/UPGRADING b/UPGRADING index f881788..f5695a5 100644 --- a/UPGRADING +++ b/UPGRADING @@ -597,6 +597,9 @@ The following extensions and SAPIs are affected: - SQLite3: . --with-sqlite3 no longer accepts a directory. +- XSL: + . --with-xsl no longer accepts a directory. + - Zip: . --with-libzip has been removed. . --enable-zip becomes --with-zip. diff --git a/ext/xsl/config.m4 b/ext/xsl/config.m4 index 26f6e10..ab70ad6 100644 --- a/ext/xsl/config.m4 +++ b/ext/xsl/config.m4 @@ -1,8 +1,7 @@ PHP_ARG_WITH([xsl], - [for XSL support], - [AS_HELP_STRING([[--with-xsl[=DIR]]], - [Include XSL support. DIR is the libxslt base install directory (libxslt >= - 1.1.0 required)])]) + [whether to build with XSL support], + [AS_HELP_STRING([--with-xsl], + [Build with XSL support])]) if test "$PHP_XSL" != "no"; then @@ -14,48 +13,25 @@ if test "$PHP_XSL" != "no"; then AC_MSG_ERROR([XSL extension requires DOM extension, add --enable-dom]) fi - for i in $PHP_XSL /usr/local /usr; do - if test -x "$i/bin/xslt-config"; then - XSLT_CONFIG=$i/bin/xslt-config + PKG_CHECK_MODULES([XSL], [libxslt >= 1.1.0]) + + PHP_EVAL_INCLINE($XSL_CFLAGS) + PHP_EVAL_LIBLINE($XSL_LIBS, XSL_SHARED_LIBADD) + + AC_MSG_CHECKING([for EXSLT support]) + for i in /usr/local /usr; do + if test -r "$i/include/libexslt/exslt.h"; then + PHP_XSL_EXSL_DIR=$i break fi done - - if test -z "$XSLT_CONFIG"; then - AC_MSG_ERROR([xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution]) + if test -z "$PHP_XSL_EXSL_DIR"; then + AC_MSG_RESULT(not found) else - libxslt_full_version=$XSLT_CONFIG --version - ac_IFS=$IFS - IFS="." - set $libxslt_full_version - IFS=$ac_IFS - LIBXSLT_VERSION=expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3 - if test "$LIBXSLT_VERSION" -ge "1001000"; then - XSL_LIBS=$XSLT_CONFIG --libs - XSL_INCS=$XSLT_CONFIG --cflags - PHP_EVAL_LIBLINE($XSL_LIBS, XSL_SHARED_LIBADD) - PHP_EVAL_INCLINE($XSL_INCS) - - AC_MSG_CHECKING([for EXSLT support]) - for i in $PHP_XSL /usr/local /usr; do - if test -r "$i/include/libexslt/exslt.h"; then - PHP_XSL_EXSL_DIR=$i - break - fi - done - if test -z "$PHP_XSL_EXSL_DIR"; then - AC_MSG_RESULT(not found) - else - AC_MSG_RESULT(found) - PHP_ADD_LIBRARY_WITH_PATH(exslt, $PHP_XSL_EXSL_DIR/$PHP_LIBDIR, XSL_SHARED_LIBADD) - PHP_ADD_INCLUDE($PHP_XSL_EXSL_DIR/include) - AC_DEFINE(HAVE_XSL_EXSLT,1,[ ]) - fi - else - AC_MSG_ERROR([libxslt version 1.1.0 or greater required.]) - fi - - + AC_MSG_RESULT(found) + PHP_ADD_LIBRARY_WITH_PATH(exslt, $PHP_XSL_EXSL_DIR/$PHP_LIBDIR, XSL_SHARED_LIBADD) + PHP_ADD_INCLUDE($PHP_XSL_EXSL_DIR/include) + AC_DEFINE(HAVE_XSL_EXSLT,1,[ ]) fi AC_DEFINE(HAVE_XSL,1,[ ])

« previous php.cvs (#106601) next »