AC_PREREQ([2.64])
AC_INIT([elogind],
- [233.2],
+ [234.1],
[https://github.com/elogind/elogind/issues],
[elogind],
[https://github.com/elogind/elogind])
])])
# ------------------------------------------------------------------------------
+have_lto=no
AC_ARG_ENABLE([lto], [AS_HELP_STRING([--disable-lto], [disable -flto])],
[], [enable_lto=yes])
AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
- [AS_IF([test "x$enable_lto" = "xyes"],
- [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [-flto])],
+ [AS_IF([test "x$enable_lto" = "xyes"], [have_lto=yes],
[AC_MSG_RESULT([disabling -flto as requested])])],
[AC_MSG_RESULT([skipping -flto, optimization not enabled])])
+AS_IF([test "x$have_lto" = "xyes"],
+ [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS],
+ [-flto -fuse-linker-plugin])])
+
+AS_CASE([$with_cflags], [*-flto*], [], [have_lto=no])
+
# ------------------------------------------------------------------------------
AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
[CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
-Wl,--no-undefined \
-Wl,-z,relro \
-Wl,-z,now \
- -pie \
- -Wl,-fuse-ld=gold])
+ -pie])
+AS_IF([test "x$have_lto" = "xyes"],
+ [CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [-Wl,-fuse-ld=gold])])
# ------------------------------------------------------------------------------
AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
pivot_root,
name_to_handle_at,
setns,
- getrandom,
renameat2,
kcmp,
keyctl,
#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>
]])
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,
[with_udevbindir=$($PKG_CONFIG --variable=udevdir udev)])
AC_SUBST([udevbindir], [$with_udevbindir])
+# ------------------------------------------------------------------------------
+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]),
[xyes], [have_utmp=yes],
[xno], [have_utmp=no],
AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
-AS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
+AS_IF([test "x$have_utmp" = "xyes"], [
+ AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])
+ have_utmp=yes
+ M4_DEFINES="$M4_DEFINES -DHAVE_UTMP"],
+ [have_utmp=no])
AM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
# ------------------------------------------------------------------------------
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"])
# ------------------------------------------------------------------------------
AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])
[with_rootlibdir=${libdir}])
AX_NORMALIZE_PATH([with_rootlibdir])
+AC_ARG_WITH([rootlibexecdir],
+ AS_HELP_STRING([--with-rootlibexecdir=DIR], [Root directory for executables necessary for boot]),
+ [],
+ [with_rootlibexecdir=${libdir}/libexec])
+AX_NORMALIZE_PATH([with_rootlibexecdir])
+
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [directory for PAM modules]),
[],
AC_SUBST([pamconfdir], [$with_pamconfdir])
AC_SUBST([rootprefix], [$with_rootprefix])
AC_SUBST([rootlibdir], [$with_rootlibdir])
+AC_SUBST([rootlibexecdir], [$with_rootlibexecdir])
AC_SUBST([cgroup_controller], [$with_cgroupctrl])
AC_CONFIG_FILES([
AC_OUTPUT
AC_MSG_RESULT([
- $PACKAGE_NAME $VERSION
+ $PACKAGE_NAME $PACKAGE_VERSION
PAM: . . . . . . . . . . . . . . . ${have_pam}
SELinux: . . . . . . . . . . . . . ${have_selinux}
ACL: . . . . . . . . . . . . . . . ${have_acl}
default cgroup hierarchy: . . . . ${DEFAULT_HIERARCHY}
default KillUserProcesses setting: ${KILL_USER_PROCESSES}
- polkit: . . . . . . . . . . . . . ${have_polkit}
+ polkit: . . . . . . . . . . . . . ${have_polkit} (legacy pkla support: ${polkit_pkla})
+ glib: . . . . . . . . . . . . . . ${have_glib}
Python: . . . . . . . . . . . . . ${have_python}
man pages: . . . . . . . . . . . . ${have_manpages}
test coverage: . . . . . . . . . . ${have_coverage}
Split /usr: . . . . . . . . . . . ${enable_split_usr}
utmp/wtmp support: . . . . . . . . ${have_utmp}
+ Link time optimization: . . . . . ${have_lto}
extra debugging: . . . . . . . . . ${enable_debug}
cgroup controller: . . . . . . . . ${with_cgroupctrl}
includedir: . . . . . . . . . . . ${includedir}
lib dir: . . . . . . . . . . . . . ${libdir}
rootlib dir: . . . . . . . . . . . ${with_rootlibdir}
+ rootlibexec dir: . . . . . . . . . ${with_rootlibexecdir}
PAM modules dir: . . . . . . . . . ${with_pamlibdir}
PAM configuration dir: . . . . . . ${with_pamconfdir}
D-Bus policy dir: . . . . . . . . ${with_dbuspolicydir}