Re: [GNU Autoconf 2.60] testsuite: 3 120 failed

2007-02-11 Thread Ralf Wildenhues
Hello Paul, all,

http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/5266/focus=5549

* Paul Eggert wrote on Thu, Oct 12, 2006 at 09:45:24PM CEST:
 Ralf Wildenhues [EMAIL PROTECTED] writes:
 
  This patch kills $as_executable_p.  This breaks libtool.m4 from
  Libtool-1.5.22 (and possibly CVS HEAD, I haven't checked).
 
 OK, I installed this backward-compatibility hack.  I assume
 you'll be fixing libtool?
 
 2006-10-12  Paul Eggert  [EMAIL PROTECTED]
 
   * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Set as_executable_p,
   for backward compatibility with Libtool 1.5.22.  Problem reported
   by Ralf Wildenhues.

Some things to be aware of here:

1) Libtool branch-1-5 aims to be compatible to Autoconf-2.50; also I aim
   to not add more unnecessary incompatibilities with Autoconf-2.13, as
   there are users who patch the missing bits to make it compatible with
   it.

2) Libtool (at least branch-1-5) aims to be compatible to Automake-1.4.

3) Autoconf-2.61b (CVS) still doesn't document AS_EXECUTABLE_P.

Do you think the approach below is safe enough?  Note I intentionally do
not use the _AS_TEST_PREPARE from 2.61: if you use new enough Autoconf,
then that is already defined and will be used.

Can I assume that AS_EXECUTABLE_P may eventually be made a public
Autoconf interface (then we could just do away with our copy of
_AS_TEST_PREPARE and AS_EXECUTABLE_P)?

Note CVS HEAD Libtool doesn't need this: it uses $as_executable_p only
in its version of AC_PROG_SED, which itself is not defined iff already
given by Autoconf.

OK to apply?

Cheers,
Ralf

2007-02-11  Ralf Wildenhues  [EMAIL PROTECTED]

* libtool.m4 (_AS_TEST_PREPARE, AS_EXECUTABLE_P): m4_defun
these macros, if undefined, with copies from Autoconf 2.59.
(LT_AC_PROG_SED): Use AS_EXECUTABLE_P, not $as_executable_p,
this is an internal Autoconf detail.

Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.170
diff -u -r1.314.2.170 libtool.m4
--- libtool.m4  5 Feb 2007 19:40:53 -   1.314.2.170
+++ libtool.m4  11 Feb 2007 09:31:44 -
@@ -6483,6 +6483,26 @@
 [AC_CHECK_TOOL(RC, windres, no)
 ])
 
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# 
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[as_executable_p=test -f
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
 
 # NOTE: This macro has been submitted for inclusion into   #
 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
@@ -6505,7 +6525,7 @@
   test -z $as_dir  as_dir=.
   for lt_ac_prog in sed gsed; do
 for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p $as_dir/$lt_ac_prog$ac_exec_ext; then
+  if AS_EXECUTABLE_P([$as_dir/$lt_ac_prog$ac_exec_ext]); then
 lt_ac_sed_list=$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext
   fi
 done


___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


Re: [GNU Autoconf 2.60] testsuite: 3 120 failed

2007-02-11 Thread Peter O'Gorman

[cutting autoconf-patches list]
On Feb 11, 2007, at 6:33 PM, Ralf Wildenhues wrote:



OK to apply?

+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# 
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[as_executable_p=test -f


Hi Ralf,

Could we test if test -x works and use that? I know that this is  
barely used, but it bugs me that test -f does not test for the  
executable bit :)


I think autoconf has this:

if test -x / /dev/null 21; then
   as_executable_p='test -x'
 else
  as_executable_p='test -f'
fi

Peter


___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


Re: [GNU Autoconf 2.60] testsuite: 3 120 failed

2007-02-11 Thread Ralf Wildenhues
Hi Peter,

Thanks for the quick review!

* Peter O'Gorman wrote on Sun, Feb 11, 2007 at 01:18:56PM CET:
 On Feb 11, 2007, at 6:33 PM, Ralf Wildenhues wrote:
 
 OK to apply?

 +m4_ifndef([_AS_TEST_PREPARE],
 +[m4_defun([_AS_TEST_PREPARE],
 +[as_executable_p=test -f

 Could we test if test -x works and use that? I know that this is  
 barely used, but it bugs me that test -f does not test for the  
 executable bit :)
 
 I think autoconf has this:

CVS Autoconf has something quite a bit more elaborate.  But I guess we
can at least do this much.  I'm installing the patch below.

Note that it doesn't define $as_test_x.

Cheers,
Ralf

2007-02-11  Ralf Wildenhues  [EMAIL PROTECTED]

* libtool.m4 (_AS_TEST_PREPARE, AS_EXECUTABLE_P): m4_defun
these macros, if undefined, with modified copies from Autoconf
2.59.
(LT_AC_PROG_SED): Use AS_EXECUTABLE_P, not $as_executable_p,
this is an internal Autoconf detail.

Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.170
diff -u -r1.314.2.170 libtool.m4
--- libtool.m4  5 Feb 2007 19:40:53 -   1.314.2.170
+++ libtool.m4  11 Feb 2007 13:34:14 -
@@ -6483,6 +6483,30 @@
 [AC_CHECK_TOOL(RC, windres, no)
 ])
 
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# 
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[if test -x / /dev/null 21; then
+  as_executable_p='test -x'
+else
+  as_executable_p='test -f'
+fi
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
 
 # NOTE: This macro has been submitted for inclusion into   #
 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
@@ -6505,7 +6529,7 @@
   test -z $as_dir  as_dir=.
   for lt_ac_prog in sed gsed; do
 for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p $as_dir/$lt_ac_prog$ac_exec_ext; then
+  if AS_EXECUTABLE_P([$as_dir/$lt_ac_prog$ac_exec_ext]); then
 lt_ac_sed_list=$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext
   fi
 done


___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


Re: [GNU Autoconf 2.60] testsuite: 3 120 failed

2007-02-11 Thread Bob Friesenhahn

On Sun, 11 Feb 2007, Peter O'Gorman wrote:


Hi Ralf,

Could we test if test -x works and use that? I know that this is barely used, 
but it bugs me that test -f does not test for the executable bit :)


I think autoconf has this:

if test -x / /dev/null 21; then
  as_executable_p='test -x'
else
 as_executable_p='test -f'
fi


I seem to recall that with some versions of the MSYS shell 'test -x' 
pretends to work (but does not).  It is best to make sure before 
depending on it.  Some systems don't support the notion of 
'executable' files.


Bob
==
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/



___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool