aboutsummaryrefslogtreecommitdiff
path: root/libxcb/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'libxcb/configure.ac')
-rw-r--r--libxcb/configure.ac163
1 files changed, 80 insertions, 83 deletions
diff --git a/libxcb/configure.ac b/libxcb/configure.ac
index 6d0f844b8..68c3b2f0c 100644
--- a/libxcb/configure.ac
+++ b/libxcb/configure.ac
@@ -1,42 +1,51 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
+dnl Process this file with autoconf to produce a configure script.
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libxcb],
- 1.10,
- [xcb@lists.freedesktop.org])
+AC_INIT([libxcb],[1.10],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xcb],
+ [libxcb])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([xcb.pc.in])
+AC_CONFIG_HEADERS([src/config.h])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AM_PATH_PYTHON([2.6])
# Set common system defines for POSIX extensions, such as _GNU_SOURCE
# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
# to avoid autoconf errors.
AC_USE_SYSTEM_EXTENSIONS
-AM_PATH_PYTHON([2.6])
+# Initialize libtool
+LT_PREREQ([2.2])
+LT_INIT([win32-dll])
+
+# Require xorg-macros minimum of 1.18 - Initial version
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.18 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.18)
+XORG_DEFAULT_OPTIONS
+XORG_ENABLE_DEVEL_DOCS
+XORG_WITH_DOXYGEN
+
+# The dot drawing tool is checked by XORG_WITH_DOXYGEN, needed for xcb manual
+if test x"$HAVE_DOT" = xno; then
+ AC_MSG_WARN([dot not found - doxygen targets will be skipped])
+fi
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
-
XSLTPROC=no
HTML_CHECK_RESULT=no
if test x"$HAVE_CHECK" = xyes; then
- AC_PATH_PROG(XSLTPROC, xsltproc, no)
- if test x"$XSLTPROC" != xno; then
- HTML_CHECK_RESULT=yes
- fi
+ AC_PATH_PROG(XSLTPROC, xsltproc, no)
+ if test x"$XSLTPROC" != xno; then
+ HTML_CHECK_RESULT=yes
+ fi
fi
AC_SUBST(HTML_CHECK_RESULT)
@@ -47,17 +56,17 @@ 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_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)
@@ -82,12 +91,12 @@ AC_SEARCH_LIBS(getaddrinfo, socket)
AC_SEARCH_LIBS(connect, socket)
AC_ARG_ENABLE(sendfds, AS_HELP_STRING([--disable-sendfds], [Support FD passing (default: auto)]),
- [sendfds=$enableval], [sendfds=auto])
+ [sendfds=$enableval], [sendfds=auto])
case x$sendfds in
xauto)
- AC_SEARCH_LIBS(sendmsg, socket, [sendfds="yes"], [sendfds="no"])
- ;;
+ AC_SEARCH_LIBS(sendmsg, socket, [sendfds="yes"], [sendfds="no"])
+ ;;
esac
# XPG4v2/UNIX95 added msg_control - check to see if we need to define
@@ -134,12 +143,12 @@ have_win32="no"
lt_enable_auto_import=""
case $host_os in
mingw*)
- have_win32="yes"
- lt_enable_auto_import="-Wl,--enable-auto-import"
- ;;
+ 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])
- ;;
+ AC_DEFINE([HAVE_ABSTRACT_SOCKETS], 1, [Define if your platform supports abstract sockets])
+ ;;
esac
AC_SUBST(lt_enable_auto_import)
@@ -147,7 +156,7 @@ 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],
+ AS_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])
@@ -156,11 +165,11 @@ AC_DEFINE_UNQUOTED(XCB_QUEUE_BUFFER_SIZE, [$xcb_queue_buffer_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>
- ])
+ [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN,1,[Have the sockaddr_un.sun_len member.])],
+ [],
+ [ #include <sys/types.h>
+ #include <sys/un.h>
+ ])
dnl check for support for Solaris Trusted Extensions
AC_CHECK_HEADERS([tsol/label.h])
@@ -168,52 +177,39 @@ AC_CHECK_FUNCS([is_system_labeled])
dnl check for IOV_MAX, and fall back to UIO_MAXIOV on BSDish systems
AC_CHECK_DECL([IOV_MAX], [],
- [AC_CHECK_DECL([UIO_MAXIOV], [AC_DEFINE([IOV_MAX], [UIO_MAXIOV])],
- [AC_DEFINE([IOV_MAX], [16], [Define if not provided by <limits.h>])],
- [[#include <sys/uio.h>]])],
- [[#include <limits.h>]])
+ [AC_CHECK_DECL([UIO_MAXIOV], [AC_DEFINE([IOV_MAX], [UIO_MAXIOV])],
+ [AC_DEFINE([IOV_MAX], [16], [Define if not provided by <limits.h>])],
+ [[#include <sys/uio.h>]])],
+ [[#include <limits.h>]])
xcbincludedir='${includedir}/xcb'
AC_SUBST(xcbincludedir)
-if test "x$GCC" = xyes ; then
- CWARNFLAGS="-Wall -Wpointer-arith -Wold-style-definition \
- -Wstrict-prototypes -Wmissing-declarations -Wnested-externs"
-else
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
- if test "x$SUNCC" = "xyes"; then
- CWARNFLAGS="-v -fd"
- fi
-fi
-AC_SUBST(CWARNFLAGS)
-
XCB_CHECK_VISIBILITY()
-XCB_CHECK_DOXYGEN()
-
AC_CHECK_FUNC(getaddrinfo, [AC_DEFINE(HAVE_GETADDRINFO, 1, [getaddrinfo() function is available])], )
case $host_os in
- # darwin through Snow Leopard has poll() but can't be used to poll character devices.
- darwin@<:@789@:>@*|darwin10*) ;;
- darwin*)
- _ac_xorg_macosx_version_min=""
- if echo $CPPFLAGS $CFLAGS | grep -q mmacosx-version-min ; then
- _ac_xorg_macosx_version_min=`echo $CPPFLAGS $CFLAGS | sed 's/^.*-mmacosx-version-min=\(@<:@^ @:>@*\).*$/\1/'`
- else
- _ac_xorg_macosx_version_min=$MACOSX_DEPLOYMENT_TARGET
- fi
- case $_ac_xorg_macosx_version_min in
- 10.@<:@0123456@:>@|10.@<:@0123456@:>@.*) ;;
- *)
- AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
- ;;
- esac
- unset _ac_xorg_macosx_version_min
- ;;
- *)
- AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
- ;;
+ # darwin through Snow Leopard has poll() but can't be used to poll character devices.
+ darwin@<:@789@:>@*|darwin10*) ;;
+ darwin*)
+ _ac_xorg_macosx_version_min=""
+ if echo $CPPFLAGS $CFLAGS | grep -q mmacosx-version-min ; then
+ _ac_xorg_macosx_version_min=`echo $CPPFLAGS $CFLAGS | sed 's/^.*-mmacosx-version-min=\(@<:@^ @:>@*\).*$/\1/'`
+ else
+ _ac_xorg_macosx_version_min=$MACOSX_DEPLOYMENT_TARGET
+ fi
+ case $_ac_xorg_macosx_version_min in
+ 10.@<:@0123456@:>@|10.@<:@0123456@:>@.*) ;;
+ *)
+ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
+ ;;
+ esac
+ unset _ac_xorg_macosx_version_min
+ ;;
+ *)
+ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
+ ;;
esac
XCB_EXTENSION(Composite, "yes")
@@ -245,17 +241,18 @@ 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])
+ 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])
+ AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
fi
AC_CONFIG_FILES([
Makefile
doc/Makefile
+man/Makefile
src/Makefile
tests/Makefile
])
@@ -338,7 +335,7 @@ echo ""
echo " Used CFLAGS:"
echo " CPPFLAGS............: ${CPPFLAGS}"
echo " CFLAGS..............: ${CFLAGS}"
-echo " Warning CFLAGS......: ${CWARNFLAGS}"
+echo " Warning CFLAGS......: ${BASE_CFLAGS}"
echo ""
echo " Installation:"
echo " Prefix..............: ${prefix}"