2 # Process this file with autoconf to produce a configure script.
7 [xcb@lists.freedesktop.org])
8 AC_CONFIG_SRCDIR([xcb.pc.in])
9 AM_INIT_AUTOMAKE([foreign dist-bzip2])
13 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
14 AM_CONDITIONAL(HAVE_CHECK, test x$HAVE_CHECK = xyes)
16 AC_CONFIG_HEADERS([src/config.h])
21 AC_PATH_PROG(XSLTPROC, xsltproc, no)
22 if test "$XSLTPROC" = "no"; then
23 AC_MSG_ERROR([XCB requires xsltproc.])
26 HTML_CHECK_RESULT=false
27 if test x"$HAVE_CHECK" = xyes; then
28 if test x"$XSLTPROC" != xno; then
29 HTML_CHECK_RESULT=true
32 AC_SUBST(HTML_CHECK_RESULT)
34 # Checks for pkg-config packages
35 PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.1)
36 NEEDED="pthread-stubs xau >= 0.99.2"
37 PKG_CHECK_MODULES(NEEDED, $NEEDED)
40 PKG_CHECK_MODULES(XDMCP, xdmcp,
41 AC_CHECK_LIB(Xdmcp, XdmcpWrap,
43 AC_DEFINE(HASXDMAUTH,1,[Has Wraphelp.c needed for XDM AUTH protocols])
44 NEEDED="$NEEDED xdmcp"
55 # Find the xcb-proto protocol descriptions
56 AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR)
57 XCBPROTO_XCBINCLUDEDIR=`$PKG_CONFIG --variable=xcbincludedir xcb-proto`
58 AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR)
59 AC_SUBST(XCBPROTO_XCBINCLUDEDIR)
61 # Find the xcbgen Python package
62 AC_MSG_CHECKING(XCBPROTO_XCBPYTHONDIR)
63 XCBPROTO_XCBPYTHONDIR=`$PKG_CONFIG --variable=pythondir xcb-proto`
64 AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR)
65 AC_SUBST(XCBPROTO_XCBPYTHONDIR)
68 AC_SEARCH_LIBS(getaddrinfo, socket)
69 AC_SEARCH_LIBS(connect, socket)
73 AC_DEFINE([HAVE_ABSTRACT_SOCKETS], 1, [Define if your platform supports abstract sockets])
77 dnl define buffer queue size
78 AC_ARG_WITH([queue-size],
79 AC_HELP_STRING([--with-queue-size=SIZE],
80 [Set the XCB buffer queue size (default is 16384)]),
81 [xcb_queue_buffer_size="$withval"],
82 [xcb_queue_buffer_size=16384])
83 AC_DEFINE_UNQUOTED(XCB_QUEUE_BUFFER_SIZE, [$xcb_queue_buffer_size],
84 [XCB buffer queue size])
86 dnl check for the sockaddr_un.sun_len member
87 AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
88 [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN,1,[Have the sockaddr_un.sun_len member.])],
90 [ #include <sys/types.h>
94 xcbincludedir='${includedir}/xcb'
95 AC_SUBST(xcbincludedir)
97 if test "x$GCC" = xyes ; then
98 CWARNFLAGS="-Wall -pedantic -Wpointer-arith \
99 -Wstrict-prototypes -Wmissing-declarations -Wnested-externs"
101 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
102 if test "x$SUNCC" = "xyes"; then
108 XCB_CHECK_VISIBILITY()
110 # htmldir is not defined prior to autoconf 2.59c, so on earlier versions
111 # set an equivalent value.
112 AC_PREREQ([2.59c], [], [AC_SUBST([htmldir], [m4_ifset([AC_PACKAGE_TARNAME],
113 ['${datadir}/doc/${PACKAGE_TARNAME}'],
114 ['${datadir}/doc/${PACKAGE}'])
119 XCB_EXTENSION(Composite, "yes")
120 XCB_EXTENSION(Damage, "yes")
121 XCB_EXTENSION(DPMS, "yes")
122 XCB_EXTENSION(GLX, "yes")
123 XCB_EXTENSION(RandR, "yes")
124 XCB_EXTENSION(Record, "yes")
125 XCB_EXTENSION(Render, "yes")
126 XCB_EXTENSION(Resource, "yes")
127 XCB_EXTENSION(Screensaver, "yes")
128 XCB_EXTENSION(Shape, "yes")
129 XCB_EXTENSION(Shm, "yes")
130 XCB_EXTENSION(Sync, "yes")
131 XCB_EXTENSION(Xevie, "yes")
132 XCB_EXTENSION(XFixes, "yes")
133 XCB_EXTENSION(XFree86-DRI, "yes")
134 XCB_EXTENSION(Xinerama, "yes")
135 XCB_EXTENSION(XInput, "no")
136 XCB_EXTENSION(Xprint, "yes")
137 XCB_EXTENSION(SELinux, "no")
138 XCB_EXTENSION(XTest, "yes")
139 XCB_EXTENSION(Xv, "yes")
140 XCB_EXTENSION(XvMC, "yes")
142 AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
143 if test "x$LAUNCHD" = xauto; then
145 AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no])
148 if test "x$LAUNCHD" = xyes ; then
149 AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
191 dnl Configuration output
194 echo " Package: ${PACKAGE_NAME} ${PACKAGE_VERSION}"
196 echo " Configuration"
197 echo " XDM support.........: ${have_xdmcp}"
198 echo " Build unit tests....: ${HAVE_CHECK}"
199 echo " XCB buffer size.....: ${xcb_queue_buffer_size}"
202 echo " CPPFLAGS............: ${CPPFLAGS}"
203 echo " CFLAGS..............: ${CFLAGS}"
204 echo " Warning CFLAGS......: ${CWARNFLAGS}"
206 echo " Installation:"
207 echo " Prefix..............: ${prefix}"