Blame configure.ac

Packit Service 612474
dnl Process this file with autoconf to produce a configure script.
Packit Service 612474
Packit Service 612474
# Initialize Autoconf
Packit Service 612474
AC_PREREQ([2.60])
Packit Service 612474
AC_INIT([libxcb],[1.13.1],
Packit Service 612474
        [https://bugs.freedesktop.org/enter_bug.cgi?product=xcb],
Packit Service 612474
        [libxcb])
Packit Service 612474
AC_CONFIG_AUX_DIR([build-aux])
Packit Service 612474
AC_CONFIG_MACRO_DIR([m4])
Packit Service 612474
AC_CONFIG_SRCDIR([xcb.pc.in])
Packit Service 612474
AC_CONFIG_HEADERS([src/config.h])
Packit Service 612474
Packit Service 612474
# Initialize Automake
Packit Service 612474
AM_INIT_AUTOMAKE([foreign dist-bzip2])
Packit Service 612474
AM_PATH_PYTHON([2.6])
Packit Service 612474
Packit Service 612474
# Set common system defines for POSIX extensions, such as _GNU_SOURCE
Packit Service 612474
# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
Packit Service 612474
# to avoid autoconf errors.
Packit Service 612474
AC_USE_SYSTEM_EXTENSIONS
Packit Service 612474
Packit Service 612474
# Initialize libtool
Packit Service 612474
LT_PREREQ([2.2])
Packit Service 612474
LT_INIT([win32-dll])
Packit Service 612474
Packit Service 612474
# Require xorg-macros minimum of 1.18 - Initial version
Packit Service 612474
m4_ifndef([XORG_MACROS_VERSION],
Packit Service 612474
          [m4_fatal([must install xorg-macros 1.18 or later before running autoconf/autogen])])
Packit Service 612474
XORG_MACROS_VERSION(1.18)
Packit Service 612474
XORG_DEFAULT_OPTIONS
Packit Service 612474
XORG_ENABLE_DEVEL_DOCS
Packit Service 612474
XORG_WITH_DOXYGEN
Packit Service 612474
Packit Service 612474
# The dot drawing tool is checked by XORG_WITH_DOXYGEN, needed for xcb manual
Packit Service 612474
if test x"$HAVE_DOT" = xno; then
Packit Service 612474
    AC_MSG_WARN([dot not found - doxygen targets will be skipped])
Packit Service 612474
fi
Packit Service 612474
Packit Service 612474
PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
Packit Service 612474
AM_CONDITIONAL(HAVE_CHECK, test x$HAVE_CHECK = xyes)
Packit Service 612474
Packit Service 612474
XSLTPROC=no
Packit Service 612474
HTML_CHECK_RESULT=no
Packit Service 612474
if test x"$HAVE_CHECK" = xyes; then
Packit Service 612474
        AC_PATH_PROG(XSLTPROC, xsltproc, no)
Packit Service 612474
        if test x"$XSLTPROC" != xno; then
Packit Service 612474
                HTML_CHECK_RESULT=yes
Packit Service 612474
        fi
Packit Service 612474
fi
Packit Service 612474
AC_SUBST(HTML_CHECK_RESULT)
Packit Service 612474
Packit Service 612474
# Checks for pkg-config packages
Packit Service 612474
PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.13)
Packit Service 612474
NEEDED="pthread-stubs xau >= 0.99.2"
Packit Service 612474
PKG_CHECK_MODULES(NEEDED, $NEEDED)
Packit Service 612474
Packit Service 612474
have_xdmcp="no"
Packit Service 612474
PKG_CHECK_MODULES(XDMCP, xdmcp,
Packit Service 612474
        AC_CHECK_LIB(Xdmcp, XdmcpWrap,
Packit Service 612474
                [
Packit Service 612474
                AC_DEFINE(HASXDMAUTH,1,[Has Wraphelp.c needed for XDM AUTH protocols])
Packit Service 612474
                NEEDED="$NEEDED xdmcp"
Packit Service 612474
                have_xdmcp="yes"
Packit Service 612474
                ],
Packit Service 612474
                [
Packit Service 612474
                XDMCP_CFLAGS=
Packit Service 612474
                XDMCP_LIBS=
Packit Service 612474
                ], [$XDMCP_LIBS]),
Packit Service 612474
        [AC_MSG_RESULT(no)])
