3 m4_define([libinput_major_version], [0])
4 m4_define([libinput_minor_version], [3])
5 m4_define([libinput_micro_version], [0])
6 m4_define([libinput_version],
7 [libinput_major_version.libinput_minor_version.libinput_micro_version])
11 [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=libinput&version=libinput_version],
13 [http://www.freedesktop.org/wiki/Software/libinput/])
15 AC_SUBST([LIBINPUT_VERSION_MAJOR], [libinput_major_version])
16 AC_SUBST([LIBINPUT_VERSION_MINOR], [libinput_minor_version])
17 AC_SUBST([LIBINPUT_VERSION_MICRO], [libinput_micro_version])
18 AC_SUBST([LIBINPUT_VERSION], [libinput_version])
20 AC_CONFIG_HEADERS([config.h])
21 AC_CONFIG_MACRO_DIR([m4])
23 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
25 # Before making a release, the LIBINPUT_LT_VERSION string should be
27 # The string is of the form C:R:A.
28 # - If interfaces have been changed or added, but binary compatibility has
29 # been preserved, change to C+1:0:A+1
30 # - If binary compatibility has been broken (eg removed or changed interfaces)
32 # - If the interface is the same as the previous version, change to C:R+1:A
33 LIBINPUT_LT_VERSION=2:0:0
34 AC_SUBST(LIBINPUT_LT_VERSION)
36 AM_SILENT_RULES([yes])
40 AC_PROG_CXX # Only used by build C++ test
46 AC_CHECK_DECL(EPOLL_CLOEXEC, [],
47 [AC_MSG_ERROR("EPOLL_CLOEXEC is needed to compile libinput")],
48 [[#include <sys/epoll.h>]])
49 AC_CHECK_DECL(TFD_CLOEXEC,[],
50 [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile libinput")],
51 [[#include <sys/timerfd.h>]])
52 AC_CHECK_DECL(CLOCK_MONOTONIC,[],
53 [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile libinput")],
54 [[#include <time.h>]])
57 PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])
58 PKG_CHECK_MODULES(LIBUDEV, [libudev])
59 PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
61 if test "x$GCC" = "xyes"; then
62 GCC_CXXFLAGS="-Wall -Wextra -Wno-unused-parameter -g -fvisibility=hidden"
63 GCC_CFLAGS="$GCC_CXXFLAGS -Wmissing-prototypes -Wstrict-prototypes"
66 AC_SUBST(GCC_CXXFLAGS)
68 AC_PATH_PROG(DOXYGEN, [doxygen])
69 if test "x$DOXYGEN" = "x"; then
70 AC_MSG_WARN([doxygen not found - required for documentation])
75 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$have_doxygen" = "xyes"])
78 AS_HELP_STRING([--enable-tests], [Build the tests (default=auto)]),
79 [build_tests="$enableval"],
82 PKG_CHECK_MODULES(CHECK, [check >= 0.9.9], [HAVE_CHECK="yes"], [HAVE_CHECK="no"])
84 if test "x$build_tests" = "xauto"; then
85 build_tests="$HAVE_CHECK"
87 if test "x$build_tests" = "xyes"; then
88 if test "x$HAVE_CHECK" = "xno"; then
89 AC_MSG_ERROR([Cannot build tests, check is missing])
92 AC_PATH_PROG(VALGRIND, [valgrind])
95 AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"])
96 AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes"])
98 AC_CONFIG_FILES([Makefile
103 src/libinput-version.h