com php-src: Improve pkg-config usage - use default path when run using --with-curl=/usr (for debian) - fallback to h eaders search when libcurl.pc
not found - issue warnings for explanation: ext/curl/config.m4
| From: | Remi Collet | Date: | Sun, 27 Aug 2017 05:48:52 +0000 |
| Subject: | com php-src: Improve pkg-config usage - use default path when run using --with-curl=/usr (for debian) - fallback to h eaders search when libcurl.pc not found - issue warnings for explanation: ext/curl/config.m4 |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99169@lists.php.net to get a copy of this message | ||
Commit: cc577749a8c95e6f15f5a859961a995a82828c8e
Author: Remi Collet <remi@php.net> Sun, 27 Aug 2017 07:48:52 +0200
Parents: 3a2ad5b2c53a5fcb0ef769a3bfc95397b73a8408
Branches: PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cc577749a8c95e6f15f5a859961a995a82828c8e
Log:
Improve pkg-config usage
- use default path when run using --with-curl=/usr (for debian)
- fallback to headers search when libcurl.pc not found
- issue warnings for explanation
Changed paths:
M ext/curl/config.m4
Diff:
diff --git a/ext/curl/config.m4 b/ext/curl/config.m4
index a34d582..c0d4f86 100644
--- a/ext/curl/config.m4
+++ b/ext/curl/config.m4
@@ -14,7 +14,7 @@ if test "$PHP_CURL" != "no"; then
dnl using pkg-config output
AC_MSG_CHECKING(for libcurl.pc)
- if test "$PHP_CURL" == "yes"; then
+ if test "$PHP_CURL" == "yes" -o "$PHP_CURL" == "/usr";
then
PKNAME=libcurl
AC_MSG_RESULT(using default path)
elif test -r $PHP_CURL/$PHP_LIBDIR/pkgconfig/libcurl.pc; then
@@ -24,9 +24,12 @@ if test "$PHP_CURL" != "no"; then
PKNAME=$PHP_CURL/lib/pkgconfig/libcurl.pc
AC_MSG_RESULT(using $PKNAME)
else
- AC_MSG_ERROR(Could not find libcurl.pc)
+ AC_MSG_RESULT(not found)
+ AC_MSG_WARN(Could not find libcurl.pc. Try without $PHP_CURL or set PKG_CONFIG_PATH)
fi
+ fi
+ if test -n "$PKNAME"; then
AC_MSG_CHECKING(for cURL 7.10.5 or greater)
if $PKG_CONFIG --atleast-version 7.10.5 $PKNAME; then
curl_version_full=
$PKG_CONFIG --modversion $PKNAME
@@ -40,6 +43,7 @@ if test "$PHP_CURL" != "no"; then
CURL_SSL=$PKG_CONFIG --variable=supported_features $PKNAME| $EGREP SSL
else
dnl fallback to old vay, using curl-config
+ AC_MSG_WARN(Fallback: search for curl headers and curl-config)
if test -r $PHP_CURL/include/curl/easy.h; then
CURL_DIR=$PHP_CURL