~ubuntu-branches/debian/squeeze/ffcall/squeeze

« back to all changes in this revision

Viewing changes to m4/getpagesize.m4

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger
  • Date: 2010-06-26 15:29:30 UTC
  • mfrom: (5.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100626152930-c09y01gk3szcnykn
Tags: 1.10+cvs20100619-2
Ship to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl -*- Autoconf -*-
 
2
dnl Copyright (C) 1993-2009 Free Software Foundation, Inc.
 
3
dnl This file is free software, distributed under the terms of the GNU
 
4
dnl General Public License.  As a special exception to the GNU General
 
5
dnl Public License, this file may be distributed as part of a program
 
6
dnl that contains a configuration script generated by Autoconf, under
 
7
dnl the same distribution terms as the rest of that program.
 
8
 
 
9
dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
 
10
 
 
11
AC_PREREQ(2.57)
 
12
 
 
13
AC_DEFUN([CL_GETPAGESIZE],
 
14
[AC_BEFORE([$0], [CL_MPROTECT])
 
15
CL_LINK_CHECK([getpagesize], cl_cv_func_getpagesize, [
 
16
#ifdef HAVE_UNISTD_H
 
17
#include <sys/types.h>
 
18
#include <unistd.h>
 
19
#endif
 
20
], [getpagesize();],
 
21
AC_DEFINE([HAVE_GETPAGESIZE],[],[have getpagesize()])
 
22
have_getpagesize=1)dnl
 
23
if test -n "$have_getpagesize"; then
 
24
CL_PROTO([getpagesize], [
 
25
CL_PROTO_RET([
 
26
#include <stdlib.h>
 
27
#ifdef HAVE_UNISTD_H
 
28
#include <unistd.h>
 
29
#endif
 
30
], [int getpagesize();],
 
31
cl_cv_proto_getpagesize_ret, int, size_t)
 
32
], [extern $cl_cv_proto_getpagesize_ret getpagesize (void);])
 
33
AC_DEFINE_UNQUOTED([RETGETPAGESIZETYPE],$cl_cv_proto_getpagesize_ret,[return type of getpagesize()])
 
34
else
 
35
dnl Otherwise we use PAGESIZE defined in <sys/param.h>.
 
36
dnl But mingw32 doesn't have <sys/param.h>.
 
37
AC_CHECK_HEADERS(sys/param.h)
 
38
fi
 
39
])