$ac_top_build_prefix to $MKDIR_P if it's just 'mkdir -p'.
* tests/tools.at (autoconf: subdirectories): New test, taken from
the corresponding problem report by Ralf Wildenhues in:
http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00053.html
2006-05-18 Paul Eggert <eggert@cs.ucla.edu>
+ * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Don't prepend
+ $ac_top_build_prefix to $MKDIR_P if it's just 'mkdir -p'.
+ * tests/tools.at (autoconf: subdirectories): New test, taken from
+ the corresponding problem report by Ralf Wildenhues in:
+ http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00053.html
+
* lib/autoconf/functions.m4 (AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU):
Quote some uses of shell variables if they might suffer unexpected
globbing. This doesn't fix all instances of quoting problems that
esac
])dnl
AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
-[ case $MKDIR_P in
- [[\\/$]]* | ?:[[\\/]]* ) ac_MKDIR_P=$MKDIR_P ;;
- *) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+[ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [[\\/$]]* | ?:[[\\/]]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
esac
])dnl
_ACEOF
AT_CLEANUP
+# autoconf: subdirectories
+# --------------------------------------
+AT_SETUP([autoconf: subdirectories])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_PROG_MKDIR_P
+AC_CONFIG_FILES(sub/foo)
+AC_OUTPUT
+]])
+
+mkdir sub
+
+AT_DATA([sub/foo.in],
+[[@MKDIR_P@
+]])
+
+AT_DATA([install-sh])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE
+AT_CHECK([grep '/mkdir -p' sub/foo], 1)
+
+AT_CLEANUP
+
+