]> granicus.if.org Git - php/commitdiff
Fix bug #79063: Curl openssl does not respect PKG_CONFIG_PATH
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 6 Jan 2020 09:29:41 +0000 (10:29 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 6 Jan 2020 09:31:22 +0000 (10:31 +0100)
NEWS
ext/curl/config.m4

diff --git a/NEWS b/NEWS
index 0a3c245a96940d295bfcfb8dc777699417d5b326..cde786c06b244ffb397938d52dc59765575dd16e 100644 (file)
--- 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)
index 4879cd3da23dd8cbf0a0515a5f4273423c8720ef..fd0e29a96d5cec4ed23195502483d622440e3a34 100644 (file)
@@ -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])