Mercurial > hg > octave-lojdl > gnulib-hg
changeset 3105:20833ed0761f
Remove conftestdir{,2} before trying to create the directory.
Make the entire configure script fail if the mkdir fails.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sun, 14 Jan 2001 20:27:56 +0000 |
parents | ef2fa0a38c9e |
children | b693918c6dc7 |
files | m4/rename.m4 |
diffstat | 1 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/rename.m4 +++ b/m4/rename.m4 @@ -13,23 +13,23 @@ 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)