I use Libtool cvs in Mingw/Msys to test automake cvs(like nobase.test),
and am confronted with some problems. This patch can resovle some of them.
I think there are really some bugs with libtool, for example:
| cwrapper="$output_path/$output_name.exe"
It should be like this:
| cwrapper="$output_path/$output_name"
Index: config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.68
diff -u -r1.68 ltmain.m4sh
--- config/ltmain.m4sh 5 Jun 2005 17:34:17 -0000 1.68
+++ config/ltmain.m4sh 14 Jun 2005 00:44:44 -0000
@@ -533,7 +533,7 @@
$opt_help && func_mode_help
case $host in
- *cygwin* | *mingw* | *pw32*)
+ *cygwin* | *mingw* | *pw32* | *msys*)
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
@@ -808,7 +808,7 @@
$RM $export_symbols
eval "${SED} -n -e '/^: @[EMAIL PROTECTED]/d' -e 's/^.*
\(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *mingw* | *msys* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$export_symbols" >>
"$output_objdir/$outputname.def"'
;;
@@ -818,7 +818,7 @@
$opt_dry_run || {
eval "${SED} -e 's/\([[ ]][[.*^$]]\)/\\\1/g' -e 's/^/ /' -e
's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
case $host in
- *cygwin | *mingw* )
+ *cygwin | *mingw* | *msys* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$output_objdir/$outputname.exp" >>
"$output_objdir/$outputname.def"'
;;
@@ -872,7 +872,7 @@
/* The mapping between symbol names and symbols. */
"
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *mingw* | *msys* )
$ECHO >> "$output_objdir/$my_dlsyms" "\
/* DATA imports from DLLs on WIN32 con't be const, because
runtime relocations are performed -- see ld's documentation
@@ -947,7 +947,7 @@
# Transform the symbol file into the correct name.
symfileobj="$output_objdir/${my_outputname}S.$objext"
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *mingw* | *msys* )
if test -f "$output_objdir/$my_outputname.def"; then
compile_command=`$ECHO "X$compile_command" | $Xsed -e "[EMAIL
PROTECTED]@%$output_objdir/$my_outputname.def $symfileobj%"`
finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "[EMAIL
PROTECTED]@%$output_objdir/$my_outputname.def $symfileobj%"`
@@ -1251,7 +1251,7 @@
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
- cygwin* | mingw* | pw32* | os2*)
+ cygwin* | mingw* | pw32* | os2* | msys* )
pic_mode=default
;;
esac
@@ -1880,7 +1880,7 @@
'exit $?'
tstripme="$stripme"
case $host_os in
- cygwin* | mingw* | pw32*)
+ cygwin* | mingw* | pw32* | msys* )
case $realname in
*.dll.a)
tstripme=""
@@ -1988,7 +1988,7 @@
# Do a test to see if this is really a libtool program.
case $host in
- *cygwin*|*mingw*)
+ *cygwin*|*mingw* | *msys* )
func_stripname '' '.exe' "$file"
wrapper=$func_stripname_result
;;
@@ -2004,7 +2004,7 @@
# finese the cygwin/MSYS system by explicitly sourcing "foo."
# which disallows the automatic-append-.exe behavior.
case $build in
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+ *cygwin*) wrapperdot=${wrapper}. ;;
*) wrapperdot=${wrapper} ;;
esac
# If there is no directory component, then add one.
@@ -2040,7 +2040,7 @@
# finese the cygwin/MSYS system by explicitly sourcing "foo."
# which disallows the automatic-append-.exe behavior.
case $build in
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+ *cygwin*) wrapperdot=${wrapper}. ;;
*) wrapperdot=${wrapper} ;;
esac
# If there is no directory component, then add one.
@@ -2084,7 +2084,7 @@
# remove .exe since cygwin /usr/bin/install will append another
# one anyways
case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
+ */usr/bin/install*,*cygwin* | */usr/bin/install*,*msys*)
case $file:$destfile in
*.exe:*.exe)
# this is ok
@@ -2149,7 +2149,7 @@
{
$opt_debug
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-msys*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# which system we are compiling for in order to pass an extra
@@ -2603,7 +2603,7 @@
;;
esac
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-msys*)
testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
@@ -2621,7 +2621,7 @@
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ *-*-cygwin* | *-*-pw32* | *-*-beos* | *-*-msys*)
# These systems don't actually have a C or math library (as such)
continue
;;
@@ -2683,7 +2683,7 @@
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-msys*)
# The PATH hackery in wrapper scripts is required on Windows
# in order for the loader to find any dlls it needs.
func_warning "\`-no-install' is ignored for $host"
@@ -3633,7 +3633,7 @@
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
case $host in
- *cygwin* | *mingw*)
+ *cygwin* | *mingw* | *msys*)
# No point in relinking DLLs because paths are not encoded
notinst_deplibs="$notinst_deplibs $lib"
need_relink=no
@@ -3703,7 +3703,7 @@
elif test -n "$soname_spec"; then
# bleh windows
case $host in
- *cygwin* | mingw*)
+ *cygwin* | mingw* | *msys*)
major=`expr $current - $age`
versuffix="-$major"
;;
@@ -4531,7 +4531,7 @@
if test "$build_libtool_libs" = yes; then
if test -n "$rpath"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* |
*-*-msys*)
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[[012]])
@@ -5401,7 +5401,7 @@
prog)
case $host in
- *cygwin*) func_stripname '' '.exe' "$output"
+ *cygwin* | *msys*) func_stripname '' '.exe' "$output"
output=$func_stripname_result.exe;;
esac
test -n "$vinfo" && \
@@ -5485,7 +5485,7 @@
esac
fi
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-msys*)
testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
@@ -5564,7 +5564,7 @@
wrappers_required=yes
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *mingw* | *msys*)
if test "$build_libtool_libs" != yes; then
wrappers_required=no
fi
@@ -5710,11 +5710,11 @@
*) exeext= ;;
esac
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *mingw* | *msys*)
output_name=`basename $output`
output_path=`dirname $output`
cwrappersource="$output_path/$objdir/lt-$output_name.c"
- cwrapper="$output_path/$output_name.exe"
+ cwrapper="$output_path/$output_name"
$RM $cwrappersource $cwrapper
trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
@@ -6500,7 +6500,7 @@
# place dlname in correct position for cygwin
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll)
tdlname=../bin/$dlname ;;
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll |
*msys*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
$ECHO > $output "\
# $outputname - a libtool library file