configure.ac revision 2375607039517c88df51ef16ddbb624ec1c10654
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# This file is part of systemd.
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Copyright 2010-2012 Lennart Poettering
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Copyright 2010-2012 Kay Sievers
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# systemd is free software; you can redistribute it and/or modify it
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# under the terms of the GNU Lesser General Public License as published by
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# the Free Software Foundation; either version 2.1 of the License, or
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# (at your option) any later version.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# systemd is distributed in the hope that it will be useful, but
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# WITHOUT ANY WARRANTY; without even the implied warranty of
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# Lesser General Public License for more details.
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# You should have received a copy of the GNU Lesser General Public License
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# along with systemd; If not, see <http://www.gnu.org/licenses/>.
4e949c11a1df4547d5f102e4131e07b026369cd7Javier JardónAC_PREREQ([2.64])
4e949c11a1df4547d5f102e4131e07b026369cd7Javier JardónAC_INIT([systemd],
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón [http://www.freedesktop.org/wiki/Software/systemd])
78a825f216d39ee0295b00647b059d45467e1d02Kay SieversAC_CONFIG_SRCDIR([src/core/main.c])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CONFIG_MACRO_DIR([m4])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CONFIG_HEADERS([config.h])
a80db8bd5f7f15859e8891aab9fc3694ce4cd0bdJavier JardónAC_CONFIG_AUX_DIR([build-aux])
4db6d587c37c0357d20c79bf1a7c9afd4c7ced61Kay SieversAC_USE_SYSTEM_EXTENSIONS
907dd1953b7517534d646f5b2777780020c896e2Kay SieversAC_SYS_LARGEFILE
eb7bbee6cd182d5c4eb1e1180631c35158f59379Kay SieversAC_PREFIX_DEFAULT([/usr])
6aad7f2cd75c88f990c7857bb173b3e8d0faee0fUmut Tezduyar LindskogAM_MAINTAINER_MODE([enable])
bbd9b8c2139a70005e4e83d198575e2a10fe1db2Lennart PoetteringAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects parallel-tests])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_SILENT_RULES([yes])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CANONICAL_HOST
22be093ffb403a1c474037939ca9b88b1ee39f77Lennart PoetteringAC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
d59d0a2b4b41a75eaf618b26b8f8bd1e17de7e2bceeLT_PREREQ(2.2)
d59d0a2b4b41a75eaf618b26b8f8bd1e17de7e2bceeLT_INIT([disable-static])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringSET_ARCH(X86_64, x86_64*)
5e63ce78b5018ba612e794a610a6f13c5eefade7Cristian RodríguezSET_ARCH(IA32, i*86*)
3d585edbb14b9705c80183aeb16dfd0a28df0ac9Lennart PoetteringSET_ARCH(MIPS, mips*)
5e63ce78b5018ba612e794a610a6f13c5eefade7Cristian RodríguezSET_ARCH(AARCH64, aarch64*)
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera# i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraAC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraAS_IF([test x"$intltool_found" != xyes],
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera [AS_IF([test x"$enable_nls" = xyes],
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera [AC_MSG_ERROR([--enable-nls requested but intltool not found])],
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart Poettering [AS_IF([test x"$enable_nls" != xno],
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart Poettering [AC_MSG_WARN([*** Disabling NLS support because intltool was not found])
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart Poettering enable_nls=no])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAS_IF([test x"$enable_nls" != xno -o "x$enable_polkit" != xno], [
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-SzmekIT_PROG_INTLTOOL([0.40.0])
2d0efdf1af5ff77441228854343c61d42a89840cSamuli SuominenAS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
b51fc639f01ee6194af3e7e944a79accce474fe1Dave Reisner # If intltool is not available, provide a dummy rule to fail generation of %.policy files with a meaningful error message
2d0efdf1af5ff77441228854343c61d42a89840cSamuli Suominen INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo " ITMRG " $@ && echo "*** intltool support required to build target $@" && false'
86b2e20a5e5abf222fb81edcb5d58d012e35cbaaLennart Poettering AC_SUBST(INTLTOOL_POLICY_RULE)
2d0efdf1af5ff77441228854343c61d42a89840cSamuli SuominenGETTEXT_PACKAGE=systemd
edeb68c53f1cdc452016b4c8512586a70b1262e3Tom GundersenAC_SUBST(GETTEXT_PACKAGE)
2d0efdf1af5ff77441228854343c61d42a89840cSamuli SuominenAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [systemd])
446883528524429283626208928b51f49f28f810Lennart PoetteringAC_PROG_MKDIR_P
6581f00f7eabdaccf587a4b6af60ed4696dd2791Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([M4], [m4])
92ec4495f76a7a2a6c31f5bb2a5240f78dcfe1d2Javier JardónAC_PATH_PROG([XSLTPROC], [xsltproc])
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin])
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin])
6e92b23f0d6dd398848376bbaf47e54a90ed3389Kay SieversAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap], [$PATH:/usr/sbin:/sbin])
d66ee73a3dd7b5433fc0da3125bbdff740de7745Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin])
d66ee73a3dd7b5433fc0da3125bbdff740de7745Zbigniew Jędrzejewski-SzmekAC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
ac714a78fdca481488d88f84b6332d28083a4511Martin JansaAC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
b62cfcea00862ccbf0e5e297f8a339f70987edefMichael BieblAC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
b62cfcea00862ccbf0e5e297f8a339f70987edefMichael BieblAC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
9a60da2834074d970ca063c210fe9d2f05c70532Thierry RedingAC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_CHECK_TOOL(OBJCOPY, objcopy)
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_CHECK_TOOL(STRINGS, strings)
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-SzmekAC_CHECK_TOOL(GPERF, gperf)
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmekif test -z "$GPERF" ; then
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek AC_MSG_ERROR([*** gperf not found])
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew 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"
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek address_sanitizer_cppflags="-DVALGRIND=1"
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek address_sanitizer_ldflags="-Wc,-fsanitize=address"
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmekundefined_sanitizer_cflags=
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmekundefined_sanitizer_cppflags=
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmekundefined_sanitizer_ldflags=
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(undefined-sanitizer, AS_HELP_STRING([--enable-undefined-sanitizer], [enable -fsanitize=undefined]))
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-SzmekAS_IF([test "x$enable_undefined_sanitizer" = "xyes"], [
eb2e280f9c59b66965c9316eadc4c113a13ca744Lucas De Marchi CC_CHECK_FLAG_APPEND([with_us_cflags], [CFLAGS], [-fsanitize=undefined])
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart 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"
27765dfc7a32d790badb29e6498b34edb0b60c33Lennart Poettering undefined_sanitizer_cppflags="-DVALGRIND=1"
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined"
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 PoetteringCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wlogical-op \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wmissing-include-dirs \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wold-style-definition \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wpointer-arith \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wdeclaration-after-statement \
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering -Wfloat-equal \
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering -Wsuggest-attribute=noreturn \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wmissing-prototypes \
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering -Wstrict-prototypes \
8745297f9853c4a17bac69e1b7e652fe81bc1940Lennart Poettering -Wredundant-decls \
d200735e13c52dcfe36c0e066f9f6c2fbfb85a9cMichal Schmidt -Wmissing-declarations \
213298fb822258bb69c6b85b7c8d7f019fd2306aLennart Poettering -Wmissing-noreturn \
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering -Wendif-labels \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wstrict-aliasing=2 \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -Wwrite-strings \
9f64229f9ca69f5652b238a67531432e56108bd6Zbigniew Jędrzejewski-Szmek -Wno-long-long \
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri -Wno-overlength-strings \
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri -Wno-unused-parameter \
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri -Wno-missing-field-initializers \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -Wno-unused-result \
c1663b9daf5a43425e54bbe3daf6b10e64578f80Lennart Poettering -Wno-format-signedness \
aca33b078cd32c5416a7fa3d5020a5d461c130eeCristian Rodríguez -Werror=overflow \
b850b06e1efcc7e27cfd785759a3a913ac9ed196Kay Sievers -Wnested-externs \
b850b06e1efcc7e27cfd785759a3a913ac9ed196Kay Sievers -ffast-math \
b850b06e1efcc7e27cfd785759a3a913ac9ed196Kay Sievers -fno-common \
b850b06e1efcc7e27cfd785759a3a913ac9ed196Kay Sievers -fdiagnostics-show-option \
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-Szmek -fno-strict-aliasing \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -fvisibility=hidden \
03a170c03cd4a09721369ece48affb70d66c6b90Kay Sievers -ffunction-sections \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -fdata-sections \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -fstack-protector \
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek -fstack-protector-strong \
9e7adc3ae1133fa08a468768a490812299fad030Lucas De Marchi --param=ssp-buffer-size=4])
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut BarbieriAS_CASE([$CC], [*clang*],
9d2d0fe1e3f28a639c26b62391f79cfd1450d91bEvangelos Foutras [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -Wno-typedef-redefinition \
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering -Wno-gnu-variable-sized-type-not-at-end \
ae0ceefc2f432bc1068889fcff53d929eca8a3c4Zbigniew Jędrzejewski-SzmekAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
ccd06097c79218f7d5ea4c21721bbcbc7c467dcaZbigniew Jędrzejewski-Szmek -flto -ffat-lto-objects])],
ccd06097c79218f7d5ea4c21721bbcbc7c467dcaZbigniew Jędrzejewski-Szmek [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
1c231f56482546725c4dbd3303f70300bd3c63e9Lennart PoetteringAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-SzmekAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-Szmek [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-Szmek -Wp,-D_FORTIFY_SOURCE=2])],
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-Szmek [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
ccd06097c79218f7d5ea4c21721bbcbc7c467dcaZbigniew Jędrzejewski-SzmekAC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekCC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wl,--as-needed \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wl,--no-undefined \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wl,--gc-sections \
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek -Wl,-fuse-ld=gold])
32dcef3ab1eb91ee469c3246ef859578dccd8a45Zbigniew Jędrzejewski-SzmekAC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAC_CHECK_SIZEOF(pid_t)
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAC_CHECK_SIZEOF(uid_t)
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAC_CHECK_SIZEOF(gid_t)
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAC_CHECK_SIZEOF(time_t)
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael BieblAC_CHECK_SIZEOF(dev_t)
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-SzmekAC_CHECK_SIZEOF(rlim_t,,[
1864b0e39505cd44a98eee61c97916b86491c0b4Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek# we use python to build the man page index, and for systemd-python
1864b0e39505cd44a98eee61c97916b86491c0b4Zbigniew Jędrzejewski-SzmekAC_ARG_WITH([python],
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-SzmekAS_IF([test "x$with_python" != "xno"], [
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek AM_PATH_PYTHON(,, [:])
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek AS_IF([test "x$PYTHON" != "x:"], [
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek AC_MSG_CHECKING([for python lxml module])
f2ec0646aba7c6703a6c79603957e805b74c3befZbigniew Jędrzejewski-Szmek AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes])
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek AC_MSG_RESULT([$have_lxml])
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes],
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek [AC_MSG_WARN([*** python support requires python-lxml module installed])])
afea26ad7d406d8b6c95d2642cb5a1d807b87546Lennart PoetteringAS_IF([test "$have_python" != "yes"], [
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers AS_IF([test "$with_python" = "yes"],
4b357e15876b730343db08719c877fdb45b6ad42Michael Marineau [AC_MSG_ERROR([*** python support requested but python support not found])])
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers AS_IF([test "$with_python" != "no"],
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers [AC_MSG_WARN([*** python support not found, some documentation cannot be built])])
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael BieblAM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael BieblAS_IF([test "x$PYTHON_BINARY" = "x"],
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering [AS_IF([test "x$have_python" = "xyes"],
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Biebl [PYTHON_BINARY="$(which "$PYTHON")"],
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay Sievers [PYTHON_BINARY=/usr/bin/python])])
7959ff9914a6f3a59dbff95c199bcc540b70ac94Kay SieversAC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
fba1ea06bb5b653e9eb0cc1b6004af8da273a4abShawn LanddenAS_IF([test "x$have_python" != "xyes" -a "x$enable_python_devel" = "xyes"],
fba1ea06bb5b653e9eb0cc1b6004af8da273a4abShawn Landden [AC_MSG_ERROR([*** python-devel support requires --with-python])])
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Bieblhave_python_devel=no
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_ARG_ENABLE(python_devel, AS_HELP_STRING([--disable-python-devel], [Do not build python modules]))
9388e99e208a6487b26dcbda86005ee9eba8d93dMichael OlbrichAS_IF([test "x$have_python" = "xyes" -a "x$enable_python_devel" != "xno"], [
4db17f291c627c885de668200ff8cce2e57c933fZbigniew Jędrzejewski-Szmek PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}],
5f381b355a95b953654e46ba3ccdc81bdec165eaLennart Poettering [have_python_devel=yes],
a8348796c0d39435b1c3d85ce6e95dad1ac85fecLennart Poettering [PKG_CHECK_MODULES([PYTHON_DEVEL], [python],
9388e99e208a6487b26dcbda86005ee9eba8d93dMichael Olbrich [have_python_devel=yes],
3b794314149e40afaf3c456285e1e529747b6560Holger Schurig [have_python_devel=no])])
5f381b355a95b953654e46ba3ccdc81bdec165eaLennart Poettering AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes],
5f381b355a95b953654e46ba3ccdc81bdec165eaLennart Poettering [AC_MSG_ERROR([*** python-devel support requested but libraries not found])])
a8348796c0d39435b1c3d85ce6e95dad1ac85fecLennart Poettering AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
a9b5b03212f9c854938483b8901e433c2ba6619bMichael TremerAM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
2270309471213a3c960543e523130627e9cb10e2Kay Sievers# ------------------------------------------------------------------------------
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-SzmekAC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
8114dedc5910d9a9cec702f6b6658551a0cd9edeChengwei YangAC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-SzmekAC_CHECK_HEADERS([linux/btrfs.h], [], [])
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-SzmekAC_CHECK_HEADERS([linux/memfd.h], [], [])
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-Szmek# unconditionally pull-in librt with old glibc versions
ac6b760ceedd4b21921b6a682cf1479af3d3024fZbigniew Jędrzejewski-SzmekAC_SEARCH_LIBS([clock_gettime], [rt], [], [])
4b357e15876b730343db08719c877fdb45b6ad42Michael Marineausave_LIBS="$LIBS"
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekAC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekAC_SUBST(CAP_LIBS)
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekAC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekAC_SUBST(RT_LIBS)
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-SzmekLIBS="$save_LIBS"
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, LO_FLAGS_PARTSCAN],
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,
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen IFLA_VLAN_PROTOCOL,
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen IFLA_VXLAN_REMCSUM_NOPARTIAL,
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. Andersen IFLA_BRIDGE_VLAN_INFO,
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen IFLA_BRPORT_UNICAST_FLOOD,
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 OlofssonAC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests]))
f553b3b1074151200187df916427a1468186435eAnders OlofssonAS_IF([test "x$enable_dbus" != "xno"], [
f553b3b1074151200187df916427a1468186435eAnders Olofsson PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2],
f553b3b1074151200187df916427a1468186435eAnders Olofsson [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes],
f553b3b1074151200187df916427a1468186435eAnders Olofsson [have_dbus=no])
728beb28a713709f521d374c9f8f3da781969d26Tom Gundersen AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"],
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
c0467cf387548dc98c0254f63553d862b35a84e5Ronny ChevalierAM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier# ------------------------------------------------------------------------------
17df7223be064b1542dbe868e3b35cca977ee639Lennart PoetteringAC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
17df7223be064b1542dbe868e3b35cca977ee639Lennart Poettering AS_CASE("x${enableval}",
17df7223be064b1542dbe868e3b35cca977ee639Lennart Poettering [xyes], [have_utmp=yes],
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier [xno], [have_utmp=no],
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
c0467cf387548dc98c0254f63553d862b35a84e5Ronny ChevalierAS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
c0467cf387548dc98c0254f63553d862b35a84e5Ronny ChevalierAM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier# ------------------------------------------------------------------------------
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalierhave_compat_libs=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_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 [have_compat_libs=no])
816115863962548a9a0d9fbfe429c7f8e685beacRoberto SassuAM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"])
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu# ------------------------------------------------------------------------------
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassuhave_coverage=no
816115863962548a9a0d9fbfe429c7f8e685beacRoberto SassuAC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassuif test "x$enable_coverage" = "xyes" ; then
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu 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 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 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")
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart PoetteringAM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering# ------------------------------------------------------------------------------
591622d7efbc828f00f190d91b6608148b967ff5Lennart PoetteringAC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poetteringif test "x$enable_kmod" != "xno"; then
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
3f8cc098d218525710e5cbad9adf37001d3b6060Jan Engelhardt if test "x$have_kmod" = "xyes"; then
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poettering PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poettering [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poettering AC_MSG_ERROR([*** kmod version >= 15 not found]))
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering AC_MSG_ERROR([*** kmod support requested, but libraries not found])
591622d7efbc828f00f190d91b6608148b967ff5Lennart PoetteringAM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
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 SchererAM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer# ------------------------------------------------------------------------------
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael SchererAC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguezif test "x$enable_blkid" != "xno"; then
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez 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])
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J WalshAM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez# ------------------------------------------------------------------------------
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguezhave_libmount=no
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian RodríguezPKG_CHECK_MODULES(MOUNT, [ mount >= 2.20 ],
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez [AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available]) have_libmount=yes], have_libmount=no)
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguezif test "x$have_libmount" = xno; then
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian Rodríguez AC_MSG_ERROR([*** libmount support required but libraries not found])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(HAVE_LIBMOUNT, [test "$have_libmount" = "yes"])
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
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0],
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available])
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering have_seccomp=yes
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"],
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering [have_seccomp=no])
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** seccomp support requested but libraries not found])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering# ------------------------------------------------------------------------------
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 [have_ima=yes])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringif test "x${have_ima}" != xno ; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
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
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart 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
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poettering AC_MSG_ERROR([*** SELinux support requested but libraries not found])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringhave_apparmor=no
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_ARG_ENABLE(apparmor, AS_HELP_STRING([--disable-apparmor], [Disable optional AppArmor support]))
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringif test "x$enable_apparmor" != "xno"; then
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering PKG_CHECK_MODULES([APPARMOR], [libapparmor],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_DEFINE(HAVE_APPARMOR, 1, [Define if AppArmor is available])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers 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 PoetteringAM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"])
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 PoetteringAC_SUBST(SUSHELL)
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 PoetteringAC_SUBST(DEBUGTTY)
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 PoetteringAC_SUBST(CERTIFICATEROOT)
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering# ------------------------------------------------------------------------------
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
5eda94dda25bccda928c4b33c790dbe748573a22Lennart 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 PoetteringAM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering# ------------------------------------------------------------------------------
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 PoetteringAM_CONDITIONAL(HAVE_ZLIB, [test "$have_zlib" = "yes"])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering# ------------------------------------------------------------------------------
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 PoetteringAM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering# ------------------------------------------------------------------------------
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAC_ARG_ENABLE(lz4, AS_HELP_STRING([--enable-lz4], [Enable optional LZ4 support]))
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAS_IF([test "x$enable_lz4" = "xyes"], [
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering AC_CHECK_HEADERS(lz4.h,
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering [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 LewandowskiAM_CONDITIONAL(HAVE_LZ4, [test "$have_lz4" = "yes"])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol LewandowskiAM_CONDITIONAL(HAVE_COMPRESSION, [test "$have_xz" = "yes" -o "$have_lz4" = "yes"])
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 ;;
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski no) have_pam=no ;;
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [have_pam=auto])
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowskiif test "x${have_pam}" != xno ; then
6a6751fe24bf456cf5c1efad785a4d11e78b42d0Lennart Poettering AC_CHECK_HEADERS(
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [have_pam=yes],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [if test "x$have_pam" = xyes ; then
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski AC_MSG_ERROR([*** PAM headers not found.])
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok AC_CHECK_LIB(
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok [pam_syslog],
8b197c3a8a57c3f7c231b39e5660856fd9580c80Auke Kok [have_pam=yes],
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski [if test "x$have_pam" = xyes ; then
2b3e18de74ca89b374dd4f7a2c30e5731d347841Karol Lewandowski AC_MSG_ERROR([*** libpam not found.])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering if test "x$have_pam" = xyes ; then
feb12d3ed2c7f9132c64773c7c41b9e3a608a814Lennart Poettering PAM_LIBS="-lpam -lpam_misc"
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AC_DEFINE(HAVE_PAM, 1, [PAM available])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_PAM"
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAC_SUBST(PAM_LIBS)
7560fffcd2531786b9c1ca657667a43e90331326Lennart PoetteringAM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
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 [have_acl=auto])
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poetteringif test "x${have_acl}" != xno ; then
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AC_CHECK_HEADERS(
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [have_acl=yes],
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering [if test "x$have_acl" = xyes ; then
7560fffcd2531786b9c1ca657667a43e90331326Lennart Poettering AC_MSG_ERROR([*** ACL headers not found.])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [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 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 PoetteringAC_SUBST(ACL_LIBS)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
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 [have_smack=auto])
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poetteringif test "x${have_smack}" = xauto; then
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_SMACK"
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering have_smack=yes
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAC_ARG_WITH(smack-run-label,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAS_HELP_STRING([--with-smack-run-label=STRING],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [run systemd --system with a specific SMACK label]),
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])],
7f4e08056de0184b205a20632e62db73d299937eLennart Poetteringif test "x${have_smack}" = xyes ; then
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
7f4e08056de0184b205a20632e62db73d299937eLennart PoetteringAM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"])
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering# ------------------------------------------------------------------------------
7f4e08056de0184b205a20632e62db73d299937eLennart PoetteringAC_ARG_ENABLE([gcrypt],
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [case "${enableval}" in
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering yes) have_gcrypt=yes ;;
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering no) have_gcrypt=no ;;
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering [have_gcrypt=auto])
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poetteringif test "x${have_gcrypt}" != xno ; then
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering AM_PATH_LIBGCRYPT(
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering [have_gcrypt=yes],
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering [if test "x$have_gcrypt" = xyes ; then
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering AC_MSG_ERROR([*** GCRYPT headers not found.])
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering if test "x$have_gcrypt" = xyes ; then
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering GCRYPT_LIBS="$LIBGCRYPT_LIBS"
3f573096641cf3d350c8779971c644ca74aab93aZbigniew Jędrzejewski-Szmek GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering have_gcrypt=no
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart Poettering GCRYPT_CFLAGS=
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-SzmekAC_SUBST(GCRYPT_LIBS)
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-SzmekAC_SUBST(GCRYPT_CFLAGS)
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-SzmekAM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-SzmekAC_ARG_ENABLE([audit],
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek [case "${enableval}" in
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek yes) have_audit=yes ;;
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek no) have_audit=no ;;
6031319956b4b1d13799373bfda3e8690f6fa874Zbigniew Jędrzejewski-Szmek *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna [have_audit=auto])
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajnaif test "x${have_audit}" != xno ; then
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers AC_CHECK_HEADERS(
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna [have_audit=yes],
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna [if test "x$have_audit" = xyes ; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** AUDIT headers not found.])
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering [have_audit=yes],
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering [if test "x$have_audit" = xyes ; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** libaudit not found.])
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering if test "x$have_audit" = xyes ; then
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers AUDIT_LIBS="-laudit"
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok AUDIT_LIBS=
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke KokAC_SUBST(AUDIT_LIBS)
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke KokAM_CONDITIONAL([HAVE_AUDIT], [test "x$have_audit" != xno])
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE([elfutils],
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering AS_HELP_STRING([--disable-elfutils],[Disable optional ELFUTILS support]),
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering [case "${enableval}" in
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering yes) have_elfutils=yes ;;
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers no) have_elfutils=no ;;
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-elfutils) ;;
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering [have_elfutils=auto])
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyarif test "x${have_elfutils}" != xno ; then
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar AC_CHECK_HEADERS(
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar [if test "x$have_elfutils" = xyes ; then
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyar AC_MSG_ERROR([*** ELFUTILS headers not found.])
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering [if test "x$have_elfutils" = xyes ; then
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering AC_MSG_ERROR([*** ELFUTILS libs not found.])
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering [dwfl_core_file_attach],
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering [have_elfutils=yes],
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering [if test "x$have_elfutils" = xyes ; then
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poettering AC_MSG_ERROR([*** ELFUTILS >= 158 is required.])
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering if test "x$have_elfutils" = xyes ; then
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering ELFUTILS_LIBS="-lelf -ldw"
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available])
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering have_elfutils=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers ELFUTILS_LIBS=
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay SieversAC_SUBST(ELFUTILS_LIBS)
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay SieversAM_CONDITIONAL(HAVE_ELFUTILS, [test "$have_elfutils" = "yes"])
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers# ------------------------------------------------------------------------------
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievershave_libcryptsetup=no
4c80c73c2b804576b1de27e644c1da4dab2f9026Kay SieversAC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sieversif test "x$enable_libcryptsetup" != "xno"; then
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
1ee306e1248866617c96ed9f4263f375588ad838Lennart PoetteringAM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_qrencode=no
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos VajnaAC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajnaif test "x$enable_qrencode" != "xno"; then
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna AC_MSG_ERROR([*** qrencode support requested but libraries not found])
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos VajnaAM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna# ------------------------------------------------------------------------------
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievershave_microhttpd=no
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos VajnaAC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajnaif test "x$enable_microhttpd" != "xno"; then
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sievers if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sievers AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay SieversAM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sievers# ------------------------------------------------------------------------------
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart PoetteringAC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support]))
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poetteringif test "x$enable_gnutls" != "xno"; then
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.1.4],
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering [AC_DEFINE(HAVE_GNUTLS, 1, [Define if gnutls is available]) have_gnutls=yes], have_gnutls=no)
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering if test "x$have_gnutls" = xno -a "x$enable_gnutls" = xyes; then
e8af69739a629708d2c155ebcd4fa57b8fd5006aLennart Poettering AC_MSG_ERROR([*** gnutls support requested but libraries not found])
661278ee297247c0c7e0708924f8ce52284529fcLennart PoetteringAM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"])
5ea846cc5197682d07ee46398996a8c3ccfbcc38Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
661278ee297247c0c7e0708924f8ce52284529fcLennart Poetteringhave_libcurl=no
661278ee297247c0c7e0708924f8ce52284529fcLennart PoetteringAC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support]))
661278ee297247c0c7e0708924f8ce52284529fcLennart Poetteringif test "x$enable_libcurl" != "xno"; then
661278ee297247c0c7e0708924f8ce52284529fcLennart Poettering PKG_CHECK_MODULES(LIBCURL, [libcurl],
661278ee297247c0c7e0708924f8ce52284529fcLennart Poettering [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no)
687ed1237b20a6db174fd0b372df20fa9a3a23c2Kay Sievers if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna AC_MSG_ERROR([*** libcurl support requested but libraries not found])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay SieversAM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna# ------------------------------------------------------------------------------
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajnahave_libidn=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support]))
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poetteringif test "x$enable_libidn" != "xno"; then
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering PKG_CHECK_MODULES(LIBIDN, [libidn],
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers have_libidn=yes
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"],
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering [have_libidn=no])
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering AC_MSG_ERROR([*** libidn support requested but libraries not found])
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart PoetteringAM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poettering# ------------------------------------------------------------------------------
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poetteringhave_libiptc=no
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart PoetteringAC_ARG_ENABLE(libiptc, AS_HELP_STRING([--disable-libiptc], [Disable optional LIBIPTC support]))
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poetteringif test "x$enable_libiptc" != "xno"; then
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters PKG_CHECK_MODULES(LIBIPTC, [libiptc],
e16cb2e4efaba83f47da8355adc65fd83bbe8327Tom Gundersen [AC_DEFINE(HAVE_LIBIPTC, 1, [Define if libiptc is available])
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters have_libiptc=yes
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters M4_DEFINES="$M4_DEFINES -DHAVE_LIBIPTC"],
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters [have_libiptc=no])
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters if test "x$have_libiptc" = "xno" -a "x$enable_libiptc" = "xyes"; then
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin Walters AC_MSG_ERROR([*** libiptc support requested but libraries not found])
3c9317d2d93248f3f0b0feaaa113485aee415d8aColin WaltersAM_CONDITIONAL(HAVE_LIBIPTC, [test "$have_libiptc" = "yes"])
e16cb2e4efaba83f47da8355adc65fd83bbe8327Tom Gundersen# ------------------------------------------------------------------------------
e16cb2e4efaba83f47da8355adc65fd83bbe8327Tom Gundersenhave_binfmt=no
e16cb2e4efaba83f47da8355adc65fd83bbe8327Tom GundersenAC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
e16cb2e4efaba83f47da8355adc65fd83bbe8327Tom Gundersenif test "x$enable_binfmt" != "xno"; then
e16cb2e4efaba83f47da8355adc65fd83bbe8327Tom Gundersen have_binfmt=yes
e16cb2e4efaba83f47da8355adc65fd83bbe8327Tom GundersenAM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
e16cb2e4efaba83f47da8355adc65fd83bbe8327Tom Gundersen# ------------------------------------------------------------------------------
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poetteringhave_vconsole=no
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart PoetteringAC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poetteringif test "x$enable_vconsole" != "xno"; then
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering have_vconsole=yes
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart PoetteringAM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering# ------------------------------------------------------------------------------
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poetteringhave_bootchart=no
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-SzmekAC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmekif test "x$enable_bootchart" != "xno"; then
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmek have_bootchart=yes
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-SzmekAM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-Szmekhave_quotacheck=no
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart PoetteringAC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poetteringif test "x$enable_quotacheck" != "xno"; then
c97a6dbcf10990bcc2455e842a41bf14b01f358dLukasz Skalski have_quotacheck=yes
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart PoetteringAM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
4acbce79798347cddf1e1d42e9be571e0a041873Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poetteringhave_tmpfiles=no
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart PoetteringAC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poetteringif test "x$enable_tmpfiles" != "xno"; then
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering have_tmpfiles=yes
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering# ------------------------------------------------------------------------------
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringhave_sysusers=no
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support]))
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringif test "x$enable_sysusers" != "xno"; then
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering have_sysusers=yes
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering# ------------------------------------------------------------------------------
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringhave_firstboot=no
bc2708414babc5c99bb8000e63c84e87606cc15dLennart PoetteringAC_ARG_ENABLE(firstboot, AS_HELP_STRING([--disable-firstboot], [disable firstboot support]))
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poetteringif test "x$enable_firstboot" != "xno"; then
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart Poettering have_firstboot=yes
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAM_CONDITIONAL(ENABLE_FIRSTBOOT, [test "$have_firstboot" = "yes"])
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering# ------------------------------------------------------------------------------
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringhave_randomseed=no
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringif test "x$enable_randomseed" != "xno"; then
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering have_randomseed=yes
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering# ------------------------------------------------------------------------------
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringhave_backlight=no
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools]))
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poetteringif test "x$enable_backlight" != "xno"; then
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering have_backlight=yes
a382332eed10d3348231803c47a4c599d24c5e3aLennart PoetteringAM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
a382332eed10d3348231803c47a4c599d24c5e3aLennart Poettering# ------------------------------------------------------------------------------
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian RodríguezAC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools]))
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguezif test "x$enable_rfkill" != "xno"; then
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguez have_rfkill=yes
abaaabf40a9891014ed4c402d7beb5a67ac256b1Lennart PoetteringAM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguez# ------------------------------------------------------------------------------
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian RodríguezAC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
4ad61fd1806dde23d2c99043b4bed91a196d2c82Cristian Rodríguezif test "x$enable_logind" != "xno"; then
54b434b1b5055f934230fe04fad35b01642b8488Lennart Poettering have_logind=yes
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen# ------------------------------------------------------------------------------
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenhave_machined=no
a3b6fafed441d96380a3f089118f7486d6aa3126Lennart PoetteringAC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenif test "x$enable_machined" != "xno"; then
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen have_machined=yes
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen# ------------------------------------------------------------------------------
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenhave_importd=no
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAC_ARG_ENABLE(importd, AS_HELP_STRING([--disable-importd], [disable import daemon]))
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersenif test "x$enable_importd" != "xno"; then
d562955eac58d3a5089e0f344ea586412a134451Tom Gundersen have_importd=yes
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAM_CONDITIONAL(ENABLE_IMPORTD, [test "$have_importd" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAS_IF([test "$have_importd" = "yes"], [ AC_DEFINE(HAVE_IMPORTD, [1], [Importd support available]) ])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
a3bd8447be4ea2ce230eb8ae0e815c04d85fa15aTom Gundersenhave_hostnamed=no
a3bd8447be4ea2ce230eb8ae0e815c04d85fa15aTom GundersenAC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_hostnamed" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_hostnamed=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_timedated=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_timedated" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_timedated=yes
d8d4bee76cf3b40ea923bc57d44aa0815ca9b5ffKay SieversAM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_timesyncd=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_timesyncd" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_timesyncd=yes
de1c301ed165eb4d04a0c9d4babe97912b5233bbLennart Poettering M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD"
de1c301ed165eb4d04a0c9d4babe97912b5233bbLennart PoetteringAM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_WITH(ntp-servers,
75db9a77605b33a1b9355eae957f26380441fce6Lennart Poettering AS_HELP_STRING([--with-ntp-servers=NTPSERVERS],
4c2b0e4e423fe73fafef10a5efa6fb778784cebcLennart Poettering [Space-separated list of default NTP servers]),
4ca39b280fce3c60d2fdecbd478fd9bf7f9d3e64Mike Gilbert [NTP_SERVERS="$withval"],
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-Szmek [NTP_SERVERS="time1.google.com time2.google.com time3.google.com time4.google.com"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_SUBST(NTP_SERVERS)
34eff652cedec3cac34b92629ead5f140334b689Lennart PoetteringAC_ARG_WITH(time-epoch,
f1dd0c3f9b4a257e81ff9c6a08070c702a0db45aLennart Poettering AS_HELP_STRING([--with-time-epoch=SECONDS],
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering [Time epoch for time clients]),
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen [TIME_EPOCH="$withval"],
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers [TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay SieversAC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch])
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen# ------------------------------------------------------------------------------
dee4c244254bb49d1ffa8bd7171ae9cce596d2d0Lennart PoetteringAC_ARG_WITH(system-uid-max,
dee4c244254bb49d1ffa8bd7171ae9cce596d2d0Lennart Poettering AS_HELP_STRING([--with-system-uid-max=UID]
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering [Maximum UID for system users]),
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen [SYSTEM_UID_MAX="$withval"],
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen [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`"])
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioAC_DEFINE_UNQUOTED(SYSTEM_UID_MAX, [$SYSTEM_UID_MAX], [Maximum System UID])
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioAC_SUBST(SYSTEM_UID_MAX)
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart Poettering# ------------------------------------------------------------------------------
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioAC_ARG_WITH(system-gid-max,
dee4c244254bb49d1ffa8bd7171ae9cce596d2d0Lennart Poettering AS_HELP_STRING([--with-system-gid-max=GID]
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio [Maximum GID for system groups]),
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio [SYSTEM_GID_MAX="$withval"],
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio [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`"])
bc2708414babc5c99bb8000e63c84e87606cc15dLennart PoetteringAC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
bc2708414babc5c99bb8000e63c84e87606cc15dLennart PoetteringAC_SUBST(SYSTEM_GID_MAX)
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poettering# ------------------------------------------------------------------------------
bc2708414babc5c99bb8000e63c84e87606cc15dLennart Poetteringhave_localed=no
bc2708414babc5c99bb8000e63c84e87606cc15dLennart PoetteringAC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poetteringif test "x$enable_localed" != "xno"; then
a05ea46dc788929bc8b13afb4208ca29cad68572Michael Biebl have_localed=yes
bef2733fae665e880da6ea011b1f918e6900bb42Lennart PoetteringAM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poettering# ------------------------------------------------------------------------------
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poetteringhave_coredump=no
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poetteringif test "x$enable_coredump" != "xno"; then
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael Biebl have_coredump=yes
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering# ------------------------------------------------------------------------------
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael Bieblhave_polkit=no
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart PoetteringAC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poetteringif test "x$enable_polkit" != "xno"; then
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering have_polkit=yes
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart PoetteringAM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering# ------------------------------------------------------------------------------
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poetteringhave_resolved=no
03c149144d374cffd40a17ffb067837e3e220933Michael BieblAC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart Poetteringif test "x$enable_resolved" != "xno"; then
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl have_resolved=yes
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
25ee45f9953c121fc26a54a85ad7bb3a3180152bMichael BieblAM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
db059f1b031a92ed45b62d1036877abd9c128d1bMichael BieblAC_ARG_WITH(dns-servers,
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl [Space-separated list of default DNS servers]),
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl [DNS_SERVERS="$withval"],
4f87c47b35cf9c1f58872559ae67a2656712fdd6William Giokas [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
4f87c47b35cf9c1f58872559ae67a2656712fdd6William GiokasAC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
4f87c47b35cf9c1f58872559ae67a2656712fdd6William GiokasAC_SUBST(DNS_SERVERS)
b8079ae19b41c9b61850c796dddc601b826850e0Kay Sievers# ------------------------------------------------------------------------------
39ad55a9aa99451f982628af6e14581092b2d2f6Kay Sievershave_networkd=no
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay SieversAS_IF([test "x$enable_networkd" != "xno"], [
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers have_networkd=yes
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD"
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay SieversAM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay Sievers# ------------------------------------------------------------------------------
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay SieversAC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmekif test "x$enable_efi" != "xno"; then
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmek AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-SzmekAM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny# ------------------------------------------------------------------------------
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyAC_CHECK_TOOL(EFI_CC, gcc)
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyEFI_ARCH=`echo $host | sed "s/\(-\).*$//"`
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyAM_COND_IF(ARCH_IA32, [
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny EFI_ARCH=ia32
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny EFI_MACHINE_TYPE_NAME=ia32])
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart PoetteringAM_COND_IF(ARCH_X86_64, [
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny EFI_MACHINE_TYPE_NAME=x64])
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-SzmekAM_COND_IF(ARCH_AARCH64, [
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-Szmek EFI_MACHINE_TYPE_NAME=aa64])
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-SzmekAC_SUBST([EFI_ARCH])
6fc00209d5906bd14d54af4a6ac2961dd9731f72Zbigniew Jędrzejewski-SzmekAC_SUBST([EFI_MACHINE_TYPE_NAME])
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal BakkenAC_ARG_ENABLE(gnuefi, AS_HELP_STRING([--enable-gnuefi], [Disable optional gnuefi support]))
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal BakkenAS_IF([test "x$enable_gnuefi" != "xno"], [
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal Bakken AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal Bakken [AC_DEFINE(HAVE_GNUEFI, 1, [Define if gnuefi is available])
cee22bd3cb253734a8a0183751d786128e2ea5e4Henrik Grindal Bakken have_gnuefi=yes],
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [AS_IF([test "x$enable_gnuefi" = xyes],
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [AC_MSG_ERROR([*** gnuefi support requested but headers not found])])
db059f1b031a92ed45b62d1036877abd9c128d1bMichael Biebl efiroot=$(echo $(cd /usr/lib/$(${EFI_CC} -print-multi-os-directory); pwd))
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering EFI_LIB_DIR="$efiroot"
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmek AC_ARG_WITH(efi-libdir,
b8079ae19b41c9b61850c796dddc601b826850e0Kay Sievers AS_HELP_STRING([--with-efi-libdir=PATH], [Path to EFI lib directory]),
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers [EFI_LIB_DIR="$withval"], [EFI_LIB_DIR="$efiroot"]
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_SUBST([EFI_LIB_DIR])
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers have_efi_lds=no
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers AC_ARG_WITH(efi-ldsdir,
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers [EFI_LDS_DIR="$withval" && AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [have_efi_lds=yes])],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [AS_FOR([DIR], [EFI_LDS_DIR], ["${EFI_LIB_DIR}/gnuefi" "${EFI_LIB_DIR}"],
a45a909fbbe11ad8c75cda5639d875476ac65453Christian Ruppert [AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers [have_efi_lds=yes && break])])])
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering AS_IF([test "x$have_efi_lds" = xyes],
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering [AC_SUBST([EFI_LDS_DIR])],
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [AS_IF([test "x$enable_gnuefi" = xyes],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_MSG_ERROR([*** gnuefi support requested but files not found])],
1271623839b5bb4f0f383a8ad5500462dda0a94aLennart Poettering [have_gnuefi=no])])
eef65bf3ee6f73afa4a5de23ae3a794a279f30c0Michael Scherer AC_ARG_WITH(efi-includedir,
1271623839b5bb4f0f383a8ad5500462dda0a94aLennart Poettering AS_HELP_STRING([--with-efi-includedir=PATH], [Path to EFI include directory]),
c0467cf387548dc98c0254f63553d862b35a84e5Ronny Chevalier [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering AC_SUBST([EFI_INC_DIR])
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart PoetteringAM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])
f6a971bc0bf1252e9614919ccca0d53db5fc53d9Lennart Poettering# ------------------------------------------------------------------------------
7b17a7d72f5ba5ad838b19803534c56a46f3bce9Lennart PoetteringAC_ARG_WITH(unifont,
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35Lennart Poettering AS_HELP_STRING([--with-unifont=PATH],
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna [UNIFONT="$withval"],
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering [UNIFONT="/usr/share/unifont/unifont.hex"])
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAC_SUBST(UNIFONT)
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poetteringhave_terminal=no
6351163bf3e519cc07adb2732d12450741f5a0d3Umut Tezduyarhave_unifont=no
4de856120f252e7aa19c923c10fbf23310d623aaLennart PoetteringAC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
3731acf1acfb4a6eb68374a5b137f3b368f63381Lennart Poetteringif test "x$enable_terminal" = "xyes"; then
3990f247652c3bd41e4ea074e6302277eb9c7aa3Lennart Poettering PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.5 libdrm >= 2.4], [have_terminal=yes])
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers AC_CHECK_FILE($UNIFONT, [have_unifont=yes])
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering AS_IF([test "x$have_terminal" != xyes -o "x$have_unifont" != "xyes" -a "x$enable_terminal" = xyes],
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna [AC_MSG_ERROR([*** terminal support requested but required dependencies not available])],
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna [test "x$have_terminal" = xyes -a "x$have_unifont" = "xyes"],
a91df40e69fec72cc98c9829721fa5153da28bc2Kay Sievers [AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])])
661278ee297247c0c7e0708924f8ce52284529fcLennart PoetteringAM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes" -a "x$have_unifont" = "xyes"])
7a243b22041595a0c7e0dffb3ef5e2158dde933fJason A. Donenfeld# ------------------------------------------------------------------------------
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart PoetteringAC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do connect to kdbus by default]))
46ba8aae2b82bc5c87ba347e6bf914ecd5e9d51eLennart Poetteringif test "x$enable_kdbus" = "xyes"; then
b872e9a05939bc3e0ac95a042592506a7488dd6fLennart Poettering AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled])
e30431623a7d871da123cc37055ac49abf2c20eaTom Gundersen have_kdbus=yes
f553b3b1074151200187df916427a1468186435eAnders Olofsson M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS"
d562955eac58d3a5089e0f344ea586412a134451Tom GundersenAM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
bd441fa27a22b7c6e11d9330560e0622fb69f297Zbigniew Jędrzejewski-SzmekAC_ARG_WITH(rc-local-script-path-start,
626851be97b4332fc0401d754c81ae7bbc0f5dc4Lennart Poettering AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
8d7e170a5230753d8406276f8b5598e5bb6766e6Lennart Poettering [RC_LOCAL_SCRIPT_PATH_START="$withval"],
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
6aea6d10f460853111ca8744201ec8dade97de3cThomas H.P. AndersenAC_ARG_WITH(rc-local-script-path-stop,
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek [Path to /usr/sbin/halt.local]),
53e856e16ac37fe30b8bb59153ff69aad0fa9c27Zbigniew Jędrzejewski-Szmek [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
b8079ae19b41c9b61850c796dddc601b826850e0Kay SieversAC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers# ------------------------------------------------------------------------------
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-SzmekAC_ARG_WITH(kbd-loadkeys,
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek AS_HELP_STRING([--with-kbd-loadkeys=PATH],
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek [Path to loadkeys]),
2f4da3e6c298bc0ae6243cae47aedb01c50fa870Zbigniew Jędrzejewski-Szmek [KBD_LOADKEYS="$withval"],
f2ec0646aba7c6703a6c79603957e805b74c3befZbigniew Jędrzejewski-Szmek [KBD_LOADKEYS="/usr/bin/loadkeys"])
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart PoetteringAC_ARG_WITH(kbd-setfont,
5c390a4ae0d383b2003074ed011d47876c7e630cZbigniew Jędrzejewski-Szmek AS_HELP_STRING([--with-kbd-setfont=PATH],
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering [Path to setfont]),
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering [KBD_SETFONT="$withval"],
db059f1b031a92ed45b62d1036877abd9c128d1bMichael BieblAC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
4f87c47b35cf9c1f58872559ae67a2656712fdd6William GiokasAC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
b1c4ca25bf58e1925012d1dcdd83d61cecbf87fbLennart PoetteringAC_SUBST(KBD_LOADKEYS)
45df1f2c9a7fee67b37f64ddd00adad5982844faCristian RodríguezAC_SUBST(KBD_SETFONT)
5a45a93627609451784a04366cfa1150d32611d1Lennart PoetteringAC_ARG_WITH(telinit,
1f048a6b6bcc30d2e157711b3d231d7a944e6ffbJan Engelhardt AS_HELP_STRING([--with-telinit=PATH],
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering [Path to telinit]),
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek [TELINIT="$withval"],
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek [TELINIT="/lib/sysvinit/telinit"])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h])
AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
[Specify the path to the base directory for the SysV rcN.d directories])],
AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
[with_dbussessionservicedir=${datadir}/dbus-1/services])
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
with_bashcompletiondir=${datadir}/bash-completion/completions
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[with_pamconfdir=${sysconfdir}/pam.d])
[AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])],
AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads])
utmp/wtmp support: ${have_utmp}