chiark / gitweb /
build-sys: check for name_to_handle_at declaration instead of its definition
[elogind.git] / configure.ac
index 4bafbfb2eae30b47854f8a9c558c72d11739e129..fe8137d81848951f97766d5232e54f04924deec4 100644 (file)
@@ -20,7 +20,7 @@
 AC_PREREQ([2.64])
 
 AC_INIT([systemd],
-        [189],
+        [194],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
         [systemd],
         [http://www.freedesktop.org/wiki/Software/systemd])
@@ -64,6 +64,11 @@ AC_PROG_GCC_TRADITIONAL
 AC_PATH_PROG([M4], [m4])
 AC_PATH_PROG([XSLTPROC], [xsltproc])
 
+AC_PATH_PROG([QUOTAON], [quotaon], [/sbin/quotaon])
+AC_PATH_PROG([QUOTACHECK], [quotacheck], [/sbin/quotacheck])
+
+AC_PATH_PROG([SETCAP], [setcap], [/sbin/setcap])
+
 # 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])
@@ -77,16 +82,31 @@ m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
 GOBJECT_INTROSPECTION_CHECK([1.31.1])
 ], [AM_CONDITIONAL([HAVE_INTROSPECTION], [false])])
 
-AC_CHECK_TOOL(OBJCOPY, objcopy)
-AC_CHECK_TOOL(STRINGS, strings)
-AC_CHECK_TOOL(GPERF, gperf)
+AC_PATH_TOOL(OBJCOPY, objcopy)
+AC_PATH_TOOL(STRINGS, strings)
+AC_PATH_TOOL(GPERF, gperf)
 if test -z "$GPERF" ; then
         AC_MSG_ERROR([*** gperf not found])
 fi
 
-# we use python only to build the man page index
+# we use python to build the man page index, and for systemd-python
+have_python=no
+have_python_devel=no
 AM_PATH_PYTHON(,, [:])
-AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
+if test "$PYTHON" != : ; then
+        have_python=yes
+        AC_PATH_PROG([PYTHON_CONFIG], python-config)
+
+        if test -n "$PYTHON_CONFIG" ; then
+                have_python_devel=yes
+                PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
+                PYTHON_LIBS="`$PYTHON_CONFIG --libs`"
+                AC_SUBST(PYTHON_CFLAGS)
+                AC_SUBST(PYTHON_LIBS)
+        fi
+fi
+AM_CONDITIONAL([HAVE_PYTHON], [test "$have_python" = "yes"])
+AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
 
 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -pipe \
@@ -154,6 +174,13 @@ CAP_LIBS="$LIBS"
 LIBS="$save_LIBS"
 AC_SUBST(CAP_LIBS)
 
+AC_CHECK_FUNCS([fanotify_init fanotify_mark])
+AC_CHECK_FUNCS([__secure_getenv secure_getenv])
+AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h>
+#include <unistd.h>
+#include <sys/mount.h>
+#include <fcntl.h>]])
+
 # This makes sure pkg.m4 is available.
 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
 
@@ -179,7 +206,7 @@ fi
 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 ],
+        PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
                 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], 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])
@@ -400,6 +427,18 @@ if test "x$enable_qrencode" != "xno"; then
 fi
 AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_microhttpd=no
+AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
+if test "x$enable_microhttpd" != "xno"; then
+        PKG_CHECK_MODULES(MICROHTTPD, [ libmicrohttpd ],
+                [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
+        if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
+                AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
+        fi
+fi
+AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
+
 # ------------------------------------------------------------------------------
 have_binfmt=no
 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
@@ -779,6 +818,7 @@ AC_MSG_RESULT([
         ACL:                     ${have_acl}
         GCRYPT:                  ${have_gcrypt}
         QRENCODE:                ${have_qrencode}
+        MICROHTTPD:              ${have_microhttpd}
         binfmt:                  ${have_binfmt}
         vconsole:                ${have_vconsole}
         readahead:               ${have_readahead}
@@ -795,6 +835,8 @@ AC_MSG_RESULT([
         gudev:                   ${enable_gudev}
         gintrospection:          ${enable_introspection}
         keymap:                  ${enable_keymap}
+        Python:                  ${have_python}
+        Python Headers:          ${have_python_devel}
 
         prefix:                  ${prefix}
         rootprefix:              ${with_rootprefix}