3 m4_define([libinput_major_version], [0])
4 m4_define([libinput_minor_version], [0])
5 m4_define([libinput_micro_version], [90])
6 m4_define([libinput_version],
7 [libinput_major_version.libinput_minor_version.libinput_micro_version])
11 [http://nobugtracker],
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 AM_SILENT_RULES([yes])
34 AC_CHECK_DECL(EPOLL_CLOEXEC, [],
35 [AC_MSG_ERROR("EPOLL_CLOEXEC is needed to compile libinput")],
36 [[#include <sys/epoll.h>]])
37 AC_CHECK_DECL(TFD_CLOEXEC,[],
38 [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile libinput")],
39 [[#include <sys/timerfd.h>]])
40 AC_CHECK_DECL(CLOCK_MONOTONIC,[],
41 [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile libinput")],
42 [[#include <time.h>]])
45 PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])
46 PKG_CHECK_MODULES(LIBUDEV, [libudev])
48 if test "x$GCC" = "xyes"; then
49 GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
53 AC_PATH_PROG(DOXYGEN, [doxygen])
54 if test "x$DOXYGEN" = "x"; then
55 AC_MSG_WARN([doxygen not found - required for documentation])
60 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$have_doxygen" = "xyes"])
63 AS_HELP_STRING([--enable-tests], [Build the tests (default=auto)]),
64 [build_tests="$enableval"],
67 PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4], [HAVE_LIBEVDEV="yes"], [HAVE_LIBEVDEV="no"])
68 PKG_CHECK_MODULES(CHECK, [check >= 0.9.9], [HAVE_CHECK="yes"], [HAVE_CHECK="no"])
70 if test "x$build_tests" = "xauto"; then
71 if test "x$HAVE_CHECK" = "xyes" -a "x$HAVE_LIBEVDEV" = "xyes"; then
75 if test "x$build_tests" = "xyes" -a "x$HAVE_CHECK" = "xno"; then
76 AC_MSG_ERROR([Cannot build tests, check is missing])
78 if test "x$build_tests" = "xyes" -a "x$HAVE_LIBEVDEV" = "xno"; then
79 AC_MSG_ERROR([Cannot build tests, libevdev is missing])
82 AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes"])
84 AC_CONFIG_FILES([Makefile
89 src/libinput-version.h