4 dnl Copyright © 2003 Keith Packard, Noah Levitt
6 dnl Permission to use, copy, modify, distribute, and sell this software and its
7 dnl documentation for any purpose is hereby granted without fee, provided that
8 dnl the above copyright notice appear in all copies and that both that
9 dnl copyright notice and this permission notice appear in supporting
10 dnl documentation, and that the name of Keith Packard not be used in
11 dnl advertising or publicity pertaining to distribution of the software without
12 dnl specific, written prior permission. Keith Packard makes no
13 dnl representations about the suitability of this software for any purpose. It
14 dnl is provided "as is" without express or implied warranty.
16 dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 dnl PERFORMANCE OF THIS SOFTWARE.
24 dnl Process this file with autoconf to create configure.
29 dnl Version should match the current XFixes version. XFixesQueryVersion
30 dnl returns the version from xfixeswire.h, NOT the version we set here. But we
31 dnl try to keep these the same. Note that the library has an extra
32 dnl digit in the version number to track changes which don't affect the
33 dnl protocol, so Xfixes version l.n.m corresponds to protocol version l.n
35 AC_INIT(libXdamage, 1.0.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXdamage)
36 AM_INIT_AUTOMAKE([dist-bzip2])
39 AM_CONFIG_HEADER(config.h)
46 PKG_CHECK_MODULES(X, x11,
47 [x_found_with_pkgconfig=yes],
48 [x_found_with_pkgconfig=no])
50 if test "$x_found_with_pkgconfig" = "no"
53 X_LIBS="$X_LIBS -lX11"
55 if test "x$no_x" = "xyes"
57 AC_MSG_ERROR([X is required, but it was either disabled or not found.])
62 CFLAGS="$CFLAGS $X_CFLAGS"
65 AC_MSG_CHECKING([for XTHREADS in Xlib])
67 [AC_LANG_PROGRAM([[#include <X11/Xlib.h>]],
68 [[return XInitThreads() == 0 ? 0 : 1;]])],
73 AC_MSG_RESULT($xthreads)
78 if test "x$xthreads" = "xyes"
80 X_CFLAGS="$X_CFLAGS -DXTHREADS"
84 # Check damageext configuration, strip extra digits from package version to
85 # find the required protocol version
87 DAMAGEEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
88 AC_SUBST(DAMAGEEXT_VERSION)
89 PKG_CHECK_MODULES(XDAMAGE, [damageproto >= $DAMAGEEXT_VERSION] xfixes fixesproto xextproto)
90 AC_SUBST(XDAMAGE_CFLAGS)