configure.ac revision 8c4a8e55
1b042e37fSmrgdnl 
2b042e37fSmrgdnl  Copyright © 2003 Keith Packard, Noah Levitt
3b042e37fSmrgdnl 
4b042e37fSmrgdnl  Permission to use, copy, modify, distribute, and sell this software and its
5b042e37fSmrgdnl  documentation for any purpose is hereby granted without fee, provided that
6b042e37fSmrgdnl  the above copyright notice appear in all copies and that both that
7b042e37fSmrgdnl  copyright notice and this permission notice appear in supporting
8b042e37fSmrgdnl  documentation, and that the name of Keith Packard not be used in
9b042e37fSmrgdnl  advertising or publicity pertaining to distribution of the software without
10b042e37fSmrgdnl  specific, written prior permission.  Keith Packard makes no
11b042e37fSmrgdnl  representations about the suitability of this software for any purpose.  It
12b042e37fSmrgdnl  is provided "as is" without express or implied warranty.
13b042e37fSmrgdnl 
14b042e37fSmrgdnl  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15b042e37fSmrgdnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16b042e37fSmrgdnl  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17b042e37fSmrgdnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18b042e37fSmrgdnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19b042e37fSmrgdnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20b042e37fSmrgdnl  PERFORMANCE OF THIS SOFTWARE.
21b042e37fSmrgdnl
22b042e37fSmrgdnl Process this file with autoconf to create configure.
23b042e37fSmrg
24b042e37fSmrgAC_PREREQ([2.57])
25b042e37fSmrg
26b042e37fSmrgdnl
27b042e37fSmrgdnl Version should match the current Render version. XRenderQueryVersion
28b042e37fSmrgdnl returns the version from randr.h, NOT the version we set here. But we
29b042e37fSmrgdnl try to keep these the same.  Note that the library has an extra
30b042e37fSmrgdnl digit in the version number to track changes which don't affect the
31b042e37fSmrgdnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n
32b042e37fSmrgdnl
338c4a8e55SmrgAC_INIT(libXrandr, 1.3.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
34b042e37fSmrgAC_CONFIG_AUX_DIR(.)
35b042e37fSmrgAM_INIT_AUTOMAKE([dist-bzip2])
36b042e37fSmrgAM_MAINTAINER_MODE
37b042e37fSmrg
388c4a8e55Smrg# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
398c4a8e55Smrgm4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
408c4a8e55SmrgXORG_MACROS_VERSION(1.2)
41b042e37fSmrgAM_CONFIG_HEADER(config.h)
42b042e37fSmrg
43b042e37fSmrg# Check for progs
44b042e37fSmrgAC_PROG_CC
45b042e37fSmrgAC_PROG_LIBTOOL
468c4a8e55SmrgXORG_CWARNFLAGS
47b042e37fSmrg		  
48b042e37fSmrg# Check randr configuration, strip extra digits from package version to
49b042e37fSmrg# find the required protocol version
50b042e37fSmrg
51b042e37fSmrgRANDR_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
52b042e37fSmrgAC_SUBST(RANDR_VERSION)
538c4a8e55SmrgPKG_CHECK_MODULES(RANDR, x11 randrproto >= $RANDR_VERSION xext xextproto xrender renderproto)
548c4a8e55SmrgRANDR_CFLAGS="$CWARNFLAGS $RANDR_CFLAGS"
55b042e37fSmrgAC_SUBST(RANDR_CFLAGS)
56b042e37fSmrgAC_SUBST(RANDR_LIBS)
57b042e37fSmrg
58b042e37fSmrgXORG_CHECK_MALLOC_ZERO
59b042e37fSmrgXORG_MANPAGE_SECTIONS
60b042e37fSmrgXORG_RELEASE_VERSION
618c4a8e55SmrgXORG_CHANGELOG
62b042e37fSmrg
63b042e37fSmrgAC_OUTPUT([Makefile
64b042e37fSmrg	   src/Makefile
65b042e37fSmrg	   man/Makefile
66b042e37fSmrg           xrandr.pc])
67