diff options
author | Mark Wielaard <mjw@redhat.com> | 2016-11-23 20:51:35 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2016-11-23 20:51:35 +0100 |
commit | ee225020a880e41cd4007af09ae488bc9cf1a536 (patch) | |
tree | fa6debf30bbcb9424bda0126d48d71eb9c9292d6 /configure.ac | |
parent | 507e7e28f0f58cb711a7b3e5bb320c5f30b0e6ea (diff) |
Only workaround fts.h if we have a bad version that doesn't handle LFS.
Older versions of glibc included an fts implementation that didn't have
Large File System support. We worked around that in linux-kernel-modules.c
by including it early before config.h and then redefining some symbols
to get the 64-bit versions. This is somewhat fragile and not necessary
with newer glibc. If possible we want the 64bit fts version always.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c55fb9b4..f5351237 100644 --- a/configure.ac +++ b/configure.ac @@ -144,6 +144,15 @@ dnl tests, because the choice of the file model can (in principle) affect dnl whether functions and headers are available, whether they work, etc. AC_SYS_LARGEFILE +dnl Older glibc had a broken fts that didn't work with Large File Systems. +dnl We want the version that can handler LFS, but include workaround if we +dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to +dnl check it before including config.h (which might define _FILE_OFFSET_BITS). +AC_CACHE_CHECK([whether fts.h is bad when included (with LFS)], ac_cv_bad_fts, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <fts.h>]])], + ac_cv_bad_fts=no, ac_cv_bad_fts=yes)]) +AS_IF([test "x$ac_cv_bad_fts" = "xyes"], [CFLAGS="$CFLAGS -DBAD_FTS=1"]) + dnl enable debugging of branch prediction. AC_ARG_ENABLE([debugpred], AS_HELP_STRING([--enable-debugpred],[build binaries with support to debug branch prediction]), |