-# Check if the OS can hard-link symlinks or not
-if ln "$fromdir/foo/sym" "$to2dir" 2>/dev/null; then
+# Check if rsync is set to hard-link symlinks.
+confile=`echo "$scratchdir" | sed 's;/testtmp/itemize$;/config.h;'`
+if egrep '^#define CAN_HARDLINK_SYMLINK 1' "$confile" >/dev/null; then