| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <!-- | |
| Licensed to the Apache Software Foundation (ASF) under one or more | |
| contributor license agreements. See the NOTICE file distributed with | |
| this work for additional information regarding copyright ownership. | |
| The ASF licenses this file to You under the Apache License, Version 2.0 | |
| (the "License"); you may not use this file except in compliance with | |
| the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an "AS IS" BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| See the License for the specific language governing permissions and | |
| limitations under the License. | |
| --><html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <title>log4cxx - Building Apache log4cxx with autotools</title> | |
| <style type="text/css" media="all"> | |
| @import url("../css/maven-base.css"); | |
| @import url("../css/maven-theme.css"); | |
| @import url("../css/site.css"); | |
| </style> | |
| <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" /> | |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> | |
| </head> | |
| <body class="composite"> | |
| <div id="banner"> | |
| <a href="http://logging.apache.org/" id="bannerLeft"> | |
| <img src="../images/ls-logo.jpg" alt="" /> | |
| </a> | |
| <div class="clear"> | |
| <hr/> | |
| </div> | |
| </div> | |
| <div id="breadcrumbs"> | |
| <div class="xleft"> | |
| Last Published: 2008-03-31 | |
| | | |
| <a href="http://www.apache.org/" class="externalLink">Apache</a> | |
| > | |
| <a href="http://logging.apache.org/" class="externalLink">Logging Services</a> | |
| > | |
| <a href="../">log4cxx</a> | |
| </div> | |
| <div class="xright"> | |
| </div> | |
| <div class="clear"> | |
| <hr/> | |
| </div> | |
| </div> | |
| <div id="leftColumn"> | |
| <div id="navcolumn"> | |
| <h5>Get log4cxx</h5> | |
| <ul> | |
| <li class="none"> | |
| <a href="../download.html">Download</a> | |
| </li> | |
| <li class="none"> | |
| <a href="../changes-report.html">Changes</a> | |
| </li> | |
| <li class="none"> | |
| <a href="../license.html">License</a> | |
| </li> | |
| </ul> | |
| <h5>About log4cxx</h5> | |
| <ul> | |
| <li class="none"> | |
| <a href="../index.html">What is log4cxx?</a> | |
| </li> | |
| <li class="none"> | |
| <a href="../apidocs/index.html">API Documentation</a> | |
| </li> | |
| <li class="none"> | |
| <a href="../faq.html">FAQ</a> | |
| </li> | |
| </ul> | |
| <h5>Community</h5> | |
| <ul> | |
| <li class="none"> | |
| <a href="../mail-lists.html">Mailing Lists</a> | |
| </li> | |
| <li class="none"> | |
| <a href="../issue-tracking.html">Issue Tracking</a> | |
| </li> | |
| <li class="none"> | |
| <a href="http://wiki.apache.org/logging-log4cxx" class="externalLink">Wiki</a> | |
| </li> | |
| </ul> | |
| <h5>Development</h5> | |
| <ul> | |
| <li class="none"> | |
| <a href="../source-repository.html">Repository</a> | |
| </li> | |
| <li class="expanded"> | |
| <a href="../">Building</a> | |
| <ul> | |
| <li class="none"> | |
| <strong>autotools</strong> | |
| </li> | |
| <li class="none"> | |
| <a href="../building/ant.html">Apache Ant</a> | |
| </li> | |
| <li class="none"> | |
| <a href="../building/maven.html">Apache Maven 2</a> | |
| </li> | |
| <li class="none"> | |
| <a href="../building/vstudio.html">Microsoft Visual Studio</a> | |
| </li> | |
| <li class="none"> | |
| <a href="../building/xcode.html">Apple Xcode</a> | |
| </li> | |
| </ul> | |
| </li> | |
| </ul> | |
| <h5>Apache</h5> | |
| <ul> | |
| <li class="none"> | |
| <a href="http://www.apache.org" class="externalLink">Home</a> | |
| </li> | |
| <li class="none"> | |
| <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink">Sponsorship</a> | |
| </li> | |
| <li class="none"> | |
| <a href="http://www.apache.org/foundation/thanks.html" class="externalLink">Thanks</a> | |
| </li> | |
| <li class="none"> | |
| <a href="http://www.apachecon.com" class="externalLink">Conferences</a> | |
| </li> | |
| </ul> | |
| <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"> | |
| <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img> | |
| </a> | |
| </div> | |
| </div> | |
| <div id="bodyColumn"> | |
| <div id="contentBox"> | |
| <div class="section"><h2>Building Apache log4cxx with autotools</h2> | |
| <div class="section"><h3>Quick start:</h3> | |
| <p>Install or build apr 1.x, apr-util 1.x, gzip and zip.</p> | |
| <div class="source"><pre>$ cd apache-log4cxx-0.10.0 | |
| $ ./configure | |
| $ make | |
| $ make check | |
| $ sudo make install</pre> | |
| </div> | |
| </div> | |
| <div class="section"><h3>configure options</h3> | |
| <table class="bodyTable"><tbody><tr class="a"><td align="left">--with-apr</td> | |
| <td align="left">path to non-default location for APR.</td> | |
| </tr> | |
| <tr class="b"><td align="left">--with-apr-util</td> | |
| <td align="left">path to non-default location for APR-Util.</td> | |
| </tr> | |
| <tr class="a"><td align="left">--enable-wchar_t</td> | |
| <td align="left">Enable wchar_t API methods, choice of yes (default), no.</td> | |
| </tr> | |
| <tr class="b"><td align="left">--enable-unichar</td> | |
| <td align="left">Enable UniChar API methods, choice of yes, no (default).</td> | |
| </tr> | |
| <tr class="a"><td align="left">--enable-cfstring</td> | |
| <td align="left">Enable CFString API methods, requires Mac OS/X CoreFoundation, choice of yes, no (default).</td> | |
| </tr> | |
| <tr class="b"><td align="left">--with-logchar</td> | |
| <td align="left">Interal character representation, choice of utf-8 (default), wchar_t , unichar.</td> | |
| </tr> | |
| <tr class="a"><td align="left">--with-charset</td> | |
| <td align="left">Exteral character encoding, choice of utf-8, iso-8859-1, usascii, ebcdic, auto (default).</td> | |
| </tr> | |
| <tr class="b"><td align="left">--with-SMTP</td> | |
| <td align="left">SMTP implementation for SMTPAppender, choice of libesmtp, no (default).</td> | |
| </tr> | |
| <tr class="a"><td align="left">--with-ODBC</td> | |
| <td align="left">OBDC implementation for ODBCAppender, choice of unixODBC, iODBC, Microsoft, no (default).</td> | |
| </tr> | |
| <tr class="b"><td align="left">-help</td> | |
| <td align="left">Display help showing all options and exit.</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| <p>SMTP and ODBC options can depend on libraries that that have different licenses. You should review the corresponding licenses and understand the implications before redistribution.</p> | |
| </div> | |
| <div class="section"><h3>Platform specific notes:</h3> | |
| <div class="section"><h4>Mac OS/X:</h4> | |
| <p>APR and APR-Util are provided by the platform in Mac OS/X 10.5 and iODBC in 10.4.</p> | |
| </div> | |
| <div class="section"><h4>Debian:</h4> | |
| <p>APR, APR-Util and zip may be installed by:</p> | |
| <div class="source"><pre>$ sudo apt-get install libapr1.0-dev libaprutil1.0-dev zip</pre> | |
| </div> | |
| </div> | |
| <div class="section"><h4>FreeBSD:</h4> | |
| <p>APR, APR-Util and zip may be installed from the ports collection by:</p> | |
| <div class="source"><pre># cd /usr/ports/archivers/zip | |
| # make | |
| # make install | |
| # cd /usr/ports/devel/apr | |
| # make | |
| # make install</pre> | |
| </div> | |
| </div> | |
| <div class="section"><h4>Cygwin:</h4> | |
| <p>Install zip (used by RollingFileAppender) and sed (used to normalize output files for comparison in the unit tests). The prepackaged APR currently available from Cygwin has APR_HAS_THREADS == 0. Some appenders will not be available and some may operate with reduced functionality. There have been reports of building APR on Cygwin with threads enabled.</p> | |
| </div> | |
| <div class="section"><h4>MinGW:</h4> | |
| <p>Recent APR 1.2.x releases fail ./configure with a error of "decision on anonymous shared memory failed". That issue has been fixed in the current APR SVN HEAD. The follow sequence worked with MSYS (with Python on Path):</p> | |
| <div class="source"><pre>$ cd expat-2.0.1 | |
| $ ./configure | |
| $ make install | |
| $ cd .. | |
| $ svn co https://svn.apache.org/repos/asf/apr/apr/trunk apr | |
| $ cd apr | |
| $ ./buildconf.sh | |
| $ ./configure | |
| $ make install | |
| $ cd .. | |
| $ svn co \ | |
| https://svn.apache.org/repos/asf/apr/apr-util/trunk \ | |
| apr-util | |
| $ cd apr-util | |
| $ ./buildconf.sh | |
| $ ./configure --with-apr=/usr/local --with-expat=/usr/local | |
| $ make install | |
| $ cd ../apache-log4cxx-0.10.0 | |
| $ ./configure --with-apr=/usr/local \ | |
| --with-apr-util=/usr/local --with-logchar=wchar_t | |
| $ make install</pre> | |
| </div> | |
| <p>Running "make check" was observed to fail with unexpected exceptions in streamtestcase and datetimedateformattestcase. See <a href="http://issues.apache.org/jira/browse/LOGCXX-244" class="externalLink">LOGCXX-244</a> | |
| .</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="clear"> | |
| <hr/> | |
| </div> | |
| <div id="footer"> | |
| <div class="xright">© | |
| 2008 | |
| Apache Software Foundation | |
| </div> | |
| <div class="clear"> | |
| <hr/> | |
| </div> | |
| </div> | |
| </body> | |
| </html> |