summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac72
1 files changed, 47 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index 92aa1f787d..c96b9fb1d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
AC_PREREQ([2.64])
AC_INIT([systemd],
- [226],
+ [227],
[http://github.com/systemd/systemd/issues],
[systemd],
[http://www.freedesktop.org/wiki/Software/systemd])
@@ -93,7 +93,6 @@ AC_PROG_GREP
AC_PROG_AWK
AC_PATH_PROG([M4], [m4])
-AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin])
AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin])
@@ -171,7 +170,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-Werror=implicit-function-declaration \
-Werror=missing-declarations \
-Werror=return-type \
- -Werror=shadow \
-Wstrict-prototypes \
-Wredundant-decls \
-Wmissing-noreturn \
@@ -196,6 +194,17 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-fPIE \
--param=ssp-buffer-size=4])
+CC_CHECK_FLAG_APPEND([with_cflags], [CFLAGS], [-Werror=shadow], [
+#include <time.h>
+#include <inttypes.h>
+typedef uint64_t usec_t;
+usec_t now(clockid_t clock);
+int main(void) {
+ struct timespec now;
+ return 0;
+}
+])
+
AS_CASE([$CC], [*clang*],
[CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
-Wno-typedef-redefinition \
@@ -272,7 +281,6 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
# ------------------------------------------------------------------------------
-AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
AC_CHECK_HEADERS([linux/btrfs.h], [], [])
AC_CHECK_HEADERS([linux/memfd.h], [], [])
@@ -284,11 +292,12 @@ save_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
CAP_LIBS="$LIBS"
+LIBS="$save_LIBS"
AC_SUBST(CAP_LIBS)
AC_CHECK_FUNCS([memfd_create])
AC_CHECK_FUNCS([__secure_getenv secure_getenv])
-AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, kcmp, LO_FLAGS_PARTSCAN],
+AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, kcmp, keyctl, key_serial_t, LO_FLAGS_PARTSCAN],
[], [], [[
#include <sys/types.h>
#include <unistd.h>
@@ -311,6 +320,7 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
IFLA_GRE_ENCAP_DPORT,
IFLA_BRIDGE_VLAN_INFO,
IFLA_BRPORT_LEARNING_SYNC,
+ IFLA_BR_PRIORITY,
NDA_IFINDEX,
IFA_FLAGS],
[], [], [[
@@ -427,7 +437,7 @@ AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
# ------------------------------------------------------------------------------
have_libmount=no
-PKG_CHECK_MODULES(MOUNT, [ mount >= 2.20 ],
+PKG_CHECK_MODULES(MOUNT, [ mount >= 2.27 ],
[AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available]) have_libmount=yes], have_libmount=no)
if test "x$have_libmount" = xno; then
AC_MSG_ERROR([*** libmount support required but libraries not found])
@@ -663,12 +673,17 @@ if test "x${have_smack}" = xauto; then
have_smack=yes
fi
+have_smack_run_label=no
AC_ARG_WITH(smack-run-label,
AS_HELP_STRING([--with-smack-run-label=STRING],
[run systemd --system itself with a specific SMACK label]),
- [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run systemd itself with SMACK label])],
+ [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run systemd itself with SMACK label]) have_smack_run_label=yes],
[])
+if test "x${have_smack_run_label}" = xyes; then
+ M4_DEFINES="$M4_DEFINES -DHAVE_SMACK_RUN_LABEL"
+fi
+
AC_ARG_WITH(smack-default-process-label,
AS_HELP_STRING([--with-smack-default-process-label=STRING],
[default SMACK label for executed processes]),
@@ -692,12 +707,21 @@ AC_ARG_ENABLE([gcrypt],
[have_gcrypt=auto])
if test "x${have_gcrypt}" != xno ; then
- AM_PATH_LIBGCRYPT(
- [1.4.5],
- [have_gcrypt=yes],
- [if test "x$have_gcrypt" = xyes ; then
- AC_MSG_ERROR([*** GCRYPT headers not found.])
- fi])
+ m4_define([AM_PATH_LIBGCRYPT_FAIL],
+ [{ test "x$have_gcrypt" != xyes || AC_MSG_ERROR([*** GCRYPT headers not found.]); }]
+ )
+ m4_ifdef([AM_PATH_LIBGCRYPT], [AM_PATH_LIBGCRYPT(
+ [1.4.5],
+ [have_gcrypt=yes],
+ dnl If we have the gcrypt m4 macros, but don't have
+ dnl gcrypt, throw an error if gcrypt is explicitly
+ dnl requested.
+ [AM_PATH_LIBGCRYPT_FAIL]
+ )],
+ dnl If we don't have the gcrypt m4 macros, but build with
+ dnl gcrypt explicitly requested, throw an error.
+ [AM_PATH_LIBGCRYPT_FAIL]
+ )
if test "x$have_gcrypt" = xyes ; then
GCRYPT_LIBS="$LIBGCRYPT_LIBS"
@@ -772,14 +796,6 @@ if test "x${have_elfutils}" != xno ; then
AC_CHECK_LIB(
[dw],
- [dwfl_begin],
- [],
- [if test "x$have_elfutils" = xyes ; then
- AC_MSG_ERROR([*** ELFUTILS libs not found.])
- fi])
-
- AC_CHECK_LIB(
- [dw],
[dwfl_core_file_attach],
[have_elfutils=yes],
[if test "x$have_elfutils" = xyes ; then
@@ -1088,10 +1104,12 @@ AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
# ------------------------------------------------------------------------------
have_resolved=no
AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
-if test "x$enable_resolved" != "xno"; then
+AS_IF([test "x$enable_resolved" != "xno"], [
+ AC_CHECK_LIB([dl], [dlsym], [true], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
+
have_resolved=yes
M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
-fi
+])
AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
AC_ARG_WITH(dns-servers,
@@ -1252,7 +1270,6 @@ if test "x$enable_myhostname" != "xno"; then
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])
@@ -1268,7 +1285,12 @@ AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
-AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
+AS_IF([test "x$enable_manpages" != xno], [
+ have_manpages=yes
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ AS_IF([test -z "$XSLTPROC"],
+ AC_MSG_ERROR([*** xsltproc is required for man pages]))
+])
AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
# ------------------------------------------------------------------------------