X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=05fc00d7fa70da771755c9fa9ac2673ddda655ff;hp=0802cfcc9846e617d41e2c9d71011681b54c3621;hb=994701548d3ea6aafe3d9c47d51f701878118d65;hpb=a59f16ce4a11c440cb2136ad3d5e3184714c545e diff --git a/configure.ac b/configure.ac index 0802cfcc9..05fc00d7f 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.64]) AC_INIT([systemd], - [215], + [217], [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd], [systemd], [http://www.freedesktop.org/wiki/Software/systemd]) @@ -183,14 +183,12 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -Wno-unused-parameter \ -Wno-missing-field-initializers \ -Wno-unused-result \ - -Wno-typedef-redefinition \ -Werror=overflow \ -Wdate-time \ -Wnested-externs \ -ffast-math \ -fno-common \ -fdiagnostics-show-option \ - -fdiagnostics-color \ -fno-strict-aliasing \ -fvisibility=hidden \ -ffunction-sections \ @@ -199,6 +197,13 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -fstack-protector-strong \ -fPIE \ --param=ssp-buffer-size=4]) + +AS_CASE([$CC], [*clang*], + [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ + -Wno-typedef-redefinition \ + -Wno-gnu-variable-sized-type-not-at-end \ + ])]) + AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -flto -ffat-lto-objects])], @@ -225,6 +230,7 @@ AC_CHECK_SIZEOF(pid_t) AC_CHECK_SIZEOF(uid_t) AC_CHECK_SIZEOF(gid_t) AC_CHECK_SIZEOF(time_t) +AC_CHECK_SIZEOF(dev_t) AC_CHECK_SIZEOF(rlim_t,,[ #include #include @@ -283,6 +289,7 @@ AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"]) AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])]) AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) AC_CHECK_HEADERS([linux/btrfs.h], [], []) +AC_CHECK_HEADERS([linux/memfd.h], [], []) # unconditionally pull-in librt with old glibc versions AC_SEARCH_LIBS([clock_gettime], [rt], [], []) @@ -299,9 +306,9 @@ RT_LIBS="$LIBS" AC_SUBST(RT_LIBS) LIBS="$save_LIBS" -AC_CHECK_FUNCS([fanotify_init fanotify_mark]) +AC_CHECK_FUNCS([memfd_create]) AC_CHECK_FUNCS([__secure_getenv secure_getenv]) -AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN], +AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, LO_FLAGS_PARTSCAN], [], [], [[ #include #include @@ -309,6 +316,7 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN] #include #include #include +#include ]]) AC_CHECK_DECLS([IFLA_MACVLAN_FLAGS, @@ -345,6 +353,16 @@ AS_IF([test "x$enable_dbus" != "xno"], [ [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])]) AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"]) +# ------------------------------------------------------------------------------ +have_utmp=yes +AC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]), + AS_CASE("x${enableval}", + [xyes], [have_utmp=yes], + [xno], [have_utmp=no], + AC_MSG_ERROR(bad value ${enableval} for --enable-utmp))) +AS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])]) +AM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"]) + # ------------------------------------------------------------------------------ have_compat_libs=no AC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]), @@ -810,6 +828,21 @@ if test "x$enable_libcurl" != "xno"; then fi AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"]) +# ------------------------------------------------------------------------------ +have_libidn=no +AC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support])) +if test "x$enable_libidn" != "xno"; then + PKG_CHECK_MODULES(LIBIDN, [libidn], + [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available]) + have_libidn=yes + M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"], + [have_libidn=no]) + if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then + AC_MSG_ERROR([*** libidn support requested but libraries not found]) + fi +fi +AM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"]) + # ------------------------------------------------------------------------------ have_binfmt=no AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool])) @@ -826,14 +859,6 @@ if test "x$enable_vconsole" != "xno"; then fi AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"]) -# ------------------------------------------------------------------------------ -have_readahead=no -AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools])) -if test "x$enable_readahead" != "xno"; then - have_readahead=yes -fi -AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"]) - # ------------------------------------------------------------------------------ have_bootchart=no AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool])) @@ -1007,6 +1032,7 @@ have_resolved=no AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon])) if test "x$enable_resolved" != "xno"; then have_resolved=yes + M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED" fi AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"]) @@ -1037,20 +1063,15 @@ 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_terminal=no AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support])) if test "x$enable_terminal" = "xyes"; then - AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled]) - have_terminal=yes + PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4], [have_terminal=yes]) + AS_IF([test "x$have_terminal" != xyes -a "x$enable_terminal" = xyes], + [AC_MSG_ERROR([*** terminal support requested but required dependencies not available])], + [test "x$have_terminal" = xyes], + [AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])]) fi AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes"]) @@ -1133,25 +1154,6 @@ if test "x$enable_myhostname" != "xno"; then fi AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"]) -# ------------------------------------------------------------------------------ -AC_ARG_WITH(firmware-path, - AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], - [Firmware search path (default="")]), - [], [with_firmware_path=""]) -OLD_IFS=$IFS -IFS=: -for i in $with_firmware_path; do - if test "x${FIRMWARE_PATH}" = "x"; then - FIRMWARE_PATH="\\\"${i}/\\\"" - else - FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" - fi -done -IFS=$OLD_IFS -AC_SUBST(FIRMWARE_PATH) -AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ]) -AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"]) - # ------------------------------------------------------------------------------ AC_ARG_ENABLE([gudev], AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]), @@ -1167,7 +1169,18 @@ AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes]) AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) # ------------------------------------------------------------------------------ +AC_ARG_ENABLE(hibernate, + [AC_HELP_STRING([--disable-hibernate], [disable hibernation support])], + enable_hibernate=$enableval, enable_hibernate=yes) +AM_CONDITIONAL(ENABLE_HIBERNATE, [test x$enable_hibernate = xyes]) +# ------------------------------------------------------------------------------ +AC_ARG_ENABLE(ldconfig, + [AC_HELP_STRING([--disable-ldconfig], [disable ldconfig])], + enable_ldconfig=$enableval, enable_ldconfig=yes) +AM_CONDITIONAL(ENABLE_LDCONFIG, [test x$enable_ldconfig = xyes]) + +# ------------------------------------------------------------------------------ # Location of the init scripts as mandated by LSB SYSTEM_SYSVINIT_PATH=/etc/init.d SYSTEM_SYSVRCND_PATH=/etc/rc.d @@ -1286,6 +1299,13 @@ AC_ARG_ENABLE(tests, enable_tests=$enableval, enable_tests=yes) AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes]) +AC_ARG_ENABLE(hashmap-debug, + [AC_HELP_STRING([--enable-hashmap-debug], [enable hashmap debugging])], + enable_hashmap_debug=$enableval, enable_hashmap_debug=no) +AS_IF([test x$enable_hashmap_debug = xyes], [ + AC_DEFINE(ENABLE_HASHMAP_DEBUG, 1, [Define if hashmap debugging is to be enabled]) +]) + AC_SUBST([dbuspolicydir], [$with_dbuspolicydir]) AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir]) AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir]) @@ -1326,10 +1346,10 @@ AC_MSG_RESULT([ CHKCONFIG: ${have_chkconfig} GNUTLS: ${have_gnutls} libcurl: ${have_libcurl} + libidn: ${have_libidn} ELFUTILS: ${have_elfutils} binfmt: ${have_binfmt} vconsole: ${have_vconsole} - readahead: ${have_readahead} bootchart: ${have_bootchart} quotacheck: ${have_quotacheck} tmpfiles: ${have_tmpfiles} @@ -1358,7 +1378,6 @@ AC_MSG_RESULT([ nss-myhostname: ${have_myhostname} gudev: ${enable_gudev} gintrospection: ${enable_introspection} - multi-seat-x: ${have_multi_seat_x} terminal: ${have_terminal} kdbus: ${have_kdbus} Python: ${have_python} @@ -1369,6 +1388,7 @@ AC_MSG_RESULT([ Split /usr: ${enable_split_usr} SysV compatibility: ${SYSTEM_SYSV_COMPAT} compatibility libraries: ${have_compat_libs} + utmp/wtmp support: ${have_utmp} prefix: ${prefix} rootprefix: ${with_rootprefix} @@ -1383,7 +1403,6 @@ AC_MSG_RESULT([ Build Python: ${PYTHON} Installation Python: ${PYTHON_BINARY} sphinx binary: ${SPHINX_BUILD} - firmware path: ${FIRMWARE_PATH} PAM modules dir: ${with_pamlibdir} PAM configuration dir: ${with_pamconfdir} D-Bus policy dir: ${with_dbuspolicydir}