X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=945adfcbee9632ef8e24a96ae5603c135ed838dc;hp=84644e163fed7ed76f7def335cc5475884cf5dc7;hb=65e3a2cf7c3b399853dd309f702ca5078b7d16ea;hpb=d6bc8348d5be8576a475ac8ced2b0146e60fb71f diff --git a/configure.ac b/configure.ac index 84644e163..945adfcbe 100644 --- a/configure.ac +++ b/configure.ac @@ -183,7 +183,6 @@ 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 \ @@ -198,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])], @@ -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], [], []) @@ -300,6 +307,7 @@ 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], [], [], [[ @@ -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]), @@ -1372,6 +1390,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}