]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - configure.ac
sd-netlink: Make use of IN_SET (#5977)
[thirdparty/systemd.git] / configure.ac
index ef8a8087af41ec505fbec38bb59f39bd2687e6ef..c8c162b6989e1db4d70025dbd15bc104254f00f0 100644 (file)
 AC_PREREQ([2.64])
 
 AC_INIT([systemd],
-        [232],
-        [http://github.com/systemd/systemd/issues],
+        [233],
+        [https://github.com/systemd/systemd/issues],
         [systemd],
-        [http://www.freedesktop.org/wiki/Software/systemd])
+        [https://www.freedesktop.org/wiki/Software/systemd])
 
 AC_CONFIG_SRCDIR([src/core/main.c])
 AC_CONFIG_MACRO_DIR([m4])
@@ -57,6 +57,7 @@ AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is
 SET_ARCH(X86_64, x86_64*)
 SET_ARCH(IA32, i*86*)
 SET_ARCH(MIPS, mips*)
+SET_ARCH(ARM, arm*)
 SET_ARCH(AARCH64, aarch64*)
 
 # i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
@@ -167,6 +168,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -Werror=implicit-function-declaration \
         -Werror=missing-declarations \
         -Werror=return-type \
+        -Werror=incompatible-pointer-types \
         -Werror=format=2 \
         -Wstrict-prototypes \
         -Wredundant-decls \
@@ -326,7 +328,6 @@ AC_CHECK_DECLS([
         pivot_root,
         name_to_handle_at,
         setns,
-        getrandom,
         renameat2,
         kcmp,
         keyctl,
@@ -341,6 +342,13 @@ AC_CHECK_DECLS([
 #include <sched.h>
 #include <string.h>
 #include <linux/loop.h>
+]])
+
+AC_CHECK_DECLS([getrandom],
+               [AC_DEFINE([USE_SYS_RANDOM_H], [], [sys/random.h is usable])],
+               [AC_CHECK_DECLS([getrandom], [], [], [[
+#include <sys/random.h>
+]])], [[
 #include <linux/random.h>
 ]])
 
@@ -359,7 +367,8 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
                 IFLA_PHYS_PORT_ID,
                 IFLA_BOND_AD_INFO,
                 IFLA_VLAN_PROTOCOL,
-                IFLA_VXLAN_REMCSUM_NOPARTIAL,
+                IFLA_VXLAN_GPE,
+                IFLA_GENEVE_LABEL,
                 IFLA_IPTUN_ENCAP_DPORT,
                 IFLA_GRE_ENCAP_DPORT,
                 IFLA_BRIDGE_VLAN_INFO,
@@ -396,6 +405,16 @@ AS_IF([test "x$enable_dbus" != "xno"], [
                 [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
 AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_glib=no
+AC_ARG_ENABLE(glib, AS_HELP_STRING([--disable-glib], [disable usage of glib,gobject,gio in tests]))
+AS_IF([test "x$enable_glib" != "xno"], [
+        PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0],
+                [AC_DEFINE(HAVE_GLIB, 1, [Define if glib,gobject,gio are available]) have_glib=yes],
+                [have_glib=no])
+        AS_IF([test "x$have_glib" = "xno" -a "x$enable_glib" = "xyes"],
+                [AC_MSG_ERROR([*** glib support requested but libraries not found])])])
+
 # ------------------------------------------------------------------------------
 have_utmp=yes
 AC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
@@ -581,7 +600,7 @@ AC_ARG_WITH([support-url],
         AS_HELP_STRING([--with-support-url=URL],
                 [specify the support URL to show in catalog entries included in systemd]),
         [SUPPORT_URL="$withval"],
-        [SUPPORT_URL=http://lists.freedesktop.org/mailman/listinfo/systemd-devel])
+        [SUPPORT_URL=https://lists.freedesktop.org/mailman/listinfo/systemd-devel])
 
 AC_SUBST(SUPPORT_URL)
 
@@ -612,6 +631,23 @@ AC_ARG_WITH([fallback-hostname],
 AC_SUBST(FALLBACK_HOSTNAME)
 AC_DEFINE_UNQUOTED(FALLBACK_HOSTNAME, ["$FALLBACK_HOSTNAME"], [The hostname used if none configured])
 
+# ------------------------------------------------------------------------------
+
+AC_ARG_WITH(default-hierarchy,
+        AS_HELP_STRING([--with-default-hierarchy=MODE],
+                [default cgroup hierarchy, defaults to "hybrid"]),
+        [DEFAULT_HIERARCHY="$withval"],
+        [DEFAULT_HIERARCHY="hybrid"])
+
+AS_CASE("$DEFAULT_HIERARCHY",
+        [legacy], [mode=CGROUP_UNIFIED_NONE],
+        [hybrid], [mode=CGROUP_UNIFIED_SYSTEMD],
+        [unified], [mode=CGROUP_UNIFIED_ALL],
+        AC_MSG_ERROR(Bad default hierarchy mode ${DEFAULT_HIERARCHY}))
+AC_DEFINE_UNQUOTED(DEFAULT_HIERARCHY, [$mode], [Default cgroup hierarchy])
+AC_DEFINE_UNQUOTED(DEFAULT_HIERARCHY_NAME, ["$DEFAULT_HIERARCHY"],
+                                           [Default cgroup hierarchy as string])
+
 # ------------------------------------------------------------------------------
 have_xz=no
 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [disable optional XZ support]))
@@ -979,16 +1015,32 @@ AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
 AM_CONDITIONAL(HAVE_REMOTE, [test "$have_microhttpd" = "yes" -o "$have_libcurl" = "yes"])
 
 # ------------------------------------------------------------------------------
+have_libidn2=no
+AC_ARG_ENABLE(libidn2, AS_HELP_STRING([--disable-libidn2], [disable optional LIBIDN2 support]))
+if test "x$enable_libidn2" != "xno"; then
+        PKG_CHECK_MODULES(LIBIDN2, [libidn2 >= 2.0.0],
+               [AC_DEFINE(HAVE_LIBIDN2, 1, [Define if libidn2 is available])
+                have_libidn2=yes
+                M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN2"],
+               [have_libidn2=no])
+        if test "x$have_libidn2" = "xno" -a "x$enable_libidn2" = "xyes"; then
+                AC_MSG_ERROR([*** libidn2 support requested but libraries not found])
+        fi
+fi
+AM_CONDITIONAL(HAVE_LIBIDN2, [test "$have_libidn2" = "yes"])
+
 have_libidn=no
 AC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [disable optional LIBIDN support]))
-if test "x$enable_libidn" != "xno"; then
-        PKG_CHECK_MODULES(LIBIDN, [libidn],
-               [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available])
-                have_libidn=yes
-                M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"],
-               [have_libidn=no])
-        if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then
-                AC_MSG_ERROR([*** libidn support requested but libraries not found])
+if test "$have_libidn2" != "yes"; then
+        if test "x$enable_libidn" != "xno"; then
+                PKG_CHECK_MODULES(LIBIDN, [libidn],
+                       [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available])
+                        have_libidn=yes
+                        M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"],
+                       [have_libidn=no])
+                if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then
+                        AC_MSG_ERROR([*** libidn support requested but libraries not found])
+                fi
         fi
 fi
 AM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
@@ -1040,6 +1092,14 @@ if test "x$enable_tmpfiles" != "xno"; then
 fi
 AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_environment_d=no
+AC_ARG_ENABLE(environment-d, AS_HELP_STRING([--disable-environment-d], [disable environment.d support]))
+if test "x$enable_environment_d" != "xno"; then
+        have_environment_d=yes
+fi
+AM_CONDITIONAL(ENABLE_ENVIRONMENT_D, [test "$have_environment_d" = "yes"])
+
 # ------------------------------------------------------------------------------
 have_sysusers=no
 AC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support]))
@@ -1048,6 +1108,11 @@ if test "x$enable_sysusers" != "xno"; then
 fi
 AM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
 
+AC_ARG_ENABLE(gshadow, AS_HELP_STRING([--disable-gshadow], [disable shadow group support]))
+AS_IF([test "x${enable_gshadow}" != "xno"], [
+        AC_DEFINE(ENABLE_GSHADOW, 1, [shadow group support is enabled])
+])
+
 # ------------------------------------------------------------------------------
 have_firstboot=no
 AC_ARG_ENABLE(firstboot, AS_HELP_STRING([--disable-firstboot], [disable firstboot support]))
@@ -1087,7 +1152,7 @@ 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]) ])
+AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(ENABLE_LOGIND, [1], [Logind support available]) ])
 
 AC_ARG_WITH([kill-user-processes],
         [AS_HELP_STRING([--without-kill-user-processes], [set logind's KillUserProcesses=no by default])])
@@ -1179,6 +1244,16 @@ AC_ARG_WITH(system-gid-max,
 AC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
 AC_SUBST(SYSTEM_GID_MAX)
 
+# ------------------------------------------------------------------------------
+
+AC_ARG_WITH(dev-kvm-mode,
+        AS_HELP_STRING([--with-dev-kvm-mode=MODE],
+                [/dev/kvm access mode, defaults to "0660"]),
+        [DEV_KVM_MODE="$withval"],
+        [DEV_KVM_MODE="0660"])
+
+AC_SUBST(DEV_KVM_MODE, [$DEV_KVM_MODE], [/dev/kvm access mode])
+
 # ------------------------------------------------------------------------------
 have_localed=no
 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
@@ -1202,8 +1277,14 @@ AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit supp
 if test "x$enable_polkit" != "xno"; then
         AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
         have_polkit=yes
+
+        # also enable support for *.pkla files on old polkit
+        PKG_CHECK_MODULES(POLKIT, [ polkit-gobject-1 < 0.106 ],
+                           [polkit_pkla=yes],
+                           [polkit_pkla=no])
 fi
 AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
+AM_CONDITIONAL(ENABLE_POLKIT_PKLA, [test "x$polkit_pkla" = "xyes"])
 
 # ------------------------------------------------------------------------------
 have_resolved=no
@@ -1271,6 +1352,9 @@ AM_COND_IF(ARCH_IA32, [
 AM_COND_IF(ARCH_X86_64, [
         EFI_MACHINE_TYPE_NAME=x64])
 
+AM_COND_IF(ARCH_ARM, [
+        EFI_MACHINE_TYPE_NAME=arm])
+
 AM_COND_IF(ARCH_AARCH64, [
         EFI_MACHINE_TYPE_NAME=aa64])
 
@@ -1280,7 +1364,13 @@ AC_SUBST([EFI_MACHINE_TYPE_NAME])
 have_gnuefi=no
 AC_ARG_ENABLE(gnuefi, AS_HELP_STRING([--enable-gnuefi], [enable optional gnuefi support]))
 AS_IF([test "x$enable_gnuefi" != "xno"], [
-        AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
+        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])
+
+        AC_CHECK_HEADERS(${EFI_INC_DIR}/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],
@@ -1309,12 +1399,6 @@ AS_IF([test "x$enable_gnuefi" != "xno"], [
               [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])
 
@@ -1545,6 +1629,12 @@ AC_ARG_WITH([pamconfdir],
 AM_CONDITIONAL(ENABLE_PAM_CONFIG, [test "$with_pamconfdir" != "no"])
 AX_NORMALIZE_PATH([with_pamconfdir])
 
+AC_ARG_WITH([rpmmacrosdir],
+        AS_HELP_STRING([--with-rpmmacrosdir=DIR], [directory to store macros for RPM]),
+        [], [with_rpmmacrosdir=\${prefix}/lib/rpm/macros.d])
+AM_CONDITIONAL(ENABLE_RPM_MACROS, [test "$with_rpmmacrosdir" != "no"])
+AX_NORMALIZE_PATH([with_rpmmacrosdir])
+
 AC_ARG_ENABLE([split-usr],
         AS_HELP_STRING([--enable-split-usr], [assume that /bin, /sbin aren't symlinks into /usr]),
         [],
@@ -1615,6 +1705,7 @@ AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
 AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
 AC_SUBST([pamlibdir], [$with_pamlibdir])
 AC_SUBST([pamconfdir], [$with_pamconfdir])
+AC_SUBST([rpmmacrosdir], [$with_rpmmacrosdir])
 AC_SUBST([rootprefix], [$with_rootprefix])
 AC_SUBST([rootlibdir], [$with_rootlibdir])
 
@@ -1625,7 +1716,7 @@ AC_CONFIG_FILES([
 
 AC_OUTPUT
 AC_MSG_RESULT([
-        $PACKAGE_NAME $VERSION
+        $PACKAGE_NAME $PACKAGE_VERSION
 
         libcryptsetup:                     ${have_libcryptsetup}
         PAM:                               ${have_pam}
@@ -1645,6 +1736,7 @@ AC_MSG_RESULT([
         MICROHTTPD:                        ${have_microhttpd}
         GNUTLS:                            ${have_gnutls}
         libcurl:                           ${have_libcurl}
+        libidn2:                           ${have_libidn2}
         libidn:                            ${have_libidn}
         libiptc:                           ${have_libiptc}
         ELFUTILS:                          ${have_elfutils}
@@ -1652,27 +1744,29 @@ AC_MSG_RESULT([
         vconsole:                          ${have_vconsole}
         quotacheck:                        ${have_quotacheck}
         tmpfiles:                          ${have_tmpfiles}
+        environment.d:                     ${have_environment_d}
         sysusers:                          ${have_sysusers}
         firstboot:                         ${have_firstboot}
         randomseed:                        ${have_randomseed}
         backlight:                         ${have_backlight}
         rfkill:                            ${have_rfkill}
         logind:                            ${have_logind}
-        Default KillUserProcesses setting: ${KILL_USER_PROCESSES}
+        default cgroup hierarchy:          ${DEFAULT_HIERARCHY}
+        default KillUserProcesses setting: ${KILL_USER_PROCESSES}
         machined:                          ${have_machined}
         importd:                           ${have_importd}
         hostnamed:                         ${have_hostnamed}
         timedated:                         ${have_timedated}
         timesyncd:                         ${have_timesyncd}
-        Default NTP servers:               ${NTP_SERVERS}
+        default NTP servers:               ${NTP_SERVERS}
         time epoch:                        ${TIME_EPOCH}
         localed:                           ${have_localed}
         networkd:                          ${have_networkd}
         resolved:                          ${have_resolved}
-        Default DNS servers:               ${DNS_SERVERS}
-        Default DNSSEC mode:               ${DEFAULT_DNSSEC_MODE}
+        default DNS servers:               ${DNS_SERVERS}
+        default DNSSEC mode:               ${DEFAULT_DNSSEC_MODE}
         coredump:                          ${have_coredump}
-        polkit:                            ${have_polkit}
+        polkit:                            ${have_polkit} (legacy pkla support: ${polkit_pkla})
         efi:                               ${have_efi}
         gnuefi:                            ${have_gnuefi}
         efi arch:                          ${EFI_ARCH}
@@ -1686,6 +1780,7 @@ AC_MSG_RESULT([
         blkid:                             ${have_blkid}
         libmount:                          ${have_libmount}
         dbus:                              ${have_dbus}
+        glib:                              ${have_glib}
         nss-myhostname:                    ${have_myhostname}
         hwdb:                              ${enable_hwdb}
         tpm:                               ${have_tpm}
@@ -1709,27 +1804,29 @@ AC_MSG_RESULT([
         rootlib dir:                       ${with_rootlibdir}
         SysV init scripts:                 ${SYSTEM_SYSVINIT_PATH}
         SysV rc?.d directories:            ${SYSTEM_SYSVRCND_PATH}
-        Build Python:                      ${PYTHON}
+        build Python:                      ${PYTHON}
         PAM modules dir:                   ${with_pamlibdir}
         PAM configuration dir:             ${with_pamconfdir}
+        RPM macros dir:                    ${with_rpmmacrosdir}
         D-Bus policy dir:                  ${with_dbuspolicydir}
         D-Bus session dir:                 ${with_dbussessionservicedir}
         D-Bus system dir:                  ${with_dbussystemservicedir}
-        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}
-        Adm group:                         ${have_adm_group}
-        Wheel group:                       ${have_wheel_group}
-        Debug shell:                       ${SUSHELL} @ ${DEBUGTTY}
+        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}
+        adm group:                         ${have_adm_group}
+        wheel group:                       ${have_wheel_group}
+        debug shell:                       ${SUSHELL} @ ${DEBUGTTY}
         TTY GID:                           ${TTY_GID}
-        Maximum system UID:                ${SYSTEM_UID_MAX}
-        Maximum system GID:                ${SYSTEM_GID_MAX}
-        Certificate root:                  ${CERTIFICATEROOT}
-        Support URL:                       ${SUPPORT_URL}
+        maximum system UID:                ${SYSTEM_UID_MAX}
+        maximum system GID:                ${SYSTEM_GID_MAX}
+        /dev/kvm access mode:              ${DEV_KVM_MODE}
+        certificate root:                  ${CERTIFICATEROOT}
+        support URL:                       ${SUPPORT_URL}
         nobody user name:                  ${NOBODY_USER_NAME}
         nobody group name:                 ${NOBODY_GROUP_NAME}
-        Fallback hostname:                 ${FALLBACK_HOSTNAME}
+        fallback hostname:                 ${FALLBACK_HOSTNAME}
 
         CFLAGS:   ${OUR_CFLAGS} ${CFLAGS}
         CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}