aboutsummaryrefslogtreecommitdiff
path: root/libxcb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-21 12:52:35 +0000
committermarha <marha@users.sourceforge.net>2011-01-21 12:52:35 +0000
commit7719409ebcf17c5288114dee8f60cc9ff889fd3e (patch)
treee86379743c048712c638bed954264fccea7798c4 /libxcb
parent26ee05a8febfe1ed6da852777a8c1c2a37e4cf9b (diff)
parentb0be6a88c8fecdf15176f642c0799bff99930e0d (diff)
downloadvcxsrv-7719409ebcf17c5288114dee8f60cc9ff889fd3e.tar.gz
vcxsrv-7719409ebcf17c5288114dee8f60cc9ff889fd3e.tar.bz2
vcxsrv-7719409ebcf17c5288114dee8f60cc9ff889fd3e.zip
svn merge ^/branches/released .
Diffstat (limited to 'libxcb')
-rw-r--r--libxcb/configure.ac508
-rw-r--r--libxcb/src/Makefile.am461
2 files changed, 491 insertions, 478 deletions
diff --git a/libxcb/configure.ac b/libxcb/configure.ac
index f8ff9bc57..a8e171b07 100644
--- a/libxcb/configure.ac
+++ b/libxcb/configure.ac
@@ -1,249 +1,259 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.57)
-AC_INIT([libxcb],
- 1.7,
- [xcb@lists.freedesktop.org])
-AC_CONFIG_SRCDIR([xcb.pc.in])
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
-
-AM_PATH_PYTHON([2.5])
-
-PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
-AM_CONDITIONAL(HAVE_CHECK, test x$HAVE_CHECK = xyes)
-
-AC_CONFIG_HEADERS([src/config.h])
-
-AC_PROG_LIBTOOL
-AC_PROG_CC
-
-AC_PATH_PROG(XSLTPROC, xsltproc, no)
-if test "$XSLTPROC" = "no"; then
- AC_MSG_ERROR([XCB requires xsltproc.])
-fi
-
-HTML_CHECK_RESULT=false
-if test x"$HAVE_CHECK" = xyes; then
- if test x"$XSLTPROC" != xno; then
- HTML_CHECK_RESULT=true
- fi
-fi
-AC_SUBST(HTML_CHECK_RESULT)
-
-# Checks for pkg-config packages
-PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.6)
-NEEDED="pthread-stubs xau >= 0.99.2"
-PKG_CHECK_MODULES(NEEDED, $NEEDED)
-
-have_xdmcp="no"
-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"
- have_xdmcp="yes"
- ],
- [
- XDMCP_CFLAGS=
- XDMCP_LIBS=
- ], [$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`
-AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR)
-AC_SUBST(XCBPROTO_XCBINCLUDEDIR)
-
-# Find the xcb-proto version
-XCBPROTO_VERSION=`$PKG_CONFIG --modversion xcb-proto`
-AC_SUBST(XCBPROTO_VERSION)
-
-# Find the xcbgen Python package
-AC_MSG_CHECKING(XCBPROTO_XCBPYTHONDIR)
-XCBPROTO_XCBPYTHONDIR=`$PKG_CONFIG --variable=pythondir xcb-proto`
-AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR)
-AC_SUBST(XCBPROTO_XCBPYTHONDIR)
-
-AC_HEADER_STDC
-AC_SEARCH_LIBS(getaddrinfo, socket)
-AC_SEARCH_LIBS(connect, socket)
-
-case $host_os in
-linux*)
- AC_DEFINE([HAVE_ABSTRACT_SOCKETS], 1, [Define if your platform supports abstract sockets])
- ;;
-esac
-
-dnl define buffer queue size
-AC_ARG_WITH([queue-size],
- AC_HELP_STRING([--with-queue-size=SIZE],
- [Set the XCB buffer queue size (default is 16384)]),
- [xcb_queue_buffer_size="$withval"],
- [xcb_queue_buffer_size=16384])
-AC_DEFINE_UNQUOTED(XCB_QUEUE_BUFFER_SIZE, [$xcb_queue_buffer_size],
- [XCB buffer queue size])
-
-dnl check for the sockaddr_un.sun_len member
-AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
- [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN,1,[Have the sockaddr_un.sun_len member.])],
- [],
- [ #include <sys/types.h>
- #include <sys/un.h>
- ])
-
-xcbincludedir='${includedir}/xcb'
-AC_SUBST(xcbincludedir)
-
-if test "x$GCC" = xyes ; then
- CWARNFLAGS="-Wall -pedantic -Wpointer-arith \
- -Wstrict-prototypes -Wmissing-declarations -Wnested-externs"
-else
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
- if test "x$SUNCC" = "xyes"; then
- CWARNFLAGS="-v"
- fi
-fi
-AC_SUBST(CWARNFLAGS)
-
-XCB_CHECK_VISIBILITY()
-
-# htmldir is not defined prior to autoconf 2.59c, so on earlier versions
-# set an equivalent value.
-AC_PREREQ([2.59c], [], [AC_SUBST([htmldir], [m4_ifset([AC_PACKAGE_TARNAME],
- ['${datadir}/doc/${PACKAGE_TARNAME}'],
- ['${datadir}/doc/${PACKAGE}'])
-])])
-
-XCB_CHECK_DOXYGEN()
-
-case $host_os in
- # darwin has poll() but can't be used to poll character devices (atleast through SnowLeopard)
- darwin*) ;;
- *)
- AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
- ;;
-esac
-
-XCB_EXTENSION(Composite, "yes")
-XCB_EXTENSION(Damage, "yes")
-XCB_EXTENSION(DPMS, "yes")
-XCB_EXTENSION(DRI2, "yes")
-XCB_EXTENSION(GLX, "yes")
-XCB_EXTENSION(RandR, "yes")
-XCB_EXTENSION(Record, "yes")
-XCB_EXTENSION(Render, "yes")
-XCB_EXTENSION(Resource, "yes")
-XCB_EXTENSION(Screensaver, "yes")
-XCB_EXTENSION(Shape, "yes")
-XCB_EXTENSION(Shm, "yes")
-XCB_EXTENSION(Sync, "yes")
-XCB_EXTENSION(Xevie, "yes")
-XCB_EXTENSION(XFixes, "yes")
-XCB_EXTENSION(XFree86-DRI, "yes")
-XCB_EXTENSION(Xinerama, "yes")
-XCB_EXTENSION(XInput, "no")
-XCB_EXTENSION(XKB, "no")
-XCB_EXTENSION(Xprint, "yes")
-XCB_EXTENSION(SELinux, "no")
-XCB_EXTENSION(XTest, "yes")
-XCB_EXTENSION(Xv, "yes")
-XCB_EXTENSION(XvMC, "yes")
-
-AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
-if test "x$LAUNCHD" = xauto; then
- unset LAUNCHD
- AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no], [$PATH$PATH_SEPARATOR/sbin])
-fi
-
-if test "x$LAUNCHD" = xyes ; then
- AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
-fi
-
-AC_CONFIG_FILES([
-Makefile
-doc/Makefile
-src/Makefile
-tests/Makefile
-])
-
-AC_CONFIG_FILES([
-xcb.pc
-xcb-composite.pc
-xcb-damage.pc
-xcb-dpms.pc
-xcb-dri2.pc
-xcb-glx.pc
-xcb-randr.pc
-xcb-record.pc
-xcb-render.pc
-xcb-res.pc
-xcb-screensaver.pc
-xcb-shape.pc
-xcb-shm.pc
-xcb-sync.pc
-xcb-xevie.pc
-xcb-xf86dri.pc
-xcb-xfixes.pc
-xcb-xinerama.pc
-xcb-xinput.pc
-xcb-xkb.pc
-xcb-xprint.pc
-xcb-xselinux.pc
-xcb-xtest.pc
-xcb-xv.pc
-xcb-xvmc.pc
-])
-
-AC_CONFIG_FILES([
-doc/xcb.doxygen
-])
-
-AC_OUTPUT
-
-dnl Configuration output
-
-echo ""
-echo " Package: ${PACKAGE_NAME} ${PACKAGE_VERSION}"
-echo ""
-echo " Configuration"
-echo " XDM support.........: ${have_xdmcp}"
-echo " Build unit tests....: ${HAVE_CHECK}"
-echo " XCB buffer size.....: ${xcb_queue_buffer_size}"
-echo ""
-echo " X11 extensions"
-echo " Composite...........: ${BUILD_COMPOSITE}"
-echo " Damage..............: ${BUILD_DAMAGE}"
-echo " Dpms................: ${BUILD_DPMS}"
-echo " Dri2................: ${BUILD_DRI2}"
-echo " Glx.................: ${BUILD_GLX}"
-echo " Randr...............: ${BUILD_RANDR}"
-echo " Record..............: ${BUILD_RECORD}"
-echo " Render..............: ${BUILD_RENDER}"
-echo " Resource............: ${BUILD_RESOURCE}"
-echo " Screensaver.........: ${BUILD_SCREENSAVER}"
-echo " selinux.............: ${BUILD_SELINUX}"
-echo " Shape...............: ${BUILD_SHAPE}"
-echo " Shm.................: ${BUILD_SHM}"
-echo " Sync................: ${BUILD_SYNC}"
-echo " Xevie...............: ${BUILD_XEVIE}"
-echo " Xfixes..............: ${BUILD_XFIXES}"
-echo " Xfree86-dri.........: ${BUILD_XFREE86_DRI}"
-echo " xinerama............: ${BUILD_XINERAMA}"
-echo " xinput..............: ${BUILD_XINPUT}"
-echo " xprint..............: ${BUILD_XPRINT}"
-echo " xtest...............: ${BUILD_XTEST}"
-echo " xv..................: ${BUILD_XV}"
-echo " xvmc................: ${BUILD_XVMC}"
-echo ""
-echo " Used CFLAGS:"
-echo " CPPFLAGS............: ${CPPFLAGS}"
-echo " CFLAGS..............: ${CFLAGS}"
-echo " Warning CFLAGS......: ${CWARNFLAGS}"
-echo ""
-echo " Installation:"
-echo " Prefix..............: ${prefix}"
-echo ""
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.57)
+AC_INIT([libxcb],
+ 1.7,
+ [xcb@lists.freedesktop.org])
+AC_CONFIG_SRCDIR([xcb.pc.in])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+AM_PATH_PYTHON([2.5])
+
+PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
+AM_CONDITIONAL(HAVE_CHECK, test x$HAVE_CHECK = xyes)
+
+AC_CONFIG_HEADERS([src/config.h])
+
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+AC_PROG_CC
+
+AC_PATH_PROG(XSLTPROC, xsltproc, no)
+if test "$XSLTPROC" = "no"; then
+ AC_MSG_ERROR([XCB requires xsltproc.])
+fi
+
+HTML_CHECK_RESULT=false
+if test x"$HAVE_CHECK" = xyes; then
+ if test x"$XSLTPROC" != xno; then
+ HTML_CHECK_RESULT=true
+ fi
+fi
+AC_SUBST(HTML_CHECK_RESULT)
+
+# Checks for pkg-config packages
+PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.6)
+NEEDED="pthread-stubs xau >= 0.99.2"
+PKG_CHECK_MODULES(NEEDED, $NEEDED)
+
+have_xdmcp="no"
+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"
+ have_xdmcp="yes"
+ ],
+ [
+ XDMCP_CFLAGS=
+ XDMCP_LIBS=
+ ], [$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`
+AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR)
+AC_SUBST(XCBPROTO_XCBINCLUDEDIR)
+
+# Find the xcb-proto version
+XCBPROTO_VERSION=`$PKG_CONFIG --modversion xcb-proto`
+AC_SUBST(XCBPROTO_VERSION)
+
+# Find the xcbgen Python package
+AC_MSG_CHECKING(XCBPROTO_XCBPYTHONDIR)
+XCBPROTO_XCBPYTHONDIR=`$PKG_CONFIG --variable=pythondir xcb-proto`
+AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR)
+AC_SUBST(XCBPROTO_XCBPYTHONDIR)
+
+AC_HEADER_STDC
+AC_SEARCH_LIBS(getaddrinfo, socket)
+AC_SEARCH_LIBS(connect, socket)
+
+have_win32="no"
+lt_enable_auto_import=""
+case $host_os in
+mingw*)
+ have_win32="yes"
+ lt_enable_auto_import="-Wl,--enable-auto-import"
+ ;;
+linux*)
+ AC_DEFINE([HAVE_ABSTRACT_SOCKETS], 1, [Define if your platform supports abstract sockets])
+ ;;
+esac
+
+AC_SUBST(lt_enable_auto_import)
+AM_CONDITIONAL([XCB_HAVE_WIN32], [test "x${have_win32}" = "xyes"])
+
+dnl define buffer queue size
+AC_ARG_WITH([queue-size],
+ AC_HELP_STRING([--with-queue-size=SIZE],
+ [Set the XCB buffer queue size (default is 16384)]),
+ [xcb_queue_buffer_size="$withval"],
+ [xcb_queue_buffer_size=16384])
+AC_DEFINE_UNQUOTED(XCB_QUEUE_BUFFER_SIZE, [$xcb_queue_buffer_size],
+ [XCB buffer queue size])
+
+dnl check for the sockaddr_un.sun_len member
+AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
+ [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN,1,[Have the sockaddr_un.sun_len member.])],
+ [],
+ [ #include <sys/types.h>
+ #include <sys/un.h>
+ ])
+
+xcbincludedir='${includedir}/xcb'
+AC_SUBST(xcbincludedir)
+
+if test "x$GCC" = xyes ; then
+ CWARNFLAGS="-Wall -pedantic -Wpointer-arith \
+ -Wstrict-prototypes -Wmissing-declarations -Wnested-externs"
+else
+ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+ if test "x$SUNCC" = "xyes"; then
+ CWARNFLAGS="-v"
+ fi
+fi
+AC_SUBST(CWARNFLAGS)
+
+XCB_CHECK_VISIBILITY()
+
+# htmldir is not defined prior to autoconf 2.59c, so on earlier versions
+# set an equivalent value.
+AC_PREREQ([2.59c], [], [AC_SUBST([htmldir], [m4_ifset([AC_PACKAGE_TARNAME],
+ ['${datadir}/doc/${PACKAGE_TARNAME}'],
+ ['${datadir}/doc/${PACKAGE}'])
+])])
+
+XCB_CHECK_DOXYGEN()
+
+case $host_os in
+ # darwin has poll() but can't be used to poll character devices (atleast through SnowLeopard)
+ darwin*) ;;
+ *)
+ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
+ ;;
+esac
+
+XCB_EXTENSION(Composite, "yes")
+XCB_EXTENSION(Damage, "yes")
+XCB_EXTENSION(DPMS, "yes")
+XCB_EXTENSION(DRI2, "yes")
+XCB_EXTENSION(GLX, "yes")
+XCB_EXTENSION(RandR, "yes")
+XCB_EXTENSION(Record, "yes")
+XCB_EXTENSION(Render, "yes")
+XCB_EXTENSION(Resource, "yes")
+XCB_EXTENSION(Screensaver, "yes")
+XCB_EXTENSION(Shape, "yes")
+XCB_EXTENSION(Shm, "yes")
+XCB_EXTENSION(Sync, "yes")
+XCB_EXTENSION(Xevie, "yes")
+XCB_EXTENSION(XFixes, "yes")
+XCB_EXTENSION(XFree86-DRI, "yes")
+XCB_EXTENSION(Xinerama, "yes")
+XCB_EXTENSION(XInput, "no")
+XCB_EXTENSION(XKB, "no")
+XCB_EXTENSION(Xprint, "yes")
+XCB_EXTENSION(SELinux, "no")
+XCB_EXTENSION(XTest, "yes")
+XCB_EXTENSION(Xv, "yes")
+XCB_EXTENSION(XvMC, "yes")
+
+AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
+if test "x$LAUNCHD" = xauto; then
+ unset LAUNCHD
+ AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no], [$PATH$PATH_SEPARATOR/sbin])
+fi
+
+if test "x$LAUNCHD" = xyes ; then
+ AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
+fi
+
+AC_CONFIG_FILES([
+Makefile
+doc/Makefile
+src/Makefile
+tests/Makefile
+])
+
+AC_CONFIG_FILES([
+xcb.pc
+xcb-composite.pc
+xcb-damage.pc
+xcb-dpms.pc
+xcb-dri2.pc
+xcb-glx.pc
+xcb-randr.pc
+xcb-record.pc
+xcb-render.pc
+xcb-res.pc
+xcb-screensaver.pc
+xcb-shape.pc
+xcb-shm.pc
+xcb-sync.pc
+xcb-xevie.pc
+xcb-xf86dri.pc
+xcb-xfixes.pc
+xcb-xinerama.pc
+xcb-xinput.pc
+xcb-xkb.pc
+xcb-xprint.pc
+xcb-xselinux.pc
+xcb-xtest.pc
+xcb-xv.pc
+xcb-xvmc.pc
+])
+
+AC_CONFIG_FILES([
+doc/xcb.doxygen
+])
+
+AC_OUTPUT
+
+dnl Configuration output
+
+echo ""
+echo " Package: ${PACKAGE_NAME} ${PACKAGE_VERSION}"
+echo ""
+echo " Configuration"
+echo " XDM support.........: ${have_xdmcp}"
+echo " Build unit tests....: ${HAVE_CHECK}"
+echo " XCB buffer size.....: ${xcb_queue_buffer_size}"
+echo ""
+echo " X11 extensions"
+echo " Composite...........: ${BUILD_COMPOSITE}"
+echo " Damage..............: ${BUILD_DAMAGE}"
+echo " Dpms................: ${BUILD_DPMS}"
+echo " Dri2................: ${BUILD_DRI2}"
+echo " Glx.................: ${BUILD_GLX}"
+echo " Randr...............: ${BUILD_RANDR}"
+echo " Record..............: ${BUILD_RECORD}"
+echo " Render..............: ${BUILD_RENDER}"
+echo " Resource............: ${BUILD_RESOURCE}"
+echo " Screensaver.........: ${BUILD_SCREENSAVER}"
+echo " selinux.............: ${BUILD_SELINUX}"
+echo " Shape...............: ${BUILD_SHAPE}"
+echo " Shm.................: ${BUILD_SHM}"
+echo " Sync................: ${BUILD_SYNC}"
+echo " Xevie...............: ${BUILD_XEVIE}"
+echo " Xfixes..............: ${BUILD_XFIXES}"
+echo " Xfree86-dri.........: ${BUILD_XFREE86_DRI}"
+echo " xinerama............: ${BUILD_XINERAMA}"
+echo " xinput..............: ${BUILD_XINPUT}"
+echo " xprint..............: ${BUILD_XPRINT}"
+echo " xtest...............: ${BUILD_XTEST}"
+echo " xv..................: ${BUILD_XV}"
+echo " xvmc................: ${BUILD_XVMC}"
+echo ""
+echo " Used CFLAGS:"
+echo " CPPFLAGS............: ${CPPFLAGS}"
+echo " CFLAGS..............: ${CFLAGS}"
+echo " Warning CFLAGS......: ${CWARNFLAGS}"
+echo ""
+echo " Installation:"
+echo " Prefix..............: ${prefix}"
+echo ""
diff --git a/libxcb/src/Makefile.am b/libxcb/src/Makefile.am
index 207c26fdf..950de5c14 100644
--- a/libxcb/src/Makefile.am
+++ b/libxcb/src/Makefile.am
@@ -1,229 +1,232 @@
-lib_LTLIBRARIES = libxcb.la
-
-EXTSOURCES = xproto.c \
- bigreq.c \
- xc_misc.c
-
-AM_CFLAGS = $(CWARNFLAGS) $(NEEDED_CFLAGS) $(XDMCP_CFLAGS)
-libxcb_la_LIBADD = $(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.py
-nodist_libxcb_la_SOURCES = xproto.c bigreq.c xc_misc.c
-
-# Explanation for -version-info:
-# -version-info current:revision:age
-# The library supports interface (current-age) to interface current.
-# * If you changed the source code at all, increment revision.
-# * If you add an interface, increment current and age and set revision to 0.
-# * If you change or remove an interface, increment current and set revision
-# and age to 0.
-libxcb_la_LDFLAGS = -version-info 2:0:1 -no-undefined
-
-XCB_LIBS = libxcb.la
-
-# FIXME: find a way to autogenerate this from the XML files.
-
-EXTSOURCES += composite.c
-if BUILD_COMPOSITE
-lib_LTLIBRARIES += libxcb-composite.la
-libxcb_composite_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_composite_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_composite_la_SOURCES = composite.c composite.h
-endif
-
-EXTSOURCES += damage.c
-if BUILD_DAMAGE
-lib_LTLIBRARIES += libxcb-damage.la
-libxcb_damage_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_damage_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_damage_la_SOURCES = damage.c damage.h
-endif
-
-EXTSOURCES += dpms.c
-if BUILD_DPMS
-lib_LTLIBRARIES += libxcb-dpms.la
-libxcb_dpms_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_dpms_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_dpms_la_SOURCES = dpms.c dpms.h
-endif
-
-EXTSOURCES += dri2.c
-if BUILD_DRI2
-lib_LTLIBRARIES += libxcb-dri2.la
-libxcb_dri2_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_dri2_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_dri2_la_SOURCES = dri2.c dri2.h
-endif
-
-EXTSOURCES += glx.c
-if BUILD_GLX
-lib_LTLIBRARIES += libxcb-glx.la
-libxcb_glx_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_glx_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_glx_la_SOURCES = glx.c glx.h
-endif
-
-EXTSOURCES += randr.c
-if BUILD_RANDR
-lib_LTLIBRARIES += libxcb-randr.la
-libxcb_randr_la_LDFLAGS = -version-info 1:0:1 -no-undefined
-libxcb_randr_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_randr_la_SOURCES = randr.c randr.h
-endif
-
-EXTSOURCES += record.c
-if BUILD_RECORD
-lib_LTLIBRARIES += libxcb-record.la
-libxcb_record_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_record_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_record_la_SOURCES = record.c record.h
-endif
-
-EXTSOURCES += render.c
-if BUILD_RENDER
-lib_LTLIBRARIES += libxcb-render.la
-libxcb_render_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_render_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_render_la_SOURCES = render.c render.h
-endif
-
-EXTSOURCES += res.c
-if BUILD_RESOURCE
-lib_LTLIBRARIES += libxcb-res.la
-libxcb_res_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_res_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_res_la_SOURCES = res.c res.h
-endif
-
-EXTSOURCES += screensaver.c
-if BUILD_SCREENSAVER
-lib_LTLIBRARIES += libxcb-screensaver.la
-libxcb_screensaver_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_screensaver_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_screensaver_la_SOURCES = screensaver.c screensaver.h
-endif
-
-EXTSOURCES += shape.c
-if BUILD_SHAPE
-lib_LTLIBRARIES += libxcb-shape.la
-libxcb_shape_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_shape_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_shape_la_SOURCES = shape.c shape.h
-endif
-
-EXTSOURCES += shm.c
-if BUILD_SHM
-lib_LTLIBRARIES += libxcb-shm.la
-libxcb_shm_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_shm_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_shm_la_SOURCES = shm.c shm.h
-endif
-
-EXTSOURCES += sync.c
-if BUILD_SYNC
-lib_LTLIBRARIES += libxcb-sync.la
-libxcb_sync_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_sync_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_sync_la_SOURCES = sync.c sync.h
-endif
-
-EXTSOURCES += xevie.c
-if BUILD_XEVIE
-lib_LTLIBRARIES += libxcb-xevie.la
-libxcb_xevie_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xevie_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xevie_la_SOURCES = xevie.c xevie.h
-endif
-
-EXTSOURCES += xf86dri.c
-if BUILD_XFREE86_DRI
-lib_LTLIBRARIES += libxcb-xf86dri.la
-libxcb_xf86dri_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xf86dri_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xf86dri_la_SOURCES = xf86dri.c xf86dri.h
-endif
-
-EXTSOURCES += xfixes.c
-if BUILD_XFIXES
-lib_LTLIBRARIES += libxcb-xfixes.la
-libxcb_xfixes_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xfixes_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xfixes_la_SOURCES = xfixes.c xfixes.h
-endif
-
-EXTSOURCES += xinerama.c
-if BUILD_XINERAMA
-lib_LTLIBRARIES += libxcb-xinerama.la
-libxcb_xinerama_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xinerama_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xinerama_la_SOURCES = xinerama.c xinerama.h
-endif
-
-EXTSOURCES += xinput.c
-if BUILD_XINPUT
-lib_LTLIBRARIES += libxcb-xinput.la
-libxcb_xinput_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xinput_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xinput_la_SOURCES = xinput.c xinput.h
-endif
-
-EXTSOURCES += xkb.c
-if BUILD_XKB
-lib_LTLIBRARIES += libxcb-xkb.la
-libxcb_xkb_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xkb_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xkb_la_SOURCES = xkb.c xkb.h
-endif
-
-EXTSOURCES += xprint.c
-if BUILD_XPRINT
-lib_LTLIBRARIES += libxcb-xprint.la
-libxcb_xprint_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xprint_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xprint_la_SOURCES = xprint.c xprint.h
-endif
-
-EXTSOURCES += xselinux.c
-if BUILD_SELINUX
-lib_LTLIBRARIES += libxcb-xselinux.la
-libxcb_xselinux_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xselinux_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xselinux_la_SOURCES = xselinux.c xselinux.h
-endif
-
-EXTSOURCES += xtest.c
-if BUILD_XTEST
-lib_LTLIBRARIES += libxcb-xtest.la
-libxcb_xtest_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xtest_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xtest_la_SOURCES = xtest.c xtest.h
-endif
-
-EXTSOURCES += xv.c
-if BUILD_XV
-lib_LTLIBRARIES += libxcb-xv.la
-libxcb_xv_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xv_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xv_la_SOURCES = xv.c xv.h
-endif
-
-EXTSOURCES += xvmc.c
-if BUILD_XVMC
-lib_LTLIBRARIES += libxcb-xvmc.la
-libxcb_xvmc_la_LDFLAGS = -version-info 0:0:0 -no-undefined
-libxcb_xvmc_la_LIBADD = $(XCB_LIBS)
-nodist_libxcb_xvmc_la_SOURCES = xvmc.c xvmc.h
-endif
-
-
-EXTHEADERS=$(EXTSOURCES:.c=.h)
-xcbinclude_HEADERS = xcb.h xcbext.h
-nodist_xcbinclude_HEADERS = $(EXTHEADERS)
-noinst_HEADERS = xcbint.h
-
-BUILT_SOURCES = $(EXTSOURCES)
-CLEANFILES = $(EXTSOURCES) $(EXTHEADERS)
-
-$(EXTSOURCES): c_client.py
- $(PYTHON) $(srcdir)/c_client.py -p $(XCBPROTO_XCBPYTHONDIR) $(XCBPROTO_XCBINCLUDEDIR)/$(@:.c=.xml)
+lib_LTLIBRARIES = libxcb.la
+
+EXTSOURCES = xproto.c \
+ bigreq.c \
+ xc_misc.c
+
+AM_CFLAGS = $(CWARNFLAGS) $(NEEDED_CFLAGS) $(XDMCP_CFLAGS)
+libxcb_la_LIBADD = $(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.py
+nodist_libxcb_la_SOURCES = xproto.c bigreq.c xc_misc.c
+
+# Explanation for -version-info:
+# -version-info current:revision:age
+# The library supports interface (current-age) to interface current.
+# * If you changed the source code at all, increment revision.
+# * If you add an interface, increment current and age and set revision to 0.
+# * If you change or remove an interface, increment current and set revision
+# and age to 0.
+libxcb_la_LDFLAGS = -version-info 2:0:1 -no-undefined @lt_enable_auto_import@
+
+XCB_LIBS = libxcb.la
+
+# FIXME: find a way to autogenerate this from the XML files.
+
+EXTSOURCES += composite.c
+if BUILD_COMPOSITE
+lib_LTLIBRARIES += libxcb-composite.la
+libxcb_composite_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_composite_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_composite_la_SOURCES = composite.c composite.h
+endif
+
+EXTSOURCES += damage.c
+if BUILD_DAMAGE
+lib_LTLIBRARIES += libxcb-damage.la
+libxcb_damage_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_damage_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_damage_la_SOURCES = damage.c damage.h
+endif
+
+EXTSOURCES += dpms.c
+if BUILD_DPMS
+lib_LTLIBRARIES += libxcb-dpms.la
+libxcb_dpms_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_dpms_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_dpms_la_SOURCES = dpms.c dpms.h
+endif
+
+EXTSOURCES += dri2.c
+if BUILD_DRI2
+lib_LTLIBRARIES += libxcb-dri2.la
+libxcb_dri2_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_dri2_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_dri2_la_SOURCES = dri2.c dri2.h
+endif
+
+EXTSOURCES += glx.c
+if BUILD_GLX
+lib_LTLIBRARIES += libxcb-glx.la
+libxcb_glx_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_glx_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_glx_la_SOURCES = glx.c glx.h
+endif
+
+EXTSOURCES += randr.c
+if BUILD_RANDR
+lib_LTLIBRARIES += libxcb-randr.la
+libxcb_randr_la_LDFLAGS = -version-info 1:0:1 -no-undefined @lt_enable_auto_import@
+libxcb_randr_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_randr_la_SOURCES = randr.c randr.h
+endif
+
+EXTSOURCES += record.c
+if BUILD_RECORD
+lib_LTLIBRARIES += libxcb-record.la
+libxcb_record_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_record_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_record_la_SOURCES = record.c record.h
+endif
+
+EXTSOURCES += render.c
+if BUILD_RENDER
+lib_LTLIBRARIES += libxcb-render.la
+libxcb_render_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_render_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_render_la_SOURCES = render.c render.h
+endif
+
+EXTSOURCES += res.c
+if BUILD_RESOURCE
+lib_LTLIBRARIES += libxcb-res.la
+libxcb_res_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_res_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_res_la_SOURCES = res.c res.h
+endif
+
+EXTSOURCES += screensaver.c
+if BUILD_SCREENSAVER
+lib_LTLIBRARIES += libxcb-screensaver.la
+libxcb_screensaver_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_screensaver_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_screensaver_la_SOURCES = screensaver.c screensaver.h
+endif
+
+EXTSOURCES += shape.c
+if BUILD_SHAPE
+lib_LTLIBRARIES += libxcb-shape.la
+libxcb_shape_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_shape_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_shape_la_SOURCES = shape.c shape.h
+endif
+
+EXTSOURCES += shm.c
+if BUILD_SHM
+lib_LTLIBRARIES += libxcb-shm.la
+libxcb_shm_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_shm_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_shm_la_SOURCES = shm.c shm.h
+endif
+
+EXTSOURCES += sync.c
+if BUILD_SYNC
+lib_LTLIBRARIES += libxcb-sync.la
+libxcb_sync_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_sync_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_sync_la_SOURCES = sync.c sync.h
+endif
+
+EXTSOURCES += xevie.c
+if BUILD_XEVIE
+lib_LTLIBRARIES += libxcb-xevie.la
+libxcb_xevie_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xevie_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xevie_la_SOURCES = xevie.c xevie.h
+endif
+
+EXTSOURCES += xf86dri.c
+if BUILD_XFREE86_DRI
+lib_LTLIBRARIES += libxcb-xf86dri.la
+libxcb_xf86dri_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xf86dri_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xf86dri_la_SOURCES = xf86dri.c xf86dri.h
+endif
+
+EXTSOURCES += xfixes.c
+if BUILD_XFIXES
+lib_LTLIBRARIES += libxcb-xfixes.la
+libxcb_xfixes_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xfixes_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xfixes_la_SOURCES = xfixes.c xfixes.h
+endif
+
+EXTSOURCES += xinerama.c
+if BUILD_XINERAMA
+lib_LTLIBRARIES += libxcb-xinerama.la
+libxcb_xinerama_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xinerama_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xinerama_la_SOURCES = xinerama.c xinerama.h
+endif
+
+EXTSOURCES += xinput.c
+if BUILD_XINPUT
+lib_LTLIBRARIES += libxcb-xinput.la
+libxcb_xinput_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xinput_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xinput_la_SOURCES = xinput.c xinput.h
+endif
+
+EXTSOURCES += xkb.c
+if BUILD_XKB
+lib_LTLIBRARIES += libxcb-xkb.la
+libxcb_xkb_la_LDFLAGS = -version-info 0:0:0 -no-undefined
+libxcb_xkb_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xkb_la_SOURCES = xkb.c xkb.h
+endif
+
+EXTSOURCES += xprint.c
+if BUILD_XPRINT
+lib_LTLIBRARIES += libxcb-xprint.la
+libxcb_xprint_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xprint_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xprint_la_SOURCES = xprint.c xprint.h
+endif
+
+EXTSOURCES += xselinux.c
+if BUILD_SELINUX
+lib_LTLIBRARIES += libxcb-xselinux.la
+libxcb_xselinux_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xselinux_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xselinux_la_SOURCES = xselinux.c xselinux.h
+endif
+
+EXTSOURCES += xtest.c
+if BUILD_XTEST
+lib_LTLIBRARIES += libxcb-xtest.la
+libxcb_xtest_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xtest_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xtest_la_SOURCES = xtest.c xtest.h
+endif
+
+EXTSOURCES += xv.c
+if BUILD_XV
+lib_LTLIBRARIES += libxcb-xv.la
+libxcb_xv_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xv_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xv_la_SOURCES = xv.c xv.h
+endif
+
+EXTSOURCES += xvmc.c
+if BUILD_XVMC
+lib_LTLIBRARIES += libxcb-xvmc.la
+libxcb_xvmc_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_xvmc_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_xvmc_la_SOURCES = xvmc.c xvmc.h
+endif
+
+
+EXTHEADERS=$(EXTSOURCES:.c=.h)
+xcbinclude_HEADERS = xcb.h xcbext.h
+if XCB_HAVE_WIN32
+xcbinclude_HEADERS += xcb_windefs.h
+endif
+nodist_xcbinclude_HEADERS = $(EXTHEADERS)
+noinst_HEADERS = xcbint.h
+
+BUILT_SOURCES = $(EXTSOURCES)
+CLEANFILES = $(EXTSOURCES) $(EXTHEADERS)
+
+$(EXTSOURCES): c_client.py
+ $(PYTHON) $(srcdir)/c_client.py -p $(XCBPROTO_XCBPYTHONDIR) $(XCBPROTO_XCBINCLUDEDIR)/$(@:.c=.xml)