configure.ac: add pthreadstubs support
authorRob Herring <robh@kernel.org>
Wed, 4 May 2016 02:02:46 +0000 (21:02 -0500)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 23 May 2016 11:07:46 +0000 (12:07 +0100)
Add pthreadstubs to avoid pulling in full pthreads library. GBM will be the
first user.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
configure.ac

index de62e8babce3e22ce4a88b0a2d965cea941f806a..3499e99f5e43e1fe2e5844cdde6ddad5c06f2433 100644 (file)
@@ -800,6 +800,10 @@ dnl to -pthread, which causes problems if we need -lpthread to appear in
 dnl pkgconfig files.
 test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"
 
+PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs)
+AC_SUBST(PTHREADSTUBS_CFLAGS)
+AC_SUBST(PTHREADSTUBS_LIBS)
+
 dnl SELinux awareness.
 AC_ARG_ENABLE([selinux],
     [AS_HELP_STRING([--enable-selinux],