5 [https://bugs.freedesktop.org/enter_bug.cgi?product=libevdev],
9 AC_CONFIG_SRCDIR([libevdev/libevdev.c])
10 AC_CONFIG_HEADERS([config.h])
11 AC_CONFIG_MACRO_DIR([m4])
12 AC_USE_SYSTEM_EXTENSIONS
14 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
16 # Before making a release, the LIBEVDEV_LT_VERSION string should be
18 # The string is of the form C:R:A.
19 # - If interfaces have been changed or added, but binary compatibility has
20 # been preserved, change to C+1:0:A+1
21 # - If binary compatibility has been broken (eg removed or changed interfaces)
23 # - If the interface is the same as the previous version, change to C:R+1:A
24 LIBEVDEV_LT_VERSION=1:0:0
25 AC_SUBST(LIBEVDEV_LT_VERSION)
28 AM_SILENT_RULES([yes])
39 if test "x$lt_cv_prog_gnu_ld" = "xyes"; then
40 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
46 AC_SUBST([GNU_LD_FLAGS], $with_ldflags)
49 PKG_CHECK_MODULES(CHECK, [check >= 0.9.9], [HAVE_CHECK="yes"], [HAVE_CHECK="no"])
50 if test "x$HAVE_CHECK" != "xyes"; then
51 AC_MSG_WARN([check not found - skipping building unit tests])
53 AM_CONDITIONAL(BUILD_TESTS, [test "x$HAVE_CHECK" = "xyes"])
56 if test "x$GCC" = "xyes"; then
57 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
60 -Wno-unused-parameter \
62 -Wmissing-prototypes \
65 -fno-strict-aliasing \
68 -fno-strict-aliasing \
69 -fdiagnostics-show-option \
72 AC_SUBST([GCC_CFLAGS], $with_cflags)
74 AC_PATH_PROG(DOXYGEN, [doxygen])
75 if test "x$DOXYGEN" = "x"; then
76 AC_MSG_WARN([doxygen not found - required for documentation])
81 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$have_doxygen" = "xyes"])
83 AC_MSG_CHECKING([whether to build with gcov])
85 [AS_HELP_STRING([--enable-gcov],
86 [Whether to enable coverage testing (default:disabled)])],
90 AS_IF([test "x$enable_gcov" != "xno"],
92 GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
93 GCOV_LDFLAGS="-fprofile-arcs -ftest-coverage"
100 AS_IF([$($PYTHON -c "import argparse")], [:],
101 AC_MSG_ERROR([python argparse module is missing]))
103 AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" != "xno"])
104 AC_SUBST([GCOV_CFLAGS])
105 AC_SUBST([GCOV_LDFLAGS])
106 AC_MSG_RESULT([$enable_gcov])
108 AC_CONFIG_FILES([Makefile
118 Build documentation ${have_doxygen}
119 Build unit-tests ${HAVE_CHECK}
120 Enable profiling ${enable_gcov}