Packit Service 612474
Packit Service 612474
AC_SUBST(NEEDED)
Packit Service 612474
Packit Service 612474
# Find the xcb-proto protocol descriptions
Packit Service 612474
AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR)
Packit Service 612474
XCBPROTO_XCBINCLUDEDIR=`$PKG_CONFIG --variable=xcbincludedir xcb-proto`
Packit Service 612474
AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR)
Packit Service 612474
AC_SUBST(XCBPROTO_XCBINCLUDEDIR)
Packit Service 612474
Packit Service 612474
# Find the xcb-proto version
Packit Service 612474
XCBPROTO_VERSION=`$PKG_CONFIG --modversion xcb-proto`
Packit Service 612474
AC_SUBST(XCBPROTO_VERSION)
Packit Service 612474
Packit Service 612474
# Find the xcbgen Python package
Packit Service 612474
AC_MSG_CHECKING(XCBPROTO_XCBPYTHONDIR)
Packit Service 612474
XCBPROTO_XCBPYTHONDIR=`$PKG_CONFIG --variable=pythondir xcb-proto`
Packit Service 612474
AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR)
Packit Service 612474
AC_SUBST(XCBPROTO_XCBPYTHONDIR)
Packit Service 612474
Packit Service 612474
AC_HEADER_STDC
Packit Service 612474
AC_SEARCH_LIBS(getaddrinfo, socket)
Packit Service 612474
AC_SEARCH_LIBS(connect, socket)
Packit Service 612474
Packit Service 612474
# Find support for sending a message from a socket
Packit Service 612474
AC_SEARCH_LIBS(sendmsg, socket, [have_sendmsg="yes"], [have_sendmsg="no"])
Packit Service 612474
Packit Service 612474
# XPG4v2/UNIX95 added msg_control - check to see if we need to define
Packit Service 612474
# _XOPEN_SOURCE to get it (such as on Solaris)
Packit Service 612474
AC_CHECK_MEMBER([struct msghdr.msg_control], [], [],
Packit Service 612474
                 [
Packit Service 612474
AC_INCLUDES_DEFAULT
Packit Service 612474
#include <sys/socket.h>
Packit Service 612474
                 ])
Packit Service 612474
# First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
Packit Service 612474
if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
Packit Service 612474
    unset ac_cv_member_struct_msghdr_msg_control
Packit Service 612474
    AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600])
Packit Service 612474
    AC_CHECK_MEMBER([struct msghdr.msg_control],
Packit Service 612474
                    [AC_DEFINE([_XOPEN_SOURCE], [600],
Packit Service 612474
                       [Defined if needed to expose struct msghdr.msg_control])
Packit Service 612474
                    ], [], [
Packit Service 612474
#define _XOPEN_SOURCE 600
Packit Service 612474
AC_INCLUDES_DEFAULT
Packit Service 612474
#include <sys/socket.h>
Packit Service 612474
                     ])
Packit Service 612474
fi
Packit Service 612474
# If that didn't work, fall back to XPG5/UNIX98 with C89
Packit Service 612474
if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
Packit Service 612474
    unset ac_cv_member_struct_msghdr_msg_control
Packit Service 612474
    AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500])
Packit Service 612474
    AC_CHECK_MEMBER([struct msghdr.msg_control],
Packit Service 612474
                    [AC_DEFINE([_XOPEN_SOURCE], [500],
Packit Service 612474
                       [Defined if needed to expose struct msghdr.msg_control])
Packit Service 612474
                    ], [have_sendmsg="no"], [
Packit Service 612474
#define _XOPEN_SOURCE 500
Packit Service 612474
AC_INCLUDES_DEFAULT
Packit Service 612474
#include <sys/socket.h>
Packit Service 612474
                     ])
Packit Service 612474
fi
Packit Service 612474
Packit Service 612474
case x$have_sendmsg in
Packit Service 612474
xyes)
Packit Service 612474
        AC_DEFINE([HAVE_SENDMSG],1,[Define if your platform supports sendmsg])
Packit Service 612474
        ;;
Packit Service 612474
esac
Packit Service 612474
Packit Service 612474
have_win32="no"
Packit Service 612474
lt_enable_auto_import=""
Packit Service 612474
case $host_os in
Packit Service 612474
mingw*)
Packit Service 612474
        have_win32="yes"
Packit Service 612474
        lt_enable_auto_import="-Wl,--enable-auto-import"
Packit Service 612474
        ;;
