diff --git a/configure.ac b/configure.ac index 03677d85e2..081cbac074 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ m4_include([tool/m4/ruby_func_attribute.m4])dnl m4_include([tool/m4/ruby_mingw32.m4])dnl m4_include([tool/m4/ruby_prepend_option.m4])dnl m4_include([tool/m4/ruby_prog_gnu_ld.m4])dnl +m4_include([tool/m4/ruby_prog_makedirs.m4])dnl m4_include([tool/m4/ruby_replace_funcs.m4])dnl m4_include([tool/m4/ruby_replace_type.m4])dnl m4_include([tool/m4/ruby_require_funcs.m4])dnl @@ -491,17 +492,7 @@ AS_CASE(["$target_os"], AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_INSTALL -AC_PROG_MKDIR_P -AS_IF([test "x$MKDIR_P" = "x -d"], [ - AS_IF([test x"$as_mkdir_p" != xfalse], [ - MKDIR_P='mkdir -p' - echo "use 'mkdir -p' as MKDIR_P" - ], [ - AC_MSG_ERROR([mkdir -p is required]) - ]) -]) -MAKEDIRS="$MKDIR_P" -AC_SUBST(MAKEDIRS) +RUBY_PROG_MAKEDIRS AC_CHECK_PROG([DTRACE], [${ac_tool_prefix}dtrace], [${ac_tool_prefix}dtrace]) AS_IF([test "$cross_compiling:$ac_cv_prog_DTRACE" = no: -a -n "$ac_tool_prefix"], [ diff --git a/tool/m4/ruby_prog_makedirs.m4 b/tool/m4/ruby_prog_makedirs.m4 new file mode 100644 index 0000000000..132ff7768f --- /dev/null +++ b/tool/m4/ruby_prog_makedirs.m4 @@ -0,0 +1,9 @@ +dnl -*- Autoconf -*- +m4_defun([RUBY_PROG_MAKEDIRS], + [m4_bpatsubst(m4_defn([AC_PROG_MKDIR_P]), + [MKDIR_P=\"$ac_install_sh -d\"], [ + AS_IF([test "x$MKDIR_P" = "xfalse"], [AC_MSG_ERROR([mkdir -p is required])]) + MKDIR_P="mkdir -p"]) + ]dnl + AC_SUBST(MAKEDIRS, ["$MKDIR_P"]) +)