~ubuntu-branches/ubuntu/trusty/geis/trusty

« back to all changes in this revision

Viewing changes to m4/ax_enable_xi2.m4

  • Committer: Package Import Robot
  • Author(s): Chase Douglas
  • Date: 2012-07-30 08:51:42 UTC
  • Revision ID: package-import@ubuntu.com-20120730085142-jrc33ygjvt0ob1wl
Tags: upstream-2.2.11
ImportĀ upstreamĀ versionĀ 2.2.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# @file m4/ac_enable_xi2.m4
 
3
# @brief autoconf macro to enable or disable support for XInput 2.1
 
4
#
 
5
# Copyright 2011 Canonical, Ltd.
 
6
#
 
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.
 
11
#
 
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
 
15
# details.
 
16
#
 
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/>.
 
19
#
 
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])
 
25
    ax_have_xi_2_1=no
 
26
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 
27
      #include <X11/extensions/XInput2.h>
 
28
      XITouchValuatorClassInfo* p = 0;
 
29
      ])],
 
30
      [ax_have_xi_2_1=yes
 
31
       AC_DEFINE([HAVE_XI_2_1],[1],[XInput 2.1 is available])]
 
32
    )
 
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]))
 
36
  ])
 
37
])
 
38