14e7590efSmrg#
24e7590efSmrg#  Copyright © 2003 Keith Packard, Noah Levitt
34e7590efSmrg#
44e7590efSmrg#  Permission to use, copy, modify, distribute, and sell this software and its
54e7590efSmrg#  documentation for any purpose is hereby granted without fee, provided that
64e7590efSmrg#  the above copyright notice appear in all copies and that both that
74e7590efSmrg#  copyright notice and this permission notice appear in supporting
84e7590efSmrg#  documentation, and that the name of Keith Packard not be used in
94e7590efSmrg#  advertising or publicity pertaining to distribution of the software without
104e7590efSmrg#  specific, written prior permission.  Keith Packard makes no
114e7590efSmrg#  representations about the suitability of this software for any purpose.  It
124e7590efSmrg#  is provided "as is" without express or implied warranty.
134e7590efSmrg#
144e7590efSmrg#  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
154e7590efSmrg#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
164e7590efSmrg#  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
174e7590efSmrg#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
184e7590efSmrg#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
194e7590efSmrg#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
204e7590efSmrg#  PERFORMANCE OF THIS SOFTWARE.
214e7590efSmrg#
224b0ead49Smrg
234e7590efSmrg# Initialize Autoconf
2449dc963fSmrgAC_PREREQ([2.60])
254e7590efSmrg#
264e7590efSmrg# Version should match the current XComposite version. XCompositeQueryVersion
274e7590efSmrg# returns the version from xcompositewire.h, NOT the version we set here.
284e7590efSmrg# But we try to keep these the same.  Note that the library has an extra
294e7590efSmrg# digit in the version number to track changes which don't affect the
304e7590efSmrg# protocol, so Xcomposite version l.n.m corresponds to protocol version l.n
314e7590efSmrg# that 'revision' number appears in Xcomposite.h and has to be manually
324e7590efSmrg# synchronized.
334e7590efSmrg#
34c3e29c03SmrgAC_INIT(libXcomposite, [0.4.6],
35c3e29c03Smrg	[https://gitlab.freedesktop.org/xorg/lib/libxcomposite/-/issues],
36c3e29c03Smrg	[libXcomposite])
374e7590efSmrgAC_CONFIG_SRCDIR([Makefile.am])
384e7590efSmrgAC_CONFIG_HEADERS([config.h])
394b0ead49Smrg
404e7590efSmrg# Initialize Automake
41c3e29c03SmrgAM_INIT_AUTOMAKE([foreign dist-xz])
424b0ead49Smrg
434e7590efSmrg# Initialize libtool
444e7590efSmrgAC_PROG_LIBTOOL
454e7590efSmrg
467aa89044Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
4752b01e16Smrgm4_ifndef([XORG_MACROS_VERSION],
487aa89044Smrg	  [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
497aa89044SmrgXORG_MACROS_VERSION(1.8)
5052b01e16SmrgXORG_DEFAULT_OPTIONS
5149dc963fSmrgXORG_WITH_XMLTO(0.0.20)
5252b01e16Smrg
5349dc963fSmrg# Determine if the source for man pages is available
5449dc963fSmrg# It may already be present (tarball) or can be generated using xmlto
5549dc963fSmrgAM_CONDITIONAL([INSTALL_MANPAGES],
5649dc963fSmrg	[test -f "$srcdir/man/Xcomposite.man" || test "x$have_xmlto" = xyes])
574b0ead49Smrg
584b0ead49Smrg# Check compositeext configuration, strip extra digits from package version to
594b0ead49Smrg# find the required protocol version
604b0ead49Smrgif test "$VERSION" = "" ; then
614b0ead49Smrg       VERSION=$PACKAGE_VERSION;
624b0ead49Smrgfi
634b0ead49SmrgCOMPOSITEEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
644b0ead49SmrgAC_SUBST(COMPOSITEEXT_VERSION)
654e7590efSmrg
66c3e29c03Smrg# Obtain compiler/linker options for dependencies
67c3e29c03SmrgPKG_CHECK_MODULES(XCOMPOSITE,
68c3e29c03Smrg        [compositeproto >= $COMPOSITEEXT_VERSION xproto >= 7.0.22 x11])
697aa89044SmrgPKG_CHECK_MODULES(XFIXES, xfixes)
704b0ead49Smrg
714e7590efSmrgAC_CONFIG_FILES([Makefile
724e7590efSmrg		src/Makefile
734e7590efSmrg		man/Makefile
744e7590efSmrg		xcomposite.pc])
754e7590efSmrgAC_OUTPUT
76