configure.ac revision c932fb71cc90461b88ecdffe47c071d001d78fb4
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# This file is part of systemd.
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Copyright 2010-2012 Lennart Poettering
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Copyright 2010-2012 Kay Sievers
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# systemd is free software; you can redistribute it and/or modify it
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# under the terms of the GNU Lesser General Public License as published by
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# the Free Software Foundation; either version 2.1 of the License, or
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# (at your option) any later version.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# systemd is distributed in the hope that it will be useful, but
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# WITHOUT ANY WARRANTY; without even the implied warranty of
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# Lesser General Public License for more details.
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# You should have received a copy of the GNU Lesser General Public License
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# along with systemd; If not, see <http://www.gnu.org/licenses/>.
4e949c11a1df4547d5f102e4131e07b026369cd7Javier JardónAC_PREREQ([2.64])
4e949c11a1df4547d5f102e4131e07b026369cd7Javier JardónAC_INIT([systemd],
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón [http://www.freedesktop.org/wiki/Software/systemd])
78a825f216d39ee0295b00647b059d45467e1d02Kay SieversAC_CONFIG_SRCDIR([src/core/main.c])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CONFIG_MACRO_DIR([m4])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CONFIG_HEADERS([config.h])
a80db8bd5f7f15859e8891aab9fc3694ce4cd0bdJavier JardónAC_CONFIG_AUX_DIR([build-aux])
4db6d587c37c0357d20c79bf1a7c9afd4c7ced61Kay SieversAC_USE_SYSTEM_EXTENSIONS
907dd1953b7517534d646f5b2777780020c896e2Kay SieversAC_SYS_LARGEFILE
eb7bbee6cd182d5c4eb1e1180631c35158f59379Kay SieversAC_PREFIX_DEFAULT([/usr])
bbd9b8c2139a70005e4e83d198575e2a10fe1db2Lennart PoetteringAM_MAINTAINER_MODE([enable])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects parallel-tests])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAM_SILENT_RULES([yes])
22be093ffb403a1c474037939ca9b88b1ee39f77Lennart PoetteringAC_CANONICAL_HOST
d59d0a2b4b41a75eaf618b26b8f8bd1e17de7e2bceeAC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
d59d0a2b4b41a75eaf618b26b8f8bd1e17de7e2bceeAC_PROG_CC_C99
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAX_COMPILER_VENDOR
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering AC_CHECK_TOOLS([AR], [gcc-ar ar], [:])
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera AC_CHECK_TOOLS([NM], [gcc-nm nm], [:])
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera AC_CHECK_TOOLS([RANLIB], [gcc-ranlib ranlib], [:])
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraLT_PREREQ(2.2)
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien NoceraLT_INIT([disable-static])
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart PoetteringAS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart PoetteringAS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart PoetteringSET_ARCH(X86_64, x86_64*)
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart PoetteringSET_ARCH(IA32, i*86*)
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringSET_ARCH(MIPS, mips*)
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringSET_ARCH(AARCH64, aarch64*)
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAS_IF([test x"$intltool_found" != xyes],
92ec4495f76a7a2a6c31f5bb2a5240f78dcfe1d2Javier Jardón [AS_IF([test x"$enable_nls" = xyes],
80a5cbace45a6adbf2f9119edc5a4b10db493064Kay Sievers [AC_MSG_ERROR([--enable-nls requested but intltool not found])],
92ec4495f76a7a2a6c31f5bb2a5240f78dcfe1d2Javier Jardón [AS_IF([test x"$enable_nls" != xno],
9e45e7d8f0d8d3f31d790f85694585d0d4b368b8Javier Jardón [AC_MSG_WARN([*** Disabling NLS support because intltool was not found])
6e92b23f0d6dd398848376bbaf47e54a90ed3389Kay Sievers enable_nls=no])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAS_IF([test x"$enable_nls" != xno -o "x$enable_polkit" != xno], [
9a60da2834074d970ca063c210fe9d2f05c70532Thierry Reding # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
9a60da2834074d970ca063c210fe9d2f05c70532Thierry RedingIT_PROG_INTLTOOL([0.40.0])
b62cfcea00862ccbf0e5e297f8a339f70987edefMichael BieblAS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
b62cfcea00862ccbf0e5e297f8a339f70987edefMichael Biebl # If intltool is not available, provide a dummy rule to fail generation of %.policy files with a meaningful error message
9a60da2834074d970ca063c210fe9d2f05c70532Thierry Reding INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo " ITMRG " $@ && echo "*** intltool support required to build target $@" && false'
9c4fa6ed1069e98db5f01a5d1056b443a04cc7d9Lennart Poettering AC_SUBST(INTLTOOL_POLICY_RULE)
9c4fa6ed1069e98db5f01a5d1056b443a04cc7d9Lennart PoetteringGETTEXT_PACKAGE=systemd
eb2e280f9c59b66965c9316eadc4c113a13ca744Lucas De MarchiAC_SUBST(GETTEXT_PACKAGE)
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart PoetteringAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [systemd])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PROG_MKDIR_P
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([M4], [m4])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap], [$PATH:/usr/sbin:/sbin])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart PoetteringAS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
8745297f9853c4a17bac69e1b7e652fe81bc1940Lennart PoetteringAC_CHECK_TOOL(OBJCOPY, objcopy)
d200735e13c52dcfe36c0e066f9f6c2fbfb85a9cMichal SchmidtAC_CHECK_TOOL(STRINGS, strings)
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart PoetteringAC_CHECK_TOOL(GPERF, gperf)
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringif test -z "$GPERF" ; then
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering AC_MSG_ERROR([*** gperf not found])
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri# ------------------------------------------------------------------------------
5a45a93627609451784a04366cfa1150d32611d1Lennart Poetteringaddress_sanitizer_cflags=
c1663b9daf5a43425e54bbe3daf6b10e64578f80Lennart Poetteringaddress_sanitizer_cppflags=
c1663b9daf5a43425e54bbe3daf6b10e64578f80Lennart Poetteringaddress_sanitizer_ldflags=
5a45a93627609451784a04366cfa1150d32611d1Lennart PoetteringAC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
5a45a93627609451784a04366cfa1150d32611d1Lennart PoetteringAS_IF([test "x$enable_address_sanitizer" = "xyes"], [
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering AS_IF([test -z "$with_as_cflags"],
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
9e7adc3ae1133fa08a468768a490812299fad030Lucas De Marchi address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
9e7adc3ae1133fa08a468768a490812299fad030Lucas De Marchi address_sanitizer_cppflags="-DVALGRIND=1"
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri address_sanitizer_ldflags="-Wc,-fsanitize=address"
5a45a93627609451784a04366cfa1150d32611d1Lennart Poetteringundefined_sanitizer_cflags=
5a45a93627609451784a04366cfa1150d32611d1Lennart Poetteringundefined_sanitizer_cppflags=
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringundefined_sanitizer_ldflags=
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringAC_ARG_ENABLE(undefined-sanitizer, AS_HELP_STRING([--enable-undefined-sanitizer], [enable -fsanitize=undefined]))
afea26ad7d406d8b6c95d2642cb5a1d807b87546Lennart PoetteringAS_IF([test "x$enable_undefined_sanitizer" = "xyes"], [
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Biebl CC_CHECK_FLAG_APPEND([with_us_cflags], [CFLAGS], [-fsanitize=undefined])
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Biebl AS_IF([test -z "$with_us_cflags"],
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Biebl [AC_MSG_ERROR([*** -fsanitize=undefined is not supported])])
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering undefined_sanitizer_cflags="$with_us_cflags -fno-omit-frame-pointer -DVALGRIND=1"
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering undefined_sanitizer_cppflags="-DVALGRIND=1"
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Biebl undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined"
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringsanitizer_cflags="$address_sanitizer_cflags $undefined_sanitizer_cflags"
b237ef2cfac7ab0b33170809e8cb64628606207dTollef Fog Heensanitizer_cppflags="$address_sanitizer_cppflags $undefined_sanitizer_cppflags"
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremersanitizer_ldflags="$address_sanitizer_ldflags $undefined_sanitizer_ldflags"
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Wlogical-op \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Wmissing-include-dirs \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Wold-style-definition \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Wpointer-arith \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Winit-self \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Wdeclaration-after-statement \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Wfloat-equal \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Wsuggest-attribute=noreturn \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Werror=missing-prototypes \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Werror=implicit-function-declaration \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Werror=missing-declarations \
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu -Werror=return-type \
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers -Wstrict-prototypes \
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering -Wredundant-decls \
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering -Wmissing-noreturn \
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering -Wendif-labels \
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering -Wstrict-aliasing=2 \
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering -Wwrite-strings \
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering -Wno-unused-parameter \
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering -Wno-missing-field-initializers \
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh -Wno-unused-result \
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering -Wno-format-signedness \
ed061a8dc2acd93c2eb569d2d983d5a77f7e5b77Michal Schmidt -Werror=overflow \
ed061a8dc2acd93c2eb569d2d983d5a77f7e5b77Michal Schmidt -Wdate-time \
ed061a8dc2acd93c2eb569d2d983d5a77f7e5b77Michal Schmidt -Wnested-externs \
ed061a8dc2acd93c2eb569d2d983d5a77f7e5b77Michal Schmidt -ffast-math \
ed061a8dc2acd93c2eb569d2d983d5a77f7e5b77Michal Schmidt -fno-common \
ed061a8dc2acd93c2eb569d2d983d5a77f7e5b77Michal Schmidt -fdiagnostics-show-option \
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh -fno-strict-aliasing \
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers -fvisibility=hidden \
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering -fstack-protector \
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering -fstack-protector-strong \
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering --param=ssp-buffer-size=4])
807e17f05e217b474af39503efb9503d81b12596Lennart PoetteringCC_CHECK_FLAG_APPEND([with_cflags], [CFLAGS], [-Werror=shadow], [
807e17f05e217b474af39503efb9503d81b12596Lennart Poetteringtypedef uint64_t usec_t;
807e17f05e217b474af39503efb9503d81b12596Lennart Poetteringusec_t now(clockid_t clock);
807e17f05e217b474af39503efb9503d81b12596Lennart Poetteringint main(void) {
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers struct timespec now;
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAS_CASE([$CC], [*clang*],
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering -Wno-typedef-redefinition \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering -Wno-gnu-variable-sized-type-not-at-end \
0213c3f8102bdc934c629d11a44ca0b408762287Lennart PoetteringAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
0213c3f8102bdc934c629d11a44ca0b408762287Lennart PoetteringAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
0213c3f8102bdc934c629d11a44ca0b408762287Lennart PoetteringAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering -Wp,-D_FORTIFY_SOURCE=2])],
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
0213c3f8102bdc934c629d11a44ca0b408762287Lennart PoetteringAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering [CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers -Wl,--gc-sections])],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_MSG_RESULT([skipping --gc-sections, optimization not enabled])])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_SUBST([OUR_CFLAGS], "$with_ldflags $sanitizer_cflags")
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering -ffunction-sections -fdata-sections])],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AC_MSG_RESULT([skipping -ffunction/data-section, optimization not enabled])])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringCC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering -Wl,--as-needed \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering -Wl,--no-undefined \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering -Wl,-z,relro \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering -Wl,-fuse-ld=gold])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_CHECK_SIZEOF(pid_t)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_CHECK_SIZEOF(uid_t)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_CHECK_SIZEOF(gid_t)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_CHECK_SIZEOF(time_t)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_CHECK_SIZEOF(dev_t)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_CHECK_SIZEOF(rlim_t,,[
812cce323db081634f37e4ec6d29f2b9328a3f52Lennart Poettering# ------------------------------------------------------------------------------
812cce323db081634f37e4ec6d29f2b9328a3f52Lennart Poettering# we use python to build the man page index
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAC_ARG_WITH([python],
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAS_IF([test "x$with_python" != "xno"], [
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering AM_PATH_PYTHON(,, [:])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AS_IF([test "x$PYTHON" != "x:"], [
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AC_MSG_CHECKING([for python lxml module])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AC_MSG_RESULT([$have_lxml])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [AC_MSG_WARN([*** python support requires python-lxml module installed])])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAS_IF([test "$have_python" != "yes"], [
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AS_IF([test "$with_python" = "yes"],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [AC_MSG_ERROR([*** python support requested but python support not found])])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering AS_IF([test "$with_python" != "no"],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [AC_MSG_WARN([*** python support not found, some documentation cannot be built])])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering# ------------------------------------------------------------------------------
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_CHECK_HEADERS([linux/btrfs.h], [], [])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_CHECK_HEADERS([linux/memfd.h], [], [])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering# unconditionally pull-in librt with old glibc versions
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_SEARCH_LIBS([clock_gettime], [rt], [], [])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poetteringsave_LIBS="$LIBS"
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringCAP_LIBS="$LIBS"
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringLIBS="$save_LIBS"
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_SUBST(CAP_LIBS)
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_CHECK_FUNCS([memfd_create])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_CHECK_FUNCS([__secure_getenv secure_getenv])
5eda94dda25bccda928c4b33c790dbe748573a22Lennart PoetteringAC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2,
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering kcmp, keyctl, key_serial_t, char16_t, char32_t, LO_FLAGS_PARTSCAN],
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringAC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_MACVLAN_FLAGS,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_IPVLAN_MODE,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_VTI_REMOTE,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_PHYS_PORT_ID,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_BOND_AD_INFO,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_VLAN_PROTOCOL,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_VXLAN_REMCSUM_NOPARTIAL,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_IPTUN_ENCAP_DPORT,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_GRE_ENCAP_DPORT,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_BRIDGE_VLAN_INFO,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_BRPORT_LEARNING_SYNC,
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering IFLA_BR_PRIORITY,
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# This makes sure pkg.m4 is available.
7f4e08056de0184b205a20632e62db73d299937eLennart Poetteringm4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering# ------------------------------------------------------------------------------
7f4e08056de0184b205a20632e62db73d299937eLennart PoetteringAC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests]))
7f4e08056de0184b205a20632e62db73d299937eLennart PoetteringAS_IF([test "x$enable_dbus" != "xno"], [
591622d7efbc828f00f190d91b6608148b967ff5Lennart Poettering PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2],
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes],
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [have_dbus=no])
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"],
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna# ------------------------------------------------------------------------------
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajnahave_utmp=yes
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay SieversAC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna AS_CASE("x${enableval}",
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna [xyes], [have_utmp=yes],
27669061f40766457db93d5cc3dfe00dce240806Miklos Vajna [xno], [have_utmp=no],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers# ------------------------------------------------------------------------------
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poetteringhave_compat_libs=no
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering [case "${enableval}" in
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers yes) have_compat_libs=yes ;;
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering no) have_compat_libs=no ;;
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libs) ;;
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers [have_compat_libs=no])
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart PoetteringAM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"])
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_coverage=no
4de856120f252e7aa19c923c10fbf23310d623aaLennart PoetteringAC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poetteringif test "x$enable_coverage" = "xyes" ; then
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers if test "x$lcov_found" = xno ; then
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering AC_MSG_ERROR([*** lcov support requested but the program was not found])
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers have_coverage=yes
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering -fprofile-arcs \
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering -ftest-coverage])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay SieversAM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers# ------------------------------------------------------------------------------
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay SieversAC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_kmod" != "xno"; then
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna if test "x$have_kmod" = "xyes"; then
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna AC_MSG_ERROR([*** kmod version >= 15 not found]))
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** kmod support requested, but libraries not found])
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos VajnaAM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna# ------------------------------------------------------------------------------
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajnahave_xkbcommon=no
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos VajnaAC_ARG_ENABLE(xkbcommon, AS_HELP_STRING([--disable-xkbcommon], [disable xkbcommon keymap support]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_xkbcommon" != "xno"; then
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna PKG_CHECK_MODULES(XKBCOMMON, [ xkbcommon >= 0.3.0 ],
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna [AC_DEFINE(HAVE_XKBCOMMON, 1, [Define if libxkbcommon is available]) have_xkbcommon=yes], have_xkbcommon=no)
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos Vajna if test "x$have_xkbcommon" = xno -a "x$enable_xkbcommon" = xyes; then
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers AC_MSG_ERROR([*** xkbcommon support requested but libraries not found])
4cd1eaa54507a65286413363216ad407fa7c6e50Miklos VajnaAM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering# ------------------------------------------------------------------------------
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart PoetteringAC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sieversif test "x$enable_blkid" != "xno"; then
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering PKG_CHECK_MODULES(BLKID, [ blkid >= 2.24 ],
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** blkid support requested but libraries not found])
9a203affa6e1866f9b9b68501d10102d21c9d0daKay SieversAM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sievers# ------------------------------------------------------------------------------
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sievershave_libmount=no
9a203affa6e1866f9b9b68501d10102d21c9d0daKay SieversPKG_CHECK_MODULES(MOUNT, [ mount >= 2.27 ],
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sievers [AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available]) have_libmount=yes], have_libmount=no)
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sieversif test "x$have_libmount" = xno; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** libmount support required but libraries not found])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(HAVE_LIBMOUNT, [test "$have_libmount" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sievershave_seccomp=no
9a203affa6e1866f9b9b68501d10102d21c9d0daKay SieversAC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support]))
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sieversif test "x$enable_seccomp" != "xno"; then
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sievers PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0],
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sievers [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available])
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sievers have_seccomp=yes
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sievers M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"],
9a203affa6e1866f9b9b68501d10102d21c9d0daKay Sievers [have_seccomp=no])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** seccomp support requested but libraries not found])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [case "${enableval}" in
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers yes) have_ima=yes ;;
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers no) have_ima=no ;;
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [have_ima=yes])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x${have_ima}" != xno ; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_selinux=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_selinux" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_selinux=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [have_selinux=no])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AC_MSG_ERROR([*** SELinux support requested but libraries not found])
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievershave_apparmor=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE(apparmor, AS_HELP_STRING([--disable-apparmor], [Disable optional AppArmor support]))
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sieversif test "x$enable_apparmor" != "xno"; then
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers PKG_CHECK_MODULES([APPARMOR], [libapparmor],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [AC_DEFINE(HAVE_APPARMOR, 1, [Define if AppArmor is available])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_apparmor=yes
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers M4_DEFINES="$M4_DEFINES -DHAVE_APPARMOR"],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [have_apparmor=no])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers if test "x$have_apparmor" = xno -a "x$enable_apparmor" = xyes; then
75db9a77605b33a1b9355eae957f26380441fce6Lennart Poettering AC_MSG_ERROR([*** AppArmor support requested but libraries not found])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay SieversAM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"])
75db9a77605b33a1b9355eae957f26380441fce6Lennart PoetteringAC_ARG_WITH(debug-shell,
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AS_HELP_STRING([--with-debug-shell=PATH],
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering [Path to debug shell binary]),
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering [SUSHELL="$withval"],[
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringAC_SUBST(SUSHELL)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringAC_ARG_WITH([debug-tty],
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering AS_HELP_STRING([--with-debug-tty=PATH],
c87f7103fe38434f0b88df5c2b080c7b558feabfZbigniew Jędrzejewski-Szmek [Specify the tty device for debug shell]),
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering [DEBUGTTY="$withval"],
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringAC_SUBST(DEBUGTTY)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringAC_ARG_WITH([certificate-root],
7d568925bda9797f611e36d1d00cd941701cb3c8Lennart Poettering AS_HELP_STRING([--with-certificate-root=PATH],
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering [Specify the prefix for TLS certificates [/etc/ssl]]),
34eff652cedec3cac34b92629ead5f140334b689Lennart Poettering [CERTIFICATEROOT="$withval"],
34eff652cedec3cac34b92629ead5f140334b689Lennart Poettering [CERTIFICATEROOT="/etc/ssl"])
34eff652cedec3cac34b92629ead5f140334b689Lennart PoetteringAC_SUBST(CERTIFICATEROOT)
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering# ------------------------------------------------------------------------------
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringAC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringAS_IF([test "x$enable_xz" != "xno"], [
2c696a96a2bd63d2ff0d5595622124ef9270b172Lennart Poettering PKG_CHECK_MODULES(XZ, [ liblzma ],
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart Poettering [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available])
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering AS_IF([test "x$have_xz" = xno -a "x$enable_xz" = xyes],
634826b51b074b2e6d9314031bdd9abdcf862b54Pavol Rusnak [AC_MSG_ERROR([*** XZ support requested but libraries not found])])
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringAM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering# ------------------------------------------------------------------------------
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart PoetteringAC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib], [Disable optional ZLIB support]))
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringAS_IF([test "x$enable_zlib" != "xno"], [
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds PKG_CHECK_MODULES(ZLIB, [ zlib ],
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds [AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available])
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds have_zlib=yes],
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds AS_IF([test "x$have_zlib" = xno -a "x$enable_zlib" = xyes],
d7c114c00030309435fc56c77c8578a25d228ebeDave Reisner [AC_MSG_ERROR([*** ZLIB support requested but libraries not found])])
4bf43a32a96465d2f9c244adea3e661075f208bfTom GundersenAM_CONDITIONAL(HAVE_ZLIB, [test "$have_zlib" = "yes"])
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart Poettering# ------------------------------------------------------------------------------
d7c114c00030309435fc56c77c8578a25d228ebeDave Reisnerhave_bzip2=no
f2b4af1cd4112df6ce56f8fc1e677639935e3d0eFabian HenzeAC_ARG_ENABLE(bzip2, AS_HELP_STRING([--enable-bzip2], [Disable optional BZIP2 support]))
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioAS_IF([test "x$enable_bzip2" != "xno"], [
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio AC_CHECK_HEADERS(bzlib.h,
f2b4af1cd4112df6ce56f8fc1e677639935e3d0eFabian Henze [AC_DEFINE(HAVE_BZIP2, 1, [Define if BZIP2 is available])
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart Poettering have_bzip2=yes],
f2b4af1cd4112df6ce56f8fc1e677639935e3d0eFabian Henze [AS_IF([test "x$enable_bzip2" = xyes],
65c8976ab12f13fc339a16d108e620bf2fd703f4Malcolm Studd [AC_MSG_ERROR([*** BZIP2 support requested but headers not found])])]
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart PoetteringAM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
f5c88ec1330b61787441156de7d764a140774bd2Miklos Vajna# ------------------------------------------------------------------------------
f5c88ec1330b61787441156de7d764a140774bd2Miklos VajnaAC_ARG_ENABLE(lz4, AS_HELP_STRING([--disable-lz4], [Disable optional LZ4 support]))
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart PoetteringAS_IF([test "x$enable_lz4" != "xno"], [
f5c88ec1330b61787441156de7d764a140774bd2Miklos Vajna PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ],
a338bab5d0603a179befce062bc6fc8a6521a232Alexey Shabalin [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available])
a338bab5d0603a179befce062bc6fc8a6521a232Alexey Shabalin have_lz4=yes],
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart Poettering AS_IF([test "x$have_lz4" = xno -a "x$enable_lz4" = xyes],
a338bab5d0603a179befce062bc6fc8a6521a232Alexey Shabalin [AC_MSG_ERROR([*** LZ4 support requested but libraries not found])])
1de4d79bf554946f486adf56ed765c5335816f15Andrey BorzenkovAM_CONDITIONAL(HAVE_LZ4, [test "$have_lz4" = "yes"])
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart PoetteringAM_CONDITIONAL(HAVE_COMPRESSION, [test "$have_xz" = "yes" -o "$have_lz4" = "yes"])
1bd8b8184ee3bc7fc023d6d6dfb2ca99fb6612f3Koen Kooi# ------------------------------------------------------------------------------
1bd8b8184ee3bc7fc023d6d6dfb2ca99fb6612f3Koen KooiAC_ARG_ENABLE([pam],
1bd8b8184ee3bc7fc023d6d6dfb2ca99fb6612f3Koen Kooi AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart Poettering [case "${enableval}" in
1bd8b8184ee3bc7fc023d6d6dfb2ca99fb6612f3Koen Kooi yes) have_pam=yes ;;
6fdae8a6a40d6a3b5f77516abaee23b3eab002f6Dexter Morgan no) have_pam=no ;;
6fdae8a6a40d6a3b5f77516abaee23b3eab002f6Dexter Morgan *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
fbf5b12653e29674b1e85c73d446b13ac3a15b38Colin Guthrie [have_pam=auto])
bf024b022d9f53d2bb8d26107b4878cede3167b7Tollef Fog Heenif test "x${have_pam}" != xno ; then
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering AC_CHECK_HEADERS(
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
bf024b022d9f53d2bb8d26107b4878cede3167b7Tollef Fog Heen [have_pam=yes],
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering [if test "x$have_pam" = xyes ; then
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering AC_MSG_ERROR([*** PAM headers not found.])
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers AC_CHECK_LIB(
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers [pam_syslog],
be31376e6c9add0786f31a38eec2ecfdb73eb115Kay Sievers [have_pam=yes],
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen [if test "x$have_pam" = xyes ; then
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen AC_MSG_ERROR([*** libpam not found.])
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen if test "x$have_pam" = xyes ; then
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen PAM_LIBS="-lpam -lpam_misc"
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen AC_DEFINE(HAVE_PAM, 1, [PAM available])
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_PAM"
f975e971accc4d50c73ae53167db3df7a7099cf2Lennart PoetteringAC_SUBST(PAM_LIBS)
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioAM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio# ------------------------------------------------------------------------------
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioAC_ARG_ENABLE([acl],
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio [case "${enableval}" in
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poettering yes) have_acl=yes ;;
a05ea46dc788929bc8b13afb4208ca29cad68572Michael Biebl no) have_acl=no ;;
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
bef2733fae665e880da6ea011b1f918e6900bb42Lennart Poettering [have_acl=auto])
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poetteringif test "x${have_acl}" != xno ; then
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering AC_CHECK_HEADERS(
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds [have_acl=yes],
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds [if test "x$have_acl" = xyes ; then
d7c114c00030309435fc56c77c8578a25d228ebeDave Reisner AC_MSG_ERROR([*** ACL headers not found.])
f5c88ec1330b61787441156de7d764a140774bd2Miklos Vajna AC_CHECK_LIB(
1de4d79bf554946f486adf56ed765c5335816f15Andrey Borzenkov [acl_get_file],
1bd8b8184ee3bc7fc023d6d6dfb2ca99fb6612f3Koen Kooi [have_acl=yes],
6fdae8a6a40d6a3b5f77516abaee23b3eab002f6Dexter Morgan [if test "x$have_acl" = xyes ; then
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering AC_MSG_ERROR([*** libacl not found.])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering if test "x$have_acl" = xyes ; then
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering ACL_LIBS="-lacl"
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering AC_DEFINE(HAVE_ACL, 1, [ACL available])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering M4_DEFINES="$M4_DEFINES -DHAVE_ACL"
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_SUBST(ACL_LIBS)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering# ------------------------------------------------------------------------------
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart PoetteringAC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [case "${enableval}" in
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering yes) have_smack=yes ;;
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering no) have_smack=no ;;
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
b8079ae19b41c9b61850c796dddc601b826850e0Kay Sievers [have_smack=auto])
39ad55a9aa99451f982628af6e14581092b2d2f6Kay Sieversif test "x${have_smack}" != xno; then
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers M4_DEFINES="$M4_DEFINES -DHAVE_SMACK"
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers have_smack=yes
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay SieversAM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"])
b0cca7d886583a10b9342796b4619eca4d582cb2Michael Bieblhave_smack_run_label=no
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay SieversAC_ARG_WITH(smack-run-label,
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay SieversAS_HELP_STRING([--with-smack-run-label=STRING],
9d3203b4765e64300ab8e8d6d3d1b9ed0c514d5eKay Sievers [run systemd --system itself with a specific SMACK label]),
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run systemd itself with SMACK label]) have_smack_run_label=yes],
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górnyif test "x${have_smack_run_label}" = xyes; then
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny M4_DEFINES="$M4_DEFINES -DHAVE_SMACK_RUN_LABEL"
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyAC_ARG_WITH(smack-default-process-label,
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał GórnyAS_HELP_STRING([--with-smack-default-process-label=STRING],
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górny [default SMACK label for executed processes]),
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering [AC_DEFINE_UNQUOTED(SMACK_DEFAULT_PROCESS_LABEL, ["$withval"], [Default SMACK label for executed processes])],
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering# ------------------------------------------------------------------------------
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringAC_ARG_ENABLE([gcrypt],
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering [case "${enableval}" in
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering yes) have_gcrypt=yes ;;
b8079ae19b41c9b61850c796dddc601b826850e0Kay Sievers no) have_gcrypt=no ;;
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers [have_gcrypt=auto])
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sieversif test "x${have_gcrypt}" != xno ; then
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers m4_define([AM_PATH_LIBGCRYPT_FAIL],
bb061708d5aa83579f213bdfb67253f7027217c3Kay Sievers [{ test "x$have_gcrypt" != xyes || AC_MSG_ERROR([*** GCRYPT/GPG-ERROR headers not found.]); }]
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers m4_ifdef([AM_PATH_LIBGCRYPT], [AM_PATH_LIBGCRYPT(
a45a909fbbe11ad8c75cda5639d875476ac65453Christian Ruppert [have_gcrypt=yes],
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers dnl If we have the gcrypt m4 macros, but don't have
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering dnl gcrypt, throw an error if gcrypt is explicitly
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering dnl requested.
2c696a96a2bd63d2ff0d5595622124ef9270b172Lennart Poettering [AM_PATH_LIBGCRYPT_FAIL]
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering dnl If we don't have the gcrypt m4 macros, but build with
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering dnl gcrypt explicitly requested, throw an error.
7f4e08056de0184b205a20632e62db73d299937eLennart Poettering [AM_PATH_LIBGCRYPT_FAIL]
1271623839b5bb4f0f383a8ad5500462dda0a94aLennart Poettering have_gpg_error=no
816115863962548a9a0d9fbfe429c7f8e685beacRoberto Sassu m4_ifdef([AM_PATH_GPG_ERROR], [AM_PATH_GPG_ERROR(
807e17f05e217b474af39503efb9503d81b12596Lennart Poettering [have_gpg_error=yes],
5eda94dda25bccda928c4b33c790dbe748573a22Lennart Poettering [AM_PATH_LIBGCRYPT_FAIL]
e5e83e8362e946890ac991fc86a2c5869f9befdfLennart Poettering [AM_PATH_LIBGCRYPT_FAIL]
4de856120f252e7aa19c923c10fbf23310d623aaLennart Poettering if test "x$have_gcrypt" = xyes -a "x$have_gpg_error" = xyes ; then
2a018e83ded29c9719b2478a65ee6245c829c0f5Kay Sievers GCRYPT_LIBS="$LIBGCRYPT_LIBS $GPG_ERROR_LIBS"
b2e9fb99ab288e8817302851743ed1a3cddd384bMiklos Vajna GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS $GPG_ERROR_CFLAGS"
f47cd184c0ff80e025428e9e385e61bda1ef3d69Miklos Vajna AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
f5e04665ebf7124f3ea17dcf258793ed73a95fe1Lennart Poettering have_gcrypt=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers have_gpg_error=no
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers GCRYPT_LIBS=
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers GCRYPT_CFLAGS=
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_SUBST(GCRYPT_LIBS)
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart PoetteringAC_SUBST(GCRYPT_CFLAGS)
b8079ae19b41c9b61850c796dddc601b826850e0Kay SieversAM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ------------------------------------------------------------------------------
3e2147858f21943d5f4a781c60f33ac22c6096edKay SieversAC_ARG_ENABLE([audit],
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers [case "${enableval}" in
ae446765eb0605d2451bb4dd7c336672bcc7ab0cKay Sievers yes) have_audit=yes ;;
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering no) have_audit=no ;;
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
2c6db6fb9b1a10184b086df0d23228c4c0205a49Lennart Poettering [have_audit=auto])
bc9bdbbab45ea2c10fdd8ad7c517b5e4a358bdfbMichał Górnyif test "x${have_audit}" != xno ; then
5ee9f21e86bb6a06d3eb956546f85338e81395e6Lennart Poettering AC_CHECK_HEADERS(
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering [have_audit=yes],
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering [if test "x$have_audit" = xyes ; then
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering AC_MSG_ERROR([*** AUDIT headers not found.])
AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
[AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
[AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
AS_IF([test "$have_importd" = "yes"], [ AC_DEFINE(HAVE_IMPORTD, [1], [Importd support available]) ])
[TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"])
[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`"])
[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`"])
AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
efiroot=$(echo $(cd /usr/lib/$(${EFI_CC} -print-multi-os-directory); pwd))
[EFI_LDS_DIR="$withval" && AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
[AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
[EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
[Path to /etc/rc.local]),
[RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
[Path to /usr/sbin/halt.local]),
[RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
[KBD_LOADKEYS="/usr/bin/loadkeys"])
[KBD_SETFONT="/usr/bin/setfont"])
[TELINIT="/lib/sysvinit/telinit"])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h])
AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
[Specify the path to the base directory for the SysV rcN.d directories])],
AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
[with_dbussessionservicedir=${datadir}/dbus-1/services])
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
with_bashcompletiondir=${datadir}/bash-completion/completions
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[with_pamconfdir=${sysconfdir}/pam.d])
AS_IF([test "x$0" != "x./configure"], [
AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
utmp/wtmp support: ${have_utmp}