summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-01-06 10:29:41 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-01-06 10:31:22 +0100
commitb59f760472787bef78f9fc71eaa02f3cf056dff8 (patch)
treee6415a9b99585bff148b8144fe60cebef8ec48ef
parent2d29904f252c7e7bb7c7cdfe9b6f095e3fb8f5d9 (diff)
downloadphp-git-b59f760472787bef78f9fc71eaa02f3cf056dff8.tar.gz
Fix bug #79063: Curl openssl does not respect PKG_CONFIG_PATH
-rw-r--r--NEWS1
-rw-r--r--ext/curl/config.m49
2 files changed, 6 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 0a3c245a96..cde786c06b 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ PHP NEWS
- CURL:
. Fixed bug #79033 (Curl timeout error with specific url and post). (cmb)
+ . Fixed bug #79063 (curl openssl does not respect PKG_CONFIG_PATH). (Nikita)
- Date:
. Fixed bug #79015 (undefined-behavior in php_date.c). (cmb)
diff --git a/ext/curl/config.m4 b/ext/curl/config.m4
index 4879cd3da2..fd0e29a96d 100644
--- a/ext/curl/config.m4
+++ b/ext/curl/config.m4
@@ -23,8 +23,6 @@ if test "$PHP_CURL" != "no"; then
esac
if test "$CURL_SSL" = yes; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $CURL_CFLAGS"
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $CURL_LIBS"
@@ -48,14 +46,17 @@ int main(int argc, char *argv[])
]])],[
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
- AC_CHECK_HEADERS([openssl/crypto.h])
+ PKG_CHECK_MODULES([OPENSSL], [openssl], [
+ PHP_EVAL_LIBLINE($OPENSSL_LIBS, CURL_SHARED_LIBADD)
+ PHP_EVAL_INCLINE($OPENSSL_CFLAGS)
+ AC_CHECK_HEADERS([openssl/crypto.h])
+ ], [])
], [
AC_MSG_RESULT([no])
], [
AC_MSG_RESULT([no])
])
- CFLAGS="$save_CFLAGS"
LDFLAGS="$save_LDFLAGS"
else
AC_MSG_RESULT([no])