X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=c3b4ea3ec939d6f8804f4b1b5b7803f3bc8b737b;hp=e33c8f75accb36139e679805175a8d1cfc65ad9a;hb=9ba81d5a61b7c992a1d2e5e02f334b8e2a0b0c22;hpb=37161c5148396448921841ae1026b281c7949652 diff --git a/configure.ac b/configure.ac index e33c8f75a..c3b4ea3ec 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], [], []) @@ -299,7 +306,7 @@ 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], [], [], [[