X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=d92f1fe015fb0626d735a3194390f89af9107086;hp=ab24266fa099b5c266a2a211c8bc4b5f4dbd2eec;hb=b4f052a05ab66d78290892382f33f20593001064;hpb=bd441fa27a22b7c6e11d9330560e0622fb69f297 diff --git a/configure.ac b/configure.ac index ab24266fa..d92f1fe01 100644 --- a/configure.ac +++ b/configure.ac @@ -60,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]) @@ -79,6 +76,8 @@ AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod]) AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec]) +M4_DEFINES= + # 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])], @@ -128,7 +127,9 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -Wold-style-definition \ -Wpointer-arith \ -Winit-self \ + -Wdeclaration-after-statement \ -Wfloat-equal \ + -Wsuggest-attribute=noreturn \ -Wmissing-prototypes \ -Wstrict-prototypes \ -Wredundant-decls \ @@ -145,6 +146,8 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -Wno-missing-field-initializers \ -Wno-unused-result \ -Werror=overflow \ + -Wdate-time \ + -Wnested-externs \ -ffast-math \ -fno-common \ -fdiagnostics-show-option \ @@ -172,9 +175,13 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ -Wl,--no-undefined \ -Wl,--gc-sections \ -Wl,-z,relro \ - -Wl,-z,now]) + -Wl,-z,now \ + -Wl,-fuse-ld=gold]) AC_SUBST([OUR_LDFLAGS], "$with_ldflags $address_sanitizer_ldflags") +AC_CHECK_SIZEOF(pid_t) +AC_CHECK_SIZEOF(uid_t) + # ------------------------------------------------------------------------------ # we use python to build the man page index, and for systemd-python have_python=no @@ -241,10 +248,27 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include = 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]) ]) +have_dbus=no +AC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests])) +AS_IF([test "x$enable_dbus" != "xno"], [ + PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2], + [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes], + [have_dbus=no]) + AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"], + [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])]) AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"]) +# ------------------------------------------------------------------------------ +have_compat_libs=no +AC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]), + [case "${enableval}" in + yes) have_compat_libs=yes ;; + no) have_compat_libs=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libs) ;; + esac], + [have_compat_libs=no]) +AM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"]) + # ------------------------------------------------------------------------------ have_coverage=no AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage])) @@ -801,6 +825,16 @@ if test "x$enable_multi_seat_x" != "xno"; then 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 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 + M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS" +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], @@ -913,7 +947,6 @@ AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) # Location of the init scripts as mandated by LSB SYSTEM_SYSVINIT_PATH=/etc/init.d SYSTEM_SYSVRCND_PATH=/etc/rc.d -M4_DEFINES= AC_ARG_WITH([sysvinit-path], [AS_HELP_STRING([--with-sysvinit-path=PATH], @@ -1082,10 +1115,12 @@ AC_MSG_RESULT([ efi: ${have_efi} kmod: ${have_kmod} blkid: ${have_blkid} + dbus: ${have_dbus} 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} @@ -1093,6 +1128,7 @@ AC_MSG_RESULT([ test coverage: ${have_coverage} Split /usr: ${enable_split_usr} SysV compatibility: ${SYSTEM_SYSV_COMPAT} + compatibility libraries: ${have_compat_libs} prefix: ${prefix} rootprefix: ${with_rootprefix}