10309d3b3Smrg# Copyright © 2007 Peter Hutterer
20309d3b3Smrg# Copyright © 2009 Red Hat, Inc.
30309d3b3Smrg#
40309d3b3Smrg# Permission is hereby granted, free of charge, to any person obtaining a
50309d3b3Smrg# copy of this software and associated documentation files (the "Software"),
60309d3b3Smrg# to deal in the Software without restriction, including without limitation
70309d3b3Smrg# the rights to use, copy, modify, merge, publish, distribute, sublicense,
80309d3b3Smrg# and/or sell copies of the Software, and to permit persons to whom the
90309d3b3Smrg# Software is furnished to do so, subject to the following conditions:
100309d3b3Smrg#
110309d3b3Smrg# The above copyright notice and this permission notice (including the next
120309d3b3Smrg# paragraph) shall be included in all copies or substantial portions of the
130309d3b3Smrg# Software.
140309d3b3Smrg#
150309d3b3Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
160309d3b3Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
170309d3b3Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
180309d3b3Smrg# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
190309d3b3Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
200309d3b3Smrg# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
210309d3b3Smrg# DEALINGS IN THE SOFTWARE.
220309d3b3Smrg
230309d3b3Smrg# Initialize Autoconf
240309d3b3SmrgAC_PREREQ([2.60])
2520f5670eSmrgAC_INIT([xinput], [1.6.4],
26a570218aSmrg	[https://gitlab.freedesktop.org/xorg/app/xinput/issues], [xinput])
270309d3b3SmrgAC_CONFIG_SRCDIR([Makefile.am])
280309d3b3SmrgAC_CONFIG_HEADERS([config.h])
290309d3b3Smrg
300309d3b3Smrg# Initialize Automake
3120f5670eSmrgAM_INIT_AUTOMAKE([foreign dist-xz])
32b1297603Smrg
330309d3b3Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
3453719b08Smrgm4_ifndef([XORG_MACROS_VERSION],
350309d3b3Smrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
360309d3b3SmrgXORG_MACROS_VERSION(1.8)
3753719b08SmrgXORG_DEFAULT_OPTIONS
38d3263506Smrg
390309d3b3Smrg# Obtain compiler/linker options for dependencies
400309d3b3SmrgPKG_CHECK_MODULES(XINPUT, x11 xext [xi >= 1.2] [inputproto >= 1.5] xrandr xinerama)
415b944e2aSmrg
4253719b08Smrg# XI2 support
4353719b08SmrgPKG_CHECK_MODULES(XI2, [xi >= 1.2.99.2] [inputproto >= 1.9.99.15],
4453719b08Smrg                  HAVE_XI2="yes"; AC_DEFINE(HAVE_XI2, 1, [XI2 available]),
4553719b08Smrg                  HAVE_XI2="no");
4653719b08SmrgAM_CONDITIONAL(HAVE_XI2, [ test "$HAVE_XI2" = "yes" ])
475b944e2aSmrgAC_SUBST(HAVE_XI2)
48b1297603Smrg
490309d3b3Smrg# XI2.1 support
500309d3b3SmrgPKG_CHECK_MODULES(XI21, [xi >= 1.4.99.1] [inputproto >= 2.0.99.1],
510309d3b3Smrg                  AC_DEFINE(HAVE_XI21, 1, [XI2.1 available]));
520309d3b3Smrg# XI2.2 support
530309d3b3SmrgPKG_CHECK_MODULES(XI22, [xi >= 1.5.99.1] [inputproto >= 2.1.99.1],
540309d3b3Smrg                  AC_DEFINE(HAVE_XI22, 1, [XI2.2 available]));
55b1297603Smrg
56e73734d1SmrgAC_CONFIG_FILES([Makefile
57b1297603Smrg           src/Makefile
58b1297603Smrg           man/Makefile])
59e73734d1SmrgAC_OUTPUT
60