Use new documented autoconf macros.
[gnulib.git] / m4 / mkdir-slash.m4
index 18f835a..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
@@ -31,5 +31,13 @@ AC_DEFUN([UTILS_FUNC_MKDIR_TRAILING_SLASH],
     AC_LIBOBJ(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)
+])