X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=93aba067397c7c01ca2fa1fb1bc390a3d3bf63f1;hp=a87a02656a7d83b5acf2323ebbdb593e0b307903;hb=d5b3d845f013f7f332c76e83bb8e867de7d3caee;hpb=747cf8cdf61cdad068c727e42eac699f2505ae77 diff --git a/configure.ac b/configure.ac index a87a02656..93aba0673 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,29 @@ AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not s AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])]) # i18n stuff for the PolicyKit policy files + +# Check whether intltool can be found, disable NLS otherwise +AC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no]) +AS_IF([test x"$intltool_found" != xyes], + [AS_IF([test x"$enable_nls" = xyes], + [AC_MSG_ERROR([--enable-nls requested but intltool not found])], + [AS_IF([test x"$enable_nls" != xno], + [AC_MSG_WARN([*** Disabling NLS support because intltool was not found]) + enable_nls=no]) + ]) + ]) + +AM_NLS +AS_IF([test x"$enable_nls" != xno], [ + # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line IT_PROG_INTLTOOL([0.40.0]) +]) + +AS_IF([test -z "$INTLTOOL_POLICY_RULE"], [ + # If intltool is not available, provide a dummy rule to fail generation of %.policy files with a meaningful error message + INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo " ITMRG " $@ && echo "*** intltool support required to build target $@" && false' + AC_SUBST(INTLTOOL_POLICY_RULE) +]) GETTEXT_PACKAGE=systemd AC_SUBST(GETTEXT_PACKAGE) @@ -278,12 +300,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]) @@ -651,7 +694,7 @@ AC_ARG_ENABLE([elfutils], if test "x${have_elfutils}" != xno ; then AC_CHECK_HEADERS( [elfutils/libdwfl.h], - [have_elfutils=yes], + [], [if test "x$have_elfutils" = xyes ; then AC_MSG_ERROR([*** ELFUTILS headers not found.]) fi]) @@ -659,11 +702,19 @@ if test "x${have_elfutils}" != xno ; then AC_CHECK_LIB( [dw], [dwfl_begin], - [have_elfutils=yes], + [], [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]) @@ -928,10 +979,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"]) # ------------------------------------------------------------------------------