2 # Check for anonymous mmap macros. This is modified from
3 # http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
5 AC_DEFUN([AC_HEADER_MMAP_ANONYMOUS],
6 [AC_CACHE_CHECK(for MAP_ANONYMOUS vs. MAP_ANON,
7 ac_cv_header_mmap_anon,
9 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
10 [[#include <sys/mman.h>
13 [[mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0);]])],
14 ac_cv_header_mmap_anon=yes,
15 ac_cv_header_mmap_anon=no)
18 if test "$ac_cv_header_mmap_anon" = yes; then
19 AC_DEFINE([HAVE_MMAP_ANONYMOUS],[],[Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if it uses MAP_ANON])