-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
89 lines (64 loc) · 2.1 KB
/
configure.ac
File metadata and controls
89 lines (64 loc) · 2.1 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.70])
AC_INIT([libevdevxx],
[0.5.3],
[https://github.com/dkosmari/libevdevxx/issues],
[],
[https://github.com/dkosmari/libevdevxx])
AC_CONFIG_SRCDIR([src/AbsInfo.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects])
LT_INIT
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_LANG([C++])
AX_APPEND_COMPILE_FLAGS([-std=c++20], [CXX])
ENABLE_DOCS=no
AC_ARG_ENABLE([docs],
[AS_HELP_STRING([--enable-docs], [enable generating documentation])],
[ENABLE_DOCS=$enableval])
AS_VAR_IF([ENABLE_DOCS], [yes],
[
AC_CHECK_PROGS([DOXYGEN], [doxygen], [:])
AS_VAR_IF([DOXYGEN], [:], [ENABLE_DOCS=no])
])
AM_CONDITIONAL([BUILD_DOCS], [test "x$ENABLE_DOCS" = "xyes"])
ENABLE_TOOLS=no
AC_ARG_ENABLE([tools],
[AS_HELP_STRING([--enable-tools], [enable building tools])],
[ENABLE_TOOLS=$enableval])
AM_CONDITIONAL([BUILD_TOOLS], [test "x$ENABLE_TOOLS" = "xyes"])
ENABLE_EXAMPLES=no
AC_ARG_ENABLE([examples],
[AS_HELP_STRING([--enable-examples], [enable building examples])],
[ENABLE_EXAMPLES=$enableval])
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLE_EXAMPLES" = "xyes"])
PKG_INSTALLDIR
PKG_CHECK_MODULES([LIBEVDEV], [libevdev >= 1.10])
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([sys/ioctl.h])
AC_CHECK_HEADERS([unistd.h])
AC_TYPE_MODE_T
AC_FUNC_STRERROR_R
TARBALL_NAME="${PACKAGE_TARNAME}-${PACKAGE_VERSION}.tar.gz"
AC_SUBST([TARBALL_NAME])
AC_CONFIG_FILES([Makefile
doc/Doxyfile
doc/Makefile
examples/Makefile
libevdevxx.pc
tools/Makefile
])
AC_OUTPUT
AC_MSG_NOTICE([Building documentation: $ENABLE_DOCS])
AC_MSG_NOTICE([Building tools: $ENABLE_TOOLS])
AC_MSG_NOTICE([Building examples: $ENABLE_EXAMPLES])