+2006-06-07 Stepan Kasal <kasal@ucw.cz>
+
+ * m4/mkdirp.m4 (AM_PROG_MKDIR_P): Rewrite using AC_PROG_MKDIR_P.
+
2006-06-06 Stepan Kasal <kasal@ucw.cz>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
LN = @LN@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MODIFICATION_DELAY = @MODIFICATION_DELAY@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to define $(mkdir_p) as `mkdir -p .', in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However we don't do
- # that anymore.
- # 1. before we restricted the check to GNU mkdir, `mkdir -p .' was
- # reported to fail in read-only directories. The system where this
- # happened has been forgotten.
- # 2. in practice we call $(mkdir_p) on directories such as
- # $(mkdir_p) "$(DESTDIR)$(somedir)"
- # and we don't want to create $(DESTDIR) if $(somedir) is empty.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) "$(DESTDIR)$(somedir)"
- # so $(mkdir_p) always has an argument.
- # We will have better chances of detecting a missing test if
- # $(mkdir_p) complains about missing arguments.
- # 3. $(mkdir_p) is named after `mkdir -p' and we don't expect this
- # to accept no argument.
- # 4. having something like `mkdir .' in the output is unsightly.
- mkdir_p='mkdir -p'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
else
- mkdir_p='$(install_sh) -d'
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
fi
fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+mkdir_p=$MKDIR_P
for ac_prog in gawk mawk nawk awk
do
ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
LN = @LN@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MODIFICATION_DELAY = @MODIFICATION_DELAY@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-@set UPDATED 26 May 2006
-@set UPDATED-MONTH May 2006
+@set UPDATED 6 June 2006
+@set UPDATED-MONTH June 2006
@set EDITION 1.9a
@set VERSION 1.9a
-@set UPDATED 26 May 2006
-@set UPDATED-MONTH May 2006
+@set UPDATED 6 June 2006
+@set UPDATED-MONTH June 2006
@set EDITION 1.9a
@set VERSION 1.9a
LN = @LN@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MODIFICATION_DELAY = @MODIFICATION_DELAY@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
LN = @LN@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MODIFICATION_DELAY = @MODIFICATION_DELAY@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
LN = @LN@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MODIFICATION_DELAY = @MODIFICATION_DELAY@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
LN = @LN@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MODIFICATION_DELAY = @MODIFICATION_DELAY@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
LN = @LN@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MODIFICATION_DELAY = @MODIFICATION_DELAY@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
# AM_PROG_MKDIR_P
# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU mkdir (using the --version option ensures
-# this.)
+# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to define $(mkdir_p) as `mkdir -p .', in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However we don't do
- # that anymore.
- # 1. before we restricted the check to GNU mkdir, `mkdir -p .' was
- # reported to fail in read-only directories. The system where this
- # happened has been forgotten.
- # 2. in practice we call $(mkdir_p) on directories such as
- # $(mkdir_p) "$(DESTDIR)$(somedir)"
- # and we don't want to create $(DESTDIR) if $(somedir) is empty.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) "$(DESTDIR)$(somedir)"
- # so $(mkdir_p) always has an argument.
- # We will have better chances of detecting a missing test if
- # $(mkdir_p) complains about missing arguments.
- # 3. $(mkdir_p) is named after `mkdir -p' and we don't expect this
- # to accept no argument.
- # 4. having something like `mkdir .' in the output is unsightly.
- mkdir_p='mkdir -p'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
+[AC_PREREQ([2.59c])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+AC_SUBST([mkdir_p], [$MKDIR_P])dnl
+])
LN = @LN@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MODIFICATION_DELAY = @MODIFICATION_DELAY@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@