X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fmkdir-slash.m4;h=3ca909e6c99d622d5b87735905ef6486b8857571;hb=455b3a9a5e1861152fe403dea25636586d256544;hp=8245d887064dd8c752bc64bea8046c4fcd14c91e;hpb=0b9a7b62ce4d8656f8487f8b13ae4562d08067e8;p=gnulib.git diff --git a/m4/mkdir-slash.m4 b/m4/mkdir-slash.m4 index 8245d8870..3ca909e6c 100644 --- a/m4/mkdir-slash.m4 +++ b/m4/mkdir-slash.m4 @@ -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) +])