3 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008
4 # Free Software Foundation, Inc.
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 dnl From Jim Meyering.
12 AC_DEFUN([gl_FUNC_LSTAT],
14 AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
15 dnl If lstat does not exist, the replacement <sys/stat.h> does
16 dnl "#define lstat stat", and lstat.c does not need to be compiled.
17 AC_CHECK_FUNCS_ONCE([lstat])
18 if test $ac_cv_func_lstat = yes; then
19 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
20 dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ(lstat).
21 if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
24 # Prerequisites of lib/lstat.c.
25 AC_REQUIRE([AC_C_INLINE])