configure.ac revision 2fd385c6703ef01fb52335179513392260add373
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering#
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# This file is part of systemd.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering#
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Copyright 2010-2012 Lennart Poettering
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Copyright 2010-2012 Kay Sievers
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering#
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#
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.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering#
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/>.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
4e949c11a1df4547d5f102e4131e07b026369cd7Javier JardónAC_PREREQ([2.64])
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón
4e949c11a1df4547d5f102e4131e07b026369cd7Javier JardónAC_INIT([systemd],
3b5b000fbc2ed6d953df2de528a50a8348afc618Lennart Poettering [227],
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón [http://github.com/systemd/systemd/issues],
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón [systemd],
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón [http://www.freedesktop.org/wiki/Software/systemd])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
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])
a80db8bd5f7f15859e8891aab9fc3694ce4cd0bdJavier Jardón
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.])
d59d0a2b4b41a75eaf618b26b8f8bd1e17de7e2bcee
d59d0a2b4b41a75eaf618b26b8f8bd1e17de7e2bceeAC_PROG_CC_C99
d59d0a2b4b41a75eaf618b26b8f8bd1e17de7e2bcee
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAX_COMPILER_VENDOR
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [
8666abb452db73d9a11ead61251eec42bc531cceKay Sievers AC_CHECK_TOOLS([AR], [gcc-ar ar], [:])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering AC_CHECK_TOOLS([NM], [gcc-nm nm], [:])
5e63ce78b5018ba612e794a610a6f13c5eefade7Cristian Rodríguez AC_CHECK_TOOLS([RANLIB], [gcc-ranlib ranlib], [:])
3d585edbb14b9705c80183aeb16dfd0a28df0ac9Lennart Poettering])
5e63ce78b5018ba612e794a610a6f13c5eefade7Cristian Rodríguez
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraLT_PREREQ(2.2)
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraLT_INIT([disable-static])
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraAS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraAS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart PoetteringSET_ARCH(X86_64, x86_64*)
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart PoetteringSET_ARCH(IA32, i*86*)
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart PoetteringSET_ARCH(MIPS, mips*)
3ce4fad8f548db9edb19869ea540e3192d2123f4Kay SieversSET_ARCH(AARCH64, aarch64*)
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart Poettering
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart Poettering# i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAS_IF([test x"$intltool_found" != xyes],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [AS_IF([test x"$enable_nls" = xyes],
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-Szmek [AC_MSG_ERROR([--enable-nls requested but intltool not found])],
92ec4495f76a7a2a6c31f5bb2a5240f78dcfe1d2Javier Jardón [AS_IF([test x"$enable_nls" != xno],
2d0efdf1af5ff77441228854343c61d42a89840cSamuli Suominen [AC_MSG_WARN([*** Disabling NLS support because intltool was not found])
2d0efdf1af5ff77441228854343c61d42a89840cSamuli Suominen enable_nls=no])
b51fc639f01ee6194af3e7e944a79accce474fe1Dave Reisner ])
2d0efdf1af5ff77441228854343c61d42a89840cSamuli Suominen ])
86b2e20a5e5abf222fb81edcb5d58d012e35cbaaLennart Poettering
2d0efdf1af5ff77441228854343c61d42a89840cSamuli SuominenAM_NLS
96ede2601f27cd5fe52eed96b873bef55cd0ce23Lennart PoetteringAS_IF([test x"$enable_nls" != xno -o "x$enable_polkit" != xno], [
2d0efdf1af5ff77441228854343c61d42a89840cSamuli Suominen # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
edeb68c53f1cdc452016b4c8512586a70b1262e3Tom GundersenIT_PROG_INTLTOOL([0.40.0])
2d0efdf1af5ff77441228854343c61d42a89840cSamuli Suominen])
7801356442578ff6e1c65844eb9e65c819af4660Zbigniew Jędrzejewski-Szmek
4acbce79798347cddf1e1d42e9be571e0a041873Zbigniew Jędrzejewski-SzmekAS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
4acbce79798347cddf1e1d42e9be571e0a041873Zbigniew Jędrzejewski-Szmek # If intltool is not available, provide a dummy rule to fail generation of %.policy files with a meaningful error message
80a5cbace45a6adbf2f9119edc5a4b10db493064Kay Sievers INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo " ITMRG " $@ && echo "*** intltool support required to build target $@" && false'
b37250d661ed67d07c734630617d73e64f6d7e49Zbigniew Jędrzejewski-Szmek AC_SUBST(INTLTOOL_POLICY_RULE)
b37250d661ed67d07c734630617d73e64f6d7e49Zbigniew Jędrzejewski-Szmek])
6581f00f7eabdaccf587a4b6af60ed4696dd2791Zbigniew Jędrzejewski-Szmek
6581f00f7eabdaccf587a4b6af60ed4696dd2791Zbigniew Jędrzejewski-SzmekGETTEXT_PACKAGE=systemd
92ec4495f76a7a2a6c31f5bb2a5240f78dcfe1d2Javier JardónAC_SUBST(GETTEXT_PACKAGE)
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-SzmekAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [systemd])
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-Szmek
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-SzmekAC_PROG_MKDIR_P
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-SzmekAC_PROG_LN_S
6e92b23f0d6dd398848376bbaf47e54a90ed3389Kay SieversAC_PROG_SED
0eaeca1f2373a323b98c86b47561d98e59c67b25Kay SieversAC_PROG_GREP
d66ee73a3dd7b5433fc0da3125bbdff740de7745Zbigniew Jędrzejewski-SzmekAC_PROG_AWK
d66ee73a3dd7b5433fc0da3125bbdff740de7745Zbigniew Jędrzejewski-Szmek
d66ee73a3dd7b5433fc0da3125bbdff740de7745Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([M4], [m4])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers
ac714a78fdca481488d88f84b6332d28083a4511Martin JansaAC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin])
ac714a78fdca481488d88f84b6332d28083a4511Martin JansaAC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin])
b62cfcea00862ccbf0e5e297f8a339f70987edefMichael Biebl
b62cfcea00862ccbf0e5e297f8a339f70987edefMichael BieblAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap], [$PATH:/usr/sbin:/sbin])
b62cfcea00862ccbf0e5e297f8a339f70987edefMichael Biebl
9a60da2834074d970ca063c210fe9d2f05c70532Thierry RedingAC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek
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-Szmek
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekM4_DEFINES=
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-SzmekAC_CHECK_TOOL(OBJCOPY, objcopy)
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-SzmekAC_CHECK_TOOL(STRINGS, strings)
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-SzmekAC_CHECK_TOOL(GPERF, gperf)
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmekif test -z "$GPERF" ; then
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek AC_MSG_ERROR([*** gperf not found])
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmekfi
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmekaddress_sanitizer_cflags=
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmekaddress_sanitizer_cppflags=
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmekaddress_sanitizer_ldflags=
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-SzmekAS_IF([test "x$enable_address_sanitizer" = "xyes"], [
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek AS_IF([test -z "$with_as_cflags"],
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
eb2e280f9c59b66965c9316eadc4c113a13ca744Lucas De Marchi address_sanitizer_cppflags="-DVALGRIND=1"
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering address_sanitizer_ldflags="-Wc,-fsanitize=address"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering ])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
27765dfc7a32d790badb29e6498b34edb0b60c33Lennart Poetteringundefined_sanitizer_cflags=
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringundefined_sanitizer_cppflags=
780040dc2a4b08a2c1fe5bd8db3a70e966c2acb3Kay Sieversundefined_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"],
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering [AC_MSG_ERROR([*** -fsanitize=undefined is not supported])])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering undefined_sanitizer_cflags="$with_us_cflags -fno-omit-frame-pointer -DVALGRIND=1"
03930e48636e86ad84946253ca2bf4f91deeb645Lennart Poettering undefined_sanitizer_cppflags="-DVALGRIND=1"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined"
693eb9a2d42d71445dad273a76e2470199d1dc5aLennart Poettering ])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart 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"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -pipe \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wall \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wextra \
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering -Wundef \
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wlogical-op \
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering -Wmissing-include-dirs \
8745297f9853c4a17bac69e1b7e652fe81bc1940Lennart Poettering -Wold-style-definition \
d200735e13c52dcfe36c0e066f9f6c2fbfb85a9cMichal Schmidt -Wpointer-arith \
213298fb822258bb69c6b85b7c8d7f019fd2306aLennart Poettering -Winit-self \
693eb9a2d42d71445dad273a76e2470199d1dc5aLennart Poettering -Wdeclaration-after-statement \
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering -Wfloat-equal \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wsuggest-attribute=noreturn \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Werror=missing-prototypes \
9f64229f9ca69f5652b238a67531432e56108bd6Zbigniew Jędrzejewski-Szmek -Werror=implicit-function-declaration \
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri -Werror=missing-declarations \
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri -Werror=return-type \
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri -Wstrict-prototypes \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -Wredundant-decls \
c1663b9daf5a43425e54bbe3daf6b10e64578f80Lennart Poettering -Wmissing-noreturn \
aca33b078cd32c5416a7fa3d5020a5d461c130eeCristian Rodríguez -Wshadow \
c1663b9daf5a43425e54bbe3daf6b10e64578f80Lennart Poettering -Wendif-labels \
b850b06e1efcc7e27cfd785759a3a913ac9ed196Kay Sievers -Wstrict-aliasing=2 \
b850b06e1efcc7e27cfd785759a3a913ac9ed196Kay Sievers -Wwrite-strings \
b850b06e1efcc7e27cfd785759a3a913ac9ed196Kay Sievers -Wno-unused-parameter \
b850b06e1efcc7e27cfd785759a3a913ac9ed196Kay Sievers -Wno-missing-field-initializers \
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek -Wno-unused-result \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -Wno-format-signedness \
03a170c03cd4a09721369ece48affb70d66c6b90Kay Sievers -Werror=overflow \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -Wdate-time \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -Wnested-externs \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -ffast-math \
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek -fno-common \
9e7adc3ae1133fa08a468768a490812299fad030Lucas De Marchi -fdiagnostics-show-option \
9e7adc3ae1133fa08a468768a490812299fad030Lucas De Marchi -fno-strict-aliasing \
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri -fvisibility=hidden \
9d2d0fe1e3f28a639c26b62391f79cfd1450d91bEvangelos Foutras -fstack-protector \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -fstack-protector-strong \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -fPIE \
39c4ead2323b45bbe9866e0f97fd8dcfb8a0bedeZbigniew Jędrzejewski-Szmek --param=ssp-buffer-size=4])
39c4ead2323b45bbe9866e0f97fd8dcfb8a0bedeZbigniew Jędrzejewski-Szmek
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-SzmekCC_CHECK_FLAG_APPEND([with_cflags], [CFLAGS], [-Werror=shadow], [
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering#include <time.h>
ccd06097c79218f7d5ea4c21721bbcbc7c467dcaZbigniew Jędrzejewski-Szmek#include <inttypes.h>
ccd06097c79218f7d5ea4c21721bbcbc7c467dcaZbigniew Jędrzejewski-Szmektypedef uint64_t usec_t;
1c231f56482546725c4dbd3303f70300bd3c63e9Lennart Poetteringusec_t now(clockid_t clock);
ccd06097c79218f7d5ea4c21721bbcbc7c467dcaZbigniew Jędrzejewski-Szmekint main(void) {
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek struct timespec now;
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek return 0;
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek}
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek])
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAS_CASE([$CC], [*clang*],
32dcef3ab1eb91ee469c3246ef859578dccd8a45Zbigniew Jędrzejewski-Szmek [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wno-typedef-redefinition \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wno-gnu-variable-sized-type-not-at-end \
32dcef3ab1eb91ee469c3246ef859578dccd8a45Zbigniew Jędrzejewski-Szmek ])])
32dcef3ab1eb91ee469c3246ef859578dccd8a45Zbigniew Jędrzejewski-Szmek
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -flto])],
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael BieblAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
1864b0e39505cd44a98eee61c97916b86491c0b4Zbigniew Jędrzejewski-Szmek -Wp,-D_FORTIFY_SOURCE=2])],
1864b0e39505cd44a98eee61c97916b86491c0b4Zbigniew Jędrzejewski-Szmek [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
1864b0e39505cd44a98eee61c97916b86491c0b4Zbigniew Jędrzejewski-SzmekAC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-SzmekAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
1864b0e39505cd44a98eee61c97916b86491c0b4Zbigniew Jędrzejewski-Szmek [CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -Wl,--gc-sections])],
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek [AC_MSG_RESULT([skipping --gc-sections, optimization not enabled])])
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-SzmekAC_SUBST([OUR_CFLAGS], "$with_ldflags $sanitizer_cflags")
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-SzmekAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -ffunction-sections -fdata-sections])],
f2ec0646aba7c6703a6c79603957e805b74c3befZbigniew Jędrzejewski-Szmek [AC_MSG_RESULT([skipping -ffunction/data-section, optimization not enabled])])
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekCC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wl,--as-needed \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wl,--no-undefined \
afea26ad7d406d8b6c95d2642cb5a1d807b87546Lennart Poettering -Wl,-z,relro \
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers -Wl,-z,now \
4b357e15876b730343db08719c877fdb45b6ad42Michael Marineau -pie \
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers -Wl,-fuse-ld=gold])
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay SieversAC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael BieblAC_CHECK_SIZEOF(pid_t)
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael BieblAC_CHECK_SIZEOF(uid_t)
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael BieblAC_CHECK_SIZEOF(gid_t)
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CHECK_SIZEOF(time_t)
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael BieblAC_CHECK_SIZEOF(dev_t)
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay SieversAC_CHECK_SIZEOF(rlim_t,,[
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers #include <sys/time.h>
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers #include <sys/resource.h>
fba1ea06bb5b653e9eb0cc1b6004af8da273a4abShawn Landden])
fba1ea06bb5b653e9eb0cc1b6004af8da273a4abShawn Landden
fba1ea06bb5b653e9eb0cc1b6004af8da273a4abShawn Landden# ------------------------------------------------------------------------------
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Biebl# we use python to build the man page index
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringhave_python=no
9388e99e208a6487b26dcbda86005ee9eba8d93dMichael OlbrichAC_ARG_WITH([python],
4db17f291c627c885de668200ff8cce2e57c933fZbigniew Jędrzejewski-Szmek [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
5f381b355a95b953654e46ba3ccdc81bdec165eaLennart Poettering
a8348796c0d39435b1c3d85ce6e95dad1ac85fecLennart Poetteringhave_lxml=no
9388e99e208a6487b26dcbda86005ee9eba8d93dMichael OlbrichAS_IF([test "x$with_python" != "xno"], [
3b794314149e40afaf3c456285e1e529747b6560Holger Schurig AM_PATH_PYTHON(,, [:])
5f381b355a95b953654e46ba3ccdc81bdec165eaLennart Poettering AS_IF([test "x$PYTHON" != "x:"], [
5f381b355a95b953654e46ba3ccdc81bdec165eaLennart Poettering AC_MSG_CHECKING([for python lxml module])
a8348796c0d39435b1c3d85ce6e95dad1ac85fecLennart Poettering AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes])
b237ef2cfac7ab0b33170809e8cb64628606207dTollef Fog Heen AC_MSG_RESULT([$have_lxml])
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes],
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering [AC_MSG_WARN([*** python support requires python-lxml module installed])])
2270309471213a3c960543e523130627e9cb10e2Kay Sievers ])
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-Szmek])
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-SzmekAS_IF([test "$have_python" != "yes"], [
8114dedc5910d9a9cec702f6b6658551a0cd9edeChengwei Yang AS_IF([test "$with_python" = "yes"],
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-Szmek [AC_MSG_ERROR([*** python support requested but python support not found])])
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-Szmek AS_IF([test "$with_python" != "no"],
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-Szmek [AC_MSG_WARN([*** python support not found, some documentation cannot be built])])
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-Szmek])
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-SzmekAM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
2270309471213a3c960543e523130627e9cb10e2Kay Sievers
4b357e15876b730343db08719c877fdb45b6ad42Michael Marineau# ------------------------------------------------------------------------------
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-Szmek
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekAC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekAC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekAC_CHECK_HEADERS([linux/btrfs.h], [], [])
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekAC_CHECK_HEADERS([linux/memfd.h], [], [])
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-Szmek
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-Szmek# unconditionally pull-in librt with old glibc versions
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekAC_SEARCH_LIBS([clock_gettime], [rt], [], [])
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-Szmek
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-Szmeksave_LIBS="$LIBS"
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekLIBS=
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenCAP_LIBS="$LIBS"
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAC_SUBST(CAP_LIBS)
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAC_CHECK_FUNCS([memfd_create])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAC_CHECK_FUNCS([__secure_getenv secure_getenv])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, kcmp, keyctl, key_serial_t, LO_FLAGS_PARTSCAN],
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen [], [], [[
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen#include <sys/types.h>
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen#include <unistd.h>
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen#include <sys/mount.h>
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen#include <fcntl.h>
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen#include <sched.h>
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen#include <linux/loop.h>
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen#include <linux/random.h>
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen]])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen IFLA_MACVLAN_FLAGS,
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen IFLA_IPVLAN_MODE,
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen IFLA_VTI_REMOTE,
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen IFLA_PHYS_PORT_ID,
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen IFLA_BOND_AD_INFO,
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen IFLA_VLAN_PROTOCOL,
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen IFLA_VXLAN_REMCSUM_NOPARTIAL,
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen IFLA_IPTUN_ENCAP_DPORT,
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen IFLA_GRE_ENCAP_DPORT,
e2ca86cf78f911a8be51f0224796e24883019139Dave Reisner IFLA_BRIDGE_VLAN_INFO,
e2ca86cf78f911a8be51f0224796e24883019139Dave Reisner IFLA_BRPORT_LEARNING_SYNC,
a18535d9e138c525d0443ec9f30a90b3e2184686Tom Gundersen IFLA_BR_PRIORITY,
e2ca86cf78f911a8be51f0224796e24883019139Dave Reisner NDA_IFINDEX,
70d8320978dcbce022d9acbb953a10a7aca049abDavid Strauss IFA_FLAGS],
e2ca86cf78f911a8be51f0224796e24883019139Dave Reisner[], [], [[
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen#include <inttypes.h>
c4955740969d7ba8ba43b024bca1a0a5b56eb8e8Tom Gundersen#include <netinet/in.h>
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen#include <netinet/ether.h>
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen#include <linux/rtnetlink.h>
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen#include <net/if.h>
f553b3b1074151200187df916427a1468186435eAnders Olofsson#include <linux/ip.h>
f553b3b1074151200187df916427a1468186435eAnders Olofsson#include <linux/if_tunnel.h>
f553b3b1074151200187df916427a1468186435eAnders Olofsson#include <linux/if_link.h>
f553b3b1074151200187df916427a1468186435eAnders Olofsson#include <linux/if_bridge.h>
f553b3b1074151200187df916427a1468186435eAnders Olofsson#include <linux/if_addr.h>
f553b3b1074151200187df916427a1468186435eAnders Olofsson#include <linux/neighbour.h>
f553b3b1074151200187df916427a1468186435eAnders Olofsson]])
f553b3b1074151200187df916427a1468186435eAnders Olofsson
f553b3b1074151200187df916427a1468186435eAnders Olofsson# This makes sure pkg.m4 is available.
f553b3b1074151200187df916427a1468186435eAnders Olofssonm4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
f553b3b1074151200187df916427a1468186435eAnders Olofsson
f553b3b1074151200187df916427a1468186435eAnders Olofsson# ------------------------------------------------------------------------------
728beb28a713709f521d374c9f8f3da781969d26Tom Gundersenhave_dbus=no
c0467cf387548dc98c0254f63553d862b35a84e5Ronny ChevalierAC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests]))
c0467cf387548dc98c0254f63553d862b35a84e5Ronny ChevalierAS_IF([test "x$enable_dbus" != "xno"], [
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2],
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes],
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier [have_dbus=no])
17df7223be064b1542dbe868e3b35cca977ee639Lennart Poettering AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"],
17df7223be064b1542dbe868e3b35cca977ee639Lennart Poettering [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
17df7223be064b1542dbe868e3b35cca977ee639Lennart PoetteringAM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier# ------------------------------------------------------------------------------
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalierhave_utmp=yes
c0467cf387548dc98c0254f63553d862b35a84e5Ronny ChevalierAC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier AS_CASE("x${enableval}",
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier [xyes], [have_utmp=yes],
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier [xno], [have_utmp=no],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
816115863962548a9a0d9fbfe429c7f8e685beacRoberto SassuAS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
816115863962548a9a0d9fbfe429c7f8e685beacRoberto SassuAM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu# ------------------------------------------------------------------------------
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassuhave_compat_libs=no
816115863962548a9a0d9fbfe429c7f8e685beacRoberto SassuAC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu [case "${enableval}" in
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu yes) have_compat_libs=yes ;;
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu no) have_compat_libs=no ;;
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libs) ;;
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu esac],
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu [have_compat_libs=no])
816115863962548a9a0d9fbfe429c7f8e685beacRoberto SassuAM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"])
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering# ------------------------------------------------------------------------------
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poetteringhave_coverage=no
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart PoetteringAC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poetteringif test "x$enable_coverage" = "xyes" ; then
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering if test "x$lcov_found" = xno ; then
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering AC_MSG_ERROR([*** lcov support requested but the program was not found])
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering else
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering else
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering have_coverage=yes
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering -fprofile-arcs \
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering -ftest-coverage])
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers fi
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering fi
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poetteringfi
591622d7efbc828f00f190d91b6608148b967ff5Lennart PoetteringAM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
3f8cc098d218525710e5cbad9adf37001d3b6060Jan Engelhardt
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poettering# ------------------------------------------------------------------------------
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poetteringhave_kmod=no
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart PoetteringAC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poetteringif test "x$enable_kmod" != "xno"; then
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering if test "x$have_kmod" = "xyes"; then
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering AC_MSG_ERROR([*** kmod version >= 15 not found]))
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez fi
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer AC_MSG_ERROR([*** kmod support requested, but libraries not found])
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer fi
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Schererfi
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael SchererAM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer# ------------------------------------------------------------------------------
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Schererhave_xkbcommon=no
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael SchererAC_ARG_ENABLE(xkbcommon, AS_HELP_STRING([--disable-xkbcommon], [disable xkbcommon keymap support]))
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Schererif test "x$enable_xkbcommon" != "xno"; then
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer PKG_CHECK_MODULES(XKBCOMMON, [ xkbcommon >= 0.3.0 ],
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer [AC_DEFINE(HAVE_XKBCOMMON, 1, [Define if libxkbcommon is available]) have_xkbcommon=yes], have_xkbcommon=no)
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer if test "x$have_xkbcommon" = xno -a "x$enable_xkbcommon" = xyes; then
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer AC_MSG_ERROR([*** xkbcommon support requested but libraries not found])
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer fi
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguezfi
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian RodríguezAM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez# ------------------------------------------------------------------------------
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguezhave_blkid=no
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian RodríguezAC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
5ec6b15b65304d94dc1c8cbad05c8b996b470d3aKay Sieversif test "x$enable_blkid" != "xno"; then
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh PKG_CHECK_MODULES(BLKID, [ blkid >= 2.24 ],
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez AC_MSG_ERROR([*** blkid support requested but libraries not found])
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez fi
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguezfi
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian RodríguezAM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_libmount=no
807e17f05e217b474af39503efb9503d81b12596Lennart PoetteringPKG_CHECK_MODULES(MOUNT, [ mount >= 2.27 ],
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering [AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available]) have_libmount=yes], have_libmount=no)
807e17f05e217b474af39503efb9503d81b12596Lennart Poetteringif test "x$have_libmount" = xno; then
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering AC_MSG_ERROR([*** libmount support required but libraries not found])
807e17f05e217b474af39503efb9503d81b12596Lennart Poetteringfi
807e17f05e217b474af39503efb9503d81b12596Lennart PoetteringAM_CONDITIONAL(HAVE_LIBMOUNT, [test "$have_libmount" = "yes"])
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering# ------------------------------------------------------------------------------
807e17f05e217b474af39503efb9503d81b12596Lennart Poetteringhave_seccomp=no
807e17f05e217b474af39503efb9503d81b12596Lennart PoetteringAC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support]))
807e17f05e217b474af39503efb9503d81b12596Lennart Poetteringif test "x$enable_seccomp" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering have_seccomp=yes
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [have_seccomp=no])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_MSG_ERROR([*** seccomp support requested but libraries not found])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering fi
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringfi
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering# ------------------------------------------------------------------------------
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringhave_ima=yes
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [case "${enableval}" in
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering yes) have_ima=yes ;;
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering no) have_ima=no ;;
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering esac],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [have_ima=yes])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringif test "x${have_ima}" != xno ; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringfi
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering# ------------------------------------------------------------------------------
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringhave_selinux=no
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringif test "x$enable_selinux" != "xno"; then
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poettering PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
812cce323db081634f37e4ec6d29f2b9328a3f52Lennart Poettering [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available])
812cce323db081634f37e4ec6d29f2b9328a3f52Lennart Poettering have_selinux=yes
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [have_selinux=no])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_MSG_ERROR([*** SELinux support requested but libraries not found])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering fi
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringfi
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poetteringhave_apparmor=no
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_ARG_ENABLE(apparmor, AS_HELP_STRING([--disable-apparmor], [Disable optional AppArmor support]))
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poetteringif test "x$enable_apparmor" != "xno"; then
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering PKG_CHECK_MODULES([APPARMOR], [libapparmor],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [AC_DEFINE(HAVE_APPARMOR, 1, [Define if AppArmor is available])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering have_apparmor=yes
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_APPARMOR"],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [have_apparmor=no])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering if test "x$have_apparmor" = xno -a "x$enable_apparmor" = xyes; then
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AC_MSG_ERROR([*** AppArmor support requested but libraries not found])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering fi
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poetteringfi
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_ARG_WITH(debug-shell,
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AS_HELP_STRING([--with-debug-shell=PATH],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [Path to debug shell binary]),
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [SUSHELL="$withval"],[
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_SUBST(SUSHELL)
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_ARG_WITH([debug-tty],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AS_HELP_STRING([--with-debug-tty=PATH],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [Specify the tty device for debug shell]),
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [DEBUGTTY="$withval"],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [DEBUGTTY=/dev/tty9])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_SUBST(DEBUGTTY)
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_ARG_WITH([certificate-root],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AS_HELP_STRING([--with-certificate-root=PATH],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [Specify the prefix for TLS certificates [/etc/ssl]]),
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [CERTIFICATEROOT="$withval"],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [CERTIFICATEROOT="/etc/ssl"])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_SUBST(CERTIFICATEROOT)
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering# ------------------------------------------------------------------------------
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poetteringhave_xz=no
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poetteringif test "x$enable_xz" != "xno"; then
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering PKG_CHECK_MODULES(XZ, [ liblzma ],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering AC_MSG_ERROR([*** XZ support requested but libraries not found])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering fi
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poetteringfi
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering# ------------------------------------------------------------------------------
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poetteringhave_zlib=no
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib], [Disable optional ZLIB support]))
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poetteringif test "x$enable_zlib" != "xno"; then
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering PKG_CHECK_MODULES(ZLIB, [ zlib ],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available]) have_zlib=yes], have_zlib=no)
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering if test "x$have_zlib" = xno -a "x$enable_zlib" = xyes; then
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering AC_MSG_ERROR([*** ZLIB support requested but libraries not found])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering fi
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poetteringfi
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAM_CONDITIONAL(HAVE_ZLIB, [test "$have_zlib" = "yes"])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering# ------------------------------------------------------------------------------
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poetteringhave_bzip2=no
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_ARG_ENABLE(bzip2, AS_HELP_STRING([--enable-bzip2], [Disable optional BZIP2 support]))
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAS_IF([test "x$enable_bzip2" != "xno"], [
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering AC_CHECK_HEADERS(bzlib.h,
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [AC_DEFINE(HAVE_BZIP2, 1, [Define in BZIP2 is available])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering have_bzip2=yes],
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [AS_IF([test "x$have_bzip2" = xyes], [AC_MSG_ERROR([*** BZIP2 support requested but headers not found])])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering ])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski# ------------------------------------------------------------------------------
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowskihave_lz4=no
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAC_ARG_ENABLE(lz4, AS_HELP_STRING([--enable-lz4], [Enable optional LZ4 support]))
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAS_IF([test "x$enable_lz4" = "xyes"], [
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski AC_CHECK_HEADERS(lz4.h,
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) have_lz4=yes],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [AC_MSG_ERROR([*** LZ4 support requested but headers not found])])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAM_CONDITIONAL(HAVE_LZ4, [test "$have_lz4" = "yes"])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAM_CONDITIONAL(HAVE_COMPRESSION, [test "$have_xz" = "yes" -o "$have_lz4" = "yes"])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski# ------------------------------------------------------------------------------
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAC_ARG_ENABLE([pam],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [case "${enableval}" in
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski yes) have_pam=yes ;;
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poettering no) have_pam=no ;;
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski esac],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [have_pam=auto])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kokif test "x${have_pam}" != xno ; then
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok AC_CHECK_HEADERS(
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok [have_pam=yes],
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok [if test "x$have_pam" = xyes ; then
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok AC_MSG_ERROR([*** PAM headers not found.])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski fi])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski AC_CHECK_LIB(
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [pam],
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [pam_syslog],
feb12d3ed2c7f9132c64773c7c41b9e3a608a814Lennart Poettering [have_pam=yes],
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [if test "x$have_pam" = xyes ; then
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AC_MSG_ERROR([*** libpam not found.])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering fi])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering if test "x$have_pam" = xyes ; then
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering PAM_LIBS="-lpam -lpam_misc"
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AC_DEFINE(HAVE_PAM, 1, [PAM available])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_PAM"
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering else
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering have_pam=no
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering fi
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poetteringelse
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering PAM_LIBS=
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poetteringfi
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAC_SUBST(PAM_LIBS)
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering# ------------------------------------------------------------------------------
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAC_ARG_ENABLE([acl],
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [case "${enableval}" in
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering yes) have_acl=yes ;;
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering no) have_acl=no ;;
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering esac],
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [have_acl=auto])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poetteringif test "x${have_acl}" != xno ; then
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AC_CHECK_HEADERS(
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [sys/acl.h acl/libacl.h],
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [have_acl=yes],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [if test "x$have_acl" = xyes ; then
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering AC_MSG_ERROR([*** ACL headers not found.])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering fi])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering AC_CHECK_LIB(
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [acl],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [acl_get_file],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [have_acl=yes],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [if test "x$have_acl" = xyes ; then
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering AC_MSG_ERROR([*** libacl not found.])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering fi])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering if test "x$have_acl" = xyes ; then
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering ACL_LIBS="-lacl"
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering AC_DEFINE(HAVE_ACL, 1, [ACL available])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_ACL"
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering else
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering have_acl=no
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering fi
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poetteringelse
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering ACL_LIBS=
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poetteringfi
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAC_SUBST(ACL_LIBS)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering# ------------------------------------------------------------------------------
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [case "${enableval}" in
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering yes) have_smack=yes ;;
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering no) have_smack=no ;;
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering esac],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [have_smack=auto])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poetteringif test "x${have_smack}" = xauto; then
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_SMACK"
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering have_smack=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversfi
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering
7f4e08056de0184b205a20632e62db73d299937eLennart Poetteringhave_smack_run_label=no
7f4e08056de0184b205a20632e62db73d299937eLennart PoetteringAC_ARG_WITH(smack-run-label,
8cf3ca80680b43015971cbbf4625517ae859d50cJan JanssenAS_HELP_STRING([--with-smack-run-label=STRING],
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [run systemd --system itself with a specific SMACK label]),
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run systemd itself with SMACK label]) have_smack_run_label=yes],
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering [])
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering
7f4e08056de0184b205a20632e62db73d299937eLennart Poetteringif test "x${have_smack_run_label}" = xyes; then
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_SMACK_RUN_LABEL"
7f4e08056de0184b205a20632e62db73d299937eLennart Poetteringfi
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart PoetteringAC_ARG_WITH(smack-default-process-label,
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart PoetteringAS_HELP_STRING([--with-smack-default-process-label=STRING],
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering [default SMACK label for executed processes]),
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering [AC_DEFINE_UNQUOTED(SMACK_DEFAULT_PROCESS_LABEL, ["$withval"], [Default SMACK label for executed processes])],
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering [])
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poetteringif test "x${have_smack}" = xyes ; then
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poetteringfi
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart PoetteringAM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"])
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering# ------------------------------------------------------------------------------
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart PoetteringAC_ARG_ENABLE([gcrypt],
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
3f573096641cf3d350c8779971c644ca74aab93aZbigniew Jędrzejewski-Szmek [case "${enableval}" in
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering yes) have_gcrypt=yes ;;
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering no) have_gcrypt=no ;;
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering esac],
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering [have_gcrypt=auto])
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poetteringif test "x${have_gcrypt}" != xno ; then
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek m4_define([AM_PATH_LIBGCRYPT_FAIL],
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek [{ test "x$have_gcrypt" != xyes || AC_MSG_ERROR([*** GCRYPT headers not found.]); }]
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek )
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek m4_ifdef([AM_PATH_LIBGCRYPT], [AM_PATH_LIBGCRYPT(
f12be7e8ca278a5a207d0fd051acec700b804a7aZbigniew Jędrzejewski-Szmek [1.4.5],
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek [have_gcrypt=yes],
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek dnl If we have the gcrypt m4 macros, but don't have
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek dnl gcrypt, throw an error if gcrypt is explicitly
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek dnl requested.
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek [AM_PATH_LIBGCRYPT_FAIL]
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek )],
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek dnl If we don't have the gcrypt m4 macros, but build with
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers dnl gcrypt explicitly requested, throw an error.
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna [AM_PATH_LIBGCRYPT_FAIL]
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna )
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers if test "x$have_gcrypt" = xyes ; then
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna GCRYPT_LIBS="$LIBGCRYPT_LIBS"
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers else
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering have_gcrypt=no
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering fi
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poetteringelse
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers GCRYPT_LIBS=
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering GCRYPT_CFLAGS=
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poetteringfi
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAC_SUBST(GCRYPT_LIBS)
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_SUBST(GCRYPT_CFLAGS)
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering# ------------------------------------------------------------------------------
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay SieversAC_ARG_ENABLE([audit],
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering [case "${enableval}" in
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering yes) have_audit=yes ;;
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok no) have_audit=no ;;
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok esac],
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok [have_audit=auto])
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kokif test "x${have_audit}" != xno ; then
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok AC_CHECK_HEADERS(
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok [libaudit.h],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [have_audit=yes],
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering [if test "x$have_audit" = xyes ; then
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering AC_MSG_ERROR([*** AUDIT headers not found.])
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering fi])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering AC_CHECK_LIB(
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering [audit],
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering [audit_open],
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar [have_audit=yes],
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar [if test "x$have_audit" = xyes ; then
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar AC_MSG_ERROR([*** libaudit not found.])
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar fi])
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar if test "x$have_audit" = xyes ; then
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar AUDIT_LIBS="-laudit"
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers else
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering have_audit=no
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering fi
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poetteringelse
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers AUDIT_LIBS=
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poetteringfi
4de856120f252e7aa19c923c10fbf23310d623aaLennart PoetteringAC_SUBST(AUDIT_LIBS)
4de856120f252e7aa19c923c10fbf23310d623aaLennart PoetteringAM_CONDITIONAL([HAVE_AUDIT], [test "x$have_audit" != xno])
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering# ------------------------------------------------------------------------------
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart PoetteringAC_ARG_ENABLE([elfutils],
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering AS_HELP_STRING([--disable-elfutils],[Disable optional ELFUTILS support]),
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering [case "${enableval}" in
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering yes) have_elfutils=yes ;;
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering no) have_elfutils=no ;;
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-elfutils) ;;
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering esac],
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering [have_elfutils=auto])
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poetteringif test "x${have_elfutils}" != xno ; then
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering AC_CHECK_HEADERS(
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering [elfutils/libdwfl.h],
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering [],
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering [if test "x$have_elfutils" = xyes ; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** ELFUTILS headers not found.])
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers fi])
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers AC_CHECK_LIB(
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers [dw],
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers [dwfl_begin],
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers [],
4c80c73c2b804576b1de27e644c1da4dab2f9026Kay Sievers [if test "x$have_elfutils" = xyes ; then
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers AC_MSG_ERROR([*** ELFUTILS libs not found.])
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering fi])
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering AC_CHECK_LIB(
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering [dw],
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering [dwfl_core_file_attach],
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering [have_elfutils=yes],
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering [if test "x$have_elfutils" = xyes ; then
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering AC_MSG_ERROR([*** ELFUTILS >= 158 is required.])
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering fi])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna if test "x$have_elfutils" = xyes ; then
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna ELFUTILS_LIBS="-lelf -ldw"
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers else
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna have_elfutils=no
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna fi
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajnaelse
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers ELFUTILS_LIBS=
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajnafi
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos VajnaAC_SUBST(ELFUTILS_LIBS)
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos VajnaAM_CONDITIONAL(HAVE_ELFUTILS, [test "$have_elfutils" = "yes"])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna# ------------------------------------------------------------------------------
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajnahave_libcryptsetup=no
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos VajnaAC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_libcryptsetup" != "xno"; then
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sievers PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sievers [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
43ba1b3e642253652cc29c92903cf53e310ce6cbLennart Poettering if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sievers AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sievers fi
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sieversfi
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay SieversAM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering# ------------------------------------------------------------------------------
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poetteringhave_qrencode=no
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart PoetteringAC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poetteringif test "x$enable_qrencode" != "xno"; then
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering AC_MSG_ERROR([*** qrencode support requested but libraries not found])
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sievers fi
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajnafi
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos VajnaAM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers# ------------------------------------------------------------------------------
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajnahave_microhttpd=no
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos VajnaAC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajnaif test "x$enable_microhttpd" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33],
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers fi
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poetteringfi
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart PoetteringAM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering# ------------------------------------------------------------------------------
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poetteringhave_gnutls=no
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart PoetteringAC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support]))
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poetteringif test "x$enable_gnutls" != "xno"; then
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.1.4],
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering [AC_DEFINE(HAVE_GNUTLS, 1, [Define if gnutls is available]) have_gnutls=yes], have_gnutls=no)
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering if test "x$have_gnutls" = xno -a "x$enable_gnutls" = xyes; then
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering AC_MSG_ERROR([*** gnutls support requested but libraries not found])
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering fi
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Waltersfi
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin WaltersAM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"])
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters# ------------------------------------------------------------------------------
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Waltershave_libcurl=no
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin WaltersAC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support]))
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Waltersif test "x$enable_libcurl" != "xno"; then
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters PKG_CHECK_MODULES(LIBCURL, [libcurl],
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no)
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering AC_MSG_ERROR([*** libcurl support requested but libraries not found])
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering fi
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poetteringfi
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart PoetteringAM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering# ------------------------------------------------------------------------------
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poetteringhave_libidn=no
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support]))
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmekif test "x$enable_libidn" != "xno"; then
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmek PKG_CHECK_MODULES(LIBIDN, [libidn],
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmek [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available])
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmek have_libidn=yes
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmek M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"],
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmek [have_libidn=no])
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmek if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poettering AC_MSG_ERROR([*** libidn support requested but libraries not found])
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poettering fi
c97a6dbcf10990bcc2455e842a41bf14b01f358dLukasz Skalskifi
146ccaafd5c9d4f2798240b049f595f70f45f77bDave ReisnerAM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poettering
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poettering# ------------------------------------------------------------------------------
4acbce79798347cddf1e1d42e9be571e0a041873Zbigniew Jędrzejewski-Szmekhave_libiptc=no
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart PoetteringAC_ARG_ENABLE(libiptc, AS_HELP_STRING([--disable-libiptc], [Disable optional LIBIPTC support]))
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poetteringif test "x$enable_libiptc" != "xno"; then
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poettering PKG_CHECK_MODULES(LIBIPTC, [libiptc],
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering [AC_DEFINE(HAVE_LIBIPTC, 1, [Define if libiptc is available])
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering have_libiptc=yes
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_LIBIPTC"],
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering [have_libiptc=no])
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering if test "x$have_libiptc" = "xno" -a "x$enable_libiptc" = "xyes"; then
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering AC_MSG_ERROR([*** libiptc support requested but libraries not found])
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering fi
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringfi
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAM_CONDITIONAL(HAVE_LIBIPTC, [test "$have_libiptc" = "yes"])
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering# ------------------------------------------------------------------------------
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poetteringhave_binfmt=no
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringif test "x$enable_binfmt" != "xno"; then
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering have_binfmt=yes
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringfi
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering# ------------------------------------------------------------------------------
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringhave_vconsole=no
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringif test "x$enable_vconsole" != "xno"; then
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering have_vconsole=yes
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringfi
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering# ------------------------------------------------------------------------------
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringhave_bootchart=no
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringif test "x$enable_bootchart" != "xno"; then
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering have_bootchart=yes
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringfi
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering# ------------------------------------------------------------------------------
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringhave_quotacheck=no
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringif test "x$enable_quotacheck" != "xno"; then
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguez have_quotacheck=yes
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguezfi
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian RodríguezAM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguez
abaaabf40a9891014ed4c402d7beb5a67ac256b1Lennart Poettering# ------------------------------------------------------------------------------
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguezhave_tmpfiles=no
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian RodríguezAC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguezif test "x$enable_tmpfiles" != "xno"; then
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguez have_tmpfiles=yes
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguezfi
54b434b1b5055f934230fe04fad35b01642b8488Lennart PoetteringAM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
7211f918ba2b86e0041413b47d51d7593e73cf5dLennart Poettering
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen# ------------------------------------------------------------------------------
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenhave_sysusers=no
f8c5a5815ff7c137d9a1e5d7b48a6532b9f31407Lennart PoetteringAC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support]))
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenif test "x$enable_sysusers" != "xno"; then
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen have_sysusers=yes
a3b6fafed441d96380a3f089118f7486d6aa3126Lennart Poetteringfi
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen# ------------------------------------------------------------------------------
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenhave_firstboot=no
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAC_ARG_ENABLE(firstboot, AS_HELP_STRING([--disable-firstboot], [disable firstboot support]))
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenif test "x$enable_firstboot" != "xno"; then
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen have_firstboot=yes
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenfi
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAM_CONDITIONAL(ENABLE_FIRSTBOOT, [test "$have_firstboot" = "yes"])
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen# ------------------------------------------------------------------------------
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenhave_randomseed=no
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_randomseed" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_randomseed=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversfi
a3bd8447be4ea2ce230eb8ae0e815c04d85fa15aTom GundersenAM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
a3bd8447be4ea2ce230eb8ae0e815c04d85fa15aTom Gundersen
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_backlight=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_backlight" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_backlight=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversfi
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_rfkill=no
a3bd8447be4ea2ce230eb8ae0e815c04d85fa15aTom GundersenAC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools]))
d8d4bee76cf3b40ea923bc57d44aa0815ca9b5ffKay Sieversif test "x$enable_rfkill" != "xno"; then
a3bd8447be4ea2ce230eb8ae0e815c04d85fa15aTom Gundersen have_rfkill=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversfi
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_logind=no
de1c301ed165eb4d04a0c9d4babe97912b5233bbLennart PoetteringAC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_logind" != "xno"; then
de1c301ed165eb4d04a0c9d4babe97912b5233bbLennart Poettering have_logind=yes
de1c301ed165eb4d04a0c9d4babe97912b5233bbLennart Poetteringfi
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
75db9a77605b33a1b9355eae957f26380441fce6Lennart PoetteringAS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
4c2b0e4e423fe73fafef10a5efa6fb778784cebcLennart Poettering
4ca39b280fce3c60d2fdecbd478fd9bf7f9d3e64Mike Gilbert# ------------------------------------------------------------------------------
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-Szmekhave_machined=no
75db9a77605b33a1b9355eae957f26380441fce6Lennart PoetteringAC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_machined" != "xno"; then
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering have_machined=yes
34eff652cedec3cac34b92629ead5f140334b689Lennart Poetteringfi
34eff652cedec3cac34b92629ead5f140334b689Lennart PoetteringAM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
f1dd0c3f9b4a257e81ff9c6a08070c702a0db45aLennart PoetteringAS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen# ------------------------------------------------------------------------------
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievershave_importd=no
bc2708414babc5c99bb8000e63c84e87606cc15dLennart PoetteringAC_ARG_ENABLE(importd, AS_HELP_STRING([--disable-importd], [disable import daemon]))
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sieversif test "x$enable_importd" != "xno"; then
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers have_importd=yes
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heenfi
dee4c244254bb49d1ffa8bd7171ae9cce596d2d0Lennart PoetteringAM_CONDITIONAL(ENABLE_IMPORTD, [test "$have_importd" = "yes"])
dee4c244254bb49d1ffa8bd7171ae9cce596d2d0Lennart PoetteringAS_IF([test "$have_importd" = "yes"], [ AC_DEFINE(HAVE_IMPORTD, [1], [Importd support available]) ])
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen# ------------------------------------------------------------------------------
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heenhave_hostnamed=no
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog HeenAC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncioif test "x$enable_hostnamed" != "xno"; then
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio have_hostnamed=yes
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidênciofi
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart PoetteringAM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio
dee4c244254bb49d1ffa8bd7171ae9cce596d2d0Lennart Poettering# ------------------------------------------------------------------------------
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidênciohave_timedated=no
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioAC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncioif test "x$enable_timedated" != "xno"; then
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio have_timedated=yes
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poetteringfi
bc2708414babc5c99bb8000e63c84e87606cc15dLennart PoetteringAM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering# ------------------------------------------------------------------------------
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poetteringhave_timesyncd=no
bc2708414babc5c99bb8000e63c84e87606cc15dLennart PoetteringAC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poetteringif test "x$enable_timesyncd" != "xno"; then
a05ea46dc788929bc8b13afb4208ca29cad68572Michael Biebl have_timesyncd=yes
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poettering M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD"
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poetteringfi
bef2733fae665e880da6ea011b1f918e6900bb42Lennart PoetteringAM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_ARG_WITH(ntp-servers,
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering AS_HELP_STRING([--with-ntp-servers=NTPSERVERS],
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [Space-separated list of default NTP servers]),
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael Biebl [NTP_SERVERS="$withval"],
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart 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!])])
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael Biebl
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart PoetteringAC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_SUBST(NTP_SERVERS)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_ARG_WITH(time-epoch,
03c149144d374cffd40a17ffb067837e3e220933Michael Biebl AS_HELP_STRING([--with-time-epoch=SECONDS],
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart Poettering [Time epoch for time clients]),
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [TIME_EPOCH="$withval"],
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
03c149144d374cffd40a17ffb067837e3e220933Michael BieblAC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch])
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart Poettering
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl# ------------------------------------------------------------------------------
db059f1b031a92ed45b62d1036877abd9c128d1bMichael BieblAC_ARG_WITH(system-uid-max,
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl AS_HELP_STRING([--with-system-uid-max=UID]
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael Biebl [Maximum UID for system users]),
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael Biebl [SYSTEM_UID_MAX="$withval"],
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl [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`"])
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl
db059f1b031a92ed45b62d1036877abd9c128d1bMichael BieblAC_DEFINE_UNQUOTED(SYSTEM_UID_MAX, [$SYSTEM_UID_MAX], [Maximum System UID])
db059f1b031a92ed45b62d1036877abd9c128d1bMichael BieblAC_SUBST(SYSTEM_UID_MAX)
4f87c47b35cf9c1f58872559ae67a2656712fdd6William Giokas
4f87c47b35cf9c1f58872559ae67a2656712fdd6William Giokas# ------------------------------------------------------------------------------
4f87c47b35cf9c1f58872559ae67a2656712fdd6William GiokasAC_ARG_WITH(system-gid-max,
4f87c47b35cf9c1f58872559ae67a2656712fdd6William Giokas AS_HELP_STRING([--with-system-gid-max=GID]
b8079ae19b41c9b61850c796dddc601b826850e0Kay Sievers [Maximum GID for system groups]),
b8079ae19b41c9b61850c796dddc601b826850e0Kay Sievers [SYSTEM_GID_MAX="$withval"],
39ad55a9aa99451f982628af6e14581092b2d2f6Kay Sievers [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`"])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay SieversAC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay SieversAC_SUBST(SYSTEM_GID_MAX)
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers# ------------------------------------------------------------------------------
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievershave_localed=no
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay SieversAC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
b0cca7d886583a10b9342796b4619eca4d582cb2Michael Bieblif test "x$enable_localed" != "xno"; then
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay Sievers have_localed=yes
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay Sieversfi
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay SieversAM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmek
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmekhave_coredump=no
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmekif test "x$enable_coredump" != "xno"; then
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny have_coredump=yes
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górnyfi
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyAM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny# ------------------------------------------------------------------------------
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górnyhave_polkit=no
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyAC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górnyif test "x$enable_polkit" != "xno"; then
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny have_polkit=yes
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poetteringfi
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyAM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmekhave_resolved=no
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmekif test "x$enable_resolved" != "xno"; then
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmek have_resolved=yes
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmek M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmekfi
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal BakkenAM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal Bakken
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal BakkenAC_ARG_WITH(dns-servers,
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal Bakken AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal Bakken [Space-separated list of default DNS servers]),
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [DNS_SERVERS="$withval"],
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
db059f1b031a92ed45b62d1036877abd9c128d1bMichael BieblAC_SUBST(DNS_SERVERS)
4f87c47b35cf9c1f58872559ae67a2656712fdd6William Giokas
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering# ------------------------------------------------------------------------------
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmekhave_networkd=no
b8079ae19b41c9b61850c796dddc601b826850e0Kay SieversAC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay SieversAS_IF([test "x$enable_networkd" != "xno"], [
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_networkd=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD"
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers])
bb061708d5aa83579f213bdfb67253f7027217c3Kay SieversAM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_efi=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
a45a909fbbe11ad8c75cda5639d875476ac65453Christian Ruppertif test "x$enable_efi" != "xno"; then
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering have_efi=yes
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poetteringfi
7f4e08056de0184b205a20632e62db73d299937eLennart PoetteringAM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
1271623839b5bb4f0f383a8ad5500462dda0a94aLennart Poettering# ------------------------------------------------------------------------------
816115863962548a9a0d9fbfe429c7f8e685beacRoberto SassuAC_CHECK_TOOL(EFI_CC, gcc)
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer
1271623839b5bb4f0f383a8ad5500462dda0a94aLennart PoetteringEFI_ARCH=`echo $host | sed "s/\(-\).*$//"`
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAM_COND_IF(ARCH_IA32, [
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering EFI_ARCH=ia32
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering EFI_MACHINE_TYPE_NAME=ia32])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAM_COND_IF(ARCH_X86_64, [
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering EFI_MACHINE_TYPE_NAME=x64])
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart PoetteringAM_COND_IF(ARCH_AARCH64, [
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek EFI_MACHINE_TYPE_NAME=aa64])
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAC_SUBST([EFI_ARCH])
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAC_SUBST([EFI_MACHINE_TYPE_NAME])
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poetteringhave_gnuefi=no
6351163bf3e519cc07adb2732d12450741f5a0d3Umut TezduyarAC_ARG_ENABLE(gnuefi, AS_HELP_STRING([--enable-gnuefi], [Disable optional gnuefi support]))
4de856120f252e7aa19c923c10fbf23310d623aaLennart PoetteringAS_IF([test "x$enable_gnuefi" != "xno"], [
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering [AC_DEFINE(HAVE_GNUEFI, 1, [Define if gnuefi is available])
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers have_gnuefi=yes],
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering [AS_IF([test "x$enable_gnuefi" = xyes],
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna [AC_MSG_ERROR([*** gnuefi support requested but headers not found])])
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna ])
a91df40e69fec72cc98c9829721fa5153da28bc2Kay Sievers
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering efiroot=$(echo $(cd /usr/lib/$(${EFI_CC} -print-multi-os-directory); pwd))
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna
7a243b22041595a0c7e0dffb3ef5e2158dde933fJason A. Donenfeld EFI_LIB_DIR="$efiroot"
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering AC_ARG_WITH(efi-libdir,
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering AS_HELP_STRING([--with-efi-libdir=PATH], [Path to EFI lib directory]),
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering [EFI_LIB_DIR="$withval"], [EFI_LIB_DIR="$efiroot"]
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen )
f553b3b1074151200187df916427a1468186435eAnders Olofsson AC_SUBST([EFI_LIB_DIR])
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-Szmek
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen have_efi_lds=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_ARG_WITH(efi-ldsdir,
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmek [EFI_LDS_DIR="$withval" && AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poettering [have_efi_lds=yes])],
8d7e170a5230753d8406276f8b5598e5bb6766e6Lennart Poettering [AS_FOR([DIR], [EFI_LDS_DIR], ["${EFI_LIB_DIR}/gnuefi" "${EFI_LIB_DIR}"],
8d7e170a5230753d8406276f8b5598e5bb6766e6Lennart Poettering [AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek [have_efi_lds=yes && break])])])
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek AS_IF([test "x$have_efi_lds" = xyes],
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen [AC_SUBST([EFI_LDS_DIR])],
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek [AS_IF([test "x$enable_gnuefi" = xyes],
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek [AC_MSG_ERROR([*** gnuefi support requested but files not found])],
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-Szmek [have_gnuefi=no])])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering AC_ARG_WITH(efi-includedir,
b8079ae19b41c9b61850c796dddc601b826850e0Kay Sievers AS_HELP_STRING([--with-efi-includedir=PATH], [Path to EFI include directory]),
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers )
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_SUBST([EFI_INC_DIR])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers])
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay SieversAM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmekhave_kdbus=no
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(kdbus, AS_HELP_STRING([--disable-kdbus], [do not connect to kdbus by default]))
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmekif test "x$enable_kdbus" != "xno"; then
f2ec0646aba7c6703a6c79603957e805b74c3befZbigniew Jędrzejewski-Szmek AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus is to be connected to by default])
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek have_kdbus=yes
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS"
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmekfi
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart PoetteringAM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering# ------------------------------------------------------------------------------
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart PoetteringAC_ARG_WITH(rc-local-script-path-start,
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
4f87c47b35cf9c1f58872559ae67a2656712fdd6William Giokas [Path to /etc/rc.local]),
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering [RC_LOCAL_SCRIPT_PATH_START="$withval"],
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez
66be6554807773028a0111addb8e75c3cab11117Kay SieversAC_ARG_WITH(rc-local-script-path-stop,
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
1f048a6b6bcc30d2e157711b3d231d7a944e6ffbJan Engelhardt [Path to /usr/sbin/halt.local]),
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay SieversAC_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])
AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
# ------------------------------------------------------------------------------
AC_ARG_WITH(kbd-loadkeys,
AS_HELP_STRING([--with-kbd-loadkeys=PATH],
[Path to loadkeys]),
[KBD_LOADKEYS="$withval"],
[KBD_LOADKEYS="/usr/bin/loadkeys"])
AC_ARG_WITH(kbd-setfont,
AS_HELP_STRING([--with-kbd-setfont=PATH],
[Path to setfont]),
[KBD_SETFONT="$withval"],
[KBD_SETFONT="/usr/bin/setfont"])
AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
AC_SUBST(KBD_LOADKEYS)
AC_SUBST(KBD_SETFONT)
AC_ARG_WITH(telinit,
AS_HELP_STRING([--with-telinit=PATH],
[Path to telinit]),
[TELINIT="$withval"],
[TELINIT="/lib/sysvinit/telinit"])
AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
AC_SUBST(TELINIT)
AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])
# ------------------------------------------------------------------------------
have_myhostname=no
AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
if test "x$enable_myhostname" != "xno"; then
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h])
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
have_myhostname=yes
fi
AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
enable_hwdb=$enableval, enable_hwdb=yes)
AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
AS_IF([test "x$enable_manpages" != xno], [
have_manpages=yes
AC_PATH_PROG([XSLTPROC], [xsltproc])
AS_IF([test -z "$XSLTPROC"],
AC_MSG_ERROR([*** xsltproc is required for man pages]))
])
AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE(hibernate,
[AC_HELP_STRING([--disable-hibernate], [disable hibernation support])],
enable_hibernate=$enableval, enable_hibernate=yes)
AM_CONDITIONAL(ENABLE_HIBERNATE, [test x$enable_hibernate = xyes])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE(ldconfig,
[AC_HELP_STRING([--disable-ldconfig], [disable ldconfig])],
enable_ldconfig=$enableval, enable_ldconfig=yes)
AM_CONDITIONAL(ENABLE_LDCONFIG, [test x$enable_ldconfig = xyes])
# ------------------------------------------------------------------------------
# Location of the init scripts as mandated by LSB
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
AC_ARG_WITH([sysvinit-path],
[AS_HELP_STRING([--with-sysvinit-path=PATH],
[Specify the path to where the SysV init scripts are located])],
[SYSTEM_SYSVINIT_PATH="$withval"],
[])
AC_ARG_WITH([sysvrcnd-path],
[AS_HELP_STRING([--with-sysvrcnd-path=PATH],
[Specify the path to the base directory for the SysV rcN.d directories])],
[SYSTEM_SYSVRCND_PATH="$withval"],
[])
if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
SYSTEM_SYSV_COMPAT="yes"
M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
else
SYSTEM_SYSV_COMPAT="no"
fi
AC_SUBST(SYSTEM_SYSVINIT_PATH)
AC_SUBST(SYSTEM_SYSVRCND_PATH)
AC_SUBST(M4_DEFINES)
AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
AC_ARG_WITH([tty-gid],
[AS_HELP_STRING([--with-tty-gid=GID],
[Specify the numeric GID of the 'tty' group])],
[TTY_GID="$withval"],
[TTY_GID="5"])
AC_DEFINE_UNQUOTED(TTY_GID, [$TTY_GID], [GID of the 'tty' group])
AC_SUBST(TTY_GID)
AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
AX_NORMALIZE_PATH([with_dbuspolicydir])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
[with_dbussessionservicedir=${datadir}/dbus-1/services])
AX_NORMALIZE_PATH([with_dbussessionservicedir])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
AX_NORMALIZE_PATH([with_dbussystemservicedir])
AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
[],
[AS_IF([$($PKG_CONFIG --exists bash-completion)], [
with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
] , [
with_bashcompletiondir=${datadir}/bash-completion/completions
])])
AM_CONDITIONAL(ENABLE_BASH_COMPLETION, [test "$with_bashcompletiondir" != "no"])
AX_NORMALIZE_PATH([with_bashcompletiondir])
AC_ARG_WITH([zshcompletiondir],
AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
AM_CONDITIONAL(ENABLE_ZSH_COMPLETION, [test "$with_zshcompletiondir" != "no"])
AX_NORMALIZE_PATH([with_zshcompletiondir])
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[], [with_rootprefix=${ac_default_prefix}])
# --with-rootprefix= (empty) should default to "/" but AX_NORMALIZE_PATH
# defaults those to ".", solve that here for now until we can find a suitable
# fix for AX_NORMALIZE_PATH upstream at autoconf-archive.
# See: https://github.com/systemd/systemd/issues/54
if test "x${with_rootprefix}" = "x"; then
with_rootprefix="/"
fi
AX_NORMALIZE_PATH([with_rootprefix])
AC_ARG_WITH([rootlibdir],
AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
[],
[with_rootlibdir=${libdir}])
AX_NORMALIZE_PATH([with_rootlibdir])
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
[with_pamlibdir=${with_rootlibdir}/security])
AX_NORMALIZE_PATH([with_pamlibdir])
AC_ARG_WITH([pamconfdir],
AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
[],
[with_pamconfdir=${sysconfdir}/pam.d])
AX_NORMALIZE_PATH([with_pamconfdir])
AC_ARG_ENABLE([split-usr],
AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
[],
[AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
enable_split_usr=yes
], [
enable_split_usr=no
])])
AC_ARG_WITH([dkr-index-url],
[AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])],
[DEFAULT_DKR_INDEX_URL="\"$withval\""],
[DEFAULT_DKR_INDEX_URL="NULL"])
AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads])
AC_SUBST(DEFAULT_DKR_INDEX_URL)
AS_IF([test "x${enable_split_usr}" = "xyes"], [
AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
])
AM_CONDITIONAL(ENABLE_SPLIT_USR, [test "x${enable_split_usr}" = "xyes"])
# work around intltool-update issues during 'make distcheck'
AS_IF([test "x$0" != "x./configure"], [
AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
])
# QEMU and OVMF UEFI firmware
AS_IF([test x"$cross_compiling" = "xyes"], [], [
AC_PATH_PROG([QEMU], [qemu-system-x86_64])
AC_CHECK_FILE([/usr/share/qemu/bios-ovmf.bin], [QEMU_BIOS=/usr/share/qemu/bios-ovmf.bin],
[AC_CHECK_FILE([/usr/share/qemu-ovmf/bios.bin], [QEMU_BIOS=/usr/share/qemu-ovmf/bios.bin])])
AC_SUBST([QEMU_BIOS])
])
AC_ARG_ENABLE(tests,
[AC_HELP_STRING([--disable-tests], [disable tests])],
enable_tests=$enableval, enable_tests=yes)
AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug@<:@=LIST@:>@], [enable extra debugging (hashmap,mmap-cache)])],
[if test "x$enableval" = "xyes"; then
enableval="hashmap,mmap-cache"
fi
saved_ifs="$IFS"
IFS="$IFS$PATH_SEPARATOR,"
for name in $enableval; do
case $name in
hashmap)
enable_debug_hashmap=yes
;;
mmap-cache)
enable_debug_mmap_cache=yes
;;
esac
done
IFS="$saved_ifs"],[])
enable_debug=""
AS_IF([test x$enable_debug_hashmap = xyes], [
AC_DEFINE(ENABLE_DEBUG_HASHMAP, 1, [Define if hashmap debugging is to be enabled])
enable_debug="hashmap $enable_debug"
])
AS_IF([test x$enable_debug_mmap_cache = xyes], [
AC_DEFINE(ENABLE_DEBUG_MMAP_CACHE, 1, [Define if mmap cache debugging is to be enabled])
enable_debug="mmap-cache $enable_debug"
])
test -z "$enable_debug" && enable_debug="none"
AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
AC_SUBST([pamlibdir], [$with_pamlibdir])
AC_SUBST([pamconfdir], [$with_pamconfdir])
AC_SUBST([rootprefix], [$with_rootprefix])
AC_SUBST([rootlibdir], [$with_rootlibdir])
AC_CONFIG_FILES([
Makefile
po/Makefile.in
])
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE_NAME $VERSION
libcryptsetup: ${have_libcryptsetup}
PAM: ${have_pam}
AUDIT: ${have_audit}
IMA: ${have_ima}
AppArmor: ${have_apparmor}
SELinux: ${have_selinux}
SECCOMP: ${have_seccomp}
SMACK: ${have_smack}
ZLIB: ${have_zlib}
XZ: ${have_xz}
LZ4: ${have_lz4}
BZIP2: ${have_bzip2}
ACL: ${have_acl}
GCRYPT: ${have_gcrypt}
QRENCODE: ${have_qrencode}
MICROHTTPD: ${have_microhttpd}
GNUTLS: ${have_gnutls}
libcurl: ${have_libcurl}
libidn: ${have_libidn}
libiptc: ${have_libiptc}
ELFUTILS: ${have_elfutils}
binfmt: ${have_binfmt}
vconsole: ${have_vconsole}
bootchart: ${have_bootchart}
quotacheck: ${have_quotacheck}
tmpfiles: ${have_tmpfiles}
sysusers: ${have_sysusers}
firstboot: ${have_firstboot}
randomseed: ${have_randomseed}
backlight: ${have_backlight}
rfkill: ${have_rfkill}
logind: ${have_logind}
machined: ${have_machined}
importd: ${have_importd}
hostnamed: ${have_hostnamed}
timedated: ${have_timedated}
timesyncd: ${have_timesyncd}
default NTP servers: ${NTP_SERVERS}
time epoch: ${TIME_EPOCH}
localed: ${have_localed}
networkd: ${have_networkd}
resolved: ${have_resolved}
default DNS servers: ${DNS_SERVERS}
coredump: ${have_coredump}
polkit: ${have_polkit}
efi: ${have_efi}
gnuefi: ${have_gnuefi}
efi arch: ${EFI_ARCH}
EFI machine type: ${EFI_MACHINE_TYPE_NAME}
EFI CC ${EFI_CC}
EFI libdir: ${EFI_LIB_DIR}
EFI ldsdir: ${EFI_LDS_DIR}
EFI includedir: ${EFI_INC_DIR}
kmod: ${have_kmod}
xkbcommon: ${have_xkbcommon}
blkid: ${have_blkid}
libmount: ${have_libmount}
dbus: ${have_dbus}
nss-myhostname: ${have_myhostname}
hwdb: ${enable_hwdb}
kdbus: ${have_kdbus}
Python: ${have_python}
man pages: ${have_manpages}
test coverage: ${have_coverage}
Split /usr: ${enable_split_usr}
SysV compatibility: ${SYSTEM_SYSV_COMPAT}
compatibility libraries: ${have_compat_libs}
utmp/wtmp support: ${have_utmp}
ldconfig support: ${enable_ldconfig}
hibernate support: ${enable_hibernate}
extra debugging: ${enable_debug}
prefix: ${prefix}
rootprefix: ${with_rootprefix}
sysconf dir: ${sysconfdir}
datarootdir: ${datarootdir}
includedir: ${includedir}
lib dir: ${libdir}
rootlib dir: ${with_rootlibdir}
SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
Build Python: ${PYTHON}
PAM modules dir: ${with_pamlibdir}
PAM configuration dir: ${with_pamconfdir}
D-Bus policy dir: ${with_dbuspolicydir}
D-Bus session dir: ${with_dbussessionservicedir}
D-Bus system dir: ${with_dbussystemservicedir}
Bash completions dir: ${with_bashcompletiondir}
Zsh completions dir: ${with_zshcompletiondir}
Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP}
Debug shell: ${SUSHELL} @ ${DEBUGTTY}
TTY GID: ${TTY_GID}
Maximum System UID: ${SYSTEM_UID_MAX}
Maximum System GID: ${SYSTEM_GID_MAX}
Certificate root: ${CERTIFICATEROOT}
Default dkr Index ${DEFAULT_DKR_INDEX_URL}
CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
])