configure.ac revision 251cc8194228ac86c9a7a4c75a54a94cea2095c7
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# This file is part of systemd.
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# Copyright 2010-2012 Lennart Poettering
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# Copyright 2010-2012 Kay Sievers
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# systemd is free software; you can redistribute it and/or modify it
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# under the terms of the GNU Lesser General Public License as published by
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# the Free Software Foundation; either version 2.1 of the License, or
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# (at your option) any later version.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# systemd is distributed in the hope that it will be useful, but
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# WITHOUT ANY WARRANTY; without even the implied warranty of
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# Lesser General Public License for more details.
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# You should have received a copy of the GNU Lesser General Public License
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# along with systemd; If not, see <http://www.gnu.org/licenses/>.
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_PREREQ([2.64])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_INIT([systemd],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [http://www.freedesktop.org/wiki/Software/systemd])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_CONFIG_SRCDIR([src/core/main.c])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_CONFIG_MACRO_DIR([m4])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_CONFIG_HEADERS([config.h])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_CONFIG_AUX_DIR([build-aux])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_USE_SYSTEM_EXTENSIONS
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SYS_LARGEFILE
f8597aabc9db75dcf504e3151faf220a165c90d1Eugen KuksaAC_PREFIX_DEFAULT([/usr])
f8597aabc9db75dcf504e3151faf220a165c90d1Eugen KuksaAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news])
f8597aabc9db75dcf504e3151faf220a165c90d1Eugen KuksaAM_SILENT_RULES([yes])
f8597aabc9db75dcf504e3151faf220a165c90d1Eugen KuksaAC_CANONICAL_HOST
ab4256496e72886018b78571057331f373da6883Eugen KuksaAC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
f8597aabc9db75dcf504e3151faf220a165c90d1Eugen KuksaAS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
f8597aabc9db75dcf504e3151faf220a165c90d1Eugen Kuksa test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
f8597aabc9db75dcf504e3151faf220a165c90d1Eugen Kuksa [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerLT_PREREQ(2.2)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerLT_INIT([disable-static])
60e6795dd310e10194e12bb660575aadf941328bEugen KuksaAS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
60e6795dd310e10194e12bb660575aadf941328bEugen KuksaAS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# i18n stuff for the PolicyKit policy files
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerIT_PROG_INTLTOOL([0.40.0])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerGETTEXT_PACKAGE=systemd
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST(GETTEXT_PACKAGE)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_PROG_MKDIR_P
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederAC_PROG_CC_C99
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichAM_PROG_CC_C_O
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian MaederAC_PROG_GCC_TRADITIONAL
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichAC_PATH_PROG([M4], [m4])
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAC_PATH_PROG([XSLTPROC], [xsltproc])
1a38107941725211e7c3f051f7a8f5e12199f03acmaederAC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon])
ce5b44277ea06257548ff625e928cb1290c6d297cmaederAC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck])
fa8878c6145f652f615a04a5e9c15a1d1327bc92cmaederAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap])
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAC_PATH_PROG([KILL], [kill], [/usr/bin/kill])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod])
3dde4051c307b609159a097f08a05108fdd036efJonathan von SchroederAC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec])
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroederm4_ifdef([GTK_DOC_CHECK], [
3dde4051c307b609159a097f08a05108fdd036efJonathan von SchroederGTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder enable_gtk_doc=no])
3dde4051c307b609159a097f08a05108fdd036efJonathan von SchroederAS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maederm4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederGOBJECT_INTROSPECTION_CHECK([1.31.1])
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder enable_introspection=no])
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAC_CHECK_TOOL(OBJCOPY, objcopy)
4b4a0b61b72cf8478a5d4d5002bca9f699401363Christian MaederAC_CHECK_TOOL(STRINGS, strings)
4b4a0b61b72cf8478a5d4d5002bca9f699401363Christian MaederAC_CHECK_TOOL(GPERF, gperf)
308834907a120fd8771e18292ed2ca9cd767c12dChristian Maederif test -z "$GPERF" ; then
bab2d88d650448628730ed3b65c9f99c52500e8cChristian Maeder AC_MSG_ERROR([*** gperf not found])
6a2dad705deefd1b7a7e09b84fd2d75f2213be47Christian MaederCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich -Wno-inline \
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
feca1d35123d8c31aee238c9ce79947b0bf65494Christian Maeder -Wlogical-op \
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder -Wsign-compare \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder -Wmissing-include-dirs \
f5c0884429b01e74c6e658ded921fb2e16dfb478Christian Maeder -Wold-style-definition \
db675e8302ddb0d6528088ce68f5e98a00e890e3Christian Maeder -Wpointer-arith \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder -Winit-self \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder -Wdeclaration-after-statement \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder -Wfloat-equal \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder -Wmissing-prototypes \
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner -Wstrict-prototypes \
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner -Wredundant-decls \
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner -Wmissing-declarations \
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner -Wmissing-noreturn \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -Wendif-labels \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -Wcast-align \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -Wstrict-aliasing=2 \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -Wwrite-strings \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder -Wno-long-long \
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner -Wno-overlength-strings \
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner -Wno-unused-parameter \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -Wno-missing-field-initializers \
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian Maeder -Wno-unused-result \
dc679edd4ca027663212afdf00926ae2ce19b555Christian Maeder -Werror=overflow \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -ffast-math \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -fno-common \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -fdiagnostics-show-option \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -fdiagnostics-color \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -fno-strict-aliasing \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -fvisibility=hidden \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder -ffunction-sections \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -fdata-sections \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -fstack-protector \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder --param=ssp-buffer-size=4])
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAC_SUBST([OUR_CFLAGS], $with_cflags)
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian MaederAS_CASE([$CFLAGS], [*-O[[12345g\ ]]*], [
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder -Wp,-D_FORTIFY_SOURCE=2])], [
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder python_extra_cflags=-Wp,-U_FORTIFY_SOURCE
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian MaederAC_SUBST([OUR_CPPFLAGS], $with_cppflags)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -Wl,--as-needed \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -Wl,--no-undefined \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -Wl,--gc-sections \
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner -Wl,-z,relro \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAC_SUBST([OUR_LDFLAGS], $with_ldflags)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder# ------------------------------------------------------------------------------
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# we use python to build the man page index, and for systemd-python
8037b7d21021a94b69e4a092f5c98e491333d939cmaederhave_python=no
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerhave_python_devel=no
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian MaederAC_ARG_WITH([python],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederAS_IF([test "x$with_python" != "xno"], [
e4f4d096e5e6d60dd91c746d0e833d0ac7a29c50Christian Maeder AM_PATH_PYTHON(,, [:])
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AS_IF([test "$PYTHON" != :], [have_python=yes])
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian MaederAS_IF([test "x$PYTHON_BINARY" = "x"],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [AS_IF([test "x$have_python" = "xyes"],
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [PYTHON_BINARY="$(which "$PYTHON")"],
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder [PYTHON_BINARY=/usr/bin/python])])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian MaederAS_IF([test "x$with_python" != "xno"], [
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder AC_PATH_PROG(PYTHON_CONFIG, python${PYTHON_VERSION}-config)
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder AS_IF([test -n "$PYTHON_CONFIG"], [
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder have_python_devel=yes
328a85c807f2a95c3f147d10b05927eaf862ebebChristian Maeder PYTHON_CFLAGS="$($PYTHON_CONFIG --cflags) $python_extra_cflags"
8fb127028cb7dd361e348a3252e33487f73428bcJonathan von Schroeder PYTHON_LIBS="$($PYTHON_CONFIG --ldflags)"
06dd4e7c29f33f6122a910719e3bd9062256e397Andy Gimblett AC_SUBST(PYTHON_CFLAGS)
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder AC_SUBST(PYTHON_LIBS)
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian MaederAM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# ------------------------------------------------------------------------------
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
c208973c890b8f993297720fd0247bc7481d4304Christian Maedersave_LIBS="$LIBS"
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederAC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
3554301a34639efb6c9961a8571775d0061284c9Christian MaederAC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersCAP_LIBS="$LIBS"
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederLIBS="$save_LIBS"
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederAC_SUBST(CAP_LIBS)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederAC_CHECK_FUNCS([fanotify_init fanotify_mark])
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAC_CHECK_FUNCS([__secure_getenv secure_getenv])
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian MaederAC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h>
3554301a34639efb6c9961a8571775d0061284c9Christian Maeder# This makes sure pkg.m4 is available.
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maederm4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederPKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder# ------------------------------------------------------------------------------
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maederhave_coverage=no
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederAC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maederif test "x$enable_coverage" = "xyes" ; then
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder if test "x$lcov_found" = xno ; then
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder AC_MSG_ERROR([*** lcov support requested but the program was not found])
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
3554301a34639efb6c9961a8571775d0061284c9Christian Maeder lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maeder AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maeder have_coverage=yes
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maeder CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
db6729e623b4053149084ccf4b35e5308ac7e359Christian Maeder -fprofile-arcs \
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maeder -ftest-coverage])
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
819e29dba060687cf391e444e0f6ff88c1908cc3Christian MaederAM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# ------------------------------------------------------------------------------
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederAC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederif test "x$enable_kmod" != "xno"; then
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder if test "x$have_kmod" = "xyes"; then
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder PKG_CHECK_MODULES(KMOD, [ libkmod >= 14 ],
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder AC_MSG_ERROR([*** kmod version >= 14 not found]))
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder AC_MSG_ERROR([*** kmod support requested, but libraries not found])
4fc9de0da898448f1d3597ebbd8c04a066464c21Christian MaederAM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# ------------------------------------------------------------------------------
c208973c890b8f993297720fd0247bc7481d4304Christian MaederAC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
c208973c890b8f993297720fd0247bc7481d4304Christian Maederif test "x$enable_blkid" != "xno"; then
0d0278c34a374b29c2d6c58b39b8b56e283d48e8Christian Maeder PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
0d0278c34a374b29c2d6c58b39b8b56e283d48e8Christian Maeder [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
0d0278c34a374b29c2d6c58b39b8b56e283d48e8Christian Maeder if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian Maeder AC_MSG_ERROR([*** blkid support requested but libraries not found])
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
986d3f255182539098a97ac86da9eeee5b7a72e3Christian Maeder# ------------------------------------------------------------------------------
4561227a776bdf0ab679b19fb92f1eaaed8786f7Christian MaederAC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
01e278bdd7dce13b9303ed3d79683d83c89d09f9Liam O'Reilly [case "${enableval}" in
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder yes) have_ima=yes ;;
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Luecke no) have_ima=no ;;
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder [have_ima=yes])
31d6d9286988dc31639d105841296759aeb743e0Jonathan von Schroederif test "x${have_ima}" != xno ; then
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder# ------------------------------------------------------------------------------
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroederhave_chkconfig=yes
05a206508bc898f87fe6ab6e069814df3c29d303Dominik LueckeAC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
05a206508bc898f87fe6ab6e069814df3c29d303Dominik Luecke [case "${enableval}" in
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder yes) have_chkconfig=yes ;;
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder no) have_chkconfig=no ;;
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian Maeder [AC_PATH_PROG(CHKCONFIG, chkconfig)
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian Maeder if test -z "$CHKCONFIG"; then
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian Maeder have_chkconfig=no
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder have_chkconfig=yes
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maederif test "x${have_chkconfig}" != xno ; then
5afff1a0f62394414c33b06141175b3ab0b117a5Christian Maeder AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
1b3a2f98d1cd01fc9e0591f69507e20526727559Dominik Luecke# ------------------------------------------------------------------------------
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettichhave_selinux=no
e39a1626bee36d6ad13a2c0014a80ef179a65bcbChristian MaederAC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian Maederif test "x$enable_selinux" != "xno"; then
ea3bff3e547a1ac714d4db39c5efef95e02b2e7dChristian Maeder PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
dd6f22b9dcff2695181b86372e4df03d5b96e92dKristina Sojakova [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
005e0f0c6b0cc898003b03801158c208f3071fc5Kristina Sojakova if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich AC_MSG_ERROR([*** SELinux support requested but libraries not found])
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian MaederAM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
74a992bd019d3319df2f21f9d358ff06cafb5f7eMihaela TurcuAC_ARG_WITH(debug-shell,
8a78868bae2ec6838c87366c35c57e109154c51eChristian Maeder AS_HELP_STRING([--with-debug-shell=PATH],
878a5ecd6acf973907e25e5be6e4a792ea19a05eEwaryst Schulz [Path to debug shell binary]),
878a5ecd6acf973907e25e5be6e4a792ea19a05eEwaryst Schulz [SUSHELL="$withval"],[
c2e192ace9ef7cfb0e59563f1b24477b2b65cff3Dominik Dietrich AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
9a4b469ca0a7f44a598e551a973c75195207db58Eugen KuksaAC_SUBST(SUSHELL)
01645eac73dbc789392674930adc5745c935f3a0Christian MaederAC_ARG_WITH([debug-tty],
01645eac73dbc789392674930adc5745c935f3a0Christian Maeder AS_HELP_STRING([--with-debug-tty=PATH],
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder [Specify the tty device for debug shell]),
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder [DEBUGTTY="$withval"],
0a03acf9fa28e6ff00f4d7c9c6acbae64cf09c56Ewaryst SchulzAC_SUBST(DEBUGTTY)
a604cbad8e2202147b5c6bb9f2e06ae61162d654Felix Gabriel Mance# ------------------------------------------------------------------------------
80875f917d741946a39d0ec0b5721e46ba609823Till MossakowskiAC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
7834a982096d93301a4626f444dd9ea5f9fe17eaChristian Maederif test "x$enable_xz" != "xno"; then
1f9274bb2aa44ea236327814dce99946be52e348Felix Gabriel Mance PKG_CHECK_MODULES(XZ, [ liblzma ],
80875f917d741946a39d0ec0b5721e46ba609823Till Mossakowski [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
bab2d88d650448628730ed3b65c9f99c52500e8cChristian Maeder if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
8fd6a3f938496a502bc62f1923ff7c15f59acf91Christian Maeder AC_MSG_ERROR([*** Xz support requested but libraries not found])
9f226cec9f978edaba67aee4c4e04e3d3b994b87Daniel CalegariAM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
7bb0a9e92bc7a6f868eaa0b9c3212c0af4f96b7fEugen Kuksa# ------------------------------------------------------------------------------
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAC_ARG_ENABLE([tcpwrap],
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [case "${enableval}" in
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder yes) have_tcpwrap=yes ;;
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder no) have_tcpwrap=no ;;
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [have_tcpwrap=auto])
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederif test "x${have_tcpwrap}" != xno ; then
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder if test "x${LIBWRAP_LIBS}" = x ; then
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder if test "x$have_tcpwrap" = xyes ; then
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu AC_MSG_ERROR([*** TCP wrappers support not found.])
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu have_tcpwrap=no
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder have_tcpwrap=yes
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder LIBWRAP_LIBS=
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAC_SUBST(LIBWRAP_LIBS)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# ------------------------------------------------------------------------------
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAC_ARG_ENABLE([pam],
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder [case "${enableval}" in
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder yes) have_pam=yes ;;
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder no) have_pam=no ;;
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [have_pam=auto])
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederif test "x${have_pam}" != xno ; then
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder AC_CHECK_HEADERS(
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [have_pam=yes],
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [if test "x$have_pam" = xyes ; then
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder AC_MSG_ERROR([*** PAM headers not found.])
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder AC_CHECK_LIB(
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [pam_syslog],
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [have_pam=yes],
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [if test "x$have_pam" = xyes ; then
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder AC_MSG_ERROR([*** libpam not found.])
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder if test "x$have_pam" = xyes ; then
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder PAM_LIBS="-lpam -lpam_misc"
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder AC_DEFINE(HAVE_PAM, 1, [PAM available])
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAC_SUBST(PAM_LIBS)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina Sojakova# ------------------------------------------------------------------------------
48aa0645e25883048369afc02aac3f49b14a50daChristian MaederAC_ARG_ENABLE([acl],
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina Sojakova AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova [case "${enableval}" in
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova yes) have_acl=yes ;;
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova no) have_acl=no ;;
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder [have_acl=auto])
8a78868bae2ec6838c87366c35c57e109154c51eChristian Maederif test "x${have_acl}" != xno ; then
8a78868bae2ec6838c87366c35c57e109154c51eChristian Maeder AC_CHECK_HEADERS(
624e6701e0deb7ac6c03c0cba0190fbc5033cf93Ewaryst Schulz [have_acl=yes],
c2e192ace9ef7cfb0e59563f1b24477b2b65cff3Dominik Dietrich [if test "x$have_acl" = xyes ; then
7165a916d2fa1bf87c4741ec63b253413eebbf69Karl Luc AC_MSG_ERROR([*** ACL headers not found.])
01645eac73dbc789392674930adc5745c935f3a0Christian Maeder AC_CHECK_LIB(
01645eac73dbc789392674930adc5745c935f3a0Christian Maeder [acl_get_file],
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder [have_acl=yes],
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder [if test "x$have_acl" = xyes ; then
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder AC_MSG_ERROR([*** libacl not found.])
b5da047a9a875dec3f968b6c0df96af326f90fa9Alexis Tsogias if test "x$have_acl" = xyes ; then
0a03acf9fa28e6ff00f4d7c9c6acbae64cf09c56Ewaryst Schulz ACL_LIBS="-lacl"
0a03acf9fa28e6ff00f4d7c9c6acbae64cf09c56Ewaryst Schulz AC_DEFINE(HAVE_ACL, 1, [ACL available])
0a03acf9fa28e6ff00f4d7c9c6acbae64cf09c56Ewaryst SchulzAC_SUBST(ACL_LIBS)
4b4a0b61b72cf8478a5d4d5002bca9f699401363Christian MaederAM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
4b4a0b61b72cf8478a5d4d5002bca9f699401363Christian Maeder# ------------------------------------------------------------------------------
d62661e54e2662d53b583ae48609f5037701078dcmaederAC_ARG_ENABLE([xattr],
d62661e54e2662d53b583ae48609f5037701078dcmaeder AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]),
d62661e54e2662d53b583ae48609f5037701078dcmaeder [case "${enableval}" in
9f226cec9f978edaba67aee4c4e04e3d3b994b87Daniel Calegari yes) have_xattr=yes ;;
7bb0a9e92bc7a6f868eaa0b9c3212c0af4f96b7fEugen Kuksa no) have_xattr=no ;;
7bb0a9e92bc7a6f868eaa0b9c3212c0af4f96b7fEugen Kuksa *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;;
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [have_xattr=auto])
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederif test "x${have_xattr}" != xno ; then
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder AC_CHECK_HEADERS(
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [have_xattr=yes],
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder [if test "x$have_xattr" = xyes ; then
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder AC_MSG_ERROR([*** XATTR headers not found.])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder AC_CHECK_LIB(
60e6795dd310e10194e12bb660575aadf941328bEugen Kuksa [fsetxattr],
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder [have_xattr=yes],
360ce9b5c746ac021944db12eb26e3df2697b8c7Christian Maeder [if test "x$have_xattr" = xyes ; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_MSG_ERROR([*** libattr not found.])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner if test "x$have_xattr" = xyes ; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner XATTR_LIBS="-lattr"
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_DEFINE(HAVE_XATTR, 1, [XATTR available])
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner have_xattr=no
ddbf07996361d7e88cf23858a8f85595fa493514Jonathan von SchroederAC_SUBST(XATTR_LIBS)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
f5c9b1e739228c2a2edf055ac419583412569683Christian Maeder# ------------------------------------------------------------------------------
f5c9b1e739228c2a2edf055ac419583412569683Christian MaederAC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
f5c9b1e739228c2a2edf055ac419583412569683Christian Maeder [case "${enableval}" in
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner yes) have_smack=yes ;;
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner no) have_smack=no ;;
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder [have_smack=auto])
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerif test "x${have_xattr}" = xno; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner if test "x${have_smack}" = xyes; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_MSG_ERROR(SMACK requires xattr support)
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner have_smack=no
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner if test "x${have_smack}" = xauto; then
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner have_smack=yes
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerif test "x${have_smack}" = xyes ; then
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner# ------------------------------------------------------------------------------
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_ARG_ENABLE([gcrypt],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [case "${enableval}" in
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner yes) have_gcrypt=yes ;;
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner no) have_gcrypt=no ;;
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [have_gcrypt=auto])
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerif test "x${have_gcrypt}" != xno ; then
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AM_PATH_LIBGCRYPT(
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [have_gcrypt=yes],
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich [if test "x$have_gcrypt" = xyes ; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_MSG_ERROR([*** GCRYPT headers not found.])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner if test "x$have_gcrypt" = xyes ; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner GCRYPT_LIBS="$LIBGCRYPT_LIBS"
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner have_gcrypt=no
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner GCRYPT_LIBS=
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner GCRYPT_CFLAGS=
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST(GCRYPT_LIBS)
b905126bab9454b89041f92b3c50bb9efc85e427Klaus LuettichAC_SUBST(GCRYPT_CFLAGS)
756f31c6dd0843b4435c0ca66485ec19139eb1a8Eugen KuksaAM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_ENABLE([audit],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [case "${enableval}" in
0a5571c8adeddd27548445546491725beb224dddChristian Maeder yes) have_audit=yes ;;
0a5571c8adeddd27548445546491725beb224dddChristian Maeder no) have_audit=no ;;
0a5571c8adeddd27548445546491725beb224dddChristian Maeder *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [have_audit=auto])
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerif test "x${have_audit}" != xno ; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_CHECK_HEADERS(
f38b3687c5558128515e34fb85d8b466d22dc300Christian Maeder [have_audit=yes],
f38b3687c5558128515e34fb85d8b466d22dc300Christian Maeder [if test "x$have_audit" = xyes ; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_MSG_ERROR([*** AUDIT headers not found.])
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [audit_open],
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder [have_audit=yes],
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder [if test "x$have_audit" = xyes ; then
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AC_MSG_ERROR([*** libaudit not found.])
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner if test "x$have_audit" = xyes ; then
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder AUDIT_LIBS="-laudit"
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederAC_SUBST(AUDIT_LIBS)
1dfba1f850f6a43094962b459998d1ea11472461Christian Maeder# ------------------------------------------------------------------------------
1dfba1f850f6a43094962b459998d1ea11472461Christian Maederhave_libcryptsetup=no
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichif test "x$enable_libcryptsetup" != "xno"; then
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichhave_qrencode=no
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederAC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
ab4256496e72886018b78571057331f373da6883Eugen Kuksaif test "x$enable_qrencode" != "xno"; then
f8597aabc9db75dcf504e3151faf220a165c90d1Eugen Kuksa PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
ab4256496e72886018b78571057331f373da6883Eugen Kuksa [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_MSG_ERROR([*** qrencode support requested but libraries not found])
91432c9a2d813a8322dea3a3f54924c796897f09Eugen KuksaAM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
b09b9ccdfda2e80094a70dd29514ba42b2f6145eEugen Kuksa# ------------------------------------------------------------------------------
b09b9ccdfda2e80094a70dd29514ba42b2f6145eEugen Kuksahave_microhttpd=no
91432c9a2d813a8322dea3a3f54924c796897f09Eugen KuksaAC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerif test "x$enable_microhttpd" != "xno"; then
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.5],
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerhave_binfmt=no
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian MaederAC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerif test "x$enable_binfmt" != "xno"; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner have_binfmt=yes
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerhave_vconsole=no
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
62f5e02856861853dcc9ffb8c0a688835eb729aeJens Elknerif test "x$enable_vconsole" != "xno"; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner have_vconsole=yes
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
1365c420ef71be3d52796ebd369dc2defdedc822Christian Maeder# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerhave_readahead=no
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerif test "x$enable_readahead" != "xno"; then
62f5e02856861853dcc9ffb8c0a688835eb729aeJens Elkner have_readahead=yes
e420b3848a0e15a9e074b08c413996cbeb5ab06dChristian MaederAM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerhave_bootchart=no
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerif test "x$enable_bootchart" != "xno"; then
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner have_bootchart=yes
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# ------------------------------------------------------------------------------
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerhave_quotacheck=no
4c7cb5671b356d873d67829ec8062a5083c1ee0eEugen KuksaAC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederif test "x$enable_quotacheck" != "xno"; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner have_quotacheck=yes
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
e284004f10a315dbdb624c8b2522f65d485eaa48Martin Kühl# ------------------------------------------------------------------------------
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederhave_tmpfiles=no
50515239e7e190f4a34ca581dd685d002148fbddChristian MaederAC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
50515239e7e190f4a34ca581dd685d002148fbddChristian Maederif test "x$enable_tmpfiles" != "xno"; then
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder have_tmpfiles=yes
0b349288edfa50fdf38fda1a14e1562d03f92574Christian MaederAM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# ------------------------------------------------------------------------------
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhave_randomseed=no
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederif test "x$enable_randomseed" != "xno"; then
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder have_randomseed=yes
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till MossakowskiAM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini# ------------------------------------------------------------------------------
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian Maederhave_logind=no
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo TorriniAC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maederif test "x$enable_logind" != "xno"; then
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maeder have_logind=yes
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo TorriniAM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
23ab8855c58adfbd03a0730584b917b24c603901Christian MaederAS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder# ------------------------------------------------------------------------------
e50e41135ece589f7202bd4ef8d6b97531c2a56eKlaus Luettichhave_machined=no
47b0e9f3cb008cb7997f4e3bae26e4d62dcc887aChristian MaederAC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederif test "x$enable_machined" != "xno"; then
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder have_machined=yes
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerhave_hostnamed=no
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian MaederAC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian Maederif test "x$enable_hostnamed" != "xno"; then
e112e83352048f3db8c8f93ae104193e7338c10fChristian Maeder have_hostnamed=yes
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus LuettichAM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich# ------------------------------------------------------------------------------
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederhave_timedated=no
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederif test "x$enable_timedated" != "xno"; then
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder have_timedated=yes
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
f8597aabc9db75dcf504e3151faf220a165c90d1Eugen Kuksa# ------------------------------------------------------------------------------
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerhave_localed=no
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maederif test "x$enable_localed" != "xno"; then
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder have_localed=yes
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# ------------------------------------------------------------------------------
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhave_coredump=no
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederif test "x$enable_coredump" != "xno"; then
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder have_coredump=yes
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# ------------------------------------------------------------------------------
961087225d1d2b9534152a346d1a3755ed952fcdJens Elknerhave_polkit=no
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederif test "x$enable_polkit" != "xno"; then
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
1a6464613c59e35072b90ca296ae402cbe956144Christian Maeder have_polkit=yes
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederAM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder# ------------------------------------------------------------------------------
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederAC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maederif test "x$enable_efi" != "xno"; then
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner have_efi=yes
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH(rc-local-script-path-start,
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [RC_LOCAL_SCRIPT_PATH_START="$withval"],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_ARG_WITH(rc-local-script-path-stop,
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner# ------------------------------------------------------------------------------
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_ARG_WITH(kbd-loadkeys,
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AS_HELP_STRING([--with-kbd-loadkeys=PATH],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [Path to loadkeys]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [KBD_LOADKEYS="$withval"],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [KBD_LOADKEYS="/usr/bin/loadkeys"])
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_ARG_WITH(kbd-setfont,
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AS_HELP_STRING([--with-kbd-setfont=PATH],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [Path to setfont]),
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [KBD_SETFONT="$withval"],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [KBD_SETFONT="/usr/bin/setfont"])
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_SUBST(KBD_LOADKEYS)
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_SUBST(KBD_SETFONT)
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae BungiuAC_ARG_WITH(telinit,
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AS_HELP_STRING([--with-telinit=PATH],
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [Path to telinit]),
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu [TELINIT="$withval"],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST(TELINIT)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_CHECK_HEADERS_ONCE([valgrind/memcheck.h])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerhave_myhostname=no
961087225d1d2b9534152a346d1a3755ed952fcdJens ElknerAC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerif test "x$enable_myhostname" != "xno"; then
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AC_HEADER_STDC
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_TYPE_SIZE_T
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_HEADER_TIME
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_FUNC_MALLOC
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner AC_FUNC_SELECT_ARGTYPES
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner have_myhostname=yes
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH(firmware-path,
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [Firmware search path (default="")]),
961087225d1d2b9534152a346d1a3755ed952fcdJens Elkner [], [with_firmware_path=""])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerfor i in $with_firmware_path; do
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner if test "x${FIRMWARE_PATH}" = "x"; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner FIRMWARE_PATH="\\\"${i}/\\\""
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST(FIRMWARE_PATH)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_ENABLE([gudev],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [], [enable_gudev=yes])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0]) ])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerhave_manpages=no
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAS_IF([test "x$enable_manpages" != xno], [
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_MSG_ERROR([*** Manpages requested but xsltproc not found])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# ------------------------------------------------------------------------------
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# Location of the init scripts as mandated by LSB
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerSYSTEM_SYSVINIT_PATH=/etc/init.d
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerSYSTEM_SYSVRCND_PATH=/etc/rc.d
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([sysvinit-path],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [AS_HELP_STRING([--with-sysvinit-path=PATH],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [Specify the path to where the SysV init scripts are located])],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [SYSTEM_SYSVINIT_PATH="$withval"],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([sysvrcnd-path],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [AS_HELP_STRING([--with-sysvrcnd-path=PATH],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [Specify the path to the base directory for the SysV rcN.d directories])],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [SYSTEM_SYSVRCND_PATH="$withval"],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
ce39be56aeedc8d333b72b1662548d36097fa22fJens Elkner AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner SYSTEM_SYSV_COMPAT="yes"
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elknerelif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner SYSTEM_SYSV_COMPAT="no"
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST(SYSTEM_SYSVINIT_PATH)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST(SYSTEM_SYSVRCND_PATH)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST(M4_DEFINES)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([tty-gid],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [AS_HELP_STRING([--with-tty-gid=GID],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [Specify the numeric GID of the 'tty' group])],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([dbuspolicydir],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([dbussessionservicedir],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([dbussystemservicedir],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([dbusinterfacedir],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([bashcompletiondir],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner with_bashcompletiondir=${datadir}/bash-completion/completions
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([rootprefix],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [], [with_rootprefix=${ac_default_prefix}])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([rootlibdir],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [with_rootlibdir=${libdir}])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_WITH([pamlibdir],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [with_pamlibdir=${with_rootlibdir}/security])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_ENABLE([split-usr],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner enable_split_usr=yes
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner enable_split_usr=no
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAS_IF([test "x${enable_split_usr}" = "xyes"], [
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner# Work around intltoolize and gtk-doc problems in VPATH builds
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [Define to do gtk-doc tests])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAS_IF([test "x$0" != "x./configure"], [
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_ARG_ENABLE(tests,
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner [AC_HELP_STRING([--disable-tests], [disable tests])],
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner enable_tests=$enableval, enable_tests=yes)
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
d1f37f9074c9ccba31385b3cb4eb212ae443b310Jens ElknerAC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST([pamlibdir], [$with_pamlibdir])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST([rootprefix], [$with_rootprefix])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_SUBST([rootlibdir], [$with_rootlibdir])
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_CONFIG_FILES([
a84a8d508a0778b13a4d097a6dd34b95feae78acJens ElknerAC_MSG_RESULT([
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner $PACKAGE_NAME $VERSION
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner libcryptsetup: ${have_libcryptsetup}
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner tcpwrap: ${have_tcpwrap}
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner PAM: ${have_pam}
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner AUDIT: ${have_audit}
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner IMA: ${have_ima}
62f5e02856861853dcc9ffb8c0a688835eb729aeJens Elkner SELinux: ${have_selinux}
62f5e02856861853dcc9ffb8c0a688835eb729aeJens Elkner SMACK: ${have_smack}
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner XZ: ${have_xz}
62f5e02856861853dcc9ffb8c0a688835eb729aeJens Elkner ACL: ${have_acl}
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner XATTR: ${have_xattr}
a84a8d508a0778b13a4d097a6dd34b95feae78acJens Elkner GCRYPT: ${have_gcrypt}