2 define([AC_INIT_NOTICE],
3 [### Generated automatically using autoconf version] AC_ACVERSION [
4 ### Copyright 2005-15 Steve Grubb <sgrubb@redhat.com>
6 ### Permission is hereby granted, free of charge, to any person obtaining a
7 ### copy of this software and associated documentation files (the "Software"),
8 ### to deal in the Software without restriction, including without limitation
9 ### the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 ### and/or sell copies of the Software, and to permit persons to whom the
11 ### Software is furnished to do so, subject to the following conditions:
13 ### The above copyright notice and this permission notice shall be included
14 ### in all copies or substantial portions of the Software.
16 ### THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 ### IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 ### FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 ### THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 ### OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 ### ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 ### OTHER DEALINGS IN THE SOFTWARE.
24 ### For usage, run `./configure --help'
25 ### For more detailed information on installation, read the file `INSTALL'.
27 ### If configuration succeeds, status is in the file `config.status'.
28 ### A log of configuration tests is in `config.log'.
31 AC_REVISION($Revision: 1.3 $)dnl
34 AM_CONFIG_HEADER(config.h)
36 echo Configuring auditd $VERSION
38 AC_CONFIG_MACRO_DIR([m4])
42 AC_SUBST(LIBTOOL_DEPS)
44 m4_include([src/libev/libev.m4])
49 echo Checking for programs
57 echo Checking for header files
63 AC_CHECK_SIZEOF([unsigned int])
64 AC_CHECK_SIZEOF([unsigned long])
66 AC_CHECK_DECLS([AUDIT_FEATURE_VERSION], [], [], [[#include <linux/audit.h>]])
67 AC_CHECK_DECLS([AUDIT_VERSION_BACKLOG_WAIT_TIME], [], [], [[#include <linux/audit.h>]])
68 AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])
69 AC_CHECK_FUNCS([posix_fallocate])
74 if test x"$GCC" = x"yes"; then
78 ALLWARNS="-W -Wall -Wundef -Wpointer-arith -Wcast-align \
79 -Wwrite-strings -Waggregate-return -Wstrict-prototypes \
80 -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
81 -Wnested-externs -Winline -Wfloat-equal -Wchar-subscripts"
86 AC_MSG_CHECKING(whether to create python bindings)
88 AS_HELP_STRING([--with-python],[enable building python bindings]),
91 if test x$use_python = xno ; then
95 AC_MSG_RESULT(testing)
97 PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
98 if test -f ${PYINCLUDEDIR}/Python.h ; then
100 AC_SUBST(PYINCLUDEDIR)
103 AC_MSG_NOTICE(Python bindings will be built)
106 if test x$use_python = xyes ; then
107 AC_MSG_ERROR([Python explicitly required and python headers found])
109 AC_MSG_WARN("Python headers not found - python bindings will not be made")
113 AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
115 AC_MSG_CHECKING(whether to create python3 bindings)
117 AS_HELP_STRING([--with-python3],[enable building python3 bindings]),
118 use_python3=$withval,
120 if test x$use_python3 = xno ; then
123 AC_MSG_RESULT(investigating)
124 AC_PATH_PROG([use_python3], [python3-config], [no])
125 if test ${use_python3} = no ; then
126 if test ${withval} = yes ; then
127 echo "Python3 bindings were selected but python3-config was not found."
128 echo "Please ensure that it's installed or pass --without-python3 to ./configure"
131 echo "Python3 bindings will NOT be built"
133 echo "Python3 bindings WILL be built"
135 AC_PATH_PROG([PYTHON3], [python3], [no])
136 if test "$PYTHON3" == "no" ; then
137 echo "The python3 program was not found in the search path. Please ensure"
138 echo "that it is installed and its directory is included in the search path or"
139 echo "pass --without-python3 to ./configure."
142 PYTHON3_CFLAGS=`python3-config --cflags 2> /dev/null`
143 PYTHON3_LIBS=`python3-config --libs 2> /dev/null`
144 PYTHON3_INCLUDES=`python3-config --includes 2> /dev/null`
145 AC_SUBST([PYTHON3_PREFIX], ['${prefix}'])
146 AC_SUBST([PYTHON3_EXEC_PREFIX], ['${exec_prefix}'])
147 PYTHON3_DIR=`$PYTHON3 -c "import distutils.sysconfig; \
148 print(distutils.sysconfig.get_python_lib(0,0,prefix='$PYTHON3_PREFIX'))"`
149 PYTHON3_EXECDIR=`$PYTHON3 -c "import distutils.sysconfig; \
150 print(distutils.sysconfig.get_python_lib(1,0,prefix='$PYTHON3_EXEC_PREFIX'))"`
151 AC_SUBST(PYTHON3_CFLAGS)
152 AC_SUBST(PYTHON3_LIBS)
153 AC_SUBST(PYTHON3_INCLUDES)
154 AC_SUBST(python3dir, $PYTHON3_DIR)
155 AC_SUBST(py3execdir, $PYTHON3_EXECDIR)
158 AM_CONDITIONAL(USE_PYTHON3, test ${use_python3} = "yes")
160 AC_MSG_CHECKING(whether to create Go language bindings)
162 AS_HELP_STRING([--with-golang],[enable building golang bindings]),
165 if test x$use_golang = xno ; then
169 AC_MSG_RESULT(testing)
170 AC_CHECK_PROG([GOLANG],[go],[go],[no])
171 AS_IF([test "x$GOLANG" != "xno"],[
172 AC_MSG_NOTICE(Go bindings will be built)
175 # Substitute some golang environment.
176 GOROOT=`$GOLANG env GOROOT`
179 AC_SUBST([gobind_dir])
181 if test x$use_golang = xyes ; then
182 AC_MSG_ERROR([Go language explicitly requested and program not found])
184 AC_MSG_WARN("Go not found - go bindings will not be made")
188 AM_CONDITIONAL(HAVE_GOLANG, test ${golang_found} = "yes")
191 AC_MSG_CHECKING(whether to include auditd network listener support)
192 AC_ARG_ENABLE(listener,
193 [AS_HELP_STRING([--disable-listener],
194 [Disable auditd network listener support])],
195 enable_listener=$enableval,
197 if test "x$enable_listener" != "xno"; then
198 AC_DEFINE(USE_LISTENER, 1,
199 [Define if you want to use the auditd network listener.])
201 AM_CONDITIONAL(ENABLE_LISTENER, test "x$enable_listener" != "xno")
202 AC_MSG_RESULT($enable_listener)
204 #audisp zos-remote plugin
205 AC_MSG_CHECKING(whether to include audisp ZOS remote plugin)
206 AC_ARG_ENABLE(zos-remote,
207 [AS_HELP_STRING([--disable-zos-remote],
208 [Disable audisp ZOS remote plugin])],
209 enable_zos_remote=$enableval,
210 enable_zos_remote=yes)
211 AM_CONDITIONAL(ENABLE_ZOS_REMOTE, test "x$enable_zos_remote" != "xno")
212 AC_MSG_RESULT($enable_zos_remote)
215 AC_ARG_ENABLE(gssapi_krb5,
216 [AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])],
217 [case "${enableval}" in
218 yes) want_gssapi_krb5="yes" ;;
219 no) want_gssapi_krb5="no" ;;
220 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gssapi-krb5) ;;
222 [want_gssapi_krb5="no"]
224 if test $want_gssapi_krb5 = yes; then
225 AC_CHECK_LIB(gssapi_krb5, gss_acquire_cred, [
226 AC_CHECK_HEADER(gssapi/gssapi.h, [
227 AC_DEFINE(USE_GSSAPI,,
228 Define if you want to use GSSAPI)
229 gss_libs="-lgssapi_krb5 -lkrb5"
234 AM_CONDITIONAL(ENABLE_GSSAPI, test x$want_gssapi_krb5 = xyes)
237 AC_ARG_ENABLE(systemd,
238 [AS_HELP_STRING([--enable-systemd],[Enable systemd init scripts @<:@default=no@:>@])],
239 [case "${enableval}" in
240 yes) want_systemd="yes" ;;
241 no) want_systemd="no" ;;
242 *) AC_MSG_ERROR(bad value ${enableval} for --enable-systemd) ;;
246 AM_CONDITIONAL(ENABLE_SYSTEMD, test x$want_systemd = xyes)
250 [ --with-debug turn on debugging [[default=no]]],
252 if test "x${withval}" = xyes; then
255 AM_CONDITIONAL(DEBUG, true)
258 AM_CONDITIONAL(DEBUG, false)
261 [ DEBUG="-DNDEBUG"; AM_CONDITIONAL(DEBUG, false) ])
264 [ --with-warn turn on warnings [[default=yes]]],
266 if test "x${withval}" = xyes; then
273 AC_MSG_CHECKING(whether to include alpha processor support)
275 AS_HELP_STRING([--with-alpha],[enable Alpha processor support]),
278 if test x$use_alpha != xno ; then
279 AC_DEFINE(WITH_ALPHA,1,[Define if you want to enable Alpha processor support.])
281 AM_CONDITIONAL(USE_ALPHA, test x$use_alpha = xyes)
282 AC_MSG_RESULT($use_alpha)
284 AC_MSG_CHECKING(whether to include arm eabi processor support)
286 AS_HELP_STRING([--with-arm],[enable Arm eabi processor support]),
289 if test x$use_arm != xno ; then
290 AC_DEFINE(WITH_ARM,1,[Define if you want to enable Arm eabi processor support.])
292 AM_CONDITIONAL(USE_ARM, test x$use_arm = xyes)
293 AC_MSG_RESULT($use_arm)
295 AC_MSG_CHECKING(whether to include aarch64 processor support)
297 AS_HELP_STRING([--with-aarch64],[enable Aarch64 processor support]),
298 use_aarch64=$withval,
300 if test x$use_aarch64 != xno ; then
301 AC_DEFINE(WITH_AARCH64,1,[Define if you want to enable Aarch64 processor support.])
303 AM_CONDITIONAL(USE_AARCH64, test x$use_aarch64 = xyes)
304 AC_MSG_RESULT($use_aarch64)
306 AC_MSG_CHECKING(whether to use apparmor)
307 AC_ARG_WITH(apparmor,
308 AS_HELP_STRING([--with-apparmor],[enable AppArmor events]),
309 use_apparmor=$withval,
311 if test x$use_apparmor != xno ; then
312 AC_DEFINE(WITH_APPARMOR,1,[Define if you want to enable AppArmor events.])
314 AC_MSG_RESULT($use_apparmor)
316 AC_MSG_CHECKING(whether to use prelude)
318 AS_HELP_STRING([--with-prelude],[enable prelude IDS support]),
319 use_prelude=$withval,
321 AC_MSG_RESULT($use_prelude)
322 if test x$use_prelude = xno ; then
325 AC_CHECK_LIB(prelude, prelude_init,
326 have_prelude=yes, have_prelude=no)
327 if test x$have_prelude = xno ; then
328 AC_MSG_ERROR([Prelude explicitly required and prelude library not found])
330 LIBPRELUDE_CFLAGS=`libprelude-config --pthread-cflags 2>/dev/null`
331 LIBPRELUDE_LDFLAGS=`libprelude-config --ldflags 2>/dev/null`
335 AM_CONDITIONAL(HAVE_PRELUDE, test x$have_prelude = xyes)
337 AC_MSG_CHECKING(whether to use libwrap)
339 [ --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support.],
346 AC_CHECK_HEADER(tcpd.h, [],
347 AC_MSG_ERROR([Could not find libwrap headers]),)
348 AC_CHECK_LIB(wrap, request_init, [ LIBWRAP_LIBS="-lwrap" ])
349 AC_CHECK_LIB(nsl, yp_get_default_domain, [
350 LIBWRAP_LIBS="$LIBWRAP_LIBS -lnsl" ])
354 if test -d "$withval"; then
355 LIBWRAP_LIBS="-L$withval -lwrap"
357 LIBWRAP_LIBS="$withval"
359 AC_CHECK_HEADER(tcpd.h, [],
360 AC_MSG_ERROR([Could not find libwrap headers]))
361 AC_CHECK_LIB(wrap, request_init, [])
362 AC_CHECK_LIB(nsl, yp_get_default_domain, [
363 LIBWRAP_LIBS="$LIBWRAP_LIBS -lnsl" ])
365 LIBS="$LIBWRAP_LIBS $LIBS"
366 AC_TRY_LINK([ int allow_severity; int deny_severity; ],
367 [ hosts_access(); ], [],
368 [ AC_MSG_ERROR(Could not find the $withval library. You must first install tcp_wrappers.) ])
374 if test x"$LIBWRAP_LIBS" != "x"; then
375 AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, [], Define if tcp_wrappers support is enabled )
378 # See if we want to support lower capabilities for plugins
382 AC_SUBST(LIBWRAP_LIBS)
383 #AC_SUBST(libev_LIBS)
384 AC_SUBST(LIBPRELUDE_CFLAGS)
385 AC_SUBST(LIBPRELUDE_LDFLAGS)
387 AC_OUTPUT(Makefile lib/Makefile lib/audit.pc lib/test/Makefile auparse/Makefile auparse/test/Makefile auparse/auparse.pc src/Makefile src/mt/Makefile src/libev/Makefile src/test/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 bindings/python/python2/Makefile bindings/python/python3/Makefile bindings/golang/Makefile bindings/swig/Makefile bindings/swig/src/Makefile bindings/swig/python/Makefile bindings/swig/python3/Makefile tools/Makefile tools/aulast/Makefile tools/aulastlog/Makefile tools/ausyscall/Makefile tools/auvirt/Makefile)
392 Auditd Version: $VERSION
394 Installation prefix: $prefix
397 `echo $CFLAGS | fmt -w 50 | sed 's,^, ,'`