configure.ac revision 0309d3b3
1# Copyright © 2007 Peter Hutterer
2# Copyright © 2009 Red Hat, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice (including the next
12# paragraph) shall be included in all copies or substantial portions of the
13# Software.
14#
15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21# DEALINGS IN THE SOFTWARE.
22
23# Initialize Autoconf
24AC_PREREQ([2.60])
25AC_INIT([xinput], [1.6.0],
26	[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xinput])
27AC_CONFIG_SRCDIR([Makefile.am])
28AC_CONFIG_HEADERS([config.h])
29
30# Initialize Automake
31AM_INIT_AUTOMAKE([foreign dist-bzip2])
32AM_MAINTAINER_MODE
33
34# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
35m4_ifndef([XORG_MACROS_VERSION],
36          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
37XORG_MACROS_VERSION(1.8)
38XORG_DEFAULT_OPTIONS
39
40# Obtain compiler/linker options for dependencies
41PKG_CHECK_MODULES(XINPUT, x11 xext [xi >= 1.2] [inputproto >= 1.5] xrandr xinerama)
42
43# XI2 support
44PKG_CHECK_MODULES(XI2, [xi >= 1.2.99.2] [inputproto >= 1.9.99.15],
45                  HAVE_XI2="yes"; AC_DEFINE(HAVE_XI2, 1, [XI2 available]),
46                  HAVE_XI2="no");
47AM_CONDITIONAL(HAVE_XI2, [ test "$HAVE_XI2" = "yes" ])
48AC_SUBST(HAVE_XI2)
49
50# XI2.1 support
51PKG_CHECK_MODULES(XI21, [xi >= 1.4.99.1] [inputproto >= 2.0.99.1],
52                  AC_DEFINE(HAVE_XI21, 1, [XI2.1 available]));
53# XI2.2 support
54PKG_CHECK_MODULES(XI22, [xi >= 1.5.99.1] [inputproto >= 2.1.99.1],
55                  AC_DEFINE(HAVE_XI22, 1, [XI2.2 available]));
56
57AC_OUTPUT([Makefile
58           src/Makefile
59           man/Makefile])
60