configure.ac revision 4b0ead49
1dnl 
2dnl  $Id: configure.ac,v 1.1.1.1 2008/07/30 02:45:38 mrg Exp $
3dnl 
4dnl  Copyright © 2003 Keith Packard, Noah Levitt
5dnl 
6dnl  Permission to use, copy, modify, distribute, and sell this software and its
7dnl  documentation for any purpose is hereby granted without fee, provided that
8dnl  the above copyright notice appear in all copies and that both that
9dnl  copyright notice and this permission notice appear in supporting
10dnl  documentation, and that the name of Keith Packard not be used in
11dnl  advertising or publicity pertaining to distribution of the software without
12dnl  specific, written prior permission.  Keith Packard makes no
13dnl  representations about the suitability of this software for any purpose.  It
14dnl  is provided "as is" without express or implied warranty.
15dnl 
16dnl  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18dnl  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22dnl  PERFORMANCE OF THIS SOFTWARE.
23dnl
24dnl Process this file with autoconf to create configure.
25
26AC_PREREQ([2.57])
27
28dnl
29dnl Version should match the current XComposite version. XCompositeQueryVersion
30dnl returns the version from xcompositewire.h, NOT the version we set here. But we
31dnl try to keep these the same.  Note that the library has an extra
32dnl digit in the version number to track changes which don't affect the
33dnl protocol, so Xcomposite version l.n.m corresponds to protocol version l.n
34dnl that 'revision' number appears in Xcomposite.h and has to be manually
35dnl synchronized.
36dnl
37AC_INIT(libXcomposite, 0.4.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXcomposite)
38AM_INIT_AUTOMAKE([dist-bzip2])
39AM_MAINTAINER_MODE
40
41AM_CONFIG_HEADER(config.h)
42
43# Check for progs
44AC_PROG_CC
45AC_PROG_LIBTOOL
46
47AC_ARG_VAR([XMLTO], [Path to xmlto command])
48AC_PATH_PROG([XMLTO], [xmlto])
49AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"])
50if test "x$XMLTO" = "x" -a ! -f $srcdir/man/Xcomposite.man ; then
51	AC_MSG_WARN([xmlto not found - cannot create man pages without it])
52fi
53
54# Check compositeext configuration, strip extra digits from package version to
55# find the required protocol version
56
57if test "$VERSION" = "" ; then
58       VERSION=$PACKAGE_VERSION;
59fi
60COMPOSITEEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
61AC_SUBST(COMPOSITEEXT_VERSION)
62PKG_CHECK_MODULES(XCOMPOSITE, [compositeproto >= $COMPOSITEEXT_VERSION] x11 xfixes xext fixesproto)
63AC_SUBST(XCOMPOSITE_CFLAGS)
64AC_SUBST(XCOMPOSITE_LIBS)
65
66XORG_MANPAGE_SECTIONS
67XORG_RELEASE_VERSION
68
69AC_OUTPUT([Makefile
70	   src/Makefile
71	   man/Makefile
72           xcomposite.pc])
73
74