configure.ac revision c3eae485bb639352122ac0fbf30490e887f3bc44
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# This file is part of systemd.
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# Copyright 2010-2012 Lennart Poettering
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# Copyright 2010-2012 Kay Sievers
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# 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.
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 ChevalierAC_PREREQ([2.64])
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny ChevalierAC_INIT([systemd],
c6a77179a4097df355f0f04b8f3260c76b5e515cRonny Chevalier [http://www.freedesktop.org/wiki/Software/systemd])
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 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 ChevalierAC_PROG_CC_C99
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 HoyerLT_PREREQ(2.2)
b6f0c419e38a960873fe68bf8f89bbb0268eed02Harald HoyerLT_INIT([disable-static])
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])])
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# 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])
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 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)
dbf43a42b8bb66d53c7cbab05f104c28097f811eDaniel MackGETTEXT_PACKAGE=systemd
dbf43a42b8bb66d53c7cbab05f104c28097f811eDaniel MackAC_SUBST(GETTEXT_PACKAGE)
dbf43a42b8bb66d53c7cbab05f104c28097f811eDaniel MackAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [systemd])
24be78d72b931b0175f08cee12fd23d631c024bfEvgeny VereshchaginAC_PATH_PROG([M4], [m4])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([XSLTPROC], [xsltproc])
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 ChevalierAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
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 ChevalierAS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
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 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 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"
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 ChevalierCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
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 \
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 \
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 --param=ssp-buffer-size=4])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierCC_CHECK_FLAG_APPEND([with_cflags], [CFLAGS], [-Werror=shadow], [
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevaliertypedef uint64_t usec_t;
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierusec_t now(clockid_t clock);
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierint main(void) {
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier struct timespec now;
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 ChevalierAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny Vereshchagin [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
c7eda0133b6bf13a182337cbe8a61bf2faf9b32eEvgeny VereshchaginAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
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 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 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 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,-fuse-ld=gold])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
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# ------------------------------------------------------------------------------
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)])])
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 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 ChevalierAM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
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# unconditionally pull-in librt with old glibc versions
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAC_SEARCH_LIBS([clock_gettime], [rt], [], [])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevaliersave_LIBS="$LIBS"
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 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],
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# This makes sure pkg.m4 is available.
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalierm4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
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"])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
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 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) ;;
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier [have_compat_libs=no])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"])
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 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 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 HoyerAM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
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 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 HoyerAM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
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])
889a90422dd47284dffa32b9234a6e58991b000cRonny ChevalierAM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
889a90422dd47284dffa32b9234a6e58991b000cRonny Chevalier# ------------------------------------------------------------------------------
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 HoyerAM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_LIBMOUNT, [test "$have_libmount" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
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 [have_ima=yes])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_ima}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
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 HoyerAM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"])
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 HoyerAC_SUBST(SUSHELL)
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 HoyerAC_SUBST(DEBUGTTY)
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 HoyerAC_SUBST(CERTIFICATEROOT)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
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 HoyerAM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
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 HoyerAM_CONDITIONAL(HAVE_ZLIB, [test "$have_zlib" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
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 HoyerAM_CONDITIONAL(HAVE_LZ4, [test "$have_lz4" = "yes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_COMPRESSION, [test "$have_xz" = "yes" -o "$have_lz4" = "yes"])
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 [have_pam=auto])
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 AC_CHECK_LIB(
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 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 HoyerAC_SUBST(PAM_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
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 [have_acl=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_acl}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_HEADERS(
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 AC_CHECK_LIB(
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 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 HoyerAC_SUBST(ACL_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
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 [have_smack=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_smack}" = xauto; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_SMACK"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_smack=yes
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 Hoyerif test "x${have_smack_run_label}" = xyes; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer M4_DEFINES="$M4_DEFINES -DHAVE_SMACK_RUN_LABEL"
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 Hoyerif test "x${have_smack}" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"])
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 [have_gcrypt=auto])
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 m4_ifdef([AM_PATH_LIBGCRYPT], [AM_PATH_LIBGCRYPT(
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 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 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 have_gcrypt=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer GCRYPT_LIBS=
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer GCRYPT_CFLAGS=
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(GCRYPT_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(GCRYPT_CFLAGS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
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 [have_audit=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_audit}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_HEADERS(
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 AC_CHECK_LIB(
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 if test "x$have_audit" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AUDIT_LIBS="-laudit"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_audit=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(AUDIT_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL([HAVE_AUDIT], [test "x$have_audit" != xno])
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 [have_elfutils=auto])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerif test "x${have_elfutils}" != xno ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_HEADERS(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_elfutils" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** ELFUTILS headers not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_LIB(
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [dwfl_begin],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [if test "x$have_elfutils" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_MSG_ERROR([*** ELFUTILS libs not found.])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_CHECK_LIB(
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 if test "x$have_elfutils" = xyes ; then
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer ELFUTILS_LIBS="-lelf -ldw"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer have_elfutils=no
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer ELFUTILS_LIBS=
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(ELFUTILS_LIBS)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_ELFUTILS, [test "$have_elfutils" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
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 HoyerAM_CONDITIONAL(HAVE_LIBIPTC, [test "$have_libiptc" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_FIRSTBOOT, [test "$have_firstboot" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
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
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 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 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 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 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 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 HoyerAM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
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 HoyerAC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_SUBST(NTP_SERVERS)
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 HoyerAC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch])
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 HoyerAC_DEFINE_UNQUOTED(SYSTEM_UID_MAX, [$SYSTEM_UID_MAX], [Maximum System UID])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_SUBST(SYSTEM_UID_MAX)
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 HoyerAC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_SUBST(SYSTEM_GID_MAX)
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 HoyerAM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
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 HoyerAM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
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 HoyerAM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
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 HoyerAC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald HoyerAC_SUBST(DNS_SERVERS)
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 HoyerAM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
0d6e798a784ef0ba6b95512e4453067b2f84a91aHarald Hoyer# ------------------------------------------------------------------------------
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 HoyerAM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_CHECK_TOOL(EFI_CC, gcc)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerEFI_ARCH=`echo $host | sed "s/\(-\).*$//"`
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_COND_IF(ARCH_IA32, [
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer EFI_ARCH=ia32
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer EFI_MACHINE_TYPE_NAME=ia32])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_COND_IF(ARCH_X86_64, [
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer EFI_MACHINE_TYPE_NAME=x64])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_COND_IF(ARCH_AARCH64, [
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer EFI_MACHINE_TYPE_NAME=aa64])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST([EFI_ARCH])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST([EFI_MACHINE_TYPE_NAME])
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 efiroot=$(echo $(cd /usr/lib/$(${EFI_CC} -print-multi-os-directory); pwd))
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 AC_SUBST([EFI_LIB_DIR])
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 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 AC_SUBST([EFI_INC_DIR])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])
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 HoyerAM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
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 [RC_LOCAL_SCRIPT_PATH_START="$withval"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_ARG_WITH(rc-local-script-path-stop,
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
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 HoyerAC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald HoyerAC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer# ------------------------------------------------------------------------------
[KBD_LOADKEYS="/usr/bin/loadkeys"])
[KBD_SETFONT="/usr/bin/setfont"])
[TELINIT="/lib/sysvinit/telinit"])
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_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
[Specify the path to the base directory for the SysV rcN.d directories])],
AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
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.])
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
[with_dbussessionservicedir=${datadir}/dbus-1/services])
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
with_bashcompletiondir=${datadir}/bash-completion/completions
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[with_pamconfdir=${sysconfdir}/pam.d])
[AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])],
AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads])
AS_IF([test "x$0" != "x./configure"], [
AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
utmp/wtmp support: ${have_utmp}