2
# @file m4/ac_enable_xi2.m4
3
# @brief autoconf macro to enable or disable support for XInput 2.1
5
# Copyright 2011 Canonical, Ltd.
7
# This file is part of the geis library. This library is free software;
8
# you can redistribute it and/or modify it under the terms of the GNU Lesser
9
# General Public License as published by the Free Software Foundation; either
10
# version 3 of the License, or (at your option) any later version.
12
# This library is distributed in the hope that it will be useful, but WITHOUT
13
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17
# You should have received a copy of the GNU General Public License
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20
AC_DEFUN([AX_ENABLE_XI2],[
21
AC_ARG_ENABLE([xi2.1],
22
AS_HELP_STRING([--disable-xi2.1], [Disable XI2.1 features]))
23
AS_IF([test "x$enable_xi2_1" != "xno"],[
24
AC_MSG_CHECKING([for XI2.1])
26
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
27
#include <X11/extensions/XInput2.h>
28
XITouchValuatorClassInfo* p = 0;
31
AC_DEFINE([HAVE_XI_2_1],[1],[XInput 2.1 is available])]
33
AC_MSG_RESULT([$ax_have_xi_2_1])
34
PKG_CHECK_MODULES([XORG], [xorg-server >= 1.10.1], ,
35
AC_MSG_ERROR([X.Org Server development libraries not found]))