-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure.ac
153 lines (127 loc) · 3.65 KB
/
configure.ac
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
AC_PREREQ(2.60)
AC_INIT([lightify],
[0],
[liblightify],
[https://github.com/coldtobi/liblightify])
AC_CONFIG_SRCDIR([src/liblightify.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AM_INIT_AUTOMAKE([
check-news
foreign
1.11
-Wall
-Wno-portability
silent-rules
tar-pax
no-dist-gzip
dist-xz
subdir-objects
])
AC_PROG_CC
AC_PROG_CXX
# Doxygen
DX_DOXYGEN_FEATURE(ON)
DX_DOT_FEATURE(ON)
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile],[doc/doxygen])
#AC_USE_SYSTEM_EXTENSIONS
#AM_PATH_CHECK
PKG_CHECK_MODULES([CHECK], [check >= 0.10.0])
AC_PROG_CC_STDC
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_CONFIG_MACRO_DIR([m4])
# Debug messages are only emitted when logging is enabled (default)
# and verbosity is set accordingly.
# verbosity can be set via the enviorment by exporting lightify_LOG
# to "err", "info" and "debug".
# alternatively, verbosity can be adjusted by the API: see lightify_set_log_priority()
# Some extra verbose debug messages, which goes over the ENABLE_DEBUG below
# (For example, enables protocol dump when using standard I/O handlers)
AC_ARG_ENABLE([debugmsg],
AS_HELP_STRING([--enable-debugmsg],
[build with additional debugging messages. Do not use for production mode.@<:@default=disabled@:>@]),
enable_debugmsg=yes)
AS_IF([test "x$enable_debugmsg" = "xyes"], [
AC_DEFINE(ENABLE_DEBUG_MSGS, [1], [Extra debug messages.])
])
# Some extra verbose messages, emitted during protocol checks. Aims to help debugging why some message
# or answer has been rejected.
AC_ARG_ENABLE([debugprotocol],
AS_HELP_STRING([--enable-debugprotocol],
[build with very verbose protocol debugging. Do not use for production mode.@<:@default=disabled@:>@]),
enable_debugprotocol=yes)
AS_IF([test "x$enable_debugprotocol" = "xyes"], [
AC_DEFINE(ENABLE_DEBUG_PROTO, [1], [Extra verbose protocol debug messages.])
])
# General debugging messages, not in the above criterias.
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
[], [enable_debug=no])
AS_IF([test "x$enable_debug" = "xyes"], [
AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
])
LT_INIT([
disable-static
pic-only
])
AC_PREFIX_DEFAULT([/usr])
AC_PROG_SED
AC_PROG_MKDIR_P
AC_ARG_ENABLE([logging],
AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
[], enable_logging=yes)
AS_IF([test "x$enable_logging" = "xyes"], [
AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
])
AC_CHECK_FUNCS([ \
__secure_getenv \
secure_getenv\
])
my_CFLAGS="\
-Wall \
-Wchar-subscripts \
-Wformat-security \
-Wmissing-declarations \
-Wmissing-prototypes \
-Wnested-externs \
-Wpointer-arith \
-Wshadow \
-Wsign-compare \
-Wstrict-prototypes \
-Wtype-limits \
"
AC_CANONICAL_HOST
if test "$host_os" = cygwin
then
LDFLAG_NO_UNDEFINED="-no-undefined"
fi
AC_SUBST([LDFLAG_NO_UNDEFINED])
AC_SUBST([my_CFLAGS])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE $VERSION
=====
prefix: ${prefix}
sysconfdir: ${sysconfdir}
libdir: ${libdir}
includedir: ${includedir}
compiler: ${CC}
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
logging: ${enable_logging}
debug: ${enable_debug}
])