Blame gettext-tools/gnulib-m4/getpagesize.m4

Packit Bot 06c835
# getpagesize.m4 serial 9
Packit Bot 06c835
dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2015 Free Software Foundation,
Packit Bot 06c835
dnl Inc.
Packit Bot 06c835
dnl This file is free software; the Free Software Foundation
Packit Bot 06c835
dnl gives unlimited permission to copy and/or distribute it,
Packit Bot 06c835
dnl with or without modifications, as long as this notice is preserved.
Packit Bot 06c835
Packit Bot 06c835
AC_DEFUN([gl_FUNC_GETPAGESIZE],
Packit Bot 06c835
[
Packit Bot 06c835
  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
Packit Bot 06c835
  AC_REQUIRE([AC_CANONICAL_HOST])
Packit Bot 06c835
  AC_CHECK_FUNCS([getpagesize])
Packit Bot 06c835
  if test $ac_cv_func_getpagesize = no; then
Packit Bot 06c835
    HAVE_GETPAGESIZE=0
Packit Bot 06c835
    AC_CHECK_HEADERS([OS.h])
Packit Bot 06c835
    if test $ac_cv_header_OS_h = yes; then
Packit Bot 06c835
      HAVE_OS_H=1
Packit Bot 06c835
    fi
Packit Bot 06c835
    AC_CHECK_HEADERS([sys/param.h])
Packit Bot 06c835
    if test $ac_cv_header_sys_param_h = yes; then
Packit Bot 06c835
      HAVE_SYS_PARAM_H=1
Packit Bot 06c835
    fi
Packit Bot 06c835
  fi
Packit Bot 06c835
  case "$host_os" in
Packit Bot 06c835
    mingw*)
Packit Bot 06c835
      REPLACE_GETPAGESIZE=1
Packit Bot 06c835
      ;;
Packit Bot 06c835
  esac
Packit Bot 06c835
  dnl Also check whether it's declared.
Packit Bot 06c835
  dnl mingw has getpagesize() in libgcc.a but doesn't declare it.
Packit Bot 06c835
  AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0])
Packit Bot 06c835
])