From: Gary V. Vaughan Date: Tue, 3 Aug 1999 11:44:17 +0000 (+0000) Subject: * libtool.m4 (mingw*, AC_PROG_LD): use tr for carriage return X-Git-Tag: multi-language-fork~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d05c36e4e9bd1e843a254c9052980ecc33833850;p=thirdparty%2Flibtool.git * libtool.m4 (mingw*, AC_PROG_LD): use tr for carriage return stripping. * ltconfig.in: ditto. From Olly Betts --- diff --git a/ChangeLog b/ChangeLog index f6c151eeb..22492a50b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-08-03 Gary V. Vaughan + + * libtool.m4 (mingw*, AC_PROG_LD): use tr for carriage return + stripping. + * ltconfig.in: ditto. + From Olly Betts 1999-08-02 Olly Betts diff --git a/libtool.m4 b/libtool.m4 index 5b28813d5..5794d4a54 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -273,7 +273,13 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5 | sed 's, $,,'` + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac case "$ac_prog" in # Accept absolute paths. changequote(,)dnl diff --git a/ltconfig.in b/ltconfig.in index 9c98d02da..13631fb4a 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -1166,7 +1166,13 @@ if test -z "$LD"; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 echo "$progname:@LINENO@: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5 | sed 's, $,,'` + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac case "$ac_prog" in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*)