<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 11/5/2010 3:52 PM, Eric Christopher wrote:
    <blockquote
      cite="mid:D307FBC7-BBF2-42DB-B43D-E8E4575E3EFA@apple.com"
      type="cite"><br>
      On Nov 4, 2010, at 7:35 PM, Shaun savage wrote:<br>
      <br>
      <blockquote type="cite">
        <div>I am trying to create a new LLVM project that uses autoconf
          to configure it. </div>
        <div><br>
        </div>
        <div>the example requires me to define </div>
        <br class="Apple-interchange-newline">
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>•
          LLVM_SRC_ROOT - The root of the LLVM source tree.<br>
        </div>
        <div><span class="Apple-tab-span" style="white-space: pre;"> </span>•
          LLVM_OBJ_ROOT - The root of the LLVM object tree<br>
        </div>
        Is this required?  Why?  I just want to use the libraries that
        were installed using Ubuntu 10.04.<br>
      </blockquote>
      <br>
      <div>Not unless you want to build it as part of the llvm sources.</div>
    </blockquote>
    <br>
    This answer is sort of correct, so I'll elaborate.<br>
    <br>
    The LLVM build system allows for external LLVM projects to re-use
    its Makefile infrastructure.  In short, it allows external projects
    (which are not part of the LLVM source tree) to build off of the
    LLVM build system; this allows external projects to write LLVM-style
    Makefiles that just specify the library or tool name to build, and
    the LLVM build system takes care of the rest (like linking in LLVM
    libraries, using pre-defined rules for compiling C++ code to object
    files, finding LLVM header files, etc).  This whole system is
    documented at <a class="moz-txt-link-freetext" href="http://llvm.org/docs/Projects.html">http://llvm.org/docs/Projects.html</a>.<br>
    <br>
    If you've installed LLVM headers and libraries somewhere (such as in
    /usr/local/include and /usr/local/lib) and don't wish to reuse the
    LLVM build system, then you obviously don't need to worry about
    writing your autoconf scripts and Makefiles the LLVM way.  Instead,
    you would just use AC_CHECK_LIB to locate the LLVM libraries you
    need, as Eric has described.<br>
    <br>
    -- John T.<br>
    <br>
    <br>
    <blockquote
      cite="mid:D307FBC7-BBF2-42DB-B43D-E8E4575E3EFA@apple.com"
      type="cite">
      <div><br>
      </div>
      <div>AC_CHECK_LIB is what you probably want.</div>
      <div><br>
      </div>
      <div><a moz-do-not-send="true"
          href="http://www.gnu.org/software/hello/manual/autoconf/Libraries.html">http://www.gnu.org/software/hello/manual/autoconf/Libraries.html</a></div>
      <div><br>
      </div>
      <div>-eric</div>
    </blockquote>
    <br>
  </body>
</html>