X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=d92f1fe015fb0626d735a3194390f89af9107086;hp=4c7fa23dfaace4eb04b8316a48a7b54cdb491d6f;hb=36e0e6311bb4df37385db19b5eca03973b26b5ff;hpb=abaaabf40a9891014ed4c402d7beb5a67ac256b1 diff --git a/configure.ac b/configure.ac index 4c7fa23df..d92f1fe01 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.64]) AC_INIT([systemd], - [207], + [208], [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd], [systemd], [http://www.freedesktop.org/wiki/Software/systemd]) @@ -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]) @@ -78,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])], @@ -94,7 +94,6 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1]) AM_CONDITIONAL([HAVE_INTROSPECTION], [false]) enable_introspection=no]) -AC_CHECK_TOOL(OBJCOPY, objcopy) AC_CHECK_TOOL(STRINGS, strings) AC_CHECK_TOOL(GPERF, gperf) if test -z "$GPERF" ; then @@ -130,6 +129,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -Winit-self \ -Wdeclaration-after-statement \ -Wfloat-equal \ + -Wsuggest-attribute=noreturn \ -Wmissing-prototypes \ -Wstrict-prototypes \ -Wredundant-decls \ @@ -146,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 \ @@ -156,9 +158,13 @@ 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[[12345g\ ]]*], +AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ -Wp,-D_FORTIFY_SOURCE=2])], [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])]) @@ -169,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 @@ -237,8 +247,27 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include = 1.3.2]) +# ------------------------------------------------------------------------------ +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 @@ -269,9 +298,9 @@ AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules s if test "x$enable_kmod" != "xno"; then PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no) if test "x$have_kmod" = "xyes"; then - PKG_CHECK_MODULES(KMOD, [ libkmod >= 14 ], + PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ], [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])], - AC_MSG_ERROR([*** kmod version >= 14 not found])) + AC_MSG_ERROR([*** kmod version >= 15 not found])) fi if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then AC_MSG_ERROR([*** kmod support requested, but libraries not found]) @@ -524,6 +553,12 @@ else fi fi +AC_ARG_WITH(smack-run-label, +AS_HELP_STRING([--with-smack-run-label=STRING], + [run systemd --system with a specific SMACK label]), + [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])], + []) + if test "x${have_smack}" = xyes ; then AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available]) fi @@ -698,6 +733,14 @@ if test "x$enable_backlight" != "xno"; then fi AM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"]) +# ------------------------------------------------------------------------------ +have_rfkill=no +AC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools])) +if test "x$enable_rfkill" != "xno"; then + have_rfkill=yes +fi +AM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"]) + # ------------------------------------------------------------------------------ have_logind=no AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon])) @@ -757,6 +800,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])) @@ -766,6 +817,24 @@ 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 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], @@ -814,14 +883,14 @@ 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 AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support])) if test "x$enable_myhostname" != "xno"; then AC_HEADER_STDC - AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h]) + AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h]) AC_C_CONST AC_TYPE_SIZE_T @@ -878,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], @@ -1036,6 +1104,7 @@ AC_MSG_RESULT([ tmpfiles: ${have_tmpfiles} randomseed: ${have_randomseed} backlight: ${have_backlight} + rfkill: ${have_rfkill} logind: ${have_logind} machined: ${have_machined} hostnamed: ${have_hostnamed} @@ -1046,9 +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} @@ -1056,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}