9 AC_CONFIG_HEADERS([config.h])
10 AC_CONFIG_MACRO_DIR([m4])
12 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
14 # Before making a release, the LIBEVDEV_LT_VERSION string should be
16 # The string is of the form C:R:A.
17 # - If interfaces have been changed or added, but binary compatibility has
18 # been preserved, change to C+1:0:A+1
19 # - If binary compatibility has been broken (eg removed or changed interfaces)
21 # - If the interface is the same as the previous version, change to C:R+1:A
22 LIBEVDEV_LT_VERSION=1:0:0
23 AC_SUBST(LIBEVDEV_LT_VERSION)
26 AM_SILENT_RULES([yes])
36 PKG_CHECK_MODULES(CHECK, [check], [HAVE_CHECK="yes"], [HAVE_CHECK="no"])
37 if test "x$HAVE_CHECK" != "xyes"; then
38 AC_MSG_WARN([check not found - skipping building unit tests])
40 AM_CONDITIONAL(BUILD_TESTS, [test "x$HAVE_CHECK" = "xyes"])
42 if test "x$GCC" = "xyes"; then
43 GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
47 AC_PATH_PROG(DOXYGEN, [doxygen])
48 if test "x$DOXYGEN" = "x"; then
49 AC_MSG_WARN([doxygen not found - required for documentation])
54 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
56 AC_MSG_CHECKING([whether to build with gcov])
58 [AS_HELP_STRING([--enable-gcov],
59 [Whether to enable coverage testing (default:enabled)])]
63 AS_IF([test "x$enable_gcov" != "xno"],
65 GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
66 GCOV_LDFLAGS="-fprofile-arcs -ftest-coverage"
71 AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" != "xno"])
72 AC_SUBST([GCOV_CFLAGS])
73 AC_SUBST([GCOV_LDFLAGS])
74 AC_MSG_RESULT([$enable_gcov])
76 AC_CONFIG_FILES([Makefile