RSYNC="$rsync_bin $*"
#RSYNC="valgrind $rsync_bin $*"
-export POSIXLY_CORRECT TOOLDIR srcdir RSYNC
+TLS_ARGS=''
+if egrep '^#define HAVE_LUTIMES 1' config.h >/dev/null; then
+ TLS_ARGS="$TLS_ARGS -l"
+fi
+if egrep '#undef CHOWN_MODIFIES_SYMLINK' config.h >/dev/null; then
+ TLS_ARGS="$TLS_ARGS -L"
+fi
+
+export POSIXLY_CORRECT TOOLDIR srcdir RSYNC TLS_ARGS
echo "============================================================"
echo "$0 running in $TOOLDIR"
echo " rsync_bin=$RSYNC"
echo " srcdir=$srcdir"
+echo " TLS_ARGS=$TLS_ARGS"
if [ -f /usr/bin/whoami ]; then
testuser=`/usr/bin/whoami`
# Get rid of default ACLs and dir-setgid to avoid confusing some tests.
$setfacl_nodef "$scratchdir" || true
chmod g-s "$scratchdir"
- ln -s "$srcdir" "$scratchdir/src"
+ case "$srcdir" in
+ /*) ln -s "$srcdir" "$scratchdir/src" ;;
+ *) ln -s "$TOOLDIR/$srcdir" "$scratchdir/src" ;;
+ esac
return 0
}