X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=configure.ac;h=bb6018f87decb325298d4f2b59d6f37a92b7c88d;hb=ff452e76e2c0f89a32542b7179bb2fd538335933;hp=c68c75930d4936398c965094f924dd568a6abca3;hpb=1b99214789101976d6bbf75c351279584b071998;p=elogind.git diff --git a/configure.ac b/configure.ac index c68c75930..bb6018f87 100644 --- a/configure.ac +++ b/configure.ac @@ -216,9 +216,21 @@ AC_ARG_WITH([python], have_lxml=no AS_IF([test "x$with_python" != "xno"], [ AM_PATH_PYTHON(,, [:]) - 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]) + AS_IF([test "x$PYTHON" != "x:"], [ + AC_MSG_CHECKING([for python lxml module]) + AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes]) + AC_MSG_RESULT([$have_lxml]) + AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes], + [AC_MSG_WARN([*** python support requires python-lxml module installed])]) + ]) ]) +AS_IF([test "$have_python" != "yes"], [ + AS_IF([test "$with_python" = "yes"], + [AC_MSG_ERROR([*** python support requested but python support not found])]) + AS_IF([test "$with_python" != "no"], + [AC_MSG_WARN([*** python support not found, some documentation cannot be built])]) +]) + AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"]) AS_IF([test "x$PYTHON_BINARY" = "x"], [AS_IF([test "x$have_python" = "xyes"], @@ -266,12 +278,33 @@ LIBS="$save_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, setns, LO_FLAGS_PARTSCAN], [], [], [[#include +AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN], + [], [], [[ +#include #include #include #include #include -#include ]]) +#include +]]) + +AC_CHECK_DECLS([IFLA_PHYS_PORT_ID, + IFLA_BOND_AD_INFO, + IFLA_VLAN_PROTOCOL, + IFLA_VXLAN_LOCAL6, + IFLA_IPTUN_6RD_RELAY_PREFIXLEN, + IFLA_BRIDGE_VLAN_INFO], +[], [], [[ +#include +#include +#include +#include +#include +#include +#include +#include +#include +]]) # This makes sure pkg.m4 is available. m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) @@ -626,6 +659,52 @@ else fi AC_SUBST(AUDIT_LIBS) +# ------------------------------------------------------------------------------ +AC_ARG_ENABLE([elfutils], + AS_HELP_STRING([--disable-elfutils],[Disable optional ELFUTILS support]), + [case "${enableval}" in + yes) have_elfutils=yes ;; + no) have_elfutils=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-elfutils) ;; + esac], + [have_elfutils=auto]) + +if test "x${have_elfutils}" != xno ; then + AC_CHECK_HEADERS( + [elfutils/libdwfl.h], + [], + [if test "x$have_elfutils" = xyes ; then + AC_MSG_ERROR([*** ELFUTILS headers not found.]) + fi]) + + AC_CHECK_LIB( + [dw], + [dwfl_begin], + [], + [if test "x$have_elfutils" = xyes ; then + AC_MSG_ERROR([*** ELFUTILS libs not found.]) + fi]) + + AC_CHECK_LIB( + [dw], + [dwfl_core_file_attach], + [have_elfutils=yes], + [if test "x$have_elfutils" = xyes ; then + AC_MSG_ERROR([*** ELFUTILS >= 158 is required.]) + fi]) + + if test "x$have_elfutils" = xyes ; then + ELFUTILS_LIBS="-lelf -ldw" + AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available]) + else + have_elfutils=no + fi +else + ELFUTILS_LIBS= +fi +AC_SUBST(ELFUTILS_LIBS) +AM_CONDITIONAL(HAVE_ELFUTILS, [test "$have_elfutils" = "yes"]) + # ------------------------------------------------------------------------------ have_libcryptsetup=no AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools])) @@ -878,10 +957,10 @@ AC_SUBST(DNS_SERVERS) # ------------------------------------------------------------------------------ have_networkd=no AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd])) -if test "x$enable_networkd" != "xno"; then +AS_IF([test "x$enable_networkd" != "xno"], [ AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled]) have_networkd=yes -fi +]) AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"]) # ------------------------------------------------------------------------------ @@ -1050,8 +1129,11 @@ AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes") AC_ARG_WITH([tty-gid], [AS_HELP_STRING([--with-tty-gid=GID], [Specify the numeric GID of the 'tty' group])], - [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])], - []) + [TTY_GID="$withval"], + [TTY_GID="5"]) + +AC_DEFINE_UNQUOTED(TTY_GID, [$TTY_GID], [GID of the 'tty' group]) +AC_SUBST(TTY_GID) AC_ARG_WITH([dbuspolicydir], AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]), @@ -1168,6 +1250,7 @@ AC_MSG_RESULT([ MICROHTTPD: ${have_microhttpd} CHKCONFIG: ${have_chkconfig} GNUTLS: ${have_gnutls} + ELFUTILS: ${have_elfutils} binfmt: ${have_binfmt} vconsole: ${have_vconsole} readahead: ${have_readahead} @@ -1234,6 +1317,7 @@ AC_MSG_RESULT([ Extra start script: ${RC_LOCAL_SCRIPT_PATH_START} Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP} Debug shell: ${SUSHELL} @ ${DEBUGTTY} + TTY GID: ${TTY_GID} Maximum System UID: ${SYSTEM_UID_MAX} Maximum System GID: ${SYSTEM_GID_MAX}