configure.ac revision 49dc963f
14b0ead49Smrgdnl 
24b0ead49Smrgdnl  Copyright © 2003 Keith Packard, Noah Levitt
34b0ead49Smrgdnl 
44b0ead49Smrgdnl  Permission to use, copy, modify, distribute, and sell this software and its
54b0ead49Smrgdnl  documentation for any purpose is hereby granted without fee, provided that
64b0ead49Smrgdnl  the above copyright notice appear in all copies and that both that
74b0ead49Smrgdnl  copyright notice and this permission notice appear in supporting
84b0ead49Smrgdnl  documentation, and that the name of Keith Packard not be used in
94b0ead49Smrgdnl  advertising or publicity pertaining to distribution of the software without
104b0ead49Smrgdnl  specific, written prior permission.  Keith Packard makes no
114b0ead49Smrgdnl  representations about the suitability of this software for any purpose.  It
124b0ead49Smrgdnl  is provided "as is" without express or implied warranty.
134b0ead49Smrgdnl 
144b0ead49Smrgdnl  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
154b0ead49Smrgdnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
164b0ead49Smrgdnl  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
174b0ead49Smrgdnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
184b0ead49Smrgdnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
194b0ead49Smrgdnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
204b0ead49Smrgdnl  PERFORMANCE OF THIS SOFTWARE.
214b0ead49Smrgdnl
224b0ead49Smrgdnl Process this file with autoconf to create configure.
234b0ead49Smrg
2449dc963fSmrgAC_PREREQ([2.60])
254b0ead49Smrg
264b0ead49Smrgdnl
274b0ead49Smrgdnl Version should match the current XComposite version. XCompositeQueryVersion
2852b01e16Smrgdnl returns the version from xcompositewire.h, NOT the version we set here.
2952b01e16Smrgdnl But we try to keep these the same.  Note that the library has an extra
304b0ead49Smrgdnl digit in the version number to track changes which don't affect the
314b0ead49Smrgdnl protocol, so Xcomposite version l.n.m corresponds to protocol version l.n
324b0ead49Smrgdnl that 'revision' number appears in Xcomposite.h and has to be manually
334b0ead49Smrgdnl synchronized.
344b0ead49Smrgdnl
3549dc963fSmrgAC_INIT(libXcomposite,
3649dc963fSmrg	0.4.2,
3749dc963fSmrg	[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
3849dc963fSmrg	libXcomposite)
3949dc963fSmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
404b0ead49SmrgAM_MAINTAINER_MODE
414b0ead49Smrg
4249dc963fSmrg# Require xorg-macros: XORG_DEFAULT_OPTIONS
4352b01e16Smrgm4_ifndef([XORG_MACROS_VERSION],
4449dc963fSmrg	  [m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])])
4549dc963fSmrgXORG_MACROS_VERSION(1.6)
464b0ead49SmrgAM_CONFIG_HEADER(config.h)
474b0ead49Smrg
484b0ead49Smrg# Check for progs
494b0ead49SmrgAC_PROG_CC
504b0ead49SmrgAC_PROG_LIBTOOL
514b0ead49Smrg
5252b01e16SmrgXORG_DEFAULT_OPTIONS
5349dc963fSmrgXORG_WITH_XMLTO(0.0.20)
5452b01e16Smrg
5549dc963fSmrg# Determine if the source for man pages is available
5649dc963fSmrg# It may already be present (tarball) or can be generated using xmlto
5749dc963fSmrgAM_CONDITIONAL([INSTALL_MANPAGES],
5849dc963fSmrg	[test -f "$srcdir/man/Xcomposite.man" || test "x$have_xmlto" = xyes])
594b0ead49Smrg
604b0ead49Smrg# Check compositeext configuration, strip extra digits from package version to
614b0ead49Smrg# find the required protocol version
624b0ead49Smrg
634b0ead49Smrgif test "$VERSION" = "" ; then
644b0ead49Smrg       VERSION=$PACKAGE_VERSION;
654b0ead49Smrgfi
664b0ead49SmrgCOMPOSITEEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
674b0ead49SmrgAC_SUBST(COMPOSITEEXT_VERSION)
684b0ead49SmrgPKG_CHECK_MODULES(XCOMPOSITE, [compositeproto >= $COMPOSITEEXT_VERSION] x11 xfixes xext fixesproto)
694b0ead49SmrgAC_SUBST(XCOMPOSITE_CFLAGS)
704b0ead49SmrgAC_SUBST(XCOMPOSITE_LIBS)
714b0ead49Smrg
724b0ead49SmrgAC_OUTPUT([Makefile
734b0ead49Smrg	   src/Makefile
744b0ead49Smrg	   man/Makefile
754b0ead49Smrg           xcomposite.pc])
764b0ead49Smrg
77