]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: pass -pthread to Libs.private for pkg-config
authorDaniel Stenberg <daniel@haxx.se>
Fri, 6 Nov 2020 23:33:16 +0000 (00:33 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 7 Nov 2020 17:25:21 +0000 (18:25 +0100)
Reported-by: Cristian Morales Vega
Fixes #6168
Closes #6181

configure.ac

index 7002744a29904d0f59bf37549296400197038d34..bc206475aec85cdcdb05d6baefd23a022204ecb0 100755 (executable)
@@ -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)