- AC_CHECK_FUNCS_ONCE([lchmod])
- AC_CHECK_FUNCS_ONCE([fdopendir])
- AC_REPLACE_FUNCS(openat)
- case $ac_cv_func_openat in
- yes) ;;
+ AC_CHECK_FUNCS_ONCE([openat])
+ AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+ case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
+ yes+*yes)
+ ;;
+ yes+*)
+ # Solaris 9 has *at functions, but uniformly mishandles trailing
+ # slash in all of them.
+ REPLACE_OPENAT=1
+ ;;