diff options
| author | Ulf Hermann <[email protected]> | 2017-03-28 13:46:26 +0200 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-05-03 15:06:25 +0000 |
| commit | bc44466ccd2045eea2352f0569399fb0515b46ba (patch) | |
| tree | f4b8d05a882d27ceb927aa59419d9f858ef11113 /configure.ac | |
| parent | fdc98439e9c4a662c8c3248a823dca0cd486f6fc (diff) | |
Wrap fts_.h in fts.h
Change-Id: I87cc19052ded7b9ec1a3347faa05709318cc9a74
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 2488bbcd..f04a6c81 100644 --- a/configure.ac +++ b/configure.ac @@ -302,13 +302,17 @@ 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)]) +AC_CHECK_HEADER(fts.h) +AM_CONDITIONAL(HAVE_FTS_H, [test "x$ac_cv_header_fts_h" = "xyes"]) +if test "x$ac_cv_header_fts_h" = "xyes"; then + 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)]) +fi AS_IF([test "x$ac_cv_bad_fts" = "xyes"], [CFLAGS="$CFLAGS -DBAD_FTS=1"]) # See if we can add -D_FORTIFY_SOURCE=2. Don't do it if it is already |
