diff options
Diffstat (limited to 'bfd/configure.ac')
-rw-r--r-- | bfd/configure.ac | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/bfd/configure.ac b/bfd/configure.ac index 669cff7..3f3d504 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac @@ -204,7 +204,7 @@ AC_HEADER_DIRENT ACX_HEADER_STRING AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno) -AC_CHECK_FUNCS(strtoull getrlimit) +AC_CHECK_FUNCS(strtoull getrlimit posix_fallocate fallocate) AC_CHECK_DECLS(basename) AC_CHECK_DECLS(ftello) @@ -1182,6 +1182,28 @@ case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in true+yes ) AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;; esac +AC_CACHE_CHECK([mremap with MREMAP_MAYMOVE], [bfd_cv_mremap_maymove], +[AC_LINK_IFELSE([ +AC_LANG_PROGRAM([[ +#include <sys/mman.h> +void f() { mremap (0, 0, 0, MREMAP_MAYMOVE); } +]])], [bfd_cv_mremap_maymove=yes], [bfd_cv_mremap_maymove=no])]) +if test "$bfd_cv_mremap_maymove" = "yes"; then + AC_DEFINE(HAVE_MREMAP, 1, + [Define to 1 if you have the mremap function with MREMAP_MAYMOVE support]) +fi + +AC_CACHE_CHECK([msync with MS_SYNC], [bfd_cv_msync_ms_sync], +[AC_LINK_IFELSE([ +AC_LANG_PROGRAM([[ +#include <sys/mman.h> +void f() { msync (0, 0, MS_SYNC); } +]])], [bfd_cv_msync_ms_sync=yes], [bfd_cv_msync_ms_sync=no])]) +if test "$bfd_cv_msync_ms_sync" = "yes"; then + AC_DEFINE(HAVE_MSYNC, 1, + [Define to 1 if you have the msync function with MS_SYNC support]) +fi + rm -f doc/config.status AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in]) |