summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 5e760e25eb5fbcea378c3036e76595587bb37027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([Dummy X.org Testing Environment for Google Test],
        [0.1.1],
        [],
        [xorg-gtest])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_MACRO_DIR([m4])

# Initialize Automake
AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE([enable])

LIB_VERSION=0:0:0
AC_SUBST([LIB_VERSION])

# Initialize libtool
AC_PROG_LIBTOOL


# Checks for programs.
AC_PROG_CXX
AC_PROG_INSTALL

AC_LANG([C++])

# Require X.Org macros 1.16 or later for XORG_TESTSET_CFLAG
m4_ifndef([XORG_MACROS_VERSION],
	  [m4_fatal([must install xorg-macros 1.16 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.16)
XORG_DEFAULT_OPTIONS

PKG_CHECK_MODULES(XSERVER, x11)
 
# Check for Google Test
AC_CHECK_GTEST

AS_IF([test "x$ac_cv_lib_gtest_main" != xyes],
      AC_MSG_ERROR([package 'gtest' not found]))

AC_SUBST([GTEST_CPPFLAGS])

# Check if we should include support for utouch-evemu
AC_ARG_WITH([evemu],
            [AS_HELP_STRING([--with-evemu],
                            [support Linux input device recording playback (default: enabled if available)])],
            [],
            [with_evemu=check])

AS_IF([test "x$with_evemu" == xyes],
      [PKG_CHECK_MODULES(EVEMU, utouch-evemu, [have_evemu=yes])],
      [test "x$with_evemu" == xcheck],
      [PKG_CHECK_MODULES(EVEMU, utouch-evemu, [have_evemu=yes], [:])])
AM_CONDITIONAL([HAVE_EVEMU], [test "x$have_evemu" = "xyes"])

AC_SUBST(DUMMY_CONF_PATH, "$datadir/xorg/gtest/dummy.conf")

AC_CONFIG_FILES([Makefile
                 xorg-gtest.pc])
                
AC_SUBST(WARNING_CPPFLAGS, "-Wall -Werror")

AC_CONFIG_FILES([data/Makefile
                 doc/Makefile
                 examples/Makefile
                 include/Makefile
                 src/Makefile])

AC_OUTPUT