configure.ac revision d6a195a3c373f67632cb98d6e6e14f974ef062f9
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers#
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# This file is part of systemd.
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers#
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# Copyright 2010-2012 Lennart Poettering
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# Copyright 2010-2012 Kay Sievers
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers#
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# systemd is free software; you can redistribute it and/or modify it
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# under the terms of the GNU Lesser General Public License as published by
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# the Free Software Foundation; either version 2.1 of the License, or
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# (at your option) any later version.
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers#
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# systemd is distributed in the hope that it will be useful, but
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# WITHOUT ANY WARRANTY; without even the implied warranty of
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# Lesser General Public License for more details.
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers#
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# You should have received a copy of the GNU Lesser General Public License
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# along with systemd; If not, see <http://www.gnu.org/licenses/>.
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay SieversAC_PREREQ([2.64])
ad37f393fa97f4274cc3bf97a0d8c388a429037eKay Sievers
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay SieversAC_INIT([systemd],
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sievers [197],
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sievers [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sievers [systemd],
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sievers [http://www.freedesktop.org/wiki/Software/systemd])
25da63b9dac8f166ebf390ca92d1de18fbfc9d11Kay Sievers
25da63b9dac8f166ebf390ca92d1de18fbfc9d11Kay SieversAC_CONFIG_SRCDIR([src/core/main.c])
ad37f393fa97f4274cc3bf97a0d8c388a429037eKay SieversAC_CONFIG_MACRO_DIR([m4])
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan EngelhardtAC_CONFIG_HEADERS([config.h])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik BruecknerAC_CONFIG_AUX_DIR([build-aux])
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversAC_USE_SYSTEM_EXTENSIONS
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay SieversAC_SYS_LARGEFILE
ad37f393fa97f4274cc3bf97a0d8c388a429037eKay SieversAC_PREFIX_DEFAULT([/usr])
d4b687c96adf207f0878aebf3ce3371f6160687fKay SieversAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news])
d4b687c96adf207f0878aebf3ce3371f6160687fKay SieversAM_SILENT_RULES([yes])
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom GundersenAC_CANONICAL_HOST
3058e017fced6d5c8712e10c8c1477421bc1e960Thadeu Lima de Souza CascardoAC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
1328f66ad16b5afeb5684858c27e121a46c1959eKay SieversAS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
3058e017fced6d5c8712e10c8c1477421bc1e960Thadeu Lima de Souza Cascardo test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovern [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovernSD_CHECK_MAX_INT_SIZE([time_t], [#include <time.h>])
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sievers
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay SieversLT_PREREQ(2.2)
ad37f393fa97f4274cc3bf97a0d8c388a429037eKay SieversLT_INIT([disable-static])
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sievers
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers# i18n stuff for the PolicyKit policy files
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovernIT_PROG_INTLTOOL([0.40.0])
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovern
0d6ce9236f61cb991d7e8f2359d818e41ead0cf5Kay SieversGETTEXT_PACKAGE=systemd
0d6ce9236f61cb991d7e8f2359d818e41ead0cf5Kay SieversAC_SUBST(GETTEXT_PACKAGE)
0d6ce9236f61cb991d7e8f2359d818e41ead0cf5Kay Sievers
0d6ce9236f61cb991d7e8f2359d818e41ead0cf5Kay SieversAC_PROG_MKDIR_P
ad37f393fa97f4274cc3bf97a0d8c388a429037eKay SieversAC_PROG_LN_S
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan EngelhardtAC_PROG_SED
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversAC_PROG_GREP
f610d6de38119b372b377ec41b2a6089872d3294Kay SieversAC_PROG_AWK
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan EngelhardtAC_PROG_CC
f610d6de38119b372b377ec41b2a6089872d3294Kay SieversAC_PROG_CC_C99
f610d6de38119b372b377ec41b2a6089872d3294Kay SieversAM_PROG_CC_C_O
f610d6de38119b372b377ec41b2a6089872d3294Kay SieversAC_PROG_GCC_TRADITIONAL
de892aea1c486b59e04884268b612081d1660514Kay Sievers
f610d6de38119b372b377ec41b2a6089872d3294Kay SieversAC_PATH_PROG([M4], [m4])
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan EngelhardtAC_PATH_PROG([XSLTPROC], [xsltproc])
decd634e801bee2c554edb35383cc9d43417a850Kay Sievers
decd634e801bee2c554edb35383cc9d43417a850Kay SieversAC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon])
decd634e801bee2c554edb35383cc9d43417a850Kay SieversAC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck])
decd634e801bee2c554edb35383cc9d43417a850Kay Sievers
decd634e801bee2c554edb35383cc9d43417a850Kay SieversAC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap])
decd634e801bee2c554edb35383cc9d43417a850Kay Sievers
decd634e801bee2c554edb35383cc9d43417a850Kay SieversAC_PATH_PROG([KILL], [kill], [/usr/bin/kill])
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
f610d6de38119b372b377ec41b2a6089872d3294Kay Sieversm4_ifdef([GTK_DOC_CHECK], [
f610d6de38119b372b377ec41b2a6089872d3294Kay SieversGTK_DOC_CHECK([1.18],[--flavour no-tmpl])
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers], [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])])
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers
f610d6de38119b372b377ec41b2a6089872d3294Kay SieversAS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers])
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers
f610d6de38119b372b377ec41b2a6089872d3294Kay Sieversm4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
f610d6de38119b372b377ec41b2a6089872d3294Kay SieversGOBJECT_INTROSPECTION_CHECK([1.31.1])
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers], [
f610d6de38119b372b377ec41b2a6089872d3294Kay Sievers AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers enable_introspection=no])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers
a660c63c551b88136ac6176855b5907cc533e848Kay SieversAC_PATH_TOOL(OBJCOPY, objcopy)
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart PoetteringAC_PATH_TOOL(STRINGS, strings)
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_PATH_TOOL(GPERF, gperf)
19aa72f74e41045510b4af3f1415b419d42ff20bTom Gundersenif test -z "$GPERF" ; then
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering AC_MSG_ERROR([*** gperf not found])
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poetteringfi
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering# we use python to build the man page index, and for systemd-python
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poetteringhave_python=no
de892aea1c486b59e04884268b612081d1660514Kay Sievershave_python_devel=no
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
3ffd4af22052963e7a29431721ee204e634bea75Lennart PoetteringAC_ARG_WITH([python],
a5c32cff1f56afe6f0c6c70d91a88a7a8238b2d7Harald Hoyer [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart PoetteringAS_IF([test "x$with_python" != "xno"], [
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers AM_PATH_PYTHON(,, [:])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AS_IF([test "$PYTHON" != :], [have_python=yes])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers])
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAS_IF([test "x$PYTHON_BINARY" = "x"],
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers [AS_IF([test "x$have_python" = "xyes"],
e3d563346c4237af23335cc6904e0662efdf62adTom Gundersen [PYTHON_BINARY="`which "$PYTHON"`"],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [PYTHON_BINARY=/usr/bin/python])])
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAS_IF([test "x$with_python" != "xno"], [
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_PATH_PROG(PYTHON_CONFIG, python${PYTHON_VERSION}-config)
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AS_IF([test -n "$PYTHON_CONFIG"], [
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers have_python_devel=yes
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers PYTHON_LIBS="`$PYTHON_CONFIG --ldflags`"
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_SUBST(PYTHON_CFLAGS)
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_SUBST(PYTHON_LIBS)
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers ])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers])
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversCC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers -pipe \
d4b687c96adf207f0878aebf3ce3371f6160687fKay Sievers -Wall \
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers -Wextra \
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers -Wno-inline \
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers -Wundef \
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers -Wformat=2 \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wlogical-op \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wsign-compare \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wformat-security \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wmissing-include-dirs \
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers -Wformat-nonliteral \
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers -Wold-style-definition \
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers -Wpointer-arith \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Winit-self \
01d183ddae6fb3445c4519cf1d90c6575f17292eKay Sievers -Wdeclaration-after-statement \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wfloat-equal \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wmissing-prototypes \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wstrict-prototypes \
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers -Wredundant-decls \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wmissing-declarations \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wmissing-noreturn \
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers -Wshadow \
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers -Wendif-labels \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wcast-align \
309b578d313b363974b99e48f0e378111cc1fa91Tom Gundersen -Wstrict-aliasing=2 \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wwrite-strings \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wno-long-long \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wno-overlength-strings \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wno-unused-parameter \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wno-missing-field-initializers \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Wno-unused-result \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -Werror=overflow \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -ffast-math \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -fno-common \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -fdiagnostics-show-option \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -fno-strict-aliasing \
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers -fvisibility=hidden \
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers -ffunction-sections \
c0a43734ca84a3c9170d4a2d7f4d329b9ef47abcTom Gundersen -fdata-sections \
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers -fstack-protector \
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers --param=ssp-buffer-size=4])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay SieversAC_SUBST([OUR_CFLAGS], $with_cflags)
137661d87525a3c339afd2804e577532d58d3fbcKay Sievers
1328f66ad16b5afeb5684858c27e121a46c1959eKay SieversAS_CASE([$CFLAGS], [*-O[[12345\ ]]*], [
0454229c100a2113ba82df55703436d6cb2c492bJason S. McMullan CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
1cb5d1f31909c731d93568eb4838cb86e033d783Lennart Poettering -Wp,-D_FORTIFY_SOURCE=2])], [
1cb5d1f31909c731d93568eb4838cb86e033d783Lennart Poettering AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
de892aea1c486b59e04884268b612081d1660514Kay SieversAC_SUBST([OUR_CPPFLAGS], $with_cppflags)
63c372cb9df3bee01e3bf8cd7f96f336bddda846Lennart Poettering
0454229c100a2113ba82df55703436d6cb2c492bJason S. McMullanCC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
0454229c100a2113ba82df55703436d6cb2c492bJason S. McMullan -Wl,--as-needed \
1cb5d1f31909c731d93568eb4838cb86e033d783Lennart Poettering -Wl,--gc-sections \
0454229c100a2113ba82df55703436d6cb2c492bJason S. McMullan -Wl,-z,relro \
1cb5d1f31909c731d93568eb4838cb86e033d783Lennart Poettering -Wl,-z,now])
de892aea1c486b59e04884268b612081d1660514Kay SieversAC_SUBST([OUR_LDFLAGS], $with_ldflags)
de892aea1c486b59e04884268b612081d1660514Kay Sievers
1328f66ad16b5afeb5684858c27e121a46c1959eKay SieversAC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
1cb5d1f31909c731d93568eb4838cb86e033d783Lennart PoetteringAC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
1cb5d1f31909c731d93568eb4838cb86e033d783Lennart Poettering
1cb5d1f31909c731d93568eb4838cb86e033d783Lennart Poetteringsave_LIBS="$LIBS"
de892aea1c486b59e04884268b612081d1660514Kay SieversLIBS=
de892aea1c486b59e04884268b612081d1660514Kay SieversAC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversCAP_LIBS="$LIBS"
3058e017fced6d5c8712e10c8c1477421bc1e960Thadeu Lima de Souza CascardoLIBS="$save_LIBS"
1328f66ad16b5afeb5684858c27e121a46c1959eKay SieversAC_SUBST(CAP_LIBS)
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sievers
1328f66ad16b5afeb5684858c27e121a46c1959eKay SieversAC_CHECK_FUNCS([fanotify_init fanotify_mark])
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversAC_CHECK_FUNCS([__secure_getenv secure_getenv])
b5dd8148730db080b48b874c214f8f74ae787d6bZbigniew Jędrzejewski-SzmekAC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h>
b5dd8148730db080b48b874c214f8f74ae787d6bZbigniew Jędrzejewski-Szmek#include <unistd.h>
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers#include <sys/mount.h>
b5dd8148730db080b48b874c214f8f74ae787d6bZbigniew Jędrzejewski-Szmek#include <fcntl.h>]])
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers
b5dd8148730db080b48b874c214f8f74ae787d6bZbigniew Jędrzejewski-Szmek# This makes sure pkg.m4 is available.
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sieversm4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sievers
309b578d313b363974b99e48f0e378111cc1fa91Tom GundersenPKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
3058e017fced6d5c8712e10c8c1477421bc1e960Thadeu Lima de Souza Cascardo
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sievers# ------------------------------------------------------------------------------
3058e017fced6d5c8712e10c8c1477421bc1e960Thadeu Lima de Souza Cascardohave_kmod=no
1328f66ad16b5afeb5684858c27e121a46c1959eKay SieversAC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sieversif test "x$enable_kmod" != "xno"; then
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sievers PKG_CHECK_MODULES(KMOD, [ libkmod >= 5 ],
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovern [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available]) have_kmod=yes], have_kmod=no)
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovern if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
1fa2f38f0f011010bf57522b42fcc168856a7003Zbigniew Jędrzejewski-Szmek AC_MSG_ERROR([*** kmod support requested but libraries not found])
1fa2f38f0f011010bf57522b42fcc168856a7003Zbigniew Jędrzejewski-Szmek fi
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sieversfi
1fa2f38f0f011010bf57522b42fcc168856a7003Zbigniew Jędrzejewski-SzmekAM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
3058e017fced6d5c8712e10c8c1477421bc1e960Thadeu Lima de Souza Cascardo
1fa2f38f0f011010bf57522b42fcc168856a7003Zbigniew Jędrzejewski-Szmek# ------------------------------------------------------------------------------
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sievershave_blkid=no
1328f66ad16b5afeb5684858c27e121a46c1959eKay SieversAC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sieversif test "x$enable_blkid" != "xno"; then
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers AC_MSG_ERROR([*** blkid support requested but libraries not found])
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers fi
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sieversfi
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversAM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers# ------------------------------------------------------------------------------
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievershave_ima=yes
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversAC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [case "${enableval}" in
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers yes) have_ima=yes ;;
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers no) have_ima=no ;;
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers esac],
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers [have_ima=yes])
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sieversif test "x${have_ima}" != xno ; then
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sieversfi
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers# ------------------------------------------------------------------------------
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievershave_chkconfig=yes
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversAC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers [case "${enableval}" in
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers yes) have_chkconfig=yes ;;
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers no) have_chkconfig=no ;;
641906e9366891e0ad3e6e38b7396a427678c4cfThomas Hindoe Paaboel Andersen *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers esac],
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers [AC_PATH_PROG(CHKCONFIG, chkconfig)
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers if test -z "$CHKCONFIG"; then
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers have_chkconfig=no
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers else
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers have_chkconfig=yes
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers fi])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sieversif test "x${have_chkconfig}" != xno ; then
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sievers AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovernfi
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovern
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovern# ------------------------------------------------------------------------------
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovernhave_selinux=no
1328f66ad16b5afeb5684858c27e121a46c1959eKay SieversAC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3dKay Sieversif test "x$enable_selinux" != "xno"; then
3058e017fced6d5c8712e10c8c1477421bc1e960Thadeu Lima de Souza Cascardo PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
3058e017fced6d5c8712e10c8c1477421bc1e960Thadeu Lima de Souza Cascardo [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sievers if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
16f948cb208f1db9a1665f07ac9b22e416dc19d4Tom Gundersen AC_MSG_ERROR([*** SELinux support requested but libraries not found])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers fi
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sieversfi
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversAM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sieversif test "x${have_selinux}" != xno ; then
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers sushell=/sbin/sushell
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sieverselse
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers sushell=/bin/bash
5b8180d3f6598a1b2f296645690de41d726fd5abKay Sieversfi
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversAC_SUBST(sushell)
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersen
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersen# ------------------------------------------------------------------------------
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersenhave_xz=no
5b8180d3f6598a1b2f296645690de41d726fd5abKay SieversAC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
54683f0f9b97a8f88aaf4fbb45b4d729057b101cTom Gundersenif test "x$enable_xz" != "xno"; then
54683f0f9b97a8f88aaf4fbb45b4d729057b101cTom Gundersen PKG_CHECK_MODULES(XZ, [ liblzma ],
54683f0f9b97a8f88aaf4fbb45b4d729057b101cTom Gundersen [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
54683f0f9b97a8f88aaf4fbb45b4d729057b101cTom Gundersen if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
54683f0f9b97a8f88aaf4fbb45b4d729057b101cTom Gundersen AC_MSG_ERROR([*** Xz support requested but libraries not found])
54683f0f9b97a8f88aaf4fbb45b4d729057b101cTom Gundersen fi
54683f0f9b97a8f88aaf4fbb45b4d729057b101cTom Gundersenfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
54683f0f9b97a8f88aaf4fbb45b4d729057b101cTom Gundersen# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_ENABLE([tcpwrap],
bb26309dd042c79de907f103d83f398b9436cde0Rob Clark AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [case "${enableval}" in
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers yes) have_tcpwrap=yes ;;
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers no) have_tcpwrap=no ;;
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers esac],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [have_tcpwrap=auto])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversif test "x${have_tcpwrap}" != xno ; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers ACX_LIBWRAP
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers if test "x${LIBWRAP_LIBS}" = x ; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers if test "x$have_tcpwrap" = xyes ; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_MSG_ERROR([*** TCP wrappers support not found.])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers fi
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers have_tcpwrap=no
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers else
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers have_tcpwrap=yes
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers fi
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieverselse
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers LIBWRAP_LIBS=
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_SUBST(LIBWRAP_LIBS)
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersen
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersen# ------------------------------------------------------------------------------
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom GundersenAC_ARG_ENABLE([pam],
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers [case "${enableval}" in
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers yes) have_pam=yes ;;
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers no) have_pam=no ;;
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers esac],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [have_pam=auto])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversif test "x${have_pam}" != xno ; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_CHECK_HEADERS(
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [have_pam=yes],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [if test "x$have_pam" = xyes ; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_MSG_ERROR([*** PAM headers not found.])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers fi])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_CHECK_LIB(
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [pam],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [pam_syslog],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [have_pam=yes],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [if test "x$have_pam" = xyes ; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_MSG_ERROR([*** libpam not found.])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers fi])
f7340ab269828d917cd1281e33e6dd4fdfee67b3Torstein Husebø
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers if test "x$have_pam" = xyes ; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers PAM_LIBS="-lpam -lpam_misc"
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_DEFINE(HAVE_PAM, 1, [PAM available])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers else
d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3dKay Sievers have_pam=no
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers fi
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieverselse
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers PAM_LIBS=
d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3dKay Sieversfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_SUBST(PAM_LIBS)
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3dKay Sievers# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_ENABLE([acl],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [case "${enableval}" in
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers yes) have_acl=yes ;;
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers no) have_acl=no ;;
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers esac],
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers [have_acl=auto])
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sieversif test "x${have_acl}" != xno ; then
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers AC_CHECK_HEADERS(
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersen [sys/acl.h acl/libacl.h],
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersen [have_acl=yes],
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersen [if test "x$have_acl" = xyes ; then
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers AC_MSG_ERROR([*** ACL headers not found.])
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers fi])
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers AC_CHECK_LIB(
f4ddacbd4de0f159ec598f8ad690466a84787ec5Kay Sievers [acl],
b5dd8148730db080b48b874c214f8f74ae787d6bZbigniew Jędrzejewski-Szmek [acl_get_file],
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers [have_acl=yes],
f4ddacbd4de0f159ec598f8ad690466a84787ec5Kay Sievers [if test "x$have_acl" = xyes ; then
f4ddacbd4de0f159ec598f8ad690466a84787ec5Kay Sievers AC_MSG_ERROR([*** libacl not found.])
b5dd8148730db080b48b874c214f8f74ae787d6bZbigniew Jędrzejewski-Szmek fi])
f4ddacbd4de0f159ec598f8ad690466a84787ec5Kay Sievers
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers if test "x$have_acl" = xyes ; then
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers ACL_LIBS="-lacl"
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers AC_DEFINE(HAVE_ACL, 1, [ACL available])
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers else
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner have_acl=no
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner fi
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Bruecknerelse
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner ACL_LIBS=
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Bruecknerfi
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik BruecknerAC_SUBST(ACL_LIBS)
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom GundersenAM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersen
3b64e4d4f40baac56148c7d333d6a0053358ec7aTom Gundersen# ------------------------------------------------------------------------------
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik BruecknerAC_ARG_ENABLE([xattr],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]),
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [case "${enableval}" in
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner yes) have_xattr=yes ;;
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner no) have_xattr=no ;;
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;;
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner esac],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [have_xattr=auto])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Bruecknerif test "x${have_xattr}" != xno ; then
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner AC_CHECK_HEADERS(
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [attr/xattr.h],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [have_xattr=yes],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [if test "x$have_xattr" = xyes ; then
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner AC_MSG_ERROR([*** XATTR headers not found.])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner fi])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner AC_CHECK_LIB(
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [attr],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [fsetxattr],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [have_xattr=yes],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [if test "x$have_xattr" = xyes ; then
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner AC_MSG_ERROR([*** libattr not found.])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner fi])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner if test "x$have_xattr" = xyes ; then
d4b687c96adf207f0878aebf3ce3371f6160687fKay Sievers XATTR_LIBS="-lattr"
d4b687c96adf207f0878aebf3ce3371f6160687fKay Sievers AC_DEFINE(HAVE_XATTR, 1, [XATTR available])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner else
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner have_xattr=no
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner fi
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Bruecknerelse
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers XATTR_LIBS=
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sieversfi
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay SieversAC_SUBST(XATTR_LIBS)
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay SieversAM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers# ------------------------------------------------------------------------------
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay SieversAC_ARG_ENABLE([gcrypt],
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [case "${enableval}" in
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers yes) have_gcrypt=yes ;;
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers no) have_gcrypt=no ;;
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers esac],
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [have_gcrypt=auto])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sieversif test "x${have_gcrypt}" != xno ; then
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers AM_PATH_LIBGCRYPT(
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [1.4.5],
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [have_gcrypt=yes],
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [if test "x$have_gcrypt" = xyes ; then
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers AC_MSG_ERROR([*** GCRYPT headers not found.])
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers fi])
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers if test "x$have_gcrypt" = xyes ; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers GCRYPT_LIBS="$LIBGCRYPT_LIBS"
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers else
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers have_gcrypt=no
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers fi
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieverselse
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers GCRYPT_LIBS=
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers GCRYPT_CFLAGS=
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_SUBST(GCRYPT_LIBS)
971e7fb62548f2c9c4e32684bb13409e6579dc6aKay SieversAC_SUBST(GCRYPT_CFLAGS)
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
971e7fb62548f2c9c4e32684bb13409e6579dc6aKay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_ENABLE([audit],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [case "${enableval}" in
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers yes) have_audit=yes ;;
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers no) have_audit=no ;;
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
a4bbef099209d4e3bccd913cd30da536f8971064Kay Sievers esac],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [have_audit=auto])
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
a660c63c551b88136ac6176855b5907cc533e848Kay Sieversif test "x${have_audit}" != xno ; then
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers AC_CHECK_HEADERS(
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [libaudit.h],
72bc96f07868d532596477604b6fb41633ebd124Kay Sievers [have_audit=yes],
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [if test "x$have_audit" = xyes ; then
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers AC_MSG_ERROR([*** AUDIT headers not found.])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers fi])
b92bea5d2a9481de69bb627a7b442a9f58fca43dZbigniew Jędrzejewski-Szmek
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_CHECK_LIB(
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [audit],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [audit_open],
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [have_audit=yes],
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers [if test "x$have_audit" = xyes ; then
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers AC_MSG_ERROR([*** libaudit not found.])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers fi])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner
19aa72f74e41045510b4af3f1415b419d42ff20bTom Gundersen if test "x$have_audit" = xyes ; then
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner AUDIT_LIBS="-laudit"
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
19aa72f74e41045510b4af3f1415b419d42ff20bTom Gundersen else
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner have_audit=no
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner fi
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Bruecknerelse
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers AUDIT_LIBS=
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Bruecknerfi
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay SieversAC_SUBST(AUDIT_LIBS)
72bc96f07868d532596477604b6fb41633ebd124Kay Sievers
72bc96f07868d532596477604b6fb41633ebd124Kay Sievers# ------------------------------------------------------------------------------
72bc96f07868d532596477604b6fb41633ebd124Kay Sievershave_libcryptsetup=no
72bc96f07868d532596477604b6fb41633ebd124Kay SieversAC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
72bc96f07868d532596477604b6fb41633ebd124Kay Sieversif test "x$enable_libcryptsetup" != "xno"; then
72bc96f07868d532596477604b6fb41633ebd124Kay Sievers PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.4.2 ],
72bc96f07868d532596477604b6fb41633ebd124Kay Sievers [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
090be8653471e1abe3f1cdd32eaad0fbd65f85cdThomas Hindoe Paaboel Andersen if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
72bc96f07868d532596477604b6fb41633ebd124Kay Sievers AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
72bc96f07868d532596477604b6fb41633ebd124Kay Sievers fi
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sieversfi
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay SieversAM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers# ------------------------------------------------------------------------------
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievershave_qrencode=no
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay SieversAC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sieversif test "x$enable_qrencode" != "xno"; then
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers AC_MSG_ERROR([*** qrencode support requested but libraries not found])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers fi
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievershave_microhttpd=no
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversif test "x$enable_microhttpd" != "xno"; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.5],
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner fi
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Bruecknerfi
d4b687c96adf207f0878aebf3ce3371f6160687fKay SieversAM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Brueckner# ------------------------------------------------------------------------------
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik Bruecknerhave_binfmt=no
e0d4a0ac06afb856c9370c5c256f0f7bb7efdc8eHendrik BruecknerAC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversif test "x$enable_binfmt" != "xno"; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers have_binfmt=yes
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievershave_vconsole=no
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversif test "x$enable_vconsole" != "xno"; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers have_vconsole=yes
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievershave_readahead=no
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversif test "x$enable_readahead" != "xno"; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers have_readahead=yes
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievershave_bootchart=no
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversif test "x$enable_bootchart" != "xno"; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers have_bootchart=yes
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievershave_quotacheck=no
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversif test "x$enable_quotacheck" != "xno"; then
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers have_quotacheck=yes
0260944060426d54d9ecb40930baad985cbd02a1Kay Sieversfi
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievers# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievershave_randomseed=no
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay SieversAC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sieversif test "x$enable_randomseed" != "xno"; then
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers have_randomseed=yes
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sieversfi
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay SieversAM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers# ------------------------------------------------------------------------------
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievershave_logind=no
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay SieversAC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sieversif test "x$enable_logind" != "xno"; then
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers have_logind=yes
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sieversfi
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay SieversAM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay SieversAS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers
984c4348ff14d29c526d3d372daa82e278eeb5b4Kay Sievers# ------------------------------------------------------------------------------
0260944060426d54d9ecb40930baad985cbd02a1Kay Sievershave_hostnamed=no
0260944060426d54d9ecb40930baad985cbd02a1Kay SieversAC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
a660c63c551b88136ac6176855b5907cc533e848Kay Sieversif test "x$enable_hostnamed" != "xno"; then
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers have_hostnamed=yes
a660c63c551b88136ac6176855b5907cc533e848Kay Sieversfi
a660c63c551b88136ac6176855b5907cc533e848Kay SieversAM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers# ------------------------------------------------------------------------------
5ac0162c3af95efa08a07b84ff62ad32842922c7Lennart Poetteringhave_timedated=no
a660c63c551b88136ac6176855b5907cc533e848Kay SieversAC_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"])
# ------------------------------------------------------------------------------
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)
# ------------------------------------------------------------------------------
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])
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=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]),
[], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"])
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], [$FIRMWARE_PATH])
# ------------------------------------------------------------------------------
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]) ])
AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE([keymap],
AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]),
[], [enable_keymap=yes])
AS_IF([test "x$enable_keymap" = "xyes"], [
AC_PATH_PROG([GPERF], [gperf])
if test -z "$GPERF"; then
AC_MSG_ERROR([gperf is needed])
fi
AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')])
])
AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
# ------------------------------------------------------------------------------
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=`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=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
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_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])
])
AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
AC_SUBST([pamlibdir], [$with_pamlibdir])
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}
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}
randomseed: ${have_randomseed}
logind: ${have_logind}
hostnamed: ${have_hostnamed}
timedated: ${have_timedated}
localed: ${have_localed}
coredump: ${have_coredump}
kmod: ${have_kmod}
blkid: ${have_blkid}
nss-myhostname: ${have_myhostname}
gudev: ${enable_gudev}
gintrospection: ${enable_introspection}
keymap: ${enable_keymap}
Python: ${have_python}
Python Headers: ${have_python_devel}
man pages: ${have_manpages}
gtk-doc: ${enable_gtk_doc}
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}
firmware path: ${FIRMWARE_PATH}
PAM modules dir: ${with_pamlibdir}
D-Bus policy dir: ${with_dbuspolicydir}
D-Bus session dir: ${with_dbussessionservicedir}
D-Bus system dir: ${with_dbussystemservicedir}
D-Bus interfaces dir: ${with_dbusinterfacedir}
Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP}
CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
CPPLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
PYTHON_CFLAGS: ${PYTHON_CFLAGS}
PYTHON_LIBS: ${PYTHON_LIBS}
])