|
From: Charles W. <cwi...@us...> - 2011-01-22 20:20:08
|
On 1/22/2011 2:51 PM, Chris Sutcliffe wrote:
> I'm hoping you can help me out a little with this one. As per Keith's
> request, I'm investigating how to link against the shared libiconv /
> libintl for make, etc. but I'm hitting a bit of a snag. Make's
> configure is resolving to actual library (i.e. /mingw/lib/libiconv.a),
> do you know of a way to override configure so that it will link to the
> shared library (i.e. /mingw/lib/libiconv.dll.a)?
>
> I've tried setting LIBICONV=/mingw/lib/libiconv.dll.a prior to running
> configure, but it still defaults to the static lib.
>
> Any input would be greatly appreciated.
It's likely you're running in to a problem with config.rpath. If your
source includes that file, then modify it as follows:
@@ -441,7 +441,7 @@ case "$host_os" in
bsdi4*)
;;
cygwin* | mingw* | pw32*)
- shrext=.dll
+ shrext=.dll.a
;;
And that ought to fix it. The problem is, the autoconfig macros
provided by gettext (intl.m4, lib-link.m4, lib-ld.m4, etc) do *too
much*. IMO Bruno was overthinking the problem, but the point is, if you
use AM_GETTEXT_*() in your autoconf, then the intl library will be
located using the rules specified in those macros and in config.rpath,
instead of using the default compiler and linker mechanisms.
Without the change above, this means /forced static linkage/ to
libintl.a. (Unfortunately, it ALSO means that WITH the change above,
you CAN'T link statically to libintl.a).
But...that's where we are.
I plan to patch cygwin's and mingw's (and msys's) gettext with the patch
above in the next release.
--
Chuck
|