An independent .m4 file for each module.
[gnulib.git] / m4 / mkdir-slash.m4
index 8245d88..3ca909e 100644 (file)
@@ -1,4 +1,4 @@
-#serial 1
+#serial 2
 
 # On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.
 # On such systems, arrange to use a wrapper function that removes any
@@ -29,7 +29,15 @@ AC_DEFUN([UTILS_FUNC_MKDIR_TRAILING_SLASH],
 
   if test $utils_cv_func_mkdir_trailing_slash_bug = yes; then
     AC_LIBOBJ(mkdir)
-    AC_DEFINE_UNQUOTED(mkdir, rpl_mkdir,
+    AC_DEFINE(mkdir, rpl_mkdir,
       [Define to rpl_mkdir if the replacement function should be used.])
+    gl_PREREQ_MKDIR
   fi
 ])
+
+# Prerequisites of lib/mkdir.c.
+AC_DEFUN([gl_PREREQ_MKDIR],
+[
+  AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
+  AC_CHECK_DECLS_ONCE(free)
+])