summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac200
1 files changed, 126 insertions, 74 deletions
diff --git a/configure.ac b/configure.ac
index 97a29d63fd..2625e0d15b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,8 +20,8 @@
AC_PREREQ([2.64])
AC_INIT([systemd],
- [219],
- [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
+ [220],
+ [http://github.com/systemd/systemd/issues],
[systemd],
[http://www.freedesktop.org/wiki/Software/systemd])
@@ -38,19 +38,18 @@ AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-di
AM_SILENT_RULES([yes])
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
-AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
- test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
- [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
-
LT_PREREQ(2.2)
LT_INIT([disable-static])
AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
-# i18n stuff for the PolicyKit policy files
+SET_ARCH(X86_64, x86_64*)
+SET_ARCH(IA32, i*86*)
+SET_ARCH(MIPS, mips*)
+SET_ARCH(AARCH64, aarch64*)
-# Check whether intltool can be found, disable NLS otherwise
+# i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
AC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
AS_IF([test x"$intltool_found" != xyes],
[AS_IF([test x"$enable_nls" = xyes],
@@ -75,6 +74,7 @@ AS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
GETTEXT_PACKAGE=systemd
AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [systemd])
AC_PROG_MKDIR_P
AC_PROG_LN_S
@@ -100,26 +100,14 @@ AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
+AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
+AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
+
AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
M4_DEFINES=
-# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
-m4_ifdef([GTK_DOC_CHECK], [
-GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
- [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
- enable_gtk_doc=no])
-
-AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
- AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
-])
-
-m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
-GOBJECT_INTROSPECTION_CHECK([1.31.1])
-], [
- AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
- enable_introspection=no])
-
+AC_CHECK_TOOL(OBJCOPY, objcopy)
AC_CHECK_TOOL(STRINGS, strings)
AC_CHECK_TOOL(GPERF, gperf)
if test -z "$GPERF" ; then
@@ -165,7 +153,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-Wundef \
"-Wformat=2 -Wformat-security -Wformat-nonliteral" \
-Wlogical-op \
- -Wsign-compare \
-Wmissing-include-dirs \
-Wold-style-definition \
-Wpointer-arith \
@@ -187,6 +174,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-Wno-unused-parameter \
-Wno-missing-field-initializers \
-Wno-unused-result \
+ -Wno-format-signedness \
-Werror=overflow \
-Wdate-time \
-Wnested-externs \
@@ -195,8 +183,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-fdiagnostics-show-option \
-fno-strict-aliasing \
-fvisibility=hidden \
- -ffunction-sections \
- -fdata-sections \
-fstack-protector \
-fstack-protector-strong \
-fPIE \
@@ -208,22 +194,33 @@ AS_CASE([$CC], [*clang*],
-Wno-gnu-variable-sized-type-not-at-end \
])])
-AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
[CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-flto -ffat-lto-objects])],
[AC_MSG_RESULT([skipping -flto, optimization not enabled])])
AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
-AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
[CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
-Wp,-D_FORTIFY_SOURCE=2])],
[AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
+ [CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
+ -Wl,--gc-sections])],
+ [AC_MSG_RESULT([skipping --gc-sections, optimization not enabled])])
+AC_SUBST([OUR_CFLAGS], "$with_ldflags $sanitizer_cflags")
+
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
+ [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+ -ffunction-sections -fdata-sections])],
+ [AC_MSG_RESULT([skipping -ffunction/data-section, optimization not enabled])])
+AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
+
CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
-Wl,--as-needed \
-Wl,--no-undefined \
- -Wl,--gc-sections \
-Wl,-z,relro \
-Wl,-z,now \
-pie \
@@ -330,10 +327,12 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
IFLA_PHYS_PORT_ID,
IFLA_BOND_AD_INFO,
IFLA_VLAN_PROTOCOL,
- IFLA_VXLAN_LOCAL6,
+ IFLA_VXLAN_REMCSUM_NOPARTIAL,
IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
IFLA_BRIDGE_VLAN_INFO,
- IFLA_BRPORT_UNICAST_FLOOD],
+ IFLA_BRPORT_UNICAST_FLOOD,
+ NDA_IFINDEX,
+ IFA_FLAGS],
[], [], [[
#include <inttypes.h>
#include <netinet/in.h>
@@ -344,6 +343,8 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
#include <linux/if_tunnel.h>
#include <linux/if_link.h>
#include <linux/if_bridge.h>
+#include <linux/if_addr.h>
+#include <linux/neighbour.h>
]])
# This makes sure pkg.m4 is available.
@@ -483,25 +484,6 @@ if test "x${have_ima}" != xno ; then
fi
# ------------------------------------------------------------------------------
-have_chkconfig=yes
-AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
- [case "${enableval}" in
- yes) have_chkconfig=yes ;;
- no) have_chkconfig=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
- esac],
- [AC_PATH_PROG(CHKCONFIG, chkconfig)
- if test -z "$CHKCONFIG"; then
- have_chkconfig=no
- else
- have_chkconfig=yes
- fi])
-
-if test "x${have_chkconfig}" != xno ; then
- AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
-fi
-
-# ------------------------------------------------------------------------------
have_selinux=no
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
if test "x$enable_selinux" != "xno"; then
@@ -776,6 +758,7 @@ else
AUDIT_LIBS=
fi
AC_SUBST(AUDIT_LIBS)
+AM_CONDITIONAL([HAVE_AUDIT], [test "x$have_audit" != xno])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE([elfutils],
@@ -1145,6 +1128,65 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------
+AC_CHECK_TOOL(EFI_CC, gcc)
+
+EFI_ARCH=`echo $host | sed "s/\(-\).*$//"`
+
+AM_COND_IF(ARCH_IA32, [
+ EFI_ARCH=ia32
+ EFI_MACHINE_TYPE_NAME=ia32])
+
+AM_COND_IF(ARCH_X86_64, [
+ EFI_MACHINE_TYPE_NAME=x64])
+
+AM_COND_IF(ARCH_AARCH64, [
+ EFI_MACHINE_TYPE_NAME=aa64])
+
+AC_SUBST([EFI_ARCH])
+AC_SUBST([EFI_MACHINE_TYPE_NAME])
+
+have_gnuefi=no
+AC_ARG_ENABLE(gnuefi, AS_HELP_STRING([--enable-gnuefi], [Disable optional gnuefi support]))
+AS_IF([test "x$enable_gnuefi" != "xno"], [
+ AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
+ [AC_DEFINE(HAVE_GNUEFI, 1, [Define if gnuefi is available])
+ have_gnuefi=yes],
+ [AS_IF([test "x$enable_gnuefi" = xyes],
+ [AC_MSG_ERROR([*** gnuefi support requested but headers not found])])
+ ])
+
+ efiroot=$(echo $(cd /usr/lib/$(${EFI_CC} -print-multi-os-directory); pwd))
+
+ EFI_LIB_DIR="$efiroot"
+ AC_ARG_WITH(efi-libdir,
+ AS_HELP_STRING([--with-efi-libdir=PATH], [Path to EFI lib directory]),
+ [EFI_LIB_DIR="$withval"], [EFI_LIB_DIR="$efiroot"]
+ )
+ AC_SUBST([EFI_LIB_DIR])
+
+ have_efi_lds=no
+ AC_ARG_WITH(efi-ldsdir,
+ AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
+ [EFI_LDS_DIR="$withval" && AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
+ [have_efi_lds=yes])],
+ [AS_FOR([DIR], [EFI_LDS_DIR], ["${EFI_LIB_DIR}/gnuefi" "${EFI_LIB_DIR}"],
+ [AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
+ [have_efi_lds=yes && break])])])
+ AS_IF([test "x$have_efi_lds" = xyes],
+ [AC_SUBST([EFI_LDS_DIR])],
+ [AS_IF([test "x$enable_gnuefi" = xyes],
+ [AC_MSG_ERROR([*** gnuefi support requested but files not found])],
+ [have_gnuefi=no])])
+
+ AC_ARG_WITH(efi-includedir,
+ AS_HELP_STRING([--with-efi-includedir=PATH], [Path to EFI include directory]),
+ [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
+ )
+ AC_SUBST([EFI_INC_DIR])
+])
+AM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])
+
+# ------------------------------------------------------------------------------
AC_ARG_WITH(unifont,
AS_HELP_STRING([--with-unifont=PATH],
[Path to unifont.hex]),
@@ -1245,14 +1287,6 @@ fi
AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
# ------------------------------------------------------------------------------
-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]) ])
-
-# ------------------------------------------------------------------------------
AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
enable_hwdb=$enableval, enable_hwdb=yes)
AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
@@ -1321,16 +1355,19 @@ AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
+AX_NORMALIZE_PATH([with_dbuspolicydir])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
[with_dbussessionservicedir=${datadir}/dbus-1/services])
+AX_NORMALIZE_PATH([with_dbussessionservicedir])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
+AX_NORMALIZE_PATH([with_dbussystemservicedir])
AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
@@ -1340,29 +1377,42 @@ AC_ARG_WITH([bashcompletiondir],
] , [
with_bashcompletiondir=${datadir}/bash-completion/completions
])])
+AX_NORMALIZE_PATH([with_bashcompletiondir])
AC_ARG_WITH([zshcompletiondir],
AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
+AX_NORMALIZE_PATH([with_zshcompletiondir])
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[], [with_rootprefix=${ac_default_prefix}])
+# --with-rootprefix= (empty) should default to "/" but AX_NORMALIZE_PATH
+# defaults those to ".", solve that here for now until we can find a suitable
+# fix for AX_NORMALIZE_PATH upstream at autoconf-archive.
+# See: https://github.com/systemd/systemd/issues/54
+if test "x${with_rootprefix}" = "x"; then
+ with_rootprefix="/"
+fi
+AX_NORMALIZE_PATH([with_rootprefix])
AC_ARG_WITH([rootlibdir],
AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
[],
[with_rootlibdir=${libdir}])
+AX_NORMALIZE_PATH([with_rootlibdir])
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
[with_pamlibdir=${with_rootlibdir}/security])
+AX_NORMALIZE_PATH([with_pamlibdir])
AC_ARG_WITH([pamconfdir],
AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
[],
[with_pamconfdir=${sysconfdir}/pam.d])
+AX_NORMALIZE_PATH([with_pamconfdir])
AC_ARG_ENABLE([split-usr],
AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
@@ -1384,12 +1434,14 @@ AC_SUBST(DEFAULT_DKR_INDEX_URL)
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])
+AM_CONDITIONAL(ENABLE_SPLIT_USR, [test "x${enable_split_usr}" = "xyes"])
+
+# QEMU and OVMF UEFI firmware
+AS_IF([test x"$cross_compiling" = "xyes"], [], [
+ AC_PATH_PROG([QEMU], [qemu-system-x86_64])
+ AC_CHECK_FILE([/usr/share/qemu/bios-ovmf.bin], [QEMU_BIOS=/usr/share/qemu/bios-ovmf.bin],
+ [AC_CHECK_FILE([/usr/share/qemu-ovmf/bios.bin], [QEMU_BIOS=/usr/share/qemu-ovmf/bios.bin])])
+ AC_SUBST([QEMU_BIOS])
])
AC_ARG_ENABLE(tests,
@@ -1438,11 +1490,8 @@ 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
+ Makefile
+ po/Makefile.in
])
AC_OUTPUT
@@ -1465,7 +1514,6 @@ AC_MSG_RESULT([
GCRYPT: ${have_gcrypt}
QRENCODE: ${have_qrencode}
MICROHTTPD: ${have_microhttpd}
- CHKCONFIG: ${have_chkconfig}
GNUTLS: ${have_gnutls}
libcurl: ${have_libcurl}
libidn: ${have_libidn}
@@ -1496,21 +1544,25 @@ AC_MSG_RESULT([
coredump: ${have_coredump}
polkit: ${have_polkit}
efi: ${have_efi}
+ gnuefi: ${have_gnuefi}
+ efi arch: ${EFI_ARCH}
+ EFI machine type: ${EFI_MACHINE_TYPE_NAME}
+ EFI CC ${EFI_CC}
+ EFI libdir: ${EFI_LIB_DIR}
+ EFI ldsdir: ${EFI_LDS_DIR}
+ EFI includedir: ${EFI_INC_DIR}
kmod: ${have_kmod}
xkbcommon: ${have_xkbcommon}
blkid: ${have_blkid}
libmount: ${have_libmount}
dbus: ${have_dbus}
nss-myhostname: ${have_myhostname}
- gudev: ${enable_gudev}
hwdb: ${enable_hwdb}
- gintrospection: ${enable_introspection}
terminal: ${have_terminal}
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}