chiark / gitweb /
condition: split out most of condition handling into libsystemd-shard
[elogind.git] / configure.ac
index 7140627244e27abda0bde7c0393cbad5e64ca42e..05ee098d2827c9549c7fe5860ddc66966db8532d 100644 (file)
@@ -20,7 +20,7 @@
 AC_PREREQ([2.64])
 
 AC_INIT([systemd],
-        [208],
+        [209],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
         [systemd],
         [http://www.freedesktop.org/wiki/Software/systemd])
@@ -175,7 +175,8 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
         -Wl,--no-undefined \
         -Wl,--gc-sections \
         -Wl,-z,relro \
-        -Wl,-z,now])
+        -Wl,-z,now \
+        -Wl,-fuse-ld=gold])
 AC_SUBST([OUR_LDFLAGS], "$with_ldflags $address_sanitizer_ldflags")
 
 AC_CHECK_SIZEOF(pid_t)
@@ -187,9 +188,11 @@ have_python=no
 AC_ARG_WITH([python],
         [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
 
+have_lxml=no
 AS_IF([test "x$with_python" != "xno"], [
         AM_PATH_PYTHON(,, [:])
-        AS_IF([test "$PYTHON" != :], [have_python=yes])
+        AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes], [have_lxml=no])
+        AS_IF([test "$PYTHON" != : -a $have_lxml = yes], [have_python=yes])
 ])
 AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
 AS_IF([test "x$PYTHON_BINARY" = "x"],
@@ -249,7 +252,7 @@ m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-conf
 # ------------------------------------------------------------------------------
 have_dbus=no
 AC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests]))
-AS_IF(["x$enable_dbus" != "xno"], [
+AS_IF([test "x$enable_dbus" != "xno"], [
         PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2],
                 [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes],
                 [have_dbus=no])
@@ -257,6 +260,17 @@ AS_IF(["x$enable_dbus" != "xno"], [
                 [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
 AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_compat_libs=no
+AC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
+                [case "${enableval}" in
+                        yes) have_compat_libs=yes ;;
+                        no) have_compat_libs=no ;;
+                        *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libs) ;;
+                esac],
+                [have_compat_libs=no])
+AM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"])
+
 # ------------------------------------------------------------------------------
 have_coverage=no
 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
@@ -308,6 +322,21 @@ if test "x$enable_blkid" != "xno"; then
 fi
 AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_seccomp=no
+AC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support]))
+if test "x$enable_seccomp" != "xno"; then
+        PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0],
+               [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available])
+                have_seccomp=yes
+                M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"],
+               [have_seccomp=no])
+        if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then
+                AC_MSG_ERROR([*** seccomp support requested but libraries not found])
+        fi
+fi
+AM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"])
+
 # ------------------------------------------------------------------------------
 have_ima=yes
 AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
@@ -346,7 +375,10 @@ have_selinux=no
 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
 if test "x$enable_selinux" != "xno"; then
         PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
-                [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
+                [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available])
+                 have_selinux=yes
+                 M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"],
+                [have_selinux=no])
         if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
                 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
         fi
@@ -399,6 +431,7 @@ if test "x${have_tcpwrap}" != xno ; then
                 fi
                 have_tcpwrap=no
         else
+                M4_DEFINES="$M4_DEFINES -DHAVE_LIBWRAP"
                 have_tcpwrap=yes
         fi
 else
@@ -435,6 +468,7 @@ if test "x${have_pam}" != xno ; then
         if test "x$have_pam" = xyes ; then
                 PAM_LIBS="-lpam -lpam_misc"
                 AC_DEFINE(HAVE_PAM, 1, [PAM available])
+                M4_DEFINES="$M4_DEFINES -DHAVE_PAM"
         else
                 have_pam=no
         fi
@@ -537,6 +571,7 @@ if test "x${have_xattr}" = xno; then
         fi
 else
         if test "x${have_smack}" = xauto; then
+                M4_DEFINES="$M4_DEFINES -DHAVE_SMACK"
                 have_smack=yes
         fi
 fi
@@ -1076,6 +1111,7 @@ AC_MSG_RESULT([
         AUDIT:                   ${have_audit}
         IMA:                     ${have_ima}
         SELinux:                 ${have_selinux}
+        SECCOMP:                 ${have_seccomp}
         SMACK:                   ${have_smack}
         XZ:                      ${have_xz}
         ACL:                     ${have_acl}
@@ -1116,6 +1152,7 @@ AC_MSG_RESULT([
         test coverage:           ${have_coverage}
         Split /usr:              ${enable_split_usr}
         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
+        compatibility libraries: ${have_compat_libs}
 
         prefix:                  ${prefix}
         rootprefix:              ${with_rootprefix}