diff options
Diffstat (limited to 'gl/m4/unistd_h.m4')
-rw-r--r-- | gl/m4/unistd_h.m4 | 71 |
1 files changed, 50 insertions, 21 deletions
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 index 9d499df..4b8857c 100644 --- a/gl/m4/unistd_h.m4 +++ b/gl/m4/unistd_h.m4 | |||
@@ -1,32 +1,61 @@ | |||
1 | # unistd_h.m4 serial 3 | 1 | # unistd_h.m4 serial 10 |
2 | dnl Copyright (C) 2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2006-2007 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
6 | 6 | ||
7 | dnl Written by Simon Josefsson | 7 | dnl Written by Simon Josefsson, Bruno Haible. |
8 | 8 | ||
9 | AC_DEFUN([gl_HEADER_UNISTD], | 9 | AC_DEFUN([gl_UNISTD_H], |
10 | [ | 10 | [ |
11 | AC_CHECK_HEADERS([unistd.h], [ | 11 | dnl Use AC_REQUIRE here, so that the default behavior below is expanded |
12 | UNISTD_H='' | 12 | dnl once only, before all statements that occur in other macros. |
13 | ], [ | 13 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) |
14 | UNISTD_H='unistd.h' | 14 | |
15 | ]) | 15 | gl_CHECK_NEXT_HEADERS([unistd.h]) |
16 | AC_SUBST(UNISTD_H) | ||
17 | dnl This module decides to build unistd.h if it is missing. | ||
18 | dnl The fchdir module decides to build unistd.h if fchdir() is missing. | ||
19 | dnl Therefore check for the prerequisites of lib/unistd.h always. | ||
20 | gl_PREREQ_UNISTD | ||
21 | ]) | ||
22 | 16 | ||
23 | dnl Prerequisites of lib/unistd.h. | ||
24 | AC_DEFUN([gl_PREREQ_UNISTD], | ||
25 | [ | ||
26 | AC_CHECK_HEADERS_ONCE([unistd.h]) | 17 | AC_CHECK_HEADERS_ONCE([unistd.h]) |
27 | if test $ac_cv_header_unistd_h = yes; then | 18 | if test $ac_cv_header_unistd_h = yes; then |
28 | gl_ABSOLUTE_HEADER([unistd.h]) | 19 | HAVE_UNISTD_H=1 |
29 | ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\" | 20 | else |
21 | HAVE_UNISTD_H=0 | ||
30 | fi | 22 | fi |
31 | AC_SUBST([ABSOLUTE_UNISTD_H]) | 23 | AC_SUBST([HAVE_UNISTD_H]) |
24 | ]) | ||
25 | |||
26 | AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], | ||
27 | [ | ||
28 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | ||
29 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) | ||
30 | GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 | ||
31 | ]) | ||
32 | |||
33 | AC_DEFUN([gl_UNISTD_H_DEFAULTS], | ||
34 | [ | ||
35 | GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) | ||
36 | GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) | ||
37 | GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) | ||
38 | GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) | ||
39 | GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) | ||
40 | GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) | ||
41 | GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) | ||
42 | GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) | ||
43 | GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) | ||
44 | GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) | ||
45 | GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) | ||
46 | dnl Assume proper GNU behavior unless another module says otherwise. | ||
47 | HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) | ||
48 | HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) | ||
49 | HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) | ||
50 | HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) | ||
51 | HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) | ||
52 | HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) | ||
53 | HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) | ||
54 | HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) | ||
55 | REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) | ||
56 | REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR]) | ||
57 | REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) | ||
58 | REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) | ||
59 | REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) | ||
60 | REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) | ||
32 | ]) | 61 | ]) |