configure: Check for a potential -lpthread by using -ldl
authorMartin Willi <martin@strongswan.org>
Wed, 18 May 2016 12:44:19 +0000 (14:44 +0200)
committerMartin Willi <martin@strongswan.org>
Wed, 18 May 2016 12:46:20 +0000 (14:46 +0200)
Some pthread library variants depend on libdl, hence we must pass such a
library to successfully build against libpthread.

configure.ac

index 6874832..daabdd7 100644 (file)
@@ -486,7 +486,7 @@ AC_SEARCH_LIBS(socket, socket, [SOCKLIB=$LIBS],
 AC_SUBST(SOCKLIB)
 
 # Android has pthread_* functions in bionic (libc), others need libpthread
-LIBS=""
+LIBS=$DLLIB
 AC_SEARCH_LIBS(pthread_create, pthread, [PTHREADLIB=$LIBS])
 AC_SUBST(PTHREADLIB)