build: Link libglapi with pthreads
authorMatt Turner <mattst88@gmail.com>
Wed, 19 Sep 2012 03:22:37 +0000 (20:22 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 27 Sep 2012 17:25:26 +0000 (10:25 -0700)
NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=839060
          https://bugs.gentoo.org/show_bug.cgi?id=435152
Reviewed-by: Adam Jackson <ajax@redhat.com>
configure.ac
src/mapi/shared-glapi/Makefile.am

index 49cdb8249d0b148be40809f9c10c208e28fb31fd..896f98a53bb5d78acdec43f878e2eafc04f9a57f 100644 (file)
@@ -524,6 +524,7 @@ if test "x$enable_selinux" = "xyes"; then
     SELINUX_LIBS="-lselinux"
     DEFINES="$DEFINES -DMESA_SELINUX"
 fi
+AC_SUBST([SELINUX_LIBS])
 
 dnl Options for APIs
 AC_ARG_ENABLE([opengl],
@@ -920,10 +921,6 @@ AC_SUBST([GLESv1_CM_PC_LIB_PRIV])
 AC_SUBST([GLESv2_LIB_DEPS])
 AC_SUBST([GLESv2_PC_LIB_PRIV])
 
-GLAPI_LIB_DEPS="-lpthread $SELINUX_LIBS"
-AC_SUBST([GLAPI_LIB_DEPS])
-
-
 DRI_LIB_DEPS="\$(top_builddir)/src/mesa/libdricore/libdricore${VERSION}.la"
 
 AC_SUBST([HAVE_XF86VIDMODE])
index 8db7688c0348f1e12ef594955aa204060b731c1c..d215c43ad95d8829afaf1c41201d99033ab62b26 100644 (file)
@@ -6,6 +6,7 @@ include $(top_srcdir)/src/mapi/mapi/sources.mak
 
 lib_LTLIBRARIES = libglapi.la
 libglapi_la_SOURCES = $(MAPI_GLAPI_FILES)
+libglapi_la_LIBADD = $(PTHREAD_LIBS) $(SELINUX_LIBS)
 libglapi_la_LDFLAGS = -no-undefined
 
 include $(GLAPI)/gen/glapi_gen.mk
@@ -15,6 +16,7 @@ glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
 BUILT_SOURCES = glapi_mapi_tmp.h
 CLEANFILES = $(BUILT_SOURCES)
 
+AM_CFLAGS = $(PTHREAD_CFLAGS)
 AM_CPPFLAGS =                                                  \
        $(DEFINES)                                              \
        -I$(top_srcdir)/include                                 \