<div dir="ltr"><div class="gmail_quote"><div>Thank you Eric, <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">which cross compiles from Linux to windows quite happily with<br>
<br>
./configure --host=i586-mingw32msvc --target=i586-pc-mingw32msvc \<br>
--build=i686-pc-linux-gnu<br>
<div class="Ih2E3d"></div></blockquote><div>I think that the --target option is redundant unless you are building a compiler<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
> The<br>
> pkg-config autoconf macro should set the libdir according to $prefix or<br>
> $host that are known.<br>
<br>
</div>That would require the configure script to pass that information<br>
to pkg-config.</blockquote><div> </div><div>Dan just pointed out that it works if you have the correct $host-pkg-config installed. I suggest changing <br>AC_PATH_TOOL([PKG_CONFIG], [pkg-config])<br>to<br>AC_PATH_TOOL([PKG_CONFIG], [pkg-config], [<something>], [$prefix/bin])<br>
<br>The problem is that if you want to use pkg-config only on, let's say, Linux, then, when you cross-compile to WIndows, the present behavior is that if you don't have the $host-pkg-config, if uses your Linux pkg-config which inevitably becomes a problem.<br>
I think that if $host != $build, you want to use only and only your $host-pkg-config or you want all your PKG_CHECK... tests to quietly fail.<br></div></div><br>2 Eric: I prefer using AS_IF macro instead of shell if, it looks more compact :-)<br>
Thank you for the example<br><br>Matěj<br><br></div>