-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfigure.ac
245 lines (223 loc) · 7.36 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
dnl
define([AC_INIT_NOTICE],
[### Generated automatically using autoconf version] AC_ACVERSION [
### Copyright 2005-11 Steve Grubb <[email protected]>
###
### Permission is hereby granted, free of charge, to any person obtaining a
### copy of this software and associated documentation files (the "Software"),
### to deal in the Software without restriction, including without limitation
### the rights to use, copy, modify, merge, publish, distribute, sublicense,
### and/or sell copies of the Software, and to permit persons to whom the
### Software is furnished to do so, subject to the following conditions:
###
### The above copyright notice and this permission notice shall be included
### in all copies or substantial portions of the Software.
###
### THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
### IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
### FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
### THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
### OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
### ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
### OTHER DEALINGS IN THE SOFTWARE.
###
### For usage, run `./configure --help'
### For more detailed information on installation, read the file `INSTALL'.
###
### If configuration succeeds, status is in the file `config.status'.
### A log of configuration tests is in `config.log'.
])
AC_REVISION($Revision: 1.3 $)dnl
AC_INIT(audit,2.1.3)
AC_PREREQ(2.12)dnl
AM_CONFIG_HEADER(config.h)
echo Configuring auditd $VERSION
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AM_PATH_PYTHON
OLDLIBS="$LIBS"
m4_include([src/libev/libev.m4])
libev_LIBS="$LIBS"
LIBS="$OLDLIBS"
echo .
echo Checking for programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_AWK
echo .
echo Checking for header files
AC_HEADER_STDC
AC_HEADER_TIME
AC_C_CONST
AC_C_INLINE
AC_CHECK_SIZEOF([unsigned int])
AC_CHECK_SIZEOF([unsigned long])
AM_PROG_CC_C_O
ALLWARNS=""
ALLDEBUG="-g"
OPT="-O"
if test x"$GCC" = x"yes"; then
OPT="-O2 -pipe"
case "$target" in
*linux*)
ALLWARNS="-W -Wall -Wundef -Wpointer-arith -Wcast-align \
-Wwrite-strings -Waggregate-return -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
-Wnested-externs -Winline -Wfloat-equal -Wchar-subscripts"
;;
esac
fi
#gssapi
AC_ARG_ENABLE(gssapi_krb5,
[AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])],
[case "${enableval}" in
yes) want_gssapi_krb5="yes" ;;
no) want_gssapi_krb5="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-gssapi-krb5) ;;
esac],
[want_gssapi_krb5="no"]
)
if test $want_gssapi_krb5 = yes; then
AC_CHECK_LIB(gssapi_krb5, gss_acquire_cred, [
AC_CHECK_HEADER(gssapi/gssapi.h, [
AC_DEFINE(USE_GSSAPI,,
Define if you want to use GSSAPI)
gss_libs="-lgssapi_krb5 -lkrb5"
AC_SUBST(gss_libs)
])
])
fi
AM_CONDITIONAL(ENABLE_GSSAPI, test x$want_gssapi_krb5 = xyes)
ALLDEBUG="-g"
AC_ARG_WITH(debug,
[ --with-debug turn on debugging [[default=no]]],
[
if test "x${withval}" = xyes; then
DEBUG="$ALLDEBUG"
OPT="-O"
AM_CONDITIONAL(DEBUG, true)
else
DEBUG="-DNDEBUG"
AM_CONDITIONAL(DEBUG, false)
fi
],
[ DEBUG="-DNDEBUG"; AM_CONDITIONAL(DEBUG, false) ])
AC_ARG_WITH(warn,
[ --with-warn turn on warnings [[default=yes]]],
[
if test "x${withval}" = xyes; then
WARNS="$ALLWARNS"
else
WARNS=""
fi
],WARNS="$ALLWARNS")
AC_MSG_CHECKING(whether to include alpha processor support)
AC_ARG_WITH(alpha,
AS_HELP_STRING([--with-alpha],[enable Alpha processor support]),
use_alpha=$withval,
use_alpha=no)
if test x$use_alpha != xno ; then
AC_DEFINE(WITH_ALPHA,1,[Define if you want to enable Alpha processor support.])
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(USE_ALPHA, test x$use_alpha = xyes)
AC_MSG_CHECKING(whether to include arm eabi processor support)
AC_ARG_WITH(armeb,
AS_HELP_STRING([--with-armeb],[enable Arm eabi processor support]),
use_armeb=$withval,
use_armeb=no)
if test x$use_armeb != xno ; then
AC_DEFINE(WITH_ARMEB,1,[Define if you want to enable Arm eabi processor support.])
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(USE_ARMEB, test x$use_armeb = xyes)
AC_MSG_CHECKING(whether to use apparmor)
AC_ARG_WITH(apparmor,
AS_HELP_STRING([--with-apparmor],[enable AppArmor events]),
use_apparmor=$withval,
use_apparmor=no)
if test x$use_apparmor != xno ; then
AC_DEFINE(WITH_APPARMOR,1,[Define if you want to enable AppArmor events.])
else
AC_MSG_RESULT(no)
fi
AC_ARG_WITH(prelude,
AS_HELP_STRING([--with-prelude],[enable prelude IDS support]),
use_prelude=$withval,
use_prelude=no)
if test x$use_prelude = xno ; then
have_prelude=no;
AC_MSG_RESULT(no)
else
AC_CHECK_LIB(prelude, prelude_init,
have_prelude=yes, have_prelude=no)
if test x$have_prelude = xno ; then
AC_MSG_ERROR([Prelude explicitly required and prelude library not found])
else
LIBPRELUDE_CFLAGS=`libprelude-config --pthread-cflags 2>/dev/null`
LIBPRELUDE_LDFLAGS=`libprelude-config --ldflags 2>/dev/null`
fi
fi
AM_CONDITIONAL(HAVE_PRELUDE, test x$have_prelude = xyes)
AC_MSG_CHECKING(whether to use libwrap)
AC_ARG_WITH(libwrap,
[ --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support.],
[ case "$withval" in
no)
AC_MSG_RESULT(no)
;;
yes)
AC_MSG_RESULT(yes)
AC_CHECK_HEADER(tcpd.h, [],
AC_MSG_ERROR([Could not find libwrap headers]),)
AC_CHECK_LIB(wrap, request_init, [ LIBWRAP_LIBS="-lwrap" ])
AC_CHECK_LIB(nsl, yp_get_default_domain, [
LIBWRAP_LIBS="$LIBWRAP_LIBS -lnsl" ])
;;
*)
AC_MSG_RESULT(yes)
if test -d "$withval"; then
LIBWRAP_LIBS="-L$withval -lwrap"
else
LIBWRAP_LIBS="$withval"
fi
AC_CHECK_HEADER(tcpd.h, [],
AC_MSG_ERROR([Could not find libwrap headers]))
AC_CHECK_LIB(wrap, request_init, [])
AC_CHECK_LIB(nsl, yp_get_default_domain, [
LIBWRAP_LIBS="$LIBWRAP_LIBS -lnsl" ])
OLDLIBS="$LIBS"
LIBS="$LIBWRAP_LIBS $LIBS"
AC_TRY_LINK([ int allow_severity; int deny_severity; ],
[ hosts_access(); ], [],
[ AC_MSG_ERROR(Could not find the $withval library. You must first install tcp_wrappers.) ])
LIBS="$OLDLIBS"
;;
esac ],
AC_MSG_RESULT(no)
)
if test x"$LIBWRAP_LIBS" != "x"; then
AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, [], Define if tcp_wrappers support is enabled )
fi
# See if we want to support lower capabilities for plugins
LIBCAP_NG_PATH
AC_SUBST(DEBUG)
AC_SUBST(LIBWRAP_LIBS)
AC_SUBST(libev_LIBS)
AC_SUBST(LIBPRELUDE_CFLAGS)
AC_SUBST(LIBPRELUDE_LDFLAGS)
AC_OUTPUT(Makefile lib/Makefile lib/test/Makefile auparse/Makefile auparse/test/Makefile src/Makefile src/mt/Makefile src/libev/Makefile src/test/Makefile swig/Makefile docs/Makefile init.d/Makefile audisp/Makefile audisp/plugins/Makefile audisp/plugins/builtins/Makefile audisp/plugins/prelude/Makefile audisp/plugins/remote/Makefile audisp/plugins/zos-remote/Makefile bindings/Makefile bindings/python/Makefile tools/Makefile tools/aulast/Makefile tools/aulastlog/Makefile tools/ausyscall/Makefile audisp/plugins/cef/Makefile)
echo .
echo "
Auditd Version: $VERSION
Target: $target
Installation prefix: $prefix
Compiler: $CC
Compiler flags:
`echo $CFLAGS | fmt -w 50 | sed 's,^, ,'`
"