chiark / gitweb /
build-sys: work around automake issue with files with a leading '-'
[elogind.git] / configure.ac
index e1278e8504808f7f5d59b7d4449aadcd2bffd9ef..0881e47365efccfc1886b2b18aecd07bae8c3dba 100644 (file)
@@ -44,6 +44,9 @@ AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
 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
 IT_PROG_INTLTOOL([0.40.0])
 
@@ -73,8 +76,9 @@ AC_PATH_PROG([KILL], [kill], [/usr/bin/kill])
 
 # 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])])
+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])
@@ -127,6 +131,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -ffast-math \
         -fno-common \
         -fdiagnostics-show-option \
+        -fdiagnostics-color \
         -fno-strict-aliasing \
         -fvisibility=hidden \
         -ffunction-sections \
@@ -443,6 +448,31 @@ fi
 AC_SUBST(XATTR_LIBS)
 AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
 
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
+                [case "${enableval}" in
+                        yes) have_smack=yes ;;
+                        no) have_smack=no ;;
+                        *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
+                esac],
+                [have_smack=auto])
+
+if test "x${have_xattr}" = xno; then
+        if test "x${have_smack}" = xyes; then
+                AC_MSG_ERROR(SMACK requires xattr support)
+        else
+                have_smack=no
+        fi
+else
+        if test "x${have_smack}" = xauto; then
+                have_smack=yes
+        fi
+fi
+
+if test "x${have_smack}" = xyes ; then
+        AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
+fi
+
 # ------------------------------------------------------------------------------
 AC_ARG_ENABLE([gcrypt],
         AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
@@ -589,6 +619,14 @@ if test "x$enable_quotacheck" != "xno"; then
 fi
 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_tmpfiles=no
+AC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
+if test "x$enable_tmpfiles" != "xno"; then
+        have_tmpfiles=yes
+fi
+AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
+
 # ------------------------------------------------------------------------------
 have_randomseed=no
 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
@@ -606,6 +644,15 @@ fi
 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
 
+# ------------------------------------------------------------------------------
+have_machined=no
+AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
+if test "x$enable_machined" != "xno"; then
+        have_machined=yes
+fi
+AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
+AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
+
 # ------------------------------------------------------------------------------
 have_hostnamed=no
 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
@@ -914,6 +961,7 @@ AC_MSG_RESULT([
         AUDIT:                   ${have_audit}
         IMA:                     ${have_ima}
         SELinux:                 ${have_selinux}
+        SMACK:                   ${have_smack}
         XZ:                      ${have_xz}
         ACL:                     ${have_acl}
         XATTR:                   ${have_xattr}
@@ -926,8 +974,10 @@ AC_MSG_RESULT([
         readahead:               ${have_readahead}
         bootchart:               ${have_bootchart}
         quotacheck:              ${have_quotacheck}
+        tmpfiles:                ${have_tmpfiles}
         randomseed:              ${have_randomseed}
         logind:                  ${have_logind}
+        machined:                ${have_machined}
         hostnamed:               ${have_hostnamed}
         timedated:               ${have_timedated}
         localed:                 ${have_localed}