2
dnl Copyright (C) 2006 Free Software Foundation, Inc.
2
dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
7
dnl Written by Simon Josefsson
9
AC_DEFUN([gl_HEADER_UNISTD],
11
dnl Prerequisites of lib/unistd.h.
12
AC_CHECK_HEADERS([unistd.h], [
7
dnl Written by Simon Josefsson, Bruno Haible.
9
AC_DEFUN([gl_UNISTD_H],
11
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
12
dnl once only, before all statements that occur in other macros.
13
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
15
AC_CHECK_HEADERS_ONCE([unistd.h])
16
if test $ac_cv_header_unistd_h = yes; then
18
gl_ABSOLUTE_HEADER([unistd.h])
19
ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\"
23
AC_SUBST([HAVE_UNISTD_H])
24
AC_SUBST([ABSOLUTE_UNISTD_H])
27
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
29
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
30
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
31
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
34
AC_DEFUN([gl_UNISTD_H_DEFAULTS],
36
GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
37
GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
38
GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
39
GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
40
GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
41
GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
42
GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
43
dnl Assume proper GNU behavior unless another module says otherwise.
44
HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
45
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
46
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
47
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
48
REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
49
REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
50
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])