autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU Autoconf 2.59d] testsuite: 202 failed


From: Ralf Wildenhues
Subject: Re: [GNU Autoconf 2.59d] testsuite: 202 failed
Date: Wed, 17 May 2006 14:40:09 +0200
User-agent: Mutt/1.5.11

Hi Ralf,

* Ralf Menzel wrote on Wed, May 17, 2006 at 02:12:01PM CEST:
> 
> the latest patches related to mkdir seem to cause problems with
> /usr/bin/mkdir of SolarisĀ 9.

Thanks for the bug report!

Meanwhile, I found another, more serious issue with AC_PROG_MKDIR_P:
The config.status "special magic" from this patch:
http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00041.html
doesn't work if we don't also use a program with an absolute name.

OK to apply this patch to fix both?

Note I don't bother to search all of PATH for a suitable mkdir --
I don't think people go to lenghts to install GNU coreutils mkdir and
then put it late in the PATH.

Cheers,
Ralf

        * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Name temporary
        variable `ac_d' instead of `d' to avoid infringing namespace.
        Report by Ralf Menzel.
        (AC_PROG_MKDIR_P): Rewrite using _AS_PATH_WALK and cache
        variable `ac_cv_prog_mkdir_p', so we use an absolute file name,
        thus the special magic inside config.status will work correctly.

Index: lib/autoconf/programs.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/programs.m4,v
retrieving revision 1.53
diff -u -r1.53 programs.m4
--- lib/autoconf/programs.m4    13 May 2006 09:54:51 -0000      1.53
+++ lib/autoconf/programs.m4    17 May 2006 12:25:09 -0000
@@ -657,15 +657,25 @@
 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_REQUIRE_AUX_FILE([install-sh])dnl
 AC_MSG_CHECKING([for a thread-safe mkdir -p])
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  MKDIR_P='mkdir -p'
-else
-  for d in ./-p ./--version
-  do
-    test -d $d && rmdir $d
-  done
-  MKDIR_P="$ac_install_sh -d"
-fi
+AC_CACHE_VAL([ac_cv_prog_mkdir_p],
+[_AS_PATH_WALK([],
+[for ac_exec_ext in '' $ac_executable_extensions; do
+  if AS_EXECUTABLE_P(["$as_dir/mkdir$ac_exec_ext"]); then
+    if "$as_dir/mkdir$ac_exec_ext" -p --version . >/dev/null 2>&1 \
+        && test ! -d ./--version; then
+      ac_cv_prog_mkdir_p="$as_dir/mkdir$ac_exec_ext -p"
+    else
+      for ac_d in ./-p ./--version
+      do
+       test -d $ac_d && rmdir $ac_d
+      done
+      ac_cv_prog_mkdir_p="$ac_install_sh -d"
+    fi
+    break
+  fi
+done])
+])
+MKDIR_P=$ac_cv_prog_mkdir_p
 dnl Do special magic for MKDIR_P instead of AC_SUBST, to get
 dnl relative names right.
 AC_MSG_RESULT([$MKDIR_P])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]