From 0cb0784e768978df9ab38d8e802d8b69946448b2 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Fri, 21 Sep 2001 19:49:29 +0000 Subject: [PATCH] From Tor Lillqvist : * ltmain.in [cygwin* mingw*]: Take care of the difference between wrapper script name and executable name. --- ChangeLog | 4 ++++ ltmain.in | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 479aac1c..7d65f6af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-09-21 Gary V. Vaughan + From Tor Lillqvist : + * ltmain.in [cygwin* mingw*]: Take care of the difference between + wrapper script name and executable name. + * libtool.m4 (archive_cmds) [darwin1.[0-2]]: Darwin uses zsh-3.1.6 for /bin/sh, and that shell does not handle escaped quotes properly yet. diff --git a/ltmain.in b/ltmain.in index 76e680fb..4cfeceba 100644 --- a/ltmain.in +++ b/ltmain.in @@ -4770,19 +4770,27 @@ relink_command=\"$relink_command\"" fi # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + case $host in + *cygwin*|*mingw*) + wrapper=`echo $file | sed -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (sed -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # If there is no directory component, then add one. case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; + */* | *\\*) . $wrapper ;; + *) . ./$wrapper ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit 1 fi