<?xml version="1.0"?>
<document>
  <properties>
    <author email="dev@apr.apache.org">APR Developers</author>
    <title>Compiling APR for UNIX</title>
  </properties>
<body>

<section id="fromsource">
<title>Building from Source</title>

<p>We've attempted to ensure that compiling apr, apr-iconv and
   apr-util distribution tarballs requires nothing more than what
   comes installed by default on various UNIX platforms.</p>

<p>All you should have to do is this:</p>

<blockquote><pre>
./configure
make
make install
</pre></blockquote>

<p>Note that if you are compiling directly from the Subversion repository,
   you'll need GNU autoconf and GNU libtool installed, and you'll need
   to run <code>./buildconf</code> before running the commands listed above.
</p>

</section>

<section id="fromrpm">
  <title>Building RPMs (Redhat / CentOS / Fedora)</title>

  <p>While APR is available as an RPM for most distributions, it can
  sometimes be desirable to install and use the canonical version of
  APR on these systems, replacing the natively provided versions
  of the packages.</p>

  <p>While the APR project does not currently create binary RPMs for
  the various distributions out there, it is easy to build your own
  binary RPMs from the canonical APR and APR-Util tarballs as follows.</p>

  <section id="creatingsrpms">
    <title>Creating Source RPMs</title>

    <p>The APR and APR-Util source tarballs can be converted into SRPMs
    as follows:</p>

    <pre>
      rpmbuild -ts apr-1.4.x.tar.bz2
      rpmbuild -ts apr-util-1.4.x.tar.bz2
    </pre>

  </section>

  <section id="buildingrpms">
    <title>Building RPMs</title>

    <p>The APR RPM can be built directly from the APR source tarball using
    the following command:</p>

    <blockquote>
      <code>rpmbuild -tb apr-1.4.x.tar.bz2</code>
    </blockquote>

    <p>Corresponding "-devel" packages will be required to be installed on your
    build system prior to building the RPMs, the <code>rpmbuild</code> command
    will automatically calculate what RPMs are required and will list any
    dependencies that are missing on your system. These "-devel" packages will
    not be required after the build is completed, and can be safely removed.</p>

    <p>If successful, the following RPMs will be created:</p>

    <dl>
    <dt>apr-1.4.x-1.i686.rpm</dt>
    <dd>The core APR library.</dd>

    <dt>apr-debuginfo-1.4.x-1.i686.rpm</dt>
    <dd>Debugging symbols for the library.</dd>

    <dt>apr-devel-1.4.x-1.i686.rpm</dt>
    <dd>Headers and development files for the library.</dd>
    </dl>

    <p>An APR-Util RPM can be built directly from the APR-Util source
    tarball using the following command:</p>

    <blockquote>
      <code>rpmbuild -tb apr-util-1.4.x.tar.bz2</code>
    </blockquote>

    <p>If successful, the following RPMs will be created:</p>

    <dl>
    <dt>apr-util-1.4.x-1.i686.rpm</dt>
    <dd>The core APR-Util library.</dd>

    <dt>apr-util-debuginfo-1.4.x-1.i686.rpm</dt>
    <dd>Debugging symbols for the library.</dd>

    <dt>apr-util-devel-1.4.x-1.i686.rpm</dt>
    <dd>Headers and development files for the library.</dd>

    <dt>apr-util-dbm-1.4.x-1.i686.rpm</dt>
    <dd>DBM driver, dependent on db4.</dd>

    <dt>apr-util-pgsql-1.4.x-1.i686.rpm</dt>
    <dd>DBD Postgres driver, dependent on postgresql.</dd>

    <dt>apr-util-mysql-1.4.x-1.i686.rpm</dt>
    <dd>DBD MySQL driver, dependent on mysql.</dd>

    <dt>apr-util-sqlite-1.4.x-1.i686.rpm</dt>
    <dd>DBD SQLite3 driver, dependent on sqlite3.</dd>

    <dt>apr-util-freetds-1.4.x-1.i686.rpm</dt>
    <dd>DBD FreeTDS driver, dependent on freetds.</dd>

    <dt>apr-util-odbc-1.4.x-1.i686.rpm</dt>
    <dd>DBD ODBC driver, dependent on unixODBC.</dd>

    <dt>apr-util-ldap-1.4.x-1.i686.rpm</dt>
    <dd>LDAP driver, dependent on openldap.</dd>

    <dt>apr-util-openssl-1.4.x-1.i686.rpm</dt>
    <dd>Crypto OpenSSL driver, dependent on openssl.</dd>

    <dt>apr-util-nss-1.4.x-1.i686.rpm</dt>
    <dd>Crypto NSS driver, dependent on Mozilla NSS.</dd>
    </dl>

  </section>

</section>

</body>
</document>

