This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libtool: bug in AC_PROG_LD


Chuck,

There's a bug in LT_PATH_LD (AC_PROG_LD) when called prior to LT_INIT (AC_PROG_LIBTOOL):

checking for ld used by gcc... /usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: no input files
./configure: line 3955: : command not found


Yet this does not occur when the same macro is run by LT_INIT.

Here's the offending hunk:

      # Canonicalize the pathname of ld
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
    ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
      done

The problem is that $ECHO hasn't been defined yet. This is done by _LT_PROG_ECHO_BACKSLASH, which is called at the beginning of LT_INIT, but isn't an explicit requirement of LT_PATH_LD, which may be called on its own. (AFAICS, all other macros which use $ECHO are libtool-internal and would only be called after LT_INIT.)

Patch attached.


Yaakov
	* libltdl/m4/libtool.m4 (LT_PATH_LD): Require _LT_PROG_ECHO_BACKSLASH
	to define $ECHO in case it is called before LT_INIT.

---
 libltdl/m4/libtool.m4 |    1 +
 1 file changed, 1 insertion(+), 0 deletions(-)

--- libltdl/m4/libtool.m4	2009-06-11 00:03:10.000000000 -0500
+++ libltdl/m4/libtool.m4	2009-06-15 20:10:31.227624900 -0500
@@ -2772,6 +2772,7 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
 AC_ARG_WITH([gnu-ld],
     [AS_HELP_STRING([--with-gnu-ld],

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]