configure.ac revision 56bf3853b4aefad31edf8631668446007e2347cb
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# This file is part of systemd.
d710d36375bacbf9cfb8903107bedf2c0aada84eMichal Schmidt# Copyright 2010-2012 Lennart Poettering
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# Copyright 2010-2012 Kay Sievers
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# systemd is free software; you can redistribute it and/or modify it
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# under the terms of the GNU Lesser General Public License as published by
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# the Free Software Foundation; either version 2.1 of the License, or
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# (at your option) any later version.
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# systemd is distributed in the hope that it will be useful, but
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# WITHOUT ANY WARRANTY; without even the implied warranty of
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# Lesser General Public License for more details.
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# You should have received a copy of the GNU Lesser General Public License
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# along with systemd; If not, see <http://www.gnu.org/licenses/>.
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PREREQ([2.64])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_INIT([systemd],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [http://www.freedesktop.org/wiki/Software/systemd])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CONFIG_SRCDIR([src/core/main.c])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CONFIG_MACRO_DIR([m4])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CONFIG_HEADERS([config.h])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CONFIG_AUX_DIR([build-aux])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_USE_SYSTEM_EXTENSIONS
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_SYS_LARGEFILE
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PREFIX_DEFAULT([/usr])
7bcd865d386d96caac83cb1c589fdb8f9ce3b081Zbigniew Jędrzejewski-SzmekAM_MAINTAINER_MODE([enable])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects parallel-tests])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAM_SILENT_RULES([yes])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CANONICAL_HOST
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtLT_PREREQ(2.2)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtLT_INIT([disable-static])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtSET_ARCH(X86_64, x86_64*)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtSET_ARCH(IA32, i*86*)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtSET_ARCH(MIPS, mips*)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtSET_ARCH(AARCH64, aarch64*)
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_IF([test x"$intltool_found" != xyes],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AS_IF([test x"$enable_nls" = xyes],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AC_MSG_ERROR([--enable-nls requested but intltool not found])],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AS_IF([test x"$enable_nls" != xno],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AC_MSG_WARN([*** Disabling NLS support because intltool was not found])
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt enable_nls=no])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_IF([test x"$enable_nls" != xno -o "x$enable_polkit" != xno], [
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtIT_PROG_INTLTOOL([0.40.0])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt # If intltool is not available, provide a dummy rule to fail generation of %.policy files with a meaningful error message
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo " ITMRG " $@ && echo "*** intltool support required to build target $@" && false'
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt AC_SUBST(INTLTOOL_POLICY_RULE)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtGETTEXT_PACKAGE=systemd
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_SUBST(GETTEXT_PACKAGE)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [systemd])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PROG_MKDIR_P
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PROG_CC_C99
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([M4], [m4])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([XSLTPROC], [xsltproc])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap], [$PATH:/usr/sbin:/sbin])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_TOOL(OBJCOPY, objcopy)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_TOOL(STRINGS, strings)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_TOOL(GPERF, gperf)
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtif test -z "$GPERF" ; then
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt AC_MSG_ERROR([*** gperf not found])
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# ------------------------------------------------------------------------------
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtaddress_sanitizer_cflags=
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtaddress_sanitizer_cppflags=
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtaddress_sanitizer_ldflags=
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_IF([test "x$enable_address_sanitizer" = "xyes"], [
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt AS_IF([test -z "$with_as_cflags"],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt address_sanitizer_cppflags="-DVALGRIND=1"
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt address_sanitizer_ldflags="-Wc,-fsanitize=address"
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtundefined_sanitizer_cflags=
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtundefined_sanitizer_cppflags=
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtundefined_sanitizer_ldflags=
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_ARG_ENABLE(undefined-sanitizer, AS_HELP_STRING([--enable-undefined-sanitizer], [enable -fsanitize=undefined]))
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_IF([test "x$enable_undefined_sanitizer" = "xyes"], [
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt CC_CHECK_FLAG_APPEND([with_us_cflags], [CFLAGS], [-fsanitize=undefined])
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt AS_IF([test -z "$with_us_cflags"],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AC_MSG_ERROR([*** -fsanitize=undefined is not supported])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt undefined_sanitizer_cflags="$with_us_cflags -fno-omit-frame-pointer -DVALGRIND=1"
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt undefined_sanitizer_cppflags="-DVALGRIND=1"
d710d36375bacbf9cfb8903107bedf2c0aada84eMichal Schmidt undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined"
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtsanitizer_cflags="$address_sanitizer_cflags $undefined_sanitizer_cflags"
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtsanitizer_cppflags="$address_sanitizer_cppflags $undefined_sanitizer_cppflags"
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidtsanitizer_ldflags="$address_sanitizer_ldflags $undefined_sanitizer_ldflags"
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wlogical-op \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wmissing-include-dirs \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wold-style-definition \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wpointer-arith \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Winit-self \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wdeclaration-after-statement \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wfloat-equal \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wsuggest-attribute=noreturn \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Werror=missing-prototypes \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Werror=implicit-function-declaration \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Werror=missing-declarations \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Werror=return-type \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Werror=shadow \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wstrict-prototypes \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wredundant-decls \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wmissing-noreturn \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wendif-labels \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wstrict-aliasing=2 \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wwrite-strings \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wno-unused-parameter \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wno-missing-field-initializers \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wno-unused-result \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wno-format-signedness \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Werror=overflow \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wdate-time \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wnested-externs \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -ffast-math \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -fno-common \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -fdiagnostics-show-option \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -fno-strict-aliasing \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -fvisibility=hidden \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -fstack-protector \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -fstack-protector-strong \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt --param=ssp-buffer-size=4])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_CASE([$CC], [*clang*],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wno-typedef-redefinition \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wno-gnu-variable-sized-type-not-at-end \
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -flto -ffat-lto-objects])],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wp,-D_FORTIFY_SOURCE=2])],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wl,--gc-sections])],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AC_MSG_RESULT([skipping --gc-sections, optimization not enabled])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_SUBST([OUR_CFLAGS], "$with_ldflags $sanitizer_cflags")
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -ffunction-sections -fdata-sections])],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AC_MSG_RESULT([skipping -ffunction/data-section, optimization not enabled])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtCC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wl,--as-needed \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wl,--no-undefined \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wl,-z,relro \
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt -Wl,-fuse-ld=gold])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_SIZEOF(pid_t)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_SIZEOF(uid_t)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_SIZEOF(gid_t)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_SIZEOF(time_t)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_SIZEOF(dev_t)
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_CHECK_SIZEOF(rlim_t,,[
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# ------------------------------------------------------------------------------
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt# we use python to build the man page index
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidthave_python=no
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAC_ARG_WITH([python],
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
b5da077ddf01546c4a85688624d6957766d6c00cMichal SchmidtAS_IF([test "x$with_python" != "xno"], [
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt AM_PATH_PYTHON(,, [:])
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt AS_IF([test "x$PYTHON" != "x:"], [
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt AC_MSG_CHECKING([for python lxml module])
b5da077ddf01546c4a85688624d6957766d6c00cMichal Schmidt AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes])
AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
AC_CHECK_HEADERS([linux/btrfs.h], [], [])
AC_CHECK_HEADERS([linux/memfd.h], [], [])
AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, kcmp, LO_FLAGS_PARTSCAN],
#include <sys/types.h>
#include <unistd.h>
#include <sys/mount.h>
#include <fcntl.h>
#include <sched.h>
#include <linux/loop.h>
#include <linux/random.h>
#include <inttypes.h>
#include <netinet/in.h>
#include <netinet/ether.h>
#include <linux/rtnetlink.h>
#include <net/if.h>
#include <linux/ip.h>
#include <linux/if_tunnel.h>
#include <linux/if_link.h>
#include <linux/if_bridge.h>
#include <linux/if_addr.h>
#include <linux/neighbour.h>
# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
AC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
AS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
AC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
[AC_DEFINE(HAVE_XKBCOMMON, 1, [Define if libxkbcommon is available]) have_xkbcommon=yes], have_xkbcommon=no)
[AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available]) have_libmount=yes], have_libmount=no)
[DEBUGTTY=/dev/tty9])
[Specify the prefix for TLS certificates [/etc/ssl]]),
[CERTIFICATEROOT="/etc/ssl"])
AC_CHECK_HEADERS(bzlib.h,
[AS_IF([test "x$have_bzip2" = xyes], [AC_MSG_ERROR([*** BZIP2 support requested but headers not found])])
AC_CHECK_HEADERS(lz4.h,
[AC_DEFINE_UNQUOTED(SMACK_DEFAULT_PROCESS_LABEL, ["$withval"], [Default SMACK label for executed processes])],
[libaudit.h],
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)
[AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=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]) ])
AC_MSG_WARN([*** Using Google NTP servers. Please do not ship OSes or devices with these default settings. See DISTRO_PORTING for details!])])
[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" && AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
[AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
[EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
[Path to unifont.hex]),
[UNIFONT="/usr/share/unifont/unifont.hex"])
PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.5 libdrm >= 2.4], [have_terminal=yes])
[Path to /etc/rc.local]),
[RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
[Path to /usr/sbin/halt.local]),
[RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
[KBD_LOADKEYS="/usr/bin/loadkeys"])
[KBD_SETFONT="/usr/bin/setfont"])
[TELINIT="/lib/sysvinit/telinit"])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h])
AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
[Specify the path to the base directory for the SysV rcN.d directories])],
AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
[with_dbussessionservicedir=${datadir}/dbus-1/services])
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
with_bashcompletiondir=${datadir}/bash-completion/completions
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[with_pamconfdir=${sysconfdir}/pam.d])
[AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])],
AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads])
AS_IF([test "x$0" != "x./configure"], [
AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
utmp/wtmp support: ${have_utmp}