X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=configure.ac;h=9848315a80d189efb0b54165a4f310c93ddbdb2a;hb=aead9bd04191188f78f2565e0d9d25c586bdbf99;hp=5da3365c0be46facfeec19c6190084cf5f80f2b9;hpb=1532f28b7cf3e6e02e74691450b2b5379be6b805;p=elogind.git diff --git a/configure.ac b/configure.ac index 5da3365c0..9848315a8 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.64]) AC_INIT([elogind], - [222], + [226], [https://github.com/elogind/elogind/issues], [elogind], [https://github.com/elogind/elogind]) @@ -38,6 +38,16 @@ AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-di AM_SILENT_RULES([yes]) AC_CANONICAL_HOST AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.]) + +AC_PROG_CC_C99 + +AX_COMPILER_VENDOR +AS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [ + AC_CHECK_TOOLS([AR], [gcc-ar ar], [:]) + AC_CHECK_TOOLS([NM], [gcc-nm nm], [:]) + AC_CHECK_TOOLS([RANLIB], [gcc-ranlib ranlib], [:]) +]) + LT_PREREQ(2.2) LT_INIT([disable-static]) @@ -82,8 +92,6 @@ AC_PROG_SED AC_PROG_GREP AC_PROG_AWK -AC_PROG_CC_C99 - AC_PATH_PROG([M4], [m4]) AC_PATH_PROG([XSLTPROC], [xsltproc]) @@ -181,10 +189,10 @@ AS_CASE([$CC], [*clang*], -Wno-gnu-variable-sized-type-not-at-end \ ])]) -dnl AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*], -dnl [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -dnl -flto -ffat-lto-objects])], -dnl [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) +AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*], + [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ + -flto])], + [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags") AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*], @@ -224,11 +232,11 @@ AC_CHECK_SIZEOF(rlim_t,,[ #include ]) -# ------------------------------------------------------------------------------ -# we use python to build the man page index, and for systemd-python + # ------------------------------------------------------------------------------ +# we use python to build the man page index have_python=no AC_ARG_WITH([python], - [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])]) + [AS_HELP_STRING([--without-python], [Disable building the man page index (default: test)])]) have_lxml=no AS_IF([test "x$with_python" != "xno"], [ @@ -249,28 +257,6 @@ AS_IF([test "$have_python" != "yes"], [ ]) AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"]) -AS_IF([test "x$PYTHON_BINARY" = "x"], - [AS_IF([test "x$have_python" = "xyes"], - [PYTHON_BINARY="$(which "$PYTHON")"], - [PYTHON_BINARY=/usr/bin/python])]) -AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts]) - -AS_IF([test "x$have_python" != "xyes" -a "x$enable_python_devel" = "xyes"], - [AC_MSG_ERROR([*** python-devel support requires --with-python])]) - -have_python_devel=no -AC_ARG_ENABLE(python_devel, AS_HELP_STRING([--disable-python-devel], [Do not build python modules])) -AS_IF([test "x$have_python" = "xyes" -a "x$enable_python_devel" != "xno"], [ - PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}], - [have_python_devel=yes], - [PKG_CHECK_MODULES([PYTHON_DEVEL], [python], - [have_python_devel=yes], - [have_python_devel=no])]) - AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes], - [AC_MSG_ERROR([*** python-devel support requested but libraries not found])]) - AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build) -]) -AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"]) # ------------------------------------------------------------------------------ @@ -319,9 +305,10 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE, IFLA_VLAN_PROTOCOL, IFLA_VXLAN_REMCSUM_NOPARTIAL, IFLA_VXLAN_LOCAL6, - IFLA_IPTUN_6RD_RELAY_PREFIXLEN, + IFLA_IPTUN_ENCAP_DPORT, + IFLA_GRE_ENCAP_DPORT, IFLA_BRIDGE_VLAN_INFO, - IFLA_BRPORT_UNICAST_FLOOD, + IFLA_BRPORT_LEARNING_SYNC, NDA_IFINDEX, IFA_FLAGS], [], [], [[ @@ -641,11 +628,13 @@ AC_ARG_WITH([bashcompletiondir], ] , [ with_bashcompletiondir=${datadir}/bash-completion/completions ])]) +AM_CONDITIONAL(ENABLE_BASH_COMPLETION, [test "$with_bashcompletiondir" != "no"]) AX_NORMALIZE_PATH([with_bashcompletiondir]) AC_ARG_WITH([zshcompletiondir], AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]), [], [with_zshcompletiondir=${datadir}/zsh/site-functions]) +AM_CONDITIONAL(ENABLE_ZSH_COMPLETION, [test "$with_zshcompletiondir" != "no"]) AX_NORMALIZE_PATH([with_zshcompletiondir]) AC_ARG_WITH([rootprefix], @@ -760,6 +749,7 @@ AC_MSG_RESULT([ blkid: ${have_blkid} dbus: ${have_dbus} kdbus: ${have_kdbus} + Python: ${have_python} man pages: ${have_manpages} test coverage: ${have_coverage} Split /usr: ${enable_split_usr}