configure.ac revision 626851be97b4332fc0401d754c81ae7bbc0f5dc4
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering#
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# This file is part of systemd.
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering#
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# Copyright 2010-2012 Lennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# Copyright 2010-2012 Kay Sievers
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering#
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# systemd is free software; you can redistribute it and/or modify it
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# under the terms of the GNU Lesser General Public License as published by
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# the Free Software Foundation; either version 2.1 of the License, or
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# (at your option) any later version.
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering#
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# systemd is distributed in the hope that it will be useful, but
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# WITHOUT ANY WARRANTY; without even the implied warranty of
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# Lesser General Public License for more details.
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering#
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# You should have received a copy of the GNU Lesser General Public License
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# along with systemd; If not, see <http://www.gnu.org/licenses/>.
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PREREQ([2.64])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_INIT([systemd],
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering [208],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [systemd],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [http://www.freedesktop.org/wiki/Software/systemd])
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_CONFIG_SRCDIR([src/core/main.c])
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart PoetteringAC_CONFIG_MACRO_DIR([m4])
25300b5a1fcf54674a69d0f4ab08925be00b0227Lennart PoetteringAC_CONFIG_HEADERS([config.h])
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart PoetteringAC_CONFIG_AUX_DIR([build-aux])
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart PoetteringAC_USE_SYSTEM_EXTENSIONS
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart PoetteringAC_SYS_LARGEFILE
b1d4f8e154bf61b5de1b27461ef8e9c8c5e838a1Lennart PoetteringAC_PREFIX_DEFAULT([/usr])
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart PoetteringAM_MAINTAINER_MODE([enable])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_SILENT_RULES([yes])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_CANONICAL_HOST
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringLT_PREREQ(2.2)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringLT_INIT([disable-static])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
3a6fb33c54bc64398e0af1c9d7c74a6b614a849dLennart PoetteringAS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# i18n stuff for the PolicyKit policy files
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart PoetteringIT_PROG_INTLTOOL([0.40.0])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringGETTEXT_PACKAGE=systemd
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SUBST(GETTEXT_PACKAGE)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PROG_MKDIR_P
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PROG_LN_S
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PROG_SED
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PROG_GREP
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PROG_AWK
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PROG_CC_C99
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PATH_PROG([M4], [m4])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PATH_PROG([XSLTPROC], [xsltproc])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PATH_PROG([KILL], [kill], [/usr/bin/kill])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringm4_ifdef([GTK_DOC_CHECK], [
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringGTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering enable_gtk_doc=no])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
03976f7b4a84b8b1492a549a3470b2bba8f37008Lennart Poetteringm4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
634af5665fda8776d22624d947c8de830e30a874Lennart PoetteringGOBJECT_INTROSPECTION_CHECK([1.31.1])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering], [
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering enable_introspection=no])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
634af5665fda8776d22624d947c8de830e30a874Lennart PoetteringAC_CHECK_TOOL(STRINGS, strings)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_CHECK_TOOL(GPERF, gperf)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringif test -z "$GPERF" ; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** gperf not found])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringfi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringaddress_sanitizer_cflags=
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringaddress_sanitizer_cppflags=
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringaddress_sanitizer_ldflags=
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAS_IF([test "x$enable_address_sanitizer" = "xyes"], [
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AS_IF([test -z "$with_as_cflags"],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
634af5665fda8776d22624d947c8de830e30a874Lennart Poettering address_sanitizer_cppflags="-DVALGRIND=1"
634af5665fda8776d22624d947c8de830e30a874Lennart Poettering address_sanitizer_ldflags="-Wc,-fsanitize=address"
634af5665fda8776d22624d947c8de830e30a874Lennart Poettering ])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -pipe \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wall \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wextra \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wno-inline \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wundef \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wlogical-op \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wsign-compare \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wmissing-include-dirs \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wold-style-definition \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wpointer-arith \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Winit-self \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wdeclaration-after-statement \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wfloat-equal \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wmissing-prototypes \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wstrict-prototypes \
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering -Wredundant-decls \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wmissing-declarations \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wmissing-noreturn \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wshadow \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wendif-labels \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wcast-align \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wstrict-aliasing=2 \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wwrite-strings \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wno-long-long \
555bd6e95bf2b469306d9cd86e126c0122d0895bLennart Poettering -Wno-overlength-strings \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wno-unused-parameter \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wno-missing-field-initializers \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wno-unused-result \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Werror=overflow \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -ffast-math \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -fno-common \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -fdiagnostics-show-option \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -fdiagnostics-color \
555bd6e95bf2b469306d9cd86e126c0122d0895bLennart Poettering -fno-strict-aliasing \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -fvisibility=hidden \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -ffunction-sections \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -fdata-sections \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -fstack-protector \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering --param=ssp-buffer-size=4])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -flto])],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SUBST([OUR_CFLAGS], "$with_cflags $address_sanitizer_cflags")
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart PoetteringAS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wp,-D_FORTIFY_SOURCE=2])],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart PoetteringAC_SUBST([OUR_CPPFLAGS], "$with_cppflags $address_sanitizer_cppflags")
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringCC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wl,--as-needed \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wl,--no-undefined \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wl,--gc-sections \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wl,-z,relro \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -Wl,-z,now])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SUBST([OUR_LDFLAGS], "$with_ldflags $address_sanitizer_ldflags")
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# we use python to build the man page index, and for systemd-python
555bd6e95bf2b469306d9cd86e126c0122d0895bLennart Poetteringhave_python=no
555bd6e95bf2b469306d9cd86e126c0122d0895bLennart PoetteringAC_ARG_WITH([python],
555bd6e95bf2b469306d9cd86e126c0122d0895bLennart Poettering [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
555bd6e95bf2b469306d9cd86e126c0122d0895bLennart Poettering
555bd6e95bf2b469306d9cd86e126c0122d0895bLennart PoetteringAS_IF([test "x$with_python" != "xno"], [
9d485985338a46b8cb1acdf1af6c1eb2e88acfeeLennart Poettering AM_PATH_PYTHON(,, [:])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AS_IF([test "$PYTHON" != :], [have_python=yes])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAS_IF([test "x$PYTHON_BINARY" = "x"],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AS_IF([test "x$have_python" = "xyes"],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [PYTHON_BINARY="$(which "$PYTHON")"],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [PYTHON_BINARY=/usr/bin/python])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
634af5665fda8776d22624d947c8de830e30a874Lennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAS_IF([test "x$have_python" != "xyes" -a "x$enable_python_devel" = "xyes"],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_MSG_ERROR([*** python-devel support requires --with-python])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringhave_python_devel=no
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_ENABLE(python_devel, AS_HELP_STRING([--disable-python-devel], [Do not build python modules]))
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAS_IF([test "x$have_python" = "xyes" -a "x$enable_python_devel" != "xno"], [
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [have_python_devel=yes],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [PKG_CHECK_MODULES([PYTHON_DEVEL], [python],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [have_python_devel=yes],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [have_python_devel=no])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_MSG_ERROR([*** python-devel support requested but libraries not found])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_CHECK_HEADERS([linux/btrfs.h], [], [])
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart Poettering
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart Poettering# unconditionally pull-in librt with old glibc versions
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart PoetteringAC_SEARCH_LIBS([clock_gettime], [rt], [], [])
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart Poettering
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart Poetteringsave_LIBS="$LIBS"
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringLIBS=
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringCAP_LIBS="$LIBS"
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SUBST(CAP_LIBS)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringLIBS=
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringRT_LIBS="$LIBS"
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SUBST(RT_LIBS)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringLIBS="$save_LIBS"
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_CHECK_FUNCS([fanotify_init fanotify_mark])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_CHECK_FUNCS([__secure_getenv secure_getenv])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering#include <unistd.h>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering#include <sys/mount.h>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering#include <fcntl.h>]])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
03976f7b4a84b8b1492a549a3470b2bba8f37008Lennart Poettering# This makes sure pkg.m4 is available.
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringm4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringPKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2], have_dbus=yes, have_dbus=no])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAS_IF([test "$have_dbus" = "yes"], [ AC_DEFINE(HAVE_DBUS, [1], [Define if dbus-1 is available]) ])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringhave_coverage=no
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringif test "x$enable_coverage" = "xyes" ; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering if test "x$lcov_found" = xno ; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** lcov support requested but the program was not found])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering else
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering else
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering have_coverage=yes
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -fprofile-arcs \
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering -ftest-coverage])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering fi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering fi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringfi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringhave_kmod=no
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringif test "x$enable_kmod" != "xno"; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering if test "x$have_kmod" = "xyes"; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** kmod version >= 15 not found]))
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering fi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** kmod support requested, but libraries not found])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering fi
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poetteringfi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringhave_blkid=no
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringif test "x$enable_blkid" != "xno"; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** blkid support requested but libraries not found])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering fi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringfi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
9d485985338a46b8cb1acdf1af6c1eb2e88acfeeLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringhave_ima=yes
66a16e7e9fc501d371b57cbe2ae5d130fe930c6dThomas Hindoe Paaboel AndersenAC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [case "${enableval}" in
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering yes) have_ima=yes ;;
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering no) have_ima=no ;;
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering esac],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [have_ima=yes])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringif test "x${have_ima}" != xno ; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringfi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringhave_chkconfig=yes
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [case "${enableval}" in
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering yes) have_chkconfig=yes ;;
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering no) have_chkconfig=no ;;
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering esac],
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering [AC_PATH_PROG(CHKCONFIG, chkconfig)
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering if test -z "$CHKCONFIG"; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering have_chkconfig=no
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering else
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering have_chkconfig=yes
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering fi])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringif test "x${have_chkconfig}" != xno ; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringfi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringhave_selinux=no
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringif test "x$enable_selinux" != "xno"; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** SELinux support requested but libraries not found])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering fi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringfi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_WITH(debug-shell,
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AS_HELP_STRING([--with-debug-shell=PATH],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [Path to debug shell binary]),
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [SUSHELL="$withval"],[
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SUBST(SUSHELL)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_WITH([debug-tty],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AS_HELP_STRING([--with-debug-tty=PATH],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [Specify the tty device for debug shell]),
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [DEBUGTTY="$withval"],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [DEBUGTTY=/dev/tty9])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_SUBST(DEBUGTTY)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringhave_xz=no
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringif test "x$enable_xz" != "xno"; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering PKG_CHECK_MODULES(XZ, [ liblzma ],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** Xz support requested but libraries not found])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering fi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringfi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering# ------------------------------------------------------------------------------
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringAC_ARG_ENABLE([tcpwrap],
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering [case "${enableval}" in
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering yes) have_tcpwrap=yes ;;
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering no) have_tcpwrap=no ;;
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart Poettering esac],
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart Poettering [have_tcpwrap=auto])
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart Poettering
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart Poetteringif test "x${have_tcpwrap}" != xno ; then
e70df46b9721a3d025e7a0b4ffb5893cbde5e55dLennart Poettering ACX_LIBWRAP
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering if test "x${LIBWRAP_LIBS}" = x ; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering if test "x$have_tcpwrap" = xyes ; then
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AC_MSG_ERROR([*** TCP wrappers support not found.])
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering fi
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering have_tcpwrap=no
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering else
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering have_tcpwrap=yes
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringelse
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering LIBWRAP_LIBS=
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_SUBST(LIBWRAP_LIBS)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE([pam],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [case "${enableval}" in
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering yes) have_pam=yes ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering no) have_pam=no ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering esac],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_pam=auto])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x${have_pam}" != xno ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_CHECK_HEADERS(
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_pam=yes],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [if test "x$have_pam" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** PAM headers not found.])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_CHECK_LIB(
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [pam],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [pam_syslog],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_pam=yes],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [if test "x$have_pam" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** libpam not found.])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x$have_pam" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering PAM_LIBS="-lpam -lpam_misc"
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_DEFINE(HAVE_PAM, 1, [PAM available])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering else
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_pam=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringelse
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering PAM_LIBS=
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_SUBST(PAM_LIBS)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE([acl],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [case "${enableval}" in
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering yes) have_acl=yes ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering no) have_acl=no ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering esac],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_acl=auto])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x${have_acl}" != xno ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_CHECK_HEADERS(
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [sys/acl.h acl/libacl.h],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_acl=yes],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [if test "x$have_acl" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** ACL headers not found.])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_CHECK_LIB(
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [acl],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [acl_get_file],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_acl=yes],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [if test "x$have_acl" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** libacl not found.])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x$have_acl" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering ACL_LIBS="-lacl"
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_DEFINE(HAVE_ACL, 1, [ACL available])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering else
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_acl=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringelse
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering ACL_LIBS=
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_SUBST(ACL_LIBS)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE([xattr],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]),
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [case "${enableval}" in
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering yes) have_xattr=yes ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering no) have_xattr=no ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering esac],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_xattr=auto])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x${have_xattr}" != xno ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_CHECK_HEADERS(
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [attr/xattr.h],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_xattr=yes],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [if test "x$have_xattr" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** XATTR headers not found.])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_CHECK_LIB(
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [attr],
c077529ba6852192c464772ce907670850210dfeLennart Poettering [fsetxattr],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_xattr=yes],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [if test "x$have_xattr" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** libattr not found.])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x$have_xattr" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering XATTR_LIBS="-lattr"
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_DEFINE(HAVE_XATTR, 1, [XATTR available])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering else
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_xattr=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringelse
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering XATTR_LIBS=
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_SUBST(XATTR_LIBS)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [case "${enableval}" in
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering yes) have_smack=yes ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering no) have_smack=no ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering esac],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_smack=auto])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x${have_xattr}" = xno; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x${have_smack}" = xyes; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR(SMACK requires xattr support)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering else
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_smack=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringelse
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x${have_smack}" = xauto; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_smack=yes
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_WITH(smack-run-label,
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAS_HELP_STRING([--with-smack-run-label=STRING],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [run systemd --system with a specific SMACK label]),
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x${have_smack}" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE([gcrypt],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [case "${enableval}" in
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering yes) have_gcrypt=yes ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering no) have_gcrypt=no ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering esac],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_gcrypt=auto])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x${have_gcrypt}" != xno ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AM_PATH_LIBGCRYPT(
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [1.4.5],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_gcrypt=yes],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [if test "x$have_gcrypt" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** GCRYPT headers not found.])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x$have_gcrypt" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering GCRYPT_LIBS="$LIBGCRYPT_LIBS"
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering else
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_gcrypt=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringelse
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering GCRYPT_LIBS=
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering GCRYPT_CFLAGS=
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_SUBST(GCRYPT_LIBS)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_SUBST(GCRYPT_CFLAGS)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE([audit],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [case "${enableval}" in
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering yes) have_audit=yes ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering no) have_audit=no ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering esac],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_audit=auto])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x${have_audit}" != xno ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_CHECK_HEADERS(
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [libaudit.h],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_audit=yes],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [if test "x$have_audit" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** AUDIT headers not found.])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_CHECK_LIB(
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [audit],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [audit_open],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [have_audit=yes],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [if test "x$have_audit" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** libaudit not found.])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x$have_audit" = xyes ; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AUDIT_LIBS="-laudit"
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering else
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_audit=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringelse
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AUDIT_LIBS=
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_SUBST(AUDIT_LIBS)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_libcryptsetup=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_libcryptsetup" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_qrencode=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_qrencode" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** qrencode support requested but libraries not found])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_microhttpd=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_microhttpd" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.5],
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering fi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c077529ba6852192c464772ce907670850210dfeLennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_binfmt=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_binfmt" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_binfmt=yes
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_vconsole=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_vconsole" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_vconsole=yes
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_readahead=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_readahead" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_readahead=yes
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_bootchart=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_bootchart" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_bootchart=yes
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_quotacheck=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_quotacheck" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_quotacheck=yes
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_tmpfiles=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_tmpfiles" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_tmpfiles=yes
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_randomseed=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_randomseed" != "xno"; then
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering have_randomseed=yes
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringfi
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poettering# ------------------------------------------------------------------------------
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringhave_backlight=no
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart PoetteringAC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools]))
c01ff965b48bb9693dcd77cbc748b5d8676766b0Lennart Poetteringif test "x$enable_backlight" != "xno"; then
have_backlight=yes
fi
AM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
# ------------------------------------------------------------------------------
have_rfkill=no
AC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools]))
if test "x$enable_rfkill" != "xno"; then
have_rfkill=yes
fi
AM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
# ------------------------------------------------------------------------------
have_logind=no
AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
if test "x$enable_logind" != "xno"; then
have_logind=yes
fi
AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
# ------------------------------------------------------------------------------
have_machined=no
AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
if test "x$enable_machined" != "xno"; then
have_machined=yes
fi
AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
# ------------------------------------------------------------------------------
have_hostnamed=no
AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
if test "x$enable_hostnamed" != "xno"; then
have_hostnamed=yes
fi
AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
# ------------------------------------------------------------------------------
have_timedated=no
AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
if test "x$enable_timedated" != "xno"; then
have_timedated=yes
fi
AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
# ------------------------------------------------------------------------------
have_localed=no
AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
if test "x$enable_localed" != "xno"; then
have_localed=yes
fi
AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
# ------------------------------------------------------------------------------
have_coredump=no
AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
if test "x$enable_coredump" != "xno"; then
have_coredump=yes
fi
AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
# ------------------------------------------------------------------------------
have_polkit=no
AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
if test "x$enable_polkit" != "xno"; then
AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
have_polkit=yes
fi
AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
if test "x$enable_networkd" != "xno"; then
AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
have_networkd=yes
fi
AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
# ------------------------------------------------------------------------------
have_efi=no
AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
if test "x$enable_efi" != "xno"; then
AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
have_efi=yes
fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------
have_multi_seat_x=no
AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x]))
if test "x$enable_multi_seat_x" != "xno"; then
have_multi_seat_x=yes
fi
AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
# ------------------------------------------------------------------------------
have_kdbus=no
AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do not connect to kdbus by default]))
if test "x$enable_kdbus" == "xyes"; then
AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled])
have_kdbus=yes
fi
AM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
# ------------------------------------------------------------------------------
AC_ARG_WITH(rc-local-script-path-start,
AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
[Path to /etc/rc.local]),
[RC_LOCAL_SCRIPT_PATH_START="$withval"],
[RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
AC_ARG_WITH(rc-local-script-path-stop,
AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
[Path to /usr/sbin/halt.local]),
[RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
[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])
AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
# ------------------------------------------------------------------------------
AC_ARG_WITH(kbd-loadkeys,
AS_HELP_STRING([--with-kbd-loadkeys=PATH],
[Path to loadkeys]),
[KBD_LOADKEYS="$withval"],
[KBD_LOADKEYS="/usr/bin/loadkeys"])
AC_ARG_WITH(kbd-setfont,
AS_HELP_STRING([--with-kbd-setfont=PATH],
[Path to setfont]),
[KBD_SETFONT="$withval"],
[KBD_SETFONT="/usr/bin/setfont"])
AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
AC_SUBST(KBD_LOADKEYS)
AC_SUBST(KBD_SETFONT)
AC_ARG_WITH(telinit,
AS_HELP_STRING([--with-telinit=PATH],
[Path to telinit]),
[TELINIT="$withval"],
[TELINIT="/lib/sysvinit/telinit"])
AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
AC_SUBST(TELINIT)
AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])
# ------------------------------------------------------------------------------
have_myhostname=no
AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
if test "x$enable_myhostname" != "xno"; then
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h])
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_FUNC_MALLOC
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
have_myhostname=yes
fi
AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
# ------------------------------------------------------------------------------
AC_ARG_WITH(firmware-path,
AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
[Firmware search path (default="")]),
[], [with_firmware_path=""])
OLD_IFS=$IFS
IFS=:
for i in $with_firmware_path; do
if test "x${FIRMWARE_PATH}" = "x"; then
FIRMWARE_PATH="\\\"${i}/\\\""
else
FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
fi
done
IFS=$OLD_IFS
AC_SUBST(FIRMWARE_PATH)
AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE([gudev],
AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
[], [enable_gudev=yes])
AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0]) ])
AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
AS_IF([test "x$enable_manpages" != xno], [
AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [
AC_MSG_ERROR([*** Manpages requested but xsltproc not found])
])
AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes])
])
AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
# ------------------------------------------------------------------------------
# Location of the init scripts as mandated by LSB
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
M4_DEFINES=
AC_ARG_WITH([sysvinit-path],
[AS_HELP_STRING([--with-sysvinit-path=PATH],
[Specify the path to where the SysV init scripts are located])],
[SYSTEM_SYSVINIT_PATH="$withval"],
[])
AC_ARG_WITH([sysvrcnd-path],
[AS_HELP_STRING([--with-sysvrcnd-path=PATH],
[Specify the path to the base directory for the SysV rcN.d directories])],
[SYSTEM_SYSVRCND_PATH="$withval"],
[])
if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
SYSTEM_SYSV_COMPAT="yes"
M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
else
SYSTEM_SYSV_COMPAT="no"
fi
AC_SUBST(SYSTEM_SYSVINIT_PATH)
AC_SUBST(SYSTEM_SYSVRCND_PATH)
AC_SUBST(M4_DEFINES)
AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
AC_ARG_WITH([tty-gid],
[AS_HELP_STRING([--with-tty-gid=GID],
[Specify the numeric GID of the 'tty' group])],
[AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
[])
AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
[with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
[with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
[with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)])
AC_ARG_WITH([dbusinterfacedir],
AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
[],
[with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)])
AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
[],
[AS_IF([$($PKG_CONFIG --exists bash-completion)], [
with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
] , [
with_bashcompletiondir=${datadir}/bash-completion/completions
])])
AC_ARG_WITH([zshcompletiondir],
AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[], [with_rootprefix=${ac_default_prefix}])
AC_ARG_WITH([rootlibdir],
AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
[],
[with_rootlibdir=${libdir}])
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
[with_pamlibdir=${with_rootlibdir}/security])
AC_ARG_WITH([pamconfdir],
AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
[],
[with_pamconfdir=${sysconfdir}/pam.d])
AC_ARG_ENABLE([split-usr],
AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
[],
[AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
enable_split_usr=yes
], [
enable_split_usr=no
])])
AS_IF([test "x${enable_split_usr}" = "xyes"], [
AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
])
# Work around intltoolize and gtk-doc problems in VPATH builds
AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
[Define to do gtk-doc tests])
AS_IF([test "x$0" != "x./configure"], [
AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
])
AC_ARG_ENABLE(tests,
[AC_HELP_STRING([--disable-tests], [disable tests])],
enable_tests=$enableval, enable_tests=yes)
AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
AC_SUBST([pamlibdir], [$with_pamlibdir])
AC_SUBST([pamconfdir], [$with_pamconfdir])
AC_SUBST([rootprefix], [$with_rootprefix])
AC_SUBST([rootlibdir], [$with_rootlibdir])
AC_CONFIG_FILES([
Makefile po/Makefile.in
docs/libudev/Makefile
docs/libudev/version.xml
docs/gudev/Makefile
docs/gudev/version.xml
])
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE_NAME $VERSION
libcryptsetup: ${have_libcryptsetup}
tcpwrap: ${have_tcpwrap}
PAM: ${have_pam}
AUDIT: ${have_audit}
IMA: ${have_ima}
SELinux: ${have_selinux}
SMACK: ${have_smack}
XZ: ${have_xz}
ACL: ${have_acl}
XATTR: ${have_xattr}
GCRYPT: ${have_gcrypt}
QRENCODE: ${have_qrencode}
MICROHTTPD: ${have_microhttpd}
CHKCONFIG: ${have_chkconfig}
binfmt: ${have_binfmt}
vconsole: ${have_vconsole}
readahead: ${have_readahead}
bootchart: ${have_bootchart}
quotacheck: ${have_quotacheck}
tmpfiles: ${have_tmpfiles}
randomseed: ${have_randomseed}
backlight: ${have_backlight}
rfkill: ${have_rfkill}
logind: ${have_logind}
machined: ${have_machined}
hostnamed: ${have_hostnamed}
timedated: ${have_timedated}
localed: ${have_localed}
coredump: ${have_coredump}
polkit: ${have_polkit}
efi: ${have_efi}
kmod: ${have_kmod}
blkid: ${have_blkid}
nss-myhostname: ${have_myhostname}
gudev: ${enable_gudev}
gintrospection: ${enable_introspection}
multi-seat-x: ${have_multi_seat_x}
kdbus: ${have_kdbus}
Python: ${have_python}
Python Headers: ${have_python_devel}
man pages: ${have_manpages}
gtk-doc: ${enable_gtk_doc}
test coverage: ${have_coverage}
Split /usr: ${enable_split_usr}
SysV compatibility: ${SYSTEM_SYSV_COMPAT}
prefix: ${prefix}
rootprefix: ${with_rootprefix}
sysconf dir: ${sysconfdir}
datarootdir: ${datarootdir}
includedir: ${includedir}
include_prefix: ${INCLUDE_PREFIX}
lib dir: ${libdir}
rootlib dir: ${with_rootlibdir}
SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
Build Python: ${PYTHON}
Installation Python: ${PYTHON_BINARY}
sphinx binary: ${SPHINX_BUILD}
firmware path: ${FIRMWARE_PATH}
PAM modules dir: ${with_pamlibdir}
PAM configuration dir: ${with_pamconfdir}
D-Bus policy dir: ${with_dbuspolicydir}
D-Bus session dir: ${with_dbussessionservicedir}
D-Bus system dir: ${with_dbussystemservicedir}
D-Bus interfaces dir: ${with_dbusinterfacedir}
Bash completions dir: ${with_bashcompletiondir}
Zsh completions dir: ${with_zshcompletiondir}
Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP}
Debug shell: ${SUSHELL} @ ${DEBUGTTY}
CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
PYTHON_CFLAGS: ${PYTHON_DEVEL_CFLAGS}
PYTHON_LIBS: ${PYTHON_DEVEL_LIBS}
])