summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-11-07 00:33:16 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-11-07 18:25:21 +0100
commit374329d773e6ffd0ea647edc35ac759888ad4643 (patch)
treef4987ab72442400e5ea820e9f75c2300b5650354
parent5d903ce3a3443f6566c33ca43057860270142224 (diff)
downloadcurl-374329d773e6ffd0ea647edc35ac759888ad4643.tar.gz
configure: pass -pthread to Libs.private for pkg-config
Reported-by: Cristian Morales Vega Fixes #6168 Closes #6181
-rwxr-xr-xconfigure.ac4
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7002744a2..bc206475a 100755
--- a/configure.ac
+++ b/configure.ac
@@ -4515,6 +4515,8 @@ if test "$want_pthreads" != "no"; then
if test "$USE_THREADS_POSIX" != "1"
then
CFLAGS="$CFLAGS -pthread"
+ # assign PTHREAD for pkg-config use
+ PTHREAD=" -pthread"
AC_CHECK_LIB(pthread, pthread_create,
[USE_THREADS_POSIX=1],
[ CFLAGS="$save_CFLAGS"])
@@ -4945,7 +4947,7 @@ CURL_CONFIGURE_SYMBOL_HIDING
dnl
dnl All the library dependencies put into $LIB apply to libcurl only.
dnl
-LIBCURL_LIBS=$LIBS
+LIBCURL_LIBS="$LIBS$PTHREAD"
AC_SUBST(LIBCURL_LIBS)
AC_SUBST(CURL_NETWORK_LIBS)