3 dnl From Volker Borchert.
4 dnl Determine whether rename works for source paths with a trailing slash.
5 dnl The rename from SunOS 4.1.1_U1 doesn't.
7 dnl If it doesn't, then define RENAME_TRAILING_SLASH_BUG and arrange
8 dnl to compile the wrapper function.
11 AC_DEFUN(vb_FUNC_RENAME,
13 AC_CACHE_CHECK([whether rename is broken],
14 vb_cv_func_rename_trailing_slash_bug,
16 if mkdir conftestdir; then
17 vb_cv_func_rename_trailing_slash_bug=no
24 exit (rename ("conftestdir/", "conftestdir2") ? 1 : 0);
27 vb_cv_func_rename_trailing_slash_bug=no,
28 vb_cv_func_rename_trailing_slash_bug=yes,
29 dnl When crosscompiling, assume rename is broken.
30 vb_cv_func_rename_trailing_slash_bug=yes)
31 rm -rf conftestdir conftestdir2
34 if test $vb_cv_func_rename_trailing_slash_bug = yes; then
36 AC_DEFINE_UNQUOTED(RENAME_TRAILING_SLASH_BUG, 1,
37 [Define if rename does not work for source paths with a trailing slash,
38 like the one from SunOS 4.1.1_U1.])