<div dir="ltr"><div class="gmail_quote"><div>Thank you Eric,&nbsp; <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>
 &nbsp; &nbsp;./configure --host=i586-mingw32msvc --target=i586-pc-mingw32msvc \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;--build=i686-pc-linux-gnu<br>
<div class="Ih2E3d"></div></blockquote><div>I think that the&nbsp; --target&nbsp; 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>
&gt; The<br>
&gt; pkg-config autoconf macro should set the libdir according to $prefix or<br>
&gt; $host that are known.<br>
<br>
</div>That would require the configure script to pass that information<br>
to pkg-config.</blockquote><div>&nbsp;</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], [&lt;something&gt;], [$prefix/bin])<br>
<br>The problem is that if you want to use pkg-config only on, let&#39;s say, Linux, then, when you cross-compile to WIndows, the present behavior is that if you don&#39;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>