Skip to content

Commit b59f760

Browse files
committed
Fix bug #79063: Curl openssl does not respect PKG_CONFIG_PATH
1 parent 2d29904 commit b59f760

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ PHP NEWS
1919

2020
- CURL:
2121
. Fixed bug #79033 (Curl timeout error with specific url and post). (cmb)
22+
. Fixed bug #79063 (curl openssl does not respect PKG_CONFIG_PATH). (Nikita)
2223

2324
- Date:
2425
. Fixed bug #79015 (undefined-behavior in php_date.c). (cmb)

ext/curl/config.m4

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ if test "$PHP_CURL" != "no"; then
2323
esac
2424

2525
if test "$CURL_SSL" = yes; then
26-
save_CFLAGS="$CFLAGS"
27-
CFLAGS="$CFLAGS $CURL_CFLAGS"
2826
save_LDFLAGS="$LDFLAGS"
2927
LDFLAGS="$LDFLAGS $CURL_LIBS"
3028

@@ -48,14 +46,17 @@ int main(int argc, char *argv[])
4846
]])],[
4947
AC_MSG_RESULT([yes])
5048
AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
51-
AC_CHECK_HEADERS([openssl/crypto.h])
49+
PKG_CHECK_MODULES([OPENSSL], [openssl], [
50+
PHP_EVAL_LIBLINE($OPENSSL_LIBS, CURL_SHARED_LIBADD)
51+
PHP_EVAL_INCLINE($OPENSSL_CFLAGS)
52+
AC_CHECK_HEADERS([openssl/crypto.h])
53+
], [])
5254
], [
5355
AC_MSG_RESULT([no])
5456
], [
5557
AC_MSG_RESULT([no])
5658
])
5759

58-
CFLAGS="$save_CFLAGS"
5960
LDFLAGS="$save_LDFLAGS"
6061
else
6162
AC_MSG_RESULT([no])

0 commit comments

Comments
 (0)