configure.ac revision c3eae485bb639352122ac0fbf30490e887f3bc44
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer#
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# This file is part of systemd.
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer#
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# Copyright 2010-2012 Lennart Poettering
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# Copyright 2010-2012 Kay Sievers
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer#
0fe15dc8ddddeb39a5cad1f4f4afa25fa074a5d1Evgeny Vereshchagin# systemd is free software; you can redistribute it and/or modify it
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# under the terms of the GNU Lesser General Public License as published by
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# the Free Software Foundation; either version 2.1 of the License, or
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# (at your option) any later version.
3486cb6cfa3d32a95c0daf02c7510fdf372507bfMartin Pitt#
3486cb6cfa3d32a95c0daf02c7510fdf372507bfMartin Pitt# systemd is distributed in the hope that it will be useful, but
3486cb6cfa3d32a95c0daf02c7510fdf372507bfMartin Pitt# WITHOUT ANY WARRANTY; without even the implied warranty of
3486cb6cfa3d32a95c0daf02c7510fdf372507bfMartin Pitt# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3486cb6cfa3d32a95c0daf02c7510fdf372507bfMartin Pitt# Lesser General Public License for more details.
1c36b4a73b876258fbe01fbe9bc9b750b7dcc9ceEvgeny Vereshchagin#
c50a4525aa8151b180d5a325e88c5f3812e66c36Martin Pitt# You should have received a copy of the GNU Lesser General Public License
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# along with systemd; If not, see <http://www.gnu.org/licenses/>.
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_PREREQ([2.64])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_INIT([systemd],
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier [226],
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier [http://github.com/systemd/systemd/issues],
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier [systemd],
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier [http://www.freedesktop.org/wiki/Software/systemd])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_CONFIG_SRCDIR([src/core/main.c])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_CONFIG_MACRO_DIR([m4])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_CONFIG_HEADERS([config.h])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_CONFIG_AUX_DIR([build-aux])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_USE_SYSTEM_EXTENSIONS
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_SYS_LARGEFILE
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_PREFIX_DEFAULT([/usr])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAM_MAINTAINER_MODE([enable])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects parallel-tests])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAM_SILENT_RULES([yes])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_CANONICAL_HOST
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_PROG_CC_C99
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAX_COMPILER_VENDOR
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [
b6f0c419e38a960873fe68bf8f89bbb0268eed02Harald Hoyer AC_CHECK_TOOLS([AR], [gcc-ar ar], [:])
b6f0c419e38a960873fe68bf8f89bbb0268eed02Harald Hoyer AC_CHECK_TOOLS([NM], [gcc-nm nm], [:])
b6f0c419e38a960873fe68bf8f89bbb0268eed02Harald Hoyer AC_CHECK_TOOLS([RANLIB], [gcc-ranlib ranlib], [:])
b6f0c419e38a960873fe68bf8f89bbb0268eed02Harald Hoyer])
b6f0c419e38a960873fe68bf8f89bbb0268eed02Harald Hoyer
b6f0c419e38a960873fe68bf8f89bbb0268eed02Harald HoyerLT_PREREQ(2.2)
b6f0c419e38a960873fe68bf8f89bbb0268eed02Harald HoyerLT_INIT([disable-static])
b6f0c419e38a960873fe68bf8f89bbb0268eed02Harald Hoyer
61fea35e14d84144e6e2122f5cd247f9c7e6245eEvgeny VereshchaginAS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
61fea35e14d84144e6e2122f5cd247f9c7e6245eEvgeny VereshchaginAS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
61fea35e14d84144e6e2122f5cd247f9c7e6245eEvgeny VereshchaginSET_ARCH(X86_64, x86_64*)
61fea35e14d84144e6e2122f5cd247f9c7e6245eEvgeny VereshchaginSET_ARCH(IA32, i*86*)
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierSET_ARCH(MIPS, mips*)
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierSET_ARCH(AARCH64, aarch64*)
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier# i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAS_IF([test x"$intltool_found" != xyes],
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier [AS_IF([test x"$enable_nls" = xyes],
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier [AC_MSG_ERROR([--enable-nls requested but intltool not found])],
3486cb6cfa3d32a95c0daf02c7510fdf372507bfMartin Pitt [AS_IF([test x"$enable_nls" != xno],
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier [AC_MSG_WARN([*** Disabling NLS support because intltool was not found])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier enable_nls=no])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier ])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier ])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAM_NLS
dbf43a42b8bb66d53c7cbab05f104c28097f811eDaniel MackAS_IF([test x"$enable_nls" != xno -o "x$enable_polkit" != xno], [
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierIT_PROG_INTLTOOL([0.40.0])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier # If intltool is not available, provide a dummy rule to fail generation of %.policy files with a meaningful error message
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo " ITMRG " $@ && echo "*** intltool support required to build target $@" && false'
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier AC_SUBST(INTLTOOL_POLICY_RULE)
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier
dbf43a42b8bb66d53c7cbab05f104c28097f811eDaniel MackGETTEXT_PACKAGE=systemd
dbf43a42b8bb66d53c7cbab05f104c28097f811eDaniel MackAC_SUBST(GETTEXT_PACKAGE)
dbf43a42b8bb66d53c7cbab05f104c28097f811eDaniel MackAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [systemd])
dbf43a42b8bb66d53c7cbab05f104c28097f811eDaniel Mack
8a8332f77e61d41f3bb28b8f929ed41e0ffaf721Zbigniew Jędrzejewski-SzmekAC_PROG_MKDIR_P
8a8332f77e61d41f3bb28b8f929ed41e0ffaf721Zbigniew Jędrzejewski-SzmekAC_PROG_LN_S
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PROG_SED
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PROG_GREP
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PROG_AWK
8a8332f77e61d41f3bb28b8f929ed41e0ffaf721Zbigniew Jędrzejewski-Szmek
24be78d72b931b0175f08cee12fd23d631c024bfEvgeny VereshchaginAC_PATH_PROG([M4], [m4])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([XSLTPROC], [xsltproc])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierM4_DEFINES=
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_TOOL(OBJCOPY, objcopy)
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_TOOL(STRINGS, strings)
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_TOOL(GPERF, gperf)
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierif test -z "$GPERF" ; then
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin AC_MSG_ERROR([*** gperf not found])
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchaginfi
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin# ------------------------------------------------------------------------------
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchaginaddress_sanitizer_cflags=
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchaginaddress_sanitizer_cppflags=
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchaginaddress_sanitizer_ldflags=
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny VereshchaginAC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny VereshchaginAS_IF([test "x$enable_address_sanitizer" = "xyes"], [
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin AS_IF([test -z "$with_as_cflags"],
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin address_sanitizer_cppflags="-DVALGRIND=1"
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin address_sanitizer_ldflags="-Wc,-fsanitize=address"
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin ])
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchagin
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchaginundefined_sanitizer_cflags=
a2fbff31c9c319da51528f85ae97d019f1e61a86Evgeny Vereshchaginundefined_sanitizer_cppflags=
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny Vereshchaginundefined_sanitizer_ldflags=
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny VereshchaginAC_ARG_ENABLE(undefined-sanitizer, AS_HELP_STRING([--enable-undefined-sanitizer], [enable -fsanitize=undefined]))
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny VereshchaginAS_IF([test "x$enable_undefined_sanitizer" = "xyes"], [
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny Vereshchagin CC_CHECK_FLAG_APPEND([with_us_cflags], [CFLAGS], [-fsanitize=undefined])
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny Vereshchagin AS_IF([test -z "$with_us_cflags"],
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny Vereshchagin [AC_MSG_ERROR([*** -fsanitize=undefined is not supported])])
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny Vereshchagin undefined_sanitizer_cflags="$with_us_cflags -fno-omit-frame-pointer -DVALGRIND=1"
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny Vereshchagin undefined_sanitizer_cppflags="-DVALGRIND=1"
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny Vereshchagin undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined"
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny Vereshchagin ])
cb2f9d3f296bc80b55f09880d61dfdf47fc98212Evgeny Vereshchagin
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevaliersanitizer_cflags="$address_sanitizer_cflags $undefined_sanitizer_cflags"
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevaliersanitizer_cppflags="$address_sanitizer_cppflags $undefined_sanitizer_cppflags"
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevaliersanitizer_ldflags="$address_sanitizer_ldflags $undefined_sanitizer_ldflags"
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -pipe \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wall \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wextra \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wundef \
8a8332f77e61d41f3bb28b8f929ed41e0ffaf721Zbigniew Jędrzejewski-Szmek "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wlogical-op \
2375607039517c88df51ef16ddbb624ec1c10654Kay Sievers -Wmissing-include-dirs \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wold-style-definition \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wpointer-arith \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Winit-self \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wdeclaration-after-statement \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wfloat-equal \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wsuggest-attribute=noreturn \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Werror=missing-prototypes \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Werror=implicit-function-declaration \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Werror=missing-declarations \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Werror=return-type \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wstrict-prototypes \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wredundant-decls \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wmissing-noreturn \
739d81ddd005fae2bb82edce5b8a6173c7c48b34Zbigniew Jędrzejewski-Szmek -Wshadow \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wendif-labels \
1b1eae69ce52ef6c89a1200e8d3758549b291991Daniel Mack -Wstrict-aliasing=2 \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wwrite-strings \
739d81ddd005fae2bb82edce5b8a6173c7c48b34Zbigniew Jędrzejewski-Szmek -Wno-unused-parameter \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wno-missing-field-initializers \
edbced8a151c1b7ded685e2ec644950d2adec5f5Harald Hoyer -Wno-unused-result \
1b1eae69ce52ef6c89a1200e8d3758549b291991Daniel Mack -Wno-format-signedness \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Werror=overflow \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wdate-time \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wnested-externs \
739d81ddd005fae2bb82edce5b8a6173c7c48b34Zbigniew Jędrzejewski-Szmek -ffast-math \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -fno-common \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -fdiagnostics-show-option \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -fno-strict-aliasing \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -fvisibility=hidden \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -fstack-protector \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -fstack-protector-strong \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -fPIE \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier --param=ssp-buffer-size=4])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierCC_CHECK_FLAG_APPEND([with_cflags], [CFLAGS], [-Werror=shadow], [
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <time.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <inttypes.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevaliertypedef uint64_t usec_t;
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierusec_t now(clockid_t clock);
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierint main(void) {
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier struct timespec now;
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier return 0;
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier}
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAS_CASE([$CC], [*clang*],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wno-typedef-redefinition \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wno-gnu-variable-sized-type-not-at-end \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier ])])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny Vereshchagin -flto])],
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny Vereshchagin [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny VereshchaginAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny Vereshchagin
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny VereshchaginAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny Vereshchagin [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny Vereshchagin -Wp,-D_FORTIFY_SOURCE=2])],
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny Vereshchagin [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny VereshchaginAC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny Vereshchagin
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny VereshchaginAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wl,--gc-sections])],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [AC_MSG_RESULT([skipping --gc-sections, optimization not enabled])])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_SUBST([OUR_CFLAGS], "$with_ldflags $sanitizer_cflags")
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -ffunction-sections -fdata-sections])],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [AC_MSG_RESULT([skipping -ffunction/data-section, optimization not enabled])])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierCC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wl,--as-needed \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wl,--no-undefined \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wl,-z,relro \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wl,-z,now \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -pie \
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier -Wl,-fuse-ld=gold])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_SIZEOF(pid_t)
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_SIZEOF(uid_t)
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_SIZEOF(gid_t)
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_SIZEOF(time_t)
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_SIZEOF(dev_t)
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_SIZEOF(rlim_t,,[
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier #include <sys/time.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier #include <sys/resource.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# we use python to build the man page index
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierhave_python=no
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_ARG_WITH([python],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
bf3a947cb44f31359bba313e0252cbcc0dc95b03Evgeny Vereshchagin
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierhave_lxml=no
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAS_IF([test "x$with_python" != "xno"], [
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AM_PATH_PYTHON(,, [:])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AS_IF([test "x$PYTHON" != "x:"], [
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AC_MSG_CHECKING([for python lxml module])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AC_MSG_RESULT([$have_lxml])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [AC_MSG_WARN([*** python support requires python-lxml module installed])])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier ])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAS_IF([test "$have_python" != "yes"], [
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AS_IF([test "$with_python" = "yes"],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [AC_MSG_ERROR([*** python support requested but python support not found])])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AS_IF([test "$with_python" != "no"],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [AC_MSG_WARN([*** python support not found, some documentation cannot be built])])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
4be4833ece2856e0cacc09f8f8b2c02b320751faMartin Pitt
7d023341c765c205068e33d23d63a4000ec211dfMartin PittAC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
7d023341c765c205068e33d23d63a4000ec211dfMartin PittAC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_HEADERS([linux/btrfs.h], [], [])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_HEADERS([linux/memfd.h], [], [])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# unconditionally pull-in librt with old glibc versions
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_SEARCH_LIBS([clock_gettime], [rt], [], [])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevaliersave_LIBS="$LIBS"
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierLIBS=
cffae62bcb6912fbaf1b7b282d9d170c9d308897Martin PittAC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
99877b7e3782a51b31bf191825f0335500f52fe5Harald HoyerCAP_LIBS="$LIBS"
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_SUBST(CAP_LIBS)
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_CHECK_FUNCS([memfd_create])
3486cb6cfa3d32a95c0daf02c7510fdf372507bfMartin PittAC_CHECK_FUNCS([__secure_getenv secure_getenv])
3486cb6cfa3d32a95c0daf02c7510fdf372507bfMartin PittAC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, kcmp, LO_FLAGS_PARTSCAN],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [], [], [[
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <sys/types.h>
e63b61be5350dbe92ea12e1eeb96dde251ed9292Evgeny Vereshchagin#include <unistd.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <sys/mount.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <fcntl.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <sched.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <linux/loop.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <linux/random.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier]])
0fe15dc8ddddeb39a5cad1f4f4afa25fa074a5d1Evgeny Vereshchagin
0fe15dc8ddddeb39a5cad1f4f4afa25fa074a5d1Evgeny VereshchaginAC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier IFLA_MACVLAN_FLAGS,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier IFLA_IPVLAN_MODE,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier IFLA_VTI_REMOTE,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier IFLA_PHYS_PORT_ID,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier IFLA_BOND_AD_INFO,
0fe15dc8ddddeb39a5cad1f4f4afa25fa074a5d1Evgeny Vereshchagin IFLA_VLAN_PROTOCOL,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier IFLA_VXLAN_REMCSUM_NOPARTIAL,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier IFLA_IPTUN_ENCAP_DPORT,
417491f122b346a31cf8dc406c4f9195a5900cecEvgeny Vereshchagin IFLA_GRE_ENCAP_DPORT,
417491f122b346a31cf8dc406c4f9195a5900cecEvgeny Vereshchagin IFLA_BRIDGE_VLAN_INFO,
417491f122b346a31cf8dc406c4f9195a5900cecEvgeny Vereshchagin IFLA_BRPORT_LEARNING_SYNC,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier IFLA_BR_PRIORITY,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier NDA_IFINDEX,
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier IFA_FLAGS],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier[], [], [[
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <inttypes.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <netinet/in.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <netinet/ether.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <linux/rtnetlink.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <net/if.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <linux/ip.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <linux/if_tunnel.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <linux/if_link.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <linux/if_bridge.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier#include <linux/if_addr.h>
25b47f96d9601ff566257b2a31bfb5f4bd25d661Marko Myllynen#include <linux/neighbour.h>
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier]])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# This makes sure pkg.m4 is available.
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierm4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierhave_dbus=no
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests]))
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAS_IF([test "x$enable_dbus" != "xno"], [
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [have_dbus=no])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
53d90f9582f96208b3674da823ad1a3d2c3b1aa4Martin PittAM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
5c404f1ab8e96efedb983806443ca982a1b2a372Evgeny Vereshchagin
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierhave_utmp=yes
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AS_CASE("x${enableval}",
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [xyes], [have_utmp=yes],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [xno], [have_utmp=no],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierhave_compat_libs=no
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [case "${enableval}" in
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier yes) have_compat_libs=yes ;;
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier no) have_compat_libs=no ;;
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libs) ;;
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer esac],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [have_compat_libs=no])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_coverage=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_coverage" = "xyes" ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer if test "x$lcov_found" = xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** lcov support requested but the program was not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer else
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer else
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_coverage=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer -fprofile-arcs \
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer -ftest-coverage])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_kmod=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_kmod" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_kmod" = "xyes"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** kmod version >= 15 not found]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** kmod support requested, but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_xkbcommon=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(xkbcommon, AS_HELP_STRING([--disable-xkbcommon], [disable xkbcommon keymap support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_xkbcommon" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(XKBCOMMON, [ xkbcommon >= 0.3.0 ],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_XKBCOMMON, 1, [Define if libxkbcommon is available]) have_xkbcommon=yes], have_xkbcommon=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_xkbcommon" = xno -a "x$enable_xkbcommon" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** xkbcommon support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierfi
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierhave_blkid=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_blkid" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(BLKID, [ blkid >= 2.24 ],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** blkid support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_libmount=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerPKG_CHECK_MODULES(MOUNT, [ mount >= 2.27 ],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available]) have_libmount=yes], have_libmount=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$have_libmount" = xno; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** libmount support required but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_LIBMOUNT, [test "$have_libmount" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_seccomp=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_seccomp" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_seccomp=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_seccomp=no])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** seccomp support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_ima=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [case "${enableval}" in
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer yes) have_ima=yes ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer no) have_ima=no ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer esac],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_ima=yes])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_ima}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_selinux=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_selinux" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_selinux=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_selinux=no])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** SELinux support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_apparmor=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(apparmor, AS_HELP_STRING([--disable-apparmor], [Disable optional AppArmor support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_apparmor" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer PKG_CHECK_MODULES([APPARMOR], [libapparmor],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_APPARMOR, 1, [Define if AppArmor is available])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_apparmor=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_APPARMOR"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_apparmor=no])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_apparmor" = xno -a "x$enable_apparmor" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** AppArmor support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_WITH(debug-shell,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--with-debug-shell=PATH],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [Path to debug shell binary]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [SUSHELL="$withval"],[
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(SUSHELL)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_WITH([debug-tty],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--with-debug-tty=PATH],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [Specify the tty device for debug shell]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [DEBUGTTY="$withval"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [DEBUGTTY=/dev/tty9])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(DEBUGTTY)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_WITH([certificate-root],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--with-certificate-root=PATH],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [Specify the prefix for TLS certificates [/etc/ssl]]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [CERTIFICATEROOT="$withval"],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [CERTIFICATEROOT="/etc/ssl"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(CERTIFICATEROOT)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_xz=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_xz" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(XZ, [ liblzma ],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** XZ support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_zlib=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib], [Disable optional ZLIB support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_zlib" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(ZLIB, [ zlib ],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available]) have_zlib=yes], have_zlib=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_zlib" = xno -a "x$enable_zlib" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** ZLIB support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_ZLIB, [test "$have_zlib" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_bzip2=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(bzip2, AS_HELP_STRING([--enable-bzip2], [Disable optional BZIP2 support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAS_IF([test "x$enable_bzip2" != "xno"], [
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_HEADERS(bzlib.h,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_BZIP2, 1, [Define in BZIP2 is available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_bzip2=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AS_IF([test "x$have_bzip2" = xyes], [AC_MSG_ERROR([*** BZIP2 support requested but headers not found])])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer ])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_lz4=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(lz4, AS_HELP_STRING([--enable-lz4], [Enable optional LZ4 support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAS_IF([test "x$enable_lz4" = "xyes"], [
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_HEADERS(lz4.h,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) have_lz4=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_MSG_ERROR([*** LZ4 support requested but headers not found])])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_LZ4, [test "$have_lz4" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_COMPRESSION, [test "$have_xz" = "yes" -o "$have_lz4" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE([pam],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [case "${enableval}" in
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer yes) have_pam=yes ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer no) have_pam=no ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer esac],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_pam=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_pam}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_HEADERS(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_pam=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_pam" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** PAM headers not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_LIB(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [pam],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [pam_syslog],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_pam=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_pam" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** libpam not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_pam" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PAM_LIBS="-lpam -lpam_misc"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_PAM, 1, [PAM available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_PAM"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer else
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_pam=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerelse
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PAM_LIBS=
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(PAM_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE([acl],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [case "${enableval}" in
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer yes) have_acl=yes ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer no) have_acl=no ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer esac],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_acl=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_acl}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_HEADERS(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [sys/acl.h acl/libacl.h],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_acl=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_acl" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** ACL headers not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_LIB(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [acl],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [acl_get_file],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_acl=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_acl" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** libacl not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_acl" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer ACL_LIBS="-lacl"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_ACL, 1, [ACL available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_ACL"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer else
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_acl=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerelse
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer ACL_LIBS=
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(ACL_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [case "${enableval}" in
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer yes) have_smack=yes ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer no) have_smack=no ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer esac],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_smack=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_smack}" = xauto; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_SMACK"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_smack=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_smack_run_label=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_WITH(smack-run-label,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAS_HELP_STRING([--with-smack-run-label=STRING],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [run systemd --system itself with a specific SMACK label]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run systemd itself with SMACK label]) have_smack_run_label=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_smack_run_label}" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_SMACK_RUN_LABEL"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_WITH(smack-default-process-label,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAS_HELP_STRING([--with-smack-default-process-label=STRING],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [default SMACK label for executed processes]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE_UNQUOTED(SMACK_DEFAULT_PROCESS_LABEL, ["$withval"], [Default SMACK label for executed processes])],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_smack}" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE([gcrypt],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [case "${enableval}" in
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer yes) have_gcrypt=yes ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer no) have_gcrypt=no ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer esac],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_gcrypt=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_gcrypt}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer m4_define([AM_PATH_LIBGCRYPT_FAIL],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [{ test "x$have_gcrypt" != xyes || AC_MSG_ERROR([*** GCRYPT headers not found.]); }]
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer )
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer m4_ifdef([AM_PATH_LIBGCRYPT], [AM_PATH_LIBGCRYPT(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [1.4.5],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_gcrypt=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer dnl If we have the gcrypt m4 macros, but don't have
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer dnl gcrypt, throw an error if gcrypt is explicitly
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer dnl requested.
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AM_PATH_LIBGCRYPT_FAIL]
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer )],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer dnl If we don't have the gcrypt m4 macros, but build with
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer dnl gcrypt explicitly requested, throw an error.
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AM_PATH_LIBGCRYPT_FAIL]
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer )
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_gcrypt" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer GCRYPT_LIBS="$LIBGCRYPT_LIBS"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer else
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_gcrypt=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerelse
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer GCRYPT_LIBS=
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer GCRYPT_CFLAGS=
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(GCRYPT_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(GCRYPT_CFLAGS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE([audit],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [case "${enableval}" in
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer yes) have_audit=yes ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer no) have_audit=no ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer esac],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_audit=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_audit}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_HEADERS(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [libaudit.h],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_audit=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_audit" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** AUDIT headers not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_LIB(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [audit],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [audit_open],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_audit=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_audit" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** libaudit not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_audit" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AUDIT_LIBS="-laudit"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer else
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_audit=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerelse
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AUDIT_LIBS=
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(AUDIT_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_AUDIT], [test "x$have_audit" != xno])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE([elfutils],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--disable-elfutils],[Disable optional ELFUTILS support]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [case "${enableval}" in
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer yes) have_elfutils=yes ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer no) have_elfutils=no ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer *) AC_MSG_ERROR(bad value ${enableval} for --disable-elfutils) ;;
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer esac],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_elfutils=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_elfutils}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_HEADERS(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [elfutils/libdwfl.h],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_elfutils" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** ELFUTILS headers not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_LIB(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [dw],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [dwfl_begin],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_elfutils" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** ELFUTILS libs not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_LIB(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [dw],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [dwfl_core_file_attach],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_elfutils=yes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_elfutils" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** ELFUTILS >= 158 is required.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_elfutils" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer ELFUTILS_LIBS="-lelf -ldw"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer else
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_elfutils=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerelse
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer ELFUTILS_LIBS=
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(ELFUTILS_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_ELFUTILS, [test "$have_elfutils" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_libcryptsetup=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_libcryptsetup" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_qrencode=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_qrencode" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** qrencode support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_microhttpd=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_microhttpd" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_gnutls=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_gnutls" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.1.4],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_GNUTLS, 1, [Define if gnutls is available]) have_gnutls=yes], have_gnutls=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_gnutls" = xno -a "x$enable_gnutls" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** gnutls support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_libcurl=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_libcurl" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(LIBCURL, [libcurl],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** libcurl support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_libidn=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_libidn" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(LIBIDN, [libidn],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_libidn=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_libidn=no])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** libidn support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_libiptc=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(libiptc, AS_HELP_STRING([--disable-libiptc], [Disable optional LIBIPTC support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_libiptc" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer PKG_CHECK_MODULES(LIBIPTC, [libiptc],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_DEFINE(HAVE_LIBIPTC, 1, [Define if libiptc is available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_libiptc=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_LIBIPTC"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_libiptc=no])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer if test "x$have_libiptc" = "xno" -a "x$enable_libiptc" = "xyes"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** libiptc support requested but libraries not found])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer fi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_LIBIPTC, [test "$have_libiptc" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_binfmt=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_binfmt" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_binfmt=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_vconsole=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_vconsole" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_vconsole=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_bootchart=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_bootchart" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_bootchart=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_quotacheck=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_quotacheck" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_quotacheck=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_tmpfiles=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_tmpfiles" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_tmpfiles=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_sysusers=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_sysusers" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_sysusers=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_firstboot=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(firstboot, AS_HELP_STRING([--disable-firstboot], [disable firstboot support]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_firstboot" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_firstboot=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_FIRSTBOOT, [test "$have_firstboot" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_randomseed=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_randomseed" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_randomseed=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_backlight=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_backlight" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_backlight=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_rfkill=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_rfkill" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_rfkill=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_logind=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_logind" != "xno"; then
c53158818d8cdaf46b3f1b5299b9bda118a1043fThomas Hindoe Paaboel Andersen have_logind=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_machined=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_machined" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_machined=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_importd=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(importd, AS_HELP_STRING([--disable-importd], [disable import daemon]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_importd" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_importd=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_IMPORTD, [test "$have_importd" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAS_IF([test "$have_importd" = "yes"], [ AC_DEFINE(HAVE_IMPORTD, [1], [Importd support available]) ])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_hostnamed=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_hostnamed" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_hostnamed=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_timedated=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_timedated" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_timedated=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_timesyncd=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_timesyncd" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_timesyncd=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD"
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_WITH(ntp-servers,
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer AS_HELP_STRING([--with-ntp-servers=NTPSERVERS],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [Space-separated list of default NTP servers]),
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [NTP_SERVERS="$withval"],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [NTP_SERVERS="time1.google.com time2.google.com time3.google.com time4.google.com"
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer AC_MSG_WARN([*** Using Google NTP servers.
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer Do not ship OSes or devices with these default settings.
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer See DISTRO_PORTING for details!])])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_SUBST(NTP_SERVERS)
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_WITH(time-epoch,
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer AS_HELP_STRING([--with-time-epoch=SECONDS],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [Time epoch for time clients]),
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [TIME_EPOCH="$withval"],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_WITH(system-uid-max,
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer AS_HELP_STRING([--with-system-uid-max=UID]
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [Maximum UID for system users]),
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [SYSTEM_UID_MAX="$withval"],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [SYSTEM_UID_MAX="`awk 'BEGIN { uid=999 } /^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }' /etc/login.defs 2>/dev/null || echo 999`"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_DEFINE_UNQUOTED(SYSTEM_UID_MAX, [$SYSTEM_UID_MAX], [Maximum System UID])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_SUBST(SYSTEM_UID_MAX)
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_WITH(system-gid-max,
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer AS_HELP_STRING([--with-system-gid-max=GID]
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [Maximum GID for system groups]),
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [SYSTEM_GID_MAX="$withval"],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [SYSTEM_GID_MAX="`awk 'BEGIN { gid=999 } /^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }' /etc/login.defs 2>/dev/null || echo 999`"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_SUBST(SYSTEM_GID_MAX)
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_localed=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_localed" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_localed=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_coredump=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_coredump" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_coredump=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_polkit=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_polkit" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_polkit=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_resolved=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerif test "x$enable_resolved" != "xno"; then
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_resolved=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerfi
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_WITH(dns-servers,
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [Space-separated list of default DNS servers]),
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [DNS_SERVERS="$withval"],
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_SUBST(DNS_SERVERS)
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_networkd=no
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAS_IF([test "x$enable_networkd" != "xno"], [
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer have_networkd=yes
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD"
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyerhave_efi=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_efi" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_efi=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_CHECK_TOOL(EFI_CC, gcc)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerEFI_ARCH=`echo $host | sed "s/\(-\).*$//"`
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_COND_IF(ARCH_IA32, [
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer EFI_ARCH=ia32
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer EFI_MACHINE_TYPE_NAME=ia32])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_COND_IF(ARCH_X86_64, [
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer EFI_MACHINE_TYPE_NAME=x64])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_COND_IF(ARCH_AARCH64, [
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer EFI_MACHINE_TYPE_NAME=aa64])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST([EFI_ARCH])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST([EFI_MACHINE_TYPE_NAME])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_gnuefi=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(gnuefi, AS_HELP_STRING([--enable-gnuefi], [Disable optional gnuefi support]))
1ecf6a2b4960229ad1d06c591b4776ddf065e834Harald HoyerAS_IF([test "x$enable_gnuefi" != "xno"], [
2c393ed7611a586ef5665aa62453ec57c0f5fef6Evgeny Vereshchagin AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
1ecf6a2b4960229ad1d06c591b4776ddf065e834Harald Hoyer [AC_DEFINE(HAVE_GNUEFI, 1, [Define if gnuefi is available])
1ecf6a2b4960229ad1d06c591b4776ddf065e834Harald Hoyer have_gnuefi=yes],
1ecf6a2b4960229ad1d06c591b4776ddf065e834Harald Hoyer [AS_IF([test "x$enable_gnuefi" = xyes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_MSG_ERROR([*** gnuefi support requested but headers not found])])
33a5e20ffaa2cbb2853f14265566bac66a7f9026Harald Hoyer ])
33a5e20ffaa2cbb2853f14265566bac66a7f9026Harald Hoyer
33a5e20ffaa2cbb2853f14265566bac66a7f9026Harald Hoyer efiroot=$(echo $(cd /usr/lib/$(${EFI_CC} -print-multi-os-directory); pwd))
33a5e20ffaa2cbb2853f14265566bac66a7f9026Harald Hoyer
33a5e20ffaa2cbb2853f14265566bac66a7f9026Harald Hoyer EFI_LIB_DIR="$efiroot"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_ARG_WITH(efi-libdir,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--with-efi-libdir=PATH], [Path to EFI lib directory]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [EFI_LIB_DIR="$withval"], [EFI_LIB_DIR="$efiroot"]
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer )
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_SUBST([EFI_LIB_DIR])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_efi_lds=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_ARG_WITH(efi-ldsdir,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [EFI_LDS_DIR="$withval" && AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [have_efi_lds=yes])],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AS_FOR([DIR], [EFI_LDS_DIR], ["${EFI_LIB_DIR}/gnuefi" "${EFI_LIB_DIR}"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_efi_lds=yes && break])])])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_IF([test "x$have_efi_lds" = xyes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_SUBST([EFI_LDS_DIR])],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AS_IF([test "x$enable_gnuefi" = xyes],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [AC_MSG_ERROR([*** gnuefi support requested but files not found])],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [have_gnuefi=no])])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_ARG_WITH(efi-includedir,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--with-efi-includedir=PATH], [Path to EFI include directory]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer )
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_SUBST([EFI_INC_DIR])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerhave_kdbus=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_ENABLE(kdbus, AS_HELP_STRING([--disable-kdbus], [do not connect to kdbus by default]))
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x$enable_kdbus" != "xno"; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus is to be connected to by default])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_kdbus=yes
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerfi
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_WITH(rc-local-script-path-start,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [Path to /etc/rc.local]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [RC_LOCAL_SCRIPT_PATH_START="$withval"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_WITH(rc-local-script-path-stop,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [Path to /usr/sbin/halt.local]),
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
AC_ARG_WITH(kbd-loadkeys,
AS_HELP_STRING([--with-kbd-loadkeys=PATH],
[Path to loadkeys]),
[KBD_LOADKEYS="$withval"],
[KBD_LOADKEYS="/usr/bin/loadkeys"])
AC_ARG_WITH(kbd-setfont,
AS_HELP_STRING([--with-kbd-setfont=PATH],
[Path to setfont]),
[KBD_SETFONT="$withval"],
[KBD_SETFONT="/usr/bin/setfont"])
AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
AC_SUBST(KBD_LOADKEYS)
AC_SUBST(KBD_SETFONT)
AC_ARG_WITH(telinit,
AS_HELP_STRING([--with-telinit=PATH],
[Path to telinit]),
[TELINIT="$withval"],
[TELINIT="/lib/sysvinit/telinit"])
AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
AC_SUBST(TELINIT)
AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])
# ------------------------------------------------------------------------------
have_myhostname=no
AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
if test "x$enable_myhostname" != "xno"; then
AC_HEADER_STDC
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 sys/auxv.h])
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
have_myhostname=yes
fi
AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
enable_hwdb=$enableval, enable_hwdb=yes)
AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE(hibernate,
[AC_HELP_STRING([--disable-hibernate], [disable hibernation support])],
enable_hibernate=$enableval, enable_hibernate=yes)
AM_CONDITIONAL(ENABLE_HIBERNATE, [test x$enable_hibernate = xyes])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE(ldconfig,
[AC_HELP_STRING([--disable-ldconfig], [disable ldconfig])],
enable_ldconfig=$enableval, enable_ldconfig=yes)
AM_CONDITIONAL(ENABLE_LDCONFIG, [test x$enable_ldconfig = xyes])
# ------------------------------------------------------------------------------
# Location of the init scripts as mandated by LSB
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
AC_ARG_WITH([sysvinit-path],
[AS_HELP_STRING([--with-sysvinit-path=PATH],
[Specify the path to where the SysV init scripts are located])],
[SYSTEM_SYSVINIT_PATH="$withval"],
[])
AC_ARG_WITH([sysvrcnd-path],
[AS_HELP_STRING([--with-sysvrcnd-path=PATH],
[Specify the path to the base directory for the SysV rcN.d directories])],
[SYSTEM_SYSVRCND_PATH="$withval"],
[])
if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
SYSTEM_SYSV_COMPAT="yes"
M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
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.])
else
SYSTEM_SYSV_COMPAT="no"
fi
AC_SUBST(SYSTEM_SYSVINIT_PATH)
AC_SUBST(SYSTEM_SYSVRCND_PATH)
AC_SUBST(M4_DEFINES)
AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
AC_ARG_WITH([tty-gid],
[AS_HELP_STRING([--with-tty-gid=GID],
[Specify the numeric GID of the 'tty' group])],
[TTY_GID="$withval"],
[TTY_GID="5"])
AC_DEFINE_UNQUOTED(TTY_GID, [$TTY_GID], [GID of the 'tty' group])
AC_SUBST(TTY_GID)
AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
AX_NORMALIZE_PATH([with_dbuspolicydir])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
[with_dbussessionservicedir=${datadir}/dbus-1/services])
AX_NORMALIZE_PATH([with_dbussessionservicedir])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
AX_NORMALIZE_PATH([with_dbussystemservicedir])
AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
[],
[AS_IF([$($PKG_CONFIG --exists bash-completion)], [
with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
] , [
with_bashcompletiondir=${datadir}/bash-completion/completions
])])
AM_CONDITIONAL(ENABLE_BASH_COMPLETION, [test "$with_bashcompletiondir" != "no"])
AX_NORMALIZE_PATH([with_bashcompletiondir])
AC_ARG_WITH([zshcompletiondir],
AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
AM_CONDITIONAL(ENABLE_ZSH_COMPLETION, [test "$with_zshcompletiondir" != "no"])
AX_NORMALIZE_PATH([with_zshcompletiondir])
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[], [with_rootprefix=${ac_default_prefix}])
# --with-rootprefix= (empty) should default to "/" but AX_NORMALIZE_PATH
# defaults those to ".", solve that here for now until we can find a suitable
# fix for AX_NORMALIZE_PATH upstream at autoconf-archive.
# See: https://github.com/systemd/systemd/issues/54
if test "x${with_rootprefix}" = "x"; then
with_rootprefix="/"
fi
AX_NORMALIZE_PATH([with_rootprefix])
AC_ARG_WITH([rootlibdir],
AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
[],
[with_rootlibdir=${libdir}])
AX_NORMALIZE_PATH([with_rootlibdir])
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
[with_pamlibdir=${with_rootlibdir}/security])
AX_NORMALIZE_PATH([with_pamlibdir])
AC_ARG_WITH([pamconfdir],
AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
[],
[with_pamconfdir=${sysconfdir}/pam.d])
AX_NORMALIZE_PATH([with_pamconfdir])
AC_ARG_ENABLE([split-usr],
AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
[],
[AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
enable_split_usr=yes
], [
enable_split_usr=no
])])
AC_ARG_WITH([dkr-index-url],
[AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])],
[DEFAULT_DKR_INDEX_URL="\"$withval\""],
[DEFAULT_DKR_INDEX_URL="NULL"])
AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads])
AC_SUBST(DEFAULT_DKR_INDEX_URL)
AS_IF([test "x${enable_split_usr}" = "xyes"], [
AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
])
AM_CONDITIONAL(ENABLE_SPLIT_USR, [test "x${enable_split_usr}" = "xyes"])
# work around intltool-update issues during 'make distcheck'
AS_IF([test "x$0" != "x./configure"], [
AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
])
# QEMU and OVMF UEFI firmware
AS_IF([test x"$cross_compiling" = "xyes"], [], [
AC_PATH_PROG([QEMU], [qemu-system-x86_64])
AC_CHECK_FILE([/usr/share/qemu/bios-ovmf.bin], [QEMU_BIOS=/usr/share/qemu/bios-ovmf.bin],
[AC_CHECK_FILE([/usr/share/qemu-ovmf/bios.bin], [QEMU_BIOS=/usr/share/qemu-ovmf/bios.bin])])
AC_SUBST([QEMU_BIOS])
])
AC_ARG_ENABLE(tests,
[AC_HELP_STRING([--disable-tests], [disable tests])],
enable_tests=$enableval, enable_tests=yes)
AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug@<:@=LIST@:>@], [enable extra debugging (hashmap,mmap-cache)])],
[if test "x$enableval" = "xyes"; then
enableval="hashmap,mmap-cache"
fi
saved_ifs="$IFS"
IFS="$IFS$PATH_SEPARATOR,"
for name in $enableval; do
case $name in
hashmap)
enable_debug_hashmap=yes
;;
mmap-cache)
enable_debug_mmap_cache=yes
;;
esac
done
IFS="$saved_ifs"],[])
enable_debug=""
AS_IF([test x$enable_debug_hashmap = xyes], [
AC_DEFINE(ENABLE_DEBUG_HASHMAP, 1, [Define if hashmap debugging is to be enabled])
enable_debug="hashmap $enable_debug"
])
AS_IF([test x$enable_debug_mmap_cache = xyes], [
AC_DEFINE(ENABLE_DEBUG_MMAP_CACHE, 1, [Define if mmap cache debugging is to be enabled])
enable_debug="mmap-cache $enable_debug"
])
test -z "$enable_debug" && enable_debug="none"
AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
AC_SUBST([pamlibdir], [$with_pamlibdir])
AC_SUBST([pamconfdir], [$with_pamconfdir])
AC_SUBST([rootprefix], [$with_rootprefix])
AC_SUBST([rootlibdir], [$with_rootlibdir])
AC_CONFIG_FILES([
Makefile
po/Makefile.in
])
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE_NAME $VERSION
libcryptsetup: ${have_libcryptsetup}
PAM: ${have_pam}
AUDIT: ${have_audit}
IMA: ${have_ima}
AppArmor: ${have_apparmor}
SELinux: ${have_selinux}
SECCOMP: ${have_seccomp}
SMACK: ${have_smack}
ZLIB: ${have_zlib}
XZ: ${have_xz}
LZ4: ${have_lz4}
BZIP2: ${have_bzip2}
ACL: ${have_acl}
GCRYPT: ${have_gcrypt}
QRENCODE: ${have_qrencode}
MICROHTTPD: ${have_microhttpd}
GNUTLS: ${have_gnutls}
libcurl: ${have_libcurl}
libidn: ${have_libidn}
libiptc: ${have_libiptc}
ELFUTILS: ${have_elfutils}
binfmt: ${have_binfmt}
vconsole: ${have_vconsole}
bootchart: ${have_bootchart}
quotacheck: ${have_quotacheck}
tmpfiles: ${have_tmpfiles}
sysusers: ${have_sysusers}
firstboot: ${have_firstboot}
randomseed: ${have_randomseed}
backlight: ${have_backlight}
rfkill: ${have_rfkill}
logind: ${have_logind}
machined: ${have_machined}
importd: ${have_importd}
hostnamed: ${have_hostnamed}
timedated: ${have_timedated}
timesyncd: ${have_timesyncd}
default NTP servers: ${NTP_SERVERS}
time epoch: ${TIME_EPOCH}
localed: ${have_localed}
networkd: ${have_networkd}
resolved: ${have_resolved}
default DNS servers: ${DNS_SERVERS}
coredump: ${have_coredump}
polkit: ${have_polkit}
efi: ${have_efi}
gnuefi: ${have_gnuefi}
efi arch: ${EFI_ARCH}
EFI machine type: ${EFI_MACHINE_TYPE_NAME}
EFI CC ${EFI_CC}
EFI libdir: ${EFI_LIB_DIR}
EFI ldsdir: ${EFI_LDS_DIR}
EFI includedir: ${EFI_INC_DIR}
kmod: ${have_kmod}
xkbcommon: ${have_xkbcommon}
blkid: ${have_blkid}
libmount: ${have_libmount}
dbus: ${have_dbus}
nss-myhostname: ${have_myhostname}
hwdb: ${enable_hwdb}
kdbus: ${have_kdbus}
Python: ${have_python}
man pages: ${have_manpages}
test coverage: ${have_coverage}
Split /usr: ${enable_split_usr}
SysV compatibility: ${SYSTEM_SYSV_COMPAT}
compatibility libraries: ${have_compat_libs}
utmp/wtmp support: ${have_utmp}
ldconfig support: ${enable_ldconfig}
hibernate support: ${enable_hibernate}
extra debugging: ${enable_debug}
prefix: ${prefix}
rootprefix: ${with_rootprefix}
sysconf dir: ${sysconfdir}
datarootdir: ${datarootdir}
includedir: ${includedir}
lib dir: ${libdir}
rootlib dir: ${with_rootlibdir}
SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
Build Python: ${PYTHON}
PAM modules dir: ${with_pamlibdir}
PAM configuration dir: ${with_pamconfdir}
D-Bus policy dir: ${with_dbuspolicydir}
D-Bus session dir: ${with_dbussessionservicedir}
D-Bus system dir: ${with_dbussystemservicedir}
Bash completions dir: ${with_bashcompletiondir}
Zsh completions dir: ${with_zshcompletiondir}
Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP}
Debug shell: ${SUSHELL} @ ${DEBUGTTY}
TTY GID: ${TTY_GID}
Maximum System UID: ${SYSTEM_UID_MAX}
Maximum System GID: ${SYSTEM_GID_MAX}
Certificate root: ${CERTIFICATEROOT}
Default dkr Index ${DEFAULT_DKR_INDEX_URL}
CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
])