# 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=
], [$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`
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 \
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}