]> granicus.if.org Git - apache/blobdiff - docs/manual/programs/apxs.html.en
Rebuild generated files.
[apache] / docs / manual / programs / apxs.html.en
index 183f6adebc1ff6cbff35d3c4e42fdead580afd61..19adfcc83a7e85ac359e3ad4fbc6871e01c7290c 100644 (file)
 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
 <body id="manual-page"><div id="page-header">
 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
-<p class="apache">Apache HTTP Server Version 2.1</p>
+<p class="apache">Apache HTTP Server Version 2.3</p>
 <img alt="" src="../images/feather.gif" /></div>
 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
 <div id="path">
-<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs-project/">Documentation</a> &gt; <a href="../">Version 2.1</a> &gt; <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>apxs - APache eXtenSion tool</h1>
+<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>apxs - APache eXtenSion tool</h1>
 <div class="toplang">
-<p><span>Available Languages: </span><a href="../en/programs/apxs.html" title="English">&nbsp;en&nbsp;</a></p>
+<p><span>Available Languages: </span><a href="../en/programs/apxs.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../ko/programs/apxs.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
+<a href="../tr/programs/apxs.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
 </div>
 
     <p><code>apxs</code> is a tool for building and installing extension
@@ -29,7 +31,7 @@
     directive from <code class="module"><a href="../mod/mod_so.html">mod_so</a></code>.</p>
 
     <p>So to use this extension mechanism your platform has to support the DSO
-    feature and your Apache <code>httpd</code> binary has to be built with the
+    feature and your Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> binary has to be built with the
     <code class="module"><a href="../mod/mod_so.html">mod_so</a></code> module. The <code>apxs</code> tool automatically
     complains if this is not the case. You can check this yourself by manually
     running the command</p>
@@ -75,7 +77,7 @@
 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#synopsis">Synopsis</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#examples">Examples</a></li>
-</ul><h3>See also</h3><ul class="seealso"><li><a href="apachectl.html">apachectl</a></li><li><a href="httpd.html">httpd</a></li></ul></div>
+</ul><h3>See also</h3><ul class="seealso"><li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li><li><code class="program"><a href="../programs/httpd.html">httpd</a></code></li></ul></div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
 <h2><a name="synopsis" id="synopsis">Synopsis</a></h2>
@@ -84,6 +86,7 @@
     -<strong>n</strong> <var>modname</var></code></p>
 
     <p><code><strong>apxs</strong> -<strong>q</strong>
+    [ -<strong>v</strong> ]
     [ -<strong>S</strong> <var>name</var>=<var>value</var> ]
     <var>query</var> ...</code></p>
 
     <h3><a name="options.query" id="options.query">Query Options</a></h3>
       <dl>
       <dt><code>-q</code></dt>
-      <dd>Performs a query for <code>apxs</code>'s knowledge about certain
-      settings. The <var>query</var> parameters can be one or more of the
-      following strings: <code>CC</code>, <code>CFLAGS</code>,
-      <code>CFLAGS_SHLIB</code>, <code>INCLUDEDIR</code>, <code>LD_SHLIB</code>,
-      <code>LDFLAGS_SHLIB</code>, <code>LIBEXECDIR</code>,
-      <code>LIBS_SHLIB</code>, <code>SBINDIR</code>, <code>SYSCONFDIR</code>,
-      <code>TARGET</code>.
-
-      <p>Use this for manually determining settings. For instance use</p>
+      <dd>Performs a query for variables and environment settings used to 
+      build <code>httpd</code>.  When invoked without <var>query</var> parameters, 
+      it prints all known variables and their values.  The optional <code>-v</code> 
+      parameter formats the list output.
+
+      <p>Use this to manually determine settings used to build the 
+      <code>httpd</code> that will load your module.  For instance use</p>
       <div class="example"><p><code>
         INC=-I`apxs -q INCLUDEDIR`
       </code></p></div>
 
       <dt><code>-Wc,<var>compiler-flags</var></code></dt>
       <dd>This option passes <var>compiler-flags</var> as additional flags to
-      the compiler command. Use this to add local compiler-specific options.</dd>
+      the <code>libtool --mode=compile</code> command. Use this to add local
+      compiler-specific options.</dd>
 
       <dt><code>-Wl,<var>linker-flags</var></code></dt>