Packit Service 612474
linux*)
Packit Service 612474
        AC_DEFINE([HAVE_ABSTRACT_SOCKETS], 1, [Define if your platform supports abstract sockets])
Packit Service 612474
        ;;
Packit Service 612474
esac
Packit Service 612474
Packit Service 612474
AC_SUBST(lt_enable_auto_import)
Packit Service 612474
AM_CONDITIONAL([XCB_HAVE_WIN32], [test "x${have_win32}" = "xyes"])
Packit Service 612474
Packit Service 612474
dnl define buffer queue size
Packit Service 612474
AC_ARG_WITH([queue-size],
Packit Service 612474
            AS_HELP_STRING([--with-queue-size=SIZE],
Packit Service 612474
            [Set the XCB buffer queue size (default is 16384)]),
Packit Service 612474
            [xcb_queue_buffer_size="$withval"],
Packit Service 612474
            [xcb_queue_buffer_size=16384])
Packit Service 612474
AC_DEFINE_UNQUOTED(XCB_QUEUE_BUFFER_SIZE, [$xcb_queue_buffer_size],
Packit Service 612474
                   [XCB buffer queue size])
Packit Service 612474
Packit Service 612474
dnl check for the sockaddr_un.sun_len member
Packit Service 612474
AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
Packit Service 612474
                [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN,1,[Have the sockaddr_un.sun_len member.])],
Packit Service 612474
                [],
Packit Service 612474
                [ #include <sys/types.h>
Packit Service 612474
                  #include <sys/un.h>
Packit Service 612474
                ])
Packit Service 612474
Packit Service 612474
dnl check for support for Solaris Trusted Extensions
Packit Service 612474
AC_CHECK_HEADERS([tsol/label.h])
Packit Service 612474
AC_CHECK_FUNCS([is_system_labeled])
Packit Service 612474
Packit Service 612474
dnl check for IOV_MAX, and fall back to UIO_MAXIOV on BSDish systems
Packit Service 612474
AC_CHECK_DECL([IOV_MAX], [],
Packit Service 612474
              [AC_CHECK_DECL([UIO_MAXIOV], [AC_DEFINE([IOV_MAX], [UIO_MAXIOV])],
Packit Service 612474
                                           [AC_DEFINE([IOV_MAX], [16], [Define if not provided by <limits.h>])],
Packit Service 612474
                                           [[#include <sys/uio.h>]])],
Packit Service 612474
              [[#include <limits.h>]])
Packit Service 612474
Packit Service 612474
xcbincludedir='${includedir}/xcb'
Packit Service 612474
AC_SUBST(xcbincludedir)
Packit Service 612474
Packit Service 612474
XCB_CHECK_VISIBILITY()
Packit Service 612474
Packit Service 612474
AC_CHECK_FUNC(getaddrinfo, [AC_DEFINE(HAVE_GETADDRINFO, 1, [getaddrinfo() function is available])], )
Packit Service 612474
Packit Service 612474
case $host_os in
Packit Service 612474
        # darwin through Snow Leopard has poll() but can't be used to poll character devices.
Packit Service 612474
        darwin@<:@789@:>@*|darwin10*) ;;
Packit Service 612474
        darwin*)
Packit Service 612474
                _ac_xorg_macosx_version_min=""
Packit Service 612474
                if echo $CPPFLAGS $CFLAGS | grep -q mmacosx-version-min ; then
Packit Service 612474
                        _ac_xorg_macosx_version_min=`echo $CPPFLAGS $CFLAGS | sed 's/^.*-mmacosx-version-min=\(@<:@^ @:>@*\).*$/\1/'`
Packit Service 612474
                else
Packit Service 612474
                        _ac_xorg_macosx_version_min=$MACOSX_DEPLOYMENT_TARGET
Packit Service 612474
                fi
Packit Service 612474
                case $_ac_xorg_macosx_version_min in
Packit Service 612474
                        10.@<:@0123456@:>@|10.@<:@0123456@:>@.*) ;;
Packit Service 612474
                        *)
Packit Service 612474
                                AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
Packit Service 612474
                        ;;
Packit Service 612474
                esac
Packit Service 612474
                unset _ac_xorg_macosx_version_min
Packit Service 612474
                ;;
Packit Service 612474
        *)
Packit Service 612474
                AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
Packit Service 612474
        ;;
Packit Service 612474
esac
Packit Service 612474
Packit Service 612474
dnl Link with winsock for socket functions on MinGW
Packit Service 612474
case $host_os in
Packit Service 612474
        *mingw*)
Packit Service 612474
                AC_CHECK_LIB([ws2_32],[main])
Packit Service 612474
                ;;
Packit Service 612474
        *)
