<h1><aclass="anchor"name="hppDoc_autotools">About autoconf, automake and pkg-config</a></h1><h2><aclass="anchor"name="hppDoc_autotools_intro">
Introduction</a></h2>
HPP (Humanoid Path Planner) is composed of several software modules managed by autotools. This page explains the basics of these tools for more information, the reader is refered to the official documentation pages of each tool.
<h2><aclass="anchor"name="hppDoc_autoconf">
Autoconf</a></h2>
Autoconf takes as input file <code>configure.ac</code> and builds <code>configure</code> script.
<h3><aclass="anchor"name="hppDoc_autoconf_commands">Main commands in <code>configure.ac</code></a></h3>
File <code>configure.ac</code> should start by this command. The command specifies the name of the package, the version number and a contact for bug report.
This commands specifies that <ahref="hppdoc_autotools.html#hppdoc_automake"><code>automake</code></a> will be used to generate <code>Makefile.in</code> files.
This command specifies that the dependence to package <code>packageName</code> will be handled by <ahref="hppdoc_autotools.html#hppDoc_pkg_config"><code>pkg-config</code></a> at configuration.
For example the following lines will trigger the following operations:
The current package depends on <code>kwsPlus</code>, version at least 1.1. The following variable will be defined and substituted by their value by <code>configure</code> script:
<ul>
<li><code>KWSPLUS_PREFIX</code> contains the prefix where <code>kwsPlus</code> has been installed,</li>
<li><code>KWSPLUS_CFLAGS</code> contains compilation flags necessary to compile source files including headers of <code>kwsPlus</code>,</li>
<li><code>KWSPLUS_LIBS</code> contains linking flags necessary to link with <code>kwsPlus</code>.</li>
This command specifies which files are generated in the build directory by <code>configure</code> script. For each output, the corresponding file ending with extension <code>.in</code> should exist in the source hierarchy. For instance,
<divclass="fragment"><preclass="fragment">
AC_OUTPUT(Makefile
src/Makefile
include/Makefile
doc/package.dox
)
</pre></div>
specifies that configure will create 4 files in the build directory:
<ul>
<li><code>build/Makefile</code></li>
<li><code>build/src/Makefile</code></li>
<li><code>build/include/Makefile</code></li>
<li><code>build/doc/package.dox</code></li>
</ul>
The following files should therefore exist:
<ul>
<li><code>Makefile.in</code></li>
<li><code>src/Makefile.in</code></li>
<li><code>include/Makefile.in</code></li>
<li><code>doc/package.dox.in</code></li>
</ul>
Note that <code>@KWSPLUS_PREFIX@</code> in <code>doc/package.dox.in</code> will be transformed into the string corresponding to the directory where package <code>kwsPlus</code> has been installed in <code>build/doc/package.dox.in</code>
<code>lib_LTLIBRARIES</code> specifies the name of the library to be built and installed by this package. Extension <code>.la</code> means that <code>libtool</code> is used.
<br>
<code>libpackage_la_SOURCES</code> specifies the list of source files that constitute the library.
<br>
<code>libpackage_la_CPPFLAGS</code> specifies the compilation flags to be used. Note that
<ul>
<li><code>-I$(top_srcdir)/include</code> give access to the header of this package that are located in <code>include</code> directory, </li>
<li><code>-I@DEPENDENCE_CFLAGS@</code> specifies compilation flags to access the header files of some dependences. The string eventually produced at configuration in build directory will be produced by <ahref="hppdoc_autotools.html#hppDoc_pkg_config"><code>pkg-config</code></a>.</li>
</ul>
<br>
<code>libpackage_la_LDFLAGS</code> defines the linking flags. Note that <ahref="hppdoc_autotools.html#hppDoc_pkg_config"><code>pkg-config</code></a> will replace <code>@DEPENDENCE_LIBS@</code> at configuration by linking options <code>-L... -l...</code> to link with dependence libraries.
The directories where <code>pkg-config</code> looks for file <code>package.pc</code> is defined by environment variable <code>PKG_CONFIG_PATH</code>. <code>pkg-config</code> scan directories in the order they are specified in <code>PKG_CONFIG_PATH</code>.
<p><imgsrc="pictures/ftv2blank.png"alt=" "width=16height=22/><imgsrc="pictures/ftv2node.png"alt="o"width=16height=22/><imgsrc="pictures/ftv2doc.png"alt="*"width=24height=22/><aclass="el"href="hppdoc_development.html"target="basefrm">Developing in Hpp</a></p>
<p><imgsrc="pictures/ftv2blank.png"alt=" "width=16height=22/><imgsrc="pictures/ftv2lastnode.png"alt="\"width=16height=22/><imgsrc="pictures/ftv2doc.png"alt="*"width=24height=22/><aclass="el"href="hppdoc_howtoinstall.html"target="basefrm">How to install HPP</a></p>