-      <dd>This option passes <var>linker-flags</var> as additional flags to
-      the linker command. Use this to add local linker-specific options.</dd>
+      <dd>This option passes <var>linker-flags</var> as additional
+      flags to the <code>libtool --mode=link</code> command. Use this
+      to add local linker-specific options.</dd>
       </dl>
     
 
 
     <div class="example"><p><code>
       $ apxs -c mod_foo.c<br />
-      gcc -fpic -DSHARED_MODULE -I/path/to/apache/include -c mod_foo.c<br />
-      ld -Bshareable -o mod_foo.so mod_foo.o<br />
+      /path/to/libtool --mode=compile gcc ... -c mod_foo.c<br />
+      /path/to/libtool --mode=link gcc ... -o mod_foo.la mod_foo.slo<br />
       $ _
     </code></p></div>
 
     achieved by running:</p>
 
     <div class="example"><p><code>
-      $ apxs -i -a mod_foo.c<br />
-      cp mod_foo.so /path/to/apache/modules/mod_foo.so<br />
+      $ apxs -i -a mod_foo.la<br />
+      /path/to/instdso.sh mod_foo.la /path/to/apache/modules<br />
+      /path/to/libtool --mode=install cp mod_foo.la /path/to/apache/modules
+      ...
       chmod 755 /path/to/apache/modules/mod_foo.so<br />
-      [activating module `foo' in /path/to/apache/etc/httpd.conf]<br />
+      [activating module `foo' in /path/to/apache/conf/httpd.conf]<br />
       $ _
     </code></p></div>
 
       $ apxs -g -n foo<br />
       Creating [DIR]  foo<br />
       Creating [FILE] foo/Makefile<br />
+      Creating [FILE] foo/modules.mk<br />
       Creating [FILE] foo/mod_foo.c<br />
+      Creating [FILE] foo/.deps<br />
       $ _
     </code></p></div>
 
       $ cd foo<br />
       $ make all reload<br />
       apxs -c mod_foo.c<br />
-      gcc -fpic -DSHARED_MODULE -I/path/to/apache/include -c mod_foo.c<br />
-      ld -Bshareable -o mod_foo.so mod_foo.o<br />
-      apxs -i -a -n "foo" mod_foo.so<br />
-      cp mod_foo.so /path/to/apache/modules/mod_foo.so<br />
+      /path/to/libtool --mode=compile gcc ... -c mod_foo.c<br />
+      /path/to/libtool --mode=link gcc ... -o mod_foo.la mod_foo.slo<br />
+      apxs -i -a -n "foo" mod_foo.la<br />
+      /path/to/instdso.sh mod_foo.la /path/to/apache/modules<br />
+      /path/to/libtool --mode=install cp mod_foo.la /path/to/apache/modules
+      ...
       chmod 755 /path/to/apache/modules/mod_foo.so<br />
-      [activating module `foo' in /path/to/apache/etc/httpd.conf]<br />
+      [activating module `foo' in /path/to/apache/conf/httpd.conf]<br />
       apachectl restart<br />
       /path/to/apache/sbin/apachectl restart: httpd not running, trying to start<br />
       [Tue Mar 31 11:27:55 1998] [debug] mod_so.c(303): loaded module foo_module<br />
       $ _
     </code></p></div>
 
-    <p>You can even use <code>apxs</code> to compile complex modules outside the
-    Apache source tree, like PHP3:</p>
-
-    <div class="example"><p><code>
-      $ cd php3<br />
-      $ ./configure --with-shared-apache=../apache-1.3<br />
-      $ apxs -c -o libphp3.so mod_php3.c libmodphp3-so.a<br />
-      gcc -fpic -DSHARED_MODULE -I/tmp/apache/include  -c mod_php3.c<br />
-      ld -Bshareable -o libphp3.so mod_php3.o libmodphp3-so.a<br />
-      $ _
-    </code></p></div>
-
-    <p>because <code>apxs</code> automatically recognized C source files and
-    object files. Only C source files are compiled while remaining object
-    files are used for the linking phase.</p>
 </div></div>
 <div class="bottomlang">
-<p><span>Available Languages: </span><a href="../en/programs/apxs.html" title="English">&nbsp;en&nbsp;</a></p>
+<p><span>Available Languages: </span><a href="../en/programs/apxs.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../ko/programs/apxs.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
+<a href="../tr/programs/apxs.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
 </div><div id="footer">
-<p class="apache">Copyright 1999-2004 The Apache Software Foundation</p>
+<p class="apache">Copyright 2010 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
 </body></html>
\ No newline at end of file