X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=ad9060564bc2cd826b0caf05ce46333a5e9bb6f3;hp=b2a46df7dd41b16cf3a8ac2629448872daddc0bb;hb=59bb9d9a14889bee001706a32a518fe0a5009048;hpb=38a60d7112d33ffd596b23e8df53d75a7c09e71b diff --git a/configure.ac b/configure.ac index b2a46df7d..ad9060564 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ - +# # This file is part of systemd. # # Copyright 2010-2012 Lennart Poettering @@ -20,7 +20,7 @@ AC_PREREQ([2.64]) AC_INIT([systemd], - [189], + [195], [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd], [systemd], [http://www.freedesktop.org/wiki/Software/systemd]) @@ -62,26 +62,60 @@ AM_PROG_CC_C_O AC_PROG_GCC_TRADITIONAL AC_PATH_PROG([M4], [m4]) +AC_PATH_PROG([XSLTPROC], [xsltproc]) + +AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon]) +AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck]) + +AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap]) + +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])]) +AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [ + AC_MSG_ERROR([*** GTK doc requested but xsltproc not found]) +]) + 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 -AM_PATH_PYTHON(,, [:]) -AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) +# we use python to build the man page index, and for systemd-python +have_python=no +have_python_devel=no + +AC_ARG_WITH([python], + [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])]) + +AS_IF([test "x$with_python" != "xno"], [ + AM_PATH_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 \ @@ -149,6 +183,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 +#include +#include +#include ]]) + # This makes sure pkg.m4 is available. m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) @@ -174,7 +215,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]) @@ -301,6 +342,44 @@ fi AC_SUBST(ACL_LIBS) AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno]) +# ------------------------------------------------------------------------------ +AC_ARG_ENABLE([xattr], + AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]), + [case "${enableval}" in + yes) have_xattr=yes ;; + no) have_xattr=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;; + esac], + [have_xattr=auto]) + +if test "x${have_xattr}" != xno ; then + AC_CHECK_HEADERS( + [attr/xattr.h], + [have_xattr=yes], + [if test "x$have_xattr" = xyes ; then + AC_MSG_ERROR([*** XATTR headers not found.]) + fi]) + + AC_CHECK_LIB( + [attr], + [fsetxattr], + [have_xattr=yes], + [if test "x$have_xattr" = xyes ; then + AC_MSG_ERROR([*** libattr not found.]) + fi]) + + if test "x$have_xattr" = xyes ; then + XATTR_LIBS="-lattr" + AC_DEFINE(HAVE_XATTR, 1, [XATTR available]) + else + have_xattr=no + fi +else + XATTR_LIBS= +fi +AC_SUBST(XATTR_LIBS) +AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno]) + # ------------------------------------------------------------------------------ AC_ARG_ENABLE([gcrypt], AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]), @@ -395,6 +474,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 >= 0.9.5], + [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])) @@ -545,14 +636,15 @@ AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"]) # ------------------------------------------------------------------------------ have_manpages=no AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages])) -if test "x$enable_manpages" != "xno"; then - have_manpages=yes -fi -AM_CONDITIONAL(ENABLE_MANPAGES, [test "$have_manpages" = "yes"]) +AS_IF([test "x$enable_manpages" != xno], [ + AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [ + AC_MSG_ERROR([*** Manpages requested but xsltproc not found]) + ]) + AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes]) +]) +AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) # ------------------------------------------------------------------------------ -AC_PATH_PROG([XSLTPROC], [xsltproc]) -AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x) AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux, mandriva, mageia, angstrom or other])) if test "z$with_distro" = "z"; then @@ -771,8 +863,10 @@ AC_MSG_RESULT([ SELinux: ${have_selinux} XZ: ${have_xz} ACL: ${have_acl} + XATTR: ${have_xattr} GCRYPT: ${have_gcrypt} QRENCODE: ${have_qrencode} + MICROHTTPD: ${have_microhttpd} binfmt: ${have_binfmt} vconsole: ${have_vconsole} readahead: ${have_readahead} @@ -789,6 +883,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} @@ -805,6 +901,7 @@ AC_MSG_RESULT([ D-Bus interfaces dir: ${with_dbusinterfacedir} Split /usr: ${enable_split_usr} man pages: ${have_manpages} + gtk-doc: ${enable_gtk_doc} CFLAGS: ${OUR_CFLAGS} ${CFLAGS} CPPLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}