- /* If the dev/inode of hard and file are the same, then
- the link call followed the symlink. */
- return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
- }
- ]])],
- [gl_cv_func_link_follows_symlink=no], dnl GNU behavior
- [gl_cv_func_link_follows_symlink=yes], dnl Followed link/compile failed
- [gl_cv_func_link_follows_symlink=unknown] dnl We're cross compiling.
- )
- rm -f conftest.file conftest.sym conftest.hard
- ])
- case $gl_cv_func_link_follows_symlink in
- yes) gl_link_follows_symlinks=1 ;;
- no) ;; # already defaulted to 0
- *) gl_link_follows_symlinks=-1 ;;
- esac
+ /* If the dev/inode of hard and file are the same, then
+ the link call followed the symlink. */
+ return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
+ }
+ ]])],
+ [gl_cv_func_link_follows_symlink=no], dnl GNU behavior
+ [gl_cv_func_link_follows_symlink=yes], dnl Followed link/compile failed
+ [dnl We're cross compiling.
+ dnl The past results are "yes" on MacOS X, FreeBSD, NetBSD,
+ dnl OpenBSD, Minix, AIX, HP-UX, OSF/1, and "no" on Linux, Cygwin.
+ case "$host_os" in
+ # On glibc/Linux we know the result.
+ linux*-gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
+ # Otherwise, we don't know.
+ *) gl_cv_func_link_follows_symlink=unknown ;;
+ esac
+ ])
+ rm -f conftest.file conftest.sym conftest.hard
+ ])
+ case "$gl_cv_func_link_follows_symlink" in
+ *yes) gl_link_follows_symlinks=1 ;;
+ *no) ;; # already defaulted to 0
+ *) gl_link_follows_symlinks=-2 ;;
+ esac
+ fi