dnl Does chown() follow symlinks? This should be a good enough test.
AC_MSG_CHECKING(whether chown() follows symlinks...)
-if test `id -u` = 0; then
- rm -f foo bar
- touch foo
- ln -s foo bar
- chown 10 bar
- if test `ls -l foo | awk '{print $3}'` != "root"; then
- result=yes
+AC_ARG_ENABLE([broken-chown],
+[ --enable-broken-chown this system's chown follows symbolic links],
+ result=yes, result=no)
+if test $result = no; then
+ if test `id -u` = 0; then
+ rm -f foo bar
+ touch foo
+ ln -s foo bar
+ chown 10 bar
+ if test `ls -l foo | awk '{print $3}'` != "root"; then
+ result=yes
+ else
+ result=no
+ fi
+ rm -f foo bar
else
- result=no
+ AC_MSG_CHECKING((cannot check by non-root user))
+ result=yes
fi
- rm -f foo bar
-else
- AC_MSG_CHECKING((cannot check by non-root user))
- result=yes
fi
AC_MSG_RESULT($result)
if test $result = yes; then