1#serial 2
2dnl Copyright (C) 2005 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([gl_PAGEALIGN_ALLOC],
8[
9  dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
10  AC_REQUIRE([AC_GNU_SOURCE])
11
12  AC_LIBSOURCE([pagealign_alloc.h])
13  AC_LIBOBJ([pagealign_alloc])
14  gl_PREREQ_PAGEALIGN_ALLOC
15])
16
17# Prerequisites of lib/pagealign_alloc.c.
18AC_DEFUN([gl_PREREQ_PAGEALIGN_ALLOC],
19[
20  AC_REQUIRE([gl_FUNC_MMAP_ANON])
21  AC_REQUIRE([gl_GETPAGESIZE])
22  AC_CHECK_FUNCS_ONCE([posix_memalign])
23  AC_CHECK_HEADERS_ONCE([unistd.h])
24])
25