Packit Service 612474
                ;;
Packit Service 612474
esac
Packit Service 612474
Packit Service 612474
XCB_EXTENSION(Composite, yes)
Packit Service 612474
XCB_EXTENSION(Damage, yes)
Packit Service 612474
XCB_EXTENSION(DPMS, yes)
Packit Service 612474
XCB_EXTENSION(DRI2, yes)
Packit Service 612474
XCB_EXTENSION(DRI3, $have_sendmsg)
Packit Service 612474
XCB_EXTENSION(GE, no)
Packit Service 612474
XCB_EXTENSION(GLX, yes)
Packit Service 612474
XCB_EXTENSION(Present, yes)
Packit Service 612474
XCB_EXTENSION(RandR, yes)
Packit Service 612474
XCB_EXTENSION(Record, yes)
Packit Service 612474
XCB_EXTENSION(Render, yes)
Packit Service 612474
XCB_EXTENSION(Resource, yes)
Packit Service 612474
XCB_EXTENSION(Screensaver, yes)
Packit Service 612474
XCB_EXTENSION(Shape, yes)
Packit Service 612474
XCB_EXTENSION(Shm, yes)
Packit Service 612474
XCB_EXTENSION(Sync, yes)
Packit Service 612474
XCB_EXTENSION(Xevie, no)
Packit Service 612474
XCB_EXTENSION(XFixes, yes)
Packit Service 612474
XCB_EXTENSION(XFree86-DRI, yes)
Packit Service 612474
XCB_EXTENSION(Xinerama, yes)
Packit Service 612474
XCB_EXTENSION(XInput, yes)
Packit Service 612474
XCB_EXTENSION(XKB, yes)
Packit Service 612474
XCB_EXTENSION(Xprint, no)
Packit Service 612474
XCB_EXTENSION(SELinux, no)
Packit Service 612474
XCB_EXTENSION(XTest, yes)
Packit Service 612474
XCB_EXTENSION(Xv, yes)
Packit Service 612474
XCB_EXTENSION(XvMC, yes)
Packit Service 612474
Packit Service 612474
AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
Packit Service 612474
if test "x$LAUNCHD" = xauto; then
Packit Service 612474
        unset LAUNCHD
Packit Service 612474
        AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no], [$PATH$PATH_SEPARATOR/sbin])
Packit Service 612474
fi
Packit Service 612474
Packit Service 612474
if test "x$LAUNCHD" = xyes ; then
Packit Service 612474
        AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
