Use pthread-stubs as needed, and list xdmcp in Requires.private when XCB is built...
authorJamey Sharp <jamey@minilop.net>
Thu, 23 Nov 2006 04:29:04 +0000 (20:29 -0800)
committerJamey Sharp <jamey@minilop.net>
Thu, 23 Nov 2006 04:29:04 +0000 (20:29 -0800)
configure.ac
src/Makefile.am
xcb.pc.in

index a831f34..fa49f9a 100644 (file)
@@ -31,12 +31,14 @@ AC_SUBST(HTML_CHECK_RESULT)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 0.9.93)
-PKG_CHECK_MODULES(XAU, xau)
+NEEDED="xau pthread-stubs"
+PKG_CHECK_MODULES(NEEDED, $NEEDED)
 
 PKG_CHECK_MODULES(XDMCP, xdmcp,
        AC_CHECK_LIB(Xdmcp, XdmcpWrap,
                [
                AC_DEFINE(HASXDMAUTH,1,[Has Wraphelp.c needed for XDM AUTH protocols])
+               NEEDED="$NEEDED xdmcp"
                ],
                [
                XDMCP_CFLAGS=
@@ -44,6 +46,8 @@ PKG_CHECK_MODULES(XDMCP, xdmcp,
                ], [$XDMCP_LIBS]),
        [AC_MSG_RESULT(no)])
 
+AC_SUBST(NEEDED)
+
 # Find the xcb-proto protocol descriptions
 AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR)
 XCBPROTO_XCBINCLUDEDIR=`$PKG_CONFIG --variable=xcbincludedir xcb-proto`
index adcfc98..d16d9a6 100644 (file)
@@ -94,8 +94,8 @@ EXTENSION_XML = xproto.xml \
 xcbinclude_HEADERS = xcb.h xcbext.h xcbxlib.h $(EXTHEADERS)
 noinst_HEADERS = xcbint.h
 
-AM_CFLAGS = $(COPTFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) $(XCBPROTO_CFLAGS) $(XAU_CFLAGS) $(XDMCP_CFLAGS)
-libxcb_la_LIBADD = $(XCBPROTO_LIBS) $(XAU_LIBS) $(XDMCP_LIBS)
+AM_CFLAGS = $(COPTFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) $(XCBPROTO_CFLAGS) $(NEEDED_CFLAGS) $(XDMCP_CFLAGS)
+libxcb_la_LIBADD = $(XCBPROTO_LIBS) $(NEEDED_LIBS) $(XDMCP_LIBS)
 libxcb_la_SOURCES = \
                xcb_conn.c xcb_out.c xcb_in.c xcb_ext.c xcb_xid.c \
                xcb_list.c xcb_util.c xcb_auth.c c-client.xsl \
index d2b5ec6..69a335c 100644 (file)
--- a/xcb.pc.in
+++ b/xcb.pc.in
@@ -6,7 +6,7 @@ includedir=@includedir@
 Name: XCB
 Description: X-protocol C Binding
 Version: @PACKAGE_VERSION@
-Requires.private: xau
+Requires.private: @NEEDED@
 Libs: -L${libdir} -lxcb
 Libs.private: @LIBS@
 Cflags: -I${includedir}