diff options
author | Jim Meyering <jim@meyering.net> | 2001-01-14 20:27:56 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-01-14 20:27:56 +0000 |
commit | eb3dc6a09571ccb166ed5f6bced2f44e3f67837d (patch) | |
tree | 004608b3ded5d43073c42a130ac96239df3281ee /m4/rename.m4 | |
parent | 4a65486da91813443618145ada568470fea5fbb2 (diff) | |
download | coreutils-eb3dc6a09571ccb166ed5f6bced2f44e3f67837d.tar.xz |
Remove conftestdir{,2} before trying to create the directory.
Make the entire configure script fail if the mkdir fails.
Diffstat (limited to 'm4/rename.m4')
-rw-r--r-- | m4/rename.m4 | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/m4/rename.m4 b/m4/rename.m4 index 95117d05f..50a715ee9 100644 --- a/m4/rename.m4 +++ b/m4/rename.m4 @@ -13,23 +13,23 @@ AC_DEFUN(vb_FUNC_RENAME, AC_CACHE_CHECK([whether rename is broken], vb_cv_func_rename_trailing_slash_bug, [ - if mkdir conftestdir; then - vb_cv_func_rename_trailing_slash_bug=no - else - AC_TRY_RUN([ -# include <stdio.h> - int - main () - { - exit (rename ("conftestdir/", "conftestdir2") ? 1 : 0); - } - ], - vb_cv_func_rename_trailing_slash_bug=no, - vb_cv_func_rename_trailing_slash_bug=yes, - dnl When crosscompiling, assume rename is broken. - vb_cv_func_rename_trailing_slash_bug=yes) + rm -rf conftestdir conftestdir2 + mkdir conftestdir || + AC_MSG_ERROR([cannot create temporary directory]) + AC_TRY_RUN([ +# include <stdio.h> + int + main () + { + exit (rename ("conftestdir/", "conftestdir2") ? 1 : 0); + } + ], + vb_cv_func_rename_trailing_slash_bug=no, + vb_cv_func_rename_trailing_slash_bug=yes, + dnl When crosscompiling, assume rename is broken. + vb_cv_func_rename_trailing_slash_bug=yes) + rm -rf conftestdir conftestdir2 - fi ]) if test $vb_cv_func_rename_trailing_slash_bug = yes; then AC_LIBOBJ(rename) |