common/doc/building.html
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File jdk10hs Sdiff common/doc

common/doc/building.html

Print this page




  41 <li><a href="#native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requirements</a><ul>
  42 <li><a href="#gcc">gcc</a></li>
  43 <li><a href="#clang">clang</a></li>
  44 <li><a href="#apple-xcode">Apple Xcode</a></li>
  45 <li><a href="#oracle-solaris-studio">Oracle Solaris Studio</a></li>
  46 <li><a href="#microsoft-visual-studio">Microsoft Visual Studio</a></li>
  47 <li><a href="#ibm-xl-cc">IBM XL C/C++</a></li>
  48 </ul></li>
  49 <li><a href="#boot-jdk-requirements">Boot JDK Requirements</a><ul>
  50 <li><a href="#jdk-8-on-linux">JDK 8 on Linux</a></li>
  51 <li><a href="#jdk-8-on-windows">JDK 8 on Windows</a></li>
  52 <li><a href="#jdk-8-on-macos">JDK 8 on macOS</a></li>
  53 <li><a href="#jdk-8-on-aix">JDK 8 on AIX</a></li>
  54 </ul></li>
  55 <li><a href="#external-library-requirements">External Library Requirements</a><ul>
  56 <li><a href="#freetype">FreeType</a></li>
  57 <li><a href="#cups">CUPS</a></li>
  58 <li><a href="#x11">X11</a></li>
  59 <li><a href="#alsa">ALSA</a></li>
  60 <li><a href="#libffi">libffi</a></li>
  61 <li><a href="#libelf">libelf</a></li>
  62 </ul></li>
  63 <li><a href="#other-tooling-requirements">Other Tooling Requirements</a><ul>
  64 <li><a href="#gnu-make">GNU Make</a></li>
  65 <li><a href="#gnu-bash">GNU Bash</a></li>
  66 <li><a href="#autoconf">Autoconf</a></li>
  67 </ul></li>
  68 <li><a href="#running-configure">Running Configure</a><ul>
  69 <li><a href="#common-configure-arguments">Common Configure Arguments</a></li>
  70 <li><a href="#configure-control-variables">Configure Control Variables</a></li>
  71 </ul></li>
  72 <li><a href="#running-make">Running Make</a><ul>
  73 <li><a href="#common-make-targets">Common Make Targets</a></li>
  74 <li><a href="#make-control-variables">Make Control Variables</a></li>
  75 </ul></li>
  76 <li><a href="#running-tests">Running Tests</a></li>
  77 <li><a href="#cross-compiling">Cross-compiling</a><ul>
  78 <li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
  79 <li><a href="#specifying-the-target-platform">Specifying the Target Platform</a></li>
  80 <li><a href="#toolchain-considerations">Toolchain Considerations</a></li>
  81 <li><a href="#native-libraries">Native Libraries</a></li>


 452 <ul>
 453 <li>To install on an apt-based Linux, try running <code>sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev</code>.</li>
 454 <li>To install on an rpm-based Linux, try running <code>sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel</code>.</li>
 455 <li>To install on Solaris, try running <code>pkg install x11/header/x11-protocols x11/library/libice x11/library/libpthread-stubs x11/library/libsm x11/library/libx11 x11/library/libxau x11/library/libxcb x11/library/libxdmcp x11/library/libxevie x11/library/libxext x11/library/libxrender x11/library/libxscrnsaver x11/library/libxtst x11/library/toolkit/libxt</code>.</li>
 456 </ul>
 457 <p>Use <code>--with-x=&lt;path&gt;</code> if <code>configure</code> does not properly locate your X11 files.</p>
 458 <h3 id="alsa">ALSA</h3>
 459 <p>ALSA, <a href="https://www.alsa-project.org/">Advanced Linux Sound Architecture</a> is required on Linux. At least version 0.9.1 of ALSA is required.</p>
 460 <ul>
 461 <li>To install on an apt-based Linux, try running <code>sudo apt-get install libasound2-dev</code>.</li>
 462 <li>To install on an rpm-based Linux, try running <code>sudo yum install alsa-lib-devel</code>.</li>
 463 </ul>
 464 <p>Use <code>--with-alsa=&lt;path&gt;</code> if <code>configure</code> does not properly locate your ALSA files.</p>
 465 <h3 id="libffi">libffi</h3>
 466 <p>libffi, the <a href="http://sourceware.org/libffi">Portable Foreign Function Interface Library</a> is required when building the Zero version of Hotspot.</p>
 467 <ul>
 468 <li>To install on an apt-based Linux, try running <code>sudo apt-get install libffi-dev</code>.</li>
 469 <li>To install on an rpm-based Linux, try running <code>sudo yum install libffi-devel</code>.</li>
 470 </ul>
 471 <p>Use <code>--with-libffi=&lt;path&gt;</code> if <code>configure</code> does not properly locate your libffi files.</p>
 472 <h3 id="libelf">libelf</h3>
 473 <p>libelf from the <a href="http://sourceware.org/elfutils">elfutils project</a> is required when building the AOT feature of Hotspot.</p>
 474 <ul>
 475 <li>To install on an apt-based Linux, try running <code>sudo apt-get install libelf-dev</code>.</li>
 476 <li>To install on an rpm-based Linux, try running <code>sudo yum install elfutils-libelf-devel</code>.</li>
 477 </ul>
 478 <p>Use <code>--with-libelf=&lt;path&gt;</code> if <code>configure</code> does not properly locate your libelf files.</p>
 479 <h2 id="other-tooling-requirements">Other Tooling Requirements</h2>
 480 <h3 id="gnu-make">GNU Make</h3>
 481 <p>OpenJDK requires <a href="http://www.gnu.org/software/make">GNU Make</a>. No other flavors of make are supported.</p>
 482 <p>At least version 3.81 of GNU Make must be used. For distributions supporting GNU Make 4.0 or above, we strongly recommend it. GNU Make 4.0 contains useful functionality to handle parallel building (supported by <code>--with-output-sync</code>) and speed and stability improvements.</p>
 483 <p>Note that <code>configure</code> locates and verifies a properly functioning version of <code>make</code> and stores the path to this <code>make</code> binary in the configuration. If you start a build using <code>make</code> on the command line, you will be using the version of make found first in your <code>PATH</code>, and not necessarily the one stored in the configuration. This initial make will be used as &quot;bootstrap make&quot;, and in a second stage, the make located by <code>configure</code> will be called. Normally, this will present no issues, but if you have a very old <code>make</code>, or a non-GNU Make <code>make</code> in your path, this might cause issues.</p>
 484 <p>If you want to override the default make found by <code>configure</code>, use the <code>MAKE</code> configure variable, e.g. <code>configure MAKE=/opt/gnu/make</code>.</p>
 485 <p>On Solaris, it is common to call the GNU version of make by using <code>gmake</code>.</p>
 486 <h3 id="gnu-bash">GNU Bash</h3>
 487 <p>OpenJDK requires <a href="http://www.gnu.org/software/bash">GNU Bash</a>. No other shells are supported.</p>
 488 <p>At least version 3.2 of GNU Bash must be used.</p>
 489 <h3 id="autoconf">Autoconf</h3>
 490 <p>If you want to modify the build system itself, you need to install <a href="http://www.gnu.org/software/autoconf">Autoconf</a>.</p>
 491 <p>However, if you only need to build OpenJDK or if you only edit the actual OpenJDK source files, there is no dependency on autoconf, since the source distribution includes a pre-generated <code>configure</code> shell script.</p>
 492 <p>See the section on <a href="#autoconf-details">Autoconf Details</a> for details on how OpenJDK uses autoconf. This is especially important if you plan to contribute changes to OpenJDK that modifies the build system.</p>
 493 <h2 id="running-configure">Running Configure</h2>
 494 <p>To build OpenJDK, you need a &quot;configuration&quot;, which consists of a directory where to store the build output, coupled with information about the platform, the specific build machine, and choices that affect how OpenJDK is built.</p>
 495 <p>The configuration is created by the <code>configure</code> script. The basic invocation of the <code>configure</code> script looks like this:</p>
 496 <pre><code>bash configure [options]</code></pre>
 497 <p>This will create an output directory containing the configuration and setup an area for the build result. This directory typically looks like <code>build/linux-x64-normal-server-release</code>, but the actual name depends on your specific configuration. (It can also be set directly, see <a href="#using-multiple-configurations">Using Multiple Configurations</a>). This directory is referred to as <code>$BUILD</code> in this documentation.</p>
 498 <p><code>configure</code> will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem.</p>


 520 <li><code>--with-target-bits=&lt;bits&gt;</code> - Create a target binary suitable for running on a <code>&lt;bits&gt;</code> platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a <em>reduced</em> build.)</li>
 521 </ul>
 522 <h4 id="configure-arguments-for-native-compilation">Configure Arguments for Native Compilation</h4>
 523 <ul>
 524 <li><code>--with-devkit=&lt;path&gt;</code> - Use this devkit for compilers, tools and resources</li>
 525 <li><code>--with-sysroot=&lt;path&gt;</code> - Use this directory as sysroot</li>
 526 <li><code>--with-extra-path=&lt;path&gt;[;&lt;path&gt;]</code> - Prepend these directories to the default path when searching for all kinds of binaries</li>
 527 <li><code>--with-toolchain-path=&lt;path&gt;[;&lt;path&gt;]</code> - Prepend these directories when searching for toolchain binaries (compilers etc)</li>
 528 <li><code>--with-extra-cflags=&lt;flags&gt;</code> - Append these flags when compiling JDK C files</li>
 529 <li><code>--with-extra-cxxflags=&lt;flags&gt;</code> - Append these flags when compiling JDK C++ files</li>
 530 <li><code>--with-extra-ldflags=&lt;flags&gt;</code> - Append these flags when linking JDK libraries</li>
 531 </ul>
 532 <h4 id="configure-arguments-for-external-dependencies">Configure Arguments for External Dependencies</h4>
 533 <ul>
 534 <li><code>--with-boot-jdk=&lt;path&gt;</code> - Set the path to the <a href="#boot-jdk-requirements">Boot JDK</a></li>
 535 <li><code>--with-freetype=&lt;path&gt;</code> - Set the path to <a href="#freetype">FreeType</a></li>
 536 <li><code>--with-cups=&lt;path&gt;</code> - Set the path to <a href="#cups">CUPS</a></li>
 537 <li><code>--with-x=&lt;path&gt;</code> - Set the path to <a href="#x11">X11</a></li>
 538 <li><code>--with-alsa=&lt;path&gt;</code> - Set the path to <a href="#alsa">ALSA</a></li>
 539 <li><code>--with-libffi=&lt;path&gt;</code> - Set the path to <a href="#libffi">libffi</a></li>
 540 <li><code>--with-libelf=&lt;path&gt;</code> - Set the path to <a href="#libelf">libelf</a></li>
 541 <li><code>--with-jtreg=&lt;path&gt;</code> - Set the path to JTReg. See <a href="#running-tests">Running Tests</a></li>
 542 </ul>
 543 <p>Certain third-party libraries used by OpenJDK (libjpeg, giflib, libpng, lcms and zlib) are included in the OpenJDK repository. The default behavior of the OpenJDK build is to use this version of these libraries, but they might be replaced by an external version. To do so, specify <code>system</code> as the <code>&lt;source&gt;</code> option in these arguments. (The default is <code>bundled</code>).</p>
 544 <ul>
 545 <li><code>--with-libjpeg=&lt;source&gt;</code> - Use the specified source for libjpeg</li>
 546 <li><code>--with-giflib=&lt;source&gt;</code> - Use the specified source for giflib</li>
 547 <li><code>--with-libpng=&lt;source&gt;</code> - Use the specified source for libpng</li>
 548 <li><code>--with-lcms=&lt;source&gt;</code> - Use the specified source for lcms</li>
 549 <li><code>--with-zlib=&lt;source&gt;</code> - Use the specified source for zlib</li>
 550 </ul>
 551 <p>On Linux, it is possible to select either static or dynamic linking of the C++ runtime. The default is static linking, with dynamic linking as fallback if the static library is not found.</p>
 552 <ul>
 553 <li><code>--with-stdc++lib=&lt;method&gt;</code> - Use the specified method (<code>static</code>, <code>dynamic</code> or <code>default</code>) for linking the C++ runtime.</li>
 554 </ul>
 555 <h3 id="configure-control-variables">Configure Control Variables</h3>
 556 <p>It is possible to control certain aspects of <code>configure</code> by overriding the value of <code>configure</code> variables, either on the command line or in the environment.</p>
 557 <p>Normally, this is <strong>not recommended</strong>. If used improperly, it can lead to a broken configuration. Unless you're well versed in the build system, this is hard to use properly. Therefore, <code>configure</code> will print a warning if this is detected.</p>
 558 <p>However, there are a few <code>configure</code> variables, known as <em>control variables</em> that are supposed to be overriden on the command line. These are variables that describe the location of tools needed by the build, like <code>MAKE</code> or <code>GREP</code>. If any such variable is specified, <code>configure</code> will use that value instead of trying to autodetect the tool. For instance, <code>bash configure MAKE=/opt/gnumake4.0/bin/make</code>.</p>
 559 <p>If a configure argument exists, use that instead, e.g. use <code>--with-jtreg</code> instead of setting <code>JTREGEXE</code>.</p>
 560 <p>Also note that, despite what autoconf claims, setting <code>CFLAGS</code> will not accomplish anything. Instead use <code>--with-extra-cflags</code> (and similar for <code>cxxflags</code> and <code>ldflags</code>).</p>




  41 <li><a href="#native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requirements</a><ul>
  42 <li><a href="#gcc">gcc</a></li>
  43 <li><a href="#clang">clang</a></li>
  44 <li><a href="#apple-xcode">Apple Xcode</a></li>
  45 <li><a href="#oracle-solaris-studio">Oracle Solaris Studio</a></li>
  46 <li><a href="#microsoft-visual-studio">Microsoft Visual Studio</a></li>
  47 <li><a href="#ibm-xl-cc">IBM XL C/C++</a></li>
  48 </ul></li>
  49 <li><a href="#boot-jdk-requirements">Boot JDK Requirements</a><ul>
  50 <li><a href="#jdk-8-on-linux">JDK 8 on Linux</a></li>
  51 <li><a href="#jdk-8-on-windows">JDK 8 on Windows</a></li>
  52 <li><a href="#jdk-8-on-macos">JDK 8 on macOS</a></li>
  53 <li><a href="#jdk-8-on-aix">JDK 8 on AIX</a></li>
  54 </ul></li>
  55 <li><a href="#external-library-requirements">External Library Requirements</a><ul>
  56 <li><a href="#freetype">FreeType</a></li>
  57 <li><a href="#cups">CUPS</a></li>
  58 <li><a href="#x11">X11</a></li>
  59 <li><a href="#alsa">ALSA</a></li>
  60 <li><a href="#libffi">libffi</a></li>

  61 </ul></li>
  62 <li><a href="#other-tooling-requirements">Other Tooling Requirements</a><ul>
  63 <li><a href="#gnu-make">GNU Make</a></li>
  64 <li><a href="#gnu-bash">GNU Bash</a></li>
  65 <li><a href="#autoconf">Autoconf</a></li>
  66 </ul></li>
  67 <li><a href="#running-configure">Running Configure</a><ul>
  68 <li><a href="#common-configure-arguments">Common Configure Arguments</a></li>
  69 <li><a href="#configure-control-variables">Configure Control Variables</a></li>
  70 </ul></li>
  71 <li><a href="#running-make">Running Make</a><ul>
  72 <li><a href="#common-make-targets">Common Make Targets</a></li>
  73 <li><a href="#make-control-variables">Make Control Variables</a></li>
  74 </ul></li>
  75 <li><a href="#running-tests">Running Tests</a></li>
  76 <li><a href="#cross-compiling">Cross-compiling</a><ul>
  77 <li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
  78 <li><a href="#specifying-the-target-platform">Specifying the Target Platform</a></li>
  79 <li><a href="#toolchain-considerations">Toolchain Considerations</a></li>
  80 <li><a href="#native-libraries">Native Libraries</a></li>


 451 <ul>
 452 <li>To install on an apt-based Linux, try running <code>sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev</code>.</li>
 453 <li>To install on an rpm-based Linux, try running <code>sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel</code>.</li>
 454 <li>To install on Solaris, try running <code>pkg install x11/header/x11-protocols x11/library/libice x11/library/libpthread-stubs x11/library/libsm x11/library/libx11 x11/library/libxau x11/library/libxcb x11/library/libxdmcp x11/library/libxevie x11/library/libxext x11/library/libxrender x11/library/libxscrnsaver x11/library/libxtst x11/library/toolkit/libxt</code>.</li>
 455 </ul>
 456 <p>Use <code>--with-x=&lt;path&gt;</code> if <code>configure</code> does not properly locate your X11 files.</p>
 457 <h3 id="alsa">ALSA</h3>
 458 <p>ALSA, <a href="https://www.alsa-project.org/">Advanced Linux Sound Architecture</a> is required on Linux. At least version 0.9.1 of ALSA is required.</p>
 459 <ul>
 460 <li>To install on an apt-based Linux, try running <code>sudo apt-get install libasound2-dev</code>.</li>
 461 <li>To install on an rpm-based Linux, try running <code>sudo yum install alsa-lib-devel</code>.</li>
 462 </ul>
 463 <p>Use <code>--with-alsa=&lt;path&gt;</code> if <code>configure</code> does not properly locate your ALSA files.</p>
 464 <h3 id="libffi">libffi</h3>
 465 <p>libffi, the <a href="http://sourceware.org/libffi">Portable Foreign Function Interface Library</a> is required when building the Zero version of Hotspot.</p>
 466 <ul>
 467 <li>To install on an apt-based Linux, try running <code>sudo apt-get install libffi-dev</code>.</li>
 468 <li>To install on an rpm-based Linux, try running <code>sudo yum install libffi-devel</code>.</li>
 469 </ul>
 470 <p>Use <code>--with-libffi=&lt;path&gt;</code> if <code>configure</code> does not properly locate your libffi files.</p>







 471 <h2 id="other-tooling-requirements">Other Tooling Requirements</h2>
 472 <h3 id="gnu-make">GNU Make</h3>
 473 <p>OpenJDK requires <a href="http://www.gnu.org/software/make">GNU Make</a>. No other flavors of make are supported.</p>
 474 <p>At least version 3.81 of GNU Make must be used. For distributions supporting GNU Make 4.0 or above, we strongly recommend it. GNU Make 4.0 contains useful functionality to handle parallel building (supported by <code>--with-output-sync</code>) and speed and stability improvements.</p>
 475 <p>Note that <code>configure</code> locates and verifies a properly functioning version of <code>make</code> and stores the path to this <code>make</code> binary in the configuration. If you start a build using <code>make</code> on the command line, you will be using the version of make found first in your <code>PATH</code>, and not necessarily the one stored in the configuration. This initial make will be used as &quot;bootstrap make&quot;, and in a second stage, the make located by <code>configure</code> will be called. Normally, this will present no issues, but if you have a very old <code>make</code>, or a non-GNU Make <code>make</code> in your path, this might cause issues.</p>
 476 <p>If you want to override the default make found by <code>configure</code>, use the <code>MAKE</code> configure variable, e.g. <code>configure MAKE=/opt/gnu/make</code>.</p>
 477 <p>On Solaris, it is common to call the GNU version of make by using <code>gmake</code>.</p>
 478 <h3 id="gnu-bash">GNU Bash</h3>
 479 <p>OpenJDK requires <a href="http://www.gnu.org/software/bash">GNU Bash</a>. No other shells are supported.</p>
 480 <p>At least version 3.2 of GNU Bash must be used.</p>
 481 <h3 id="autoconf">Autoconf</h3>
 482 <p>If you want to modify the build system itself, you need to install <a href="http://www.gnu.org/software/autoconf">Autoconf</a>.</p>
 483 <p>However, if you only need to build OpenJDK or if you only edit the actual OpenJDK source files, there is no dependency on autoconf, since the source distribution includes a pre-generated <code>configure</code> shell script.</p>
 484 <p>See the section on <a href="#autoconf-details">Autoconf Details</a> for details on how OpenJDK uses autoconf. This is especially important if you plan to contribute changes to OpenJDK that modifies the build system.</p>
 485 <h2 id="running-configure">Running Configure</h2>
 486 <p>To build OpenJDK, you need a &quot;configuration&quot;, which consists of a directory where to store the build output, coupled with information about the platform, the specific build machine, and choices that affect how OpenJDK is built.</p>
 487 <p>The configuration is created by the <code>configure</code> script. The basic invocation of the <code>configure</code> script looks like this:</p>
 488 <pre><code>bash configure [options]</code></pre>
 489 <p>This will create an output directory containing the configuration and setup an area for the build result. This directory typically looks like <code>build/linux-x64-normal-server-release</code>, but the actual name depends on your specific configuration. (It can also be set directly, see <a href="#using-multiple-configurations">Using Multiple Configurations</a>). This directory is referred to as <code>$BUILD</code> in this documentation.</p>
 490 <p><code>configure</code> will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem.</p>


 512 <li><code>--with-target-bits=&lt;bits&gt;</code> - Create a target binary suitable for running on a <code>&lt;bits&gt;</code> platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a <em>reduced</em> build.)</li>
 513 </ul>
 514 <h4 id="configure-arguments-for-native-compilation">Configure Arguments for Native Compilation</h4>
 515 <ul>
 516 <li><code>--with-devkit=&lt;path&gt;</code> - Use this devkit for compilers, tools and resources</li>
 517 <li><code>--with-sysroot=&lt;path&gt;</code> - Use this directory as sysroot</li>
 518 <li><code>--with-extra-path=&lt;path&gt;[;&lt;path&gt;]</code> - Prepend these directories to the default path when searching for all kinds of binaries</li>
 519 <li><code>--with-toolchain-path=&lt;path&gt;[;&lt;path&gt;]</code> - Prepend these directories when searching for toolchain binaries (compilers etc)</li>
 520 <li><code>--with-extra-cflags=&lt;flags&gt;</code> - Append these flags when compiling JDK C files</li>
 521 <li><code>--with-extra-cxxflags=&lt;flags&gt;</code> - Append these flags when compiling JDK C++ files</li>
 522 <li><code>--with-extra-ldflags=&lt;flags&gt;</code> - Append these flags when linking JDK libraries</li>
 523 </ul>
 524 <h4 id="configure-arguments-for-external-dependencies">Configure Arguments for External Dependencies</h4>
 525 <ul>
 526 <li><code>--with-boot-jdk=&lt;path&gt;</code> - Set the path to the <a href="#boot-jdk-requirements">Boot JDK</a></li>
 527 <li><code>--with-freetype=&lt;path&gt;</code> - Set the path to <a href="#freetype">FreeType</a></li>
 528 <li><code>--with-cups=&lt;path&gt;</code> - Set the path to <a href="#cups">CUPS</a></li>
 529 <li><code>--with-x=&lt;path&gt;</code> - Set the path to <a href="#x11">X11</a></li>
 530 <li><code>--with-alsa=&lt;path&gt;</code> - Set the path to <a href="#alsa">ALSA</a></li>
 531 <li><code>--with-libffi=&lt;path&gt;</code> - Set the path to <a href="#libffi">libffi</a></li>

 532 <li><code>--with-jtreg=&lt;path&gt;</code> - Set the path to JTReg. See <a href="#running-tests">Running Tests</a></li>
 533 </ul>
 534 <p>Certain third-party libraries used by OpenJDK (libjpeg, giflib, libpng, lcms and zlib) are included in the OpenJDK repository. The default behavior of the OpenJDK build is to use this version of these libraries, but they might be replaced by an external version. To do so, specify <code>system</code> as the <code>&lt;source&gt;</code> option in these arguments. (The default is <code>bundled</code>).</p>
 535 <ul>
 536 <li><code>--with-libjpeg=&lt;source&gt;</code> - Use the specified source for libjpeg</li>
 537 <li><code>--with-giflib=&lt;source&gt;</code> - Use the specified source for giflib</li>
 538 <li><code>--with-libpng=&lt;source&gt;</code> - Use the specified source for libpng</li>
 539 <li><code>--with-lcms=&lt;source&gt;</code> - Use the specified source for lcms</li>
 540 <li><code>--with-zlib=&lt;source&gt;</code> - Use the specified source for zlib</li>
 541 </ul>
 542 <p>On Linux, it is possible to select either static or dynamic linking of the C++ runtime. The default is static linking, with dynamic linking as fallback if the static library is not found.</p>
 543 <ul>
 544 <li><code>--with-stdc++lib=&lt;method&gt;</code> - Use the specified method (<code>static</code>, <code>dynamic</code> or <code>default</code>) for linking the C++ runtime.</li>
 545 </ul>
 546 <h3 id="configure-control-variables">Configure Control Variables</h3>
 547 <p>It is possible to control certain aspects of <code>configure</code> by overriding the value of <code>configure</code> variables, either on the command line or in the environment.</p>
 548 <p>Normally, this is <strong>not recommended</strong>. If used improperly, it can lead to a broken configuration. Unless you're well versed in the build system, this is hard to use properly. Therefore, <code>configure</code> will print a warning if this is detected.</p>
 549 <p>However, there are a few <code>configure</code> variables, known as <em>control variables</em> that are supposed to be overriden on the command line. These are variables that describe the location of tools needed by the build, like <code>MAKE</code> or <code>GREP</code>. If any such variable is specified, <code>configure</code> will use that value instead of trying to autodetect the tool. For instance, <code>bash configure MAKE=/opt/gnumake4.0/bin/make</code>.</p>
 550 <p>If a configure argument exists, use that instead, e.g. use <code>--with-jtreg</code> instead of setting <code>JTREGEXE</code>.</p>
 551 <p>Also note that, despite what autoconf claims, setting <code>CFLAGS</code> will not accomplish anything. Instead use <code>--with-extra-cflags</code> (and similar for <code>cxxflags</code> and <code>ldflags</code>).</p>


common/doc/building.html
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File