diff m4/sys_resource_h.m4 @ 16775:fc64f4cef353

New module 'sys_resource'. * lib/sys_resource.in.h: New file. * m4/sys_resource_h.m4: New file. * modules/sys_resource: New file. * doc/posix-headers/sys_resource.texi: Mention the new module.
author Bruno Haible <bruno@clisp.org>
date Thu, 12 Apr 2012 20:59:22 +0200 (2012-04-12)
parents
children 30ef6011648b
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/m4/sys_resource_h.m4
@@ -0,0 +1,31 @@
+# sys_resource_h.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_SYS_RESOURCE],
+[
+  AC_REQUIRE([gl_SYS_RESOURCE_H_DEFAULTS])
+  dnl <sys/resource.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_CHECK_NEXT_HEADERS([sys/resource.h])
+  if test $ac_cv_header_sys_resource_h = yes; then
+    HAVE_SYS_RESOURCE_H=1
+  else
+    HAVE_SYS_RESOURCE_H=0
+  fi
+  AC_SUBST([HAVE_SYS_RESOURCE_H])
+])
+
+AC_DEFUN([gl_SYS_RESOURCE_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_SYS_RESOURCE_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_RESOURCE_H_DEFAULTS],
+[
+])