Packit Service 612474
fi
Packit Service 612474
Packit Service 612474
AC_ARG_WITH(serverside-support, AS_HELP_STRING([--with-serverside-support], [Build with support for server-side usage of xcb. This is still EXPERIMENTAL! ABI/API may change! (default: no)]), [XCB_SERVERSIDE_SUPPORT=$withval], [XCB_SERVERSIDE_SUPPORT=no])
Packit Service 612474
Packit Service 612474
AM_CONDITIONAL(XCB_SERVERSIDE_SUPPORT, test "x$XCB_SERVERSIDE_SUPPORT" = "xyes")
Packit Service 612474
Packit Service 612474
AC_CONFIG_FILES([
Packit Service 612474
Makefile
Packit Service 612474
doc/Makefile
Packit Service 612474
man/Makefile
Packit Service 612474
src/Makefile
Packit Service 612474
tests/Makefile
Packit Service 612474
])
Packit Service 612474
Packit Service 612474
AC_CONFIG_FILES([
Packit Service 612474
xcb.pc
Packit Service 612474
xcb-composite.pc
Packit Service 612474
xcb-damage.pc
Packit Service 612474
xcb-dpms.pc
Packit Service 612474
xcb-dri2.pc
Packit Service 612474
xcb-dri3.pc
Packit Service 612474
xcb-ge.pc
Packit Service 612474
xcb-glx.pc
Packit Service 612474
xcb-present.pc
Packit Service 612474
xcb-randr.pc
Packit Service 612474
xcb-record.pc
Packit Service 612474
xcb-render.pc
Packit Service 612474
xcb-res.pc
Packit Service 612474
xcb-screensaver.pc
Packit Service 612474
xcb-shape.pc
Packit Service 612474
xcb-shm.pc
Packit Service 612474
xcb-sync.pc
Packit Service 612474
xcb-xevie.pc
Packit Service 612474
xcb-xf86dri.pc
Packit Service 612474
xcb-xfixes.pc
Packit Service 612474
xcb-xinerama.pc
Packit Service 612474
xcb-xinput.pc
Packit Service 612474
xcb-xkb.pc
Packit Service 612474
xcb-xprint.pc
Packit Service 612474
xcb-xselinux.pc
Packit Service 612474
xcb-xtest.pc
Packit Service 612474
xcb-xv.pc
Packit Service 612474
xcb-xvmc.pc
Packit Service 612474
])
Packit Service 612474
Packit Service 612474
AC_CONFIG_FILES([
Packit Service 612474
doc/xcb.doxygen
Packit Service 612474
])
Packit Service 612474
Packit Service 612474
AC_OUTPUT
Packit Service 612474
Packit Service 612474
dnl Configuration output
Packit Service 612474
Packit Service 612474
echo ""
Packit Service 612474
echo "  Package: ${PACKAGE_NAME} ${PACKAGE_VERSION}"
Packit Service 612474
echo ""
Packit Service 612474
echo "  Configuration"
Packit Service 612474
echo "    XDM support.........: ${have_xdmcp}"
Packit Service 612474
echo "    sendmsg fd passing..: ${have_sendmsg}"
Packit Service 612474
echo "    Build unit tests....: ${HAVE_CHECK}"
Packit Service 612474
echo "      with html results.: ${HTML_CHECK_RESULT}"
Packit Service 612474
echo "    XCB buffer size.....: ${xcb_queue_buffer_size}"
Packit Service 612474
echo ""
Packit Service 612474
echo "  X11 extensions"
Packit Service 612474
echo "    Composite...........: ${BUILD_COMPOSITE}"
Packit Service 612474
echo "    Damage..............: ${BUILD_DAMAGE}"
Packit Service 612474
echo "    Dpms................: ${BUILD_DPMS}"
Packit Service 612474
echo "    Dri2................: ${BUILD_DRI2}"
Packit Service 612474
echo "    Dri3................: ${BUILD_DRI3}"
Packit Service 612474
echo "    GenericEvent........: ${BUILD_GE}"
Packit Service 612474
echo "    Glx.................: ${BUILD_GLX}"
Packit Service 612474
echo "    Randr...............: ${BUILD_RANDR}"
Packit Service 612474
echo "    Record..............: ${BUILD_RECORD}"
Packit Service 612474
echo "    Render..............: ${BUILD_RENDER}"
Packit Service 612474
echo "    Resource............: ${BUILD_RESOURCE}"
Packit Service 612474
echo "    Screensaver.........: ${BUILD_SCREENSAVER}"
Packit Service 612474
echo "    selinux.............: ${BUILD_SELINUX}"
Packit Service 612474
echo "    Shape...............: ${BUILD_SHAPE}"
Packit Service 612474
echo "    Shm.................: ${BUILD_SHM}"
Packit Service 612474
echo "    Sync................: ${BUILD_SYNC}"
Packit Service 612474
echo "    Xevie...............: ${BUILD_XEVIE}"
Packit Service 612474
echo "    Xfixes..............: ${BUILD_XFIXES}"
Packit Service 612474
echo "    Xfree86-dri.........: ${BUILD_XFREE86_DRI}"
Packit Service 612474
echo "    xinerama............: ${BUILD_XINERAMA}"
Packit Service 612474
echo "    xinput..............: ${BUILD_XINPUT}"
Packit Service 612474
echo "    xkb.................: ${BUILD_XKB}"
Packit Service 612474
echo "    xprint..............: ${BUILD_XPRINT}"
Packit Service 612474
echo "    xtest...............: ${BUILD_XTEST}"
Packit Service 612474
echo "    xv..................: ${BUILD_XV}"
Packit Service 612474
echo "    xvmc................: ${BUILD_XVMC}"
Packit Service 612474
echo ""
Packit Service 612474
echo "  Used CFLAGS:"
Packit Service 612474
echo "    CPPFLAGS............: ${CPPFLAGS}"
Packit Service 612474
echo "    CFLAGS..............: ${CFLAGS}"
Packit Service 612474
echo ""
Packit Service 612474
echo "  Installation:"
Packit Service 612474
echo "    Prefix..............: ${prefix}"
Packit Service 612474
echo ""