X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=6ada38af9465166881b2bd890e3703f176f4614f;hp=7e41d577bcb30736b03be1f091253cfce2dbdd96;hb=e93c33d4aadb41427f215d43545e7fadc6bcec6f;hpb=03a170c03cd4a09721369ece48affb70d66c6b90 diff --git a/configure.ac b/configure.ac index 7e41d577b..6ada38af9 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ AC_CONFIG_AUX_DIR([build-aux]) AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_PREFIX_DEFAULT([/usr]) +AM_MAINTAINER_MODE([enable]) AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news]) AM_SILENT_RULES([yes]) AC_CANONICAL_HOST @@ -59,10 +60,7 @@ AC_PROG_SED AC_PROG_GREP AC_PROG_AWK -AC_PROG_CC AC_PROG_CC_C99 -AM_PROG_CC_C_O -AC_PROG_GCC_TRADITIONAL AC_PATH_PROG([M4], [m4]) AC_PATH_PROG([XSLTPROC], [xsltproc]) @@ -155,6 +153,10 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -fdata-sections \ -fstack-protector \ --param=ssp-buffer-size=4]) +AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], + [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ + -flto])], + [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) AC_SUBST([OUR_CFLAGS], "$with_cflags $address_sanitizer_cflags") AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], @@ -236,8 +238,10 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include = 1.3.2]) - +# ------------------------------------------------------------------------------ +PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2], have_dbus=yes, have_dbus=no]) +AS_IF([test "$have_dbus" = "yes"], [ AC_DEFINE(HAVE_DBUS, [1], [Define if dbus-1 is available]) ]) +AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"]) # ------------------------------------------------------------------------------ have_coverage=no @@ -770,6 +774,14 @@ if test "x$enable_polkit" != "xno"; then fi AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"]) +# ------------------------------------------------------------------------------ +AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd])) +if test "x$enable_networkd" != "xno"; then + 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"]) + # ------------------------------------------------------------------------------ have_efi=no AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support])) @@ -779,6 +791,23 @@ if test "x$enable_efi" != "xno"; then fi AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"]) +# ------------------------------------------------------------------------------ +have_multi_seat_x=no +AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x])) +if test "x$enable_multi_seat_x" != "xno"; then + have_multi_seat_x=yes +fi +AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"]) + +# ------------------------------------------------------------------------------ +have_kdbus=no +AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do not connect to kdbus by default])) +if test "x$enable_kdbus" == "xyes"; then + AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled]) + have_kdbus=yes +fi +AM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"]) + # ------------------------------------------------------------------------------ AC_ARG_WITH(rc-local-script-path-start, AS_HELP_STRING([--with-rc-local-script-path-start=PATH], @@ -827,7 +856,7 @@ AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit]) AC_SUBST(TELINIT) -AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h]) +AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h]) # ------------------------------------------------------------------------------ have_myhostname=no @@ -1063,6 +1092,8 @@ AC_MSG_RESULT([ nss-myhostname: ${have_myhostname} gudev: ${enable_gudev} gintrospection: ${enable_introspection} + multi-seat-x: ${have_multi_seat_x} + kdbus: ${have_kdbus} Python: ${have_python} Python Headers: ${have_python_devel} man pages: ${have_manpages}