<div dir="ltr">Thanks!<div><br></div><div>Bearing in mind that I don't know m4, looking at the code, it seems to work by allowing an override to specify where to find llvm-config (which is the right thing to do, of course) but by default looking in the current path.</div><div><br></div><div>Based on both my own limited experience in the matter and what David Jones and David Chisnall are saying, one could argue that the path version probably will _not_ be the correct one. That the correct default is actually more likely to be e.g. ~/llvm-3.8. Does that make sense?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 23, 2016 at 4:51 PM, Diego Novillo <span dir="ltr"><<a href="mailto:dnovillo@google.com" target="_blank">dnovillo@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are several m4 macros that let you write autoconf detection for<br>
llvm.  I recently needed to implement one.  Have a look here:<br>
<br>
<a href="https://github.com/google/autofdo/blob/master/m4/ax_llvm.m4" rel="noreferrer" target="_blank">https://github.com/google/autofdo/blob/master/m4/ax_llvm.m4</a><br>
<br>
<br>
Diego.<br>
<div><div class="h5"><br>
On Wed, Mar 23, 2016 at 12:48 PM, Russell Wallace via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
> Building LLVM itself involves Cmake, but what's the best way to build a C++<br>
> program that needs to link with the LLVM libraries?<br>
><br>
> If you're trying to optimise for making life as easy as possible for users<br>
> and people creating binary packages, in the normal course of events,<br>
> autotools is recommended. But the tutorial mentions running llvm-config to<br>
> get things like library paths - does autotools know how to do this?<br>
><br>
> (I mostly use Windows, not as familiar with Unix, so please let me know if<br>
> the question I'm asking is not quite the same as the question I should be<br>
> asking.)<br>
><br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
><br>
</blockquote></div><br></div>