configure.ac revision b32545ff19364fe75240dc99bcc0ec6861d1bc61
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# This file is part of systemd.
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Copyright 2010-2012 Lennart Poettering
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Copyright 2010-2012 Kay Sievers
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# systemd is free software; you can redistribute it and/or modify it
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# under the terms of the GNU Lesser General Public License as published by
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# the Free Software Foundation; either version 2.1 of the License, or
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# (at your option) any later version.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# systemd is distributed in the hope that it will be useful, but
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# WITHOUT ANY WARRANTY; without even the implied warranty of
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# Lesser General Public License for more details.
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# You should have received a copy of the GNU Lesser General Public License
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# along with systemd; If not, see <http://www.gnu.org/licenses/>.
4e949c11a1df4547d5f102e4131e07b026369cd7Javier JardónAC_PREREQ([2.64])
4e949c11a1df4547d5f102e4131e07b026369cd7Javier JardónAC_INIT([systemd],
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón [http://www.freedesktop.org/wiki/Software/systemd])
78a825f216d39ee0295b00647b059d45467e1d02Kay SieversAC_CONFIG_SRCDIR([src/core/main.c])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CONFIG_MACRO_DIR([m4])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CONFIG_HEADERS([config.h])
a80db8bd5f7f15859e8891aab9fc3694ce4cd0bdJavier JardónAC_CONFIG_AUX_DIR([build-aux])
4db6d587c37c0357d20c79bf1a7c9afd4c7ced61Kay SieversAC_USE_SYSTEM_EXTENSIONS
907dd1953b7517534d646f5b2777780020c896e2Kay SieversAC_SYS_LARGEFILE
eb7bbee6cd182d5c4eb1e1180631c35158f59379Kay SieversAC_PREFIX_DEFAULT([/usr])
6aad7f2cd75c88f990c7857bb173b3e8d0faee0fUmut Tezduyar LindskogAM_MAINTAINER_MODE([enable])
bbd9b8c2139a70005e4e83d198575e2a10fe1db2Lennart PoetteringAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects parallel-tests])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_SILENT_RULES([yes])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CANONICAL_HOST
22be093ffb403a1c474037939ca9b88b1ee39f77Lennart PoetteringAC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
d59d0a2b4b41a75eaf618b26b8f8bd1e17de7e2bceeAC_CHECK_TOOLS([AR], [gcc-ar ar], [:])
d59d0a2b4b41a75eaf618b26b8f8bd1e17de7e2bceeAC_CHECK_TOOLS([NM], [gcc-nm nm], [:])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CHECK_TOOLS([RANLIB], [gcc-ranlib ranlib], [:])
8666abb452db73d9a11ead61251eec42bc531cceKay SieversLT_PREREQ(2.2)
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringLT_INIT([disable-static])
3d585edbb14b9705c80183aeb16dfd0a28df0ac9Lennart PoetteringAS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
5e63ce78b5018ba612e794a610a6f13c5eefade7Cristian RodríguezAS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraSET_ARCH(X86_64, x86_64*)
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraSET_ARCH(IA32, i*86*)
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraSET_ARCH(MIPS, mips*)
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraSET_ARCH(AARCH64, aarch64*)
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart Poettering# i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart PoetteringAC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart PoetteringAS_IF([test x"$intltool_found" != xyes],
3ce4fad8f548db9edb19869ea540e3192d2123f4Kay Sievers [AS_IF([test x"$enable_nls" = xyes],
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart Poettering [AC_MSG_ERROR([--enable-nls requested but intltool not found])],
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart Poettering [AS_IF([test x"$enable_nls" != xno],
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering [AC_MSG_WARN([*** Disabling NLS support because intltool was not found])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering enable_nls=no])
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-SzmekAS_IF([test x"$enable_nls" != xno -o "x$enable_polkit" != xno], [
92ec4495f76a7a2a6c31f5bb2a5240f78dcfe1d2Javier Jardón # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
86b2e20a5e5abf222fb81edcb5d58d012e35cbaaLennart PoetteringIT_PROG_INTLTOOL([0.40.0])
86b2e20a5e5abf222fb81edcb5d58d012e35cbaaLennart PoetteringAS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
86b2e20a5e5abf222fb81edcb5d58d012e35cbaaLennart Poettering # If intltool is not available, provide a dummy rule to fail generation of %.policy files with a meaningful error message
c1c02e07ed87e027a6364c4f4aa2468796ca1c56Dave Reisner INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo " ITMRG " $@ && echo "*** intltool support required to build target $@" && false'
96ede2601f27cd5fe52eed96b873bef55cd0ce23Lennart Poettering AC_SUBST(INTLTOOL_POLICY_RULE)
7801356442578ff6e1c65844eb9e65c819af4660Zbigniew Jędrzejewski-SzmekGETTEXT_PACKAGE=systemd
7801356442578ff6e1c65844eb9e65c819af4660Zbigniew Jędrzejewski-SzmekAC_SUBST(GETTEXT_PACKAGE)
80a5cbace45a6adbf2f9119edc5a4b10db493064Kay SieversAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [systemd])
6e92b23f0d6dd398848376bbaf47e54a90ed3389Kay SieversAC_PATH_PROG([M4], [m4])
0eaeca1f2373a323b98c86b47561d98e59c67b25Kay SieversAC_PATH_PROG([XSLTPROC], [xsltproc])
d66ee73a3dd7b5433fc0da3125bbdff740de7745Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin])
d66ee73a3dd7b5433fc0da3125bbdff740de7745Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin])
ac714a78fdca481488d88f84b6332d28083a4511Martin JansaAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap], [$PATH:/usr/sbin:/sbin])
b62cfcea00862ccbf0e5e297f8a339f70987edefMichael BieblAC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin])
b62cfcea00862ccbf0e5e297f8a339f70987edefMichael BieblAC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_CHECK_TOOL(OBJCOPY, objcopy)
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_CHECK_TOOL(STRINGS, strings)
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_CHECK_TOOL(GPERF, gperf)
eb2e280f9c59b66965c9316eadc4c113a13ca744Lucas De Marchiif test -z "$GPERF" ; then
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering AC_MSG_ERROR([*** gperf not found])
27765dfc7a32d790badb29e6498b34edb0b60c33Lennart Poettering# ------------------------------------------------------------------------------
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringaddress_sanitizer_cflags=
780040dc2a4b08a2c1fe5bd8db3a70e966c2acb3Kay Sieversaddress_sanitizer_cppflags=
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringaddress_sanitizer_ldflags=
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAS_IF([test "x$enable_address_sanitizer" = "xyes"], [
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering AS_IF([test -z "$with_as_cflags"],
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering address_sanitizer_cppflags="-DVALGRIND=1"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering address_sanitizer_ldflags="-Wc,-fsanitize=address"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringundefined_sanitizer_cflags=
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringundefined_sanitizer_cppflags=
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringundefined_sanitizer_ldflags=
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_ARG_ENABLE(undefined-sanitizer, AS_HELP_STRING([--enable-undefined-sanitizer], [enable -fsanitize=undefined]))
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAS_IF([test "x$enable_undefined_sanitizer" = "xyes"], [
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering CC_CHECK_FLAG_APPEND([with_us_cflags], [CFLAGS], [-fsanitize=undefined])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering AS_IF([test -z "$with_us_cflags"],
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering [AC_MSG_ERROR([*** -fsanitize=undefined is not supported])])
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering undefined_sanitizer_cflags="$with_us_cflags -fno-omit-frame-pointer -DVALGRIND=1"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering undefined_sanitizer_cppflags="-DVALGRIND=1"
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined"
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poetteringsanitizer_cflags="$address_sanitizer_cflags $undefined_sanitizer_cflags"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringsanitizer_cppflags="$address_sanitizer_cppflags $undefined_sanitizer_cppflags"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringsanitizer_ldflags="$address_sanitizer_ldflags $undefined_sanitizer_ldflags"
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut BarbieriCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
c1663b9daf5a43425e54bbe3daf6b10e64578f80Lennart Poettering "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -Wmissing-include-dirs \
03a170c03cd4a09721369ece48affb70d66c6b90Kay Sievers -Wold-style-definition \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -Wpointer-arith \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -Wdeclaration-after-statement \
9e7adc3ae1133fa08a468768a490812299fad030Lucas De Marchi -Wsuggest-attribute=noreturn \
9e7adc3ae1133fa08a468768a490812299fad030Lucas De Marchi -Werror=missing-prototypes \
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri -Werror=implicit-function-declaration \
9d2d0fe1e3f28a639c26b62391f79cfd1450d91bEvangelos Foutras -Werror=missing-declarations \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -Werror=return-type \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -Werror=shadow \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -Wstrict-prototypes \
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek -Wredundant-decls \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering -Wmissing-noreturn \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wendif-labels \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wstrict-aliasing=2 \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wwrite-strings \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wno-unused-parameter \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wno-missing-field-initializers \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wno-unused-result \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wno-format-signedness \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Werror=overflow \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wnested-externs \
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael Biebl -fdiagnostics-show-option \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -fno-strict-aliasing \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -fvisibility=hidden \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -fstack-protector \
1864b0e39505cd44a98eee61c97916b86491c0b4Zbigniew Jędrzejewski-Szmek -fstack-protector-strong \
1864b0e39505cd44a98eee61c97916b86491c0b4Zbigniew Jędrzejewski-Szmek --param=ssp-buffer-size=4])
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-SzmekAS_CASE([$CC], [*clang*],
1864b0e39505cd44a98eee61c97916b86491c0b4Zbigniew Jędrzejewski-Szmek [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -Wno-typedef-redefinition \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -Wno-gnu-variable-sized-type-not-at-end \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-SzmekAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
f2ec0646aba7c6703a6c79603957e805b74c3befZbigniew Jędrzejewski-Szmek [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wp,-D_FORTIFY_SOURCE=2])],
afea26ad7d406d8b6c95d2642cb5a1d807b87546Lennart Poettering [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay SieversAC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay SieversAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers [CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers -Wl,--gc-sections])],
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Biebl [AC_MSG_RESULT([skipping --gc-sections, optimization not enabled])])
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael BieblAC_SUBST([OUR_CFLAGS], "$with_ldflags $sanitizer_cflags")
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Biebl [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers -ffunction-sections -fdata-sections])],
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers [AC_MSG_RESULT([skipping -ffunction/data-section, optimization not enabled])])
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay SieversAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
fba1ea06bb5b653e9eb0cc1b6004af8da273a4abShawn LanddenCC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
fba1ea06bb5b653e9eb0cc1b6004af8da273a4abShawn Landden -Wl,--as-needed \
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Biebl -Wl,--no-undefined \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering -Wl,-z,relro \
9388e99e208a6487b26dcbda86005ee9eba8d93dMichael Olbrich -Wl,-fuse-ld=gold])
a8348796c0d39435b1c3d85ce6e95dad1ac85fecLennart PoetteringAC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
9388e99e208a6487b26dcbda86005ee9eba8d93dMichael OlbrichAC_CHECK_SIZEOF(pid_t)
a8348796c0d39435b1c3d85ce6e95dad1ac85fecLennart PoetteringAC_CHECK_SIZEOF(uid_t)
b237ef2cfac7ab0b33170809e8cb64628606207dTollef Fog HeenAC_CHECK_SIZEOF(gid_t)
a9b5b03212f9c854938483b8901e433c2ba6619bMichael TremerAC_CHECK_SIZEOF(time_t)
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_CHECK_SIZEOF(dev_t)
2270309471213a3c960543e523130627e9cb10e2Kay SieversAC_CHECK_SIZEOF(rlim_t,,[
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen# ------------------------------------------------------------------------------
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen# we use python to build the man page index
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAC_ARG_WITH([python],
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAS_IF([test "x$with_python" != "xno"], [
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen AM_PATH_PYTHON(,, [:])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen AS_IF([test "x$PYTHON" != "x:"], [
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen AC_MSG_CHECKING([for python lxml module])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen AC_MSG_RESULT([$have_lxml])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes],
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen [AC_MSG_WARN([*** python support requires python-lxml module installed])])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAS_IF([test "$have_python" != "yes"], [
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen AS_IF([test "$with_python" = "yes"],
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen [AC_MSG_ERROR([*** python support requested but python support not found])])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen AS_IF([test "$with_python" != "no"],
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen [AC_MSG_WARN([*** python support not found, some documentation cannot be built])])
e30431623a7d871da123cc37055ac49abf2c20eaTom GundersenAM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen# ------------------------------------------------------------------------------
e2ca86cf78f911a8be51f0224796e24883019139Dave ReisnerAC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
e2ca86cf78f911a8be51f0224796e24883019139Dave ReisnerAC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
a18535d9e138c525d0443ec9f30a90b3e2184686Tom GundersenAC_CHECK_HEADERS([linux/btrfs.h], [], [])
e2ca86cf78f911a8be51f0224796e24883019139Dave ReisnerAC_CHECK_HEADERS([linux/memfd.h], [], [])
e2ca86cf78f911a8be51f0224796e24883019139Dave Reisner# unconditionally pull-in librt with old glibc versions
e30431623a7d871da123cc37055ac49abf2c20eaTom GundersenAC_SEARCH_LIBS([clock_gettime], [rt], [], [])
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersensave_LIBS="$LIBS"
e30431623a7d871da123cc37055ac49abf2c20eaTom GundersenAC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
f553b3b1074151200187df916427a1468186435eAnders OlofssonCAP_LIBS="$LIBS"
f553b3b1074151200187df916427a1468186435eAnders OlofssonAC_SUBST(CAP_LIBS)
f553b3b1074151200187df916427a1468186435eAnders OlofssonAC_CHECK_FUNCS([memfd_create])
f553b3b1074151200187df916427a1468186435eAnders OlofssonAC_CHECK_FUNCS([__secure_getenv secure_getenv])
f553b3b1074151200187df916427a1468186435eAnders OlofssonAC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, kcmp, LO_FLAGS_PARTSCAN],
816115863962548a9a0d9fbfe429c7f8e685beacRoberto SassuAC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_MACVLAN_FLAGS,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_IPVLAN_MODE,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_VTI_REMOTE,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_PHYS_PORT_ID,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_BOND_AD_INFO,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_VLAN_PROTOCOL,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_VXLAN_REMCSUM_NOPARTIAL,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_IPTUN_ENCAP_DPORT,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_GRE_ENCAP_DPORT,
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu IFLA_BRIDGE_VLAN_INFO,
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering IFLA_BRPORT_LEARNING_SYNC,
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering# This makes sure pkg.m4 is available.
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poetteringm4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering# ------------------------------------------------------------------------------
591622d7efbc828f00f190d91b6608148b967ff5Lennart PoetteringAC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests]))
3f8cc098d218525710e5cbad9adf37001d3b6060Jan EngelhardtAS_IF([test "x$enable_dbus" != "xno"], [
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2],
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes],
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering [have_dbus=no])
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"],
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
591622d7efbc828f00f190d91b6608148b967ff5Lennart PoetteringAM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez# ------------------------------------------------------------------------------
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian RodríguezAC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez AS_CASE("x${enableval}",
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez [xyes], [have_utmp=yes],
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez [xno], [have_utmp=no],
5ec6b15b65304d94dc1c8cbad05c8b996b470d3aKay Sievers AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J WalshAS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian RodríguezAM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez# ------------------------------------------------------------------------------
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguezhave_compat_libs=no
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian RodríguezAC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez [case "${enableval}" in
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez yes) have_compat_libs=yes ;;
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez no) have_compat_libs=no ;;
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libs) ;;
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering [have_compat_libs=no])
807e17f05e217b474af39503efb9503d81b12596Lennart PoetteringAM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"])
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering# ------------------------------------------------------------------------------
807e17f05e217b474af39503efb9503d81b12596Lennart Poetteringhave_coverage=no
807e17f05e217b474af39503efb9503d81b12596Lennart PoetteringAC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
807e17f05e217b474af39503efb9503d81b12596Lennart Poetteringif test "x$enable_coverage" = "xyes" ; then
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering if test "x$lcov_found" = xno ; then
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering AC_MSG_ERROR([*** lcov support requested but the program was not found])
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering have_coverage=yes
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering -fprofile-arcs \
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering -ftest-coverage])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
812cce323db081634f37e4ec6d29f2b9328a3f52Lennart Poettering# ------------------------------------------------------------------------------
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poetteringif test "x$enable_kmod" != "xno"; then
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering if test "x$have_kmod" = "xyes"; then
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering AC_MSG_ERROR([*** kmod version >= 15 not found]))
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_MSG_ERROR([*** kmod support requested, but libraries not found])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering# ------------------------------------------------------------------------------
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringhave_xkbcommon=no
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_ARG_ENABLE(xkbcommon, AS_HELP_STRING([--disable-xkbcommon], [disable xkbcommon keymap support]))
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringif test "x$enable_xkbcommon" != "xno"; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering PKG_CHECK_MODULES(XKBCOMMON, [ xkbcommon >= 0.3.0 ],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_DEFINE(HAVE_XKBCOMMON, 1, [Define if libxkbcommon is available]) have_xkbcommon=yes], have_xkbcommon=no)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering if test "x$have_xkbcommon" = xno -a "x$enable_xkbcommon" = xyes; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_MSG_ERROR([*** xkbcommon support requested but libraries not found])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering# ------------------------------------------------------------------------------
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringif test "x$enable_blkid" != "xno"; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering PKG_CHECK_MODULES(BLKID, [ blkid >= 2.24 ],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_MSG_ERROR([*** blkid support requested but libraries not found])
812cce323db081634f37e4ec6d29f2b9328a3f52Lennart PoetteringAM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering# ------------------------------------------------------------------------------
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringhave_libmount=no
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringPKG_CHECK_MODULES(MOUNT, [ mount >= 2.20 ],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available]) have_libmount=yes], have_libmount=no)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringif test "x$have_libmount" = xno; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_MSG_ERROR([*** libmount support required but libraries not found])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(HAVE_LIBMOUNT, [test "$have_libmount" = "yes"])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering# ------------------------------------------------------------------------------
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poetteringhave_seccomp=no
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support]))
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poetteringif test "x$enable_seccomp" != "xno"; then
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering have_seccomp=yes
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [have_seccomp=no])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AC_MSG_ERROR([*** seccomp support requested but libraries not found])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering# ------------------------------------------------------------------------------
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [case "${enableval}" in
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering yes) have_ima=yes ;;
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering no) have_ima=no ;;
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [have_ima=yes])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poetteringif test "x${have_ima}" != xno ; then
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering# ------------------------------------------------------------------------------
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poetteringhave_selinux=no
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poetteringif test "x$enable_selinux" != "xno"; then
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering have_selinux=yes
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [have_selinux=no])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering AC_MSG_ERROR([*** SELinux support requested but libraries not found])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poetteringhave_apparmor=no
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_ARG_ENABLE(apparmor, AS_HELP_STRING([--disable-apparmor], [Disable optional AppArmor support]))
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poetteringif test "x$enable_apparmor" != "xno"; then
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering PKG_CHECK_MODULES([APPARMOR], [libapparmor],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [AC_DEFINE(HAVE_APPARMOR, 1, [Define if AppArmor is available])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering have_apparmor=yes
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_APPARMOR"],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [have_apparmor=no])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering if test "x$have_apparmor" = xno -a "x$enable_apparmor" = xyes; then
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering AC_MSG_ERROR([*** AppArmor support requested but libraries not found])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_ARG_WITH(debug-shell,
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering AS_HELP_STRING([--with-debug-shell=PATH],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [Path to debug shell binary]),
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [SUSHELL="$withval"],[
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_SUBST(SUSHELL)
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_ARG_WITH([debug-tty],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering AS_HELP_STRING([--with-debug-tty=PATH],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [Specify the tty device for debug shell]),
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [DEBUGTTY="$withval"],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_SUBST(DEBUGTTY)
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAC_ARG_WITH([certificate-root],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski AS_HELP_STRING([--with-certificate-root=PATH],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [Specify the prefix for TLS certificates [/etc/ssl]]),
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [CERTIFICATEROOT="$withval"],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [CERTIFICATEROOT="/etc/ssl"])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAC_SUBST(CERTIFICATEROOT)
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski# ------------------------------------------------------------------------------
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowskiif test "x$enable_xz" != "xno"; then
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski PKG_CHECK_MODULES(XZ, [ liblzma ],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski AC_MSG_ERROR([*** XZ support requested but libraries not found])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok# ------------------------------------------------------------------------------
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kokhave_zlib=no
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke KokAC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib], [Disable optional ZLIB support]))
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kokif test "x$enable_zlib" != "xno"; then
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok PKG_CHECK_MODULES(ZLIB, [ zlib ],
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok [AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available]) have_zlib=yes], have_zlib=no)
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski if test "x$have_zlib" = xno -a "x$enable_zlib" = xyes; then
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski AC_MSG_ERROR([*** ZLIB support requested but libraries not found])
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAM_CONDITIONAL(HAVE_ZLIB, [test "$have_zlib" = "yes"])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering# ------------------------------------------------------------------------------
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAC_ARG_ENABLE(bzip2, AS_HELP_STRING([--enable-bzip2], [Disable optional BZIP2 support]))
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAS_IF([test "x$enable_bzip2" != "xno"], [
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AC_CHECK_HEADERS(bzlib.h,
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [AC_DEFINE(HAVE_BZIP2, 1, [Define in BZIP2 is available])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering have_bzip2=yes],
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [AS_IF([test "x$have_bzip2" = xyes], [AC_MSG_ERROR([*** BZIP2 support requested but headers not found])])
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering# ------------------------------------------------------------------------------
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAC_ARG_ENABLE(lz4, AS_HELP_STRING([--enable-lz4], [Enable optional LZ4 support]))
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAS_IF([test "x$enable_lz4" = "xyes"], [
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AC_CHECK_HEADERS(lz4.h,
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) have_lz4=yes],
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [AC_MSG_ERROR([*** LZ4 support requested but headers not found])])
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAM_CONDITIONAL(HAVE_LZ4, [test "$have_lz4" = "yes"])
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAM_CONDITIONAL(HAVE_COMPRESSION, [test "$have_xz" = "yes" -o "$have_lz4" = "yes"])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering# ------------------------------------------------------------------------------
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAC_ARG_ENABLE([pam],
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [case "${enableval}" in
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering yes) have_pam=yes ;;
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering no) have_pam=no ;;
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [have_pam=auto])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poetteringif test "x${have_pam}" != xno ; then
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering AC_CHECK_HEADERS(
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [have_pam=yes],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [if test "x$have_pam" = xyes ; then
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering AC_MSG_ERROR([*** PAM headers not found.])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [have_pam=yes],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [if test "x$have_pam" = xyes ; then
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering AC_MSG_ERROR([*** libpam not found.])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering if test "x$have_pam" = xyes ; then
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering PAM_LIBS="-lpam -lpam_misc"
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering AC_DEFINE(HAVE_PAM, 1, [PAM available])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_PAM"
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAC_SUBST(PAM_LIBS)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering# ------------------------------------------------------------------------------
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAC_ARG_ENABLE([acl],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [case "${enableval}" in
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering yes) have_acl=yes ;;
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers no) have_acl=no ;;
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [have_acl=auto])
7f4e08056de0184b205a20632e62db73d299937eLennart Poetteringif test "x${have_acl}" != xno ; then
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering AC_CHECK_HEADERS(
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [have_acl=yes],
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [if test "x$have_acl" = xyes ; then
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering AC_MSG_ERROR([*** ACL headers not found.])
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering [acl_get_file],
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering [have_acl=yes],
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering [if test "x$have_acl" = xyes ; then
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering AC_MSG_ERROR([*** libacl not found.])
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering if test "x$have_acl" = xyes ; then
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering ACL_LIBS="-lacl"
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering AC_DEFINE(HAVE_ACL, 1, [ACL available])
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_ACL"
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart PoetteringAC_SUBST(ACL_LIBS)
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart PoetteringAM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering# ------------------------------------------------------------------------------
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart PoetteringAC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [case "${enableval}" in
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna yes) have_smack=yes ;;
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna no) have_smack=no ;;
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna [have_smack=auto])
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajnaif test "x${have_smack}" = xauto; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers M4_DEFINES="$M4_DEFINES -DHAVE_SMACK"
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering have_smack=yes
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay SieversAC_ARG_WITH(smack-run-label,
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAS_HELP_STRING([--with-smack-run-label=STRING],
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering [run systemd --system itself with a specific SMACK label]),
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run systemd itself with SMACK label])],
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAC_ARG_WITH(smack-default-process-label,
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAS_HELP_STRING([--with-smack-default-process-label=STRING],
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers [default SMACK label for executed processes]),
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering [AC_DEFINE_UNQUOTED(SMACK_DEFAULT_PROCESS_LABEL, ["$withval"], [Default SMACK label for executed processes])],
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kokif test "x${have_smack}" = xyes ; then
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke KokAM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"])
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok# ------------------------------------------------------------------------------
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke KokAC_ARG_ENABLE([gcrypt],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering [case "${enableval}" in
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering yes) have_gcrypt=yes ;;
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering no) have_gcrypt=no ;;
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering [have_gcrypt=auto])
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyarif test "x${have_gcrypt}" != xno ; then
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar AM_PATH_LIBGCRYPT(
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar [have_gcrypt=yes],
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar [if test "x$have_gcrypt" = xyes ; then
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar AC_MSG_ERROR([*** GCRYPT headers not found.])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers if test "x$have_gcrypt" = xyes ; then
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering GCRYPT_LIBS="$LIBGCRYPT_LIBS"
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering have_gcrypt=no
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering GCRYPT_CFLAGS=
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart PoetteringAC_SUBST(GCRYPT_LIBS)
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart PoetteringAC_SUBST(GCRYPT_CFLAGS)
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart PoetteringAM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering# ------------------------------------------------------------------------------
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart PoetteringAC_ARG_ENABLE([audit],
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering [case "${enableval}" in
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering yes) have_audit=yes ;;
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering no) have_audit=no ;;
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering [have_audit=auto])
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sieversif test "x${have_audit}" != xno ; then
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers AC_CHECK_HEADERS(
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers [have_audit=yes],
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers [if test "x$have_audit" = xyes ; then
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers AC_MSG_ERROR([*** AUDIT headers not found.])
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering [have_audit=yes],
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering [if test "x$have_audit" = xyes ; then
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering AC_MSG_ERROR([*** libaudit not found.])
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering if test "x$have_audit" = xyes ; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AUDIT_LIBS="-laudit"
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna have_audit=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_SUBST(AUDIT_LIBS)
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos VajnaAM_CONDITIONAL([HAVE_AUDIT], [test "x$have_audit" != xno])
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna# ------------------------------------------------------------------------------
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay SieversAC_ARG_ENABLE([elfutils],
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna AS_HELP_STRING([--disable-elfutils],[Disable optional ELFUTILS support]),
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna [case "${enableval}" in
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna yes) have_elfutils=yes ;;
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers no) have_elfutils=no ;;
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna *) AC_MSG_ERROR(bad value ${enableval} for --disable-elfutils) ;;
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna [have_elfutils=auto])
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajnaif test "x${have_elfutils}" != xno ; then
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna AC_CHECK_HEADERS(
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering [if test "x$have_elfutils" = xyes ; then
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering AC_MSG_ERROR([*** ELFUTILS headers not found.])
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering [if test "x$have_elfutils" = xyes ; then
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering AC_MSG_ERROR([*** ELFUTILS libs not found.])
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering [dwfl_core_file_attach],
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering [have_elfutils=yes],
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters [if test "x$have_elfutils" = xyes ; then
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters AC_MSG_ERROR([*** ELFUTILS >= 158 is required.])
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters if test "x$have_elfutils" = xyes ; then
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters ELFUTILS_LIBS="-lelf -ldw"
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available])
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering have_elfutils=no
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering ELFUTILS_LIBS=
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart PoetteringAC_SUBST(ELFUTILS_LIBS)
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart PoetteringAM_CONDITIONAL(HAVE_ELFUTILS, [test "$have_elfutils" = "yes"])
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering# ------------------------------------------------------------------------------
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringhave_libcryptsetup=no
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringif test "x$enable_libcryptsetup" != "xno"; then
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
bc2708414babc5c99bb8000e63c84e87606cc15dLennart PoetteringAM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering# ------------------------------------------------------------------------------
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringhave_qrencode=no
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poetteringif test "x$enable_qrencode" != "xno"; then
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering AC_MSG_ERROR([*** qrencode support requested but libraries not found])
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering# ------------------------------------------------------------------------------
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringhave_microhttpd=no
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringif test "x$enable_microhttpd" != "xno"; then
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33],
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering# ------------------------------------------------------------------------------
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support]))
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguezif test "x$enable_gnutls" != "xno"; then
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguez PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.1.4],
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguez [AC_DEFINE(HAVE_GNUTLS, 1, [Define if gnutls is available]) have_gnutls=yes], have_gnutls=no)
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguez if test "x$have_gnutls" = xno -a "x$enable_gnutls" = xyes; then
abaaabf40a9891014ed4c402d7beb5a67ac256b1Lennart Poettering AC_MSG_ERROR([*** gnutls support requested but libraries not found])
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian RodríguezAM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"])
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguez# ------------------------------------------------------------------------------
7211f918ba2b86e0041413b47d51d7593e73cf5dLennart Poetteringhave_libcurl=no
7211f918ba2b86e0041413b47d51d7593e73cf5dLennart PoetteringAC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support]))
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenif test "x$enable_libcurl" != "xno"; then
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen PKG_CHECK_MODULES(LIBCURL, [libcurl],
f8c5a5815ff7c137d9a1e5d7b48a6532b9f31407Lennart Poettering [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no)
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen AC_MSG_ERROR([*** libcurl support requested but libraries not found])
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen# ------------------------------------------------------------------------------
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenhave_libidn=no
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support]))
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenif test "x$enable_libidn" != "xno"; then
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen PKG_CHECK_MODULES(LIBIDN, [libidn],
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available])
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen have_libidn=yes
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"],
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen [have_libidn=no])
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** libidn support requested but libraries not found])
a3bd8447be4ea2ce230eb8ae0e815c04d85fa15aTom GundersenAM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_libiptc=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(libiptc, AS_HELP_STRING([--disable-libiptc], [Disable optional LIBIPTC support]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_libiptc" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers PKG_CHECK_MODULES(LIBIPTC, [libiptc],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [AC_DEFINE(HAVE_LIBIPTC, 1, [Define if libiptc is available])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_libiptc=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers M4_DEFINES="$M4_DEFINES -DHAVE_LIBIPTC"],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [have_libiptc=no])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers if test "x$have_libiptc" = "xno" -a "x$enable_libiptc" = "xyes"; then
a3bd8447be4ea2ce230eb8ae0e815c04d85fa15aTom Gundersen AC_MSG_ERROR([*** libiptc support requested but libraries not found])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(HAVE_LIBIPTC, [test "$have_libiptc" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_binfmt=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
de1c301ed165eb4d04a0c9d4babe97912b5233bbLennart Poetteringif test "x$enable_binfmt" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_binfmt=yes
de1c301ed165eb4d04a0c9d4babe97912b5233bbLennart PoetteringAM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
75db9a77605b33a1b9355eae957f26380441fce6Lennart Poettering# ------------------------------------------------------------------------------
4c2b0e4e423fe73fafef10a5efa6fb778784cebcLennart Poetteringhave_vconsole=no
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-Szmekif test "x$enable_vconsole" != "xno"; then
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-Szmek have_vconsole=yes
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-SzmekAM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
75db9a77605b33a1b9355eae957f26380441fce6Lennart Poetteringhave_bootchart=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringif test "x$enable_bootchart" != "xno"; then
34eff652cedec3cac34b92629ead5f140334b689Lennart Poettering have_bootchart=yes
f1dd0c3f9b4a257e81ff9c6a08070c702a0db45aLennart PoetteringAM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering# ------------------------------------------------------------------------------
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heenhave_quotacheck=no
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay SieversAC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poetteringif test "x$enable_quotacheck" != "xno"; then
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers have_quotacheck=yes
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog HeenAM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
dee4c244254bb49d1ffa8bd7171ae9cce596d2d0Lennart Poettering# ------------------------------------------------------------------------------
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poetteringhave_tmpfiles=no
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog HeenAC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heenif test "x$enable_tmpfiles" != "xno"; then
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen have_tmpfiles=yes
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioAM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart Poettering# ------------------------------------------------------------------------------
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidênciohave_sysusers=no
dee4c244254bb49d1ffa8bd7171ae9cce596d2d0Lennart PoetteringAC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support]))
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncioif test "x$enable_sysusers" != "xno"; then
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio have_sysusers=yes
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioAM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering# ------------------------------------------------------------------------------
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poetteringhave_firstboot=no
bc2708414babc5c99bb8000e63c84e87606cc15dLennart PoetteringAC_ARG_ENABLE(firstboot, AS_HELP_STRING([--disable-firstboot], [disable firstboot support]))
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poetteringif test "x$enable_firstboot" != "xno"; then
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering have_firstboot=yes
a05ea46dc788929bc8b13afb4208ca29cad68572Michael BieblAM_CONDITIONAL(ENABLE_FIRSTBOOT, [test "$have_firstboot" = "yes"])
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poettering# ------------------------------------------------------------------------------
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poetteringhave_randomseed=no
bef2733fae665e880da6ea011b1f918e6900bb42Lennart PoetteringAC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poetteringif test "x$enable_randomseed" != "xno"; then
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering have_randomseed=yes
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael BieblAM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering# ------------------------------------------------------------------------------
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poetteringhave_backlight=no
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools]))
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael Bieblif test "x$enable_backlight" != "xno"; then
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart Poettering have_backlight=yes
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
03c149144d374cffd40a17ffb067837e3e220933Michael Biebl# ------------------------------------------------------------------------------
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools]))
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poetteringif test "x$enable_rfkill" != "xno"; then
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering have_rfkill=yes
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart PoetteringAM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl# ------------------------------------------------------------------------------
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Bieblhave_logind=no
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael BieblAC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael Bieblif test "x$enable_logind" != "xno"; then
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl have_logind=yes
db059f1b031a92ed45b62d1036877abd9c128d1bMichael BieblAM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
db059f1b031a92ed45b62d1036877abd9c128d1bMichael BieblAS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
4f87c47b35cf9c1f58872559ae67a2656712fdd6William Giokas# ------------------------------------------------------------------------------
4f87c47b35cf9c1f58872559ae67a2656712fdd6William Giokashave_machined=no
4f87c47b35cf9c1f58872559ae67a2656712fdd6William GiokasAC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
b8079ae19b41c9b61850c796dddc601b826850e0Kay Sieversif test "x$enable_machined" != "xno"; then
b8079ae19b41c9b61850c796dddc601b826850e0Kay Sievers have_machined=yes
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay SieversAS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers# ------------------------------------------------------------------------------
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievershave_importd=no
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay SieversAC_ARG_ENABLE(importd, AS_HELP_STRING([--disable-importd], [disable import daemon]))
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay Sieversif test "x$enable_importd" != "xno"; then
b0cca7d886583a10b9342796b4619eca4d582cb2Michael Biebl have_importd=yes
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay SieversAM_CONDITIONAL(ENABLE_IMPORTD, [test "$have_importd" = "yes"])
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay SieversAS_IF([test "$have_importd" = "yes"], [ AC_DEFINE(HAVE_IMPORTD, [1], [Importd support available]) ])
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmekhave_hostnamed=no
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmekif test "x$enable_hostnamed" != "xno"; then
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny have_hostnamed=yes
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyAM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny# ------------------------------------------------------------------------------
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górnyhave_timedated=no
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyAC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górnyif test "x$enable_timedated" != "xno"; then
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny have_timedated=yes
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart PoetteringAM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering# ------------------------------------------------------------------------------
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmekhave_timesyncd=no
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmekif test "x$enable_timesyncd" != "xno"; then
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmek have_timesyncd=yes
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmek M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD"
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-SzmekAM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal BakkenAC_ARG_WITH(ntp-servers,
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal Bakken AS_HELP_STRING([--with-ntp-servers=NTPSERVERS],
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal Bakken [Space-separated list of default NTP servers]),
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal Bakken [NTP_SERVERS="$withval"],
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [NTP_SERVERS="time1.google.com time2.google.com time3.google.com time4.google.com"
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering AC_MSG_WARN([*** Using Google NTP servers.
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering Do not ship OSes or devices with these default settings.
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering See DISTRO_PORTING for details!])])
4f87c47b35cf9c1f58872559ae67a2656712fdd6William GiokasAC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers])
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart PoetteringAC_SUBST(NTP_SERVERS)
b8079ae19b41c9b61850c796dddc601b826850e0Kay SieversAC_ARG_WITH(time-epoch,
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers AS_HELP_STRING([--with-time-epoch=SECONDS],
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering [Time epoch for time clients]),
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [TIME_EPOCH="$withval"],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"])
bb061708d5aa83579f213bdfb67253f7027217c3Kay SieversAC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch])
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_WITH(system-uid-max,
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AS_HELP_STRING([--with-system-uid-max=UID]
a45a909fbbe11ad8c75cda5639d875476ac65453Christian Ruppert [Maximum UID for system users]),
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers [SYSTEM_UID_MAX="$withval"],
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering [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`"])
7f4e08056de0184b205a20632e62db73d299937eLennart PoetteringAC_DEFINE_UNQUOTED(SYSTEM_UID_MAX, [$SYSTEM_UID_MAX], [Maximum System UID])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_SUBST(SYSTEM_UID_MAX)
1271623839b5bb4f0f383a8ad5500462dda0a94aLennart Poettering# ------------------------------------------------------------------------------
816115863962548a9a0d9fbfe429c7f8e685beacRoberto SassuAC_ARG_WITH(system-gid-max,
1271623839b5bb4f0f383a8ad5500462dda0a94aLennart Poettering AS_HELP_STRING([--with-system-gid-max=GID]
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [Maximum GID for system groups]),
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering [SYSTEM_GID_MAX="$withval"],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [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`"])
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart PoetteringAC_SUBST(SYSTEM_GID_MAX)
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering# ------------------------------------------------------------------------------
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajnahave_localed=no
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poetteringif test "x$enable_localed" != "xno"; then
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok have_localed=yes
6351163bf3e519cc07adb2732d12450741f5a0d3Umut TezduyarAM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering# ------------------------------------------------------------------------------
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poetteringhave_coredump=no
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay SieversAC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringif test "x$enable_coredump" != "xno"; then
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna have_coredump=yes
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos VajnaAM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering# ------------------------------------------------------------------------------
e30431623a7d871da123cc37055ac49abf2c20eaTom GundersenAC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
f553b3b1074151200187df916427a1468186435eAnders Olofssonif test "x$enable_polkit" != "xno"; then
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_polkit=yes
8d7e170a5230753d8406276f8b5598e5bb6766e6Lennart PoetteringAM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmekif test "x$enable_resolved" != "xno"; then
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek have_resolved=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
b8079ae19b41c9b61850c796dddc601b826850e0Kay SieversAM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_WITH(dns-servers,
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [Space-separated list of default DNS servers]),
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers [DNS_SERVERS="$withval"],
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-SzmekAC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-SzmekAC_SUBST(DNS_SERVERS)
f2ec0646aba7c6703a6c79603957e805b74c3befZbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart PoetteringAC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-SzmekAS_IF([test "x$enable_networkd" != "xno"], [
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering have_networkd=yes
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD"
db059f1b031a92ed45b62d1036877abd9c128d1bMichael BieblAM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering# ------------------------------------------------------------------------------
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian RodríguezAC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
66be6554807773028a0111addb8e75c3cab11117Kay Sieversif test "x$enable_efi" != "xno"; then
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-SzmekAM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers# ------------------------------------------------------------------------------
AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
efiroot=$(echo $(cd /usr/lib/$(${EFI_CC} -print-multi-os-directory); pwd))
[EFI_LDS_DIR="$withval" && AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
[AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
[EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
[Path to /etc/rc.local]),
[RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
[Path to /usr/sbin/halt.local]),
[RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
[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}