2 dnl Copyright (C) 2002, 2005, 2009 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_FUNC_RMDIR],
9 AC_REQUIRE([gl_AC_DOS])
10 dnl FIXME: simplify this module in 2010 if no one reports a missing rmdir
11 AC_REPLACE_FUNCS([rmdir])
12 if test $ac_cv_func_rmdir = no; then
14 # If someone lacks rmdir, make configure fail, and request
15 # a bug report to inform us about it.
16 if test x"$SKIP_RMDIR_CHECK" != xyes; then
17 AC_MSG_FAILURE([Your system lacks the rmdir function.
18 Please report this, along with the output of "uname -a", to the
19 bug-coreutils@gnu.org mailing list. To continue past this point,
20 rerun configure with SKIP_RMDIR_CHECK=yes.
21 E.g., ./configure SKIP_RMDIR_CHECK=yes])
24 dnl Detect cygwin 1.5.x bug.
25 AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works],
32 ]], [[return !rmdir ("conftest.file/") || errno != ENOTDIR
33 || !rmdir ("conftest.dir/./");]])],
34 [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
35 [gl_cv_func_rmdir_works="guessing no"])
36 rm -rf conftest.dir conftest.file])
37 if test x"$gl_cv_func_rmdir_works" != xyes; then