Is your patch against CVS head?  Or the release 1.4.2?

Earnie.

Bob Friesenhahn wrote:
> The attached patch to FSF CVS libtool is intended to make libtool
> (mostly) behave as it does for Cygwin when executed with MinGW.  It
> consists of contributions from Elizabeth Barham, and my own efforts.
> 
> The DLLs are installed to $(libdir)/../bin as they currently are under
> Cygwin. Any change to this scheme should be common to both Cygwin &
> MinGW unless there is a reason for behaving differently.
> 
> This patch allows a shared library build of ImageMagick (using both C
> & C++) to successfully build and install under MinGW using the MSYS
> shell environment.  I have not tried to build libtool modules with it
> yet (should be interesting).
> 
> I am posting this patch with the expectation that concerned parties
> will inspect it, test it, and send any fixes so that it can be
> incorporated in libtool 1.5.
> 
> Bob
> ======================================
> Bob Friesenhahn
> [EMAIL PROTECTED]
> http://www.simplesystems.org/users/bfriesen
> 
> 
> ------------------------------------------------------------------------
> 
> Index: libtool.m4
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/libtool.m4,v
> retrieving revision 1.266
> diff -u -r1.266 libtool.m4
> --- libtool.m4        11 Oct 2002 15:52:08 -0000      1.266
> +++ libtool.m4        15 Oct 2002 18:47:45 -0000
> @@ -620,7 +620,14 @@
>      lt_cv_sys_max_cmd_len=-1;
>      ;;
>  
> -  *)
> +  
> +  mingw*)
> +    # On msys 1.0 and win98, the maximum length was something like
> +    # 200,000 and took around 45 minutes to get there... ouch!
> +    lt_cv_sys_max_cmd_len=8192;
> +    ;;
> +
> + *)
>      # If test is not a shell built-in, we'll probably end up computing a
>      # maximum length that is only half of the actual maximum length, but
>      # we can't tell.
> @@ -1131,7 +1138,8 @@
>      shlibpath_overrides_runpath=yes
>      ;;
>    yes,mingw*)
> -    library_names_spec='${libname}`echo ${release} | sed -e 
>'s/[[.]]/-/g'`${versuffix}.dll'
> +    library_names_spec='$libname.dll.a'
> +    soname_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
>      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e 
>"s/^libraries://" -e "s,=/,/,g"`
>      if echo "$sys_lib_search_path_spec" | [egrep ';[c-zC-Z]:/' >/dev/null]; then
>        # It is most probably a Windows format PATH printed by
> @@ -1144,6 +1152,14 @@
>      else
>        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e 
>"s/$PATH_SEPARATOR/ /g"`
>      fi
> +    postinstall_cmds='dlpath=`sh 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
> +      dldir=$destdir/`dirname \$dlpath`~
> +      test -d \$dldir || mkdir -p \$dldir~
> +      $install_prog .libs/$dlname \$dldir/$dlname'
> +    postuninstall_cmds='dldll=`sh 2>&1 -c '\''. $file; echo \$dlname'\''`~
> +      dlpath=$dir/\$dldll~
> +       $rm \$dlpath'
> +    shlibpath_overrides_runpath=yes
>      ;;
>    yes,pw32*)
>      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | 
>sed -e 's/[.]/-/g'`${versuffix}.dll'
> @@ -2624,12 +2640,25 @@
>      else
>        _LT_AC_TAGVAR(ld_shlibs, $1)=no
>      fi
> -      ;;
> +     ;;
>  
> -  mingw* | pw32*)
> -    # FIXME: insert proper C++ library support
> -       _LT_AC_TAGVAR(ld_shlibs, $1)=no
> -      ;;
> +  mingw* )
> +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
> +    _LT_AC_TAGVAR(always_export_symbols, $1)=no
> +
> +    if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then
> +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC '$lt_cv_cc_dll_switch' $libobjs $deplibs 
>$compiler_flags -o $output_objdir/$soname ${wl}--out-implib,${lib}'
> +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC '$lt_cv_cc_dll_switch' $libobjs 
>$deplibs $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file 
>$wl$export_symbols ${wl}--out-implib,${lib}'
> +    else
> +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
> +    fi
> +     ;;
> +
> +
> +  pw32* )
> +     # FIXME: insert proper C++ library support
> +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
> +     ;;
>  
>    dgux*)
>      case $cc_basename in
> @@ -4517,7 +4546,7 @@
>        _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk 
>'\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && 
>([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
>      fi
>      ;;
> -  mingw* | pw32*)
> +  pw32*)
>      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
>    ;;
>    *)
> @@ -4621,7 +4650,7 @@
>        fi
>        ;;
>  
> -    cygwin*)
> +    cygwin* | mingw*)
>        # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
>        # as there is no search path for DLLs.
>        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
> @@ -4635,7 +4664,8 @@
>        fi
>        ;;
>  
> -    mingw* | pw32*)
> +    # This pw32 section is mostly antique stuff preserved from Cygwin/MinGW.
> +    pw32*)
>        # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as 
>there is
>        # no search path for DLLs.
>        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
> Index: ltmain.in
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/ltmain.in,v
> retrieving revision 1.301
> diff -u -r1.301 ltmain.in
> --- ltmain.in 25 Sep 2002 04:26:20 -0000      1.301
> +++ ltmain.in 15 Oct 2002 18:47:46 -0000
> @@ -2120,7 +2120,7 @@
>           elif test -n "$soname_spec"; then
>             # bleh windows
>             case $host in
> -           *cygwin*)
> +           *cygwin* | mingw*)
>               major=`expr $current - $age`
>               versuffix="-$major"
>               ;;
> @@ -4475,7 +4475,7 @@
>         # place dlname in correct position for cygwin
>         tdlname=$dlname
>         case $host,$output,$installed,$module,$dlname in
> -         *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
> +         *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) 
>tdlname=../bin/$dlname ;;
>         esac
>         $echo > $output "\
>  # $outputname - a libtool library file



_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to