Home | History | Annotate | Download | only in m4
      1 # serial 19
      2 
      3 # Copyright (C) 1997-2001, 2003-2009 Free Software Foundation, Inc.
      4 #
      5 # This file is free software; the Free Software Foundation
      6 # gives unlimited permission to copy and/or distribute it,
      7 # with or without modifications, as long as this notice is preserved.
      8 
      9 dnl From Jim Meyering.
     10 
     11 AC_DEFUN([gl_FUNC_LSTAT],
     12 [
     13   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
     14   dnl If lstat does not exist, the replacement <sys/stat.h> does
     15   dnl "#define lstat stat", and lstat.c does not need to be compiled.
     16   AC_CHECK_FUNCS_ONCE([lstat])
     17   if test $ac_cv_func_lstat = yes; then
     18     AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
     19     dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
     20     if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
     21       REPLACE_LSTAT=1
     22     fi
     23     # Prerequisites of lib/lstat.c.
     24     AC_REQUIRE([AC_C_INLINE])
     25   fi
     26 ])
     27